Skip to content

Commit

Permalink
init (#176)
Browse files Browse the repository at this point in the history
* init

* fix version

* more versions
  • Loading branch information
ADandyGuyInSpace authored Aug 27, 2024
1 parent dfbf059 commit 2f17033
Show file tree
Hide file tree
Showing 7 changed files with 205 additions and 26 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.26.2
1.27.0
68 changes: 68 additions & 0 deletions lib/resources/Verifications.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
'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,
}),
});
61 changes: 61 additions & 0 deletions lib/resources/VerifyProfiles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
'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,
}),
});
3 changes: 2 additions & 1 deletion lib/telnyx.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ var resources = {
VerifiedCallsDisplayProfile: require('./resources/VerifiedCallsDisplayProfile'),
VerifiedCallsDisplayProfiles: require('./resources/VerifiedCallsDisplayProfiles'),
VerifiedNumbers: require('./resources/VerifiedNumbers'),
Verify: require('./resources/Verify'),
Verifications: require('./resources/Verifications'),
VerifyProfiles: require('./resources/VerifyProfiles'),
VirtualCrossConnects: require('./resources/VirtualCrossConnects'),
WebhooksApi: require('./resources/Webhooks'),
WdrDetailReports: require('./resources/WdrDetailReports'),
Expand Down
20 changes: 18 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "telnyx",
"version": "1.26.2",
"version": "1.27.0",
"description": "Telnyx API Node SDK",
"keywords": [
"telnyx",
Expand Down Expand Up @@ -43,6 +43,7 @@
"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"
},
Expand Down
74 changes: 53 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -923,12 +923,7 @@ extend@~3.0.2:
resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz"
integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==

extsprintf@^1.2.0:
version "1.4.1"
resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz"
integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==

[email protected]:
extsprintf@^1.2.0, [email protected]:
version "1.3.0"
resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz"
integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==
Expand Down Expand Up @@ -978,23 +973,23 @@ find-cache-dir@^3.2.0:
make-dir "^3.0.2"
pkg-dir "^4.1.0"

find-up@^4.0.0, find-up@^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@^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==
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 "^6.0.0"
locate-path "^5.0.0"
path-exists "^4.0.0"

[email protected]:
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==
Expand Down Expand Up @@ -1115,7 +1110,31 @@ glob-parent@~5.1.2:
dependencies:
is-glob "^4.0.1"

glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
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==
Expand Down Expand Up @@ -1419,7 +1438,14 @@ js-yaml@^3.13.1:
argparse "^1.0.7"
esprima "^4.0.0"

js-yaml@^4.1.0, [email protected]:
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"

[email protected]:
version "4.1.0"
resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz"
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
Expand Down Expand Up @@ -2117,6 +2143,17 @@ [email protected]:
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"
Expand Down Expand Up @@ -2319,12 +2356,7 @@ yargs-parser@^18.1.2:
camelcase "^5.0.0"
decamelize "^1.2.0"

yargs-parser@^20.2.2:
version "20.2.9"
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==

[email protected]:
yargs-parser@^20.2.2, [email protected]:
version "20.2.4"
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz"
integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==
Expand Down

0 comments on commit 2f17033

Please sign in to comment.