Skip to content

Commit

Permalink
[Librarian] Regenerated @ b32d3e1eba2177c81eeca51181f67e618fe86dbe
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Sep 7, 2023
1 parent 7203ad0 commit 8c2edfc
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 34 deletions.
19 changes: 19 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
twilio-node changelog
=====================

[2023-09-07] Version 4.17.0
---------------------------
**Api**
- Make message tagging parameters public **(breaking change)**

**Flex**
- Adding `agent_conv_end_methods` to Flex Configuration

**Messaging**
- Mark Mesasging Services fallback_to_long_code feature obsolete

**Numbers**
- Add Create Port In request api
- Renaming sid for bulk_hosting_sid and remove account_sid response field in numbers/v2/BulkHostedNumberOrders **(breaking change)**

**Pricing**
- gate resources behind a beta_feature


[2023-08-24] Version 4.16.0
---------------------------
**Api**
Expand Down
10 changes: 10 additions & 0 deletions src/rest/api/v2010/account/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ export interface MessageListInstanceCreateOptions {
sendAsMms?: boolean;
/** For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template\\\'s default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. */
contentVariables?: string;
/** A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length. */
tags?: 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 belong 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. */
Expand Down Expand Up @@ -413,6 +415,7 @@ interface MessageResource {
price_unit: string;
api_version: string;
subresource_uris: Record<string, string>;
tags: any;
}

export class MessageInstance {
Expand Down Expand Up @@ -445,6 +448,7 @@ export class MessageInstance {
this.priceUnit = payload.price_unit;
this.apiVersion = payload.api_version;
this.subresourceUris = payload.subresource_uris;
this.tags = payload.tags;

this._solution = { accountSid, sid: sid || this.sid };
}
Expand Down Expand Up @@ -523,6 +527,10 @@ export class MessageInstance {
* A list of related resources identified by their URIs relative to `https://api.twilio.com`
*/
subresourceUris: Record<string, string>;
/**
* A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message.
*/
tags: any;

private get _proxy(): MessageContext {
this._context =
Expand Down Expand Up @@ -632,6 +640,7 @@ export class MessageInstance {
priceUnit: this.priceUnit,
apiVersion: this.apiVersion,
subresourceUris: this.subresourceUris,
tags: this.tags,
};
}

Expand Down Expand Up @@ -807,6 +816,7 @@ export function MessageListInstance(
data["SendAsMms"] = serialize.bool(params["sendAsMms"]);
if (params["contentVariables"] !== undefined)
data["ContentVariables"] = params["contentVariables"];
if (params["tags"] !== undefined) data["Tags"] = params["tags"];
if (params["riskCheck"] !== undefined)
data["RiskCheck"] = params["riskCheck"];
if (params["from"] !== undefined) data["From"] = params["from"];
Expand Down
8 changes: 4 additions & 4 deletions src/rest/api/v2010/account/message/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,20 @@ export class FeedbackInstance {
}

/**
* The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the MessageFeedback resource.
* The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this MessageFeedback resource.
*/
accountSid: string;
/**
* The SID of the Message resource for which the feedback was provided.
* The SID of the Message resource associated with this MessageFeedback resource.
*/
messageSid: string;
outcome: FeedbackOutcome;
/**
* The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
* The date and time in GMT when this MessageFeedback 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.
* The date and time in GMT when this MessageFeedback resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
*/
dateUpdated: Date;
/**
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 @@ -172,6 +172,7 @@ interface ConfigurationResource {
channel_configs: Array<any>;
debugger_integration: any;
flex_ui_status_report: any;
agent_conv_end_methods: any;
}

export class ConfigurationInstance {
Expand Down Expand Up @@ -224,6 +225,7 @@ export class ConfigurationInstance {
this.channelConfigs = payload.channel_configs;
this.debuggerIntegration = payload.debugger_integration;
this.flexUiStatusReport = payload.flex_ui_status_report;
this.agentConvEndMethods = payload.agent_conv_end_methods;

this._solution = {};
}
Expand Down Expand Up @@ -405,6 +407,10 @@ export class ConfigurationInstance {
* Configurable parameters for Flex UI Status report.
*/
flexUiStatusReport: any;
/**
* Agent conversation end methods.
*/
agentConvEndMethods: any;

private get _proxy(): ConfigurationContext {
this._context =
Expand Down Expand Up @@ -494,6 +500,7 @@ export class ConfigurationInstance {
channelConfigs: this.channelConfigs,
debuggerIntegration: this.debuggerIntegration,
flexUiStatusReport: this.flexUiStatusReport,
agentConvEndMethods: this.agentConvEndMethods,
};
}

Expand Down
6 changes: 3 additions & 3 deletions src/rest/messaging/v1/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface ServiceContextUpdateOptions {
smartEncoding?: boolean;
/** */
scanMessageContent?: ServiceScanMessageContent;
/** Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/messaging/services#fallback-to-long-code) for messages sent through the Service instance. */
/** [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures. */
fallbackToLongCode?: boolean;
/** Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. */
areaCodeGeomatch?: boolean;
Expand Down Expand Up @@ -90,7 +90,7 @@ export interface ServiceListInstanceCreateOptions {
smartEncoding?: boolean;
/** */
scanMessageContent?: ServiceScanMessageContent;
/** Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/messaging/services#fallback-to-long-code) for messages sent through the Service instance. */
/** [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures. */
fallbackToLongCode?: boolean;
/** Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. */
areaCodeGeomatch?: boolean;
Expand Down Expand Up @@ -509,7 +509,7 @@ export class ServiceInstance {
smartEncoding: boolean;
scanMessageContent: ServiceScanMessageContent;
/**
* Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/messaging/services#fallback-to-long-code) for messages sent through the Service instance.
* [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures.
*/
fallbackToLongCode: boolean;
/**
Expand Down
50 changes: 23 additions & 27 deletions src/rest/numbers/v2/bulkHostedNumberOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export interface BulkHostedNumberOrderContext {
}

export interface BulkHostedNumberOrderContextSolution {
sid: string;
bulkHostingSid: string;
}

export class BulkHostedNumberOrderContextImpl
Expand All @@ -78,13 +78,13 @@ export class BulkHostedNumberOrderContextImpl
protected _solution: BulkHostedNumberOrderContextSolution;
protected _uri: string;

constructor(protected _version: V2, sid: string) {
if (!isValidPathParam(sid)) {
throw new Error("Parameter 'sid' is not valid.");
constructor(protected _version: V2, bulkHostingSid: string) {
if (!isValidPathParam(bulkHostingSid)) {
throw new Error("Parameter 'bulkHostingSid' is not valid.");
}

this._solution = { sid };
this._uri = `/HostedNumber/Orders/Bulk/${sid}`;
this._solution = { bulkHostingSid };
this._uri = `/HostedNumber/Orders/Bulk/${bulkHostingSid}`;
}

fetch(
Expand Down Expand Up @@ -124,7 +124,7 @@ export class BulkHostedNumberOrderContextImpl
new BulkHostedNumberOrderInstance(
operationVersion,
payload,
instance._solution.sid
instance._solution.bulkHostingSid
)
);

Expand Down Expand Up @@ -152,8 +152,7 @@ export class BulkHostedNumberOrderContextImpl
interface BulkHostedNumberOrderPayload extends BulkHostedNumberOrderResource {}

interface BulkHostedNumberOrderResource {
sid: string;
account_sid: string;
bulk_hosting_sid: string;
request_status: BulkHostedNumberOrderRequestStatus;
friendly_name: string;
notification_email: string;
Expand All @@ -171,10 +170,9 @@ export class BulkHostedNumberOrderInstance {
constructor(
protected _version: V2,
payload: BulkHostedNumberOrderResource,
sid?: string
bulkHostingSid?: string
) {
this.sid = payload.sid;
this.accountSid = payload.account_sid;
this.bulkHostingSid = payload.bulk_hosting_sid;
this.requestStatus = payload.request_status;
this.friendlyName = payload.friendly_name;
this.notificationEmail = payload.notification_email;
Expand All @@ -184,17 +182,13 @@ export class BulkHostedNumberOrderInstance {
this.totalCount = deserialize.integer(payload.total_count);
this.results = payload.results;

this._solution = { sid: sid || this.sid };
this._solution = { bulkHostingSid: bulkHostingSid || this.bulkHostingSid };
}

/**
* A 34 character string that uniquely identifies this BulkHostedNumberOrder.
*/
sid: string;
/**
* A 34 character string that uniquely identifies the account.
*/
accountSid: string;
bulkHostingSid: string;
requestStatus: BulkHostedNumberOrderRequestStatus;
/**
* A 128 character string that is a human-readable text that describes this resource.
Expand Down Expand Up @@ -228,7 +222,10 @@ export class BulkHostedNumberOrderInstance {
private get _proxy(): BulkHostedNumberOrderContext {
this._context =
this._context ||
new BulkHostedNumberOrderContextImpl(this._version, this._solution.sid);
new BulkHostedNumberOrderContextImpl(
this._version,
this._solution.bulkHostingSid
);
return this._context;
}

Expand Down Expand Up @@ -278,8 +275,7 @@ export class BulkHostedNumberOrderInstance {
*/
toJSON() {
return {
sid: this.sid,
accountSid: this.accountSid,
bulkHostingSid: this.bulkHostingSid,
requestStatus: this.requestStatus,
friendlyName: this.friendlyName,
notificationEmail: this.notificationEmail,
Expand All @@ -303,8 +299,8 @@ export interface BulkHostedNumberOrderListInstance {
_solution: BulkHostedNumberOrderSolution;
_uri: string;

(sid: string): BulkHostedNumberOrderContext;
get(sid: string): BulkHostedNumberOrderContext;
(bulkHostingSid: string): BulkHostedNumberOrderContext;
get(bulkHostingSid: string): BulkHostedNumberOrderContext;

/**
* Provide a user-friendly representation
Expand All @@ -316,11 +312,11 @@ export interface BulkHostedNumberOrderListInstance {
export function BulkHostedNumberOrderListInstance(
version: V2
): BulkHostedNumberOrderListInstance {
const instance = ((sid) =>
instance.get(sid)) as BulkHostedNumberOrderListInstance;
const instance = ((bulkHostingSid) =>
instance.get(bulkHostingSid)) as BulkHostedNumberOrderListInstance;

instance.get = function get(sid): BulkHostedNumberOrderContext {
return new BulkHostedNumberOrderContextImpl(version, sid);
instance.get = function get(bulkHostingSid): BulkHostedNumberOrderContext {
return new BulkHostedNumberOrderContextImpl(version, bulkHostingSid);
};

instance._version = version;
Expand Down

0 comments on commit 8c2edfc

Please sign in to comment.