diff --git a/src/rest/accounts/v1/authTokenPromotion.ts b/src/rest/accounts/v1/authTokenPromotion.ts index cf77719fdc..bf2d1f5e8b 100644 --- a/src/rest/accounts/v1/authTokenPromotion.ts +++ b/src/rest/accounts/v1/authTokenPromotion.ts @@ -53,11 +53,15 @@ export class AuthTokenPromotionContextImpl update( callback?: (error: Error | null, item?: AuthTokenPromotionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.update({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/accounts/v1/bulkConsents.ts b/src/rest/accounts/v1/bulkConsents.ts index 7f49dad8b3..00564a76b8 100644 --- a/src/rest/accounts/v1/bulkConsents.ts +++ b/src/rest/accounts/v1/bulkConsents.ts @@ -82,6 +82,7 @@ export function BulkConsentsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/accounts/v1/bulkContacts.ts b/src/rest/accounts/v1/bulkContacts.ts index 68b9d954e3..c12a7858b2 100644 --- a/src/rest/accounts/v1/bulkContacts.ts +++ b/src/rest/accounts/v1/bulkContacts.ts @@ -82,6 +82,7 @@ export function BulkContactsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/accounts/v1/credential/aws.ts b/src/rest/accounts/v1/credential/aws.ts index 73d9663310..4d5e9f73ad 100644 --- a/src/rest/accounts/v1/credential/aws.ts +++ b/src/rest/accounts/v1/credential/aws.ts @@ -148,11 +148,14 @@ export class AwsContextImpl implements AwsContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -165,11 +168,15 @@ export class AwsContextImpl implements AwsContext { fetch( callback?: (error: Error | null, item?: AwsInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -204,6 +211,7 @@ export class AwsContextImpl implements AwsContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -508,6 +516,7 @@ export function AwsListInstance(version: V1): AwsListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -549,6 +558,7 @@ export function AwsListInstance(version: V1): AwsListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/accounts/v1/credential/publicKey.ts b/src/rest/accounts/v1/credential/publicKey.ts index 42b0b3c48d..d58711ae8d 100644 --- a/src/rest/accounts/v1/credential/publicKey.ts +++ b/src/rest/accounts/v1/credential/publicKey.ts @@ -148,11 +148,14 @@ export class PublicKeyContextImpl implements PublicKeyContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -165,11 +168,15 @@ export class PublicKeyContextImpl implements PublicKeyContext { fetch( callback?: (error: Error | null, item?: PublicKeyInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -204,6 +211,7 @@ export class PublicKeyContextImpl implements PublicKeyContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -513,6 +521,7 @@ export function PublicKeyListInstance(version: V1): PublicKeyListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -554,6 +563,7 @@ export function PublicKeyListInstance(version: V1): PublicKeyListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/accounts/v1/safelist.ts b/src/rest/accounts/v1/safelist.ts index f2a784d6db..d18502a6eb 100644 --- a/src/rest/accounts/v1/safelist.ts +++ b/src/rest/accounts/v1/safelist.ts @@ -140,6 +140,7 @@ export function SafelistListInstance(version: V1): SafelistListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -214,6 +215,7 @@ export function SafelistListInstance(version: V1): SafelistListInstance { data["PhoneNumber"] = params["phoneNumber"]; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.fetch({ diff --git a/src/rest/accounts/v1/secondaryAuthToken.ts b/src/rest/accounts/v1/secondaryAuthToken.ts index f99ee56c03..eb19db2782 100644 --- a/src/rest/accounts/v1/secondaryAuthToken.ts +++ b/src/rest/accounts/v1/secondaryAuthToken.ts @@ -64,11 +64,15 @@ export class SecondaryAuthTokenContextImpl create( callback?: (error: Error | null, item?: SecondaryAuthTokenInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.create({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( @@ -85,11 +89,14 @@ export class SecondaryAuthTokenContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( diff --git a/src/rest/api/v2010/account.ts b/src/rest/api/v2010/account.ts index 5cfb5abece..a58f8ddc2f 100644 --- a/src/rest/api/v2010/account.ts +++ b/src/rest/api/v2010/account.ts @@ -385,11 +385,15 @@ export class AccountContextImpl implements AccountContext { fetch( callback?: (error: Error | null, item?: AccountInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -425,6 +429,7 @@ export class AccountContextImpl implements AccountContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -919,6 +924,7 @@ export function AccountListInstance(version: V2010): AccountListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -963,6 +969,7 @@ export function AccountListInstance(version: V2010): AccountListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/address.ts b/src/rest/api/v2010/account/address.ts index 0bbd271f93..f938b930fb 100644 --- a/src/rest/api/v2010/account/address.ts +++ b/src/rest/api/v2010/account/address.ts @@ -217,11 +217,14 @@ export class AddressContextImpl implements AddressContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -234,11 +237,15 @@ export class AddressContextImpl implements AddressContext { fetch( callback?: (error: Error | null, item?: AddressInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -291,6 +298,7 @@ export class AddressContextImpl implements AddressContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -733,6 +741,7 @@ export function AddressListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -785,6 +794,7 @@ export function AddressListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/address/dependentPhoneNumber.ts b/src/rest/api/v2010/account/address/dependentPhoneNumber.ts index 206a86b7d4..770ef12c54 100644 --- a/src/rest/api/v2010/account/address/dependentPhoneNumber.ts +++ b/src/rest/api/v2010/account/address/dependentPhoneNumber.ts @@ -205,6 +205,7 @@ export function DependentPhoneNumberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/application.ts b/src/rest/api/v2010/account/application.ts index 8df7866686..726af2f1fa 100644 --- a/src/rest/api/v2010/account/application.ts +++ b/src/rest/api/v2010/account/application.ts @@ -215,11 +215,14 @@ export class ApplicationContextImpl implements ApplicationContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -232,11 +235,15 @@ export class ApplicationContextImpl implements ApplicationContext { fetch( callback?: (error: Error | null, item?: ApplicationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -308,6 +315,7 @@ export class ApplicationContextImpl implements ApplicationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -782,6 +790,7 @@ export function ApplicationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -830,6 +839,7 @@ export function ApplicationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/authorizedConnectApp.ts b/src/rest/api/v2010/account/authorizedConnectApp.ts index 208436838f..eb43f7453a 100644 --- a/src/rest/api/v2010/account/authorizedConnectApp.ts +++ b/src/rest/api/v2010/account/authorizedConnectApp.ts @@ -111,11 +111,15 @@ export class AuthorizedConnectAppContextImpl fetch( callback?: (error: Error | null, item?: AuthorizedConnectAppInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -413,6 +417,7 @@ export function AuthorizedConnectAppListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/availablePhoneNumberCountry.ts b/src/rest/api/v2010/account/availablePhoneNumberCountry.ts index fc187d2bd3..5594adfd76 100644 --- a/src/rest/api/v2010/account/availablePhoneNumberCountry.ts +++ b/src/rest/api/v2010/account/availablePhoneNumberCountry.ts @@ -215,11 +215,15 @@ export class AvailablePhoneNumberCountryContextImpl item?: AvailablePhoneNumberCountryInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -560,6 +564,7 @@ export function AvailablePhoneNumberCountryListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/availablePhoneNumberCountry/local.ts b/src/rest/api/v2010/account/availablePhoneNumberCountry/local.ts index 747084aac1..c7e2301595 100644 --- a/src/rest/api/v2010/account/availablePhoneNumberCountry/local.ts +++ b/src/rest/api/v2010/account/availablePhoneNumberCountry/local.ts @@ -328,6 +328,7 @@ export function LocalListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.ts b/src/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.ts index 006790f774..150853c148 100644 --- a/src/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.ts +++ b/src/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.ts @@ -337,6 +337,7 @@ export function MachineToMachineListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/availablePhoneNumberCountry/mobile.ts b/src/rest/api/v2010/account/availablePhoneNumberCountry/mobile.ts index 8678a9971f..6368047ae6 100644 --- a/src/rest/api/v2010/account/availablePhoneNumberCountry/mobile.ts +++ b/src/rest/api/v2010/account/availablePhoneNumberCountry/mobile.ts @@ -328,6 +328,7 @@ export function MobileListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/availablePhoneNumberCountry/national.ts b/src/rest/api/v2010/account/availablePhoneNumberCountry/national.ts index 1dbd15ec6f..b1100612eb 100644 --- a/src/rest/api/v2010/account/availablePhoneNumberCountry/national.ts +++ b/src/rest/api/v2010/account/availablePhoneNumberCountry/national.ts @@ -328,6 +328,7 @@ export function NationalListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.ts b/src/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.ts index 4a7fec5b7d..a2c7000992 100644 --- a/src/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.ts +++ b/src/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.ts @@ -328,6 +328,7 @@ export function SharedCostListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.ts b/src/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.ts index fcdd512ed4..ffc73aec25 100644 --- a/src/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.ts +++ b/src/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.ts @@ -328,6 +328,7 @@ export function TollFreeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/availablePhoneNumberCountry/voip.ts b/src/rest/api/v2010/account/availablePhoneNumberCountry/voip.ts index 97283d6ee5..ce7dedaa86 100644 --- a/src/rest/api/v2010/account/availablePhoneNumberCountry/voip.ts +++ b/src/rest/api/v2010/account/availablePhoneNumberCountry/voip.ts @@ -328,6 +328,7 @@ export function VoipListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/balance.ts b/src/rest/api/v2010/account/balance.ts index 5176639cd9..94b005fa3e 100644 --- a/src/rest/api/v2010/account/balance.ts +++ b/src/rest/api/v2010/account/balance.ts @@ -62,10 +62,14 @@ export function BalanceListInstance( instance.fetch = function fetch( callback?: (error: Error | null, items: BalanceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + let operationVersion = version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/api/v2010/account/call.ts b/src/rest/api/v2010/account/call.ts index 1b6e33eb2e..496cd26785 100644 --- a/src/rest/api/v2010/account/call.ts +++ b/src/rest/api/v2010/account/call.ts @@ -434,11 +434,14 @@ export class CallContextImpl implements CallContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -451,11 +454,15 @@ export class CallContextImpl implements CallContext { fetch( callback?: (error: Error | null, item?: CallInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -508,6 +515,7 @@ export class CallContextImpl implements CallContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -1108,6 +1116,7 @@ export function CallListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -1171,6 +1180,7 @@ export function CallListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/call/event.ts b/src/rest/api/v2010/account/call/event.ts index 24196a413c..b0112a7fbb 100644 --- a/src/rest/api/v2010/account/call/event.ts +++ b/src/rest/api/v2010/account/call/event.ts @@ -182,6 +182,7 @@ export function EventListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/call/notification.ts b/src/rest/api/v2010/account/call/notification.ts index 4e993b9376..92aed3be52 100644 --- a/src/rest/api/v2010/account/call/notification.ts +++ b/src/rest/api/v2010/account/call/notification.ts @@ -134,11 +134,15 @@ export class NotificationContextImpl implements NotificationContext { fetch( callback?: (error: Error | null, item?: NotificationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -495,6 +499,7 @@ export function NotificationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/call/payment.ts b/src/rest/api/v2010/account/call/payment.ts index 09e960b8bd..87ff0c9350 100644 --- a/src/rest/api/v2010/account/call/payment.ts +++ b/src/rest/api/v2010/account/call/payment.ts @@ -178,6 +178,7 @@ export class PaymentContextImpl implements PaymentContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -445,6 +446,7 @@ export function PaymentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/call/recording.ts b/src/rest/api/v2010/account/call/recording.ts index f987935695..a58e2538b0 100644 --- a/src/rest/api/v2010/account/call/recording.ts +++ b/src/rest/api/v2010/account/call/recording.ts @@ -196,11 +196,14 @@ export class RecordingContextImpl implements RecordingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -213,11 +216,15 @@ export class RecordingContextImpl implements RecordingContext { fetch( callback?: (error: Error | null, item?: RecordingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -258,6 +265,7 @@ export class RecordingContextImpl implements RecordingContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -684,6 +692,7 @@ export function RecordingListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -737,6 +746,7 @@ export function RecordingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/call/siprec.ts b/src/rest/api/v2010/account/call/siprec.ts index 04655fd138..5262bf1796 100644 --- a/src/rest/api/v2010/account/call/siprec.ts +++ b/src/rest/api/v2010/account/call/siprec.ts @@ -515,6 +515,7 @@ export class SiprecContextImpl implements SiprecContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -1159,6 +1160,7 @@ export function SiprecListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/call/stream.ts b/src/rest/api/v2010/account/call/stream.ts index cc1028f882..0c0becec07 100644 --- a/src/rest/api/v2010/account/call/stream.ts +++ b/src/rest/api/v2010/account/call/stream.ts @@ -515,6 +515,7 @@ export class StreamContextImpl implements StreamContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -1147,6 +1148,7 @@ export function StreamListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/call/transcription.ts b/src/rest/api/v2010/account/call/transcription.ts index 23f4620c5e..91bfd3ec04 100644 --- a/src/rest/api/v2010/account/call/transcription.ts +++ b/src/rest/api/v2010/account/call/transcription.ts @@ -138,6 +138,7 @@ export class TranscriptionContextImpl implements TranscriptionContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -400,6 +401,7 @@ export function TranscriptionListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/call/userDefinedMessage.ts b/src/rest/api/v2010/account/call/userDefinedMessage.ts index 1a6a714d11..77350cb246 100644 --- a/src/rest/api/v2010/account/call/userDefinedMessage.ts +++ b/src/rest/api/v2010/account/call/userDefinedMessage.ts @@ -97,6 +97,7 @@ export function UserDefinedMessageListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/call/userDefinedMessageSubscription.ts b/src/rest/api/v2010/account/call/userDefinedMessageSubscription.ts index eb58a2d2cc..7e7bf7c20f 100644 --- a/src/rest/api/v2010/account/call/userDefinedMessageSubscription.ts +++ b/src/rest/api/v2010/account/call/userDefinedMessageSubscription.ts @@ -86,11 +86,14 @@ export class UserDefinedMessageSubscriptionContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -300,6 +303,7 @@ export function UserDefinedMessageSubscriptionListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/conference.ts b/src/rest/api/v2010/account/conference.ts index 670a54a56e..81e8bdeda3 100644 --- a/src/rest/api/v2010/account/conference.ts +++ b/src/rest/api/v2010/account/conference.ts @@ -223,11 +223,15 @@ export class ConferenceContextImpl implements ConferenceContext { fetch( callback?: (error: Error | null, item?: ConferenceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -270,6 +274,7 @@ export class ConferenceContextImpl implements ConferenceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -636,6 +641,7 @@ export function ConferenceListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/conference/participant.ts b/src/rest/api/v2010/account/conference/participant.ts index 5a1ec9c606..5999a5438a 100644 --- a/src/rest/api/v2010/account/conference/participant.ts +++ b/src/rest/api/v2010/account/conference/participant.ts @@ -301,11 +301,14 @@ export class ParticipantContextImpl implements ParticipantContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -318,11 +321,15 @@ export class ParticipantContextImpl implements ParticipantContext { fetch( callback?: (error: Error | null, item?: ParticipantInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -385,6 +392,7 @@ export class ParticipantContextImpl implements ParticipantContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -901,6 +909,7 @@ export function ParticipantListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -954,6 +963,7 @@ export function ParticipantListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/conference/recording.ts b/src/rest/api/v2010/account/conference/recording.ts index c99e4d6822..e7c619afd6 100644 --- a/src/rest/api/v2010/account/conference/recording.ts +++ b/src/rest/api/v2010/account/conference/recording.ts @@ -178,11 +178,14 @@ export class RecordingContextImpl implements RecordingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -195,11 +198,15 @@ export class RecordingContextImpl implements RecordingContext { fetch( callback?: (error: Error | null, item?: RecordingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -240,6 +247,7 @@ export class RecordingContextImpl implements RecordingContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -630,6 +638,7 @@ export function RecordingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/connectApp.ts b/src/rest/api/v2010/account/connectApp.ts index b645bf0900..d59fdfab3c 100644 --- a/src/rest/api/v2010/account/connectApp.ts +++ b/src/rest/api/v2010/account/connectApp.ts @@ -157,11 +157,14 @@ export class ConnectAppContextImpl implements ConnectAppContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -174,11 +177,15 @@ export class ConnectAppContextImpl implements ConnectAppContext { fetch( callback?: (error: Error | null, item?: ConnectAppInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -235,6 +242,7 @@ export class ConnectAppContextImpl implements ConnectAppContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -584,6 +592,7 @@ export function ConnectAppListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/incomingPhoneNumber.ts b/src/rest/api/v2010/account/incomingPhoneNumber.ts index 62c61166a2..0d3ccf8819 100644 --- a/src/rest/api/v2010/account/incomingPhoneNumber.ts +++ b/src/rest/api/v2010/account/incomingPhoneNumber.ts @@ -306,11 +306,14 @@ export class IncomingPhoneNumberContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -323,11 +326,15 @@ export class IncomingPhoneNumberContextImpl fetch( callback?: (error: Error | null, item?: IncomingPhoneNumberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -410,6 +417,7 @@ export class IncomingPhoneNumberContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -1031,6 +1039,7 @@ export function IncomingPhoneNumberListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -1084,6 +1093,7 @@ export function IncomingPhoneNumberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.ts b/src/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.ts index 9a2642000c..3eb9b3628e 100644 --- a/src/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.ts +++ b/src/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.ts @@ -145,11 +145,14 @@ export class AssignedAddOnContextImpl implements AssignedAddOnContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -162,11 +165,15 @@ export class AssignedAddOnContextImpl implements AssignedAddOnContext { fetch( callback?: (error: Error | null, item?: AssignedAddOnInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -515,6 +522,7 @@ export function AssignedAddOnListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -562,6 +570,7 @@ export function AssignedAddOnListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.ts b/src/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.ts index 5927a2fdf9..933b2da479 100644 --- a/src/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.ts +++ b/src/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.ts @@ -127,11 +127,15 @@ export class AssignedAddOnExtensionContextImpl item?: AssignedAddOnExtensionInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -461,6 +465,7 @@ export function AssignedAddOnExtensionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/incomingPhoneNumber/local.ts b/src/rest/api/v2010/account/incomingPhoneNumber/local.ts index 4e4ab3288c..c507c538c3 100644 --- a/src/rest/api/v2010/account/incomingPhoneNumber/local.ts +++ b/src/rest/api/v2010/account/incomingPhoneNumber/local.ts @@ -319,6 +319,7 @@ export function LocalListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -372,6 +373,7 @@ export function LocalListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/incomingPhoneNumber/mobile.ts b/src/rest/api/v2010/account/incomingPhoneNumber/mobile.ts index a0c0254fde..0f1af28565 100644 --- a/src/rest/api/v2010/account/incomingPhoneNumber/mobile.ts +++ b/src/rest/api/v2010/account/incomingPhoneNumber/mobile.ts @@ -319,6 +319,7 @@ export function MobileListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -372,6 +373,7 @@ export function MobileListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/incomingPhoneNumber/tollFree.ts b/src/rest/api/v2010/account/incomingPhoneNumber/tollFree.ts index 33c2716f70..a5f56b585b 100644 --- a/src/rest/api/v2010/account/incomingPhoneNumber/tollFree.ts +++ b/src/rest/api/v2010/account/incomingPhoneNumber/tollFree.ts @@ -319,6 +319,7 @@ export function TollFreeListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -372,6 +373,7 @@ export function TollFreeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/key.ts b/src/rest/api/v2010/account/key.ts index adc249db4d..4aa50aba10 100644 --- a/src/rest/api/v2010/account/key.ts +++ b/src/rest/api/v2010/account/key.ts @@ -141,11 +141,14 @@ export class KeyContextImpl implements KeyContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -158,11 +161,15 @@ export class KeyContextImpl implements KeyContext { fetch( callback?: (error: Error | null, item?: KeyInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -202,6 +209,7 @@ export class KeyContextImpl implements KeyContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -502,6 +510,7 @@ export function KeyListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/message.ts b/src/rest/api/v2010/account/message.ts index d21e72cf0c..47e00a4292 100644 --- a/src/rest/api/v2010/account/message.ts +++ b/src/rest/api/v2010/account/message.ts @@ -286,11 +286,14 @@ export class MessageContextImpl implements MessageContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -303,11 +306,15 @@ export class MessageContextImpl implements MessageContext { fetch( callback?: (error: Error | null, item?: MessageInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -347,6 +354,7 @@ export class MessageContextImpl implements MessageContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -820,6 +828,7 @@ export function MessageListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -874,6 +883,7 @@ export function MessageListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/message/feedback.ts b/src/rest/api/v2010/account/message/feedback.ts index 9d8a2ff863..1ef862d4e9 100644 --- a/src/rest/api/v2010/account/message/feedback.ts +++ b/src/rest/api/v2010/account/message/feedback.ts @@ -106,6 +106,7 @@ export function FeedbackListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/message/media.ts b/src/rest/api/v2010/account/message/media.ts index 75e1f81e09..c19e1487b7 100644 --- a/src/rest/api/v2010/account/message/media.ts +++ b/src/rest/api/v2010/account/message/media.ts @@ -139,11 +139,14 @@ export class MediaContextImpl implements MediaContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -156,11 +159,15 @@ export class MediaContextImpl implements MediaContext { fetch( callback?: (error: Error | null, item?: MediaInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -463,6 +470,7 @@ export function MediaListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/newKey.ts b/src/rest/api/v2010/account/newKey.ts index b70e48d447..52898cf8bc 100644 --- a/src/rest/api/v2010/account/newKey.ts +++ b/src/rest/api/v2010/account/newKey.ts @@ -99,6 +99,7 @@ export function NewKeyListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/newSigningKey.ts b/src/rest/api/v2010/account/newSigningKey.ts index f5fbdf0fda..3e89aa7cc4 100644 --- a/src/rest/api/v2010/account/newSigningKey.ts +++ b/src/rest/api/v2010/account/newSigningKey.ts @@ -99,6 +99,7 @@ export function NewSigningKeyListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/notification.ts b/src/rest/api/v2010/account/notification.ts index 7bed19232f..2b3dfe0360 100644 --- a/src/rest/api/v2010/account/notification.ts +++ b/src/rest/api/v2010/account/notification.ts @@ -124,11 +124,15 @@ export class NotificationContextImpl implements NotificationContext { fetch( callback?: (error: Error | null, item?: NotificationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -476,6 +480,7 @@ export function NotificationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/outgoingCallerId.ts b/src/rest/api/v2010/account/outgoingCallerId.ts index 3994401ed6..bd53cdd139 100644 --- a/src/rest/api/v2010/account/outgoingCallerId.ts +++ b/src/rest/api/v2010/account/outgoingCallerId.ts @@ -156,11 +156,14 @@ export class OutgoingCallerIdContextImpl implements OutgoingCallerIdContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -173,11 +176,15 @@ export class OutgoingCallerIdContextImpl implements OutgoingCallerIdContext { fetch( callback?: (error: Error | null, item?: OutgoingCallerIdInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -217,6 +224,7 @@ export class OutgoingCallerIdContextImpl implements OutgoingCallerIdContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -548,6 +556,7 @@ export function OutgoingCallerIdListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/queue.ts b/src/rest/api/v2010/account/queue.ts index 8701fb1333..9b0fb43382 100644 --- a/src/rest/api/v2010/account/queue.ts +++ b/src/rest/api/v2010/account/queue.ts @@ -169,11 +169,14 @@ export class QueueContextImpl implements QueueContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -186,11 +189,15 @@ export class QueueContextImpl implements QueueContext { fetch( callback?: (error: Error | null, item?: QueueInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -231,6 +238,7 @@ export class QueueContextImpl implements QueueContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -587,6 +595,7 @@ export function QueueListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -633,6 +642,7 @@ export function QueueListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/queue/member.ts b/src/rest/api/v2010/account/queue/member.ts index 5ed369ca9e..7c5e626596 100644 --- a/src/rest/api/v2010/account/queue/member.ts +++ b/src/rest/api/v2010/account/queue/member.ts @@ -132,11 +132,15 @@ export class MemberContextImpl implements MemberContext { fetch( callback?: (error: Error | null, item?: MemberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -176,6 +180,7 @@ export class MemberContextImpl implements MemberContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -476,6 +481,7 @@ export function MemberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/recording.ts b/src/rest/api/v2010/account/recording.ts index fd545fcaa1..21431212cc 100644 --- a/src/rest/api/v2010/account/recording.ts +++ b/src/rest/api/v2010/account/recording.ts @@ -214,11 +214,14 @@ export class RecordingContextImpl implements RecordingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -247,6 +250,7 @@ export class RecordingContextImpl implements RecordingContext { data["IncludeSoftDeleted"] = serialize.bool(params["includeSoftDeleted"]); const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -662,6 +666,7 @@ export function RecordingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/recording/addOnResult.ts b/src/rest/api/v2010/account/recording/addOnResult.ts index 91223693b3..029c286ebc 100644 --- a/src/rest/api/v2010/account/recording/addOnResult.ts +++ b/src/rest/api/v2010/account/recording/addOnResult.ts @@ -148,11 +148,14 @@ export class AddOnResultContextImpl implements AddOnResultContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -165,11 +168,15 @@ export class AddOnResultContextImpl implements AddOnResultContext { fetch( callback?: (error: Error | null, item?: AddOnResultInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -487,6 +494,7 @@ export function AddOnResultListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/recording/addOnResult/payload.ts b/src/rest/api/v2010/account/recording/addOnResult/payload.ts index e0ca30823b..b744240164 100644 --- a/src/rest/api/v2010/account/recording/addOnResult/payload.ts +++ b/src/rest/api/v2010/account/recording/addOnResult/payload.ts @@ -145,11 +145,14 @@ export class PayloadContextImpl implements PayloadContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -162,11 +165,15 @@ export class PayloadContextImpl implements PayloadContext { fetch( callback?: (error: Error | null, item?: PayloadInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -514,6 +521,7 @@ export function PayloadListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/recording/addOnResult/payload/data.ts b/src/rest/api/v2010/account/recording/addOnResult/payload/data.ts index 38ac8f205f..cd78203e50 100644 --- a/src/rest/api/v2010/account/recording/addOnResult/payload/data.ts +++ b/src/rest/api/v2010/account/recording/addOnResult/payload/data.ts @@ -78,11 +78,15 @@ export class DataContextImpl implements DataContext { fetch( callback?: (error: Error | null, item?: DataInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/api/v2010/account/recording/transcription.ts b/src/rest/api/v2010/account/recording/transcription.ts index 96a4c59774..784147b58e 100644 --- a/src/rest/api/v2010/account/recording/transcription.ts +++ b/src/rest/api/v2010/account/recording/transcription.ts @@ -123,11 +123,14 @@ export class TranscriptionContextImpl implements TranscriptionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -140,11 +143,15 @@ export class TranscriptionContextImpl implements TranscriptionContext { fetch( callback?: (error: Error | null, item?: TranscriptionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -482,6 +489,7 @@ export function TranscriptionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/shortCode.ts b/src/rest/api/v2010/account/shortCode.ts index b7d7057155..55b240f08b 100644 --- a/src/rest/api/v2010/account/shortCode.ts +++ b/src/rest/api/v2010/account/shortCode.ts @@ -152,11 +152,15 @@ export class ShortCodeContextImpl implements ShortCodeContext { fetch( callback?: (error: Error | null, item?: ShortCodeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -205,6 +209,7 @@ export class ShortCodeContextImpl implements ShortCodeContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -552,6 +557,7 @@ export function ShortCodeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/signingKey.ts b/src/rest/api/v2010/account/signingKey.ts index bee7bad734..d56903ed8b 100644 --- a/src/rest/api/v2010/account/signingKey.ts +++ b/src/rest/api/v2010/account/signingKey.ts @@ -141,11 +141,14 @@ export class SigningKeyContextImpl implements SigningKeyContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -158,11 +161,15 @@ export class SigningKeyContextImpl implements SigningKeyContext { fetch( callback?: (error: Error | null, item?: SigningKeyInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -202,6 +209,7 @@ export class SigningKeyContextImpl implements SigningKeyContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -490,6 +498,7 @@ export function SigningKeyListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/credentialList.ts b/src/rest/api/v2010/account/sip/credentialList.ts index 7010cd853a..cc99d770cd 100644 --- a/src/rest/api/v2010/account/sip/credentialList.ts +++ b/src/rest/api/v2010/account/sip/credentialList.ts @@ -158,11 +158,14 @@ export class CredentialListContextImpl implements CredentialListContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -175,11 +178,15 @@ export class CredentialListContextImpl implements CredentialListContext { fetch( callback?: (error: Error | null, item?: CredentialListInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -220,6 +227,7 @@ export class CredentialListContextImpl implements CredentialListContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -557,6 +565,7 @@ export function CredentialListListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -603,6 +612,7 @@ export function CredentialListListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/credentialList/credential.ts b/src/rest/api/v2010/account/sip/credentialList/credential.ts index adf8ffda07..00510f8462 100644 --- a/src/rest/api/v2010/account/sip/credentialList/credential.ts +++ b/src/rest/api/v2010/account/sip/credentialList/credential.ts @@ -161,11 +161,14 @@ export class CredentialContextImpl implements CredentialContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -178,11 +181,15 @@ export class CredentialContextImpl implements CredentialContext { fetch( callback?: (error: Error | null, item?: CredentialInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -222,6 +229,7 @@ export class CredentialContextImpl implements CredentialContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -573,6 +581,7 @@ export function CredentialListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -620,6 +629,7 @@ export function CredentialListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/domain.ts b/src/rest/api/v2010/account/sip/domain.ts index 3dd21e8412..12f87ad749 100644 --- a/src/rest/api/v2010/account/sip/domain.ts +++ b/src/rest/api/v2010/account/sip/domain.ts @@ -241,11 +241,14 @@ export class DomainContextImpl implements DomainContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -258,11 +261,15 @@ export class DomainContextImpl implements DomainContext { fetch( callback?: (error: Error | null, item?: DomainInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -327,6 +334,7 @@ export class DomainContextImpl implements DomainContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -802,6 +810,7 @@ export function DomainListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -848,6 +857,7 @@ export function DomainListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.ts b/src/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.ts index c3c96c235e..1528075571 100644 --- a/src/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.ts +++ b/src/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsCredentialListMapping.ts @@ -136,11 +136,14 @@ export class AuthCallsCredentialListMappingContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -156,11 +159,15 @@ export class AuthCallsCredentialListMappingContextImpl item?: AuthCallsCredentialListMappingInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -490,6 +497,7 @@ export function AuthCallsCredentialListMappingListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -543,6 +551,7 @@ export function AuthCallsCredentialListMappingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.ts b/src/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.ts index 15ec17b28a..b2fed94d5c 100644 --- a/src/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.ts +++ b/src/rest/api/v2010/account/sip/domain/authTypes/authTypeCalls/authCallsIpAccessControlListMapping.ts @@ -136,11 +136,14 @@ export class AuthCallsIpAccessControlListMappingContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -156,11 +159,15 @@ export class AuthCallsIpAccessControlListMappingContextImpl item?: AuthCallsIpAccessControlListMappingInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -491,6 +498,7 @@ export function AuthCallsIpAccessControlListMappingListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -544,6 +552,7 @@ export function AuthCallsIpAccessControlListMappingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.ts b/src/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.ts index 7d87ca974c..e6f1ba2f8e 100644 --- a/src/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.ts +++ b/src/rest/api/v2010/account/sip/domain/authTypes/authTypeRegistrations/authRegistrationsCredentialListMapping.ts @@ -136,11 +136,14 @@ export class AuthRegistrationsCredentialListMappingContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -156,11 +159,15 @@ export class AuthRegistrationsCredentialListMappingContextImpl item?: AuthRegistrationsCredentialListMappingInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -493,6 +500,7 @@ export function AuthRegistrationsCredentialListMappingListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -546,6 +554,7 @@ export function AuthRegistrationsCredentialListMappingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/domain/credentialListMapping.ts b/src/rest/api/v2010/account/sip/domain/credentialListMapping.ts index 134d9ef335..52dfd5e5de 100644 --- a/src/rest/api/v2010/account/sip/domain/credentialListMapping.ts +++ b/src/rest/api/v2010/account/sip/domain/credentialListMapping.ts @@ -136,11 +136,14 @@ export class CredentialListMappingContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -156,11 +159,15 @@ export class CredentialListMappingContextImpl item?: CredentialListMappingInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -495,6 +502,7 @@ export function CredentialListMappingListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -542,6 +550,7 @@ export function CredentialListMappingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.ts b/src/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.ts index 15f0e3281e..1dae94f54d 100644 --- a/src/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.ts +++ b/src/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.ts @@ -136,11 +136,14 @@ export class IpAccessControlListMappingContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -156,11 +159,15 @@ export class IpAccessControlListMappingContextImpl item?: IpAccessControlListMappingInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -504,6 +511,7 @@ export function IpAccessControlListMappingListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -554,6 +562,7 @@ export function IpAccessControlListMappingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/ipAccessControlList.ts b/src/rest/api/v2010/account/sip/ipAccessControlList.ts index 86dcbad7f6..439a8c98d1 100644 --- a/src/rest/api/v2010/account/sip/ipAccessControlList.ts +++ b/src/rest/api/v2010/account/sip/ipAccessControlList.ts @@ -160,11 +160,14 @@ export class IpAccessControlListContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -177,11 +180,15 @@ export class IpAccessControlListContextImpl fetch( callback?: (error: Error | null, item?: IpAccessControlListInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -222,6 +229,7 @@ export class IpAccessControlListContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -566,6 +574,7 @@ export function IpAccessControlListListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -612,6 +621,7 @@ export function IpAccessControlListListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.ts b/src/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.ts index f1bc272cfc..44163e92c0 100644 --- a/src/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.ts +++ b/src/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.ts @@ -167,11 +167,14 @@ export class IpAddressContextImpl implements IpAddressContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -184,11 +187,15 @@ export class IpAddressContextImpl implements IpAddressContext { fetch( callback?: (error: Error | null, item?: IpAddressInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -233,6 +240,7 @@ export class IpAddressContextImpl implements IpAddressContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -607,6 +615,7 @@ export function IpAddressListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -654,6 +663,7 @@ export function IpAddressListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/token.ts b/src/rest/api/v2010/account/token.ts index 70f0c9fd35..f365c10b8b 100644 --- a/src/rest/api/v2010/account/token.ts +++ b/src/rest/api/v2010/account/token.ts @@ -105,6 +105,7 @@ export function TokenListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/api/v2010/account/transcription.ts b/src/rest/api/v2010/account/transcription.ts index 52944b7d9c..1fe37689f1 100644 --- a/src/rest/api/v2010/account/transcription.ts +++ b/src/rest/api/v2010/account/transcription.ts @@ -113,11 +113,14 @@ export class TranscriptionContextImpl implements TranscriptionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -130,11 +133,15 @@ export class TranscriptionContextImpl implements TranscriptionContext { fetch( callback?: (error: Error | null, item?: TranscriptionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -463,6 +470,7 @@ export function TranscriptionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/record.ts b/src/rest/api/v2010/account/usage/record.ts index b02044d371..ed01b0f650 100644 --- a/src/rest/api/v2010/account/usage/record.ts +++ b/src/rest/api/v2010/account/usage/record.ts @@ -581,6 +581,7 @@ export function RecordListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/record/allTime.ts b/src/rest/api/v2010/account/usage/record/allTime.ts index d2a9a187b3..35e935b0e3 100644 --- a/src/rest/api/v2010/account/usage/record/allTime.ts +++ b/src/rest/api/v2010/account/usage/record/allTime.ts @@ -460,6 +460,7 @@ export function AllTimeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/record/daily.ts b/src/rest/api/v2010/account/usage/record/daily.ts index b7e89eab53..66d3c04e6d 100644 --- a/src/rest/api/v2010/account/usage/record/daily.ts +++ b/src/rest/api/v2010/account/usage/record/daily.ts @@ -460,6 +460,7 @@ export function DailyListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/record/lastMonth.ts b/src/rest/api/v2010/account/usage/record/lastMonth.ts index 15c8b4c4c7..d20f57371d 100644 --- a/src/rest/api/v2010/account/usage/record/lastMonth.ts +++ b/src/rest/api/v2010/account/usage/record/lastMonth.ts @@ -460,6 +460,7 @@ export function LastMonthListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/record/monthly.ts b/src/rest/api/v2010/account/usage/record/monthly.ts index 9269a68c18..49844f746a 100644 --- a/src/rest/api/v2010/account/usage/record/monthly.ts +++ b/src/rest/api/v2010/account/usage/record/monthly.ts @@ -460,6 +460,7 @@ export function MonthlyListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/record/thisMonth.ts b/src/rest/api/v2010/account/usage/record/thisMonth.ts index a5c94bd323..e23c76eb55 100644 --- a/src/rest/api/v2010/account/usage/record/thisMonth.ts +++ b/src/rest/api/v2010/account/usage/record/thisMonth.ts @@ -460,6 +460,7 @@ export function ThisMonthListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/record/today.ts b/src/rest/api/v2010/account/usage/record/today.ts index ce75c93398..dcf0d16d9c 100644 --- a/src/rest/api/v2010/account/usage/record/today.ts +++ b/src/rest/api/v2010/account/usage/record/today.ts @@ -460,6 +460,7 @@ export function TodayListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/record/yearly.ts b/src/rest/api/v2010/account/usage/record/yearly.ts index 9cec444aca..a03ebb1427 100644 --- a/src/rest/api/v2010/account/usage/record/yearly.ts +++ b/src/rest/api/v2010/account/usage/record/yearly.ts @@ -460,6 +460,7 @@ export function YearlyListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/record/yesterday.ts b/src/rest/api/v2010/account/usage/record/yesterday.ts index 1074cd1e5a..e741f03b88 100644 --- a/src/rest/api/v2010/account/usage/record/yesterday.ts +++ b/src/rest/api/v2010/account/usage/record/yesterday.ts @@ -460,6 +460,7 @@ export function YesterdayListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/usage/trigger.ts b/src/rest/api/v2010/account/usage/trigger.ts index 4c9549902c..aebd060abb 100644 --- a/src/rest/api/v2010/account/usage/trigger.ts +++ b/src/rest/api/v2010/account/usage/trigger.ts @@ -440,11 +440,14 @@ export class TriggerContextImpl implements TriggerContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -457,11 +460,15 @@ export class TriggerContextImpl implements TriggerContext { fetch( callback?: (error: Error | null, item?: TriggerInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -505,6 +512,7 @@ export class TriggerContextImpl implements TriggerContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -918,6 +926,7 @@ export function TriggerListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -970,6 +979,7 @@ export function TriggerListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/api/v2010/account/validationRequest.ts b/src/rest/api/v2010/account/validationRequest.ts index ee20c48db3..3ffc6311b7 100644 --- a/src/rest/api/v2010/account/validationRequest.ts +++ b/src/rest/api/v2010/account/validationRequest.ts @@ -107,6 +107,7 @@ export function ValidationRequestListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/assistants/v1/assistant.ts b/src/rest/assistants/v1/assistant.ts index a91708f73f..824bbc2b4a 100644 --- a/src/rest/assistants/v1/assistant.ts +++ b/src/rest/assistants/v1/assistant.ts @@ -25,7 +25,7 @@ import { FeedbackListInstance } from "./assistant/feedback"; import { MessageListInstance } from "./assistant/message"; export class AssistantsV1ServiceCreateAssistantRequest { - "customerAi"?: AssistantsV1ServiceCustomerAi; + "customer_ai"?: AssistantsV1ServiceCustomerAi; /** * The name of the assistant. */ @@ -37,19 +37,19 @@ export class AssistantsV1ServiceCreateAssistantRequest { /** * The personality prompt to be used for assistant. */ - "personalityPrompt"?: string; - "segmentCredential"?: AssistantsV1ServiceSegmentCredential; + "personality_prompt"?: string; + "segment_credential"?: AssistantsV1ServiceSegmentCredential; } export class AssistantsV1ServiceCustomerAi { /** * True if the perception engine is enabled. */ - "perceptionEngineEnabled": boolean; + "perception_engine_enabled": boolean; /** * True if the personalization engine is enabled. */ - "personalizationEngineEnabled": boolean; + "personalization_engine_enabled": boolean; } export class AssistantsV1ServiceKnowledge { @@ -64,11 +64,11 @@ export class AssistantsV1ServiceKnowledge { /** * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Knowledge resource. */ - "accountSid"?: string; + "account_sid"?: string; /** * The details of the knowledge source based on the type. */ - "knowledgeSourceDetails"?: Record; + "knowledge_source_details"?: Record; /** * The name of the knowledge source. */ @@ -88,33 +88,33 @@ export class AssistantsV1ServiceKnowledge { /** * The date and time in GMT when the Knowledge was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ - "dateCreated"?: Date; + "date_created"?: Date; /** * The date and time in GMT when the Knowledge was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ - "dateUpdated"?: Date; + "date_updated"?: Date; } export class AssistantsV1ServiceSegmentCredential { /** * The profile API key. */ - "profileApiKey"?: string; + "profile_api_key"?: string; /** * The space ID. */ - "spaceId"?: string; + "space_id"?: string; /** * The write key. */ - "writeKey"?: string; + "write_key"?: string; } export class AssistantsV1ServiceTool { /** * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tool resource. */ - "accountSid"?: string; + "account_sid"?: string; /** * The description of the tool. */ @@ -138,7 +138,7 @@ export class AssistantsV1ServiceTool { /** * The authentication requirement for the tool. */ - "requiresAuth": boolean; + "requires_auth": boolean; /** * The type of the tool. (\'WEBHOOK\') */ @@ -150,15 +150,15 @@ export class AssistantsV1ServiceTool { /** * The date and time in GMT when the Tool was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ - "dateCreated": Date; + "date_created": Date; /** * The date and time in GMT when the Tool was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ - "dateUpdated": Date; + "date_updated": Date; } export class AssistantsV1ServiceUpdateAssistantRequest { - "customerAi"?: AssistantsV1ServiceCustomerAi; + "customer_ai"?: AssistantsV1ServiceCustomerAi; /** * The name of the assistant. */ @@ -170,8 +170,8 @@ export class AssistantsV1ServiceUpdateAssistantRequest { /** * The personality prompt to be used for assistant. */ - "personalityPrompt"?: string; - "segmentCredential"?: AssistantsV1ServiceSegmentCredential; + "personality_prompt"?: string; + "segment_credential"?: AssistantsV1ServiceSegmentCredential; } /** @@ -267,12 +267,14 @@ export interface AssistantContext { * Update a AssistantInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed AssistantInstance */ update( params: AssistantsV1ServiceUpdateAssistantRequest, + headers?: any, callback?: (error: Error | null, item?: AssistantInstance) => any ): Promise; @@ -334,11 +336,14 @@ export class AssistantContextImpl implements AssistantContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -351,11 +356,15 @@ export class AssistantContextImpl implements AssistantContext { fetch( callback?: (error: Error | null, item?: AssistantInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -374,6 +383,7 @@ export class AssistantContextImpl implements AssistantContext { params?: | AssistantsV1ServiceUpdateAssistantRequest | ((error: Error | null, item?: AssistantInstance) => any), + headers?: any, callback?: (error: Error | null, item?: AssistantInstance) => any ): Promise { if (params instanceof Function) { @@ -387,8 +397,12 @@ export class AssistantContextImpl implements AssistantContext { data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -561,12 +575,14 @@ export class AssistantInstance { * Update a AssistantInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed AssistantInstance */ update( params: AssistantsV1ServiceUpdateAssistantRequest, + headers?: any, callback?: (error: Error | null, item?: AssistantInstance) => any ): Promise; @@ -646,12 +662,14 @@ export interface AssistantListInstance { * Create a AssistantInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed AssistantInstance */ create( params: AssistantsV1ServiceCreateAssistantRequest, + headers?: any, callback?: (error: Error | null, item?: AssistantInstance) => any ): Promise; @@ -744,6 +762,7 @@ export function AssistantListInstance(version: V1): AssistantListInstance { instance.create = function create( params: AssistantsV1ServiceCreateAssistantRequest, + headers?: any, callback?: (error: Error | null, items: AssistantInstance) => any ): Promise { if (params === null || params === undefined) { @@ -754,8 +773,12 @@ export function AssistantListInstance(version: V1): AssistantListInstance { data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -797,6 +820,7 @@ export function AssistantListInstance(version: V1): AssistantListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/assistants/v1/assistant/assistantsKnowledge.ts b/src/rest/assistants/v1/assistant/assistantsKnowledge.ts index 479b23a4f5..ff61ff59b7 100644 --- a/src/rest/assistants/v1/assistant/assistantsKnowledge.ts +++ b/src/rest/assistants/v1/assistant/assistantsKnowledge.ts @@ -116,11 +116,14 @@ export class AssistantsKnowledgeContextImpl create( callback?: (error: Error | null, item?: AssistantsKnowledgeInstance) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.create({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( @@ -143,11 +146,14 @@ export class AssistantsKnowledgeContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -455,6 +461,7 @@ export function AssistantsKnowledgeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/assistants/v1/assistant/assistantsTool.ts b/src/rest/assistants/v1/assistant/assistantsTool.ts index 06b07c2c81..40b62d8e4a 100644 --- a/src/rest/assistants/v1/assistant/assistantsTool.ts +++ b/src/rest/assistants/v1/assistant/assistantsTool.ts @@ -114,11 +114,14 @@ export class AssistantsToolContextImpl implements AssistantsToolContext { create( callback?: (error: Error | null, item?: AssistantsToolInstance) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.create({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( @@ -141,11 +144,14 @@ export class AssistantsToolContextImpl implements AssistantsToolContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -453,6 +459,7 @@ export function AssistantsToolListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/assistants/v1/assistant/feedback.ts b/src/rest/assistants/v1/assistant/feedback.ts index 69ac4103f6..d9601d7cf3 100644 --- a/src/rest/assistants/v1/assistant/feedback.ts +++ b/src/rest/assistants/v1/assistant/feedback.ts @@ -24,7 +24,7 @@ export class AssistantsV1ServiceCreateFeedbackRequest { /** * The message ID. */ - "messageId"?: string; + "message_id"?: string; /** * The score to be given(0-1). */ @@ -32,7 +32,7 @@ export class AssistantsV1ServiceCreateFeedbackRequest { /** * The Session ID. */ - "sessionId": string; + "session_id": string; /** * The text to be given as feedback. */ @@ -95,12 +95,14 @@ export interface FeedbackListInstance { * Create a FeedbackInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed FeedbackInstance */ create( params: AssistantsV1ServiceCreateFeedbackRequest, + headers?: any, callback?: (error: Error | null, item?: FeedbackInstance) => any ): Promise; @@ -196,6 +198,7 @@ export function FeedbackListInstance( instance.create = function create( params: AssistantsV1ServiceCreateFeedbackRequest, + headers?: any, callback?: (error: Error | null, items: FeedbackInstance) => any ): Promise { if (params === null || params === undefined) { @@ -206,8 +209,12 @@ export function FeedbackListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -250,6 +257,7 @@ export function FeedbackListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/assistants/v1/assistant/message.ts b/src/rest/assistants/v1/assistant/message.ts index a5d215ab6c..ccd48baf98 100644 --- a/src/rest/assistants/v1/assistant/message.ts +++ b/src/rest/assistants/v1/assistant/message.ts @@ -26,7 +26,7 @@ export class AssistantsV1ServiceAssistantSendMessageRequest { /** * The unique name for the session. */ - "sessionId"?: string; + "session_id"?: string; /** * The query to ask the assistant. */ @@ -62,12 +62,14 @@ export interface MessageListInstance { * Create a MessageInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed MessageInstance */ create( params: AssistantsV1ServiceAssistantSendMessageRequest, + headers?: any, callback?: (error: Error | null, item?: MessageInstance) => any ): Promise; @@ -94,6 +96,7 @@ export function MessageListInstance( instance.create = function create( params: AssistantsV1ServiceAssistantSendMessageRequest, + headers?: any, callback?: (error: Error | null, items: MessageInstance) => any ): Promise { if (params === null || params === undefined) { @@ -104,8 +107,12 @@ export function MessageListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/assistants/v1/knowledge.ts b/src/rest/assistants/v1/knowledge.ts index a76ce5acea..9a2554030d 100644 --- a/src/rest/assistants/v1/knowledge.ts +++ b/src/rest/assistants/v1/knowledge.ts @@ -26,7 +26,7 @@ export class AssistantsV1ServiceCreateKnowledgeRequest { /** * The Assistant ID. */ - "assistantId"?: string; + "assistant_id"?: string; /** * The description of the knowledge source. */ @@ -34,7 +34,7 @@ export class AssistantsV1ServiceCreateKnowledgeRequest { /** * The details of the knowledge source based on the type. */ - "knowledgeSourceDetails"?: Record; + "knowledge_source_details"?: Record; /** * The name of the tool. */ @@ -59,7 +59,7 @@ export class AssistantsV1ServiceCreatePolicyRequest { * The name of the policy. */ "name"?: string; - "policyDetails": any | null; + "policy_details": any | null; /** * The description of the policy. */ @@ -74,7 +74,7 @@ export class AssistantsV1ServiceUpdateKnowledgeRequest { /** * The details of the knowledge source based on the type. */ - "knowledgeSourceDetails"?: Record; + "knowledge_source_details"?: Record; /** * The name of the knowledge source. */ @@ -183,12 +183,14 @@ export interface KnowledgeContext { * Update a KnowledgeInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed KnowledgeInstance */ update( params: AssistantsV1ServiceUpdateKnowledgeRequest, + headers?: any, callback?: (error: Error | null, item?: KnowledgeInstance) => any ): Promise; @@ -235,11 +237,14 @@ export class KnowledgeContextImpl implements KnowledgeContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -252,11 +257,15 @@ export class KnowledgeContextImpl implements KnowledgeContext { fetch( callback?: (error: Error | null, item?: KnowledgeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -275,6 +284,7 @@ export class KnowledgeContextImpl implements KnowledgeContext { params?: | AssistantsV1ServiceUpdateKnowledgeRequest | ((error: Error | null, item?: KnowledgeInstance) => any), + headers?: any, callback?: (error: Error | null, item?: KnowledgeInstance) => any ): Promise { if (params instanceof Function) { @@ -288,8 +298,12 @@ export class KnowledgeContextImpl implements KnowledgeContext { data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -450,12 +464,14 @@ export class KnowledgeInstance { * Update a KnowledgeInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed KnowledgeInstance */ update( params: AssistantsV1ServiceUpdateKnowledgeRequest, + headers?: any, callback?: (error: Error | null, item?: KnowledgeInstance) => any ): Promise; @@ -519,12 +535,14 @@ export interface KnowledgeListInstance { * Create a KnowledgeInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed KnowledgeInstance */ create( params: AssistantsV1ServiceCreateKnowledgeRequest, + headers?: any, callback?: (error: Error | null, item?: KnowledgeInstance) => any ): Promise; @@ -617,6 +635,7 @@ export function KnowledgeListInstance(version: V1): KnowledgeListInstance { instance.create = function create( params: AssistantsV1ServiceCreateKnowledgeRequest, + headers?: any, callback?: (error: Error | null, items: KnowledgeInstance) => any ): Promise { if (params === null || params === undefined) { @@ -627,8 +646,12 @@ export function KnowledgeListInstance(version: V1): KnowledgeListInstance { data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -672,6 +695,7 @@ export function KnowledgeListInstance(version: V1): KnowledgeListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/assistants/v1/knowledge/chunk.ts b/src/rest/assistants/v1/knowledge/chunk.ts index 02e711ed0e..14a07b88b1 100644 --- a/src/rest/assistants/v1/knowledge/chunk.ts +++ b/src/rest/assistants/v1/knowledge/chunk.ts @@ -173,6 +173,7 @@ export function ChunkListInstance(version: V1, id: string): ChunkListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/assistants/v1/knowledge/knowledgeStatus.ts b/src/rest/assistants/v1/knowledge/knowledgeStatus.ts index fca17d129a..66d8006cff 100644 --- a/src/rest/assistants/v1/knowledge/knowledgeStatus.ts +++ b/src/rest/assistants/v1/knowledge/knowledgeStatus.ts @@ -57,11 +57,15 @@ export class KnowledgeStatusContextImpl implements KnowledgeStatusContext { fetch( callback?: (error: Error | null, item?: KnowledgeStatusInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/assistants/v1/policy.ts b/src/rest/assistants/v1/policy.ts index 9ec20669a9..ca2d2b9866 100644 --- a/src/rest/assistants/v1/policy.ts +++ b/src/rest/assistants/v1/policy.ts @@ -182,6 +182,7 @@ export function PolicyListInstance(version: V1): PolicyListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/assistants/v1/session.ts b/src/rest/assistants/v1/session.ts index 8e98f8df6d..3c2cb97413 100644 --- a/src/rest/assistants/v1/session.ts +++ b/src/rest/assistants/v1/session.ts @@ -106,11 +106,15 @@ export class SessionContextImpl implements SessionContext { fetch( callback?: (error: Error | null, item?: SessionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -364,6 +368,7 @@ export function SessionListInstance(version: V1): SessionListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/assistants/v1/session/message.ts b/src/rest/assistants/v1/session/message.ts index 9d56bcc4a5..824400a0bb 100644 --- a/src/rest/assistants/v1/session/message.ts +++ b/src/rest/assistants/v1/session/message.ts @@ -176,6 +176,7 @@ export function MessageListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/assistants/v1/tool.ts b/src/rest/assistants/v1/tool.ts index 468341f655..24a13cb129 100644 --- a/src/rest/assistants/v1/tool.ts +++ b/src/rest/assistants/v1/tool.ts @@ -33,7 +33,7 @@ export class AssistantsV1ServiceCreatePolicyRequest { * The name of the policy. */ "name"?: string; - "policyDetails": any | null; + "policy_details": any | null; /** * The description of the policy. */ @@ -44,7 +44,7 @@ export class AssistantsV1ServiceCreateToolRequest { /** * The Assistant ID. */ - "assistantId"?: string; + "assistant_id"?: string; /** * The description of the tool. */ @@ -84,11 +84,11 @@ export class AssistantsV1ServicePolicy { /** * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Policy resource. */ - "accountSid"?: string; + "account_sid"?: string; /** * The SID of the User that created the Policy resource. */ - "userSid"?: string; + "user_sid"?: string; /** * The type of the policy. */ @@ -96,22 +96,22 @@ export class AssistantsV1ServicePolicy { /** * The details of the policy based on the type. */ - "policyDetails": Record; + "policy_details": Record; /** * The date and time in GMT when the Policy was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ - "dateCreated"?: Date; + "date_created"?: Date; /** * The date and time in GMT when the Policy was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ - "dateUpdated"?: Date; + "date_updated"?: Date; } export class AssistantsV1ServiceUpdateToolRequest { /** * The Assistant ID. */ - "assistantId"?: string; + "assistant_id"?: string; /** * The description of the tool. */ @@ -229,12 +229,14 @@ export interface ToolContext { * Update a ToolInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed ToolInstance */ update( params: AssistantsV1ServiceUpdateToolRequest, + headers?: any, callback?: (error: Error | null, item?: ToolInstance) => any ): Promise; @@ -265,11 +267,14 @@ export class ToolContextImpl implements ToolContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -282,11 +287,15 @@ export class ToolContextImpl implements ToolContext { fetch( callback?: (error: Error | null, item?: ToolInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -305,6 +314,7 @@ export class ToolContextImpl implements ToolContext { params?: | AssistantsV1ServiceUpdateToolRequest | ((error: Error | null, item?: ToolInstance) => any), + headers?: any, callback?: (error: Error | null, item?: ToolInstance) => any ): Promise { if (params instanceof Function) { @@ -318,8 +328,12 @@ export class ToolContextImpl implements ToolContext { data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -491,12 +505,14 @@ export class ToolInstance { * Update a ToolInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed ToolInstance */ update( params: AssistantsV1ServiceUpdateToolRequest, + headers?: any, callback?: (error: Error | null, item?: ToolInstance) => any ): Promise; @@ -548,12 +564,14 @@ export interface ToolListInstance { * Create a ToolInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed ToolInstance */ create( params: AssistantsV1ServiceCreateToolRequest, + headers?: any, callback?: (error: Error | null, item?: ToolInstance) => any ): Promise; @@ -646,6 +664,7 @@ export function ToolListInstance(version: V1): ToolListInstance { instance.create = function create( params: AssistantsV1ServiceCreateToolRequest, + headers?: any, callback?: (error: Error | null, items: ToolInstance) => any ): Promise { if (params === null || params === undefined) { @@ -656,8 +675,12 @@ export function ToolListInstance(version: V1): ToolListInstance { data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -701,6 +724,7 @@ export function ToolListInstance(version: V1): ToolListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/bulkexports/v1/export.ts b/src/rest/bulkexports/v1/export.ts index a34eaaaa50..7bb684a7dd 100644 --- a/src/rest/bulkexports/v1/export.ts +++ b/src/rest/bulkexports/v1/export.ts @@ -79,11 +79,15 @@ export class ExportContextImpl implements ExportContext { fetch( callback?: (error: Error | null, item?: ExportInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/bulkexports/v1/export/day.ts b/src/rest/bulkexports/v1/export/day.ts index e7850cea66..fb5938f055 100644 --- a/src/rest/bulkexports/v1/export/day.ts +++ b/src/rest/bulkexports/v1/export/day.ts @@ -100,11 +100,15 @@ export class DayContextImpl implements DayContext { fetch( callback?: (error: Error | null, item?: DayInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -365,6 +369,7 @@ export function DayListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/bulkexports/v1/export/exportCustomJob.ts b/src/rest/bulkexports/v1/export/exportCustomJob.ts index a5eff26fff..74ad6b997c 100644 --- a/src/rest/bulkexports/v1/export/exportCustomJob.ts +++ b/src/rest/bulkexports/v1/export/exportCustomJob.ts @@ -232,6 +232,7 @@ export function ExportCustomJobListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -278,6 +279,7 @@ export function ExportCustomJobListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/bulkexports/v1/export/job.ts b/src/rest/bulkexports/v1/export/job.ts index 247b41d2c7..599a5558b5 100644 --- a/src/rest/bulkexports/v1/export/job.ts +++ b/src/rest/bulkexports/v1/export/job.ts @@ -68,11 +68,14 @@ export class JobContextImpl implements JobContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -85,11 +88,15 @@ export class JobContextImpl implements JobContext { fetch( callback?: (error: Error | null, item?: JobInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/bulkexports/v1/exportConfiguration.ts b/src/rest/bulkexports/v1/exportConfiguration.ts index d4c3c8622d..4b869b5e8d 100644 --- a/src/rest/bulkexports/v1/exportConfiguration.ts +++ b/src/rest/bulkexports/v1/exportConfiguration.ts @@ -94,11 +94,15 @@ export class ExportConfigurationContextImpl fetch( callback?: (error: Error | null, item?: ExportConfigurationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -141,6 +145,7 @@ export class ExportConfigurationContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/chat/v1/credential.ts b/src/rest/chat/v1/credential.ts index ec5f31c03d..46312768a7 100644 --- a/src/rest/chat/v1/credential.ts +++ b/src/rest/chat/v1/credential.ts @@ -168,11 +168,14 @@ export class CredentialContextImpl implements CredentialContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -185,11 +188,15 @@ export class CredentialContextImpl implements CredentialContext { fetch( callback?: (error: Error | null, item?: CredentialInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -236,6 +243,7 @@ export class CredentialContextImpl implements CredentialContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -566,6 +574,7 @@ export function CredentialListInstance(version: V1): CredentialListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -607,6 +616,7 @@ export function CredentialListInstance(version: V1): CredentialListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v1/service.ts b/src/rest/chat/v1/service.ts index a71155973c..023ca09190 100644 --- a/src/rest/chat/v1/service.ts +++ b/src/rest/chat/v1/service.ts @@ -279,11 +279,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -296,11 +299,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -486,6 +493,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -921,6 +929,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -962,6 +971,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v1/service/channel.ts b/src/rest/chat/v1/service/channel.ts index d639e7b0aa..004e23b474 100644 --- a/src/rest/chat/v1/service/channel.ts +++ b/src/rest/chat/v1/service/channel.ts @@ -211,11 +211,14 @@ export class ChannelContextImpl implements ChannelContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -228,11 +231,15 @@ export class ChannelContextImpl implements ChannelContext { fetch( callback?: (error: Error | null, item?: ChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -276,6 +283,7 @@ export class ChannelContextImpl implements ChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -691,6 +699,7 @@ export function ChannelListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -742,6 +751,7 @@ export function ChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v1/service/channel/invite.ts b/src/rest/chat/v1/service/channel/invite.ts index d8f2fd5225..da419c4c44 100644 --- a/src/rest/chat/v1/service/channel/invite.ts +++ b/src/rest/chat/v1/service/channel/invite.ts @@ -136,11 +136,14 @@ export class InviteContextImpl implements InviteContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -153,11 +156,15 @@ export class InviteContextImpl implements InviteContext { fetch( callback?: (error: Error | null, item?: InviteInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -482,6 +489,7 @@ export function InviteListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -531,6 +539,7 @@ export function InviteListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v1/service/channel/member.ts b/src/rest/chat/v1/service/channel/member.ts index c2b5084066..b517dbd6ff 100644 --- a/src/rest/chat/v1/service/channel/member.ts +++ b/src/rest/chat/v1/service/channel/member.ts @@ -169,11 +169,14 @@ export class MemberContextImpl implements MemberContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -186,11 +189,15 @@ export class MemberContextImpl implements MemberContext { fetch( callback?: (error: Error | null, item?: MemberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -232,6 +239,7 @@ export class MemberContextImpl implements MemberContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -605,6 +613,7 @@ export function MemberListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -654,6 +663,7 @@ export function MemberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v1/service/channel/message.ts b/src/rest/chat/v1/service/channel/message.ts index e02134a132..0fbaf6a065 100644 --- a/src/rest/chat/v1/service/channel/message.ts +++ b/src/rest/chat/v1/service/channel/message.ts @@ -173,11 +173,14 @@ export class MessageContextImpl implements MessageContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -190,11 +193,15 @@ export class MessageContextImpl implements MessageContext { fetch( callback?: (error: Error | null, item?: MessageInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -236,6 +243,7 @@ export class MessageContextImpl implements MessageContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -621,6 +629,7 @@ export function MessageListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -669,6 +678,7 @@ export function MessageListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v1/service/role.ts b/src/rest/chat/v1/service/role.ts index 0499bc9462..ec72bcfd3b 100644 --- a/src/rest/chat/v1/service/role.ts +++ b/src/rest/chat/v1/service/role.ts @@ -145,11 +145,14 @@ export class RoleContextImpl implements RoleContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -162,11 +165,15 @@ export class RoleContextImpl implements RoleContext { fetch( callback?: (error: Error | null, item?: RoleInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -204,6 +211,7 @@ export class RoleContextImpl implements RoleContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -551,6 +559,7 @@ export function RoleListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -597,6 +606,7 @@ export function RoleListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v1/service/user.ts b/src/rest/chat/v1/service/user.ts index 71927be25a..c6fcd05c32 100644 --- a/src/rest/chat/v1/service/user.ts +++ b/src/rest/chat/v1/service/user.ts @@ -175,11 +175,14 @@ export class UserContextImpl implements UserContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -192,11 +195,15 @@ export class UserContextImpl implements UserContext { fetch( callback?: (error: Error | null, item?: UserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -239,6 +246,7 @@ export class UserContextImpl implements UserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -633,6 +641,7 @@ export function UserListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -679,6 +688,7 @@ export function UserListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v1/service/user/userChannel.ts b/src/rest/chat/v1/service/user/userChannel.ts index fff619a2b1..410c5fd469 100644 --- a/src/rest/chat/v1/service/user/userChannel.ts +++ b/src/rest/chat/v1/service/user/userChannel.ts @@ -187,6 +187,7 @@ export function UserChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/credential.ts b/src/rest/chat/v2/credential.ts index 2a00989633..b5edefbb86 100644 --- a/src/rest/chat/v2/credential.ts +++ b/src/rest/chat/v2/credential.ts @@ -168,11 +168,14 @@ export class CredentialContextImpl implements CredentialContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -185,11 +188,15 @@ export class CredentialContextImpl implements CredentialContext { fetch( callback?: (error: Error | null, item?: CredentialInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -236,6 +243,7 @@ export class CredentialContextImpl implements CredentialContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -566,6 +574,7 @@ export function CredentialListInstance(version: V2): CredentialListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -607,6 +616,7 @@ export function CredentialListInstance(version: V2): CredentialListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service.ts b/src/rest/chat/v2/service.ts index 9f06bac58d..0fddb09d1b 100644 --- a/src/rest/chat/v2/service.ts +++ b/src/rest/chat/v2/service.ts @@ -242,11 +242,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -259,11 +262,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -384,6 +391,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -844,6 +852,7 @@ export function ServiceListInstance(version: V2): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -885,6 +894,7 @@ export function ServiceListInstance(version: V2): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/binding.ts b/src/rest/chat/v2/service/binding.ts index 79b3ed2226..a7a5f43d52 100644 --- a/src/rest/chat/v2/service/binding.ts +++ b/src/rest/chat/v2/service/binding.ts @@ -125,11 +125,14 @@ export class BindingContextImpl implements BindingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -142,11 +145,15 @@ export class BindingContextImpl implements BindingContext { fetch( callback?: (error: Error | null, item?: BindingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -469,6 +476,7 @@ export function BindingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/channel.ts b/src/rest/chat/v2/service/channel.ts index 9f205d865e..9bdf394624 100644 --- a/src/rest/chat/v2/service/channel.ts +++ b/src/rest/chat/v2/service/channel.ts @@ -298,11 +298,15 @@ export class ChannelContextImpl implements ChannelContext { fetch( callback?: (error: Error | null, item?: ChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -352,6 +356,7 @@ export class ChannelContextImpl implements ChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -799,6 +804,7 @@ export function ChannelListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -852,6 +858,7 @@ export function ChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/channel/invite.ts b/src/rest/chat/v2/service/channel/invite.ts index b37ca549b3..96b8bb7bc8 100644 --- a/src/rest/chat/v2/service/channel/invite.ts +++ b/src/rest/chat/v2/service/channel/invite.ts @@ -136,11 +136,14 @@ export class InviteContextImpl implements InviteContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -153,11 +156,15 @@ export class InviteContextImpl implements InviteContext { fetch( callback?: (error: Error | null, item?: InviteInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -482,6 +489,7 @@ export function InviteListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -531,6 +539,7 @@ export function InviteListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/channel/member.ts b/src/rest/chat/v2/service/channel/member.ts index 74e67f8d12..40f72947de 100644 --- a/src/rest/chat/v2/service/channel/member.ts +++ b/src/rest/chat/v2/service/channel/member.ts @@ -248,11 +248,15 @@ export class MemberContextImpl implements MemberContext { fetch( callback?: (error: Error | null, item?: MemberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -304,6 +308,7 @@ export class MemberContextImpl implements MemberContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -715,6 +720,7 @@ export function MemberListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -766,6 +772,7 @@ export function MemberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/channel/message.ts b/src/rest/chat/v2/service/channel/message.ts index 7a6449c636..e14658621c 100644 --- a/src/rest/chat/v2/service/channel/message.ts +++ b/src/rest/chat/v2/service/channel/message.ts @@ -250,11 +250,15 @@ export class MessageContextImpl implements MessageContext { fetch( callback?: (error: Error | null, item?: MessageInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -303,6 +307,7 @@ export class MessageContextImpl implements MessageContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -746,6 +751,7 @@ export function MessageListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -796,6 +802,7 @@ export function MessageListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/channel/webhook.ts b/src/rest/chat/v2/service/channel/webhook.ts index 84dd39dcbd..41c882d051 100644 --- a/src/rest/chat/v2/service/channel/webhook.ts +++ b/src/rest/chat/v2/service/channel/webhook.ts @@ -185,11 +185,14 @@ export class WebhookContextImpl implements WebhookContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -202,11 +205,15 @@ export class WebhookContextImpl implements WebhookContext { fetch( callback?: (error: Error | null, item?: WebhookInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -263,6 +270,7 @@ export class WebhookContextImpl implements WebhookContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -635,6 +643,7 @@ export function WebhookListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -682,6 +691,7 @@ export function WebhookListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/role.ts b/src/rest/chat/v2/service/role.ts index a6c5739c05..cc126ce572 100644 --- a/src/rest/chat/v2/service/role.ts +++ b/src/rest/chat/v2/service/role.ts @@ -145,11 +145,14 @@ export class RoleContextImpl implements RoleContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -162,11 +165,15 @@ export class RoleContextImpl implements RoleContext { fetch( callback?: (error: Error | null, item?: RoleInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -204,6 +211,7 @@ export class RoleContextImpl implements RoleContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -551,6 +559,7 @@ export function RoleListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -597,6 +606,7 @@ export function RoleListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/user.ts b/src/rest/chat/v2/service/user.ts index 33d65b1c29..cd76015023 100644 --- a/src/rest/chat/v2/service/user.ts +++ b/src/rest/chat/v2/service/user.ts @@ -195,11 +195,14 @@ export class UserContextImpl implements UserContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -212,11 +215,15 @@ export class UserContextImpl implements UserContext { fetch( callback?: (error: Error | null, item?: UserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -259,6 +266,7 @@ export class UserContextImpl implements UserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -662,6 +670,7 @@ export function UserListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -710,6 +719,7 @@ export function UserListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/user/userBinding.ts b/src/rest/chat/v2/service/user/userBinding.ts index e72fe78eac..bfd8917111 100644 --- a/src/rest/chat/v2/service/user/userBinding.ts +++ b/src/rest/chat/v2/service/user/userBinding.ts @@ -129,11 +129,14 @@ export class UserBindingContextImpl implements UserBindingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -146,11 +149,15 @@ export class UserBindingContextImpl implements UserBindingContext { fetch( callback?: (error: Error | null, item?: UserBindingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -480,6 +487,7 @@ export function UserBindingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v2/service/user/userChannel.ts b/src/rest/chat/v2/service/user/userChannel.ts index 98c7a8b0fa..d80b519bef 100644 --- a/src/rest/chat/v2/service/user/userChannel.ts +++ b/src/rest/chat/v2/service/user/userChannel.ts @@ -219,11 +219,15 @@ export class UserChannelContextImpl implements UserChannelContext { fetch( callback?: (error: Error | null, item?: UserChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -270,6 +274,7 @@ export class UserChannelContextImpl implements UserChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -648,6 +653,7 @@ export function UserChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/chat/v3/channel.ts b/src/rest/chat/v3/channel.ts index be4ee609da..f02494598e 100644 --- a/src/rest/chat/v3/channel.ts +++ b/src/rest/chat/v3/channel.ts @@ -108,6 +108,7 @@ export class ChannelContextImpl implements ChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; diff --git a/src/rest/content/v1/content.ts b/src/rest/content/v1/content.ts index b3a8eed12f..25f2835cca 100644 --- a/src/rest/content/v1/content.ts +++ b/src/rest/content/v1/content.ts @@ -24,7 +24,7 @@ import { ApprovalFetchListInstance } from "./content/approvalFetch"; export class AuthenticationAction { "type": AuthenticationActionType; - "copyCodeText": string; + "copy_code_text": string; } export type AuthenticationActionType = "COPY_CODE"; @@ -79,9 +79,9 @@ export class CarouselCard { export class CatalogItem { "id"?: string; - "sectionTitle"?: string; + "section_title"?: string; "name"?: string; - "mediaUrl"?: string; + "media_url"?: string; "price"?: number; "description"?: string; } @@ -93,7 +93,7 @@ export class ContentCreateRequest { /** * User defined name of the content */ - "friendlyName"?: string; + "friendly_name"?: string; /** * Key value pairs of variable name to value */ @@ -107,7 +107,7 @@ export class ContentCreateRequest { export class FlowsPage { "id": string; - "nextPageId"?: string; + "next_page_id"?: string; "title"?: string; "subtitle"?: string; "layout": Array; @@ -174,7 +174,7 @@ export class TwilioCatalog { "subtitle"?: string; "id"?: string; "items"?: Array; - "dynamicItems"?: string; + "dynamic_items"?: string; } /** @@ -182,9 +182,9 @@ export class TwilioCatalog { */ export class TwilioFlows { "body": string; - "buttonText": string; + "button_text": string; "subtitle": string; - "mediaUrl": string; + "media_url": string; "pages": Array; "type": string; } @@ -234,26 +234,26 @@ export class TwilioText { * Content types */ export class Types { - "twilioText"?: TwilioText | null; - "twilioMedia"?: TwilioMedia | null; - "twilioLocation"?: TwilioLocation | null; - "twilioListPicker"?: TwilioListPicker | null; - "twilioCallToAction"?: TwilioCallToAction | null; - "twilioQuickReply"?: TwilioQuickReply | null; - "twilioCard"?: TwilioCard | null; - "twilioCatalog"?: TwilioCatalog | null; - "twilioCarousel"?: TwilioCarousel | null; - "twilioFlows"?: TwilioFlows | null; - "whatsappCard"?: WhatsappCard | null; - "whatsappAuthentication"?: WhatsappAuthentication | null; + "twilio/text"?: TwilioText | null; + "twilio/media"?: TwilioMedia | null; + "twilio/location"?: TwilioLocation | null; + "twilio/list-picker"?: TwilioListPicker | null; + "twilio/call-to-action"?: TwilioCallToAction | null; + "twilio/quick-reply"?: TwilioQuickReply | null; + "twilio/card"?: TwilioCard | null; + "twilio/catalog"?: TwilioCatalog | null; + "twilio/carousel"?: TwilioCarousel | null; + "twilio/flows"?: TwilioFlows | null; + "whatsapp/card"?: WhatsappCard | null; + "whatsapp/authentication"?: WhatsappAuthentication | null; } /** * whatsApp/authentication templates let companies deliver WA approved one-time-password button. */ export class WhatsappAuthentication { - "addSecurityRecommendation"?: boolean; - "codeExpirationMinutes"?: number; + "add_security_recommendation"?: boolean; + "code_expiration_minutes"?: number; "actions": Array; } @@ -264,7 +264,7 @@ export class WhatsappCard { "body": string; "footer"?: string; "media"?: Array; - "headerText"?: string; + "header_text"?: string; "actions"?: Array; } @@ -381,11 +381,14 @@ export class ContentContextImpl implements ContentContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -398,11 +401,15 @@ export class ContentContextImpl implements ContentContext { fetch( callback?: (error: Error | null, item?: ContentInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -594,12 +601,14 @@ export interface ContentListInstance { * Create a ContentInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed ContentInstance */ create( params: ContentCreateRequest, + headers?: any, callback?: (error: Error | null, item?: ContentInstance) => any ): Promise; @@ -692,6 +701,7 @@ export function ContentListInstance(version: V1): ContentListInstance { instance.create = function create( params: ContentCreateRequest, + headers?: any, callback?: (error: Error | null, items: ContentInstance) => any ): Promise { if (params === null || params === undefined) { @@ -702,8 +712,12 @@ export function ContentListInstance(version: V1): ContentListInstance { data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -745,6 +759,7 @@ export function ContentListInstance(version: V1): ContentListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/content/v1/content/approvalCreate.ts b/src/rest/content/v1/content/approvalCreate.ts index 357aee4331..5a3b7a2220 100644 --- a/src/rest/content/v1/content/approvalCreate.ts +++ b/src/rest/content/v1/content/approvalCreate.ts @@ -53,12 +53,14 @@ export interface ApprovalCreateListInstance { * Create a ApprovalCreateInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed ApprovalCreateInstance */ create( params: ContentApprovalRequest, + headers?: any, callback?: (error: Error | null, item?: ApprovalCreateInstance) => any ): Promise; @@ -85,6 +87,7 @@ export function ApprovalCreateListInstance( instance.create = function create( params: ContentApprovalRequest, + headers?: any, callback?: (error: Error | null, items: ApprovalCreateInstance) => any ): Promise { if (params === null || params === undefined) { @@ -95,8 +98,12 @@ export function ApprovalCreateListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/content/v1/content/approvalFetch.ts b/src/rest/content/v1/content/approvalFetch.ts index 63f7161ea3..7f78ec6371 100644 --- a/src/rest/content/v1/content/approvalFetch.ts +++ b/src/rest/content/v1/content/approvalFetch.ts @@ -57,11 +57,15 @@ export class ApprovalFetchContextImpl implements ApprovalFetchContext { fetch( callback?: (error: Error | null, item?: ApprovalFetchInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/content/v1/contentAndApprovals.ts b/src/rest/content/v1/contentAndApprovals.ts index ae91780152..5eccc10981 100644 --- a/src/rest/content/v1/contentAndApprovals.ts +++ b/src/rest/content/v1/contentAndApprovals.ts @@ -184,6 +184,7 @@ export function ContentAndApprovalsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/content/v1/legacyContent.ts b/src/rest/content/v1/legacyContent.ts index 343e0204af..d276f44b3f 100644 --- a/src/rest/content/v1/legacyContent.ts +++ b/src/rest/content/v1/legacyContent.ts @@ -175,6 +175,7 @@ export function LegacyContentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/content/v2/content.ts b/src/rest/content/v2/content.ts index 2120b44ddc..f63c693ba5 100644 --- a/src/rest/content/v2/content.ts +++ b/src/rest/content/v2/content.ts @@ -248,6 +248,7 @@ export function ContentListInstance(version: V2): ContentListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/content/v2/contentAndApprovals.ts b/src/rest/content/v2/contentAndApprovals.ts index afc9ded69f..f7dd4da777 100644 --- a/src/rest/content/v2/contentAndApprovals.ts +++ b/src/rest/content/v2/contentAndApprovals.ts @@ -265,6 +265,7 @@ export function ContentAndApprovalsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/addressConfiguration.ts b/src/rest/conversations/v1/addressConfiguration.ts index 3b2419f9a2..58b6766b6c 100644 --- a/src/rest/conversations/v1/addressConfiguration.ts +++ b/src/rest/conversations/v1/addressConfiguration.ts @@ -207,11 +207,14 @@ export class AddressConfigurationContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -224,11 +227,15 @@ export class AddressConfigurationContextImpl fetch( callback?: (error: Error | null, item?: AddressConfigurationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -290,6 +297,7 @@ export class AddressConfigurationContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -675,6 +683,7 @@ export function AddressConfigurationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -717,6 +726,7 @@ export function AddressConfigurationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/configuration.ts b/src/rest/conversations/v1/configuration.ts index 166c4ed2e1..2877158294 100644 --- a/src/rest/conversations/v1/configuration.ts +++ b/src/rest/conversations/v1/configuration.ts @@ -89,11 +89,15 @@ export class ConfigurationContextImpl implements ConfigurationContext { fetch( callback?: (error: Error | null, item?: ConfigurationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -133,6 +137,7 @@ export class ConfigurationContextImpl implements ConfigurationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/conversations/v1/configuration/webhook.ts b/src/rest/conversations/v1/configuration/webhook.ts index 8270a1c54c..c87737cc93 100644 --- a/src/rest/conversations/v1/configuration/webhook.ts +++ b/src/rest/conversations/v1/configuration/webhook.ts @@ -94,11 +94,15 @@ export class WebhookContextImpl implements WebhookContext { fetch( callback?: (error: Error | null, item?: WebhookInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -138,6 +142,7 @@ export class WebhookContextImpl implements WebhookContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/conversations/v1/conversation.ts b/src/rest/conversations/v1/conversation.ts index 2e2b2b5afe..32999d03a6 100644 --- a/src/rest/conversations/v1/conversation.ts +++ b/src/rest/conversations/v1/conversation.ts @@ -295,11 +295,15 @@ export class ConversationContextImpl implements ConversationContext { fetch( callback?: (error: Error | null, item?: ConversationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -357,6 +361,7 @@ export class ConversationContextImpl implements ConversationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -789,6 +794,7 @@ export function ConversationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -836,6 +842,7 @@ export function ConversationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/conversation/message.ts b/src/rest/conversations/v1/conversation/message.ts index 9e080a014e..43ec2da473 100644 --- a/src/rest/conversations/v1/conversation/message.ts +++ b/src/rest/conversations/v1/conversation/message.ts @@ -260,11 +260,15 @@ export class MessageContextImpl implements MessageContext { fetch( callback?: (error: Error | null, item?: MessageInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -311,6 +315,7 @@ export class MessageContextImpl implements MessageContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -748,6 +753,7 @@ export function MessageListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -797,6 +803,7 @@ export function MessageListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/conversation/message/deliveryReceipt.ts b/src/rest/conversations/v1/conversation/message/deliveryReceipt.ts index b45c1f35e0..4ebc33e1dd 100644 --- a/src/rest/conversations/v1/conversation/message/deliveryReceipt.ts +++ b/src/rest/conversations/v1/conversation/message/deliveryReceipt.ts @@ -120,11 +120,15 @@ export class DeliveryReceiptContextImpl implements DeliveryReceiptContext { fetch( callback?: (error: Error | null, item?: DeliveryReceiptInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -440,6 +444,7 @@ export function DeliveryReceiptListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/conversation/participant.ts b/src/rest/conversations/v1/conversation/participant.ts index 3e7414519a..e647ff65be 100644 --- a/src/rest/conversations/v1/conversation/participant.ts +++ b/src/rest/conversations/v1/conversation/participant.ts @@ -240,11 +240,15 @@ export class ParticipantContextImpl implements ParticipantContext { fetch( callback?: (error: Error | null, item?: ParticipantInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -300,6 +304,7 @@ export class ParticipantContextImpl implements ParticipantContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -713,6 +718,7 @@ export function ParticipantListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -761,6 +767,7 @@ export function ParticipantListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/conversation/webhook.ts b/src/rest/conversations/v1/conversation/webhook.ts index 8da2e93ecb..84135c2443 100644 --- a/src/rest/conversations/v1/conversation/webhook.ts +++ b/src/rest/conversations/v1/conversation/webhook.ts @@ -173,11 +173,14 @@ export class WebhookContextImpl implements WebhookContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -190,11 +193,15 @@ export class WebhookContextImpl implements WebhookContext { fetch( callback?: (error: Error | null, item?: WebhookInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -248,6 +255,7 @@ export class WebhookContextImpl implements WebhookContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -604,6 +612,7 @@ export function WebhookListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -650,6 +659,7 @@ export function WebhookListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/conversationWithParticipants.ts b/src/rest/conversations/v1/conversationWithParticipants.ts index 2ea7338e3e..4b8141f555 100644 --- a/src/rest/conversations/v1/conversationWithParticipants.ts +++ b/src/rest/conversations/v1/conversationWithParticipants.ts @@ -159,6 +159,7 @@ export function ConversationWithParticipantsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; diff --git a/src/rest/conversations/v1/credential.ts b/src/rest/conversations/v1/credential.ts index 765394ad4e..5f70f0171c 100644 --- a/src/rest/conversations/v1/credential.ts +++ b/src/rest/conversations/v1/credential.ts @@ -170,11 +170,14 @@ export class CredentialContextImpl implements CredentialContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -187,11 +190,15 @@ export class CredentialContextImpl implements CredentialContext { fetch( callback?: (error: Error | null, item?: CredentialInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -239,6 +246,7 @@ export class CredentialContextImpl implements CredentialContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -569,6 +577,7 @@ export function CredentialListInstance(version: V1): CredentialListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -610,6 +619,7 @@ export function CredentialListInstance(version: V1): CredentialListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/participantConversation.ts b/src/rest/conversations/v1/participantConversation.ts index d897fd1466..c8a8b7672e 100644 --- a/src/rest/conversations/v1/participantConversation.ts +++ b/src/rest/conversations/v1/participantConversation.ts @@ -200,6 +200,7 @@ export function ParticipantConversationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/role.ts b/src/rest/conversations/v1/role.ts index e5d460040c..d3460e3e7a 100644 --- a/src/rest/conversations/v1/role.ts +++ b/src/rest/conversations/v1/role.ts @@ -140,11 +140,14 @@ export class RoleContextImpl implements RoleContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -157,11 +160,15 @@ export class RoleContextImpl implements RoleContext { fetch( callback?: (error: Error | null, item?: RoleInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -194,6 +201,7 @@ export class RoleContextImpl implements RoleContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -517,6 +525,7 @@ export function RoleListInstance(version: V1): RoleListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -558,6 +567,7 @@ export function RoleListInstance(version: V1): RoleListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service.ts b/src/rest/conversations/v1/service.ts index 13a1e7bfcc..93c80201c2 100644 --- a/src/rest/conversations/v1/service.ts +++ b/src/rest/conversations/v1/service.ts @@ -185,11 +185,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -202,11 +205,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -529,6 +536,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -570,6 +578,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/binding.ts b/src/rest/conversations/v1/service/binding.ts index 59932624b3..098c10d28c 100644 --- a/src/rest/conversations/v1/service/binding.ts +++ b/src/rest/conversations/v1/service/binding.ts @@ -125,11 +125,14 @@ export class BindingContextImpl implements BindingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -142,11 +145,15 @@ export class BindingContextImpl implements BindingContext { fetch( callback?: (error: Error | null, item?: BindingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -462,6 +469,7 @@ export function BindingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/configuration.ts b/src/rest/conversations/v1/service/configuration.ts index 3022e7ed22..c6685dd69c 100644 --- a/src/rest/conversations/v1/service/configuration.ts +++ b/src/rest/conversations/v1/service/configuration.ts @@ -96,11 +96,15 @@ export class ConfigurationContextImpl implements ConfigurationContext { fetch( callback?: (error: Error | null, item?: ConfigurationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -148,6 +152,7 @@ export class ConfigurationContextImpl implements ConfigurationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/conversations/v1/service/configuration/notification.ts b/src/rest/conversations/v1/service/configuration/notification.ts index 3880882555..e44fd30ba8 100644 --- a/src/rest/conversations/v1/service/configuration/notification.ts +++ b/src/rest/conversations/v1/service/configuration/notification.ts @@ -112,11 +112,15 @@ export class NotificationContextImpl implements NotificationContext { fetch( callback?: (error: Error | null, item?: NotificationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -191,6 +195,7 @@ export class NotificationContextImpl implements NotificationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/conversations/v1/service/configuration/webhook.ts b/src/rest/conversations/v1/service/configuration/webhook.ts index 38faf3fbdd..cdc3716c1c 100644 --- a/src/rest/conversations/v1/service/configuration/webhook.ts +++ b/src/rest/conversations/v1/service/configuration/webhook.ts @@ -96,11 +96,15 @@ export class WebhookContextImpl implements WebhookContext { fetch( callback?: (error: Error | null, item?: WebhookInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -144,6 +148,7 @@ export class WebhookContextImpl implements WebhookContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/conversations/v1/service/conversation.ts b/src/rest/conversations/v1/service/conversation.ts index 6284f101ed..979d8e8fcf 100644 --- a/src/rest/conversations/v1/service/conversation.ts +++ b/src/rest/conversations/v1/service/conversation.ts @@ -314,11 +314,15 @@ export class ConversationContextImpl implements ConversationContext { fetch( callback?: (error: Error | null, item?: ConversationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -377,6 +381,7 @@ export class ConversationContextImpl implements ConversationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -822,6 +827,7 @@ export function ConversationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -874,6 +880,7 @@ export function ConversationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/conversation/message.ts b/src/rest/conversations/v1/service/conversation/message.ts index 736505e16b..b1915ab7c2 100644 --- a/src/rest/conversations/v1/service/conversation/message.ts +++ b/src/rest/conversations/v1/service/conversation/message.ts @@ -271,11 +271,15 @@ export class MessageContextImpl implements MessageContext { fetch( callback?: (error: Error | null, item?: MessageInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -323,6 +327,7 @@ export class MessageContextImpl implements MessageContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -781,6 +786,7 @@ export function MessageListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -831,6 +837,7 @@ export function MessageListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/conversation/message/deliveryReceipt.ts b/src/rest/conversations/v1/service/conversation/message/deliveryReceipt.ts index 5c6bd8527b..5f489187bc 100644 --- a/src/rest/conversations/v1/service/conversation/message/deliveryReceipt.ts +++ b/src/rest/conversations/v1/service/conversation/message/deliveryReceipt.ts @@ -126,11 +126,15 @@ export class DeliveryReceiptContextImpl implements DeliveryReceiptContext { fetch( callback?: (error: Error | null, item?: DeliveryReceiptInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -468,6 +472,7 @@ export function DeliveryReceiptListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/conversation/participant.ts b/src/rest/conversations/v1/service/conversation/participant.ts index 1b032feb64..9b6ec7b90f 100644 --- a/src/rest/conversations/v1/service/conversation/participant.ts +++ b/src/rest/conversations/v1/service/conversation/participant.ts @@ -250,11 +250,15 @@ export class ParticipantContextImpl implements ParticipantContext { fetch( callback?: (error: Error | null, item?: ParticipantInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -311,6 +315,7 @@ export class ParticipantContextImpl implements ParticipantContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -745,6 +750,7 @@ export function ParticipantListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -794,6 +800,7 @@ export function ParticipantListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/conversation/webhook.ts b/src/rest/conversations/v1/service/conversation/webhook.ts index 82d8a55de8..4badc88804 100644 --- a/src/rest/conversations/v1/service/conversation/webhook.ts +++ b/src/rest/conversations/v1/service/conversation/webhook.ts @@ -183,11 +183,14 @@ export class WebhookContextImpl implements WebhookContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -200,11 +203,15 @@ export class WebhookContextImpl implements WebhookContext { fetch( callback?: (error: Error | null, item?: WebhookInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -259,6 +266,7 @@ export class WebhookContextImpl implements WebhookContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -636,6 +644,7 @@ export function WebhookListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -683,6 +692,7 @@ export function WebhookListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/conversationWithParticipants.ts b/src/rest/conversations/v1/service/conversationWithParticipants.ts index 6cdbdf598e..8c9ddb76fb 100644 --- a/src/rest/conversations/v1/service/conversationWithParticipants.ts +++ b/src/rest/conversations/v1/service/conversationWithParticipants.ts @@ -166,6 +166,7 @@ export function ConversationWithParticipantsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; diff --git a/src/rest/conversations/v1/service/participantConversation.ts b/src/rest/conversations/v1/service/participantConversation.ts index 4f2ee33bd6..e1b0f51ce4 100644 --- a/src/rest/conversations/v1/service/participantConversation.ts +++ b/src/rest/conversations/v1/service/participantConversation.ts @@ -207,6 +207,7 @@ export function ParticipantConversationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/role.ts b/src/rest/conversations/v1/service/role.ts index e6f085a6b9..8c939ca1dd 100644 --- a/src/rest/conversations/v1/service/role.ts +++ b/src/rest/conversations/v1/service/role.ts @@ -145,11 +145,14 @@ export class RoleContextImpl implements RoleContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -162,11 +165,15 @@ export class RoleContextImpl implements RoleContext { fetch( callback?: (error: Error | null, item?: RoleInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -204,6 +211,7 @@ export class RoleContextImpl implements RoleContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -551,6 +559,7 @@ export function RoleListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -597,6 +606,7 @@ export function RoleListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/user.ts b/src/rest/conversations/v1/service/user.ts index 9477c57544..cba243441b 100644 --- a/src/rest/conversations/v1/service/user.ts +++ b/src/rest/conversations/v1/service/user.ts @@ -236,11 +236,15 @@ export class UserContextImpl implements UserContext { fetch( callback?: (error: Error | null, item?: UserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -283,6 +287,7 @@ export class UserContextImpl implements UserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -684,6 +689,7 @@ export function UserListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -732,6 +738,7 @@ export function UserListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/service/user/userConversation.ts b/src/rest/conversations/v1/service/user/userConversation.ts index 774e86d14e..035de7d6b2 100644 --- a/src/rest/conversations/v1/service/user/userConversation.ts +++ b/src/rest/conversations/v1/service/user/userConversation.ts @@ -162,11 +162,14 @@ export class UserConversationContextImpl implements UserConversationContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -179,11 +182,15 @@ export class UserConversationContextImpl implements UserConversationContext { fetch( callback?: (error: Error | null, item?: UserConversationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -230,6 +237,7 @@ export class UserConversationContextImpl implements UserConversationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -648,6 +656,7 @@ export function UserConversationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/user.ts b/src/rest/conversations/v1/user.ts index 55a45539a9..c7a06fdfff 100644 --- a/src/rest/conversations/v1/user.ts +++ b/src/rest/conversations/v1/user.ts @@ -227,11 +227,15 @@ export class UserContextImpl implements UserContext { fetch( callback?: (error: Error | null, item?: UserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -269,6 +273,7 @@ export class UserContextImpl implements UserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -646,6 +651,7 @@ export function UserListInstance(version: V1): UserListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -689,6 +695,7 @@ export function UserListInstance(version: V1): UserListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/conversations/v1/user/userConversation.ts b/src/rest/conversations/v1/user/userConversation.ts index bca39ef472..a04cf6bdb6 100644 --- a/src/rest/conversations/v1/user/userConversation.ts +++ b/src/rest/conversations/v1/user/userConversation.ts @@ -156,11 +156,14 @@ export class UserConversationContextImpl implements UserConversationContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -173,11 +176,15 @@ export class UserConversationContextImpl implements UserConversationContext { fetch( callback?: (error: Error | null, item?: UserConversationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -223,6 +230,7 @@ export class UserConversationContextImpl implements UserConversationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -626,6 +634,7 @@ export function UserConversationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/events/v1/eventType.ts b/src/rest/events/v1/eventType.ts index 015873f2dc..47104b7022 100644 --- a/src/rest/events/v1/eventType.ts +++ b/src/rest/events/v1/eventType.ts @@ -101,11 +101,15 @@ export class EventTypeContextImpl implements EventTypeContext { fetch( callback?: (error: Error | null, item?: EventTypeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -373,6 +377,7 @@ export function EventTypeListInstance(version: V1): EventTypeListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/events/v1/schema.ts b/src/rest/events/v1/schema.ts index 8c9a857cda..76c8ae8831 100644 --- a/src/rest/events/v1/schema.ts +++ b/src/rest/events/v1/schema.ts @@ -69,11 +69,15 @@ export class SchemaContextImpl implements SchemaContext { fetch( callback?: (error: Error | null, item?: SchemaInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/events/v1/schema/schemaVersion.ts b/src/rest/events/v1/schema/schemaVersion.ts index 2f3c9ab789..53ec690776 100644 --- a/src/rest/events/v1/schema/schemaVersion.ts +++ b/src/rest/events/v1/schema/schemaVersion.ts @@ -100,11 +100,15 @@ export class SchemaVersionContextImpl implements SchemaVersionContext { fetch( callback?: (error: Error | null, item?: SchemaVersionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -365,6 +369,7 @@ export function SchemaVersionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/events/v1/sink.ts b/src/rest/events/v1/sink.ts index 8c51106511..d3fe73f5c4 100644 --- a/src/rest/events/v1/sink.ts +++ b/src/rest/events/v1/sink.ts @@ -175,11 +175,14 @@ export class SinkContextImpl implements SinkContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -192,11 +195,15 @@ export class SinkContextImpl implements SinkContext { fetch( callback?: (error: Error | null, item?: SinkInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -229,6 +236,7 @@ export class SinkContextImpl implements SinkContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -565,6 +573,7 @@ export function SinkListInstance(version: V1): SinkListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -609,6 +618,7 @@ export function SinkListInstance(version: V1): SinkListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/events/v1/sink/sinkTest.ts b/src/rest/events/v1/sink/sinkTest.ts index 6f89bac6f4..cec9382a5c 100644 --- a/src/rest/events/v1/sink/sinkTest.ts +++ b/src/rest/events/v1/sink/sinkTest.ts @@ -62,10 +62,14 @@ export function SinkTestListInstance( instance.create = function create( callback?: (error: Error | null, items: SinkTestInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + let operationVersion = version, operationPromise = operationVersion.create({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/events/v1/sink/sinkValidate.ts b/src/rest/events/v1/sink/sinkValidate.ts index afdae8cffb..a3340be130 100644 --- a/src/rest/events/v1/sink/sinkValidate.ts +++ b/src/rest/events/v1/sink/sinkValidate.ts @@ -87,6 +87,7 @@ export function SinkValidateListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/events/v1/subscription.ts b/src/rest/events/v1/subscription.ts index 4d9a919587..d33103b819 100644 --- a/src/rest/events/v1/subscription.ts +++ b/src/rest/events/v1/subscription.ts @@ -168,11 +168,14 @@ export class SubscriptionContextImpl implements SubscriptionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -185,11 +188,15 @@ export class SubscriptionContextImpl implements SubscriptionContext { fetch( callback?: (error: Error | null, item?: SubscriptionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -229,6 +236,7 @@ export class SubscriptionContextImpl implements SubscriptionContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -575,6 +583,7 @@ export function SubscriptionListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -617,6 +626,7 @@ export function SubscriptionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/events/v1/subscription/subscribedEvent.ts b/src/rest/events/v1/subscription/subscribedEvent.ts index 184b90ea69..afa4be0f9d 100644 --- a/src/rest/events/v1/subscription/subscribedEvent.ts +++ b/src/rest/events/v1/subscription/subscribedEvent.ts @@ -154,11 +154,14 @@ export class SubscribedEventContextImpl implements SubscribedEventContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -171,11 +174,15 @@ export class SubscribedEventContextImpl implements SubscribedEventContext { fetch( callback?: (error: Error | null, item?: SubscribedEventInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -215,6 +222,7 @@ export class SubscribedEventContextImpl implements SubscribedEventContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -541,6 +549,7 @@ export function SubscribedEventListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -587,6 +596,7 @@ export function SubscribedEventListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/flexApi/v1/assessments.ts b/src/rest/flexApi/v1/assessments.ts index b684e2da8e..3e0ca71ca4 100644 --- a/src/rest/flexApi/v1/assessments.ts +++ b/src/rest/flexApi/v1/assessments.ts @@ -177,6 +177,7 @@ export class AssessmentsContextImpl implements AssessmentsContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -565,6 +566,7 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -610,6 +612,7 @@ export function AssessmentsListInstance(version: V1): AssessmentsListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/channel.ts b/src/rest/flexApi/v1/channel.ts index 1adc94bbb4..f0929d2ccd 100644 --- a/src/rest/flexApi/v1/channel.ts +++ b/src/rest/flexApi/v1/channel.ts @@ -131,11 +131,14 @@ export class ChannelContextImpl implements ChannelContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -148,11 +151,15 @@ export class ChannelContextImpl implements ChannelContext { fetch( callback?: (error: Error | null, item?: ChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -468,6 +475,7 @@ export function ChannelListInstance(version: V1): ChannelListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -509,6 +517,7 @@ export function ChannelListInstance(version: V1): ChannelListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/flexApi/v1/configuration.ts b/src/rest/flexApi/v1/configuration.ts index 69a03dcc00..61ff8724c9 100644 --- a/src/rest/flexApi/v1/configuration.ts +++ b/src/rest/flexApi/v1/configuration.ts @@ -74,12 +74,14 @@ export interface ConfigurationContext { * Update a ConfigurationInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed ConfigurationInstance */ update( params: object, + headers?: any, callback?: (error: Error | null, item?: ConfigurationInstance) => any ): Promise; @@ -120,6 +122,7 @@ export class ConfigurationContextImpl implements ConfigurationContext { data["UiVersion"] = params["uiVersion"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -145,6 +148,7 @@ export class ConfigurationContextImpl implements ConfigurationContext { params?: | object | ((error: Error | null, item?: ConfigurationInstance) => any), + headers?: any, callback?: (error: Error | null, item?: ConfigurationInstance) => any ): Promise { if (params instanceof Function) { @@ -158,8 +162,12 @@ export class ConfigurationContextImpl implements ConfigurationContext { data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -551,12 +559,14 @@ export class ConfigurationInstance { * Update a ConfigurationInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed ConfigurationInstance */ update( params: object, + headers?: any, callback?: (error: Error | null, item?: ConfigurationInstance) => any ): Promise; diff --git a/src/rest/flexApi/v1/flexFlow.ts b/src/rest/flexApi/v1/flexFlow.ts index 84fbac9949..d6bfdcd5e2 100644 --- a/src/rest/flexApi/v1/flexFlow.ts +++ b/src/rest/flexApi/v1/flexFlow.ts @@ -224,11 +224,14 @@ export class FlexFlowContextImpl implements FlexFlowContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -241,11 +244,15 @@ export class FlexFlowContextImpl implements FlexFlowContext { fetch( callback?: (error: Error | null, item?: FlexFlowInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -314,6 +321,7 @@ export class FlexFlowContextImpl implements FlexFlowContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -715,6 +723,7 @@ export function FlexFlowListInstance(version: V1): FlexFlowListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -758,6 +767,7 @@ export function FlexFlowListInstance(version: V1): FlexFlowListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/flexApi/v1/insightsAssessmentsComment.ts b/src/rest/flexApi/v1/insightsAssessmentsComment.ts index a08a7b83c7..731c27ff24 100644 --- a/src/rest/flexApi/v1/insightsAssessmentsComment.ts +++ b/src/rest/flexApi/v1/insightsAssessmentsComment.ts @@ -279,6 +279,7 @@ export function InsightsAssessmentsCommentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -329,6 +330,7 @@ export function InsightsAssessmentsCommentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/insightsConversations.ts b/src/rest/flexApi/v1/insightsConversations.ts index 18eab7cae4..3f93998ce3 100644 --- a/src/rest/flexApi/v1/insightsConversations.ts +++ b/src/rest/flexApi/v1/insightsConversations.ts @@ -198,6 +198,7 @@ export function InsightsConversationsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/insightsQuestionnaires.ts b/src/rest/flexApi/v1/insightsQuestionnaires.ts index f7aa2001f6..20bc5ef07d 100644 --- a/src/rest/flexApi/v1/insightsQuestionnaires.ts +++ b/src/rest/flexApi/v1/insightsQuestionnaires.ts @@ -267,6 +267,7 @@ export class InsightsQuestionnairesContextImpl let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -324,6 +325,7 @@ export class InsightsQuestionnairesContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -713,6 +715,7 @@ export function InsightsQuestionnairesListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -758,6 +761,7 @@ export function InsightsQuestionnairesListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/insightsQuestionnairesCategory.ts b/src/rest/flexApi/v1/insightsQuestionnairesCategory.ts index fdcfaaf23f..a533242ba4 100644 --- a/src/rest/flexApi/v1/insightsQuestionnairesCategory.ts +++ b/src/rest/flexApi/v1/insightsQuestionnairesCategory.ts @@ -214,6 +214,7 @@ export class InsightsQuestionnairesCategoryContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -543,6 +544,7 @@ export function InsightsQuestionnairesCategoryListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -593,6 +595,7 @@ export function InsightsQuestionnairesCategoryListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/insightsQuestionnairesQuestion.ts b/src/rest/flexApi/v1/insightsQuestionnairesQuestion.ts index 1ee02ca678..88bf1c917e 100644 --- a/src/rest/flexApi/v1/insightsQuestionnairesQuestion.ts +++ b/src/rest/flexApi/v1/insightsQuestionnairesQuestion.ts @@ -243,6 +243,7 @@ export class InsightsQuestionnairesQuestionContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -634,6 +635,7 @@ export function InsightsQuestionnairesQuestionListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; @@ -689,6 +691,7 @@ export function InsightsQuestionnairesQuestionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/insightsSegments.ts b/src/rest/flexApi/v1/insightsSegments.ts index b966242da4..25afa071ff 100644 --- a/src/rest/flexApi/v1/insightsSegments.ts +++ b/src/rest/flexApi/v1/insightsSegments.ts @@ -203,6 +203,7 @@ export function InsightsSegmentsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/insightsSession.ts b/src/rest/flexApi/v1/insightsSession.ts index 16f28fbe3a..6077897612 100644 --- a/src/rest/flexApi/v1/insightsSession.ts +++ b/src/rest/flexApi/v1/insightsSession.ts @@ -84,6 +84,7 @@ export class InsightsSessionContextImpl implements InsightsSessionContext { let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/insightsSettingsAnswerSets.ts b/src/rest/flexApi/v1/insightsSettingsAnswerSets.ts index 0a7c1d8e91..94e9f20b70 100644 --- a/src/rest/flexApi/v1/insightsSettingsAnswerSets.ts +++ b/src/rest/flexApi/v1/insightsSettingsAnswerSets.ts @@ -100,6 +100,7 @@ export function InsightsSettingsAnswerSetsListInstance( let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/insightsSettingsComment.ts b/src/rest/flexApi/v1/insightsSettingsComment.ts index c86b78387c..6b528a56ce 100644 --- a/src/rest/flexApi/v1/insightsSettingsComment.ts +++ b/src/rest/flexApi/v1/insightsSettingsComment.ts @@ -97,6 +97,7 @@ export function InsightsSettingsCommentListInstance( let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/insightsUserRoles.ts b/src/rest/flexApi/v1/insightsUserRoles.ts index 58bd78d8c7..a87e85491c 100644 --- a/src/rest/flexApi/v1/insightsUserRoles.ts +++ b/src/rest/flexApi/v1/insightsUserRoles.ts @@ -84,6 +84,7 @@ export class InsightsUserRolesContextImpl implements InsightsUserRolesContext { let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["authorization"] !== undefined) headers["Authorization"] = params["authorization"]; diff --git a/src/rest/flexApi/v1/interaction.ts b/src/rest/flexApi/v1/interaction.ts index 797a21f953..b68bed92be 100644 --- a/src/rest/flexApi/v1/interaction.ts +++ b/src/rest/flexApi/v1/interaction.ts @@ -81,11 +81,15 @@ export class InteractionContextImpl implements InteractionContext { fetch( callback?: (error: Error | null, item?: InteractionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -275,6 +279,7 @@ export function InteractionListInstance(version: V1): InteractionListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/flexApi/v1/interaction/interactionChannel.ts b/src/rest/flexApi/v1/interaction/interactionChannel.ts index 46843e1a42..5f7104c6d5 100644 --- a/src/rest/flexApi/v1/interaction/interactionChannel.ts +++ b/src/rest/flexApi/v1/interaction/interactionChannel.ts @@ -176,11 +176,15 @@ export class InteractionChannelContextImpl fetch( callback?: (error: Error | null, item?: InteractionChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -220,6 +224,7 @@ export class InteractionChannelContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -534,6 +539,7 @@ export function InteractionChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.ts b/src/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.ts index 5038977629..328712a0be 100644 --- a/src/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.ts +++ b/src/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.ts @@ -220,6 +220,7 @@ export function InteractionChannelInviteListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -267,6 +268,7 @@ export function InteractionChannelInviteListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.ts b/src/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.ts index 893b0651c4..f81d9c9bc5 100644 --- a/src/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.ts +++ b/src/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.ts @@ -166,6 +166,7 @@ export class InteractionChannelParticipantContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -509,6 +510,7 @@ export function InteractionChannelParticipantListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -562,6 +564,7 @@ export function InteractionChannelParticipantListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/flexApi/v1/plugin.ts b/src/rest/flexApi/v1/plugin.ts index c4a2a669b7..2808e7421a 100644 --- a/src/rest/flexApi/v1/plugin.ts +++ b/src/rest/flexApi/v1/plugin.ts @@ -194,6 +194,7 @@ export class PluginContextImpl implements PluginContext { let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -240,6 +241,7 @@ export class PluginContextImpl implements PluginContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -582,6 +584,7 @@ export function PluginListInstance(version: V1): PluginListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -625,6 +628,7 @@ export function PluginListInstance(version: V1): PluginListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; diff --git a/src/rest/flexApi/v1/plugin/pluginVersions.ts b/src/rest/flexApi/v1/plugin/pluginVersions.ts index ad1fa1a8af..60f387984e 100644 --- a/src/rest/flexApi/v1/plugin/pluginVersions.ts +++ b/src/rest/flexApi/v1/plugin/pluginVersions.ts @@ -161,6 +161,7 @@ export class PluginVersionsContextImpl implements PluginVersionsContext { let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -513,6 +514,7 @@ export function PluginVersionsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -561,6 +563,7 @@ export function PluginVersionsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; diff --git a/src/rest/flexApi/v1/pluginArchive.ts b/src/rest/flexApi/v1/pluginArchive.ts index 1cf9286626..23ab925c39 100644 --- a/src/rest/flexApi/v1/pluginArchive.ts +++ b/src/rest/flexApi/v1/pluginArchive.ts @@ -90,6 +90,7 @@ export class PluginArchiveContextImpl implements PluginArchiveContext { let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; diff --git a/src/rest/flexApi/v1/pluginConfiguration.ts b/src/rest/flexApi/v1/pluginConfiguration.ts index 0bd321aa60..31d0b9b68a 100644 --- a/src/rest/flexApi/v1/pluginConfiguration.ts +++ b/src/rest/flexApi/v1/pluginConfiguration.ts @@ -164,6 +164,7 @@ export class PluginConfigurationContextImpl let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -488,6 +489,7 @@ export function PluginConfigurationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -531,6 +533,7 @@ export function PluginConfigurationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; diff --git a/src/rest/flexApi/v1/pluginConfiguration/configuredPlugin.ts b/src/rest/flexApi/v1/pluginConfiguration/configuredPlugin.ts index 6631ce7c08..d255eb8e84 100644 --- a/src/rest/flexApi/v1/pluginConfiguration/configuredPlugin.ts +++ b/src/rest/flexApi/v1/pluginConfiguration/configuredPlugin.ts @@ -145,6 +145,7 @@ export class ConfiguredPluginContextImpl implements ConfiguredPluginContext { let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -519,6 +520,7 @@ export function ConfiguredPluginListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; diff --git a/src/rest/flexApi/v1/pluginConfigurationArchive.ts b/src/rest/flexApi/v1/pluginConfigurationArchive.ts index 5fd9586038..6341e5a665 100644 --- a/src/rest/flexApi/v1/pluginConfigurationArchive.ts +++ b/src/rest/flexApi/v1/pluginConfigurationArchive.ts @@ -104,6 +104,7 @@ export class PluginConfigurationArchiveContextImpl let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; diff --git a/src/rest/flexApi/v1/pluginRelease.ts b/src/rest/flexApi/v1/pluginRelease.ts index e2a56f24ba..27bb05379c 100644 --- a/src/rest/flexApi/v1/pluginRelease.ts +++ b/src/rest/flexApi/v1/pluginRelease.ts @@ -143,6 +143,7 @@ export class PluginReleaseContextImpl implements PluginReleaseContext { let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -434,6 +435,7 @@ export function PluginReleaseListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; @@ -477,6 +479,7 @@ export function PluginReleaseListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; diff --git a/src/rest/flexApi/v1/pluginVersionArchive.ts b/src/rest/flexApi/v1/pluginVersionArchive.ts index 8a0ab054d4..182716c958 100644 --- a/src/rest/flexApi/v1/pluginVersionArchive.ts +++ b/src/rest/flexApi/v1/pluginVersionArchive.ts @@ -97,6 +97,7 @@ export class PluginVersionArchiveContextImpl let data: any = {}; const headers: any = {}; + headers["Accept"] = "application/json"; if (params["flexMetadata"] !== undefined) headers["Flex-Metadata"] = params["flexMetadata"]; diff --git a/src/rest/flexApi/v1/provisioningStatus.ts b/src/rest/flexApi/v1/provisioningStatus.ts index 24abfc729b..88a1ef4e4b 100644 --- a/src/rest/flexApi/v1/provisioningStatus.ts +++ b/src/rest/flexApi/v1/provisioningStatus.ts @@ -59,11 +59,15 @@ export class ProvisioningStatusContextImpl fetch( callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/flexApi/v1/webChannel.ts b/src/rest/flexApi/v1/webChannel.ts index e1a1f488b2..0e011c40b8 100644 --- a/src/rest/flexApi/v1/webChannel.ts +++ b/src/rest/flexApi/v1/webChannel.ts @@ -158,11 +158,14 @@ export class WebChannelContextImpl implements WebChannelContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -175,11 +178,15 @@ export class WebChannelContextImpl implements WebChannelContext { fetch( callback?: (error: Error | null, item?: WebChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -220,6 +227,7 @@ export class WebChannelContextImpl implements WebChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -561,6 +569,7 @@ export function WebChannelListInstance(version: V1): WebChannelListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -602,6 +611,7 @@ export function WebChannelListInstance(version: V1): WebChannelListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/flexApi/v2/flexUser.ts b/src/rest/flexApi/v2/flexUser.ts index e479685001..c9d7dd04e1 100644 --- a/src/rest/flexApi/v2/flexUser.ts +++ b/src/rest/flexApi/v2/flexUser.ts @@ -107,11 +107,15 @@ export class FlexUserContextImpl implements FlexUserContext { fetch( callback?: (error: Error | null, item?: FlexUserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -157,6 +161,7 @@ export class FlexUserContextImpl implements FlexUserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/flexApi/v2/webChannels.ts b/src/rest/flexApi/v2/webChannels.ts index c03160df7e..0862cac5ff 100644 --- a/src/rest/flexApi/v2/webChannels.ts +++ b/src/rest/flexApi/v2/webChannels.ts @@ -92,6 +92,7 @@ export function WebChannelsListInstance(version: V2): WebChannelsListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["uiVersion"] !== undefined) headers["Ui-Version"] = params["uiVersion"]; diff --git a/src/rest/frontlineApi/v1/user.ts b/src/rest/frontlineApi/v1/user.ts index fa8ff98b22..ca6fc4e118 100644 --- a/src/rest/frontlineApi/v1/user.ts +++ b/src/rest/frontlineApi/v1/user.ts @@ -96,11 +96,15 @@ export class UserContextImpl implements UserContext { fetch( callback?: (error: Error | null, item?: UserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -139,6 +143,7 @@ export class UserContextImpl implements UserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/iam/v1/apiKey.ts b/src/rest/iam/v1/apiKey.ts index 062abbe9dd..ccd2a75676 100644 --- a/src/rest/iam/v1/apiKey.ts +++ b/src/rest/iam/v1/apiKey.ts @@ -101,11 +101,14 @@ export class ApiKeyContextImpl implements ApiKeyContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -118,11 +121,15 @@ export class ApiKeyContextImpl implements ApiKeyContext { fetch( callback?: (error: Error | null, item?: ApiKeyInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -159,6 +166,7 @@ export class ApiKeyContextImpl implements ApiKeyContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/iam/v1/getApiKeys.ts b/src/rest/iam/v1/getApiKeys.ts index 57a7e7e99e..b0b01945b9 100644 --- a/src/rest/iam/v1/getApiKeys.ts +++ b/src/rest/iam/v1/getApiKeys.ts @@ -167,6 +167,7 @@ export function GetApiKeysListInstance(version: V1): GetApiKeysListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/iam/v1/key.ts b/src/rest/iam/v1/key.ts index 6dbbd39cc3..36a8f4faac 100644 --- a/src/rest/iam/v1/key.ts +++ b/src/rest/iam/v1/key.ts @@ -91,6 +91,7 @@ export function KeyListInstance(version: V1): KeyListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/insights/v1/call.ts b/src/rest/insights/v1/call.ts index 34236273fd..574cbbba9f 100644 --- a/src/rest/insights/v1/call.ts +++ b/src/rest/insights/v1/call.ts @@ -97,11 +97,15 @@ export class CallContextImpl implements CallContext { fetch( callback?: (error: Error | null, item?: CallInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/insights/v1/call/annotation.ts b/src/rest/insights/v1/call/annotation.ts index f3444eb60a..e970ba7e09 100644 --- a/src/rest/insights/v1/call/annotation.ts +++ b/src/rest/insights/v1/call/annotation.ts @@ -110,11 +110,15 @@ export class AnnotationContextImpl implements AnnotationContext { fetch( callback?: (error: Error | null, item?: AnnotationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -163,6 +167,7 @@ export class AnnotationContextImpl implements AnnotationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/insights/v1/call/callSummary.ts b/src/rest/insights/v1/call/callSummary.ts index 663a190c3b..6a50fdead4 100644 --- a/src/rest/insights/v1/call/callSummary.ts +++ b/src/rest/insights/v1/call/callSummary.ts @@ -116,6 +116,7 @@ export class CallSummaryContextImpl implements CallSummaryContext { data["ProcessingState"] = params["processingState"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/insights/v1/call/event.ts b/src/rest/insights/v1/call/event.ts index b45209ce2b..017b009c2b 100644 --- a/src/rest/insights/v1/call/event.ts +++ b/src/rest/insights/v1/call/event.ts @@ -192,6 +192,7 @@ export function EventListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/insights/v1/call/metric.ts b/src/rest/insights/v1/call/metric.ts index 932e1d8da6..58e4390df0 100644 --- a/src/rest/insights/v1/call/metric.ts +++ b/src/rest/insights/v1/call/metric.ts @@ -200,6 +200,7 @@ export function MetricListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/insights/v1/callSummaries.ts b/src/rest/insights/v1/callSummaries.ts index 49f9066a39..164fde7f61 100644 --- a/src/rest/insights/v1/callSummaries.ts +++ b/src/rest/insights/v1/callSummaries.ts @@ -460,6 +460,7 @@ export function CallSummariesListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/insights/v1/conference.ts b/src/rest/insights/v1/conference.ts index 6de391d49a..b3fbd394f8 100644 --- a/src/rest/insights/v1/conference.ts +++ b/src/rest/insights/v1/conference.ts @@ -208,11 +208,15 @@ export class ConferenceContextImpl implements ConferenceContext { fetch( callback?: (error: Error | null, item?: ConferenceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -595,6 +599,7 @@ export function ConferenceListInstance(version: V1): ConferenceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/insights/v1/conference/conferenceParticipant.ts b/src/rest/insights/v1/conference/conferenceParticipant.ts index 3244c315fa..a3306511ac 100644 --- a/src/rest/insights/v1/conference/conferenceParticipant.ts +++ b/src/rest/insights/v1/conference/conferenceParticipant.ts @@ -207,6 +207,7 @@ export class ConferenceParticipantContextImpl if (params["metrics"] !== undefined) data["Metrics"] = params["metrics"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -658,6 +659,7 @@ export function ConferenceParticipantListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/insights/v1/room.ts b/src/rest/insights/v1/room.ts index f983f0d0f1..03de53adaf 100644 --- a/src/rest/insights/v1/room.ts +++ b/src/rest/insights/v1/room.ts @@ -174,11 +174,15 @@ export class RoomContextImpl implements RoomContext { fetch( callback?: (error: Error | null, item?: RoomInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -565,6 +569,7 @@ export function RoomListInstance(version: V1): RoomListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/insights/v1/room/participant.ts b/src/rest/insights/v1/room/participant.ts index e72d654ebe..814ccdd7e7 100644 --- a/src/rest/insights/v1/room/participant.ts +++ b/src/rest/insights/v1/room/participant.ts @@ -129,11 +129,15 @@ export class ParticipantContextImpl implements ParticipantContext { fetch( callback?: (error: Error | null, item?: ParticipantInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -469,6 +473,7 @@ export function ParticipantListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/insights/v1/setting.ts b/src/rest/insights/v1/setting.ts index bf79a8bee9..a83223fe90 100644 --- a/src/rest/insights/v1/setting.ts +++ b/src/rest/insights/v1/setting.ts @@ -122,6 +122,7 @@ export class SettingContextImpl implements SettingContext { data["SubaccountSid"] = params["subaccountSid"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -167,6 +168,7 @@ export class SettingContextImpl implements SettingContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/intelligence/v2/customOperator.ts b/src/rest/intelligence/v2/customOperator.ts index bc11812bc1..eba010380d 100644 --- a/src/rest/intelligence/v2/customOperator.ts +++ b/src/rest/intelligence/v2/customOperator.ts @@ -163,11 +163,14 @@ export class CustomOperatorContextImpl implements CustomOperatorContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -180,11 +183,15 @@ export class CustomOperatorContextImpl implements CustomOperatorContext { fetch( callback?: (error: Error | null, item?: CustomOperatorInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -230,6 +237,7 @@ export class CustomOperatorContextImpl implements CustomOperatorContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -596,6 +604,7 @@ export function CustomOperatorListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -641,6 +650,7 @@ export function CustomOperatorListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/intelligence/v2/operator.ts b/src/rest/intelligence/v2/operator.ts index 2a221d5cc6..57b251e09c 100644 --- a/src/rest/intelligence/v2/operator.ts +++ b/src/rest/intelligence/v2/operator.ts @@ -109,11 +109,15 @@ export class OperatorContextImpl implements OperatorContext { fetch( callback?: (error: Error | null, item?: OperatorInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -397,6 +401,7 @@ export function OperatorListInstance(version: V2): OperatorListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/intelligence/v2/operatorAttachment.ts b/src/rest/intelligence/v2/operatorAttachment.ts index 09d27622b9..eaacc980c2 100644 --- a/src/rest/intelligence/v2/operatorAttachment.ts +++ b/src/rest/intelligence/v2/operatorAttachment.ts @@ -75,11 +75,15 @@ export class OperatorAttachmentContextImpl create( callback?: (error: Error | null, item?: OperatorAttachmentInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.create({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( @@ -102,11 +106,14 @@ export class OperatorAttachmentContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( diff --git a/src/rest/intelligence/v2/operatorAttachments.ts b/src/rest/intelligence/v2/operatorAttachments.ts index d96afeca3c..b38f5328a1 100644 --- a/src/rest/intelligence/v2/operatorAttachments.ts +++ b/src/rest/intelligence/v2/operatorAttachments.ts @@ -59,11 +59,15 @@ export class OperatorAttachmentsContextImpl fetch( callback?: (error: Error | null, item?: OperatorAttachmentsInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/intelligence/v2/operatorType.ts b/src/rest/intelligence/v2/operatorType.ts index 949d9040e3..627a1ada50 100644 --- a/src/rest/intelligence/v2/operatorType.ts +++ b/src/rest/intelligence/v2/operatorType.ts @@ -110,11 +110,15 @@ export class OperatorTypeContextImpl implements OperatorTypeContext { fetch( callback?: (error: Error | null, item?: OperatorTypeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -412,6 +416,7 @@ export function OperatorTypeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/intelligence/v2/prebuiltOperator.ts b/src/rest/intelligence/v2/prebuiltOperator.ts index 768e0f3559..da641a297b 100644 --- a/src/rest/intelligence/v2/prebuiltOperator.ts +++ b/src/rest/intelligence/v2/prebuiltOperator.ts @@ -116,11 +116,15 @@ export class PrebuiltOperatorContextImpl implements PrebuiltOperatorContext { fetch( callback?: (error: Error | null, item?: PrebuiltOperatorInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -420,6 +424,7 @@ export function PrebuiltOperatorListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/intelligence/v2/service.ts b/src/rest/intelligence/v2/service.ts index efa49a506f..0be6f114c7 100644 --- a/src/rest/intelligence/v2/service.ts +++ b/src/rest/intelligence/v2/service.ts @@ -178,11 +178,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -195,11 +198,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -248,6 +255,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -635,6 +643,7 @@ export function ServiceListInstance(version: V2): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -676,6 +685,7 @@ export function ServiceListInstance(version: V2): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/intelligence/v2/transcript.ts b/src/rest/intelligence/v2/transcript.ts index a76758a690..7556a7e83c 100644 --- a/src/rest/intelligence/v2/transcript.ts +++ b/src/rest/intelligence/v2/transcript.ts @@ -205,11 +205,14 @@ export class TranscriptContextImpl implements TranscriptContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -222,11 +225,15 @@ export class TranscriptContextImpl implements TranscriptContext { fetch( callback?: (error: Error | null, item?: TranscriptInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -585,6 +592,7 @@ export function TranscriptListInstance(version: V2): TranscriptListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -641,6 +649,7 @@ export function TranscriptListInstance(version: V2): TranscriptListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/intelligence/v2/transcript/media.ts b/src/rest/intelligence/v2/transcript/media.ts index 0a0da5521d..a9b46e14ca 100644 --- a/src/rest/intelligence/v2/transcript/media.ts +++ b/src/rest/intelligence/v2/transcript/media.ts @@ -93,6 +93,7 @@ export class MediaContextImpl implements MediaContext { data["Redacted"] = serialize.bool(params["redacted"]); const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/intelligence/v2/transcript/operatorResult.ts b/src/rest/intelligence/v2/transcript/operatorResult.ts index e167dce110..7ceb2b2b53 100644 --- a/src/rest/intelligence/v2/transcript/operatorResult.ts +++ b/src/rest/intelligence/v2/transcript/operatorResult.ts @@ -155,6 +155,7 @@ export class OperatorResultContextImpl implements OperatorResultContext { data["Redacted"] = serialize.bool(params["redacted"]); const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -515,6 +516,7 @@ export function OperatorResultListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/intelligence/v2/transcript/sentence.ts b/src/rest/intelligence/v2/transcript/sentence.ts index 7e3eb2a3fb..68b58df4a7 100644 --- a/src/rest/intelligence/v2/transcript/sentence.ts +++ b/src/rest/intelligence/v2/transcript/sentence.ts @@ -192,6 +192,7 @@ export function SentenceListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v1/credential.ts b/src/rest/ipMessaging/v1/credential.ts index 7dff3c9d63..24dcb480f5 100644 --- a/src/rest/ipMessaging/v1/credential.ts +++ b/src/rest/ipMessaging/v1/credential.ts @@ -168,11 +168,14 @@ export class CredentialContextImpl implements CredentialContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -185,11 +188,15 @@ export class CredentialContextImpl implements CredentialContext { fetch( callback?: (error: Error | null, item?: CredentialInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -236,6 +243,7 @@ export class CredentialContextImpl implements CredentialContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -545,6 +553,7 @@ export function CredentialListInstance(version: V1): CredentialListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -586,6 +595,7 @@ export function CredentialListInstance(version: V1): CredentialListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v1/service.ts b/src/rest/ipMessaging/v1/service.ts index 1524d9f613..6bd82ebf2a 100644 --- a/src/rest/ipMessaging/v1/service.ts +++ b/src/rest/ipMessaging/v1/service.ts @@ -279,11 +279,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -296,11 +299,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -486,6 +493,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -858,6 +866,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -899,6 +908,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v1/service/channel.ts b/src/rest/ipMessaging/v1/service/channel.ts index 77b3156bb7..bf7a437f86 100644 --- a/src/rest/ipMessaging/v1/service/channel.ts +++ b/src/rest/ipMessaging/v1/service/channel.ts @@ -211,11 +211,14 @@ export class ChannelContextImpl implements ChannelContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -228,11 +231,15 @@ export class ChannelContextImpl implements ChannelContext { fetch( callback?: (error: Error | null, item?: ChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -276,6 +283,7 @@ export class ChannelContextImpl implements ChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -652,6 +660,7 @@ export function ChannelListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -703,6 +712,7 @@ export function ChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v1/service/channel/invite.ts b/src/rest/ipMessaging/v1/service/channel/invite.ts index 748053b3fb..d1b18782c3 100644 --- a/src/rest/ipMessaging/v1/service/channel/invite.ts +++ b/src/rest/ipMessaging/v1/service/channel/invite.ts @@ -136,11 +136,14 @@ export class InviteContextImpl implements InviteContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -153,11 +156,15 @@ export class InviteContextImpl implements InviteContext { fetch( callback?: (error: Error | null, item?: InviteInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -452,6 +459,7 @@ export function InviteListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -501,6 +509,7 @@ export function InviteListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v1/service/channel/member.ts b/src/rest/ipMessaging/v1/service/channel/member.ts index 2a3332893e..7e62fa3c83 100644 --- a/src/rest/ipMessaging/v1/service/channel/member.ts +++ b/src/rest/ipMessaging/v1/service/channel/member.ts @@ -169,11 +169,14 @@ export class MemberContextImpl implements MemberContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -186,11 +189,15 @@ export class MemberContextImpl implements MemberContext { fetch( callback?: (error: Error | null, item?: MemberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -232,6 +239,7 @@ export class MemberContextImpl implements MemberContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -572,6 +580,7 @@ export function MemberListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -621,6 +630,7 @@ export function MemberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v1/service/channel/message.ts b/src/rest/ipMessaging/v1/service/channel/message.ts index ac792a0e45..f456a6c514 100644 --- a/src/rest/ipMessaging/v1/service/channel/message.ts +++ b/src/rest/ipMessaging/v1/service/channel/message.ts @@ -173,11 +173,14 @@ export class MessageContextImpl implements MessageContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -190,11 +193,15 @@ export class MessageContextImpl implements MessageContext { fetch( callback?: (error: Error | null, item?: MessageInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -236,6 +243,7 @@ export class MessageContextImpl implements MessageContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -582,6 +590,7 @@ export function MessageListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -630,6 +639,7 @@ export function MessageListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v1/service/role.ts b/src/rest/ipMessaging/v1/service/role.ts index 5669ebe563..b4b00a11d7 100644 --- a/src/rest/ipMessaging/v1/service/role.ts +++ b/src/rest/ipMessaging/v1/service/role.ts @@ -145,11 +145,14 @@ export class RoleContextImpl implements RoleContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -162,11 +165,15 @@ export class RoleContextImpl implements RoleContext { fetch( callback?: (error: Error | null, item?: RoleInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -204,6 +211,7 @@ export class RoleContextImpl implements RoleContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -527,6 +535,7 @@ export function RoleListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -573,6 +582,7 @@ export function RoleListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v1/service/user.ts b/src/rest/ipMessaging/v1/service/user.ts index 9438d2fa40..ebd6c9eb13 100644 --- a/src/rest/ipMessaging/v1/service/user.ts +++ b/src/rest/ipMessaging/v1/service/user.ts @@ -175,11 +175,14 @@ export class UserContextImpl implements UserContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -192,11 +195,15 @@ export class UserContextImpl implements UserContext { fetch( callback?: (error: Error | null, item?: UserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -239,6 +246,7 @@ export class UserContextImpl implements UserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -591,6 +599,7 @@ export function UserListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -637,6 +646,7 @@ export function UserListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v1/service/user/userChannel.ts b/src/rest/ipMessaging/v1/service/user/userChannel.ts index dc38ca430f..f31c589997 100644 --- a/src/rest/ipMessaging/v1/service/user/userChannel.ts +++ b/src/rest/ipMessaging/v1/service/user/userChannel.ts @@ -187,6 +187,7 @@ export function UserChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/credential.ts b/src/rest/ipMessaging/v2/credential.ts index 86f4255b6f..94fff13799 100644 --- a/src/rest/ipMessaging/v2/credential.ts +++ b/src/rest/ipMessaging/v2/credential.ts @@ -168,11 +168,14 @@ export class CredentialContextImpl implements CredentialContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -185,11 +188,15 @@ export class CredentialContextImpl implements CredentialContext { fetch( callback?: (error: Error | null, item?: CredentialInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -236,6 +243,7 @@ export class CredentialContextImpl implements CredentialContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -545,6 +553,7 @@ export function CredentialListInstance(version: V2): CredentialListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -586,6 +595,7 @@ export function CredentialListInstance(version: V2): CredentialListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service.ts b/src/rest/ipMessaging/v2/service.ts index caad37b653..63c4284210 100644 --- a/src/rest/ipMessaging/v2/service.ts +++ b/src/rest/ipMessaging/v2/service.ts @@ -242,11 +242,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -259,11 +262,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -384,6 +391,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -775,6 +783,7 @@ export function ServiceListInstance(version: V2): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -816,6 +825,7 @@ export function ServiceListInstance(version: V2): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/binding.ts b/src/rest/ipMessaging/v2/service/binding.ts index 07d7eb7d80..fc41b0220c 100644 --- a/src/rest/ipMessaging/v2/service/binding.ts +++ b/src/rest/ipMessaging/v2/service/binding.ts @@ -125,11 +125,14 @@ export class BindingContextImpl implements BindingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -142,11 +145,15 @@ export class BindingContextImpl implements BindingContext { fetch( callback?: (error: Error | null, item?: BindingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -436,6 +443,7 @@ export function BindingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/channel.ts b/src/rest/ipMessaging/v2/service/channel.ts index 1e03327ca9..f0e541ccd1 100644 --- a/src/rest/ipMessaging/v2/service/channel.ts +++ b/src/rest/ipMessaging/v2/service/channel.ts @@ -298,11 +298,15 @@ export class ChannelContextImpl implements ChannelContext { fetch( callback?: (error: Error | null, item?: ChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -352,6 +356,7 @@ export class ChannelContextImpl implements ChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -760,6 +765,7 @@ export function ChannelListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -813,6 +819,7 @@ export function ChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/channel/invite.ts b/src/rest/ipMessaging/v2/service/channel/invite.ts index d5e00c6ad1..9c8d929b6f 100644 --- a/src/rest/ipMessaging/v2/service/channel/invite.ts +++ b/src/rest/ipMessaging/v2/service/channel/invite.ts @@ -136,11 +136,14 @@ export class InviteContextImpl implements InviteContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -153,11 +156,15 @@ export class InviteContextImpl implements InviteContext { fetch( callback?: (error: Error | null, item?: InviteInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -452,6 +459,7 @@ export function InviteListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -501,6 +509,7 @@ export function InviteListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/channel/member.ts b/src/rest/ipMessaging/v2/service/channel/member.ts index d43b826426..f3fd8cf604 100644 --- a/src/rest/ipMessaging/v2/service/channel/member.ts +++ b/src/rest/ipMessaging/v2/service/channel/member.ts @@ -248,11 +248,15 @@ export class MemberContextImpl implements MemberContext { fetch( callback?: (error: Error | null, item?: MemberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -304,6 +308,7 @@ export class MemberContextImpl implements MemberContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -679,6 +684,7 @@ export function MemberListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -730,6 +736,7 @@ export function MemberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/channel/message.ts b/src/rest/ipMessaging/v2/service/channel/message.ts index db3753d0b6..c45915677f 100644 --- a/src/rest/ipMessaging/v2/service/channel/message.ts +++ b/src/rest/ipMessaging/v2/service/channel/message.ts @@ -250,11 +250,15 @@ export class MessageContextImpl implements MessageContext { fetch( callback?: (error: Error | null, item?: MessageInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -303,6 +307,7 @@ export class MessageContextImpl implements MessageContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -698,6 +703,7 @@ export function MessageListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -748,6 +754,7 @@ export function MessageListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/channel/webhook.ts b/src/rest/ipMessaging/v2/service/channel/webhook.ts index 1212185cfe..bbb8b26e12 100644 --- a/src/rest/ipMessaging/v2/service/channel/webhook.ts +++ b/src/rest/ipMessaging/v2/service/channel/webhook.ts @@ -185,11 +185,14 @@ export class WebhookContextImpl implements WebhookContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -202,11 +205,15 @@ export class WebhookContextImpl implements WebhookContext { fetch( callback?: (error: Error | null, item?: WebhookInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -263,6 +270,7 @@ export class WebhookContextImpl implements WebhookContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -608,6 +616,7 @@ export function WebhookListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -655,6 +664,7 @@ export function WebhookListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/role.ts b/src/rest/ipMessaging/v2/service/role.ts index 64925a0ae2..0c280457d0 100644 --- a/src/rest/ipMessaging/v2/service/role.ts +++ b/src/rest/ipMessaging/v2/service/role.ts @@ -145,11 +145,14 @@ export class RoleContextImpl implements RoleContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -162,11 +165,15 @@ export class RoleContextImpl implements RoleContext { fetch( callback?: (error: Error | null, item?: RoleInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -204,6 +211,7 @@ export class RoleContextImpl implements RoleContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -527,6 +535,7 @@ export function RoleListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -573,6 +582,7 @@ export function RoleListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/user.ts b/src/rest/ipMessaging/v2/service/user.ts index 2bdebca268..11764675cc 100644 --- a/src/rest/ipMessaging/v2/service/user.ts +++ b/src/rest/ipMessaging/v2/service/user.ts @@ -195,11 +195,14 @@ export class UserContextImpl implements UserContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -212,11 +215,15 @@ export class UserContextImpl implements UserContext { fetch( callback?: (error: Error | null, item?: UserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -259,6 +266,7 @@ export class UserContextImpl implements UserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -620,6 +628,7 @@ export function UserListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -668,6 +677,7 @@ export function UserListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/user/userBinding.ts b/src/rest/ipMessaging/v2/service/user/userBinding.ts index 6cfacd8a38..625833f64d 100644 --- a/src/rest/ipMessaging/v2/service/user/userBinding.ts +++ b/src/rest/ipMessaging/v2/service/user/userBinding.ts @@ -129,11 +129,14 @@ export class UserBindingContextImpl implements UserBindingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -146,11 +149,15 @@ export class UserBindingContextImpl implements UserBindingContext { fetch( callback?: (error: Error | null, item?: UserBindingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -447,6 +454,7 @@ export function UserBindingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/ipMessaging/v2/service/user/userChannel.ts b/src/rest/ipMessaging/v2/service/user/userChannel.ts index f946ff94c1..81ebe0acec 100644 --- a/src/rest/ipMessaging/v2/service/user/userChannel.ts +++ b/src/rest/ipMessaging/v2/service/user/userChannel.ts @@ -162,11 +162,14 @@ export class UserChannelContextImpl implements UserChannelContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -179,11 +182,15 @@ export class UserChannelContextImpl implements UserChannelContext { fetch( callback?: (error: Error | null, item?: UserChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -230,6 +237,7 @@ export class UserChannelContextImpl implements UserChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -564,6 +572,7 @@ export function UserChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/lookups/v1/phoneNumber.ts b/src/rest/lookups/v1/phoneNumber.ts index 328d842460..6ee8604299 100644 --- a/src/rest/lookups/v1/phoneNumber.ts +++ b/src/rest/lookups/v1/phoneNumber.ts @@ -108,6 +108,7 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { }; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/lookups/v2/phoneNumber.ts b/src/rest/lookups/v2/phoneNumber.ts index a9749e2c67..954a6749ba 100644 --- a/src/rest/lookups/v2/phoneNumber.ts +++ b/src/rest/lookups/v2/phoneNumber.ts @@ -149,6 +149,7 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { data["VerificationSid"] = params["verificationSid"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/marketplace/v1/availableAddOn.ts b/src/rest/marketplace/v1/availableAddOn.ts index cf9f00520c..240f8486a8 100644 --- a/src/rest/marketplace/v1/availableAddOn.ts +++ b/src/rest/marketplace/v1/availableAddOn.ts @@ -110,11 +110,15 @@ export class AvailableAddOnContextImpl implements AvailableAddOnContext { fetch( callback?: (error: Error | null, item?: AvailableAddOnInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -385,6 +389,7 @@ export function AvailableAddOnListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/marketplace/v1/availableAddOn/availableAddOnExtension.ts b/src/rest/marketplace/v1/availableAddOn/availableAddOnExtension.ts index a7e55e0236..28f5d9df52 100644 --- a/src/rest/marketplace/v1/availableAddOn/availableAddOnExtension.ts +++ b/src/rest/marketplace/v1/availableAddOn/availableAddOnExtension.ts @@ -111,11 +111,15 @@ export class AvailableAddOnExtensionContextImpl item?: AvailableAddOnExtensionInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -399,6 +403,7 @@ export function AvailableAddOnExtensionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/marketplace/v1/installedAddOn.ts b/src/rest/marketplace/v1/installedAddOn.ts index d465cf0836..f41048caf5 100644 --- a/src/rest/marketplace/v1/installedAddOn.ts +++ b/src/rest/marketplace/v1/installedAddOn.ts @@ -177,11 +177,14 @@ export class InstalledAddOnContextImpl implements InstalledAddOnContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -194,11 +197,15 @@ export class InstalledAddOnContextImpl implements InstalledAddOnContext { fetch( callback?: (error: Error | null, item?: InstalledAddOnInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -239,6 +246,7 @@ export class InstalledAddOnContextImpl implements InstalledAddOnContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -620,6 +628,7 @@ export function InstalledAddOnListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -661,6 +670,7 @@ export function InstalledAddOnListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/marketplace/v1/installedAddOn/installedAddOnExtension.ts b/src/rest/marketplace/v1/installedAddOn/installedAddOnExtension.ts index 0947c38cc7..6f5d4997f7 100644 --- a/src/rest/marketplace/v1/installedAddOn/installedAddOnExtension.ts +++ b/src/rest/marketplace/v1/installedAddOn/installedAddOnExtension.ts @@ -134,11 +134,15 @@ export class InstalledAddOnExtensionContextImpl item?: InstalledAddOnExtensionInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -179,6 +183,7 @@ export class InstalledAddOnExtensionContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -503,6 +508,7 @@ export function InstalledAddOnExtensionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/marketplace/v1/installedAddOn/installedAddOnUsage.ts b/src/rest/marketplace/v1/installedAddOn/installedAddOnUsage.ts index 7c1535c210..e23721304f 100644 --- a/src/rest/marketplace/v1/installedAddOn/installedAddOnUsage.ts +++ b/src/rest/marketplace/v1/installedAddOn/installedAddOnUsage.ts @@ -22,8 +22,8 @@ export class MarketplaceV1InstalledAddOnInstalledAddOnUsage { /** * Total amount in local currency that was billed in this request. Aggregates all billable_items that were successfully submitted. */ - "totalSubmitted"?: number; - "billableItems": Array; + "total_submitted"?: number; + "billable_items": Array; } export class MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems { @@ -62,12 +62,14 @@ export interface InstalledAddOnUsageListInstance { * Create a InstalledAddOnUsageInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed InstalledAddOnUsageInstance */ create( params: MarketplaceV1InstalledAddOnInstalledAddOnUsage, + headers?: any, callback?: (error: Error | null, item?: InstalledAddOnUsageInstance) => any ): Promise; @@ -94,6 +96,7 @@ export function InstalledAddOnUsageListInstance( instance.create = function create( params: MarketplaceV1InstalledAddOnInstalledAddOnUsage, + headers?: any, callback?: (error: Error | null, items: InstalledAddOnUsageInstance) => any ): Promise { if (params === null || params === undefined) { @@ -104,8 +107,12 @@ export function InstalledAddOnUsageListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/marketplace/v1/moduleDataManagement.ts b/src/rest/marketplace/v1/moduleDataManagement.ts index f25162134e..15c7642b88 100644 --- a/src/rest/marketplace/v1/moduleDataManagement.ts +++ b/src/rest/marketplace/v1/moduleDataManagement.ts @@ -102,11 +102,15 @@ export class ModuleDataManagementContextImpl fetch( callback?: (error: Error | null, item?: ModuleDataManagementInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -154,6 +158,7 @@ export class ModuleDataManagementContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/marketplace/v1/referralConversion.ts b/src/rest/marketplace/v1/referralConversion.ts index 5a9ce930f0..9515da01ed 100644 --- a/src/rest/marketplace/v1/referralConversion.ts +++ b/src/rest/marketplace/v1/referralConversion.ts @@ -19,7 +19,7 @@ const serialize = require("../../../base/serialize"); import { isValidPathParam } from "../../../base/utility"; export class CreateReferralConversionRequest { - "referralAccountSid"?: string; + "referral_account_sid"?: string; } /** @@ -41,12 +41,14 @@ export interface ReferralConversionListInstance { * Create a ReferralConversionInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed ReferralConversionInstance */ create( params: CreateReferralConversionRequest, + headers?: any, callback?: (error: Error | null, item?: ReferralConversionInstance) => any ): Promise; @@ -68,6 +70,7 @@ export function ReferralConversionListInstance( instance.create = function create( params: CreateReferralConversionRequest, + headers?: any, callback?: (error: Error | null, items: ReferralConversionInstance) => any ): Promise { if (params === null || params === undefined) { @@ -78,8 +81,12 @@ export function ReferralConversionListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/messaging/v1/brandRegistration.ts b/src/rest/messaging/v1/brandRegistration.ts index f86034cec6..93480ac4c6 100644 --- a/src/rest/messaging/v1/brandRegistration.ts +++ b/src/rest/messaging/v1/brandRegistration.ts @@ -166,11 +166,15 @@ export class BrandRegistrationContextImpl implements BrandRegistrationContext { fetch( callback?: (error: Error | null, item?: BrandRegistrationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -192,11 +196,15 @@ export class BrandRegistrationContextImpl implements BrandRegistrationContext { update( callback?: (error: Error | null, item?: BrandRegistrationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.update({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( @@ -611,6 +619,7 @@ export function BrandRegistrationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -652,6 +661,7 @@ export function BrandRegistrationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/messaging/v1/brandRegistration/brandRegistrationOtp.ts b/src/rest/messaging/v1/brandRegistration/brandRegistrationOtp.ts index 8914219629..a628c4e5ff 100644 --- a/src/rest/messaging/v1/brandRegistration/brandRegistrationOtp.ts +++ b/src/rest/messaging/v1/brandRegistration/brandRegistrationOtp.ts @@ -62,10 +62,14 @@ export function BrandRegistrationOtpListInstance( instance.create = function create( callback?: (error: Error | null, items: BrandRegistrationOtpInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + let operationVersion = version, operationPromise = operationVersion.create({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/messaging/v1/brandRegistration/brandVetting.ts b/src/rest/messaging/v1/brandRegistration/brandVetting.ts index 594e736815..aa182afe82 100644 --- a/src/rest/messaging/v1/brandRegistration/brandVetting.ts +++ b/src/rest/messaging/v1/brandRegistration/brandVetting.ts @@ -121,11 +121,15 @@ export class BrandVettingContextImpl implements BrandVettingContext { fetch( callback?: (error: Error | null, item?: BrandVettingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -435,6 +439,7 @@ export function BrandVettingListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -483,6 +488,7 @@ export function BrandVettingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/messaging/v1/deactivations.ts b/src/rest/messaging/v1/deactivations.ts index 46366c441d..e96e47baca 100644 --- a/src/rest/messaging/v1/deactivations.ts +++ b/src/rest/messaging/v1/deactivations.ts @@ -87,6 +87,7 @@ export class DeactivationsContextImpl implements DeactivationsContext { data["Date"] = serialize.iso8601Date(params["date"]); const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/messaging/v1/domainCerts.ts b/src/rest/messaging/v1/domainCerts.ts index 900aa2dd52..fb5382de30 100644 --- a/src/rest/messaging/v1/domainCerts.ts +++ b/src/rest/messaging/v1/domainCerts.ts @@ -89,11 +89,14 @@ export class DomainCertsContextImpl implements DomainCertsContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -106,11 +109,15 @@ export class DomainCertsContextImpl implements DomainCertsContext { fetch( callback?: (error: Error | null, item?: DomainCertsInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -147,6 +154,7 @@ export class DomainCertsContextImpl implements DomainCertsContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/messaging/v1/domainConfig.ts b/src/rest/messaging/v1/domainConfig.ts index b63ae3e992..3b23766d14 100644 --- a/src/rest/messaging/v1/domainConfig.ts +++ b/src/rest/messaging/v1/domainConfig.ts @@ -94,11 +94,15 @@ export class DomainConfigContextImpl implements DomainConfigContext { fetch( callback?: (error: Error | null, item?: DomainConfigInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -143,6 +147,7 @@ export class DomainConfigContextImpl implements DomainConfigContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/messaging/v1/domainConfigMessagingService.ts b/src/rest/messaging/v1/domainConfigMessagingService.ts index 77812c0beb..005a66da25 100644 --- a/src/rest/messaging/v1/domainConfigMessagingService.ts +++ b/src/rest/messaging/v1/domainConfigMessagingService.ts @@ -65,11 +65,15 @@ export class DomainConfigMessagingServiceContextImpl item?: DomainConfigMessagingServiceInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/messaging/v1/externalCampaign.ts b/src/rest/messaging/v1/externalCampaign.ts index 5413dc9264..789569bac8 100644 --- a/src/rest/messaging/v1/externalCampaign.ts +++ b/src/rest/messaging/v1/externalCampaign.ts @@ -97,6 +97,7 @@ export function ExternalCampaignListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/messaging/v1/linkshorteningMessagingService.ts b/src/rest/messaging/v1/linkshorteningMessagingService.ts index ea191b5bf4..8c98b68b14 100644 --- a/src/rest/messaging/v1/linkshorteningMessagingService.ts +++ b/src/rest/messaging/v1/linkshorteningMessagingService.ts @@ -85,11 +85,15 @@ export class LinkshorteningMessagingServiceContextImpl item?: LinkshorteningMessagingServiceInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.create({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( @@ -112,11 +116,14 @@ export class LinkshorteningMessagingServiceContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( diff --git a/src/rest/messaging/v1/linkshorteningMessagingServiceDomainAssociation.ts b/src/rest/messaging/v1/linkshorteningMessagingServiceDomainAssociation.ts index 4527d0c8b8..81041fa300 100644 --- a/src/rest/messaging/v1/linkshorteningMessagingServiceDomainAssociation.ts +++ b/src/rest/messaging/v1/linkshorteningMessagingServiceDomainAssociation.ts @@ -65,11 +65,15 @@ export class LinkshorteningMessagingServiceDomainAssociationContextImpl item?: LinkshorteningMessagingServiceDomainAssociationInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/messaging/v1/requestManagedCert.ts b/src/rest/messaging/v1/requestManagedCert.ts index 77d62e4c7c..8e75ec305f 100644 --- a/src/rest/messaging/v1/requestManagedCert.ts +++ b/src/rest/messaging/v1/requestManagedCert.ts @@ -59,11 +59,15 @@ export class RequestManagedCertContextImpl update( callback?: (error: Error | null, item?: RequestManagedCertInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.update({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/messaging/v1/service.ts b/src/rest/messaging/v1/service.ts index f0addca520..db1066e194 100644 --- a/src/rest/messaging/v1/service.ts +++ b/src/rest/messaging/v1/service.ts @@ -268,11 +268,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -285,11 +288,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -357,6 +364,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -852,6 +860,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -893,6 +902,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/messaging/v1/service/alphaSender.ts b/src/rest/messaging/v1/service/alphaSender.ts index fd4cd70c81..e65fcbbea1 100644 --- a/src/rest/messaging/v1/service/alphaSender.ts +++ b/src/rest/messaging/v1/service/alphaSender.ts @@ -118,11 +118,14 @@ export class AlphaSenderContextImpl implements AlphaSenderContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -135,11 +138,15 @@ export class AlphaSenderContextImpl implements AlphaSenderContext { fetch( callback?: (error: Error | null, item?: AlphaSenderInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -440,6 +447,7 @@ export function AlphaSenderListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -486,6 +494,7 @@ export function AlphaSenderListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/messaging/v1/service/channelSender.ts b/src/rest/messaging/v1/service/channelSender.ts index 103b724760..86cefe2995 100644 --- a/src/rest/messaging/v1/service/channelSender.ts +++ b/src/rest/messaging/v1/service/channelSender.ts @@ -122,11 +122,14 @@ export class ChannelSenderContextImpl implements ChannelSenderContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -139,11 +142,15 @@ export class ChannelSenderContextImpl implements ChannelSenderContext { fetch( callback?: (error: Error | null, item?: ChannelSenderInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -457,6 +464,7 @@ export function ChannelSenderListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -503,6 +511,7 @@ export function ChannelSenderListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/messaging/v1/service/phoneNumber.ts b/src/rest/messaging/v1/service/phoneNumber.ts index 4bea8d6ea3..e0d6d6b4b8 100644 --- a/src/rest/messaging/v1/service/phoneNumber.ts +++ b/src/rest/messaging/v1/service/phoneNumber.ts @@ -118,11 +118,14 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -135,11 +138,15 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { fetch( callback?: (error: Error | null, item?: PhoneNumberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -452,6 +459,7 @@ export function PhoneNumberListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -498,6 +506,7 @@ export function PhoneNumberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/messaging/v1/service/shortCode.ts b/src/rest/messaging/v1/service/shortCode.ts index 081ddf7177..eb52900c59 100644 --- a/src/rest/messaging/v1/service/shortCode.ts +++ b/src/rest/messaging/v1/service/shortCode.ts @@ -118,11 +118,14 @@ export class ShortCodeContextImpl implements ShortCodeContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -135,11 +138,15 @@ export class ShortCodeContextImpl implements ShortCodeContext { fetch( callback?: (error: Error | null, item?: ShortCodeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -450,6 +457,7 @@ export function ShortCodeListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -496,6 +504,7 @@ export function ShortCodeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/messaging/v1/service/usAppToPerson.ts b/src/rest/messaging/v1/service/usAppToPerson.ts index a230c6f2f4..470bcd1ddf 100644 --- a/src/rest/messaging/v1/service/usAppToPerson.ts +++ b/src/rest/messaging/v1/service/usAppToPerson.ts @@ -185,11 +185,14 @@ export class UsAppToPersonContextImpl implements UsAppToPersonContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -202,11 +205,15 @@ export class UsAppToPersonContextImpl implements UsAppToPersonContext { fetch( callback?: (error: Error | null, item?: UsAppToPersonInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -303,6 +310,7 @@ export class UsAppToPersonContextImpl implements UsAppToPersonContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -868,6 +876,7 @@ export function UsAppToPersonListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -914,6 +923,7 @@ export function UsAppToPersonListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/messaging/v1/service/usAppToPersonUsecase.ts b/src/rest/messaging/v1/service/usAppToPersonUsecase.ts index 8bca92e439..8b2e7875d2 100644 --- a/src/rest/messaging/v1/service/usAppToPersonUsecase.ts +++ b/src/rest/messaging/v1/service/usAppToPersonUsecase.ts @@ -98,6 +98,7 @@ export function UsAppToPersonUsecaseListInstance( data["BrandRegistrationSid"] = params["brandRegistrationSid"]; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.fetch({ diff --git a/src/rest/messaging/v1/tollfreeVerification.ts b/src/rest/messaging/v1/tollfreeVerification.ts index 221ef29fa3..65b4142736 100644 --- a/src/rest/messaging/v1/tollfreeVerification.ts +++ b/src/rest/messaging/v1/tollfreeVerification.ts @@ -271,11 +271,14 @@ export class TollfreeVerificationContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -288,11 +291,15 @@ export class TollfreeVerificationContextImpl fetch( callback?: (error: Error | null, item?: TollfreeVerificationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -378,6 +385,7 @@ export class TollfreeVerificationContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -1043,6 +1051,7 @@ export function TollfreeVerificationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -1091,6 +1100,7 @@ export function TollfreeVerificationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/messaging/v1/usecase.ts b/src/rest/messaging/v1/usecase.ts index d67020fcdb..9b08dce380 100644 --- a/src/rest/messaging/v1/usecase.ts +++ b/src/rest/messaging/v1/usecase.ts @@ -53,10 +53,14 @@ export function UsecaseListInstance(version: V1): UsecaseListInstance { instance.fetch = function fetch( callback?: (error: Error | null, items: UsecaseInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + let operationVersion = version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/microvisor/v1/accountConfig.ts b/src/rest/microvisor/v1/accountConfig.ts index 1852649550..e08eaa3b8f 100644 --- a/src/rest/microvisor/v1/accountConfig.ts +++ b/src/rest/microvisor/v1/accountConfig.ts @@ -136,11 +136,14 @@ export class AccountConfigContextImpl implements AccountConfigContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -153,11 +156,15 @@ export class AccountConfigContextImpl implements AccountConfigContext { fetch( callback?: (error: Error | null, item?: AccountConfigInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -194,6 +201,7 @@ export class AccountConfigContextImpl implements AccountConfigContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -490,6 +498,7 @@ export function AccountConfigListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -531,6 +540,7 @@ export function AccountConfigListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/microvisor/v1/accountSecret.ts b/src/rest/microvisor/v1/accountSecret.ts index cdd13d29f3..9ed558d0e5 100644 --- a/src/rest/microvisor/v1/accountSecret.ts +++ b/src/rest/microvisor/v1/accountSecret.ts @@ -136,11 +136,14 @@ export class AccountSecretContextImpl implements AccountSecretContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -153,11 +156,15 @@ export class AccountSecretContextImpl implements AccountSecretContext { fetch( callback?: (error: Error | null, item?: AccountSecretInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -194,6 +201,7 @@ export class AccountSecretContextImpl implements AccountSecretContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -483,6 +491,7 @@ export function AccountSecretListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -524,6 +533,7 @@ export function AccountSecretListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/microvisor/v1/app.ts b/src/rest/microvisor/v1/app.ts index a7c01ebd81..b1717cca36 100644 --- a/src/rest/microvisor/v1/app.ts +++ b/src/rest/microvisor/v1/app.ts @@ -118,11 +118,14 @@ export class AppContextImpl implements AppContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -135,11 +138,15 @@ export class AppContextImpl implements AppContext { fetch( callback?: (error: Error | null, item?: AppInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -410,6 +417,7 @@ export function AppListInstance(version: V1): AppListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/microvisor/v1/app/appManifest.ts b/src/rest/microvisor/v1/app/appManifest.ts index feb4a1b43a..48ce270f97 100644 --- a/src/rest/microvisor/v1/app/appManifest.ts +++ b/src/rest/microvisor/v1/app/appManifest.ts @@ -57,11 +57,15 @@ export class AppManifestContextImpl implements AppManifestContext { fetch( callback?: (error: Error | null, item?: AppManifestInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/microvisor/v1/device.ts b/src/rest/microvisor/v1/device.ts index 147943b917..b08f880f6e 100644 --- a/src/rest/microvisor/v1/device.ts +++ b/src/rest/microvisor/v1/device.ts @@ -153,11 +153,15 @@ export class DeviceContextImpl implements DeviceContext { fetch( callback?: (error: Error | null, item?: DeviceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -198,6 +202,7 @@ export class DeviceContextImpl implements DeviceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -510,6 +515,7 @@ export function DeviceListInstance(version: V1): DeviceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/microvisor/v1/device/deviceConfig.ts b/src/rest/microvisor/v1/device/deviceConfig.ts index 4d83dc334c..d2ccc54cc8 100644 --- a/src/rest/microvisor/v1/device/deviceConfig.ts +++ b/src/rest/microvisor/v1/device/deviceConfig.ts @@ -141,11 +141,14 @@ export class DeviceConfigContextImpl implements DeviceConfigContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -158,11 +161,15 @@ export class DeviceConfigContextImpl implements DeviceConfigContext { fetch( callback?: (error: Error | null, item?: DeviceConfigInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -200,6 +207,7 @@ export class DeviceConfigContextImpl implements DeviceConfigContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -510,6 +518,7 @@ export function DeviceConfigListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -556,6 +565,7 @@ export function DeviceConfigListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/microvisor/v1/device/deviceSecret.ts b/src/rest/microvisor/v1/device/deviceSecret.ts index 34caca5ad8..3ac2ef0a77 100644 --- a/src/rest/microvisor/v1/device/deviceSecret.ts +++ b/src/rest/microvisor/v1/device/deviceSecret.ts @@ -141,11 +141,14 @@ export class DeviceSecretContextImpl implements DeviceSecretContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -158,11 +161,15 @@ export class DeviceSecretContextImpl implements DeviceSecretContext { fetch( callback?: (error: Error | null, item?: DeviceSecretInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -200,6 +207,7 @@ export class DeviceSecretContextImpl implements DeviceSecretContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -503,6 +511,7 @@ export function DeviceSecretListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -549,6 +558,7 @@ export function DeviceSecretListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/monitor/v1/alert.ts b/src/rest/monitor/v1/alert.ts index 23f612f68f..fcd38ac01d 100644 --- a/src/rest/monitor/v1/alert.ts +++ b/src/rest/monitor/v1/alert.ts @@ -113,11 +113,15 @@ export class AlertContextImpl implements AlertContext { fetch( callback?: (error: Error | null, item?: AlertInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -453,6 +457,7 @@ export function AlertListInstance(version: V1): AlertListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/monitor/v1/event.ts b/src/rest/monitor/v1/event.ts index b6b096be78..01c7e94b80 100644 --- a/src/rest/monitor/v1/event.ts +++ b/src/rest/monitor/v1/event.ts @@ -131,11 +131,15 @@ export class EventContextImpl implements EventContext { fetch( callback?: (error: Error | null, item?: EventInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -442,6 +446,7 @@ export function EventListInstance(version: V1): EventListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/notify/v1/credential.ts b/src/rest/notify/v1/credential.ts index 9e0371dcba..7cecb2ced7 100644 --- a/src/rest/notify/v1/credential.ts +++ b/src/rest/notify/v1/credential.ts @@ -168,11 +168,14 @@ export class CredentialContextImpl implements CredentialContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -185,11 +188,15 @@ export class CredentialContextImpl implements CredentialContext { fetch( callback?: (error: Error | null, item?: CredentialInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -236,6 +243,7 @@ export class CredentialContextImpl implements CredentialContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -566,6 +574,7 @@ export function CredentialListInstance(version: V1): CredentialListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -607,6 +616,7 @@ export function CredentialListInstance(version: V1): CredentialListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/notify/v1/service.ts b/src/rest/notify/v1/service.ts index 9e008d5fbd..5fbdd0d83d 100644 --- a/src/rest/notify/v1/service.ts +++ b/src/rest/notify/v1/service.ts @@ -223,11 +223,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -240,11 +243,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -311,6 +318,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -776,6 +784,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -819,6 +828,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/notify/v1/service/binding.ts b/src/rest/notify/v1/service/binding.ts index 8b9d567036..8899484dd9 100644 --- a/src/rest/notify/v1/service/binding.ts +++ b/src/rest/notify/v1/service/binding.ts @@ -162,11 +162,14 @@ export class BindingContextImpl implements BindingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -179,11 +182,15 @@ export class BindingContextImpl implements BindingContext { fetch( callback?: (error: Error | null, item?: BindingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -546,6 +553,7 @@ export function BindingListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -600,6 +608,7 @@ export function BindingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/notify/v1/service/notification.ts b/src/rest/notify/v1/service/notification.ts index 1ffb83cdbd..c29d2a96b9 100644 --- a/src/rest/notify/v1/service/notification.ts +++ b/src/rest/notify/v1/service/notification.ts @@ -163,6 +163,7 @@ export function NotificationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/numbers/v1/bulkEligibility.ts b/src/rest/numbers/v1/bulkEligibility.ts index 64290c3d8b..085bc46acb 100644 --- a/src/rest/numbers/v1/bulkEligibility.ts +++ b/src/rest/numbers/v1/bulkEligibility.ts @@ -65,11 +65,15 @@ export class BulkEligibilityContextImpl implements BulkEligibilityContext { fetch( callback?: (error: Error | null, item?: BulkEligibilityInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -223,12 +227,14 @@ export interface BulkEligibilityListInstance { * Create a BulkEligibilityInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed BulkEligibilityInstance */ create( params: object, + headers?: any, callback?: (error: Error | null, item?: BulkEligibilityInstance) => any ): Promise; @@ -257,6 +263,7 @@ export function BulkEligibilityListInstance( params?: | object | ((error: Error | null, items: BulkEligibilityInstance) => any), + headers?: any, callback?: (error: Error | null, items: BulkEligibilityInstance) => any ): Promise { if (params instanceof Function) { @@ -270,8 +277,12 @@ export function BulkEligibilityListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/numbers/v1/eligibility.ts b/src/rest/numbers/v1/eligibility.ts index f57647a5b9..519efac96f 100644 --- a/src/rest/numbers/v1/eligibility.ts +++ b/src/rest/numbers/v1/eligibility.ts @@ -47,12 +47,14 @@ export interface EligibilityListInstance { * Create a EligibilityInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed EligibilityInstance */ create( params: object, + headers?: any, callback?: (error: Error | null, item?: EligibilityInstance) => any ): Promise; @@ -74,6 +76,7 @@ export function EligibilityListInstance(version: V1): EligibilityListInstance { params?: | object | ((error: Error | null, items: EligibilityInstance) => any), + headers?: any, callback?: (error: Error | null, items: EligibilityInstance) => any ): Promise { if (params instanceof Function) { @@ -87,8 +90,12 @@ export function EligibilityListInstance(version: V1): EligibilityListInstance { data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/numbers/v1/portingPortIn.ts b/src/rest/numbers/v1/portingPortIn.ts index 5bb3273933..6246a1d2b2 100644 --- a/src/rest/numbers/v1/portingPortIn.ts +++ b/src/rest/numbers/v1/portingPortIn.ts @@ -76,11 +76,14 @@ export class PortingPortInContextImpl implements PortingPortInContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -93,11 +96,15 @@ export class PortingPortInContextImpl implements PortingPortInContext { fetch( callback?: (error: Error | null, item?: PortingPortInInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -306,12 +313,14 @@ export interface PortingPortInListInstance { * Create a PortingPortInInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed PortingPortInInstance */ create( params: object, + headers?: any, callback?: (error: Error | null, item?: PortingPortInInstance) => any ): Promise; @@ -340,6 +349,7 @@ export function PortingPortInListInstance( params?: | object | ((error: Error | null, items: PortingPortInInstance) => any), + headers?: any, callback?: (error: Error | null, items: PortingPortInInstance) => any ): Promise { if (params instanceof Function) { @@ -353,8 +363,12 @@ export function PortingPortInListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/numbers/v1/portingPortInPhoneNumber.ts b/src/rest/numbers/v1/portingPortInPhoneNumber.ts index 6a285913e0..bf21c19f97 100644 --- a/src/rest/numbers/v1/portingPortInPhoneNumber.ts +++ b/src/rest/numbers/v1/portingPortInPhoneNumber.ts @@ -82,11 +82,14 @@ export class PortingPortInPhoneNumberContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -102,11 +105,15 @@ export class PortingPortInPhoneNumberContextImpl item?: PortingPortInPhoneNumberInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/numbers/v1/portingPortability.ts b/src/rest/numbers/v1/portingPortability.ts index 9359872440..e7bf482c7e 100644 --- a/src/rest/numbers/v1/portingPortability.ts +++ b/src/rest/numbers/v1/portingPortability.ts @@ -105,6 +105,7 @@ export class PortingPortabilityContextImpl data["AddressSid"] = params["addressSid"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/numbers/v1/portingWebhookConfiguration.ts b/src/rest/numbers/v1/portingWebhookConfiguration.ts index e28dfb3e7b..d61d17fd87 100644 --- a/src/rest/numbers/v1/portingWebhookConfiguration.ts +++ b/src/rest/numbers/v1/portingWebhookConfiguration.ts @@ -50,12 +50,14 @@ export interface PortingWebhookConfigurationListInstance { * Create a PortingWebhookConfigurationInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed PortingWebhookConfigurationInstance */ create( params: object, + headers?: any, callback?: ( error: Error | null, item?: PortingWebhookConfigurationInstance @@ -85,6 +87,7 @@ export function PortingWebhookConfigurationListInstance( error: Error | null, items: PortingWebhookConfigurationInstance ) => any), + headers?: any, callback?: ( error: Error | null, items: PortingWebhookConfigurationInstance @@ -101,8 +104,12 @@ export function PortingWebhookConfigurationListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/numbers/v1/portingWebhookConfigurationDelete.ts b/src/rest/numbers/v1/portingWebhookConfigurationDelete.ts index 8d0181c962..abeee9ffaf 100644 --- a/src/rest/numbers/v1/portingWebhookConfigurationDelete.ts +++ b/src/rest/numbers/v1/portingWebhookConfigurationDelete.ts @@ -66,11 +66,14 @@ export class PortingWebhookConfigurationDeleteContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( diff --git a/src/rest/numbers/v1/signingRequestConfiguration.ts b/src/rest/numbers/v1/signingRequestConfiguration.ts index e39126473a..8398269ae5 100644 --- a/src/rest/numbers/v1/signingRequestConfiguration.ts +++ b/src/rest/numbers/v1/signingRequestConfiguration.ts @@ -102,12 +102,14 @@ export interface SigningRequestConfigurationListInstance { * Create a SigningRequestConfigurationInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed SigningRequestConfigurationInstance */ create( params: object, + headers?: any, callback?: ( error: Error | null, item?: SigningRequestConfigurationInstance @@ -227,6 +229,7 @@ export function SigningRequestConfigurationListInstance( error: Error | null, items: SigningRequestConfigurationInstance ) => any), + headers?: any, callback?: ( error: Error | null, items: SigningRequestConfigurationInstance @@ -243,8 +246,12 @@ export function SigningRequestConfigurationListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -292,6 +299,7 @@ export function SigningRequestConfigurationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v1/webhook.ts b/src/rest/numbers/v1/webhook.ts index fb632f5738..f48c9294e3 100644 --- a/src/rest/numbers/v1/webhook.ts +++ b/src/rest/numbers/v1/webhook.ts @@ -53,10 +53,14 @@ export function WebhookListInstance(version: V1): WebhookListInstance { instance.fetch = function fetch( callback?: (error: Error | null, items: WebhookInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + let operationVersion = version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/numbers/v2/authorizationDocument.ts b/src/rest/numbers/v2/authorizationDocument.ts index 27692bbea3..a2d445ffce 100644 --- a/src/rest/numbers/v2/authorizationDocument.ts +++ b/src/rest/numbers/v2/authorizationDocument.ts @@ -162,11 +162,14 @@ export class AuthorizationDocumentContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -182,11 +185,15 @@ export class AuthorizationDocumentContextImpl item?: AuthorizationDocumentInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -536,6 +543,7 @@ export function AuthorizationDocumentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -579,6 +587,7 @@ export function AuthorizationDocumentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.ts b/src/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.ts index 22c8228136..795c54ddd2 100644 --- a/src/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.ts +++ b/src/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.ts @@ -244,6 +244,7 @@ export function DependentHostedNumberOrderListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/bulkHostedNumberOrder.ts b/src/rest/numbers/v2/bulkHostedNumberOrder.ts index 480070f1b2..77187ef0fa 100644 --- a/src/rest/numbers/v2/bulkHostedNumberOrder.ts +++ b/src/rest/numbers/v2/bulkHostedNumberOrder.ts @@ -117,6 +117,7 @@ export class BulkHostedNumberOrderContextImpl data["OrderStatus"] = params["orderStatus"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -327,12 +328,14 @@ export interface BulkHostedNumberOrderListInstance { * Create a BulkHostedNumberOrderInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed BulkHostedNumberOrderInstance */ create( params: object, + headers?: any, callback?: ( error: Error | null, item?: BulkHostedNumberOrderInstance @@ -364,6 +367,7 @@ export function BulkHostedNumberOrderListInstance( params?: | object | ((error: Error | null, items: BulkHostedNumberOrderInstance) => any), + headers?: any, callback?: ( error: Error | null, items: BulkHostedNumberOrderInstance @@ -380,8 +384,12 @@ export function BulkHostedNumberOrderListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/numbers/v2/bundleClone.ts b/src/rest/numbers/v2/bundleClone.ts index 85509b98d1..93ea94b519 100644 --- a/src/rest/numbers/v2/bundleClone.ts +++ b/src/rest/numbers/v2/bundleClone.ts @@ -103,6 +103,7 @@ export class BundleCloneContextImpl implements BundleCloneContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/numbers/v2/hostedNumberOrder.ts b/src/rest/numbers/v2/hostedNumberOrder.ts index 3f9e19a457..21e093c304 100644 --- a/src/rest/numbers/v2/hostedNumberOrder.ts +++ b/src/rest/numbers/v2/hostedNumberOrder.ts @@ -186,11 +186,14 @@ export class HostedNumberOrderContextImpl implements HostedNumberOrderContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -203,11 +206,15 @@ export class HostedNumberOrderContextImpl implements HostedNumberOrderContext { fetch( callback?: (error: Error | null, item?: HostedNumberOrderInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -619,6 +626,7 @@ export function HostedNumberOrderListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -669,6 +677,7 @@ export function HostedNumberOrderListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/bundle.ts b/src/rest/numbers/v2/regulatoryCompliance/bundle.ts index 39f118e9d0..9c7e8f3e91 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/bundle.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/bundle.ts @@ -286,11 +286,14 @@ export class BundleContextImpl implements BundleContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -303,11 +306,15 @@ export class BundleContextImpl implements BundleContext { fetch( callback?: (error: Error | null, item?: BundleInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -346,6 +353,7 @@ export class BundleContextImpl implements BundleContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -734,6 +742,7 @@ export function BundleListInstance(version: V2): BundleListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -801,6 +810,7 @@ export function BundleListInstance(version: V2): BundleListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.ts b/src/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.ts index d315ae9a02..c8b7637af7 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.ts @@ -213,6 +213,7 @@ export function BundleCopyListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -259,6 +260,7 @@ export function BundleCopyListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.ts b/src/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.ts index 1d2b280539..eed6d03e2f 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.ts @@ -102,11 +102,15 @@ export class EvaluationContextImpl implements EvaluationContext { fetch( callback?: (error: Error | null, item?: EvaluationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -368,10 +372,14 @@ export function EvaluationListInstance( instance.create = function create( callback?: (error: Error | null, items: EvaluationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + let operationVersion = version, operationPromise = operationVersion.create({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( @@ -411,6 +419,7 @@ export function EvaluationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.ts b/src/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.ts index 435c46a6ee..6593d72077 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.ts @@ -121,11 +121,14 @@ export class ItemAssignmentContextImpl implements ItemAssignmentContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -138,11 +141,15 @@ export class ItemAssignmentContextImpl implements ItemAssignmentContext { fetch( callback?: (error: Error | null, item?: ItemAssignmentInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -435,6 +442,7 @@ export function ItemAssignmentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -481,6 +489,7 @@ export function ItemAssignmentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.ts b/src/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.ts index e605940f32..008da52cb7 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.ts @@ -100,6 +100,7 @@ export function ReplaceItemsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/endUser.ts b/src/rest/numbers/v2/regulatoryCompliance/endUser.ts index bc9e48d9fa..668c344c36 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/endUser.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/endUser.ts @@ -152,11 +152,14 @@ export class EndUserContextImpl implements EndUserContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -169,11 +172,15 @@ export class EndUserContextImpl implements EndUserContext { fetch( callback?: (error: Error | null, item?: EndUserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -210,6 +217,7 @@ export class EndUserContextImpl implements EndUserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -533,6 +541,7 @@ export function EndUserListInstance(version: V2): EndUserListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -574,6 +583,7 @@ export function EndUserListInstance(version: V2): EndUserListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/endUserType.ts b/src/rest/numbers/v2/regulatoryCompliance/endUserType.ts index e24031d073..036272d235 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/endUserType.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/endUserType.ts @@ -95,11 +95,15 @@ export class EndUserTypeContextImpl implements EndUserTypeContext { fetch( callback?: (error: Error | null, item?: EndUserTypeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -341,6 +345,7 @@ export function EndUserTypeListInstance(version: V2): EndUserTypeListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/regulation.ts b/src/rest/numbers/v2/regulatoryCompliance/regulation.ts index 655f950910..0be116318c 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/regulation.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/regulation.ts @@ -156,6 +156,7 @@ export class RegulationContextImpl implements RegulationContext { data["IncludeConstraints"] = serialize.bool(params["includeConstraints"]); const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -441,6 +442,7 @@ export function RegulationListInstance(version: V2): RegulationListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/supportingDocument.ts b/src/rest/numbers/v2/regulatoryCompliance/supportingDocument.ts index 34aa7c3a4d..e55dc474f2 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/supportingDocument.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/supportingDocument.ts @@ -163,11 +163,14 @@ export class SupportingDocumentContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -180,11 +183,15 @@ export class SupportingDocumentContextImpl fetch( callback?: (error: Error | null, item?: SupportingDocumentInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -225,6 +232,7 @@ export class SupportingDocumentContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -593,6 +601,7 @@ export function SupportingDocumentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -634,6 +643,7 @@ export function SupportingDocumentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.ts b/src/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.ts index 02ed9c8855..2f53780669 100644 --- a/src/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.ts +++ b/src/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.ts @@ -106,11 +106,15 @@ export class SupportingDocumentTypeContextImpl item?: SupportingDocumentTypeInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -370,6 +374,7 @@ export function SupportingDocumentTypeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/oauth/v1/authorize.ts b/src/rest/oauth/v1/authorize.ts index 651e95b6b3..9e0f57547d 100644 --- a/src/rest/oauth/v1/authorize.ts +++ b/src/rest/oauth/v1/authorize.ts @@ -102,6 +102,7 @@ export function AuthorizeListInstance(version: V1): AuthorizeListInstance { if (params["state"] !== undefined) data["State"] = params["state"]; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.fetch({ diff --git a/src/rest/oauth/v1/token.ts b/src/rest/oauth/v1/token.ts index cfaf8d5359..bec6b01436 100644 --- a/src/rest/oauth/v1/token.ts +++ b/src/rest/oauth/v1/token.ts @@ -107,6 +107,7 @@ export function TokenListInstance(version: V1): TokenListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/preview/hosted_numbers/authorizationDocument.ts b/src/rest/preview/hosted_numbers/authorizationDocument.ts index 4c49e850ca..e791d277b2 100644 --- a/src/rest/preview/hosted_numbers/authorizationDocument.ts +++ b/src/rest/preview/hosted_numbers/authorizationDocument.ts @@ -203,11 +203,15 @@ export class AuthorizationDocumentContextImpl item?: AuthorizationDocumentInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -262,6 +266,7 @@ export class AuthorizationDocumentContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -652,6 +657,7 @@ export function AuthorizationDocumentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -695,6 +701,7 @@ export function AuthorizationDocumentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.ts b/src/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.ts index e1a712ede7..630abd6d9d 100644 --- a/src/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.ts +++ b/src/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.ts @@ -258,6 +258,7 @@ export function DependentHostedNumberOrderListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/hosted_numbers/hostedNumberOrder.ts b/src/rest/preview/hosted_numbers/hostedNumberOrder.ts index ee9164185f..f907b4bdc0 100644 --- a/src/rest/preview/hosted_numbers/hostedNumberOrder.ts +++ b/src/rest/preview/hosted_numbers/hostedNumberOrder.ts @@ -241,11 +241,14 @@ export class HostedNumberOrderContextImpl implements HostedNumberOrderContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -258,11 +261,15 @@ export class HostedNumberOrderContextImpl implements HostedNumberOrderContext { fetch( callback?: (error: Error | null, item?: HostedNumberOrderInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -317,6 +324,7 @@ export class HostedNumberOrderContextImpl implements HostedNumberOrderContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -786,6 +794,7 @@ export function HostedNumberOrderListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -836,6 +845,7 @@ export function HostedNumberOrderListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/marketplace/availableAddOn.ts b/src/rest/preview/marketplace/availableAddOn.ts index 50345400ea..59a2d3b616 100644 --- a/src/rest/preview/marketplace/availableAddOn.ts +++ b/src/rest/preview/marketplace/availableAddOn.ts @@ -110,11 +110,15 @@ export class AvailableAddOnContextImpl implements AvailableAddOnContext { fetch( callback?: (error: Error | null, item?: AvailableAddOnInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -385,6 +389,7 @@ export function AvailableAddOnListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/marketplace/availableAddOn/availableAddOnExtension.ts b/src/rest/preview/marketplace/availableAddOn/availableAddOnExtension.ts index ae2b742c54..da9f60ba28 100644 --- a/src/rest/preview/marketplace/availableAddOn/availableAddOnExtension.ts +++ b/src/rest/preview/marketplace/availableAddOn/availableAddOnExtension.ts @@ -115,11 +115,15 @@ export class AvailableAddOnExtensionContextImpl item?: AvailableAddOnExtensionInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -403,6 +407,7 @@ export function AvailableAddOnExtensionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/marketplace/installedAddOn.ts b/src/rest/preview/marketplace/installedAddOn.ts index d1ec97b731..16110d580e 100644 --- a/src/rest/preview/marketplace/installedAddOn.ts +++ b/src/rest/preview/marketplace/installedAddOn.ts @@ -167,11 +167,14 @@ export class InstalledAddOnContextImpl implements InstalledAddOnContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -184,11 +187,15 @@ export class InstalledAddOnContextImpl implements InstalledAddOnContext { fetch( callback?: (error: Error | null, item?: InstalledAddOnInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -229,6 +236,7 @@ export class InstalledAddOnContextImpl implements InstalledAddOnContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -603,6 +611,7 @@ export function InstalledAddOnListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -644,6 +653,7 @@ export function InstalledAddOnListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/marketplace/installedAddOn/installedAddOnExtension.ts b/src/rest/preview/marketplace/installedAddOn/installedAddOnExtension.ts index 602e5667e6..448434a3ee 100644 --- a/src/rest/preview/marketplace/installedAddOn/installedAddOnExtension.ts +++ b/src/rest/preview/marketplace/installedAddOn/installedAddOnExtension.ts @@ -138,11 +138,15 @@ export class InstalledAddOnExtensionContextImpl item?: InstalledAddOnExtensionInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -183,6 +187,7 @@ export class InstalledAddOnExtensionContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -507,6 +512,7 @@ export function InstalledAddOnExtensionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/sync/service.ts b/src/rest/preview/sync/service.ts index 29992cbd07..24aa9a0592 100644 --- a/src/rest/preview/sync/service.ts +++ b/src/rest/preview/sync/service.ts @@ -187,11 +187,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -204,11 +207,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -251,6 +258,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -595,6 +603,7 @@ export function ServiceListInstance(version: Sync): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -636,6 +645,7 @@ export function ServiceListInstance(version: Sync): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/sync/service/document.ts b/src/rest/preview/sync/service/document.ts index e1f9e02a34..87902b87be 100644 --- a/src/rest/preview/sync/service/document.ts +++ b/src/rest/preview/sync/service/document.ts @@ -159,11 +159,14 @@ export class DocumentContextImpl implements DocumentContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -176,11 +179,15 @@ export class DocumentContextImpl implements DocumentContext { fetch( callback?: (error: Error | null, item?: DocumentInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -218,6 +225,7 @@ export class DocumentContextImpl implements DocumentContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -557,6 +565,7 @@ export function DocumentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -603,6 +612,7 @@ export function DocumentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/sync/service/document/documentPermission.ts b/src/rest/preview/sync/service/document/documentPermission.ts index ef4c458b76..7b361d0a17 100644 --- a/src/rest/preview/sync/service/document/documentPermission.ts +++ b/src/rest/preview/sync/service/document/documentPermission.ts @@ -150,11 +150,14 @@ export class DocumentPermissionContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -167,11 +170,15 @@ export class DocumentPermissionContextImpl fetch( callback?: (error: Error | null, item?: DocumentPermissionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -222,6 +229,7 @@ export class DocumentPermissionContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -565,6 +573,7 @@ export function DocumentPermissionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/sync/service/syncList.ts b/src/rest/preview/sync/service/syncList.ts index ff60cfcd61..e1c95184be 100644 --- a/src/rest/preview/sync/service/syncList.ts +++ b/src/rest/preview/sync/service/syncList.ts @@ -148,11 +148,14 @@ export class SyncListContextImpl implements SyncListContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -165,11 +168,15 @@ export class SyncListContextImpl implements SyncListContext { fetch( callback?: (error: Error | null, item?: SyncListInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -480,6 +487,7 @@ export function SyncListListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -526,6 +534,7 @@ export function SyncListListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/sync/service/syncList/syncListItem.ts b/src/rest/preview/sync/service/syncList/syncListItem.ts index 2c91e6be62..d859a81332 100644 --- a/src/rest/preview/sync/service/syncList/syncListItem.ts +++ b/src/rest/preview/sync/service/syncList/syncListItem.ts @@ -228,11 +228,15 @@ export class SyncListItemContextImpl implements SyncListItemContext { fetch( callback?: (error: Error | null, item?: SyncListItemInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -271,6 +275,7 @@ export class SyncListItemContextImpl implements SyncListItemContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -611,6 +616,7 @@ export function SyncListItemListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -661,6 +667,7 @@ export function SyncListItemListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/sync/service/syncList/syncListPermission.ts b/src/rest/preview/sync/service/syncList/syncListPermission.ts index 556dd378da..0ef4f24600 100644 --- a/src/rest/preview/sync/service/syncList/syncListPermission.ts +++ b/src/rest/preview/sync/service/syncList/syncListPermission.ts @@ -150,11 +150,14 @@ export class SyncListPermissionContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -167,11 +170,15 @@ export class SyncListPermissionContextImpl fetch( callback?: (error: Error | null, item?: SyncListPermissionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -222,6 +229,7 @@ export class SyncListPermissionContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -565,6 +573,7 @@ export function SyncListPermissionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/sync/service/syncMap.ts b/src/rest/preview/sync/service/syncMap.ts index e06a62bc93..652b14c75e 100644 --- a/src/rest/preview/sync/service/syncMap.ts +++ b/src/rest/preview/sync/service/syncMap.ts @@ -148,11 +148,14 @@ export class SyncMapContextImpl implements SyncMapContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -165,11 +168,15 @@ export class SyncMapContextImpl implements SyncMapContext { fetch( callback?: (error: Error | null, item?: SyncMapInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -480,6 +487,7 @@ export function SyncMapListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -526,6 +534,7 @@ export function SyncMapListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/sync/service/syncMap/syncMapItem.ts b/src/rest/preview/sync/service/syncMap/syncMapItem.ts index fe03d28a2e..8e0af710ef 100644 --- a/src/rest/preview/sync/service/syncMap/syncMapItem.ts +++ b/src/rest/preview/sync/service/syncMap/syncMapItem.ts @@ -230,11 +230,15 @@ export class SyncMapItemContextImpl implements SyncMapItemContext { fetch( callback?: (error: Error | null, item?: SyncMapItemInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -273,6 +277,7 @@ export class SyncMapItemContextImpl implements SyncMapItemContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -619,6 +624,7 @@ export function SyncMapItemListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -669,6 +675,7 @@ export function SyncMapItemListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/sync/service/syncMap/syncMapPermission.ts b/src/rest/preview/sync/service/syncMap/syncMapPermission.ts index e2df61e773..f39cfd3c32 100644 --- a/src/rest/preview/sync/service/syncMap/syncMapPermission.ts +++ b/src/rest/preview/sync/service/syncMap/syncMapPermission.ts @@ -148,11 +148,14 @@ export class SyncMapPermissionContextImpl implements SyncMapPermissionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -165,11 +168,15 @@ export class SyncMapPermissionContextImpl implements SyncMapPermissionContext { fetch( callback?: (error: Error | null, item?: SyncMapPermissionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -220,6 +227,7 @@ export class SyncMapPermissionContextImpl implements SyncMapPermissionContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -563,6 +571,7 @@ export function SyncMapPermissionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/wireless/command.ts b/src/rest/preview/wireless/command.ts index aa96dba648..5f59c2e7ff 100644 --- a/src/rest/preview/wireless/command.ts +++ b/src/rest/preview/wireless/command.ts @@ -138,11 +138,15 @@ export class CommandContextImpl implements CommandContext { fetch( callback?: (error: Error | null, item?: CommandInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -409,6 +413,7 @@ export function CommandListInstance(version: Wireless): CommandListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -455,6 +460,7 @@ export function CommandListInstance(version: Wireless): CommandListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/wireless/ratePlan.ts b/src/rest/preview/wireless/ratePlan.ts index db8b4581fc..ebf33c1af5 100644 --- a/src/rest/preview/wireless/ratePlan.ts +++ b/src/rest/preview/wireless/ratePlan.ts @@ -164,11 +164,14 @@ export class RatePlanContextImpl implements RatePlanContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -181,11 +184,15 @@ export class RatePlanContextImpl implements RatePlanContext { fetch( callback?: (error: Error | null, item?: RatePlanInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -222,6 +229,7 @@ export class RatePlanContextImpl implements RatePlanContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -576,6 +584,7 @@ export function RatePlanListInstance(version: Wireless): RatePlanListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -617,6 +626,7 @@ export function RatePlanListInstance(version: Wireless): RatePlanListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/wireless/sim.ts b/src/rest/preview/wireless/sim.ts index 6fe57c8664..5466cefac9 100644 --- a/src/rest/preview/wireless/sim.ts +++ b/src/rest/preview/wireless/sim.ts @@ -196,11 +196,15 @@ export class SimContextImpl implements SimContext { fetch( callback?: (error: Error | null, item?: SimInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -261,6 +265,7 @@ export class SimContextImpl implements SimContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -601,6 +606,7 @@ export function SimListInstance(version: Wireless): SimListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/preview/wireless/sim/usage.ts b/src/rest/preview/wireless/sim/usage.ts index a3b17eb51d..e6c6598b23 100644 --- a/src/rest/preview/wireless/sim/usage.ts +++ b/src/rest/preview/wireless/sim/usage.ts @@ -95,6 +95,7 @@ export class UsageContextImpl implements UsageContext { if (params["start"] !== undefined) data["Start"] = params["start"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/pricing/v1/messaging/country.ts b/src/rest/pricing/v1/messaging/country.ts index 72cf4eea23..f584a2d0c0 100644 --- a/src/rest/pricing/v1/messaging/country.ts +++ b/src/rest/pricing/v1/messaging/country.ts @@ -21,9 +21,9 @@ const serialize = require("../../../../base/serialize"); import { isValidPathParam } from "../../../../base/utility"; export class PricingV1MessagingMessagingCountryInstanceInboundSmsPrices { - "basePrice"?: number; - "currentPrice"?: number; - "numberType"?: string; + "base_price"?: number; + "current_price"?: number; + "number_type"?: string; } export class PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices { @@ -34,9 +34,9 @@ export class PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices { } export class PricingV1MessagingMessagingCountryInstanceOutboundSmsPricesPrices { - "basePrice"?: number; - "currentPrice"?: number; - "numberType"?: string; + "base_price"?: number; + "current_price"?: number; + "number_type"?: string; } /** @@ -114,11 +114,15 @@ export class CountryContextImpl implements CountryContext { fetch( callback?: (error: Error | null, item?: CountryInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -368,6 +372,7 @@ export function CountryListInstance(version: V1): CountryListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/pricing/v1/phoneNumber/country.ts b/src/rest/pricing/v1/phoneNumber/country.ts index 6d6c45639a..7ba7f8146a 100644 --- a/src/rest/pricing/v1/phoneNumber/country.ts +++ b/src/rest/pricing/v1/phoneNumber/country.ts @@ -21,9 +21,9 @@ const serialize = require("../../../../base/serialize"); import { isValidPathParam } from "../../../../base/utility"; export class PricingV1PhoneNumberPhoneNumberCountryInstancePhoneNumberPrices { - "basePrice"?: number; - "currentPrice"?: number; - "numberType"?: string; + "base_price"?: number; + "current_price"?: number; + "number_type"?: string; } /** @@ -101,11 +101,15 @@ export class CountryContextImpl implements CountryContext { fetch( callback?: (error: Error | null, item?: CountryInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -348,6 +352,7 @@ export function CountryListInstance(version: V1): CountryListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/pricing/v1/voice/country.ts b/src/rest/pricing/v1/voice/country.ts index 0b62639675..090ba7217c 100644 --- a/src/rest/pricing/v1/voice/country.ts +++ b/src/rest/pricing/v1/voice/country.ts @@ -21,16 +21,16 @@ const serialize = require("../../../../base/serialize"); import { isValidPathParam } from "../../../../base/utility"; export class PricingV1VoiceVoiceCountryInstanceInboundCallPrices { - "basePrice"?: number; - "currentPrice"?: number; - "numberType"?: string; + "base_price"?: number; + "current_price"?: number; + "number_type"?: string; } export class PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices { "prefixes"?: Array; - "basePrice"?: number; - "currentPrice"?: number; - "friendlyName"?: string; + "base_price"?: number; + "current_price"?: number; + "friendly_name"?: string; } /** @@ -108,11 +108,15 @@ export class CountryContextImpl implements CountryContext { fetch( callback?: (error: Error | null, item?: CountryInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -362,6 +366,7 @@ export function CountryListInstance(version: V1): CountryListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/pricing/v1/voice/number.ts b/src/rest/pricing/v1/voice/number.ts index 6b24f76f2e..0f909ab172 100644 --- a/src/rest/pricing/v1/voice/number.ts +++ b/src/rest/pricing/v1/voice/number.ts @@ -22,17 +22,17 @@ import { isValidPathParam } from "../../../../base/utility"; * The [InboundCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price) record. If `null`, the Phone Number is not a Twilio number owned by this account. */ export class PricingV1VoiceVoiceNumberInboundCallPrice { - "basePrice"?: number; - "currentPrice"?: number; - "numberType"?: string; + "base_price"?: number; + "current_price"?: number; + "number_type"?: string; } /** * The OutboundCallPrice record, which includes a list of `origination_prefixes` and the `base_price` and `current_price` for those prefixes. */ export class PricingV1VoiceVoiceNumberOutboundCallPrice { - "basePrice"?: number; - "currentPrice"?: number; + "base_price"?: number; + "current_price"?: number; } export interface NumberContext { @@ -74,11 +74,15 @@ export class NumberContextImpl implements NumberContext { fetch( callback?: (error: Error | null, item?: NumberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/pricing/v2/country.ts b/src/rest/pricing/v2/country.ts index 8a31b21293..030b87820a 100644 --- a/src/rest/pricing/v2/country.ts +++ b/src/rest/pricing/v2/country.ts @@ -21,17 +21,17 @@ const serialize = require("../../../base/serialize"); import { isValidPathParam } from "../../../base/utility"; export class PricingV2TrunkingCountryInstanceOriginatingCallPrices { - "basePrice"?: number; - "currentPrice"?: number; - "numberType"?: string; + "base_price"?: number; + "current_price"?: number; + "number_type"?: string; } export class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices { - "originationPrefixes"?: Array; - "destinationPrefixes"?: Array; - "basePrice"?: number; - "currentPrice"?: number; - "friendlyName"?: string; + "origination_prefixes"?: Array; + "destination_prefixes"?: Array; + "base_price"?: number; + "current_price"?: number; + "friendly_name"?: string; } /** @@ -109,11 +109,15 @@ export class CountryContextImpl implements CountryContext { fetch( callback?: (error: Error | null, item?: CountryInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -363,6 +367,7 @@ export function CountryListInstance(version: V2): CountryListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/pricing/v2/number.ts b/src/rest/pricing/v2/number.ts index 7670572a1b..9cd37bed3d 100644 --- a/src/rest/pricing/v2/number.ts +++ b/src/rest/pricing/v2/number.ts @@ -19,20 +19,20 @@ const serialize = require("../../../base/serialize"); import { isValidPathParam } from "../../../base/utility"; export class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices { - "originationPrefixes"?: Array; - "destinationPrefixes"?: Array; - "basePrice"?: number; - "currentPrice"?: number; - "friendlyName"?: string; + "origination_prefixes"?: Array; + "destination_prefixes"?: Array; + "base_price"?: number; + "current_price"?: number; + "friendly_name"?: string; } /** * The [OriginatingCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price) record. */ export class PricingV2TrunkingNumberOriginatingCallPrice { - "basePrice"?: number; - "currentPrice"?: number; - "numberType"?: string; + "base_price"?: number; + "current_price"?: number; + "number_type"?: string; } /** @@ -110,6 +110,7 @@ export class NumberContextImpl implements NumberContext { data["OriginationNumber"] = params["originationNumber"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/pricing/v2/voice/country.ts b/src/rest/pricing/v2/voice/country.ts index 19c6394200..421c1cadc7 100644 --- a/src/rest/pricing/v2/voice/country.ts +++ b/src/rest/pricing/v2/voice/country.ts @@ -21,17 +21,17 @@ const serialize = require("../../../../base/serialize"); import { isValidPathParam } from "../../../../base/utility"; export class PricingV2TrunkingCountryInstanceOriginatingCallPrices { - "basePrice"?: number; - "currentPrice"?: number; - "numberType"?: string; + "base_price"?: number; + "current_price"?: number; + "number_type"?: string; } export class PricingV2TrunkingCountryInstanceTerminatingPrefixPrices { - "originationPrefixes"?: Array; - "destinationPrefixes"?: Array; - "basePrice"?: number; - "currentPrice"?: number; - "friendlyName"?: string; + "origination_prefixes"?: Array; + "destination_prefixes"?: Array; + "base_price"?: number; + "current_price"?: number; + "friendly_name"?: string; } /** @@ -109,11 +109,15 @@ export class CountryContextImpl implements CountryContext { fetch( callback?: (error: Error | null, item?: CountryInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -363,6 +367,7 @@ export function CountryListInstance(version: V2): CountryListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/pricing/v2/voice/number.ts b/src/rest/pricing/v2/voice/number.ts index 546129ecf0..3fa6f46148 100644 --- a/src/rest/pricing/v2/voice/number.ts +++ b/src/rest/pricing/v2/voice/number.ts @@ -22,15 +22,15 @@ import { isValidPathParam } from "../../../../base/utility"; * The [InboundCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price) record. */ export class PricingV2VoiceVoiceNumberInboundCallPrice { - "basePrice"?: number; - "currentPrice"?: number; - "numberType"?: string; + "base_price"?: number; + "current_price"?: number; + "number_type"?: string; } export class PricingV2VoiceVoiceNumberOutboundCallPrices { - "basePrice"?: number; - "currentPrice"?: number; - "originationPrefixes"?: Array; + "base_price"?: number; + "current_price"?: number; + "origination_prefixes"?: Array; } /** @@ -108,6 +108,7 @@ export class NumberContextImpl implements NumberContext { data["OriginationNumber"] = params["originationNumber"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/proxy/v1/service.ts b/src/rest/proxy/v1/service.ts index 1e4c62a269..48afe5bfda 100644 --- a/src/rest/proxy/v1/service.ts +++ b/src/rest/proxy/v1/service.ts @@ -211,11 +211,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -228,11 +231,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -281,6 +288,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -667,6 +675,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -708,6 +717,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/proxy/v1/service/phoneNumber.ts b/src/rest/proxy/v1/service/phoneNumber.ts index 174e420e24..ef3d7f6cd6 100644 --- a/src/rest/proxy/v1/service/phoneNumber.ts +++ b/src/rest/proxy/v1/service/phoneNumber.ts @@ -154,11 +154,14 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -171,11 +174,15 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { fetch( callback?: (error: Error | null, item?: PhoneNumberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -215,6 +222,7 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -593,6 +601,7 @@ export function PhoneNumberListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -639,6 +648,7 @@ export function PhoneNumberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/proxy/v1/service/session.ts b/src/rest/proxy/v1/service/session.ts index 199e6d5796..8ee0d085c7 100644 --- a/src/rest/proxy/v1/service/session.ts +++ b/src/rest/proxy/v1/service/session.ts @@ -202,11 +202,14 @@ export class SessionContextImpl implements SessionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -219,11 +222,15 @@ export class SessionContextImpl implements SessionContext { fetch( callback?: (error: Error | null, item?: SessionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -265,6 +272,7 @@ export class SessionContextImpl implements SessionContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -690,6 +698,7 @@ export function SessionListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -736,6 +745,7 @@ export function SessionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/proxy/v1/service/session/interaction.ts b/src/rest/proxy/v1/service/session/interaction.ts index 83b8ec7449..14bd3108c7 100644 --- a/src/rest/proxy/v1/service/session/interaction.ts +++ b/src/rest/proxy/v1/service/session/interaction.ts @@ -146,11 +146,14 @@ export class InteractionContextImpl implements InteractionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -163,11 +166,15 @@ export class InteractionContextImpl implements InteractionContext { fetch( callback?: (error: Error | null, item?: InteractionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -535,6 +542,7 @@ export function InteractionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/proxy/v1/service/session/participant.ts b/src/rest/proxy/v1/service/session/participant.ts index dd4ed916cd..5c1f011b05 100644 --- a/src/rest/proxy/v1/service/session/participant.ts +++ b/src/rest/proxy/v1/service/session/participant.ts @@ -151,11 +151,14 @@ export class ParticipantContextImpl implements ParticipantContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -168,11 +171,15 @@ export class ParticipantContextImpl implements ParticipantContext { fetch( callback?: (error: Error | null, item?: ParticipantInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -530,6 +537,7 @@ export function ParticipantListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -577,6 +585,7 @@ export function ParticipantListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/proxy/v1/service/session/participant/messageInteraction.ts b/src/rest/proxy/v1/service/session/participant/messageInteraction.ts index 4e74a52b67..eb5268c58a 100644 --- a/src/rest/proxy/v1/service/session/participant/messageInteraction.ts +++ b/src/rest/proxy/v1/service/session/participant/messageInteraction.ts @@ -155,11 +155,15 @@ export class MessageInteractionContextImpl fetch( callback?: (error: Error | null, item?: MessageInteractionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -571,6 +575,7 @@ export function MessageInteractionListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -619,6 +624,7 @@ export function MessageInteractionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/proxy/v1/service/shortCode.ts b/src/rest/proxy/v1/service/shortCode.ts index c54577b34c..eb3148e460 100644 --- a/src/rest/proxy/v1/service/shortCode.ts +++ b/src/rest/proxy/v1/service/shortCode.ts @@ -150,11 +150,14 @@ export class ShortCodeContextImpl implements ShortCodeContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -167,11 +170,15 @@ export class ShortCodeContextImpl implements ShortCodeContext { fetch( callback?: (error: Error | null, item?: ShortCodeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -211,6 +218,7 @@ export class ShortCodeContextImpl implements ShortCodeContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -560,6 +568,7 @@ export function ShortCodeListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -606,6 +615,7 @@ export function ShortCodeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/routes/v2/phoneNumber.ts b/src/rest/routes/v2/phoneNumber.ts index e0f366ccbe..35fdb1f0a4 100644 --- a/src/rest/routes/v2/phoneNumber.ts +++ b/src/rest/routes/v2/phoneNumber.ts @@ -90,11 +90,15 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { fetch( callback?: (error: Error | null, item?: PhoneNumberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -135,6 +139,7 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/routes/v2/sipDomain.ts b/src/rest/routes/v2/sipDomain.ts index f438e59b44..295379a1df 100644 --- a/src/rest/routes/v2/sipDomain.ts +++ b/src/rest/routes/v2/sipDomain.ts @@ -90,11 +90,15 @@ export class SipDomainContextImpl implements SipDomainContext { fetch( callback?: (error: Error | null, item?: SipDomainInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -135,6 +139,7 @@ export class SipDomainContextImpl implements SipDomainContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/routes/v2/trunk.ts b/src/rest/routes/v2/trunk.ts index cb74fd4929..77a7014145 100644 --- a/src/rest/routes/v2/trunk.ts +++ b/src/rest/routes/v2/trunk.ts @@ -90,11 +90,15 @@ export class TrunkContextImpl implements TrunkContext { fetch( callback?: (error: Error | null, item?: TrunkInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -135,6 +139,7 @@ export class TrunkContextImpl implements TrunkContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/serverless/v1/service.ts b/src/rest/serverless/v1/service.ts index 6326731f87..6c203d3499 100644 --- a/src/rest/serverless/v1/service.ts +++ b/src/rest/serverless/v1/service.ts @@ -194,11 +194,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -211,11 +214,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -254,6 +261,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -631,6 +639,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -672,6 +681,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/asset.ts b/src/rest/serverless/v1/service/asset.ts index dfd6eb967f..eca9fb5bd6 100644 --- a/src/rest/serverless/v1/service/asset.ts +++ b/src/rest/serverless/v1/service/asset.ts @@ -155,11 +155,14 @@ export class AssetContextImpl implements AssetContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -172,11 +175,15 @@ export class AssetContextImpl implements AssetContext { fetch( callback?: (error: Error | null, item?: AssetInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -217,6 +224,7 @@ export class AssetContextImpl implements AssetContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -555,6 +563,7 @@ export function AssetListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -601,6 +610,7 @@ export function AssetListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/asset/assetVersion.ts b/src/rest/serverless/v1/service/asset/assetVersion.ts index 3777330266..620b32f24b 100644 --- a/src/rest/serverless/v1/service/asset/assetVersion.ts +++ b/src/rest/serverless/v1/service/asset/assetVersion.ts @@ -112,11 +112,15 @@ export class AssetVersionContextImpl implements AssetVersionContext { fetch( callback?: (error: Error | null, item?: AssetVersionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -400,6 +404,7 @@ export function AssetVersionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/build.ts b/src/rest/serverless/v1/service/build.ts index 548d93fb70..652ada9dc3 100644 --- a/src/rest/serverless/v1/service/build.ts +++ b/src/rest/serverless/v1/service/build.ts @@ -150,11 +150,14 @@ export class BuildContextImpl implements BuildContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -167,11 +170,15 @@ export class BuildContextImpl implements BuildContext { fetch( callback?: (error: Error | null, item?: BuildInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -521,6 +528,7 @@ export function BuildListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -567,6 +575,7 @@ export function BuildListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/build/buildStatus.ts b/src/rest/serverless/v1/service/build/buildStatus.ts index a5d87c89ac..b7151d9aef 100644 --- a/src/rest/serverless/v1/service/build/buildStatus.ts +++ b/src/rest/serverless/v1/service/build/buildStatus.ts @@ -64,11 +64,15 @@ export class BuildStatusContextImpl implements BuildStatusContext { fetch( callback?: (error: Error | null, item?: BuildStatusInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/serverless/v1/service/environment.ts b/src/rest/serverless/v1/service/environment.ts index fcea89f8d2..39abb9d5a8 100644 --- a/src/rest/serverless/v1/service/environment.ts +++ b/src/rest/serverless/v1/service/environment.ts @@ -164,11 +164,14 @@ export class EnvironmentContextImpl implements EnvironmentContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -181,11 +184,15 @@ export class EnvironmentContextImpl implements EnvironmentContext { fetch( callback?: (error: Error | null, item?: EnvironmentInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -530,6 +537,7 @@ export function EnvironmentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -576,6 +584,7 @@ export function EnvironmentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/environment/deployment.ts b/src/rest/serverless/v1/service/environment/deployment.ts index 68ac35f42a..43138eae8e 100644 --- a/src/rest/serverless/v1/service/environment/deployment.ts +++ b/src/rest/serverless/v1/service/environment/deployment.ts @@ -119,11 +119,15 @@ export class DeploymentContextImpl implements DeploymentContext { fetch( callback?: (error: Error | null, item?: DeploymentInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -433,6 +437,7 @@ export function DeploymentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -480,6 +485,7 @@ export function DeploymentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/environment/log.ts b/src/rest/serverless/v1/service/environment/log.ts index a2329877d4..ab5b295c1f 100644 --- a/src/rest/serverless/v1/service/environment/log.ts +++ b/src/rest/serverless/v1/service/environment/log.ts @@ -130,11 +130,15 @@ export class LogContextImpl implements LogContext { fetch( callback?: (error: Error | null, item?: LogInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -452,6 +456,7 @@ export function LogListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/environment/variable.ts b/src/rest/serverless/v1/service/environment/variable.ts index 1d2b3ad2fc..cb61f0d0bc 100644 --- a/src/rest/serverless/v1/service/environment/variable.ts +++ b/src/rest/serverless/v1/service/environment/variable.ts @@ -163,11 +163,14 @@ export class VariableContextImpl implements VariableContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -180,11 +183,15 @@ export class VariableContextImpl implements VariableContext { fetch( callback?: (error: Error | null, item?: VariableInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -225,6 +232,7 @@ export class VariableContextImpl implements VariableContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -585,6 +593,7 @@ export function VariableListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -632,6 +641,7 @@ export function VariableListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/function.ts b/src/rest/serverless/v1/service/function.ts index ac795739bd..e5b8c27e06 100644 --- a/src/rest/serverless/v1/service/function.ts +++ b/src/rest/serverless/v1/service/function.ts @@ -155,11 +155,14 @@ export class FunctionContextImpl implements FunctionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -172,11 +175,15 @@ export class FunctionContextImpl implements FunctionContext { fetch( callback?: (error: Error | null, item?: FunctionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -217,6 +224,7 @@ export class FunctionContextImpl implements FunctionContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -555,6 +563,7 @@ export function FunctionListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -601,6 +610,7 @@ export function FunctionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/function/functionVersion.ts b/src/rest/serverless/v1/service/function/functionVersion.ts index 4698c0ce44..19adb040a2 100644 --- a/src/rest/serverless/v1/service/function/functionVersion.ts +++ b/src/rest/serverless/v1/service/function/functionVersion.ts @@ -132,11 +132,15 @@ export class FunctionVersionContextImpl implements FunctionVersionContext { fetch( callback?: (error: Error | null, item?: FunctionVersionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -442,6 +446,7 @@ export function FunctionVersionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/serverless/v1/service/function/functionVersion/functionVersionContent.ts b/src/rest/serverless/v1/service/function/functionVersion/functionVersionContent.ts index 8b847cda7f..c80e21f93a 100644 --- a/src/rest/serverless/v1/service/function/functionVersion/functionVersionContent.ts +++ b/src/rest/serverless/v1/service/function/functionVersion/functionVersionContent.ts @@ -80,11 +80,15 @@ export class FunctionVersionContentContextImpl item?: FunctionVersionContentInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/studio/v1/flow.ts b/src/rest/studio/v1/flow.ts index cbadb7c305..f66328a625 100644 --- a/src/rest/studio/v1/flow.ts +++ b/src/rest/studio/v1/flow.ts @@ -130,11 +130,14 @@ export class FlowContextImpl implements FlowContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -147,11 +150,15 @@ export class FlowContextImpl implements FlowContext { fetch( callback?: (error: Error | null, item?: FlowInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -436,6 +443,7 @@ export function FlowListInstance(version: V1): FlowListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/studio/v1/flow/engagement.ts b/src/rest/studio/v1/flow/engagement.ts index 3d22db0293..26e1d6ceaa 100644 --- a/src/rest/studio/v1/flow/engagement.ts +++ b/src/rest/studio/v1/flow/engagement.ts @@ -154,11 +154,14 @@ export class EngagementContextImpl implements EngagementContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -171,11 +174,15 @@ export class EngagementContextImpl implements EngagementContext { fetch( callback?: (error: Error | null, item?: EngagementInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -516,6 +523,7 @@ export function EngagementListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -562,6 +570,7 @@ export function EngagementListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/studio/v1/flow/engagement/engagementContext.ts b/src/rest/studio/v1/flow/engagement/engagementContext.ts index 315ed90fe1..f844eeb149 100644 --- a/src/rest/studio/v1/flow/engagement/engagementContext.ts +++ b/src/rest/studio/v1/flow/engagement/engagementContext.ts @@ -62,11 +62,15 @@ export class EngagementContextContextImpl implements EngagementContextContext { fetch( callback?: (error: Error | null, item?: EngagementContextInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/studio/v1/flow/engagement/step.ts b/src/rest/studio/v1/flow/engagement/step.ts index d9a09e30ca..0c34aaaeb4 100644 --- a/src/rest/studio/v1/flow/engagement/step.ts +++ b/src/rest/studio/v1/flow/engagement/step.ts @@ -127,11 +127,15 @@ export class StepContextImpl implements StepContext { fetch( callback?: (error: Error | null, item?: StepInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -453,6 +457,7 @@ export function StepListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/studio/v1/flow/engagement/step/stepContext.ts b/src/rest/studio/v1/flow/engagement/step/stepContext.ts index 811401018d..eea0661210 100644 --- a/src/rest/studio/v1/flow/engagement/step/stepContext.ts +++ b/src/rest/studio/v1/flow/engagement/step/stepContext.ts @@ -72,11 +72,15 @@ export class StepContextContextImpl implements StepContextContext { fetch( callback?: (error: Error | null, item?: StepContextInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/studio/v1/flow/execution.ts b/src/rest/studio/v1/flow/execution.ts index 3f3c31d8ca..cdb9510acf 100644 --- a/src/rest/studio/v1/flow/execution.ts +++ b/src/rest/studio/v1/flow/execution.ts @@ -187,11 +187,14 @@ export class ExecutionContextImpl implements ExecutionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -204,11 +207,15 @@ export class ExecutionContextImpl implements ExecutionContext { fetch( callback?: (error: Error | null, item?: ExecutionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -246,6 +253,7 @@ export class ExecutionContextImpl implements ExecutionContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -614,6 +622,7 @@ export function ExecutionListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -668,6 +677,7 @@ export function ExecutionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/studio/v1/flow/execution/executionContext.ts b/src/rest/studio/v1/flow/execution/executionContext.ts index 481b063b94..4960bc378d 100644 --- a/src/rest/studio/v1/flow/execution/executionContext.ts +++ b/src/rest/studio/v1/flow/execution/executionContext.ts @@ -62,11 +62,15 @@ export class ExecutionContextContextImpl implements ExecutionContextContext { fetch( callback?: (error: Error | null, item?: ExecutionContextInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/studio/v1/flow/execution/executionStep.ts b/src/rest/studio/v1/flow/execution/executionStep.ts index dd816041d6..9e963849b7 100644 --- a/src/rest/studio/v1/flow/execution/executionStep.ts +++ b/src/rest/studio/v1/flow/execution/executionStep.ts @@ -127,11 +127,15 @@ export class ExecutionStepContextImpl implements ExecutionStepContext { fetch( callback?: (error: Error | null, item?: ExecutionStepInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -459,6 +463,7 @@ export function ExecutionStepListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/studio/v1/flow/execution/executionStep/executionStepContext.ts b/src/rest/studio/v1/flow/execution/executionStep/executionStepContext.ts index d9da24a9c0..b8f9f4556a 100644 --- a/src/rest/studio/v1/flow/execution/executionStep/executionStepContext.ts +++ b/src/rest/studio/v1/flow/execution/executionStep/executionStepContext.ts @@ -74,11 +74,15 @@ export class ExecutionStepContextContextImpl fetch( callback?: (error: Error | null, item?: ExecutionStepContextInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/studio/v2/flow.ts b/src/rest/studio/v2/flow.ts index e37643bff8..427c5a3e89 100644 --- a/src/rest/studio/v2/flow.ts +++ b/src/rest/studio/v2/flow.ts @@ -180,11 +180,14 @@ export class FlowContextImpl implements FlowContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -197,11 +200,15 @@ export class FlowContextImpl implements FlowContext { fetch( callback?: (error: Error | null, item?: FlowInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -240,6 +247,7 @@ export class FlowContextImpl implements FlowContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -625,6 +633,7 @@ export function FlowListInstance(version: V2): FlowListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -666,6 +675,7 @@ export function FlowListInstance(version: V2): FlowListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/studio/v2/flow/execution.ts b/src/rest/studio/v2/flow/execution.ts index 87f75940cd..b8f666ef47 100644 --- a/src/rest/studio/v2/flow/execution.ts +++ b/src/rest/studio/v2/flow/execution.ts @@ -187,11 +187,14 @@ export class ExecutionContextImpl implements ExecutionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -204,11 +207,15 @@ export class ExecutionContextImpl implements ExecutionContext { fetch( callback?: (error: Error | null, item?: ExecutionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -246,6 +253,7 @@ export class ExecutionContextImpl implements ExecutionContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -607,6 +615,7 @@ export function ExecutionListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -661,6 +670,7 @@ export function ExecutionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/studio/v2/flow/execution/executionContext.ts b/src/rest/studio/v2/flow/execution/executionContext.ts index 1a575f9b28..51ff8f3e46 100644 --- a/src/rest/studio/v2/flow/execution/executionContext.ts +++ b/src/rest/studio/v2/flow/execution/executionContext.ts @@ -62,11 +62,15 @@ export class ExecutionContextContextImpl implements ExecutionContextContext { fetch( callback?: (error: Error | null, item?: ExecutionContextInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/studio/v2/flow/execution/executionStep.ts b/src/rest/studio/v2/flow/execution/executionStep.ts index 5c724d854b..6a4f429269 100644 --- a/src/rest/studio/v2/flow/execution/executionStep.ts +++ b/src/rest/studio/v2/flow/execution/executionStep.ts @@ -127,11 +127,15 @@ export class ExecutionStepContextImpl implements ExecutionStepContext { fetch( callback?: (error: Error | null, item?: ExecutionStepInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -459,6 +463,7 @@ export function ExecutionStepListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/studio/v2/flow/execution/executionStep/executionStepContext.ts b/src/rest/studio/v2/flow/execution/executionStep/executionStepContext.ts index 81d7468008..d6688ea5eb 100644 --- a/src/rest/studio/v2/flow/execution/executionStep/executionStepContext.ts +++ b/src/rest/studio/v2/flow/execution/executionStep/executionStepContext.ts @@ -74,11 +74,15 @@ export class ExecutionStepContextContextImpl fetch( callback?: (error: Error | null, item?: ExecutionStepContextInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/studio/v2/flow/flowRevision.ts b/src/rest/studio/v2/flow/flowRevision.ts index 4acfb6f8da..c0ab9bc732 100644 --- a/src/rest/studio/v2/flow/flowRevision.ts +++ b/src/rest/studio/v2/flow/flowRevision.ts @@ -102,11 +102,15 @@ export class FlowRevisionContextImpl implements FlowRevisionContext { fetch( callback?: (error: Error | null, item?: FlowRevisionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -410,6 +414,7 @@ export function FlowRevisionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/studio/v2/flow/flowTestUser.ts b/src/rest/studio/v2/flow/flowTestUser.ts index f2cabc7e5f..8157aef108 100644 --- a/src/rest/studio/v2/flow/flowTestUser.ts +++ b/src/rest/studio/v2/flow/flowTestUser.ts @@ -78,11 +78,15 @@ export class FlowTestUserContextImpl implements FlowTestUserContext { fetch( callback?: (error: Error | null, item?: FlowTestUserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -119,6 +123,7 @@ export class FlowTestUserContextImpl implements FlowTestUserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/studio/v2/flowValidate.ts b/src/rest/studio/v2/flowValidate.ts index aa8ff55f95..930e835f93 100644 --- a/src/rest/studio/v2/flowValidate.ts +++ b/src/rest/studio/v2/flowValidate.ts @@ -105,6 +105,7 @@ export function FlowValidateListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.update({ diff --git a/src/rest/supersim/v1/esimProfile.ts b/src/rest/supersim/v1/esimProfile.ts index 4c0ddbaf8e..914cca8b0b 100644 --- a/src/rest/supersim/v1/esimProfile.ts +++ b/src/rest/supersim/v1/esimProfile.ts @@ -134,11 +134,15 @@ export class EsimProfileContextImpl implements EsimProfileContext { fetch( callback?: (error: Error | null, item?: EsimProfileInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -467,6 +471,7 @@ export function EsimProfileListInstance(version: V1): EsimProfileListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -511,6 +516,7 @@ export function EsimProfileListInstance(version: V1): EsimProfileListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/fleet.ts b/src/rest/supersim/v1/fleet.ts index 60d1ac262f..10b8ed153b 100644 --- a/src/rest/supersim/v1/fleet.ts +++ b/src/rest/supersim/v1/fleet.ts @@ -169,11 +169,15 @@ export class FleetContextImpl implements FleetContext { fetch( callback?: (error: Error | null, item?: FleetInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -220,6 +224,7 @@ export class FleetContextImpl implements FleetContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -588,6 +593,7 @@ export function FleetListInstance(version: V1): FleetListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -631,6 +637,7 @@ export function FleetListInstance(version: V1): FleetListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/ipCommand.ts b/src/rest/supersim/v1/ipCommand.ts index 73511b42e4..a0ee693093 100644 --- a/src/rest/supersim/v1/ipCommand.ts +++ b/src/rest/supersim/v1/ipCommand.ts @@ -142,11 +142,15 @@ export class IpCommandContextImpl implements IpCommandContext { fetch( callback?: (error: Error | null, item?: IpCommandInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -459,6 +463,7 @@ export function IpCommandListInstance(version: V1): IpCommandListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -505,6 +510,7 @@ export function IpCommandListInstance(version: V1): IpCommandListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/network.ts b/src/rest/supersim/v1/network.ts index 96867973ad..8a051fd0bd 100644 --- a/src/rest/supersim/v1/network.ts +++ b/src/rest/supersim/v1/network.ts @@ -113,11 +113,15 @@ export class NetworkContextImpl implements NetworkContext { fetch( callback?: (error: Error | null, item?: NetworkInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -355,6 +359,7 @@ export function NetworkListInstance(version: V1): NetworkListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/networkAccessProfile.ts b/src/rest/supersim/v1/networkAccessProfile.ts index 27b3391ffe..560b713f1c 100644 --- a/src/rest/supersim/v1/networkAccessProfile.ts +++ b/src/rest/supersim/v1/networkAccessProfile.ts @@ -155,11 +155,15 @@ export class NetworkAccessProfileContextImpl fetch( callback?: (error: Error | null, item?: NetworkAccessProfileInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -198,6 +202,7 @@ export class NetworkAccessProfileContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -534,6 +539,7 @@ export function NetworkAccessProfileListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -575,6 +581,7 @@ export function NetworkAccessProfileListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.ts b/src/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.ts index 9d0e3e5cc0..96b9e6598b 100644 --- a/src/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.ts +++ b/src/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.ts @@ -130,11 +130,14 @@ export class NetworkAccessProfileNetworkContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -150,11 +153,15 @@ export class NetworkAccessProfileNetworkContextImpl item?: NetworkAccessProfileNetworkInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -476,6 +483,7 @@ export function NetworkAccessProfileNetworkListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -525,6 +533,7 @@ export function NetworkAccessProfileNetworkListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/settingsUpdate.ts b/src/rest/supersim/v1/settingsUpdate.ts index f1be99f731..c4e48421b3 100644 --- a/src/rest/supersim/v1/settingsUpdate.ts +++ b/src/rest/supersim/v1/settingsUpdate.ts @@ -198,6 +198,7 @@ export function SettingsUpdateListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/sim.ts b/src/rest/supersim/v1/sim.ts index 388c24c8bb..92d2cfc6bc 100644 --- a/src/rest/supersim/v1/sim.ts +++ b/src/rest/supersim/v1/sim.ts @@ -189,11 +189,15 @@ export class SimContextImpl implements SimContext { fetch( callback?: (error: Error | null, item?: SimInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -236,6 +240,7 @@ export class SimContextImpl implements SimContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -570,6 +575,7 @@ export function SimListInstance(version: V1): SimListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -614,6 +620,7 @@ export function SimListInstance(version: V1): SimListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/sim/billingPeriod.ts b/src/rest/supersim/v1/sim/billingPeriod.ts index 8373ef4cae..269af0a55e 100644 --- a/src/rest/supersim/v1/sim/billingPeriod.ts +++ b/src/rest/supersim/v1/sim/billingPeriod.ts @@ -184,6 +184,7 @@ export function BillingPeriodListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/sim/simIpAddress.ts b/src/rest/supersim/v1/sim/simIpAddress.ts index abbd8b11b2..836d2cbabb 100644 --- a/src/rest/supersim/v1/sim/simIpAddress.ts +++ b/src/rest/supersim/v1/sim/simIpAddress.ts @@ -178,6 +178,7 @@ export function SimIpAddressListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/smsCommand.ts b/src/rest/supersim/v1/smsCommand.ts index 5e1c07a14b..86269f6e52 100644 --- a/src/rest/supersim/v1/smsCommand.ts +++ b/src/rest/supersim/v1/smsCommand.ts @@ -135,11 +135,15 @@ export class SmsCommandContextImpl implements SmsCommandContext { fetch( callback?: (error: Error | null, item?: SmsCommandInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -423,6 +427,7 @@ export function SmsCommandListInstance(version: V1): SmsCommandListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -468,6 +473,7 @@ export function SmsCommandListInstance(version: V1): SmsCommandListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/supersim/v1/usageRecord.ts b/src/rest/supersim/v1/usageRecord.ts index 1bc27fdbd4..8f11e0b81b 100644 --- a/src/rest/supersim/v1/usageRecord.ts +++ b/src/rest/supersim/v1/usageRecord.ts @@ -231,6 +231,7 @@ export function UsageRecordListInstance(version: V1): UsageRecordListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service.ts b/src/rest/sync/v1/service.ts index 2f5b79109b..ac9cf5a8ec 100644 --- a/src/rest/sync/v1/service.ts +++ b/src/rest/sync/v1/service.ts @@ -209,11 +209,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -226,11 +229,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -284,6 +291,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -703,6 +711,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -744,6 +753,7 @@ export function ServiceListInstance(version: V1): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/document.ts b/src/rest/sync/v1/service/document.ts index b94b5d4371..a2dbd94fa3 100644 --- a/src/rest/sync/v1/service/document.ts +++ b/src/rest/sync/v1/service/document.ts @@ -173,11 +173,14 @@ export class DocumentContextImpl implements DocumentContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -190,11 +193,15 @@ export class DocumentContextImpl implements DocumentContext { fetch( callback?: (error: Error | null, item?: DocumentInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -235,6 +242,7 @@ export class DocumentContextImpl implements DocumentContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -625,6 +633,7 @@ export function DocumentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -671,6 +680,7 @@ export function DocumentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/document/documentPermission.ts b/src/rest/sync/v1/service/document/documentPermission.ts index a24f08206e..c8393f59da 100644 --- a/src/rest/sync/v1/service/document/documentPermission.ts +++ b/src/rest/sync/v1/service/document/documentPermission.ts @@ -150,11 +150,14 @@ export class DocumentPermissionContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -167,11 +170,15 @@ export class DocumentPermissionContextImpl fetch( callback?: (error: Error | null, item?: DocumentPermissionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -222,6 +229,7 @@ export class DocumentPermissionContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -565,6 +573,7 @@ export function DocumentPermissionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/syncList.ts b/src/rest/sync/v1/service/syncList.ts index c669ab4e4a..a0c0f1c0e3 100644 --- a/src/rest/sync/v1/service/syncList.ts +++ b/src/rest/sync/v1/service/syncList.ts @@ -185,11 +185,14 @@ export class SyncListContextImpl implements SyncListContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -202,11 +205,15 @@ export class SyncListContextImpl implements SyncListContext { fetch( callback?: (error: Error | null, item?: SyncListInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -247,6 +254,7 @@ export class SyncListContextImpl implements SyncListContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -635,6 +643,7 @@ export function SyncListListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -681,6 +690,7 @@ export function SyncListListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/syncList/syncListItem.ts b/src/rest/sync/v1/service/syncList/syncListItem.ts index 33257a563b..9cefc2fbec 100644 --- a/src/rest/sync/v1/service/syncList/syncListItem.ts +++ b/src/rest/sync/v1/service/syncList/syncListItem.ts @@ -250,11 +250,15 @@ export class SyncListItemContextImpl implements SyncListItemContext { fetch( callback?: (error: Error | null, item?: SyncListItemInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -299,6 +303,7 @@ export class SyncListItemContextImpl implements SyncListItemContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -690,6 +695,7 @@ export function SyncListItemListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -740,6 +746,7 @@ export function SyncListItemListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/syncList/syncListPermission.ts b/src/rest/sync/v1/service/syncList/syncListPermission.ts index 1fa81fb507..8888146518 100644 --- a/src/rest/sync/v1/service/syncList/syncListPermission.ts +++ b/src/rest/sync/v1/service/syncList/syncListPermission.ts @@ -150,11 +150,14 @@ export class SyncListPermissionContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -167,11 +170,15 @@ export class SyncListPermissionContextImpl fetch( callback?: (error: Error | null, item?: SyncListPermissionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -222,6 +229,7 @@ export class SyncListPermissionContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -565,6 +573,7 @@ export function SyncListPermissionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/syncMap.ts b/src/rest/sync/v1/service/syncMap.ts index 763069019b..90c825c5ba 100644 --- a/src/rest/sync/v1/service/syncMap.ts +++ b/src/rest/sync/v1/service/syncMap.ts @@ -185,11 +185,14 @@ export class SyncMapContextImpl implements SyncMapContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -202,11 +205,15 @@ export class SyncMapContextImpl implements SyncMapContext { fetch( callback?: (error: Error | null, item?: SyncMapInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -247,6 +254,7 @@ export class SyncMapContextImpl implements SyncMapContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -635,6 +643,7 @@ export function SyncMapListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -681,6 +690,7 @@ export function SyncMapListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/syncMap/syncMapItem.ts b/src/rest/sync/v1/service/syncMap/syncMapItem.ts index 5a798c90ed..8339013194 100644 --- a/src/rest/sync/v1/service/syncMap/syncMapItem.ts +++ b/src/rest/sync/v1/service/syncMap/syncMapItem.ts @@ -252,11 +252,15 @@ export class SyncMapItemContextImpl implements SyncMapItemContext { fetch( callback?: (error: Error | null, item?: SyncMapItemInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -301,6 +305,7 @@ export class SyncMapItemContextImpl implements SyncMapItemContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -698,6 +703,7 @@ export function SyncMapItemListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -748,6 +754,7 @@ export function SyncMapItemListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/syncMap/syncMapPermission.ts b/src/rest/sync/v1/service/syncMap/syncMapPermission.ts index 4e671a0f7f..1e6b314cc7 100644 --- a/src/rest/sync/v1/service/syncMap/syncMapPermission.ts +++ b/src/rest/sync/v1/service/syncMap/syncMapPermission.ts @@ -148,11 +148,14 @@ export class SyncMapPermissionContextImpl implements SyncMapPermissionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -165,11 +168,15 @@ export class SyncMapPermissionContextImpl implements SyncMapPermissionContext { fetch( callback?: (error: Error | null, item?: SyncMapPermissionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -220,6 +227,7 @@ export class SyncMapPermissionContextImpl implements SyncMapPermissionContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -563,6 +571,7 @@ export function SyncMapPermissionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/syncStream.ts b/src/rest/sync/v1/service/syncStream.ts index ceff0cba24..df1db68d50 100644 --- a/src/rest/sync/v1/service/syncStream.ts +++ b/src/rest/sync/v1/service/syncStream.ts @@ -167,11 +167,14 @@ export class SyncStreamContextImpl implements SyncStreamContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -184,11 +187,15 @@ export class SyncStreamContextImpl implements SyncStreamContext { fetch( callback?: (error: Error | null, item?: SyncStreamInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -227,6 +234,7 @@ export class SyncStreamContextImpl implements SyncStreamContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -599,6 +607,7 @@ export function SyncStreamListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -645,6 +654,7 @@ export function SyncStreamListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/sync/v1/service/syncStream/streamMessage.ts b/src/rest/sync/v1/service/syncStream/streamMessage.ts index bcd5764cd5..cf1963859e 100644 --- a/src/rest/sync/v1/service/syncStream/streamMessage.ts +++ b/src/rest/sync/v1/service/syncStream/streamMessage.ts @@ -93,6 +93,7 @@ export function StreamMessageListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/taskrouter/v1/workspace.ts b/src/rest/taskrouter/v1/workspace.ts index eb72ddaeb1..4ededb2d7e 100644 --- a/src/rest/taskrouter/v1/workspace.ts +++ b/src/rest/taskrouter/v1/workspace.ts @@ -279,11 +279,14 @@ export class WorkspaceContextImpl implements WorkspaceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -296,11 +299,15 @@ export class WorkspaceContextImpl implements WorkspaceContext { fetch( callback?: (error: Error | null, item?: WorkspaceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -347,6 +354,7 @@ export class WorkspaceContextImpl implements WorkspaceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -794,6 +802,7 @@ export function WorkspaceListInstance(version: V1): WorkspaceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -837,6 +846,7 @@ export function WorkspaceListInstance(version: V1): WorkspaceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/activity.ts b/src/rest/taskrouter/v1/workspace/activity.ts index fb3c023653..3899240e4a 100644 --- a/src/rest/taskrouter/v1/workspace/activity.ts +++ b/src/rest/taskrouter/v1/workspace/activity.ts @@ -163,11 +163,14 @@ export class ActivityContextImpl implements ActivityContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -180,11 +183,15 @@ export class ActivityContextImpl implements ActivityContext { fetch( callback?: (error: Error | null, item?: ActivityInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -224,6 +231,7 @@ export class ActivityContextImpl implements ActivityContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -571,6 +579,7 @@ export function ActivityListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -621,6 +630,7 @@ export function ActivityListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/event.ts b/src/rest/taskrouter/v1/workspace/event.ts index 707f3f0189..ff60b27167 100644 --- a/src/rest/taskrouter/v1/workspace/event.ts +++ b/src/rest/taskrouter/v1/workspace/event.ts @@ -166,11 +166,15 @@ export class EventContextImpl implements EventContext { fetch( callback?: (error: Error | null, item?: EventInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -530,6 +534,7 @@ export function EventListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/task.ts b/src/rest/taskrouter/v1/workspace/task.ts index 3ac8827d8d..23df30df6f 100644 --- a/src/rest/taskrouter/v1/workspace/task.ts +++ b/src/rest/taskrouter/v1/workspace/task.ts @@ -316,11 +316,15 @@ export class TaskContextImpl implements TaskContext { fetch( callback?: (error: Error | null, item?: TaskInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -370,6 +374,7 @@ export class TaskContextImpl implements TaskContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -875,6 +880,7 @@ export function TaskListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -942,6 +948,7 @@ export function TaskListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/task/reservation.ts b/src/rest/taskrouter/v1/workspace/task/reservation.ts index 82097e450f..44d19f1660 100644 --- a/src/rest/taskrouter/v1/workspace/task/reservation.ts +++ b/src/rest/taskrouter/v1/workspace/task/reservation.ts @@ -287,11 +287,15 @@ export class ReservationContextImpl implements ReservationContext { fetch( callback?: (error: Error | null, item?: ReservationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -450,6 +454,7 @@ export class ReservationContextImpl implements ReservationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -798,6 +803,7 @@ export function ReservationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/taskChannel.ts b/src/rest/taskrouter/v1/workspace/taskChannel.ts index f942473f53..865816a9de 100644 --- a/src/rest/taskrouter/v1/workspace/taskChannel.ts +++ b/src/rest/taskrouter/v1/workspace/taskChannel.ts @@ -155,11 +155,14 @@ export class TaskChannelContextImpl implements TaskChannelContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -172,11 +175,15 @@ export class TaskChannelContextImpl implements TaskChannelContext { fetch( callback?: (error: Error | null, item?: TaskChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -220,6 +227,7 @@ export class TaskChannelContextImpl implements TaskChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -585,6 +593,7 @@ export function TaskChannelListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -631,6 +640,7 @@ export function TaskChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/taskQueue.ts b/src/rest/taskrouter/v1/workspace/taskQueue.ts index 94e5811288..fdb9224f40 100644 --- a/src/rest/taskrouter/v1/workspace/taskQueue.ts +++ b/src/rest/taskrouter/v1/workspace/taskQueue.ts @@ -241,11 +241,14 @@ export class TaskQueueContextImpl implements TaskQueueContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -258,11 +261,15 @@ export class TaskQueueContextImpl implements TaskQueueContext { fetch( callback?: (error: Error | null, item?: TaskQueueInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -312,6 +319,7 @@ export class TaskQueueContextImpl implements TaskQueueContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -760,6 +768,7 @@ export function TaskQueueListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -813,6 +822,7 @@ export function TaskQueueListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueBulkRealTimeStatistics.ts b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueBulkRealTimeStatistics.ts index 38c833e8e8..62e6d8664b 100644 --- a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueBulkRealTimeStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueBulkRealTimeStatistics.ts @@ -52,12 +52,14 @@ export interface TaskQueueBulkRealTimeStatisticsListInstance { * Create a TaskQueueBulkRealTimeStatisticsInstance * * @param params - Body for request + * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed TaskQueueBulkRealTimeStatisticsInstance */ create( params: object, + headers?: any, callback?: ( error: Error | null, item?: TaskQueueBulkRealTimeStatisticsInstance @@ -92,6 +94,7 @@ export function TaskQueueBulkRealTimeStatisticsListInstance( error: Error | null, items: TaskQueueBulkRealTimeStatisticsInstance ) => any), + headers?: any, callback?: ( error: Error | null, items: TaskQueueBulkRealTimeStatisticsInstance @@ -108,8 +111,12 @@ export function TaskQueueBulkRealTimeStatisticsListInstance( data = params; - const headers: any = {}; + if (headers === null || headers === undefined) { + headers = {}; + } + headers["Content-Type"] = "application/json"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.ts b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.ts index dc72852862..d40c146384 100644 --- a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.ts @@ -131,6 +131,7 @@ export class TaskQueueCumulativeStatisticsContextImpl data["SplitByWaitTime"] = params["splitByWaitTime"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.ts b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.ts index a987313885..83b3514aca 100644 --- a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.ts @@ -116,6 +116,7 @@ export class TaskQueueRealTimeStatisticsContextImpl data["TaskChannel"] = params["taskChannel"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.ts b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.ts index 7870a9ccc2..aa14236f34 100644 --- a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.ts @@ -119,6 +119,7 @@ export class TaskQueueStatisticsContextImpl data["SplitByWaitTime"] = params["splitByWaitTime"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.ts b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.ts index 632ccb51da..6085c9fb42 100644 --- a/src/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.ts @@ -238,6 +238,7 @@ export function TaskQueuesStatisticsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/worker.ts b/src/rest/taskrouter/v1/workspace/worker.ts index 497de0d8ea..b8eb398d57 100644 --- a/src/rest/taskrouter/v1/workspace/worker.ts +++ b/src/rest/taskrouter/v1/workspace/worker.ts @@ -311,11 +311,15 @@ export class WorkerContextImpl implements WorkerContext { fetch( callback?: (error: Error | null, item?: WorkerInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -363,6 +367,7 @@ export class WorkerContextImpl implements WorkerContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -829,6 +834,7 @@ export function WorkerListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -890,6 +896,7 @@ export function WorkerListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/worker/reservation.ts b/src/rest/taskrouter/v1/workspace/worker/reservation.ts index 7aaecaa272..051e7e1911 100644 --- a/src/rest/taskrouter/v1/workspace/worker/reservation.ts +++ b/src/rest/taskrouter/v1/workspace/worker/reservation.ts @@ -275,11 +275,15 @@ export class ReservationContextImpl implements ReservationContext { fetch( callback?: (error: Error | null, item?: ReservationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -434,6 +438,7 @@ export class ReservationContextImpl implements ReservationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["ifMatch"] !== undefined) headers["If-Match"] = params["ifMatch"]; @@ -780,6 +785,7 @@ export function ReservationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/worker/workerChannel.ts b/src/rest/taskrouter/v1/workspace/worker/workerChannel.ts index aeca4e9f94..4e91fc0dcf 100644 --- a/src/rest/taskrouter/v1/workspace/worker/workerChannel.ts +++ b/src/rest/taskrouter/v1/workspace/worker/workerChannel.ts @@ -142,11 +142,15 @@ export class WorkerChannelContextImpl implements WorkerChannelContext { fetch( callback?: (error: Error | null, item?: WorkerChannelInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -188,6 +192,7 @@ export class WorkerChannelContextImpl implements WorkerChannelContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -555,6 +560,7 @@ export function WorkerChannelListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/worker/workerStatistics.ts b/src/rest/taskrouter/v1/workspace/worker/workerStatistics.ts index 93b566bdcf..ccfc64fc31 100644 --- a/src/rest/taskrouter/v1/workspace/worker/workerStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/worker/workerStatistics.ts @@ -109,6 +109,7 @@ export class WorkerStatisticsContextImpl implements WorkerStatisticsContext { data["TaskChannel"] = params["taskChannel"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.ts b/src/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.ts index f92358bf96..fcdad66cbb 100644 --- a/src/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.ts @@ -118,6 +118,7 @@ export class WorkersCumulativeStatisticsContextImpl data["TaskChannel"] = params["taskChannel"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.ts b/src/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.ts index b8dfada89b..03cbb4922d 100644 --- a/src/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.ts @@ -107,6 +107,7 @@ export class WorkersRealTimeStatisticsContextImpl data["TaskChannel"] = params["taskChannel"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/worker/workersStatistics.ts b/src/rest/taskrouter/v1/workspace/worker/workersStatistics.ts index c9dd5827a8..7408e8326f 100644 --- a/src/rest/taskrouter/v1/workspace/worker/workersStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/worker/workersStatistics.ts @@ -116,6 +116,7 @@ export class WorkersStatisticsContextImpl implements WorkersStatisticsContext { data["TaskChannel"] = params["taskChannel"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/workflow.ts b/src/rest/taskrouter/v1/workspace/workflow.ts index a9eba1608e..52742c7cc9 100644 --- a/src/rest/taskrouter/v1/workspace/workflow.ts +++ b/src/rest/taskrouter/v1/workspace/workflow.ts @@ -217,11 +217,14 @@ export class WorkflowContextImpl implements WorkflowContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -234,11 +237,15 @@ export class WorkflowContextImpl implements WorkflowContext { fetch( callback?: (error: Error | null, item?: WorkflowInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -289,6 +296,7 @@ export class WorkflowContextImpl implements WorkflowContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -707,6 +715,7 @@ export function WorkflowListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -755,6 +764,7 @@ export function WorkflowListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.ts b/src/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.ts index 37a96dec2c..ad02e5915f 100644 --- a/src/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.ts @@ -131,6 +131,7 @@ export class WorkflowCumulativeStatisticsContextImpl data["SplitByWaitTime"] = params["splitByWaitTime"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.ts b/src/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.ts index 085d79b9cb..1e22ffcde5 100644 --- a/src/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.ts @@ -116,6 +116,7 @@ export class WorkflowRealTimeStatisticsContextImpl data["TaskChannel"] = params["taskChannel"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/workflow/workflowStatistics.ts b/src/rest/taskrouter/v1/workspace/workflow/workflowStatistics.ts index 45fb1c29ec..85db470ff5 100644 --- a/src/rest/taskrouter/v1/workspace/workflow/workflowStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/workflow/workflowStatistics.ts @@ -119,6 +119,7 @@ export class WorkflowStatisticsContextImpl data["SplitByWaitTime"] = params["splitByWaitTime"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.ts b/src/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.ts index ddf8ba7299..901c47586c 100644 --- a/src/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.ts @@ -122,6 +122,7 @@ export class WorkspaceCumulativeStatisticsContextImpl data["SplitByWaitTime"] = params["splitByWaitTime"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.ts b/src/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.ts index 0a0140dfd9..5d0147ebd1 100644 --- a/src/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.ts @@ -107,6 +107,7 @@ export class WorkspaceRealTimeStatisticsContextImpl data["TaskChannel"] = params["taskChannel"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/taskrouter/v1/workspace/workspaceStatistics.ts b/src/rest/taskrouter/v1/workspace/workspaceStatistics.ts index 4f294ce5fe..61cf3db2f5 100644 --- a/src/rest/taskrouter/v1/workspace/workspaceStatistics.ts +++ b/src/rest/taskrouter/v1/workspace/workspaceStatistics.ts @@ -110,6 +110,7 @@ export class WorkspaceStatisticsContextImpl data["SplitByWaitTime"] = params["splitByWaitTime"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/trunking/v1/trunk.ts b/src/rest/trunking/v1/trunk.ts index 245f649e21..782c9ffe19 100644 --- a/src/rest/trunking/v1/trunk.ts +++ b/src/rest/trunking/v1/trunk.ts @@ -228,11 +228,14 @@ export class TrunkContextImpl implements TrunkContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -245,11 +248,15 @@ export class TrunkContextImpl implements TrunkContext { fetch( callback?: (error: Error | null, item?: TrunkInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -298,6 +305,7 @@ export class TrunkContextImpl implements TrunkContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -730,6 +738,7 @@ export function TrunkListInstance(version: V1): TrunkListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -771,6 +780,7 @@ export function TrunkListInstance(version: V1): TrunkListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trunking/v1/trunk/credentialList.ts b/src/rest/trunking/v1/trunk/credentialList.ts index 57f1bd7604..00b775df37 100644 --- a/src/rest/trunking/v1/trunk/credentialList.ts +++ b/src/rest/trunking/v1/trunk/credentialList.ts @@ -121,11 +121,14 @@ export class CredentialListContextImpl implements CredentialListContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -138,11 +141,15 @@ export class CredentialListContextImpl implements CredentialListContext { fetch( callback?: (error: Error | null, item?: CredentialListInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -447,6 +454,7 @@ export function CredentialListListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -493,6 +501,7 @@ export function CredentialListListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trunking/v1/trunk/ipAccessControlList.ts b/src/rest/trunking/v1/trunk/ipAccessControlList.ts index 708c8a2dbe..9fa0bd8c5d 100644 --- a/src/rest/trunking/v1/trunk/ipAccessControlList.ts +++ b/src/rest/trunking/v1/trunk/ipAccessControlList.ts @@ -123,11 +123,14 @@ export class IpAccessControlListContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -140,11 +143,15 @@ export class IpAccessControlListContextImpl fetch( callback?: (error: Error | null, item?: IpAccessControlListInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -456,6 +463,7 @@ export function IpAccessControlListListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -502,6 +510,7 @@ export function IpAccessControlListListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trunking/v1/trunk/originationUrl.ts b/src/rest/trunking/v1/trunk/originationUrl.ts index 0e71891836..328b1c86a9 100644 --- a/src/rest/trunking/v1/trunk/originationUrl.ts +++ b/src/rest/trunking/v1/trunk/originationUrl.ts @@ -168,11 +168,14 @@ export class OriginationUrlContextImpl implements OriginationUrlContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -185,11 +188,15 @@ export class OriginationUrlContextImpl implements OriginationUrlContext { fetch( callback?: (error: Error | null, item?: OriginationUrlInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -234,6 +241,7 @@ export class OriginationUrlContextImpl implements OriginationUrlContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -626,6 +634,7 @@ export function OriginationUrlListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -672,6 +681,7 @@ export function OriginationUrlListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trunking/v1/trunk/phoneNumber.ts b/src/rest/trunking/v1/trunk/phoneNumber.ts index 398c51fb4b..a97f221544 100644 --- a/src/rest/trunking/v1/trunk/phoneNumber.ts +++ b/src/rest/trunking/v1/trunk/phoneNumber.ts @@ -124,11 +124,14 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -141,11 +144,15 @@ export class PhoneNumberContextImpl implements PhoneNumberContext { fetch( callback?: (error: Error | null, item?: PhoneNumberInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -574,6 +581,7 @@ export function PhoneNumberListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -620,6 +628,7 @@ export function PhoneNumberListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trunking/v1/trunk/recording.ts b/src/rest/trunking/v1/trunk/recording.ts index 4d43367405..dae79865b3 100644 --- a/src/rest/trunking/v1/trunk/recording.ts +++ b/src/rest/trunking/v1/trunk/recording.ts @@ -99,11 +99,15 @@ export class RecordingContextImpl implements RecordingContext { fetch( callback?: (error: Error | null, item?: RecordingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -142,6 +146,7 @@ export class RecordingContextImpl implements RecordingContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/trusthub/v1/complianceInquiries.ts b/src/rest/trusthub/v1/complianceInquiries.ts index 6854949c05..bccb0c8182 100644 --- a/src/rest/trusthub/v1/complianceInquiries.ts +++ b/src/rest/trusthub/v1/complianceInquiries.ts @@ -105,6 +105,7 @@ export class ComplianceInquiriesContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -308,6 +309,7 @@ export function ComplianceInquiriesListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/trusthub/v1/complianceRegistrationInquiries.ts b/src/rest/trusthub/v1/complianceRegistrationInquiries.ts index a24d8589e7..c71c5739f3 100644 --- a/src/rest/trusthub/v1/complianceRegistrationInquiries.ts +++ b/src/rest/trusthub/v1/complianceRegistrationInquiries.ts @@ -218,6 +218,7 @@ export class ComplianceRegistrationInquiriesContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -541,6 +542,7 @@ export function ComplianceRegistrationInquiriesListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/trusthub/v1/complianceTollfreeInquiries.ts b/src/rest/trusthub/v1/complianceTollfreeInquiries.ts index b9beeb22bc..a6eb881471 100644 --- a/src/rest/trusthub/v1/complianceTollfreeInquiries.ts +++ b/src/rest/trusthub/v1/complianceTollfreeInquiries.ts @@ -204,6 +204,7 @@ export function ComplianceTollfreeInquiriesListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/trusthub/v1/customerProfiles.ts b/src/rest/trusthub/v1/customerProfiles.ts index 744a5661f4..3ee5e3e006 100644 --- a/src/rest/trusthub/v1/customerProfiles.ts +++ b/src/rest/trusthub/v1/customerProfiles.ts @@ -225,11 +225,14 @@ export class CustomerProfilesContextImpl implements CustomerProfilesContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -242,11 +245,15 @@ export class CustomerProfilesContextImpl implements CustomerProfilesContext { fetch( callback?: (error: Error | null, item?: CustomerProfilesInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -289,6 +296,7 @@ export class CustomerProfilesContextImpl implements CustomerProfilesContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -690,6 +698,7 @@ export function CustomerProfilesListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -736,6 +745,7 @@ export function CustomerProfilesListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.ts b/src/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.ts index febbcb3fd4..ab848abdae 100644 --- a/src/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.ts +++ b/src/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.ts @@ -140,11 +140,14 @@ export class CustomerProfilesChannelEndpointAssignmentContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -160,11 +163,15 @@ export class CustomerProfilesChannelEndpointAssignmentContextImpl item?: CustomerProfilesChannelEndpointAssignmentInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -512,6 +519,7 @@ export function CustomerProfilesChannelEndpointAssignmentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -568,6 +576,7 @@ export function CustomerProfilesChannelEndpointAssignmentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.ts b/src/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.ts index a938f6f512..284f08410f 100644 --- a/src/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.ts +++ b/src/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.ts @@ -132,11 +132,14 @@ export class CustomerProfilesEntityAssignmentsContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -152,11 +155,15 @@ export class CustomerProfilesEntityAssignmentsContextImpl item?: CustomerProfilesEntityAssignmentsInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -479,6 +486,7 @@ export function CustomerProfilesEntityAssignmentsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -533,6 +541,7 @@ export function CustomerProfilesEntityAssignmentsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.ts b/src/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.ts index 4be4b10359..1c95ebd2aa 100644 --- a/src/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.ts +++ b/src/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.ts @@ -120,11 +120,15 @@ export class CustomerProfilesEvaluationsContextImpl item?: CustomerProfilesEvaluationsInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -438,6 +442,7 @@ export function CustomerProfilesEvaluationsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -487,6 +492,7 @@ export function CustomerProfilesEvaluationsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/endUser.ts b/src/rest/trusthub/v1/endUser.ts index fcd67edb6a..b4d63a5810 100644 --- a/src/rest/trusthub/v1/endUser.ts +++ b/src/rest/trusthub/v1/endUser.ts @@ -150,11 +150,14 @@ export class EndUserContextImpl implements EndUserContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -167,11 +170,15 @@ export class EndUserContextImpl implements EndUserContext { fetch( callback?: (error: Error | null, item?: EndUserInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -208,6 +215,7 @@ export class EndUserContextImpl implements EndUserContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -534,6 +542,7 @@ export function EndUserListInstance(version: V1): EndUserListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -575,6 +584,7 @@ export function EndUserListInstance(version: V1): EndUserListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/endUserType.ts b/src/rest/trusthub/v1/endUserType.ts index 22242de166..0632ea85ae 100644 --- a/src/rest/trusthub/v1/endUserType.ts +++ b/src/rest/trusthub/v1/endUserType.ts @@ -95,11 +95,15 @@ export class EndUserTypeContextImpl implements EndUserTypeContext { fetch( callback?: (error: Error | null, item?: EndUserTypeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -341,6 +345,7 @@ export function EndUserTypeListInstance(version: V1): EndUserTypeListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/policies.ts b/src/rest/trusthub/v1/policies.ts index 3b629fa240..43a75fb51d 100644 --- a/src/rest/trusthub/v1/policies.ts +++ b/src/rest/trusthub/v1/policies.ts @@ -95,11 +95,15 @@ export class PoliciesContextImpl implements PoliciesContext { fetch( callback?: (error: Error | null, item?: PoliciesInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -326,6 +330,7 @@ export function PoliciesListInstance(version: V1): PoliciesListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/supportingDocument.ts b/src/rest/trusthub/v1/supportingDocument.ts index f9dc3cce0d..4a7756b0bc 100644 --- a/src/rest/trusthub/v1/supportingDocument.ts +++ b/src/rest/trusthub/v1/supportingDocument.ts @@ -163,11 +163,14 @@ export class SupportingDocumentContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -180,11 +183,15 @@ export class SupportingDocumentContextImpl fetch( callback?: (error: Error | null, item?: SupportingDocumentInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -225,6 +232,7 @@ export class SupportingDocumentContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -579,6 +587,7 @@ export function SupportingDocumentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -620,6 +629,7 @@ export function SupportingDocumentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/supportingDocumentType.ts b/src/rest/trusthub/v1/supportingDocumentType.ts index f6273a12ce..2c0936acd5 100644 --- a/src/rest/trusthub/v1/supportingDocumentType.ts +++ b/src/rest/trusthub/v1/supportingDocumentType.ts @@ -106,11 +106,15 @@ export class SupportingDocumentTypeContextImpl item?: SupportingDocumentTypeInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -370,6 +374,7 @@ export function SupportingDocumentTypeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/trustProducts.ts b/src/rest/trusthub/v1/trustProducts.ts index 3db9c5915f..22ed8803aa 100644 --- a/src/rest/trusthub/v1/trustProducts.ts +++ b/src/rest/trusthub/v1/trustProducts.ts @@ -219,11 +219,14 @@ export class TrustProductsContextImpl implements TrustProductsContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -236,11 +239,15 @@ export class TrustProductsContextImpl implements TrustProductsContext { fetch( callback?: (error: Error | null, item?: TrustProductsInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -283,6 +290,7 @@ export class TrustProductsContextImpl implements TrustProductsContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -684,6 +692,7 @@ export function TrustProductsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -730,6 +739,7 @@ export function TrustProductsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.ts b/src/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.ts index 62e042c16f..659e00e524 100644 --- a/src/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.ts +++ b/src/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.ts @@ -140,11 +140,14 @@ export class TrustProductsChannelEndpointAssignmentContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -160,11 +163,15 @@ export class TrustProductsChannelEndpointAssignmentContextImpl item?: TrustProductsChannelEndpointAssignmentInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -512,6 +519,7 @@ export function TrustProductsChannelEndpointAssignmentListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -568,6 +576,7 @@ export function TrustProductsChannelEndpointAssignmentListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.ts b/src/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.ts index c2b688a518..7ae9f7645e 100644 --- a/src/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.ts +++ b/src/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.ts @@ -132,11 +132,14 @@ export class TrustProductsEntityAssignmentsContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -152,11 +155,15 @@ export class TrustProductsEntityAssignmentsContextImpl item?: TrustProductsEntityAssignmentsInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -478,6 +485,7 @@ export function TrustProductsEntityAssignmentsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -532,6 +540,7 @@ export function TrustProductsEntityAssignmentsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/trusthub/v1/trustProducts/trustProductsEvaluations.ts b/src/rest/trusthub/v1/trustProducts/trustProductsEvaluations.ts index 7eaef90a0d..6c9dd24c0e 100644 --- a/src/rest/trusthub/v1/trustProducts/trustProductsEvaluations.ts +++ b/src/rest/trusthub/v1/trustProducts/trustProductsEvaluations.ts @@ -120,11 +120,15 @@ export class TrustProductsEvaluationsContextImpl item?: TrustProductsEvaluationsInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -429,6 +433,7 @@ export function TrustProductsEvaluationsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -475,6 +480,7 @@ export function TrustProductsEvaluationsListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/form.ts b/src/rest/verify/v2/form.ts index 0a021fc24f..ab7017c3c4 100644 --- a/src/rest/verify/v2/form.ts +++ b/src/rest/verify/v2/form.ts @@ -59,11 +59,15 @@ export class FormContextImpl implements FormContext { fetch( callback?: (error: Error | null, item?: FormInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/verify/v2/safelist.ts b/src/rest/verify/v2/safelist.ts index 92cd8ac997..47a394dc5d 100644 --- a/src/rest/verify/v2/safelist.ts +++ b/src/rest/verify/v2/safelist.ts @@ -76,11 +76,14 @@ export class SafelistContextImpl implements SafelistContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -93,11 +96,15 @@ export class SafelistContextImpl implements SafelistContext { fetch( callback?: (error: Error | null, item?: SafelistInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -278,6 +285,7 @@ export function SafelistListInstance(version: V2): SafelistListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/verify/v2/service.ts b/src/rest/verify/v2/service.ts index 7cab81b2f5..c39ad97981 100644 --- a/src/rest/verify/v2/service.ts +++ b/src/rest/verify/v2/service.ts @@ -290,11 +290,14 @@ export class ServiceContextImpl implements ServiceContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -307,11 +310,15 @@ export class ServiceContextImpl implements ServiceContext { fetch( callback?: (error: Error | null, item?: ServiceInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -387,6 +394,7 @@ export class ServiceContextImpl implements ServiceContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -874,6 +882,7 @@ export function ServiceListInstance(version: V2): ServiceListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -915,6 +924,7 @@ export function ServiceListInstance(version: V2): ServiceListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/service/accessToken.ts b/src/rest/verify/v2/service/accessToken.ts index 9833362f63..45f7100cc0 100644 --- a/src/rest/verify/v2/service/accessToken.ts +++ b/src/rest/verify/v2/service/accessToken.ts @@ -78,11 +78,15 @@ export class AccessTokenContextImpl implements AccessTokenContext { fetch( callback?: (error: Error | null, item?: AccessTokenInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -319,6 +323,7 @@ export function AccessTokenListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/verify/v2/service/entity.ts b/src/rest/verify/v2/service/entity.ts index 680144b757..518a733faf 100644 --- a/src/rest/verify/v2/service/entity.ts +++ b/src/rest/verify/v2/service/entity.ts @@ -162,11 +162,14 @@ export class EntityContextImpl implements EntityContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -179,11 +182,15 @@ export class EntityContextImpl implements EntityContext { fetch( callback?: (error: Error | null, item?: EntityInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -505,6 +512,7 @@ export function EntityListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -551,6 +559,7 @@ export function EntityListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/service/entity/challenge.ts b/src/rest/verify/v2/service/entity/challenge.ts index 19422a54bf..839ea750a2 100644 --- a/src/rest/verify/v2/service/entity/challenge.ts +++ b/src/rest/verify/v2/service/entity/challenge.ts @@ -207,11 +207,15 @@ export class ChallengeContextImpl implements ChallengeContext { fetch( callback?: (error: Error | null, item?: ChallengeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -254,6 +258,7 @@ export class ChallengeContextImpl implements ChallengeContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -671,6 +676,7 @@ export function ChallengeListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -722,6 +728,7 @@ export function ChallengeListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/service/entity/challenge/notification.ts b/src/rest/verify/v2/service/entity/challenge/notification.ts index ec6a8534a4..6566ea1e3f 100644 --- a/src/rest/verify/v2/service/entity/challenge/notification.ts +++ b/src/rest/verify/v2/service/entity/challenge/notification.ts @@ -110,6 +110,7 @@ export function NotificationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/verify/v2/service/entity/factor.ts b/src/rest/verify/v2/service/entity/factor.ts index 32118485bc..22400009e9 100644 --- a/src/rest/verify/v2/service/entity/factor.ts +++ b/src/rest/verify/v2/service/entity/factor.ts @@ -173,11 +173,14 @@ export class FactorContextImpl implements FactorContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -190,11 +193,15 @@ export class FactorContextImpl implements FactorContext { fetch( callback?: (error: Error | null, item?: FactorInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -252,6 +259,7 @@ export class FactorContextImpl implements FactorContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -618,6 +626,7 @@ export function FactorListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/service/entity/newFactor.ts b/src/rest/verify/v2/service/entity/newFactor.ts index 96f33fd285..a233bdf505 100644 --- a/src/rest/verify/v2/service/entity/newFactor.ts +++ b/src/rest/verify/v2/service/entity/newFactor.ts @@ -161,6 +161,7 @@ export function NewFactorListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/verify/v2/service/messagingConfiguration.ts b/src/rest/verify/v2/service/messagingConfiguration.ts index 59cbc7dd57..433897c692 100644 --- a/src/rest/verify/v2/service/messagingConfiguration.ts +++ b/src/rest/verify/v2/service/messagingConfiguration.ts @@ -152,11 +152,14 @@ export class MessagingConfigurationContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -172,11 +175,15 @@ export class MessagingConfigurationContextImpl item?: MessagingConfigurationInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -222,6 +229,7 @@ export class MessagingConfigurationContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -582,6 +590,7 @@ export function MessagingConfigurationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -628,6 +637,7 @@ export function MessagingConfigurationListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/service/rateLimit.ts b/src/rest/verify/v2/service/rateLimit.ts index aabe9f75af..5acdd7f1ea 100644 --- a/src/rest/verify/v2/service/rateLimit.ts +++ b/src/rest/verify/v2/service/rateLimit.ts @@ -167,11 +167,14 @@ export class RateLimitContextImpl implements RateLimitContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -184,11 +187,15 @@ export class RateLimitContextImpl implements RateLimitContext { fetch( callback?: (error: Error | null, item?: RateLimitInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -228,6 +235,7 @@ export class RateLimitContextImpl implements RateLimitContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -582,6 +590,7 @@ export function RateLimitListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -628,6 +637,7 @@ export function RateLimitListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/service/rateLimit/bucket.ts b/src/rest/verify/v2/service/rateLimit/bucket.ts index 75c82e9471..ff8310b27f 100644 --- a/src/rest/verify/v2/service/rateLimit/bucket.ts +++ b/src/rest/verify/v2/service/rateLimit/bucket.ts @@ -163,11 +163,14 @@ export class BucketContextImpl implements BucketContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -180,11 +183,15 @@ export class BucketContextImpl implements BucketContext { fetch( callback?: (error: Error | null, item?: BucketInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -225,6 +232,7 @@ export class BucketContextImpl implements BucketContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -585,6 +593,7 @@ export function BucketListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -632,6 +641,7 @@ export function BucketListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/service/verification.ts b/src/rest/verify/v2/service/verification.ts index ab42617358..dece77203f 100644 --- a/src/rest/verify/v2/service/verification.ts +++ b/src/rest/verify/v2/service/verification.ts @@ -131,11 +131,15 @@ export class VerificationContextImpl implements VerificationContext { fetch( callback?: (error: Error | null, item?: VerificationInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -173,6 +177,7 @@ export class VerificationContextImpl implements VerificationContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -500,6 +505,7 @@ export function VerificationListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/verify/v2/service/verificationCheck.ts b/src/rest/verify/v2/service/verificationCheck.ts index a1074ebd48..3517e56f40 100644 --- a/src/rest/verify/v2/service/verificationCheck.ts +++ b/src/rest/verify/v2/service/verificationCheck.ts @@ -122,6 +122,7 @@ export function VerificationCheckListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/verify/v2/service/webhook.ts b/src/rest/verify/v2/service/webhook.ts index 09ea06d7bf..ea78fa8331 100644 --- a/src/rest/verify/v2/service/webhook.ts +++ b/src/rest/verify/v2/service/webhook.ts @@ -171,11 +171,14 @@ export class WebhookContextImpl implements WebhookContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -188,11 +191,15 @@ export class WebhookContextImpl implements WebhookContext { fetch( callback?: (error: Error | null, item?: WebhookInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -241,6 +248,7 @@ export class WebhookContextImpl implements WebhookContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -615,6 +623,7 @@ export function WebhookListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -661,6 +670,7 @@ export function WebhookListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/template.ts b/src/rest/verify/v2/template.ts index 1f5c7e1cda..9c8f59d5db 100644 --- a/src/rest/verify/v2/template.ts +++ b/src/rest/verify/v2/template.ts @@ -175,6 +175,7 @@ export function TemplateListInstance(version: V2): TemplateListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/verificationAttempt.ts b/src/rest/verify/v2/verificationAttempt.ts index b4e096ca4d..61f52a981b 100644 --- a/src/rest/verify/v2/verificationAttempt.ts +++ b/src/rest/verify/v2/verificationAttempt.ts @@ -152,11 +152,15 @@ export class VerificationAttemptContextImpl fetch( callback?: (error: Error | null, item?: VerificationAttemptInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -463,6 +467,7 @@ export function VerificationAttemptListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/verify/v2/verificationAttemptsSummary.ts b/src/rest/verify/v2/verificationAttemptsSummary.ts index 1222f93583..1ae01b3c52 100644 --- a/src/rest/verify/v2/verificationAttemptsSummary.ts +++ b/src/rest/verify/v2/verificationAttemptsSummary.ts @@ -129,6 +129,7 @@ export class VerificationAttemptsSummaryContextImpl data["DestinationPrefix"] = params["destinationPrefix"]; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/video/v1/composition.ts b/src/rest/video/v1/composition.ts index 9e0e5e81db..f04cede9e8 100644 --- a/src/rest/video/v1/composition.ts +++ b/src/rest/video/v1/composition.ts @@ -162,11 +162,14 @@ export class CompositionContextImpl implements CompositionContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -179,11 +182,15 @@ export class CompositionContextImpl implements CompositionContext { fetch( callback?: (error: Error | null, item?: CompositionInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -575,6 +582,7 @@ export function CompositionListInstance(version: V1): CompositionListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -626,6 +634,7 @@ export function CompositionListInstance(version: V1): CompositionListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/video/v1/compositionHook.ts b/src/rest/video/v1/compositionHook.ts index f8b298d8e9..fd307332fd 100644 --- a/src/rest/video/v1/compositionHook.ts +++ b/src/rest/video/v1/compositionHook.ts @@ -199,11 +199,14 @@ export class CompositionHookContextImpl implements CompositionHookContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -216,11 +219,15 @@ export class CompositionHookContextImpl implements CompositionHookContext { fetch( callback?: (error: Error | null, item?: CompositionHookInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -283,6 +290,7 @@ export class CompositionHookContextImpl implements CompositionHookContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -676,6 +684,7 @@ export function CompositionHookListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -729,6 +738,7 @@ export function CompositionHookListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/video/v1/compositionSettings.ts b/src/rest/video/v1/compositionSettings.ts index 143133bb1b..f92bc639ef 100644 --- a/src/rest/video/v1/compositionSettings.ts +++ b/src/rest/video/v1/compositionSettings.ts @@ -111,6 +111,7 @@ export class CompositionSettingsContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -135,11 +136,15 @@ export class CompositionSettingsContextImpl fetch( callback?: (error: Error | null, item?: CompositionSettingsInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/video/v1/recording.ts b/src/rest/video/v1/recording.ts index 808593a3f4..b88aa5dcee 100644 --- a/src/rest/video/v1/recording.ts +++ b/src/rest/video/v1/recording.ts @@ -150,11 +150,14 @@ export class RecordingContextImpl implements RecordingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -167,11 +170,15 @@ export class RecordingContextImpl implements RecordingContext { fetch( callback?: (error: Error | null, item?: RecordingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -519,6 +526,7 @@ export function RecordingListInstance(version: V1): RecordingListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/video/v1/recordingSettings.ts b/src/rest/video/v1/recordingSettings.ts index 0bd2346bd7..7adfa3c8a3 100644 --- a/src/rest/video/v1/recordingSettings.ts +++ b/src/rest/video/v1/recordingSettings.ts @@ -109,6 +109,7 @@ export class RecordingSettingsContextImpl implements RecordingSettingsContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -133,11 +134,15 @@ export class RecordingSettingsContextImpl implements RecordingSettingsContext { fetch( callback?: (error: Error | null, item?: RecordingSettingsInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/video/v1/room.ts b/src/rest/video/v1/room.ts index 1a17f0f3ed..0fd136d426 100644 --- a/src/rest/video/v1/room.ts +++ b/src/rest/video/v1/room.ts @@ -213,11 +213,15 @@ export class RoomContextImpl implements RoomContext { fetch( callback?: (error: Error | null, item?: RoomInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -250,6 +254,7 @@ export class RoomContextImpl implements RoomContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -716,6 +721,7 @@ export function RoomListInstance(version: V1): RoomListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -768,6 +774,7 @@ export function RoomListInstance(version: V1): RoomListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/video/v1/room/participant.ts b/src/rest/video/v1/room/participant.ts index e769c3ff17..443a374e4e 100644 --- a/src/rest/video/v1/room/participant.ts +++ b/src/rest/video/v1/room/participant.ts @@ -214,11 +214,15 @@ export class ParticipantContextImpl implements ParticipantContext { fetch( callback?: (error: Error | null, item?: ParticipantInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -257,6 +261,7 @@ export class ParticipantContextImpl implements ParticipantContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -635,6 +640,7 @@ export function ParticipantListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/video/v1/room/participant/anonymize.ts b/src/rest/video/v1/room/participant/anonymize.ts index 60afd66657..d4ee3d641e 100644 --- a/src/rest/video/v1/room/participant/anonymize.ts +++ b/src/rest/video/v1/room/participant/anonymize.ts @@ -64,11 +64,15 @@ export class AnonymizeContextImpl implements AnonymizeContext { update( callback?: (error: Error | null, item?: AnonymizeInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.update({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( diff --git a/src/rest/video/v1/room/participant/publishedTrack.ts b/src/rest/video/v1/room/participant/publishedTrack.ts index 23ae30bad8..e56ee98c3f 100644 --- a/src/rest/video/v1/room/participant/publishedTrack.ts +++ b/src/rest/video/v1/room/participant/publishedTrack.ts @@ -115,11 +115,15 @@ export class PublishedTrackContextImpl implements PublishedTrackContext { fetch( callback?: (error: Error | null, item?: PublishedTrackInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -416,6 +420,7 @@ export function PublishedTrackListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/video/v1/room/participant/subscribeRules.ts b/src/rest/video/v1/room/participant/subscribeRules.ts index 8f21cc0dff..1c0b6a04df 100644 --- a/src/rest/video/v1/room/participant/subscribeRules.ts +++ b/src/rest/video/v1/room/participant/subscribeRules.ts @@ -108,10 +108,14 @@ export function SubscribeRulesListInstance( instance.fetch = function fetch( callback?: (error: Error | null, items: SubscribeRulesInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + let operationVersion = version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -151,6 +155,7 @@ export function SubscribeRulesListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.update({ diff --git a/src/rest/video/v1/room/participant/subscribedTrack.ts b/src/rest/video/v1/room/participant/subscribedTrack.ts index f25c0f3561..ed4c1ffb4a 100644 --- a/src/rest/video/v1/room/participant/subscribedTrack.ts +++ b/src/rest/video/v1/room/participant/subscribedTrack.ts @@ -115,11 +115,15 @@ export class SubscribedTrackContextImpl implements SubscribedTrackContext { fetch( callback?: (error: Error | null, item?: SubscribedTrackInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -428,6 +432,7 @@ export function SubscribedTrackListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/video/v1/room/recordingRules.ts b/src/rest/video/v1/room/recordingRules.ts index 635032ca01..d34ec18ab1 100644 --- a/src/rest/video/v1/room/recordingRules.ts +++ b/src/rest/video/v1/room/recordingRules.ts @@ -101,10 +101,14 @@ export function RecordingRulesListInstance( instance.fetch = function fetch( callback?: (error: Error | null, items: RecordingRulesInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + let operationVersion = version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -143,6 +147,7 @@ export function RecordingRulesListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.update({ diff --git a/src/rest/video/v1/room/roomRecording.ts b/src/rest/video/v1/room/roomRecording.ts index d149f5affc..2e516da30c 100644 --- a/src/rest/video/v1/room/roomRecording.ts +++ b/src/rest/video/v1/room/roomRecording.ts @@ -147,11 +147,14 @@ export class RoomRecordingContextImpl implements RoomRecordingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -164,11 +167,15 @@ export class RoomRecordingContextImpl implements RoomRecordingContext { fetch( callback?: (error: Error | null, item?: RoomRecordingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -527,6 +534,7 @@ export function RoomRecordingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/voice/v1/archivedCall.ts b/src/rest/voice/v1/archivedCall.ts index 3f8a7f56d9..3304a969f6 100644 --- a/src/rest/voice/v1/archivedCall.ts +++ b/src/rest/voice/v1/archivedCall.ts @@ -62,11 +62,14 @@ export class ArchivedCallContextImpl implements ArchivedCallContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( diff --git a/src/rest/voice/v1/byocTrunk.ts b/src/rest/voice/v1/byocTrunk.ts index fe6f02b73e..a2834bbb39 100644 --- a/src/rest/voice/v1/byocTrunk.ts +++ b/src/rest/voice/v1/byocTrunk.ts @@ -180,11 +180,14 @@ export class ByocTrunkContextImpl implements ByocTrunkContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -197,11 +200,15 @@ export class ByocTrunkContextImpl implements ByocTrunkContext { fetch( callback?: (error: Error | null, item?: ByocTrunkInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -253,6 +260,7 @@ export class ByocTrunkContextImpl implements ByocTrunkContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -650,6 +658,7 @@ export function ByocTrunkListInstance(version: V1): ByocTrunkListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -691,6 +700,7 @@ export function ByocTrunkListInstance(version: V1): ByocTrunkListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/voice/v1/connectionPolicy.ts b/src/rest/voice/v1/connectionPolicy.ts index a1282aab3b..f4e77b6b53 100644 --- a/src/rest/voice/v1/connectionPolicy.ts +++ b/src/rest/voice/v1/connectionPolicy.ts @@ -159,11 +159,14 @@ export class ConnectionPolicyContextImpl implements ConnectionPolicyContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -176,11 +179,15 @@ export class ConnectionPolicyContextImpl implements ConnectionPolicyContext { fetch( callback?: (error: Error | null, item?: ConnectionPolicyInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -219,6 +226,7 @@ export class ConnectionPolicyContextImpl implements ConnectionPolicyContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -562,6 +570,7 @@ export function ConnectionPolicyListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -603,6 +612,7 @@ export function ConnectionPolicyListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/voice/v1/connectionPolicy/connectionPolicyTarget.ts b/src/rest/voice/v1/connectionPolicy/connectionPolicyTarget.ts index aff8e31c9b..a3b25faa70 100644 --- a/src/rest/voice/v1/connectionPolicy/connectionPolicyTarget.ts +++ b/src/rest/voice/v1/connectionPolicy/connectionPolicyTarget.ts @@ -183,11 +183,14 @@ export class ConnectionPolicyTargetContextImpl remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -203,11 +206,15 @@ export class ConnectionPolicyTargetContextImpl item?: ConnectionPolicyTargetInstance ) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -255,6 +262,7 @@ export class ConnectionPolicyTargetContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -655,6 +663,7 @@ export function ConnectionPolicyTargetListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -701,6 +710,7 @@ export function ConnectionPolicyTargetListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/voice/v1/dialingPermissions/bulkCountryUpdate.ts b/src/rest/voice/v1/dialingPermissions/bulkCountryUpdate.ts index d5083bae73..7844a39dff 100644 --- a/src/rest/voice/v1/dialingPermissions/bulkCountryUpdate.ts +++ b/src/rest/voice/v1/dialingPermissions/bulkCountryUpdate.ts @@ -85,6 +85,7 @@ export function BulkCountryUpdateListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/src/rest/voice/v1/dialingPermissions/country.ts b/src/rest/voice/v1/dialingPermissions/country.ts index cde73d481c..2b917f7ba3 100644 --- a/src/rest/voice/v1/dialingPermissions/country.ts +++ b/src/rest/voice/v1/dialingPermissions/country.ts @@ -143,11 +143,15 @@ export class CountryContextImpl implements CountryContext { fetch( callback?: (error: Error | null, item?: CountryInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -443,6 +447,7 @@ export function CountryListInstance(version: V1): CountryListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.ts b/src/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.ts index dd968b7cb4..2e747108d4 100644 --- a/src/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.ts +++ b/src/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.ts @@ -191,6 +191,7 @@ export function HighriskSpecialPrefixListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/voice/v1/dialingPermissions/settings.ts b/src/rest/voice/v1/dialingPermissions/settings.ts index eb2345632d..1c2ba350bb 100644 --- a/src/rest/voice/v1/dialingPermissions/settings.ts +++ b/src/rest/voice/v1/dialingPermissions/settings.ts @@ -82,11 +82,15 @@ export class SettingsContextImpl implements SettingsContext { fetch( callback?: (error: Error | null, item?: SettingsInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -122,6 +126,7 @@ export class SettingsContextImpl implements SettingsContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/src/rest/voice/v1/ipRecord.ts b/src/rest/voice/v1/ipRecord.ts index f75039424d..6a8488d1e3 100644 --- a/src/rest/voice/v1/ipRecord.ts +++ b/src/rest/voice/v1/ipRecord.ts @@ -148,11 +148,14 @@ export class IpRecordContextImpl implements IpRecordContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -165,11 +168,15 @@ export class IpRecordContextImpl implements IpRecordContext { fetch( callback?: (error: Error | null, item?: IpRecordInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -204,6 +211,7 @@ export class IpRecordContextImpl implements IpRecordContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -523,6 +531,7 @@ export function IpRecordListInstance(version: V1): IpRecordListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -564,6 +573,7 @@ export function IpRecordListInstance(version: V1): IpRecordListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/voice/v1/sourceIpMapping.ts b/src/rest/voice/v1/sourceIpMapping.ts index b903b404d6..c72a761e4f 100644 --- a/src/rest/voice/v1/sourceIpMapping.ts +++ b/src/rest/voice/v1/sourceIpMapping.ts @@ -139,11 +139,14 @@ export class SourceIpMappingContextImpl implements SourceIpMappingContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -156,11 +159,15 @@ export class SourceIpMappingContextImpl implements SourceIpMappingContext { fetch( callback?: (error: Error | null, item?: SourceIpMappingInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -200,6 +207,7 @@ export class SourceIpMappingContextImpl implements SourceIpMappingContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -516,6 +524,7 @@ export function SourceIpMappingListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -557,6 +566,7 @@ export function SourceIpMappingListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/wireless/v1/command.ts b/src/rest/wireless/v1/command.ts index 66cc27adfb..5df6b86759 100644 --- a/src/rest/wireless/v1/command.ts +++ b/src/rest/wireless/v1/command.ts @@ -162,11 +162,14 @@ export class CommandContextImpl implements CommandContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -179,11 +182,15 @@ export class CommandContextImpl implements CommandContext { fetch( callback?: (error: Error | null, item?: CommandInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -490,6 +497,7 @@ export function CommandListInstance(version: V1): CommandListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -537,6 +545,7 @@ export function CommandListInstance(version: V1): CommandListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/wireless/v1/ratePlan.ts b/src/rest/wireless/v1/ratePlan.ts index e43acafe32..106f21c918 100644 --- a/src/rest/wireless/v1/ratePlan.ts +++ b/src/rest/wireless/v1/ratePlan.ts @@ -166,11 +166,14 @@ export class RatePlanContextImpl implements RatePlanContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -183,11 +186,15 @@ export class RatePlanContextImpl implements RatePlanContext { fetch( callback?: (error: Error | null, item?: RatePlanInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -224,6 +231,7 @@ export class RatePlanContextImpl implements RatePlanContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -637,6 +645,7 @@ export function RatePlanListInstance(version: V1): RatePlanListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ @@ -678,6 +687,7 @@ export function RatePlanListInstance(version: V1): RatePlanListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/wireless/v1/sim.ts b/src/rest/wireless/v1/sim.ts index fc5f8b8228..9f28a84d04 100644 --- a/src/rest/wireless/v1/sim.ts +++ b/src/rest/wireless/v1/sim.ts @@ -234,11 +234,14 @@ export class SimContextImpl implements SimContext { remove( callback?: (error: Error | null, item?: boolean) => any ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -251,11 +254,15 @@ export class SimContextImpl implements SimContext { fetch( callback?: (error: Error | null, item?: SimInstance) => any ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -320,6 +327,7 @@ export class SimContextImpl implements SimContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -750,6 +758,7 @@ export function SimListInstance(version: V1): SimListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/wireless/v1/sim/dataSession.ts b/src/rest/wireless/v1/sim/dataSession.ts index 59009e5e90..af6a320921 100644 --- a/src/rest/wireless/v1/sim/dataSession.ts +++ b/src/rest/wireless/v1/sim/dataSession.ts @@ -176,6 +176,7 @@ export function DataSessionListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/wireless/v1/sim/usageRecord.ts b/src/rest/wireless/v1/sim/usageRecord.ts index a6ff238652..1477ad2a2a 100644 --- a/src/rest/wireless/v1/sim/usageRecord.ts +++ b/src/rest/wireless/v1/sim/usageRecord.ts @@ -202,6 +202,7 @@ export function UsageRecordListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/src/rest/wireless/v1/usageRecord.ts b/src/rest/wireless/v1/usageRecord.ts index 810f6506e5..937d050e91 100644 --- a/src/rest/wireless/v1/usageRecord.ts +++ b/src/rest/wireless/v1/usageRecord.ts @@ -193,6 +193,7 @@ export function UsageRecordListInstance(version: V1): UsageRecordListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({