Skip to content

Commit

Permalink
Merge branch 'main' into fix-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
shwetha-manvinkurke authored Nov 4, 2021
2 parents ba03746 + 770b0a0 commit 9efd692
Show file tree
Hide file tree
Showing 24 changed files with 168 additions and 96 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 8
registry-url: 'https://registry.npmsjs.org'

- run: npm install
- name: Publish to NPM
run: |
npm config set //registry.npmjs.org/:_authToken ${NODE_AUTH_TOKEN}
npm publish --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish

notify-on-failure:
name: Slack notify on failure
Expand Down
29 changes: 29 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
twilio-node changelog
=====================

[2021-11-03] Version 3.71.1
---------------------------
**Library - Fix**
- [PR #705](https://github.com/twilio/twilio-node/pull/705): node setup wf step. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!


[2021-11-03] Version 3.71.0
---------------------------
**Library - Chore**
- [PR #703](https://github.com/twilio/twilio-node/pull/703): fix Docker image tag. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
- [PR #702](https://github.com/twilio/twilio-node/pull/702): migrate from TravisCI to GitHub Actions. Thanks to [@eshanholtz](https://github.com/eshanholtz)!

**Api**
- Updated `media_url` property to be treated as PII

**Messaging**
- Added a new enum for brand registration status named DELETED **(breaking change)**
- Add a new K12_EDUCATION use case in us_app_to_person_usecase api transaction
- Added a new enum for brand registration status named IN_REVIEW

**Serverless**
- Add node14 as a valid Build runtime

**Verify**
- Fix typos in Verify Push Factor documentation for the `config.notification_token` parameter.
- Added `TemplateCustomSubstitutions` on verification creation
- Make `TemplateSid` parameter public for Verification resource and `DefaultTemplateSid` parameter public for Service resource. **(breaking change)**


[2021-10-18] Version 3.70.0
---------------------------
**Library - Feature**
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/messaging/v1/brandRegistration.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type BrandRegistrationBrandFeedback = 'TAX_ID'|'STOCK_SYMBOL'|'NONPROFIT'|'GOVER

type BrandRegistrationIdentityStatus = 'SELF_DECLARED'|'UNVERIFIED'|'VERIFIED'|'VETTED_VERIFIED';

type BrandRegistrationStatus = 'PENDING'|'APPROVED'|'FAILED';
type BrandRegistrationStatus = 'PENDING'|'APPROVED'|'FAILED'|'IN_REVIEW'|'DELETED';

/**
* Initialize the BrandRegistrationList
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/messaging/v1/brandRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ BrandRegistrationPage.prototype[util.inspect.custom] = function inspect(depth,
* @property {Date} dateUpdated -
* The ISO 8601 date and time in GMT when the resource was last updated
* @property {string} brandType - Type of brand. One of: "STANDARD", "STARTER".
* @property {brand_registration.status} status - Brand Registration status
* @property {brand_registration.status} status - Brand Registration status.
* @property {string} tcrId - Campaign Registry (TCR) Brand ID
* @property {string} failureReason - A reason why brand registration has failed
* @property {string} url - The absolute URL of the Brand Registration
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/serverless/v1/service/build.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { BuildStatusList } from './build/buildStatus';
import { BuildStatusListInstance } from './build/buildStatus';
import { SerializableClass } from '../../../../interfaces';

type BuildRuntime = 'node8'|'node10'|'node12';
type BuildRuntime = 'node8'|'node10'|'node12'|'node14';

type BuildStatus = 'building'|'completed'|'failed';

Expand Down
6 changes: 6 additions & 0 deletions lib/rest/verify/v2/service.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ declare function ServiceList(version: V2): ServiceListInstance;
*
* @property codeLength - The length of the verification code to generate
* @property customCodeEnabled - Whether to allow sending verifications with a custom code.
* @property defaultTemplateSid - The verification template SMS messages.
* @property doNotShareWarningEnabled - Whether to add a privacy warning at the end of an SMS.
* @property dtmfInputRequired - Whether to ask the user to press a number before delivering the verify code in a phone call
* @property friendlyName - A string to describe the verification service
Expand All @@ -54,6 +55,7 @@ declare function ServiceList(version: V2): ServiceListInstance;
interface ServiceInstanceUpdateOptions {
codeLength?: number;
customCodeEnabled?: boolean;
defaultTemplateSid?: string;
doNotShareWarningEnabled?: boolean;
dtmfInputRequired?: boolean;
friendlyName?: string;
Expand Down Expand Up @@ -199,6 +201,7 @@ interface ServiceListInstance {
*
* @property codeLength - The length of the verification code to generate
* @property customCodeEnabled - Whether to allow sending verifications with a custom code.
* @property defaultTemplateSid - The verification template SMS messages.
* @property doNotShareWarningEnabled - Whether to add a security warning at the end of an SMS.
* @property dtmfInputRequired - Whether to ask the user to press a number before delivering the verify code in a phone call
* @property friendlyName - A string to describe the verification service
Expand All @@ -217,6 +220,7 @@ interface ServiceListInstance {
interface ServiceListInstanceCreateOptions {
codeLength?: number;
customCodeEnabled?: boolean;
defaultTemplateSid?: string;
doNotShareWarningEnabled?: boolean;
dtmfInputRequired?: boolean;
friendlyName: string;
Expand Down Expand Up @@ -303,6 +307,7 @@ interface ServiceResource {
custom_code_enabled: boolean;
date_created: Date;
date_updated: Date;
default_template_sid: string;
do_not_share_warning_enabled: boolean;
dtmf_input_required: boolean;
friendly_name: string;
Expand Down Expand Up @@ -389,6 +394,7 @@ declare class ServiceInstance extends SerializableClass {
customCodeEnabled: boolean;
dateCreated: Date;
dateUpdated: Date;
defaultTemplateSid: string;
doNotShareWarningEnabled: boolean;
dtmfInputRequired: boolean;
/**
Expand Down
14 changes: 12 additions & 2 deletions lib/rest/verify/v2/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ ServiceList = function ServiceList(version) {
* Optional. Number of digits for generated TOTP codes
* @param {number} [opts.totp.skew] -
* Optional. The number of past and future time-steps valid at a given time
* @param {string} [opts.defaultTemplateSid] -
* The verification template SMS messages.
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed ServiceInstance
Expand Down Expand Up @@ -129,7 +131,8 @@ ServiceList = function ServiceList(version) {
'Totp.Issuer': _.get(opts, 'totp.issuer'),
'Totp.TimeStep': _.get(opts, 'totp.timeStep'),
'Totp.CodeLength': _.get(opts, 'totp.codeLength'),
'Totp.Skew': _.get(opts, 'totp.skew')
'Totp.Skew': _.get(opts, 'totp.skew'),
'DefaultTemplateSid': _.get(opts, 'defaultTemplateSid')
});

var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
Expand Down Expand Up @@ -520,6 +523,7 @@ ServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {
* Whether to allow sending verifications with a custom code.
* @property {object} push - The service level configuration of factor push type.
* @property {object} totp - The service level configuration of factor TOTP type.
* @property {string} defaultTemplateSid - The default_template_sid
* @property {Date} dateCreated -
* The RFC 2822 date and time in GMT when the resource was created
* @property {Date} dateUpdated -
Expand Down Expand Up @@ -549,6 +553,7 @@ ServiceInstance = function ServiceInstance(version, payload, sid) {
this.customCodeEnabled = payload.custom_code_enabled; // jshint ignore:line
this.push = payload.push; // jshint ignore:line
this.totp = payload.totp; // jshint ignore:line
this.defaultTemplateSid = payload.default_template_sid; // jshint ignore:line
this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line
this.url = payload.url; // jshint ignore:line
Expand Down Expand Up @@ -641,6 +646,8 @@ ServiceInstance.prototype.remove = function remove(callback) {
* Optional. Number of digits for generated TOTP codes
* @param {number} [opts.totp.skew] -
* Optional. The number of past and future time-steps valid at a given time
* @param {string} [opts.defaultTemplateSid] -
* The verification template SMS messages.
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed ServiceInstance
Expand Down Expand Up @@ -918,6 +925,8 @@ ServiceContext.prototype.remove = function remove(callback) {
* Optional. Number of digits for generated TOTP codes
* @param {number} [opts.totp.skew] -
* Optional. The number of past and future time-steps valid at a given time
* @param {string} [opts.defaultTemplateSid] -
* The verification template SMS messages.
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed ServiceInstance
Expand Down Expand Up @@ -947,7 +956,8 @@ ServiceContext.prototype.update = function update(opts, callback) {
'Totp.Issuer': _.get(opts, 'totp.issuer'),
'Totp.TimeStep': _.get(opts, 'totp.timeStep'),
'Totp.CodeLength': _.get(opts, 'totp.codeLength'),
'Totp.Skew': _.get(opts, 'totp.skew')
'Totp.Skew': _.get(opts, 'totp.skew'),
'DefaultTemplateSid': _.get(opts, 'defaultTemplateSid')
});

var promise = this._version.update({uri: this._uri, method: 'POST', data: data});
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/verify/v2/service/entity/factor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ declare function FactorList(version: V2, serviceSid: string, identity: string):
* @property authPayload - Optional payload to verify the Factor for the first time
* @property config.alg - The algorithm used to derive the TOTP codes
* @property config.codeLength - Number of digits for generated TOTP codes
* @property config.notificationToken - For APN, the device token. For FCM the registration token
* @property config.notificationToken - For APN, the device token. For FCM, the registration token
* @property config.sdkVersion - The Verify Push SDK version used to configure the factor
* @property config.skew - The number of past and future time-steps valid at a given time
* @property config.timeStep - How often, in seconds, are TOTP codes generated
Expand Down
4 changes: 2 additions & 2 deletions lib/rest/verify/v2/service/entity/factor.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ FactorInstance.prototype.fetch = function fetch(callback) {
* Optional payload to verify the Factor for the first time
* @param {string} [opts.friendlyName] - The friendly name of this Factor
* @param {string} [opts.config.notificationToken] -
* For APN, the device token. For FCM the registration token
* For APN, the device token. For FCM, the registration token
* @param {string} [opts.config.sdkVersion] -
* The Verify Push SDK version used to configure the factor
* @param {number} [opts.config.timeStep] -
Expand Down Expand Up @@ -668,7 +668,7 @@ FactorContext.prototype.fetch = function fetch(callback) {
* Optional payload to verify the Factor for the first time
* @param {string} [opts.friendlyName] - The friendly name of this Factor
* @param {string} [opts.config.notificationToken] -
* For APN, the device token. For FCM the registration token
* For APN, the device token. For FCM, the registration token
* @param {string} [opts.config.sdkVersion] -
* The Verify Push SDK version used to configure the factor
* @param {number} [opts.config.timeStep] -
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/verify/v2/service/entity/newFactor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ interface NewFactorListInstance {
* @property config.appId - The ID that uniquely identifies your app in the Google or Apple store
* @property config.codeLength - Number of digits for generated TOTP codes
* @property config.notificationPlatform - The transport technology used to generate the Notification Token
* @property config.notificationToken - For APN, the device token. For FCM the registration token
* @property config.notificationToken - For APN, the device token. For FCM, the registration token
* @property config.sdkVersion - The Verify Push SDK version used to configure the factor
* @property config.skew - The number of past and future time-steps valid at a given time
* @property config.timeStep - How often, in seconds, are TOTP codes generated
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/verify/v2/service/entity/newFactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ NewFactorList = function NewFactorList(version, serviceSid, identity) {
* @param {new_factor.notification_platforms} [opts.config.notificationPlatform] -
* The transport technology used to generate the Notification Token
* @param {string} [opts.config.notificationToken] -
* For APN, the device token. For FCM the registration token
* For APN, the device token. For FCM, the registration token
* @param {string} [opts.config.sdkVersion] -
* The Verify Push SDK version used to configure the factor
* @param {string} [opts.binding.secret] - The shared secret in Base32
Expand Down
4 changes: 4 additions & 0 deletions lib/rest/verify/v2/service/verification.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ interface VerificationListInstance {
* @property payee - The payee of the associated PSD2 compliant transaction
* @property rateLimits - The custom key-value pairs of Programmable Rate Limits.
* @property sendDigits - The digits to send after a phone call is answered
* @property templateCustomSubstitutions - The values of the special variables declared on the message template.
* @property templateSid - The verification template SMS messages.
* @property to - The phone number or email to verify
*/
interface VerificationListInstanceCreateOptions {
Expand All @@ -83,6 +85,8 @@ interface VerificationListInstanceCreateOptions {
payee?: string;
rateLimits?: object;
sendDigits?: string;
templateCustomSubstitutions?: string;
templateSid?: string;
to: string;
}

Expand Down
7 changes: 6 additions & 1 deletion lib/rest/verify/v2/service/verification.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ VerificationList = function VerificationList(version, serviceSid) {
* Channel specific configuration in json format.
* @param {string} [opts.appHash] -
* Your App Hash to be appended at the end of an SMS.
* @param {string} [opts.templateSid] - The verification template SMS messages.
* @param {string} [opts.templateCustomSubstitutions] -
* The values of the special variables declared on the message template.
* @param {function} [callback] - Callback to handle processed record
*
* @returns {Promise} Resolves to processed VerificationInstance
Expand Down Expand Up @@ -110,7 +113,9 @@ VerificationList = function VerificationList(version, serviceSid) {
'Payee': _.get(opts, 'payee'),
'RateLimits': serialize.object(_.get(opts, 'rateLimits')),
'ChannelConfiguration': serialize.object(_.get(opts, 'channelConfiguration')),
'AppHash': _.get(opts, 'appHash')
'AppHash': _.get(opts, 'appHash'),
'TemplateSid': _.get(opts, 'templateSid'),
'TemplateCustomSubstitutions': _.get(opts, 'templateCustomSubstitutions')
});

var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
Expand Down
2 changes: 1 addition & 1 deletion lib/rest/wireless/v1/ratePlan.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ interface RatePlanListInstance {
* @property nationalRoamingDataLimit - The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States
* @property nationalRoamingEnabled - Whether SIMs can roam on networks other than the home network in the United States
* @property uniqueName - An application-defined string that uniquely identifies the resource
* @property voiceEnabled - Whether SIMs can make and receive voice calls
* @property voiceEnabled - Deprecated
*/
interface RatePlanListInstanceCreateOptions {
dataEnabled?: boolean;
Expand Down
6 changes: 3 additions & 3 deletions lib/rest/wireless/v1/ratePlan.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,7 @@ RatePlanList = function RatePlanList(version) {
* @param {string} [opts.dataMetering] - The model used to meter data usage
* @param {boolean} [opts.messagingEnabled] -
* Whether SIMs can make, send, and receive SMS using Commands
* @param {boolean} [opts.voiceEnabled] -
* Whether SIMs can make and receive voice calls
* @param {boolean} [opts.voiceEnabled] - Deprecated
* @param {boolean} [opts.nationalRoamingEnabled] -
* Whether SIMs can roam on networks other than the home network in the United States
* @param {string|list} [opts.internationalRoaming] -
Expand Down Expand Up @@ -486,7 +485,8 @@ RatePlanPage.prototype[util.inspect.custom] = function inspect(depth, options) {
* The total data usage in Megabytes that the Network allows during one month on the home network
* @property {boolean} messagingEnabled -
* Whether SIMs can make, send, and receive SMS using Commands
* @property {boolean} voiceEnabled - Whether SIMs can make and receive voice calls
* @property {boolean} voiceEnabled -
* Deprecated. Whether SIMs can make and receive voice calls
* @property {boolean} nationalRoamingEnabled -
* Whether SIMs can roam on networks other than the home network in the United States
* @property {number} nationalRoamingDataLimit -
Expand Down
8 changes: 4 additions & 4 deletions lib/rest/wireless/v1/sim.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ declare function SimList(version: V1): SimListInstance;
* @property smsUrl - The URL we should call when the SIM-connected device sends an SMS message that is not a Command
* @property status - The new status of the Sim resource
* @property uniqueName - An application-defined string that uniquely identifies the resource
* @property voiceFallbackMethod - The HTTP method we should use to call voice_fallback_url
* @property voiceFallbackUrl - The URL we should call when an error occurs while retrieving or executing the TwiML requested from voice_url
* @property voiceMethod - The HTTP method we should use when we call voice_url
* @property voiceUrl - The URL we should call when the SIM-connected device makes a voice call
* @property voiceFallbackMethod - Deprecated
* @property voiceFallbackUrl - Deprecated
* @property voiceMethod - Deprecated
* @property voiceUrl - Deprecated
*/
interface SimInstanceUpdateOptions {
accountSid?: string;
Expand Down
Loading

0 comments on commit 9efd692

Please sign in to comment.