Skip to content

Commit

Permalink
[Librarian] Regenerated @ d97b0740a0c7cf86beebd56c6973927b07719cde 1f…
Browse files Browse the repository at this point in the history
…c3bb6195ebcbd02451fb8fc9080c695b075d4f
  • Loading branch information
twilio-dx committed Oct 17, 2024
1 parent c0c5d8c commit dfac00a
Show file tree
Hide file tree
Showing 4 changed files with 292 additions and 14 deletions.
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
twilio-node changelog
=====================

[2024-10-17] Version 5.3.4
--------------------------
**Api**
- Add response key `country` to fetch AvailablePhoneNumber resource by specific country.

**Messaging**
- Make library and doc public for requestManagedCert Endpoint


[2024-10-03] Version 5.3.3
--------------------------
**Messaging**
Expand Down
10 changes: 10 additions & 0 deletions src/rest/messaging/V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { DomainConfigMessagingServiceListInstance } from "./v1/domainConfigMessa
import { ExternalCampaignListInstance } from "./v1/externalCampaign";
import { LinkshorteningMessagingServiceListInstance } from "./v1/linkshorteningMessagingService";
import { LinkshorteningMessagingServiceDomainAssociationListInstance } from "./v1/linkshorteningMessagingServiceDomainAssociation";
import { RequestManagedCertListInstance } from "./v1/requestManagedCert";
import { ServiceListInstance } from "./v1/service";
import { TollfreeVerificationListInstance } from "./v1/tollfreeVerification";
import { UsecaseListInstance } from "./v1/usecase";
Expand Down Expand Up @@ -52,6 +53,8 @@ export default class V1 extends Version {
protected _linkshorteningMessagingService?: LinkshorteningMessagingServiceListInstance;
/** linkshorteningMessagingServiceDomainAssociation - { Twilio.Messaging.V1.LinkshorteningMessagingServiceDomainAssociationListInstance } resource */
protected _linkshorteningMessagingServiceDomainAssociation?: LinkshorteningMessagingServiceDomainAssociationListInstance;
/** requestManagedCert - { Twilio.Messaging.V1.RequestManagedCertListInstance } resource */
protected _requestManagedCert?: RequestManagedCertListInstance;
/** services - { Twilio.Messaging.V1.ServiceListInstance } resource */
protected _services?: ServiceListInstance;
/** tollfreeVerifications - { Twilio.Messaging.V1.TollfreeVerificationListInstance } resource */
Expand Down Expand Up @@ -116,6 +119,13 @@ export default class V1 extends Version {
return this._linkshorteningMessagingServiceDomainAssociation;
}

/** Getter for requestManagedCert resource */
get requestManagedCert(): RequestManagedCertListInstance {
this._requestManagedCert =
this._requestManagedCert || RequestManagedCertListInstance(this);
return this._requestManagedCert;
}

/** Getter for services resource */
get services(): ServiceListInstance {
this._services = this._services || ServiceListInstance(this);
Expand Down
259 changes: 259 additions & 0 deletions src/rest/messaging/v1/requestManagedCert.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Messaging
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { inspect, InspectOptions } from "util";
import V1 from "../V1";
const deserialize = require("../../../base/deserialize");
const serialize = require("../../../base/serialize");
import { isValidPathParam } from "../../../base/utility";

export interface RequestManagedCertContext {
/**
* Update a RequestManagedCertInstance
*
* @param callback - Callback to handle processed record
*
* @returns Resolves to processed RequestManagedCertInstance
*/
update(
callback?: (error: Error | null, item?: RequestManagedCertInstance) => any
): Promise<RequestManagedCertInstance>;

/**
* Provide a user-friendly representation
*/
toJSON(): any;
[inspect.custom](_depth: any, options: InspectOptions): any;
}

export interface RequestManagedCertContextSolution {
domainSid: string;
}

export class RequestManagedCertContextImpl
implements RequestManagedCertContext
{
protected _solution: RequestManagedCertContextSolution;
protected _uri: string;

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

this._solution = { domainSid };
this._uri = `/LinkShortening/Domains/${domainSid}/RequestManagedCert`;
}

update(
callback?: (error: Error | null, item?: RequestManagedCertInstance) => any
): Promise<RequestManagedCertInstance> {
const instance = this;
let operationVersion = instance._version,
operationPromise = operationVersion.update({
uri: instance._uri,
method: "post",
});

operationPromise = operationPromise.then(
(payload) =>
new RequestManagedCertInstance(
operationVersion,
payload,
instance._solution.domainSid
)
);

operationPromise = instance._version.setPromiseCallback(
operationPromise,
callback
);
return operationPromise;
}

/**
* Provide a user-friendly representation
*
* @returns Object
*/
toJSON() {
return this._solution;
}

[inspect.custom](_depth: any, options: InspectOptions) {
return inspect(this.toJSON(), options);
}
}

interface RequestManagedCertPayload extends RequestManagedCertResource {}

interface RequestManagedCertResource {
domain_sid: string;
date_updated: Date;
date_created: Date;
date_expires: Date;
domain_name: string;
certificate_sid: string;
url: string;
managed: boolean;
requesting: boolean;
}

export class RequestManagedCertInstance {
protected _solution: RequestManagedCertContextSolution;
protected _context?: RequestManagedCertContext;

constructor(
protected _version: V1,
payload: RequestManagedCertResource,
domainSid?: string
) {
this.domainSid = payload.domain_sid;
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
this.dateExpires = deserialize.iso8601DateTime(payload.date_expires);
this.domainName = payload.domain_name;
this.certificateSid = payload.certificate_sid;
this.url = payload.url;
this.managed = payload.managed;
this.requesting = payload.requesting;

this._solution = { domainSid: domainSid || this.domainSid };
}

/**
* The unique string that we created to identify the Domain resource.
*/
domainSid: string;
/**
* Date that this Domain was last updated.
*/
dateUpdated: Date;
/**
* Date that this Domain was registered to the Twilio platform to create a new Domain object.
*/
dateCreated: Date;
/**
* Date that the private certificate associated with this domain expires. This is the expiration date of your existing cert.
*/
dateExpires: Date;
/**
* Full url path for this domain.
*/
domainName: string;
/**
* The unique string that we created to identify this Certificate resource.
*/
certificateSid: string;
url: string;
/**
* A boolean flag indicating if the certificate is managed by Twilio.
*/
managed: boolean;
/**
* A boolean flag indicating if a managed certificate needs to be fulfilled by Twilio.
*/
requesting: boolean;

private get _proxy(): RequestManagedCertContext {
this._context =
this._context ||
new RequestManagedCertContextImpl(
this._version,
this._solution.domainSid
);
return this._context;
}

/**
* Update a RequestManagedCertInstance
*
* @param callback - Callback to handle processed record
*
* @returns Resolves to processed RequestManagedCertInstance
*/
update(
callback?: (error: Error | null, item?: RequestManagedCertInstance) => any
): Promise<RequestManagedCertInstance> {
return this._proxy.update(callback);
}

/**
* Provide a user-friendly representation
*
* @returns Object
*/
toJSON() {
return {
domainSid: this.domainSid,
dateUpdated: this.dateUpdated,
dateCreated: this.dateCreated,
dateExpires: this.dateExpires,
domainName: this.domainName,
certificateSid: this.certificateSid,
url: this.url,
managed: this.managed,
requesting: this.requesting,
};
}

[inspect.custom](_depth: any, options: InspectOptions) {
return inspect(this.toJSON(), options);
}
}

export interface RequestManagedCertSolution {}

export interface RequestManagedCertListInstance {
_version: V1;
_solution: RequestManagedCertSolution;
_uri: string;

(domainSid: string): RequestManagedCertContext;
get(domainSid: string): RequestManagedCertContext;

/**
* Provide a user-friendly representation
*/
toJSON(): any;
[inspect.custom](_depth: any, options: InspectOptions): any;
}

export function RequestManagedCertListInstance(
version: V1
): RequestManagedCertListInstance {
const instance = ((domainSid) =>
instance.get(domainSid)) as RequestManagedCertListInstance;

instance.get = function get(domainSid): RequestManagedCertContext {
return new RequestManagedCertContextImpl(version, domainSid);
};

instance._version = version;
instance._solution = {};
instance._uri = ``;

instance.toJSON = function toJSON() {
return instance._solution;
};

instance[inspect.custom] = function inspectImpl(
_depth: any,
options: InspectOptions
) {
return inspect(instance.toJSON(), options);
};

return instance;
}
28 changes: 14 additions & 14 deletions src/rest/video/v1/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ export interface RoomListInstanceCreateOptions {
type?: RoomRoomType;
/** An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource\\\'s `sid` in the URL to address the resource, assuming it does not contain any [reserved characters](https://tools.ietf.org/html/rfc3986#section-2.2) that would need to be URL encoded. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`. */
uniqueName?: string;
/** The URL we should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info. */
/** The URL Twilio should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info. */
statusCallback?: string;
/** The HTTP method we should use to call `status_callback`. Can be `POST` or `GET`. */
/** The HTTP method Twilio should use to call `status_callback`. Can be `POST` or `GET`. */
statusCallbackMethod?: string;
/** The maximum number of concurrent Participants allowed in the room. Peer-to-peer rooms can have up to 10 Participants. Small Group rooms can have up to 4 Participants. Group rooms can have up to 50 Participants. */
/** The maximum number of concurrent Participants allowed in the room. The maximum allowed value is 50. */
maxParticipants?: number;
/** Whether to start recording when Participants connect. ***This feature is not available in `peer-to-peer` rooms.*** */
/** Whether to start recording when Participants connect. */
recordParticipantsOnConnect?: boolean;
/** An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms*** */
/** An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. */
videoCodecs?: Array<RoomVideoCodec>;
/** The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#group-rooms-media-servers). ***This feature is not available in `peer-to-peer` rooms.*** */
/** The region for the Room\\\'s media server. Can be one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#group-rooms-media-servers). */
mediaRegion?: string;
/** A collection of Recording Rules that describe how to include or exclude matching tracks for recording */
recordingRules?: any;
/** When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed. Group rooms only. */
/** When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed. */
audioOnly?: boolean;
/** The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours). */
maxParticipantDuration?: number;
Expand Down Expand Up @@ -355,7 +355,7 @@ export class RoomInstance {
}

/**
* The unique string that we created to identify the Room resource.
* The unique string that Twilio created to identify the Room resource.
*/
sid: string;
status: RoomRoomStatus;
Expand All @@ -380,11 +380,11 @@ export class RoomInstance {
*/
uniqueName: string;
/**
* The URL we call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info.
* The URL Twilio calls using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info.
*/
statusCallback: string;
/**
* The HTTP method we use to call `status_callback`. Can be `POST` or `GET` and defaults to `POST`.
* The HTTP method Twilio uses to call `status_callback`. Can be `POST` or `GET` and defaults to `POST`.
*/
statusCallbackMethod: string;
/**
Expand All @@ -409,19 +409,19 @@ export class RoomInstance {
*/
maxConcurrentPublishedTracks: number;
/**
* Whether to start recording when Participants connect. ***This feature is not available in `peer-to-peer` rooms.***
* Whether to start recording when Participants connect.
*/
recordParticipantsOnConnect: boolean;
/**
* An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms***
* An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`.
*/
videoCodecs: Array<RoomVideoCodec>;
/**
* The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#media-servers). ***This feature is not available in `peer-to-peer` rooms.***
* The region for the Room\'s media server. Can be one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#media-servers).
*/
mediaRegion: string;
/**
* When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed. Group rooms only.
* When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed.
*/
audioOnly: boolean;
/**
Expand Down

0 comments on commit dfac00a

Please sign in to comment.