Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync with main #991

Merged
merged 11 commits into from
Jan 3, 2024
56 changes: 56 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,62 @@
twilio-node changelog
=====================

[2023-12-14] Version 4.20.0
---------------------------
**Api**
- Updated service base url for connect apps and authorized connect apps APIs **(breaking change)**

**Events**
- Marked as GA

**Insights**
- decommission voice-qualitystats-endpoint role

**Numbers**
- Add Get Port In request api

**Taskrouter**
- Add `jitter_buffer_size` param in update reservation

**Trusthub**
- Add additional optional fields in compliance_tollfree_inquiry.json

**Verify**
- Remove `Tags` from Public Docs **(breaking change)**


[2023-12-01] Version 4.19.3
---------------------------
**Verify**
- Add `VerifyEventSubscriptionEnabled` parameter to service create and update endpoints.


[2023-11-17] Version 4.19.2
---------------------------
**Library - Chore**
- [PR #971](https://github.com/twilio/twilio-node/pull/971): Update axios to 1.6 to pull in fix for CVE 2023 45857. Thanks to [@kitu-apietila](https://github.com/kitu-apietila)!
- [PR #963](https://github.com/twilio/twilio-node/pull/963): Removing Test Related To Deprecated Endpoint - OAuth. Thanks to [@KobeBrooks](https://github.com/KobeBrooks)!
- [PR #958](https://github.com/twilio/twilio-node/pull/958): twilio help changes. Thanks to [@kridai](https://github.com/kridai)!
- [PR #978](https://github.com/twilio/twilio-node/pull/978): Removed LTS version. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!

**Api**
- Update documentation to reflect RiskCheck GA

**Messaging**
- Add tollfree edit_allowed and edit_reason fields
- Update Phone Number, Short Code, Alpha Sender, US A2P and Channel Sender documentation

**Taskrouter**
- Add container attribute to task_queue_bulk_real_time_statistics endpoint

**Trusthub**
- Rename did to tollfree_phone_number in compliance_tollfree_inquiry.json
- Add new optional field notification_email to compliance_tollfree_inquiry.json

**Verify**
- Add `Tags` optional parameter on Verification creation.


[2023-11-06] Version 4.19.1
---------------------------
**Flex**
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.19.1",
"version": "4.20.0",
"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
52 changes: 0 additions & 52 deletions src/rest/Oauth.ts

This file was deleted.

33 changes: 0 additions & 33 deletions src/rest/OauthBase.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/rest/Twilio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import Microvisor from "./Microvisor";
import Monitor from "./Monitor";
import Notify from "./Notify";
import Numbers from "./Numbers";
import Oauth from "./Oauth";
import Preview from "./Preview";
import Pricing from "./Pricing";
import Proxy from "./Proxy";
Expand Down Expand Up @@ -118,8 +117,6 @@ class Twilio extends Client {
_notify?: Notify;
/** (Twilio.Numbers) - numbers domain */
_numbers?: Numbers;
/** (Twilio.Oauth) - oauth domain */
_oauth?: Oauth;
/** (Twilio.Preview) - preview domain */
_preview?: Preview;
/** (Twilio.Pricing) - pricing domain */
Expand Down Expand Up @@ -188,7 +185,6 @@ class Twilio extends Client {
this.monitor;
this.notify;
this.numbers;
this.oauth;
this.preview;
this.pricing;
this.proxy;
Expand Down Expand Up @@ -314,10 +310,6 @@ class Twilio extends Client {
get numbers(): Numbers {
return this._numbers ?? (this._numbers = new (require("./Numbers"))(this));
}
/** Getter for (Twilio.Oauth) domain */
get oauth(): Oauth {
return this._oauth ?? (this._oauth = new (require("./Oauth"))(this));
}
/** Getter for (Twilio.Preview) domain */
get preview(): Preview {
return this._preview ?? (this._preview = new (require("./Preview"))(this));
Expand Down
14 changes: 0 additions & 14 deletions src/rest/api/v2010/account/authorizedConnectApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ interface AuthorizedConnectAppResource {
connect_app_friendly_name: string;
connect_app_homepage_url: string;
connect_app_sid: string;
date_created: Date;
date_updated: Date;
permissions: Array<AuthorizedConnectAppPermission>;
uri: string;
}
Expand All @@ -182,8 +180,6 @@ export class AuthorizedConnectAppInstance {
this.connectAppFriendlyName = payload.connect_app_friendly_name;
this.connectAppHomepageUrl = payload.connect_app_homepage_url;
this.connectAppSid = payload.connect_app_sid;
this.dateCreated = deserialize.rfc2822DateTime(payload.date_created);
this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated);
this.permissions = payload.permissions;
this.uri = payload.uri;

Expand Down Expand Up @@ -217,14 +213,6 @@ export class AuthorizedConnectAppInstance {
* The SID that we assigned to the Connect App.
*/
connectAppSid: string;
/**
* The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
*/
dateCreated: Date;
/**
* The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
*/
dateUpdated: Date;
/**
* The set of permissions that you authorized for the Connect App. Can be: `get-all` or `post-all`.
*/
Expand Down Expand Up @@ -271,8 +259,6 @@ export class AuthorizedConnectAppInstance {
connectAppFriendlyName: this.connectAppFriendlyName,
connectAppHomepageUrl: this.connectAppHomepageUrl,
connectAppSid: this.connectAppSid,
dateCreated: this.dateCreated,
dateUpdated: this.dateUpdated,
permissions: this.permissions,
uri: this.uri,
};
Expand Down
8 changes: 4 additions & 4 deletions src/rest/api/v2010/account/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface MessageListInstanceCreateOptions {
smartEncoded?: boolean;
/** Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). */
persistentAction?: Array<string>;
/** For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. */
/** For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. */
shortenUrls?: boolean;
/** */
scheduleType?: MessageScheduleType;
Expand All @@ -103,13 +103,13 @@ export interface MessageListInstanceCreateOptions {
contentVariables?: string;
/** */
riskCheck?: MessageRiskCheck;
/** The sender\\\'s Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service\\\'s Sender Pool) or you can provide a specific sender from your Sender Pool. */
/** The sender\\\'s Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service\\\'s Sender Pool) or you can provide a specific sender from your Sender Pool. */
from?: string;
/** The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service\\\'s Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. */
messagingServiceSid?: string;
/** The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). */
body?: string;
/** The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. */
/** The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. */
mediaUrl?: Array<string>;
/** For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio\\\'s response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). */
contentSid?: string;
Expand Down Expand Up @@ -459,7 +459,7 @@ export class MessageInstance {
numSegments: string;
direction: MessageDirection;
/**
* The sender\'s phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent.
* The sender\'s phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent.
*/
from: string;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/rest/content/v1/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export class ContentInstance {
*/
variables: any;
/**
* The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
* The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
*/
types: any;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/rest/content/v1/contentAndApprovals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export class ContentAndApprovalsInstance {
*/
variables: any;
/**
* The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
* The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
*/
types: any;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/rest/content/v1/legacyContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export class LegacyContentInstance {
*/
variables: any;
/**
* The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
* The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
*/
types: any;
/**
Expand Down
4 changes: 2 additions & 2 deletions src/rest/conversations/v1/conversation/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export interface MessageListInstanceCreateOptions {
attributes?: string;
/** The Media SID to be attached to the new Message. */
mediaSid?: string;
/** The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. */
/** The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. */
contentSid?: string;
/** A structurally valid JSON string that contains values to resolve Rich Content template variables. */
contentVariables?: string;
Expand Down Expand Up @@ -462,7 +462,7 @@ export class MessageInstance {
*/
links: Record<string, string>;
/**
* The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template.
* The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template.
*/
contentSid: string;

Expand Down
4 changes: 2 additions & 2 deletions src/rest/conversations/v1/service/conversation/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export interface MessageListInstanceCreateOptions {
attributes?: string;
/** The Media SID to be attached to the new Message. */
mediaSid?: string;
/** The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. */
/** The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. */
contentSid?: string;
/** A structurally valid JSON string that contains values to resolve Rich Content template variables. */
contentVariables?: string;
Expand Down Expand Up @@ -482,7 +482,7 @@ export class MessageInstance {
*/
links: Record<string, string>;
/**
* The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template.
* The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template.
*/
contentSid: string;

Expand Down
Loading