Skip to content

Commit

Permalink
Merge branch '5.0.0-rc' into changelogs_update
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 authored Nov 9, 2023
2 parents 53693fe + 44b6721 commit 65c4900
Show file tree
Hide file tree
Showing 28 changed files with 1,304 additions and 108 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
node: [ 14, 16, 18, lts/* ]
node: [ 14, 16, 18 ]
steps:
- name: Checkout twilio-node
uses: actions/checkout@v3
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
npm run test
- name: SonarCloud Scan
if: ${{ (github.event_name == 'pull_request' || github.ref_type == 'branch') && matrix.node == 'lts/*' && !github.event.pull_request.head.repo.fork }}
if: ${{ (github.event_name == 'pull_request' || github.ref_type == 'branch') && matrix.node == '18' && !github.event.pull_request.head.repo.fork }}
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: lts/*
node-version: 18

- run: npm install

Expand Down
52 changes: 51 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,60 @@
twilio-node changelog
=====================

[2023-10-17] Version 5.0.0-rc.0
[2023-11-07] Version 5.0.0-rc.0
---------------------------
- Release Candidate preparation

[2023-11-06] Version 4.19.1
---------------------------
**Flex**
- Adding `provisioning_status` for Email Manager

**Intelligence**
- Add text-generation operator (for example conversation summary) results to existing OperatorResults collection.

**Messaging**
- Add DELETE support to Tollfree Verification resource

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

**Verify**
- Update Verify TOTP maturity to GA.


[2023-10-19] Version 4.19.0
---------------------------
**Library - Chore**
- [PR #966](https://github.com/twilio/twilio-node/pull/966): upgraded semver versions. Thanks to [@sbansla](https://github.com/sbansla)!
- [PR #964](https://github.com/twilio/twilio-node/pull/964): added feature request issue template. Thanks to [@sbansla](https://github.com/sbansla)!

**Accounts**
- Updated Safelist metadata to correct the docs.
- Add Global SafeList API changes

**Api**
- Added optional parameter `CallToken` for create participant api

**Flex**
- Adding `offline_config` to Flex Configuration

**Intelligence**
- Deleted `redacted` parameter from fetching transcript in v2 **(breaking change)**

**Lookups**
- Add new `phone_number_quality_score` package to the lookup response
- Remove `disposable_phone_number_risk` package **(breaking change)**

**Messaging**
- Update US App To Person documentation with current `message_samples` requirements

**Taskrouter**
- Remove beta_feature check on task_queue_bulk_real_time_statistics endpoint
- Add `virtual_start_time` property to tasks
- Updating `task_queue_data` format from `map` to `array` in the response of bulk get endpoint of TaskQueue Real Time Statistics API **(breaking change)**


[2023-10-05] Version 4.18.1
---------------------------
**Library - Fix**
Expand Down
2 changes: 1 addition & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

_All `MAJOR` version bumps will have upgrade notes posted here._

## [2023-01-25] 4.x.x to 5.x.x-rc.x
## [2023-10-17] 4.x.x to 5.x.x-rc.x

---
### Overview
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@
"xmlbuilder": "^13.0.2"
},
"devDependencies": {
"@babel/preset-env": "^7.20.2",
"@babel/preset-env": "^7.23.0",
"@babel/preset-typescript": "^7.18.6",
"@types/jest": "^29.2.5",
"@types/jest": "^29.5.5",
"@types/jsonwebtoken": "^9.0.0",
"@types/node": "^18.11.18",
"@types/qs": "^6.9.7",
"@types/url-parse": "^1.4.8",
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
"eslint": "^8.31.0",
"express": "^4.17.1",
"jest": "^29.3.1",
"jest": "^29.5.5",
"jshint": "^2.11.0",
"mock-fs": "^5.2.0",
"nock": "^13.2.9",
"node-mocks-http": "^1.8.1",
"prettier": "^2.7.1",
"ts-jest": "^29.0.5",
"ts-jest": "^29.1.1",
"typescript": "^4.7.2",
"typedoc": "^0.23.21"
},
Expand Down
7 changes: 4 additions & 3 deletions src/base/RequestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ class RequestClient {
};

if (opts.data && options.headers) {
if(options.headers["Content-Type"] === "application/x-www-form-urlencoded") {
if (
options.headers["Content-Type"] === "application/x-www-form-urlencoded"
) {
options.data = qs.stringify(opts.data, { arrayFormat: "repeat" });
}
else if(options.headers["Content-Type"] === "application/json") {
} else if (options.headers["Content-Type"] === "application/json") {
options.data = opts.data;
}
}
Expand Down
8 changes: 3 additions & 5 deletions src/rest/PreviewMessaging.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import PreviewMessagingBase from "./PreviewMessagingBase";
import {MessageListInstance} from "./previewMessaging/v1/message";
import { MessageListInstance } from "./previewMessaging/v1/message";

class PreviewMessaging extends PreviewMessagingBase {
/**
* @deprecated - Use v1.messages; instead
*/
get messages(): MessageListInstance {
console.warn(
"messages is deprecated. Use v1.messages; instead."
);
console.warn("messages is deprecated. Use v1.messages; instead.");
return this.v1.messages;
}
}
export = PreviewMessaging
export = PreviewMessaging;
33 changes: 33 additions & 0 deletions src/rest/PreviewMessagingBase.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import Domain from "../base/Domain";
import V1 from "./previewMessaging/V1";

class PreviewMessagingBase extends Domain {
_v1?: V1;

/**
* Initialize accounts domain
*
* @param twilio - The twilio client
*/
constructor(twilio: any) {
super(twilio, "https://preview.messaging.twilio.com");
}

get v1(): V1 {
this._v1 = this._v1 || new V1(this);
return this._v1;
}
}

export = PreviewMessagingBase;
9 changes: 9 additions & 0 deletions src/rest/accounts/V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import AccountsBase from "../AccountsBase";
import Version from "../../base/Version";
import { AuthTokenPromotionListInstance } from "./v1/authTokenPromotion";
import { CredentialListInstance } from "./v1/credential";
import { SafelistListInstance } from "./v1/safelist";
import { SecondaryAuthTokenListInstance } from "./v1/secondaryAuthToken";

export default class V1 extends Version {
Expand All @@ -32,6 +33,8 @@ export default class V1 extends Version {
protected _authTokenPromotion?: AuthTokenPromotionListInstance;
/** credentials - { Twilio.Accounts.V1.CredentialListInstance } resource */
protected _credentials?: CredentialListInstance;
/** safelist - { Twilio.Accounts.V1.SafelistListInstance } resource */
protected _safelist?: SafelistListInstance;
/** secondaryAuthToken - { Twilio.Accounts.V1.SecondaryAuthTokenListInstance } resource */
protected _secondaryAuthToken?: SecondaryAuthTokenListInstance;

Expand All @@ -48,6 +51,12 @@ export default class V1 extends Version {
return this._credentials;
}

/** Getter for safelist resource */
get safelist(): SafelistListInstance {
this._safelist = this._safelist || SafelistListInstance(this);
return this._safelist;
}

/** Getter for secondaryAuthToken resource */
get secondaryAuthToken(): SecondaryAuthTokenListInstance {
this._secondaryAuthToken =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Api
* Twilio - Accounts
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
Expand All @@ -13,7 +13,7 @@
*/

import { inspect, InspectOptions } from "util";
import V2010 from "../V2010";
import V1 from "../V1";
const deserialize = require("../../../base/deserialize");
const serialize = require("../../../base/serialize");
import { isValidPathParam } from "../../../base/utility";
Expand Down Expand Up @@ -45,7 +45,7 @@ export interface SafelistListInstanceFetchOptions {
export interface SafelistSolution {}

export interface SafelistListInstance {
_version: V2010;
_version: V1;
_solution: SafelistSolution;
_uri: string;

Expand Down Expand Up @@ -115,12 +115,12 @@ export interface SafelistListInstance {
[inspect.custom](_depth: any, options: InspectOptions): any;
}

export function SafelistListInstance(version: V2010): SafelistListInstance {
export function SafelistListInstance(version: V1): SafelistListInstance {
const instance = {} as SafelistListInstance;

instance._version = version;
instance._solution = {};
instance._uri = `/SafeList/Numbers.json`;
instance._uri = `/SafeList/Numbers`;

instance.create = function create(
params: SafelistListInstanceCreateOptions,
Expand Down Expand Up @@ -256,7 +256,7 @@ interface SafelistResource {
}

export class SafelistInstance {
constructor(protected _version: V2010, payload: SafelistResource) {
constructor(protected _version: V1, payload: SafelistResource) {
this.sid = payload.sid;
this.phoneNumber = payload.phone_number;
}
Expand Down
9 changes: 0 additions & 9 deletions src/rest/api/V2010.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import ApiBase from "../ApiBase";
import Version from "../../base/Version";
import { AccountListInstance } from "./v2010/account";
import { SafelistListInstance } from "./v2010/safelist";
import { AccountContext } from "./v2010/account";

export default class V2010 extends Version {
Expand All @@ -30,8 +29,6 @@ export default class V2010 extends Version {

/** accounts - { Twilio.Api.V2010.AccountListInstance } resource */
protected _accounts?: AccountListInstance;
/** safelist - { Twilio.Api.V2010.SafelistListInstance } resource */
protected _safelist?: SafelistListInstance;
/** account - { Twilio.Api.V2010.AccountContext } resource */
protected _account?: AccountContext;

Expand All @@ -41,12 +38,6 @@ export default class V2010 extends Version {
return this._accounts;
}

/** Getter for safelist resource */
get safelist(): SafelistListInstance {
this._safelist = this._safelist || SafelistListInstance(this);
return this._safelist;
}

/** Getter for account resource */
get account(): AccountContext {
this._account =
Expand Down
4 changes: 4 additions & 0 deletions src/rest/api/v2010/account/conference/participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ export interface ParticipantListInstanceCreateOptions {
amdStatusCallbackMethod?: string;
/** Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. */
trim?: string;
/** A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call\\\'s call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. */
callToken?: string;
}
/**
* Options to pass to each
Expand Down Expand Up @@ -887,6 +889,8 @@ export function ParticipantListInstance(
if (params["amdStatusCallbackMethod"] !== undefined)
data["AmdStatusCallbackMethod"] = params["amdStatusCallbackMethod"];
if (params["trim"] !== undefined) data["Trim"] = params["trim"];
if (params["callToken"] !== undefined)
data["CallToken"] = params["callToken"];

const headers: any = {};
headers["Content-Type"] = "application/x-www-form-urlencoded";
Expand Down
10 changes: 10 additions & 0 deletions src/rest/flexApi/V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { InsightsSettingsAnswerSetsListInstance } from "./v1/insightsSettingsAns
import { InsightsSettingsCommentListInstance } from "./v1/insightsSettingsComment";
import { InsightsUserRolesListInstance } from "./v1/insightsUserRoles";
import { InteractionListInstance } from "./v1/interaction";
import { ProvisioningStatusListInstance } from "./v1/provisioningStatus";
import { WebChannelListInstance } from "./v1/webChannel";

export default class V1 extends Version {
Expand Down Expand Up @@ -71,6 +72,8 @@ export default class V1 extends Version {
protected _insightsUserRoles?: InsightsUserRolesListInstance;
/** interaction - { Twilio.FlexApi.V1.InteractionListInstance } resource */
protected _interaction?: InteractionListInstance;
/** provisioningStatus - { Twilio.FlexApi.V1.ProvisioningStatusListInstance } resource */
protected _provisioningStatus?: ProvisioningStatusListInstance;
/** webChannel - { Twilio.FlexApi.V1.WebChannelListInstance } resource */
protected _webChannel?: WebChannelListInstance;

Expand Down Expand Up @@ -180,6 +183,13 @@ export default class V1 extends Version {
return this._interaction;
}

/** Getter for provisioningStatus resource */
get provisioningStatus(): ProvisioningStatusListInstance {
this._provisioningStatus =
this._provisioningStatus || ProvisioningStatusListInstance(this);
return this._provisioningStatus;
}

/** Getter for webChannel resource */
get webChannel(): WebChannelListInstance {
this._webChannel = this._webChannel || WebChannelListInstance(this);
Expand Down
7 changes: 7 additions & 0 deletions src/rest/flexApi/v1/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ interface ConfigurationResource {
flex_ui_status_report: any;
agent_conv_end_methods: any;
citrix_voice_vdi: any;
offline_config: any;
}

export class ConfigurationInstance {
Expand Down Expand Up @@ -228,6 +229,7 @@ export class ConfigurationInstance {
this.flexUiStatusReport = payload.flex_ui_status_report;
this.agentConvEndMethods = payload.agent_conv_end_methods;
this.citrixVoiceVdi = payload.citrix_voice_vdi;
this.offlineConfig = payload.offline_config;

this._solution = {};
}
Expand Down Expand Up @@ -417,6 +419,10 @@ export class ConfigurationInstance {
* Citrix voice vdi configuration and settings.
*/
citrixVoiceVdi: any;
/**
* Presence and presence ttl configuration
*/
offlineConfig: any;

private get _proxy(): ConfigurationContext {
this._context =
Expand Down Expand Up @@ -508,6 +514,7 @@ export class ConfigurationInstance {
flexUiStatusReport: this.flexUiStatusReport,
agentConvEndMethods: this.agentConvEndMethods,
citrixVoiceVdi: this.citrixVoiceVdi,
offlineConfig: this.offlineConfig,
};
}

Expand Down
Loading

0 comments on commit 65c4900

Please sign in to comment.