Skip to content

Commit

Permalink
[Librarian] Regenerated @ 66a6fecc266dc74d9d1e47d28f09eff1210be8f0
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Mar 24, 2021
1 parent 83d67dd commit a12a560
Show file tree
Hide file tree
Showing 30 changed files with 2,136 additions and 36 deletions.
28 changes: 28 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
twilio-node changelog
=====================

[2021-03-24] Version 3.59.0
---------------------------
**Api**
- Added optional parameter `CallToken` for create calls api
- Add optional property `time_limit` in the call create request.

**Bulkexports**
- adding two new fields with job api queue_position and estimated_completion_time

**Events**
- Add new endpoints to manage subscribed_events in subscriptions

**Numbers**
- Remove feature flags for RegulatoryCompliance endpoints

**Supersim**
- Add SmsCommands resource
- Add fields `SmsCommandsUrl`, `SmsCommandsMethod` and `SmsCommandsEnabled` to a Fleet resource

**Taskrouter**
- Add `If-Match` Header based on ETag for Task Update
- Add `ETag` as Response Headers to Tasks and Reservations

**Video**
- Recording rule beta flag **(breaking change)**
- [Rooms] Add RecordingRules param to Rooms


[2021-03-15] Version 3.58.0
---------------------------
**Library - Fix**
Expand Down
2 changes: 2 additions & 0 deletions lib/rest/Supersim.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { FleetListInstance } from './supersim/v1/fleet';
import { NetworkAccessProfileListInstance } from './supersim/v1/networkAccessProfile';
import { NetworkListInstance } from './supersim/v1/network';
import { SimListInstance } from './supersim/v1/sim';
import { SmsCommandListInstance } from './supersim/v1/smsCommand';
import { UsageRecordListInstance } from './supersim/v1/usageRecord';


Expand All @@ -29,6 +30,7 @@ declare class Supersim extends Domain {
readonly networkAccessProfiles: NetworkAccessProfileListInstance;
readonly networks: NetworkListInstance;
readonly sims: SimListInstance;
readonly smsCommands: SmsCommandListInstance;
readonly usageRecords: UsageRecordListInstance;
readonly v1: V1;
}
Expand Down
8 changes: 8 additions & 0 deletions lib/rest/Supersim.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var V1 = require('./supersim/V1'); /* jshint ignore:line */
* @property {Twilio.Supersim.V1.NetworkAccessProfileList} networkAccessProfiles -
* networkAccessProfiles resource
* @property {Twilio.Supersim.V1.SimList} sims - sims resource
* @property {Twilio.Supersim.V1.SmsCommandList} smsCommands - smsCommands resource
* @property {Twilio.Supersim.V1.UsageRecordList} usageRecords -
* usageRecords resource
*
Expand Down Expand Up @@ -86,6 +87,13 @@ Object.defineProperty(Supersim.prototype,
}
});

Object.defineProperty(Supersim.prototype,
'smsCommands', {
get: function() {
return this.v1.smsCommands;
}
});

Object.defineProperty(Supersim.prototype,
'usageRecords', {
get: function() {
Expand Down
4 changes: 4 additions & 0 deletions lib/rest/api/v2010/account/call.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ interface CallListInstance {
* @property asyncAmdStatusCallbackMethod - HTTP Method to use with async_amd_status_callback
* @property byoc - BYOC trunk SID (Beta)
* @property callReason - Reason for the call (Branded Calls Beta)
* @property callToken - A token string needed to invoke a forwarded call with a caller-id recieved on a previous incoming call
* @property callerId - The phone number, SIP address, or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `[email protected]`.
* @property fallbackMethod - HTTP Method to use with fallback_url
* @property fallbackUrl - Fallback URL in case of error
Expand All @@ -210,6 +211,7 @@ interface CallListInstance {
* @property statusCallback - The URL we should call to send status information to your application
* @property statusCallbackEvent - The call progress events that we send to the `status_callback` URL.
* @property statusCallbackMethod - HTTP Method to use with status_callback
* @property timeLimit - The maximum duration of the call in seconds.
* @property timeout - Number of seconds to wait for an answer
* @property to - Phone number, SIP address, or client identifier to call
* @property trim - Set this parameter to control trimming of silence on the recording.
Expand All @@ -223,6 +225,7 @@ interface CallListInstanceCreateOptions {
asyncAmdStatusCallbackMethod?: string;
byoc?: string;
callReason?: string;
callToken?: string;
callerId?: string;
fallbackMethod?: string;
fallbackUrl?: string;
Expand All @@ -245,6 +248,7 @@ interface CallListInstanceCreateOptions {
statusCallback?: string;
statusCallbackEvent?: string | string[];
statusCallbackMethod?: string;
timeLimit?: number;
timeout?: number;
to: string;
trim?: string;
Expand Down
7 changes: 6 additions & 1 deletion lib/rest/api/v2010/account/call.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ CallList = function CallList(version, accountSid) {
* HTTP Method to use with async_amd_status_callback
* @param {string} [opts.byoc] - BYOC trunk SID (Beta)
* @param {string} [opts.callReason] - Reason for the call (Branded Calls Beta)
* @param {string} [opts.callToken] -
* A token string needed to invoke a forwarded call with a caller-id recieved on a previous incoming call
* @param {string} [opts.recordingTrack] - Which track(s) to record
* @param {number} [opts.timeLimit] - The maximum duration of the call in seconds.
* @param {string} [opts.url] - The absolute URL that returns TwiML for this call
* @param {string} [opts.twiml] - TwiML instructions for the call
* @param {string} [opts.applicationSid] -
Expand Down Expand Up @@ -174,7 +177,9 @@ CallList = function CallList(version, accountSid) {
'AsyncAmdStatusCallbackMethod': _.get(opts, 'asyncAmdStatusCallbackMethod'),
'Byoc': _.get(opts, 'byoc'),
'CallReason': _.get(opts, 'callReason'),
'RecordingTrack': _.get(opts, 'recordingTrack')
'CallToken': _.get(opts, 'callToken'),
'RecordingTrack': _.get(opts, 'recordingTrack'),
'TimeLimit': _.get(opts, 'timeLimit')
});

var promise = this._version.create({uri: this._uri, method: 'POST', data: data});
Expand Down
4 changes: 4 additions & 0 deletions lib/rest/bulkexports/v1/export/exportCustomJob.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ interface ExportCustomJobResource {
details: object;
email: string;
end_day: string;
estimated_completion_time: string;
friendly_name: string;
job_queue_position: string;
job_sid: string;
resource_type: string;
start_day: string;
Expand Down Expand Up @@ -243,7 +245,9 @@ declare class ExportCustomJobInstance extends SerializableClass {
details: any;
email: string;
endDay: string;
estimatedCompletionTime: string;
friendlyName: string;
jobQueuePosition: string;
jobSid: string;
resourceType: string;
startDay: string;
Expand Down
6 changes: 6 additions & 0 deletions lib/rest/bulkexports/v1/export/exportCustomJob.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,10 @@ ExportCustomJobPage.prototype[util.inspect.custom] = function inspect(depth,
* The unique job_sid returned when the custom export was created. This can be used to look up the status of the job.
* @property {object} details -
* The details of a job state which is an object that contains a status string, a day count integer, and list of days in the job
* @property {string} jobQueuePosition -
* This is the job position from the 1st in line. Your queue position will never increase. As jobs ahead of yours in the queue are processed, the queue position number will decrease
* @property {string} estimatedCompletionTime -
* this is the time estimated until your job is complete. This is calculated each time you request the job list. The time is calculated based on the current rate of job completion (which may vary) and your job queue position
*
* @param {V1} version - Version of the resource
* @param {ExportCustomJobPayload} payload - The instance payload
Expand All @@ -498,6 +502,8 @@ ExportCustomJobInstance = function ExportCustomJobInstance(version, payload,
this.email = payload.email; // jshint ignore:line
this.jobSid = payload.job_sid; // jshint ignore:line
this.details = payload.details; // jshint ignore:line
this.jobQueuePosition = payload.job_queue_position; // jshint ignore:line
this.estimatedCompletionTime = payload.estimated_completion_time; // jshint ignore:line

// Context
this._context = undefined;
Expand Down
4 changes: 4 additions & 0 deletions lib/rest/bulkexports/v1/export/job.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ interface JobResource {
details: object;
email: string;
end_day: string;
estimated_completion_time: string;
friendly_name: string;
job_queue_position: string;
job_sid: string;
resource_type: string;
start_day: string;
Expand Down Expand Up @@ -105,13 +107,15 @@ declare class JobInstance extends SerializableClass {
details: any;
email: string;
endDay: string;
estimatedCompletionTime: string;
/**
* fetch a JobInstance
*
* @param callback - Callback to handle processed record
*/
fetch(callback?: (error: Error | null, items: JobInstance) => any): Promise<JobInstance>;
friendlyName: string;
jobQueuePosition: string;
jobSid: string;
/**
* remove a JobInstance
Expand Down
6 changes: 6 additions & 0 deletions lib/rest/bulkexports/v1/export/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ JobPage.prototype[util.inspect.custom] = function inspect(depth, options) {
* @property {string} email -
* The optional email to send the completion notification to
* @property {string} url - The url
* @property {string} jobQueuePosition -
* This is the job position from the 1st in line. Your queue position will never increase. As jobs ahead of yours in the queue are processed, the queue position number will decrease
* @property {string} estimatedCompletionTime -
* this is the time estimated until your job is complete. This is calculated each time you request the job list. The time is calculated based on the current rate of job completion (which may vary) and your job queue position
*
* @param {V1} version - Version of the resource
* @param {JobPayload} payload - The instance payload
Expand All @@ -202,6 +206,8 @@ JobInstance = function JobInstance(version, payload, jobSid) {
this.webhookMethod = payload.webhook_method; // jshint ignore:line
this.email = payload.email; // jshint ignore:line
this.url = payload.url; // jshint ignore:line
this.jobQueuePosition = payload.job_queue_position; // jshint ignore:line
this.estimatedCompletionTime = payload.estimated_completion_time; // jshint ignore:line

// Context
this._context = undefined;
Expand Down
113 changes: 111 additions & 2 deletions lib/rest/events/v1/subscription/subscribedEvent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,27 @@ import { SerializableClass } from '../../../../interfaces';
*/
declare function SubscribedEventList(version: V1, subscriptionSid: string): SubscribedEventListInstance;

/**
* Options to pass to update
*
* @property version - The schema version that the subscription should use.
*/
interface SubscribedEventInstanceUpdateOptions {
version?: number;
}

interface SubscribedEventListInstance {
/**
* @param sid - sid of instance
*/
(sid: string): SubscribedEventContext;
/**
* create a SubscribedEventInstance
*
* @param opts - Options for request
* @param callback - Callback to handle processed record
*/
create(opts: SubscribedEventListInstanceCreateOptions, callback?: (error: Error | null, item: SubscribedEventInstance) => any): Promise<SubscribedEventInstance>;
/**
* Streams SubscribedEventInstance records from the API.
*
Expand Down Expand Up @@ -53,6 +73,12 @@ interface SubscribedEventListInstance {
* @param callback - Function to process each record
*/
each(opts?: SubscribedEventListInstanceEachOptions, callback?: (item: SubscribedEventInstance, done: (err?: Error) => void) => void): void;
/**
* Constructs a subscribed_event
*
* @param type - Type of event being subscribed to.
*/
get(type: string): SubscribedEventContext;
/**
* Retrieve a single target page of SubscribedEventInstance records from the API.
*
Expand Down Expand Up @@ -124,6 +150,17 @@ interface SubscribedEventListInstance {
toJSON(): any;
}

/**
* Options to pass to create
*
* @property type - Type of event being subscribed to.
* @property version - The schema version that the subscription should use.
*/
interface SubscribedEventListInstanceCreateOptions {
type: string;
version?: number;
}

/**
* Options to pass to each
*
Expand Down Expand Up @@ -197,6 +234,51 @@ interface SubscribedEventSolution {
}


declare class SubscribedEventContext {
/**
* Initialize the SubscribedEventContext
*
* PLEASE NOTE that this class contains beta products that are subject to change.
* Use them with caution.
*
* @param version - Version of the resource
* @param subscriptionSid - Subscription SID.
* @param type - Type of event being subscribed to.
*/
constructor(version: V1, subscriptionSid: string, type: string);

/**
* fetch a SubscribedEventInstance
*
* @param callback - Callback to handle processed record
*/
fetch(callback?: (error: Error | null, items: SubscribedEventInstance) => any): Promise<SubscribedEventInstance>;
/**
* remove a SubscribedEventInstance
*
* @param callback - Callback to handle processed record
*/
remove(callback?: (error: Error | null, items: SubscribedEventInstance) => any): Promise<boolean>;
/**
* Provide a user-friendly representation
*/
toJSON(): any;
/**
* update a SubscribedEventInstance
*
* @param callback - Callback to handle processed record
*/
update(callback?: (error: Error | null, items: SubscribedEventInstance) => any): Promise<SubscribedEventInstance>;
/**
* update a SubscribedEventInstance
*
* @param opts - Options for request
* @param callback - Callback to handle processed record
*/
update(opts?: SubscribedEventInstanceUpdateOptions, callback?: (error: Error | null, items: SubscribedEventInstance) => any): Promise<SubscribedEventInstance>;
}


declare class SubscribedEventInstance extends SerializableClass {
/**
* Initialize the SubscribedEventContext
Expand All @@ -207,16 +289,43 @@ declare class SubscribedEventInstance extends SerializableClass {
* @param version - Version of the resource
* @param payload - The instance payload
* @param subscriptionSid - Subscription SID.
* @param type - Type of event being subscribed to.
*/
constructor(version: V1, payload: SubscribedEventPayload, subscriptionSid: string);
constructor(version: V1, payload: SubscribedEventPayload, subscriptionSid: string, type: string);

private _proxy: SubscribedEventContext;
accountSid: string;
/**
* fetch a SubscribedEventInstance
*
* @param callback - Callback to handle processed record
*/
fetch(callback?: (error: Error | null, items: SubscribedEventInstance) => any): Promise<SubscribedEventInstance>;
/**
* remove a SubscribedEventInstance
*
* @param callback - Callback to handle processed record
*/
remove(callback?: (error: Error | null, items: SubscribedEventInstance) => any): Promise<boolean>;
subscriptionSid: string;
/**
* Provide a user-friendly representation
*/
toJSON(): any;
type: string;
/**
* update a SubscribedEventInstance
*
* @param callback - Callback to handle processed record
*/
update(callback?: (error: Error | null, items: SubscribedEventInstance) => any): Promise<SubscribedEventInstance>;
/**
* update a SubscribedEventInstance
*
* @param opts - Options for request
* @param callback - Callback to handle processed record
*/
update(opts?: SubscribedEventInstanceUpdateOptions, callback?: (error: Error | null, items: SubscribedEventInstance) => any): Promise<SubscribedEventInstance>;
url: string;
version: number;
}
Expand Down Expand Up @@ -247,4 +356,4 @@ declare class SubscribedEventPage extends Page<V1, SubscribedEventPayload, Subsc
toJSON(): any;
}

export { SubscribedEventInstance, SubscribedEventList, SubscribedEventListInstance, SubscribedEventListInstanceEachOptions, SubscribedEventListInstanceOptions, SubscribedEventListInstancePageOptions, SubscribedEventPage, SubscribedEventPayload, SubscribedEventResource, SubscribedEventSolution }
export { SubscribedEventContext, SubscribedEventInstance, SubscribedEventInstanceUpdateOptions, SubscribedEventList, SubscribedEventListInstance, SubscribedEventListInstanceCreateOptions, SubscribedEventListInstanceEachOptions, SubscribedEventListInstanceOptions, SubscribedEventListInstancePageOptions, SubscribedEventPage, SubscribedEventPayload, SubscribedEventResource, SubscribedEventSolution }
Loading

0 comments on commit a12a560

Please sign in to comment.