diff --git a/lib/rest/accounts/v1/credential.ts b/lib/rest/accounts/v1/credential.ts index 0483052f13..6a9ea0f465 100644 --- a/lib/rest/accounts/v1/credential.ts +++ b/lib/rest/accounts/v1/credential.ts @@ -17,14 +17,14 @@ import { inspect, InspectOptions } from "util"; import V1 from "../V1"; const deserialize = require("../../../base/deserialize"); const serialize = require("../../../base/serialize"); -import { AWSListInstance } from "./credential/aws"; +import { AwsListInstance } from "./credential/aws"; import { PublicKeyListInstance } from "./credential/publicKey"; export interface CredentialListInstance { - aws: AWSListInstance; + aws: AwsListInstance; publicKey: PublicKeyListInstance; /** @@ -43,7 +43,7 @@ class CredentialListInstanceImpl implements CredentialListInstance { _solution?: CredentialSolution; _uri?: string; - _aws?: AWSListInstance; + _aws?: AwsListInstance; _publicKey?: PublicKeyListInstance; } @@ -57,7 +57,7 @@ export function CredentialListInstance(version: V1): CredentialListInstance { Object.defineProperty(instance, "aws", { get: function aws() { if (!this._aws) { - this._aws = AWSListInstance(this._version); + this._aws = AwsListInstance(this._version); } return this._aws; } diff --git a/lib/rest/accounts/v1/credential/aws.ts b/lib/rest/accounts/v1/credential/aws.ts index 6a6f6f122c..91fddff6c4 100644 --- a/lib/rest/accounts/v1/credential/aws.ts +++ b/lib/rest/accounts/v1/credential/aws.ts @@ -24,22 +24,22 @@ const serialize = require("../../../../base/serialize"); /** - * Options to pass to update a AWSInstance + * Options to pass to update a AwsInstance * * @property { string } [friendlyName] A descriptive string that you create to describe the resource. It can be up to 64 characters long. */ -export interface AWSContextUpdateOptions { +export interface AwsContextUpdateOptions { "friendlyName"?: string; } /** - * Options to pass to create a AWSInstance + * Options to pass to create a AwsInstance * * @property { string } credentials A string that contains the AWS access credentials in the format `<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` * @property { string } [friendlyName] A descriptive string that you create to describe the resource. It can be up to 64 characters long. * @property { string } [accountSid] The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request. */ -export interface AWSListInstanceCreateOptions { +export interface AwsListInstanceCreateOptions { "credentials": string; "friendlyName"?: string; "accountSid"?: string; @@ -57,9 +57,9 @@ export interface AWSListInstanceCreateOptions { * each() guarantees never to return more than limit. * Default is no limit */ -export interface AWSListInstanceEachOptions { +export interface AwsListInstanceEachOptions { "pageSize"?: number; - callback?: (item: AWSInstance, done: (err?: Error) => void) => void; + callback?: (item: AwsInstance, done: (err?: Error) => void) => void; done?: Function; limit?: number; } @@ -73,7 +73,7 @@ export interface AWSListInstanceEachOptions { * list() guarantees never to return more than limit. * Default is no limit */ -export interface AWSListInstanceOptions { +export interface AwsListInstanceOptions { "pageSize"?: number; limit?: number; } @@ -85,7 +85,7 @@ export interface AWSListInstanceOptions { * @property { number } [pageNumber] - Page Number, this value is simply for client state * @property { string } [pageToken] - PageToken provided by the API */ -export interface AWSListInstancePageOptions { +export interface AwsListInstancePageOptions { "pageSize"?: number; pageNumber?: number; pageToken?: string; @@ -93,11 +93,11 @@ export interface AWSListInstancePageOptions { -export interface AWSContext { +export interface AwsContext { /** - * Remove a AWSInstance + * Remove a AwsInstance * * @param { function } [callback] - Callback to handle processed record * @@ -107,33 +107,33 @@ export interface AWSContext { /** - * Fetch a AWSInstance + * Fetch a AwsInstance * * @param { function } [callback] - Callback to handle processed record * - * @returns { Promise } Resolves to processed AWSInstance + * @returns { Promise } Resolves to processed AwsInstance */ - fetch(callback?: (error: Error | null, item?: AWSInstance) => any): Promise + fetch(callback?: (error: Error | null, item?: AwsInstance) => any): Promise /** - * Update a AWSInstance + * Update a AwsInstance * * @param { function } [callback] - Callback to handle processed record * - * @returns { Promise } Resolves to processed AWSInstance + * @returns { Promise } Resolves to processed AwsInstance */ - update(callback?: (error: Error | null, item?: AWSInstance) => any): Promise; + update(callback?: (error: Error | null, item?: AwsInstance) => any): Promise; /** - * Update a AWSInstance + * Update a AwsInstance * - * @param { AWSContextUpdateOptions } params - Parameter for request + * @param { AwsContextUpdateOptions } params - Parameter for request * @param { function } [callback] - Callback to handle processed record * - * @returns { Promise } Resolves to processed AWSInstance + * @returns { Promise } Resolves to processed AwsInstance */ - update(params: AWSContextUpdateOptions, callback?: (error: Error | null, item?: AWSInstance) => any): Promise; - update(params?: any, callback?: any): Promise + update(params: AwsContextUpdateOptions, callback?: (error: Error | null, item?: AwsInstance) => any): Promise; + update(params?: any, callback?: any): Promise /** @@ -143,12 +143,12 @@ export interface AWSContext { [inspect.custom](_depth: any, options: InspectOptions): any; } -export interface AWSContextSolution { +export interface AwsContextSolution { "sid"?: string; } -export class AWSContextImpl implements AWSContext { - protected _solution: AWSContextSolution; +export class AwsContextImpl implements AwsContext { + protected _solution: AwsContextSolution; protected _uri: string; @@ -169,12 +169,12 @@ export class AWSContextImpl implements AWSContext { } - fetch(callback?: any): Promise { + fetch(callback?: any): Promise { let operationVersion = this._version, operationPromise = operationVersion.fetch({ uri: this._uri, method: "get" }); - operationPromise = operationPromise.then(payload => new AWSInstance(operationVersion, payload, this._solution.sid)); + operationPromise = operationPromise.then(payload => new AwsInstance(operationVersion, payload, this._solution.sid)); operationPromise = this._version.setPromiseCallback(operationPromise,callback); @@ -183,7 +183,7 @@ export class AWSContextImpl implements AWSContext { } - update(params?: any, callback?: any): Promise { + update(params?: any, callback?: any): Promise { if (typeof params === "function") { callback = params; params = {}; @@ -201,7 +201,7 @@ export class AWSContextImpl implements AWSContext { let operationVersion = this._version, operationPromise = operationVersion.update({ uri: this._uri, method: "post", data, headers }); - operationPromise = operationPromise.then(payload => new AWSInstance(operationVersion, payload, this._solution.sid)); + operationPromise = operationPromise.then(payload => new AwsInstance(operationVersion, payload, this._solution.sid)); operationPromise = this._version.setPromiseCallback(operationPromise,callback); @@ -224,10 +224,10 @@ export class AWSContextImpl implements AWSContext { } } -interface AWSPayload extends AWSResource, Page.TwilioResponsePayload { +interface AwsPayload extends AwsResource, Page.TwilioResponsePayload { } -interface AWSResource { +interface AwsResource { sid?: string | null; account_sid?: string | null; friendly_name?: string | null; @@ -236,11 +236,11 @@ interface AWSResource { url?: string | null; } -export class AWSInstance { - protected _solution: AWSContextSolution; - protected _context?: AWSContext; +export class AwsInstance { + protected _solution: AwsContextSolution; + protected _context?: AwsContext; - constructor(protected _version: V1, payload: AWSPayload, sid?: string) { + constructor(protected _version: V1, payload: AwsPayload, sid?: string) { this.sid = payload.sid; this.accountSid = payload.account_sid; this.friendlyName = payload.friendly_name; @@ -276,13 +276,13 @@ export class AWSInstance { */ url?: string | null; - private get _proxy(): AWSContext { - this._context = this._context || new AWSContextImpl(this._version, this._solution.sid); + private get _proxy(): AwsContext { + this._context = this._context || new AwsContextImpl(this._version, this._solution.sid); return this._context; } /** - * Remove a AWSInstance + * Remove a AwsInstance * * @param { function } [callback] - Callback to handle processed record * @@ -294,35 +294,35 @@ export class AWSInstance { } /** - * Fetch a AWSInstance + * Fetch a AwsInstance * * @param { function } [callback] - Callback to handle processed record * - * @returns { Promise } Resolves to processed AWSInstance + * @returns { Promise } Resolves to processed AwsInstance */ - fetch(callback?: (error: Error | null, item?: AWSInstance) => any): Promise + fetch(callback?: (error: Error | null, item?: AwsInstance) => any): Promise { return this._proxy.fetch(callback); } /** - * Update a AWSInstance + * Update a AwsInstance * * @param { function } [callback] - Callback to handle processed record * - * @returns { Promise } Resolves to processed AWSInstance + * @returns { Promise } Resolves to processed AwsInstance */ - update(callback?: (error: Error | null, item?: AWSInstance) => any): Promise; + update(callback?: (error: Error | null, item?: AwsInstance) => any): Promise; /** - * Update a AWSInstance + * Update a AwsInstance * - * @param { AWSContextUpdateOptions } params - Parameter for request + * @param { AwsContextUpdateOptions } params - Parameter for request * @param { function } [callback] - Callback to handle processed record * - * @returns { Promise } Resolves to processed AWSInstance + * @returns { Promise } Resolves to processed AwsInstance */ - update(params: AWSContextUpdateOptions, callback?: (error: Error | null, item?: AWSInstance) => any): Promise; - update(params?: any, callback?: any): Promise + update(params: AwsContextUpdateOptions, callback?: (error: Error | null, item?: AwsInstance) => any): Promise; + update(params?: any, callback?: any): Promise { return this._proxy.update(params, callback); } @@ -349,26 +349,26 @@ export class AWSInstance { } -export interface AWSListInstance { - (sid: string): AWSContext; - get(sid: string): AWSContext; +export interface AwsListInstance { + (sid: string): AwsContext; + get(sid: string): AwsContext; /** - * Create a AWSInstance + * Create a AwsInstance * - * @param { AWSListInstanceCreateOptions } params - Parameter for request + * @param { AwsListInstanceCreateOptions } params - Parameter for request * @param { function } [callback] - Callback to handle processed record * - * @returns { Promise } Resolves to processed AWSInstance + * @returns { Promise } Resolves to processed AwsInstance */ - create(params: AWSListInstanceCreateOptions, callback?: (error: Error | null, item?: AWSInstance) => any): Promise; - create(params: any, callback?: any): Promise + create(params: AwsListInstanceCreateOptions, callback?: (error: Error | null, item?: AwsInstance) => any): Promise; + create(params: any, callback?: any): Promise /** - * Streams AWSInstance records from the API. + * Streams AwsInstance records from the API. * * This operation lazily loads records as efficiently as possible until the limit * is reached. @@ -381,9 +381,9 @@ export interface AWSListInstance { * * @param { function } [callback] - Function to process each record */ - each(callback?: (item: AWSInstance, done: (err?: Error) => void) => void): void; + each(callback?: (item: AwsInstance, done: (err?: Error) => void) => void): void; /** - * Streams AWSInstance records from the API. + * Streams AwsInstance records from the API. * * This operation lazily loads records as efficiently as possible until the limit * is reached. @@ -394,13 +394,13 @@ export interface AWSListInstance { * If a function is passed as the first argument, it will be used as the callback * function. * - * @param { AWSListInstanceEachOptions } [params] - Options for request + * @param { AwsListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ - each(params?: AWSListInstanceEachOptions, callback?: (item: AWSInstance, done: (err?: Error) => void) => void): void; + each(params?: AwsListInstanceEachOptions, callback?: (item: AwsInstance, done: (err?: Error) => void) => void): void; each(params?: any, callback?: any): void; /** - * Retrieve a single target page of AWSInstance records from the API. + * Retrieve a single target page of AwsInstance records from the API. * * The request is executed immediately. * @@ -409,9 +409,9 @@ export interface AWSListInstance { * * @param { function } [callback] - Callback to handle list of records */ - getPage(callback?: (error: Error | null, items: AWSPage) => any): Promise; + getPage(callback?: (error: Error | null, items: AwsPage) => any): Promise; /** - * Retrieve a single target page of AWSInstance records from the API. + * Retrieve a single target page of AwsInstance records from the API. * * The request is executed immediately. * @@ -421,30 +421,30 @@ export interface AWSListInstance { * @param { string } [targetUrl] - API-generated URL for the requested results page * @param { function } [callback] - Callback to handle list of records */ - getPage(targetUrl?: string, callback?: (error: Error | null, items: AWSPage) => any): Promise; - getPage(params?: any, callback?: any): Promise; + getPage(targetUrl?: string, callback?: (error: Error | null, items: AwsPage) => any): Promise; + getPage(params?: any, callback?: any): Promise; /** - * Lists AWSInstance records from the API as a list. + * Lists AwsInstance records from the API as a list. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { function } [callback] - Callback to handle list of records */ - list(callback?: (error: Error | null, items: AWSInstance[]) => any): Promise; + list(callback?: (error: Error | null, items: AwsInstance[]) => any): Promise; /** - * Lists AWSInstance records from the API as a list. + * Lists AwsInstance records from the API as a list. * * If a function is passed as the first argument, it will be used as the callback * function. * - * @param { AWSListInstanceOptions } [params] - Options for request + * @param { AwsListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ - list(params?: AWSListInstanceOptions, callback?: (error: Error | null, items: AWSInstance[]) => any): Promise; - list(params?: any, callback?: any): Promise; + list(params?: AwsListInstanceOptions, callback?: (error: Error | null, items: AwsInstance[]) => any): Promise; + list(params?: any, callback?: any): Promise; /** - * Retrieve a single page of AWSInstance records from the API. + * Retrieve a single page of AwsInstance records from the API. * * The request is executed immediately. * @@ -453,20 +453,20 @@ export interface AWSListInstance { * * @param { function } [callback] - Callback to handle list of records */ - page(callback?: (error: Error | null, items: AWSPage) => any): Promise; + page(callback?: (error: Error | null, items: AwsPage) => any): Promise; /** - * Retrieve a single page of AWSInstance records from the API. + * Retrieve a single page of AwsInstance records from the API. * * The request is executed immediately. * * If a function is passed as the first argument, it will be used as the callback * function. * - * @param { AWSListInstancePageOptions } [params] - Options for request + * @param { AwsListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ - page(params: AWSListInstancePageOptions, callback?: (error: Error | null, items: AWSPage) => any): Promise; - page(params?: any, callback?: any): Promise; + page(params: AwsListInstancePageOptions, callback?: (error: Error | null, items: AwsPage) => any): Promise; + page(params?: any, callback?: any): Promise; /** * Provide a user-friendly representation @@ -475,29 +475,29 @@ export interface AWSListInstance { [inspect.custom](_depth: any, options: InspectOptions): any; } -export interface AWSSolution { +export interface AwsSolution { } -interface AWSListInstanceImpl extends AWSListInstance {} -class AWSListInstanceImpl implements AWSListInstance { +interface AwsListInstanceImpl extends AwsListInstance {} +class AwsListInstanceImpl implements AwsListInstance { _version?: V1; - _solution?: AWSSolution; + _solution?: AwsSolution; _uri?: string; } -export function AWSListInstance(version: V1): AWSListInstance { - const instance = ((sid) => instance.get(sid)) as AWSListInstanceImpl; +export function AwsListInstance(version: V1): AwsListInstance { + const instance = ((sid) => instance.get(sid)) as AwsListInstanceImpl; - instance.get = function get(sid): AWSContext { - return new AWSContextImpl(version, sid); + instance.get = function get(sid): AwsContext { + return new AwsContextImpl(version, sid); } instance._version = version; instance._solution = { }; instance._uri = `/Credentials/AWS`; - instance.create = function create(params: any, callback?: any): Promise { + instance.create = function create(params: any, callback?: any): Promise { if (params === null || params === undefined) { throw new Error('Required parameter "params" missing.'); } @@ -518,7 +518,7 @@ export function AWSListInstance(version: V1): AWSListInstance { let operationVersion = version, operationPromise = operationVersion.create({ uri: this._uri, method: "post", data, headers }); - operationPromise = operationPromise.then(payload => new AWSInstance(operationVersion, payload)); + operationPromise = operationPromise.then(payload => new AwsInstance(operationVersion, payload)); operationPromise = this._version.setPromiseCallback(operationPromise,callback); @@ -527,7 +527,7 @@ export function AWSListInstance(version: V1): AWSListInstance { } - instance.page = function page(params?: any, callback?: any): Promise { + instance.page = function page(params?: any, callback?: any): Promise { if (typeof params === "function") { callback = params; params = {}; @@ -546,7 +546,7 @@ export function AWSListInstance(version: V1): AWSListInstance { let operationVersion = version, operationPromise = operationVersion.page({ uri: this._uri, method: "get", params: data, headers }); - operationPromise = operationPromise.then(payload => new AWSPage(operationVersion, payload, this._solution)); + operationPromise = operationPromise.then(payload => new AwsPage(operationVersion, payload, this._solution)); operationPromise = this._version.setPromiseCallback(operationPromise,callback); return operationPromise; @@ -555,10 +555,10 @@ export function AWSListInstance(version: V1): AWSListInstance { instance.each = instance._version.each; instance.list = instance._version.list; - instance.getPage = function getPage(targetUrl?: any, callback?: any): Promise { + instance.getPage = function getPage(targetUrl?: any, callback?: any): Promise { let operationPromise = this._version._domain.twilio.request({method: "get", uri: targetUrl}); - operationPromise = operationPromise.then(payload => new AWSPage(this._version, payload, this._solution)); + operationPromise = operationPromise.then(payload => new AwsPage(this._version, payload, this._solution)); operationPromise = this._version.setPromiseCallback(operationPromise,callback); return operationPromise; } @@ -576,25 +576,25 @@ export function AWSListInstance(version: V1): AWSListInstance { } -export class AWSPage extends Page { +export class AwsPage extends Page { /** -* Initialize the AWSPage +* Initialize the AwsPage * * @param version - Version of the resource * @param response - Response from the API * @param solution - Path solution */ -constructor(version: V1, response: Response, solution: AWSSolution) { +constructor(version: V1, response: Response, solution: AwsSolution) { super(version, response, solution); } /** - * Build an instance of AWSInstance + * Build an instance of AwsInstance * * @param payload - Payload response from the API */ - getInstance(payload: AWSPayload): AWSInstance { - return new AWSInstance( + getInstance(payload: AwsPayload): AwsInstance { + return new AwsInstance( this._version, payload, ); diff --git a/lib/rest/api/v2010/account.ts b/lib/rest/api/v2010/account.ts index 93f3f177d0..fc06fd7e41 100644 --- a/lib/rest/api/v2010/account.ts +++ b/lib/rest/api/v2010/account.ts @@ -36,9 +36,9 @@ import { NotificationListInstance } from "./account/notification"; import { OutgoingCallerIdListInstance } from "./account/outgoingCallerId"; import { QueueListInstance } from "./account/queue"; import { RecordingListInstance } from "./account/recording"; -import { SIPListInstance } from "./account/sip"; import { ShortCodeListInstance } from "./account/shortCode"; import { SigningKeyListInstance } from "./account/signingKey"; +import { SipListInstance } from "./account/sip"; import { TokenListInstance } from "./account/token"; import { TranscriptionListInstance } from "./account/transcription"; import { UsageListInstance } from "./account/usage"; @@ -150,9 +150,9 @@ export interface AccountContext { outgoingCallerIds: OutgoingCallerIdListInstance; queues: QueueListInstance; recordings: RecordingListInstance; - sip: SIPListInstance; shortCodes: ShortCodeListInstance; signingKeys: SigningKeyListInstance; + sip: SipListInstance; tokens: TokenListInstance; transcriptions: TranscriptionListInstance; usage: UsageListInstance; @@ -220,9 +220,9 @@ export class AccountContextImpl implements AccountContext { protected _outgoingCallerIds?: OutgoingCallerIdListInstance; protected _queues?: QueueListInstance; protected _recordings?: RecordingListInstance; - protected _sip?: SIPListInstance; protected _shortCodes?: ShortCodeListInstance; protected _signingKeys?: SigningKeyListInstance; + protected _sip?: SipListInstance; protected _tokens?: TokenListInstance; protected _transcriptions?: TranscriptionListInstance; protected _usage?: UsageListInstance; @@ -318,11 +318,6 @@ export class AccountContextImpl implements AccountContext { return this._recordings; } - get sip(): SIPListInstance { - this._sip = this._sip || SIPListInstance(this._version, this._solution.sid); - return this._sip; - } - get shortCodes(): ShortCodeListInstance { this._shortCodes = this._shortCodes || ShortCodeListInstance(this._version, this._solution.sid); return this._shortCodes; @@ -333,6 +328,11 @@ export class AccountContextImpl implements AccountContext { return this._signingKeys; } + get sip(): SipListInstance { + this._sip = this._sip || SipListInstance(this._version, this._solution.sid); + return this._sip; + } + get tokens(): TokenListInstance { this._tokens = this._tokens || TokenListInstance(this._version, this._solution.sid); return this._tokens; @@ -637,13 +637,6 @@ export class AccountInstance { return this._proxy.recordings; } - /** - * Access the sip. - */ - sip(): SIPListInstance { - return this._proxy.sip; - } - /** * Access the shortCodes. */ @@ -658,6 +651,13 @@ export class AccountInstance { return this._proxy.signingKeys; } + /** + * Access the sip. + */ + sip(): SipListInstance { + return this._proxy.sip; + } + /** * Access the tokens. */ diff --git a/lib/rest/api/v2010/account/sip.ts b/lib/rest/api/v2010/account/sip.ts index e6a6d63464..f78931651e 100644 --- a/lib/rest/api/v2010/account/sip.ts +++ b/lib/rest/api/v2010/account/sip.ts @@ -23,7 +23,7 @@ import { IpAccessControlListListInstance } from "./sip/ipAccessControlList"; -export interface SIPListInstance { +export interface SipListInstance { credentialLists: CredentialListListInstance; domains: DomainListInstance; @@ -36,14 +36,14 @@ export interface SIPListInstance { [inspect.custom](_depth: any, options: InspectOptions): any; } -export interface SIPSolution { +export interface SipSolution { accountSid?: string; } -interface SIPListInstanceImpl extends SIPListInstance {} -class SIPListInstanceImpl implements SIPListInstance { +interface SipListInstanceImpl extends SipListInstance {} +class SipListInstanceImpl implements SipListInstance { _version?: V2010; - _solution?: SIPSolution; + _solution?: SipSolution; _uri?: string; _credentialLists?: CredentialListListInstance; @@ -51,8 +51,8 @@ class SIPListInstanceImpl implements SIPListInstance { _ipAccessControlLists?: IpAccessControlListListInstance; } -export function SIPListInstance(version: V2010, accountSid: string): SIPListInstance { - const instance = {} as SIPListInstanceImpl; +export function SipListInstance(version: V2010, accountSid: string): SipListInstance { + const instance = {} as SipListInstanceImpl; instance._version = version; instance._solution = { accountSid }; diff --git a/lib/rest/messaging/v1/brandRegistration.ts b/lib/rest/messaging/v1/brandRegistration.ts index 2be49434aa..b94b4c2611 100644 --- a/lib/rest/messaging/v1/brandRegistration.ts +++ b/lib/rest/messaging/v1/brandRegistration.ts @@ -34,14 +34,14 @@ type BrandRegistrationsStatus = 'PENDING'|'APPROVED'|'FAILED'|'IN_REVIEW'|'DELET * Options to pass to create a BrandRegistrationInstance * * @property { string } customerProfileBundleSid Customer Profile Bundle Sid. - * @property { string } a2PprofileBundleSid A2P Messaging Profile Bundle Sid. + * @property { string } a2PProfileBundleSid A2P Messaging Profile Bundle Sid. * @property { string } [brandType] Type of brand being created. One of: \\\"STANDARD\\\", \\\"STARTER\\\". STARTER is for low volume, starter use cases. STANDARD is for all other use cases. * @property { boolean } [mock] A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided. * @property { boolean } [skipAutomaticSecVet] A flag to disable automatic secondary vetting for brands which it would otherwise be done. */ export interface BrandRegistrationListInstanceCreateOptions { "customerProfileBundleSid": string; - "a2PprofileBundleSid": string; + "a2PProfileBundleSid": string; "brandType"?: string; "mock"?: boolean; "skipAutomaticSecVet"?: boolean; @@ -544,14 +544,14 @@ export function BrandRegistrationListInstance(version: V1): BrandRegistrationLis throw new Error('Required parameter "params[\'customerProfileBundleSid\']" missing.'); } - if (params["a2PprofileBundleSid"] === null || params["a2PprofileBundleSid"] === undefined) { - throw new Error('Required parameter "params[\'a2PprofileBundleSid\']" missing.'); + if (params["a2PProfileBundleSid"] === null || params["a2PProfileBundleSid"] === undefined) { + throw new Error('Required parameter "params[\'a2PProfileBundleSid\']" missing.'); } const data: any = {}; data["CustomerProfileBundleSid"] = params["customerProfileBundleSid"]; - data["A2PProfileBundleSid"] = params["a2PprofileBundleSid"]; + data["A2PProfileBundleSid"] = params["a2PProfileBundleSid"]; if (params["brandType"] !== undefined) data["BrandType"] = params["brandType"]; if (params["mock"] !== undefined) data["Mock"] = serialize.bool(params["mock"]); if (params["skipAutomaticSecVet"] !== undefined) data["SkipAutomaticSecVet"] = serialize.bool(params["skipAutomaticSecVet"]); diff --git a/lib/rest/oauth/V1.ts b/lib/rest/oauth/V1.ts index 90faeaa4de..ea2b15c282 100644 --- a/lib/rest/oauth/V1.ts +++ b/lib/rest/oauth/V1.ts @@ -16,8 +16,8 @@ import OauthBase from "../OauthBase"; import Version from "../../base/Version"; import { OauthListInstance } from "./v1/oauth"; import { OpenidDiscoveryListInstance } from "./v1/openidDiscovery"; +import { TokenListInstance } from "./v1/token"; import { UserInfoListInstance } from "./v1/userInfo"; -import { tokenListInstance } from "./v1/token"; export default class V1 extends Version { /** @@ -25,8 +25,8 @@ export default class V1 extends Version { * * @property { Twilio.Oauth.V1.OauthListInstance } oauth - oauth resource * @property { Twilio.Oauth.V1.OpenidDiscoveryListInstance } openidDiscovery - openidDiscovery resource + * @property { Twilio.Oauth.V1.TokenListInstance } token - token resource * @property { Twilio.Oauth.V1.UserInfoListInstance } userInfo - userInfo resource - * @property { Twilio.Oauth.V1.tokenListInstance } token - token resource * * @param { Twilio.Oauth } domain - The Twilio domain */ @@ -36,8 +36,8 @@ export default class V1 extends Version { protected _oauth?: OauthListInstance; protected _openidDiscovery?: OpenidDiscoveryListInstance; + protected _token?: TokenListInstance; protected _userInfo?: UserInfoListInstance; - protected _token?: tokenListInstance; get oauth(): OauthListInstance { this._oauth = this._oauth || OauthListInstance(this); @@ -49,14 +49,14 @@ export default class V1 extends Version { return this._openidDiscovery; } + get token(): TokenListInstance { + this._token = this._token || TokenListInstance(this); + return this._token; + } + get userInfo(): UserInfoListInstance { this._userInfo = this._userInfo || UserInfoListInstance(this); return this._userInfo; } - get token(): tokenListInstance { - this._token = this._token || tokenListInstance(this); - return this._token; - } - } diff --git a/lib/rest/preview/wireless/sim.ts b/lib/rest/preview/wireless/sim.ts index 76c3395445..6f6f8df31d 100644 --- a/lib/rest/preview/wireless/sim.ts +++ b/lib/rest/preview/wireless/sim.ts @@ -68,7 +68,7 @@ export interface SimContextUpdateOptions { * @property { string } [status] * @property { string } [iccid] * @property { string } [ratePlan] - * @property { string } [eid] + * @property { string } [eId] * @property { string } [simRegistrationCode] * @property { number } [pageSize] How many resources to return in each list page. The default is 50, and the maximum is 1000. * @property { Function } [callback] - @@ -84,7 +84,7 @@ export interface SimListInstanceEachOptions { "status"?: string; "iccid"?: string; "ratePlan"?: string; - "eid"?: string; + "eId"?: string; "simRegistrationCode"?: string; "pageSize"?: number; callback?: (item: SimInstance, done: (err?: Error) => void) => void; @@ -98,7 +98,7 @@ export interface SimListInstanceEachOptions { * @property { string } [status] * @property { string } [iccid] * @property { string } [ratePlan] - * @property { string } [eid] + * @property { string } [eId] * @property { string } [simRegistrationCode] * @property { number } [pageSize] How many resources to return in each list page. The default is 50, and the maximum is 1000. * @property { number } [limit] - @@ -110,7 +110,7 @@ export interface SimListInstanceOptions { "status"?: string; "iccid"?: string; "ratePlan"?: string; - "eid"?: string; + "eId"?: string; "simRegistrationCode"?: string; "pageSize"?: number; limit?: number; @@ -122,7 +122,7 @@ export interface SimListInstanceOptions { * @property { string } [status] * @property { string } [iccid] * @property { string } [ratePlan] - * @property { string } [eid] + * @property { string } [eId] * @property { string } [simRegistrationCode] * @property { number } [pageSize] How many resources to return in each list page. The default is 50, and the maximum is 1000. * @property { number } [pageNumber] - Page Number, this value is simply for client state @@ -132,7 +132,7 @@ export interface SimListInstancePageOptions { "status"?: string; "iccid"?: string; "ratePlan"?: string; - "eid"?: string; + "eId"?: string; "simRegistrationCode"?: string; "pageSize"?: number; pageNumber?: number; @@ -591,7 +591,7 @@ export function SimListInstance(version: Wireless): SimListInstance { if (params["status"] !== undefined) data["Status"] = params["status"]; if (params["iccid"] !== undefined) data["Iccid"] = params["iccid"]; if (params["ratePlan"] !== undefined) data["RatePlan"] = params["ratePlan"]; - if (params["eid"] !== undefined) data["EId"] = params["eid"]; + if (params["eId"] !== undefined) data["EId"] = params["eId"]; if (params["simRegistrationCode"] !== undefined) data["SimRegistrationCode"] = params["simRegistrationCode"]; if (params["pageSize"] !== undefined) data["PageSize"] = params["pageSize"]; if (params.page !== undefined) data["Page"] = params.pageNumber; diff --git a/lib/rest/wireless/v1/sim.ts b/lib/rest/wireless/v1/sim.ts index 4da963d428..b893fe522e 100644 --- a/lib/rest/wireless/v1/sim.ts +++ b/lib/rest/wireless/v1/sim.ts @@ -77,7 +77,7 @@ export interface SimContextUpdateOptions { * @property { SimStatus } [status] Only return Sim resources with this status. * @property { string } [iccid] Only return Sim resources with this ICCID. This will return a list with a maximum size of 1. * @property { string } [ratePlan] The SID or unique name of a [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource. - * @property { string } [eid] Deprecated. + * @property { string } [eId] Deprecated. * @property { string } [simRegistrationCode] Only return Sim resources with this registration code. This will return a list with a maximum size of 1. * @property { number } [pageSize] How many resources to return in each list page. The default is 50, and the maximum is 1000. * @property { Function } [callback] - @@ -93,7 +93,7 @@ export interface SimListInstanceEachOptions { "status"?: SimStatus; "iccid"?: string; "ratePlan"?: string; - "eid"?: string; + "eId"?: string; "simRegistrationCode"?: string; "pageSize"?: number; callback?: (item: SimInstance, done: (err?: Error) => void) => void; @@ -107,7 +107,7 @@ export interface SimListInstanceEachOptions { * @property { SimStatus } [status] Only return Sim resources with this status. * @property { string } [iccid] Only return Sim resources with this ICCID. This will return a list with a maximum size of 1. * @property { string } [ratePlan] The SID or unique name of a [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource. - * @property { string } [eid] Deprecated. + * @property { string } [eId] Deprecated. * @property { string } [simRegistrationCode] Only return Sim resources with this registration code. This will return a list with a maximum size of 1. * @property { number } [pageSize] How many resources to return in each list page. The default is 50, and the maximum is 1000. * @property { number } [limit] - @@ -119,7 +119,7 @@ export interface SimListInstanceOptions { "status"?: SimStatus; "iccid"?: string; "ratePlan"?: string; - "eid"?: string; + "eId"?: string; "simRegistrationCode"?: string; "pageSize"?: number; limit?: number; @@ -131,7 +131,7 @@ export interface SimListInstanceOptions { * @property { SimStatus } [status] Only return Sim resources with this status. * @property { string } [iccid] Only return Sim resources with this ICCID. This will return a list with a maximum size of 1. * @property { string } [ratePlan] The SID or unique name of a [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource. - * @property { string } [eid] Deprecated. + * @property { string } [eId] Deprecated. * @property { string } [simRegistrationCode] Only return Sim resources with this registration code. This will return a list with a maximum size of 1. * @property { number } [pageSize] How many resources to return in each list page. The default is 50, and the maximum is 1000. * @property { number } [pageNumber] - Page Number, this value is simply for client state @@ -141,7 +141,7 @@ export interface SimListInstancePageOptions { "status"?: SimStatus; "iccid"?: string; "ratePlan"?: string; - "eid"?: string; + "eId"?: string; "simRegistrationCode"?: string; "pageSize"?: number; pageNumber?: number; @@ -725,7 +725,7 @@ export function SimListInstance(version: V1): SimListInstance { if (params["status"] !== undefined) data["Status"] = params["status"]; if (params["iccid"] !== undefined) data["Iccid"] = params["iccid"]; if (params["ratePlan"] !== undefined) data["RatePlan"] = params["ratePlan"]; - if (params["eid"] !== undefined) data["EId"] = params["eid"]; + if (params["eId"] !== undefined) data["EId"] = params["eId"]; if (params["simRegistrationCode"] !== undefined) data["SimRegistrationCode"] = params["simRegistrationCode"]; if (params["pageSize"] !== undefined) data["PageSize"] = params["pageSize"]; if (params.page !== undefined) data["Page"] = params.pageNumber;