Skip to content

Commit

Permalink
Merge branch 'main' into EDGSUP-16
Browse files Browse the repository at this point in the history
  • Loading branch information
sbansla authored Nov 9, 2023
2 parents a6d5ff2 + 23eca56 commit 1e8e726
Show file tree
Hide file tree
Showing 24 changed files with 737 additions and 99 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
50 changes: 50 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,56 @@
twilio-node changelog
=====================

[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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ it can be.

If you have questions about how to use `twilio-node`, please see our
[docs](./README.md), and if you don't find the answer there, please contact
[[email protected]](mailto:help@twilio.com) with any issues you have.
[Twilio Support](https://www.twilio.com/help/contact) with any issues you have.

## <a name="issue"></a> Found an Issue?

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (C) 2023, Twilio, Inc. <help@twilio.com>
Copyright (C) 2023, Twilio, Inc. <https://www.twilio.com/help/contact>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "twilio",
"description": "A Twilio helper library",
"version": "4.18.1",
"version": "4.19.1",
"author": "API Team <[email protected]>",
"contributors": [
{
Expand All @@ -20,7 +20,7 @@
"url": "https://github.com/twilio/twilio-node.git"
},
"dependencies": {
"axios": "^0.26.1",
"axios": "^1.6.0",
"dayjs": "^1.11.9",
"https-proxy-agent": "^5.0.0",
"jsonwebtoken": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/base/RequestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function getExponentialBackoffResponseHandler(
);
const delay = Math.floor(baseDelay * Math.random()); // Full jitter backoff

return new Promise((resolve) => {
return new Promise((resolve: (value: Promise<AxiosResponse>) => void) => {
setTimeout(() => resolve(axios(config)), delay);
});
}
Expand Down
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 1e8e726

Please sign in to comment.