Skip to content

Commit b6423c2

Browse files
committed
[Librarian] Regenerated @ b8a450aff168b5449d658833256ca2354e3ecbbc df505752cdef00170b029d7b720bbc359933bf82
1 parent 98a6830 commit b6423c2

22 files changed

+3472
-230
lines changed

CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
twilio-node changelog
22
=====================
33

4+
[2024-06-06] Version 5.1.1
5+
--------------------------
6+
**Api**
7+
- Mark MaxPrice as obsolete
8+
9+
**Lookups**
10+
- Update examples for `phone_number_quality_score`
11+
12+
**Messaging**
13+
- List tollfree verifications on parent account and all sub-accounts
14+
15+
416
[2024-05-24] Version 5.1.0
517
--------------------------
618
**Library - Fix**

src/rest/Marketplace.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import MarketplaceBase from "./MarketplaceBase";
2+
3+
class Marketplace extends MarketplaceBase {}
4+
5+
export = Marketplace;

src/rest/MarketplaceBase.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* This code was generated by
3+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
*
7+
* NOTE: This class is auto generated by OpenAPI Generator.
8+
* https://openapi-generator.tech
9+
* Do not edit the class manually.
10+
*/
11+
12+
import Domain from "../base/Domain";
13+
import V1 from "./marketplace/V1";
14+
15+
class MarketplaceBase extends Domain {
16+
_v1?: V1;
17+
18+
/**
19+
* Initialize marketplace domain
20+
*
21+
* @param twilio - The twilio client
22+
*/
23+
constructor(twilio: any) {
24+
super(twilio, "https://marketplace.twilio.com");
25+
}
26+
27+
get v1(): V1 {
28+
this._v1 = this._v1 || new V1(this);
29+
return this._v1;
30+
}
31+
}
32+
33+
export = MarketplaceBase;

src/rest/Twilio.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import Insights from "./Insights";
2323
import Intelligence from "./Intelligence";
2424
import IpMessaging from "./IpMessaging";
2525
import Lookups from "./Lookups";
26+
import Marketplace from "./Marketplace";
2627
import Messaging from "./Messaging";
2728
import Microvisor from "./Microvisor";
2829
import Monitor from "./Monitor";
@@ -102,6 +103,8 @@ class Twilio extends Client {
102103
_ipMessaging?: IpMessaging;
103104
/** (Twilio.Lookups) - lookups domain */
104105
_lookups?: Lookups;
106+
/** (Twilio.Marketplace) - marketplace domain */
107+
_marketplace?: Marketplace;
105108
/** (Twilio.Messaging) - messaging domain */
106109
_messaging?: Messaging;
107110
/** (Twilio.Microvisor) - microvisor domain */
@@ -175,6 +178,7 @@ class Twilio extends Client {
175178
this.intelligence;
176179
this.ipMessaging;
177180
this.lookups;
181+
this.marketplace;
178182
this.messaging;
179183
this.microvisor;
180184
this.monitor;
@@ -271,6 +275,13 @@ class Twilio extends Client {
271275
get lookups(): Lookups {
272276
return this._lookups ?? (this._lookups = new (require("./Lookups"))(this));
273277
}
278+
/** Getter for (Twilio.Marketplace) domain */
279+
get marketplace(): Marketplace {
280+
return (
281+
this._marketplace ??
282+
(this._marketplace = new (require("./Marketplace"))(this))
283+
);
284+
}
274285
/** Getter for (Twilio.Messaging) domain */
275286
get messaging(): Messaging {
276287
return (

src/rest/api/v2010/account/message.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ export interface MessageListInstanceCreateOptions {
7373
statusCallback?: string;
7474
/** The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App\\\'s `message_status_callback` URL. Note that the `status_callback` parameter of a request takes priority over the `application_sid` parameter; if both are included `application_sid` is ignored. */
7575
applicationSid?: string;
76-
/** [DEPRECATED] This parameter will no longer have any effect as of 2024-06-03. */
76+
/** [OBSOLETE] This parameter will no longer have any effect as of 2024-06-03. */
7777
maxPrice?: number;
7878
/** Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`. */
7979
provideFeedback?: boolean;
8080
/** Total number of attempts made (including this request) to send the message regardless of the provider used */
8181
attempt?: number;
82-
/** The maximum length in seconds that the Message can remain in Twilio\\\'s outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) */
82+
/** The maximum length in seconds that the Message can remain in Twilio\\\'s outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html) */
8383
validityPeriod?: number;
8484
/** Reserved */
8585
forceDelivery?: boolean;

src/rest/content/v1/content.ts

Lines changed: 19 additions & 182 deletions
Original file line numberDiff line numberDiff line change
@@ -22,188 +22,12 @@ import { isValidPathParam } from "../../../base/utility";
2222
import { ApprovalCreateListInstance } from "./content/approvalCreate";
2323
import { ApprovalFetchListInstance } from "./content/approvalFetch";
2424

25-
export class AuthenticationAction {
26-
"type": AuthenticationActionType;
27-
"copyCodeText": string;
28-
}
29-
30-
export type AuthenticationActionType = "COPY_CODE";
31-
32-
export class CallToActionAction {
33-
"type": CallToActionActionType;
34-
"title": string;
35-
"url"?: string;
36-
"phone"?: string;
37-
"id"?: string;
38-
}
39-
40-
export type CallToActionActionType = "URL" | "PHONE_NUMBER";
41-
42-
export class CardAction {
43-
"type": CardActionType;
44-
"title": string;
45-
"url"?: string;
46-
"phone"?: string;
47-
"id"?: string;
48-
}
49-
50-
export type CardActionType = "URL" | "PHONE_NUMBER" | "QUICK_REPLY";
51-
52-
export class CatalogItem {
53-
"id"?: string;
54-
"sectionTitle"?: string;
55-
"name"?: string;
56-
"mediaUrl"?: string;
57-
"price"?: number;
58-
"description"?: string;
59-
}
60-
61-
/**
62-
* Content creation request body
63-
*/
64-
export class ContentCreateRequest {
65-
/**
66-
* User defined name of the content
67-
*/
68-
"friendlyName"?: string;
69-
/**
70-
* Key value pairs of variable name to value
71-
*/
72-
"variables"?: { [key: string]: string };
73-
/**
74-
* Language code for the content
75-
*/
76-
"language": string;
77-
"types": Types;
78-
}
79-
80-
export class ListItem {
81-
"id": string;
82-
"item": string;
83-
"description"?: string;
84-
}
85-
86-
export class QuickReplyAction {
87-
"type": QuickReplyActionType;
88-
"title": string;
89-
"id"?: string;
90-
}
91-
92-
export type QuickReplyActionType = "QUICK_REPLY";
93-
94-
/**
95-
* twilio/call-to-action buttons let recipients tap to trigger actions such as launching a website or making a phone call.
96-
*/
97-
export class TwilioCallToAction {
98-
"body"?: string;
99-
"actions"?: Array<CallToActionAction>;
100-
}
101-
102-
/**
103-
* twilio/card is a structured template which can be used to send a series of related information. It must include a title and at least one additional field.
104-
*/
105-
export class TwilioCard {
106-
"title": string;
107-
"subtitle"?: string;
108-
"media"?: Array<string>;
109-
"actions"?: Array<CardAction>;
110-
}
111-
112-
/**
113-
* twilio/catalog type lets recipients view list of catalog products, ask questions about products, order products.
114-
*/
115-
export class TwilioCatalog {
116-
"title"?: string;
117-
"body": string;
118-
"subtitle"?: string;
119-
"id"?: string;
120-
"items"?: Array<CatalogItem>;
121-
"dynamicItems"?: string;
122-
}
123-
124-
/**
125-
* twilio/list-picker includes a menu of up to 10 options, which offers a simple way for users to make a selection.
126-
*/
127-
export class TwilioListPicker {
128-
"body": string;
129-
"button": string;
130-
"items": Array<ListItem>;
131-
}
132-
133-
/**
134-
* twilio/location type contains a location pin and an optional label, which can be used to enhance delivery notifications or connect recipients to physical experiences you offer.
135-
*/
136-
export class TwilioLocation {
137-
"latitude": number;
138-
"longitude": number;
139-
"label"?: string;
140-
}
141-
142-
/**
143-
* twilio/media is used to send file attachments, or to send long text via MMS in the US and Canada. As such, the twilio/media type must contain at least ONE of text or media content.
144-
*/
145-
export class TwilioMedia {
146-
"body"?: string;
147-
"media": Array<string>;
148-
}
149-
150-
/**
151-
* twilio/quick-reply templates let recipients tap, rather than type, to respond to the message.
152-
*/
153-
export class TwilioQuickReply {
154-
"body": string;
155-
"actions": Array<QuickReplyAction>;
156-
}
157-
158-
/**
159-
* Type containing only plain text-based content
160-
*/
161-
export class TwilioText {
162-
"body": string;
163-
}
164-
165-
/**
166-
* Content types
167-
*/
168-
export class Types {
169-
"twilioText"?: TwilioText | null;
170-
"twilioMedia"?: TwilioMedia | null;
171-
"twilioLocation"?: TwilioLocation | null;
172-
"twilioListPicker"?: TwilioListPicker | null;
173-
"twilioCallToAction"?: TwilioCallToAction | null;
174-
"twilioQuickReply"?: TwilioQuickReply | null;
175-
"twilioCard"?: TwilioCard | null;
176-
"twilioCatalog"?: TwilioCatalog | null;
177-
"whatsappCard"?: WhatsappCard | null;
178-
"whatsappAuthentication"?: WhatsappAuthentication | null;
179-
}
180-
181-
/**
182-
* whatsApp/authentication templates let companies deliver WA approved one-time-password button.
183-
*/
184-
export class WhatsappAuthentication {
185-
"addSecurityRecommendation"?: boolean;
186-
"codeExpirationMinutes"?: number;
187-
"actions": Array<AuthenticationAction>;
188-
}
189-
190-
/**
191-
* whatsapp/card is a structured template which can be used to send a series of related information. It must include a body and at least one additional field.
192-
*/
193-
export class WhatsappCard {
194-
"body": string;
195-
"footer"?: string;
196-
"media"?: Array<string>;
197-
"headerText"?: string;
198-
"actions"?: Array<CardAction>;
199-
}
200-
20125
/**
20226
* Options to pass to create a ContentInstance
20327
*/
20428
export interface ContentListInstanceCreateOptions {
20529
/** */
206-
contentCreateRequest: ContentCreateRequest;
30+
body?: object;
20731
}
20832
/**
20933
* Options to pass to each
@@ -426,7 +250,7 @@ export class ContentInstance {
426250
*/
427251
variables: any;
428252
/**
429-
* The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
253+
* The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
430254
*/
431255
types: any;
432256
/**
@@ -520,6 +344,16 @@ export interface ContentListInstance {
520344
(sid: string): ContentContext;
521345
get(sid: string): ContentContext;
522346

347+
/**
348+
* Create a ContentInstance
349+
*
350+
* @param callback - Callback to handle processed record
351+
*
352+
* @returns Resolves to processed ContentInstance
353+
*/
354+
create(
355+
callback?: (error: Error | null, item?: ContentInstance) => any
356+
): Promise<ContentInstance>;
523357
/**
524358
* Create a ContentInstance
525359
*
@@ -529,7 +363,7 @@ export interface ContentListInstance {
529363
* @returns Resolves to processed ContentInstance
530364
*/
531365
create(
532-
params: ContentCreateRequest,
366+
params: object,
533367
callback?: (error: Error | null, item?: ContentInstance) => any
534368
): Promise<ContentInstance>;
535369

@@ -621,11 +455,14 @@ export function ContentListInstance(version: V1): ContentListInstance {
621455
instance._uri = `/Content`;
622456

623457
instance.create = function create(
624-
params: ContentCreateRequest,
458+
params?: object | ((error: Error | null, items: ContentInstance) => any),
625459
callback?: (error: Error | null, items: ContentInstance) => any
626460
): Promise<ContentInstance> {
627-
if (params === null || params === undefined) {
628-
throw new Error('Required parameter "params" missing.');
461+
if (params instanceof Function) {
462+
callback = params;
463+
params = {};
464+
} else {
465+
params = params || {};
629466
}
630467

631468
let data: any = {};

0 commit comments

Comments
 (0)