Skip to content

Commit

Permalink
[Librarian] Regenerated @ 021bab52f93b55d7a5786bd27716bf3a0be2d7b9 aa…
Browse files Browse the repository at this point in the history
…81ca7c51512c448626fafb32aeb46838510334
  • Loading branch information
twilio-dx committed Oct 3, 2024
1 parent 64ca243 commit a7f3211
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 3,729 deletions.
13 changes: 13 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
twilio-node changelog
=====================

[2024-10-03] Version 5.3.3
--------------------------
**Messaging**
- Add A2P external campaign CnpMigration flag

**Numbers**
- Add address sid to portability API

**Verify**
- Add `SnaClientToken` optional parameter on Verification check.
- Add `EnableSnaClientToken` optional parameter for Verification creation.


[2024-09-25] Version 5.3.2
--------------------------
**Library - Chore**
Expand Down
7 changes: 0 additions & 7 deletions src/rest/PreviewBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
*/

import Domain from "../base/Domain";
import DeployedDevices from "./preview/DeployedDevices";
import HostedNumbers from "./preview/HostedNumbers";
import Sync from "./preview/Sync";
import Marketplace from "./preview/Marketplace";
import Wireless from "./preview/Wireless";

class PreviewBase extends Domain {
_deployed_devices?: DeployedDevices;
_hosted_numbers?: HostedNumbers;
_sync?: Sync;
_marketplace?: Marketplace;
Expand All @@ -32,11 +30,6 @@ class PreviewBase extends Domain {
super(twilio, "https://preview.twilio.com");
}

get deployed_devices(): DeployedDevices {
this._deployed_devices =
this._deployed_devices || new DeployedDevices(this);
return this._deployed_devices;
}
get hosted_numbers(): HostedNumbers {
this._hosted_numbers = this._hosted_numbers || new HostedNumbers(this);
return this._hosted_numbers;
Expand Down
14 changes: 7 additions & 7 deletions src/rest/iam/V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import IamBase from "../IamBase";
import Version from "../../base/Version";
import { ApiKeyListInstance } from "./v1/apiKey";
import { GetApiKeysListInstance } from "./v1/getApiKeys";
import { NewApiKeyListInstance } from "./v1/newApiKey";
import { KeyListInstance } from "./v1/key";

export default class V1 extends Version {
/**
Expand All @@ -32,8 +32,8 @@ export default class V1 extends Version {
protected _apiKey?: ApiKeyListInstance;
/** getApiKeys - { Twilio.Iam.V1.GetApiKeysListInstance } resource */
protected _getApiKeys?: GetApiKeysListInstance;
/** newApiKey - { Twilio.Iam.V1.NewApiKeyListInstance } resource */
protected _newApiKey?: NewApiKeyListInstance;
/** keys - { Twilio.Iam.V1.KeyListInstance } resource */
protected _keys?: KeyListInstance;

/** Getter for apiKey resource */
get apiKey(): ApiKeyListInstance {
Expand All @@ -47,9 +47,9 @@ export default class V1 extends Version {
return this._getApiKeys;
}

/** Getter for newApiKey resource */
get newApiKey(): NewApiKeyListInstance {
this._newApiKey = this._newApiKey || NewApiKeyListInstance(this);
return this._newApiKey;
/** Getter for keys resource */
get keys(): KeyListInstance {
this._keys = this._keys || KeyListInstance(this);
return this._keys;
}
}
44 changes: 22 additions & 22 deletions src/rest/iam/v1/newApiKey.ts → src/rest/iam/v1/key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,41 @@ const deserialize = require("../../../base/deserialize");
const serialize = require("../../../base/serialize");
import { isValidPathParam } from "../../../base/utility";

export type NewApiKeyKeytype = "restricted";
export type KeyKeytype = "restricted";

/**
* Options to pass to create a NewApiKeyInstance
* Options to pass to create a KeyInstance
*/
export interface NewApiKeyListInstanceCreateOptions {
export interface KeyListInstanceCreateOptions {
/** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
accountSid: string;
/** A descriptive string that you create to describe the resource. It can be up to 64 characters long. */
friendlyName?: string;
/** */
keyType?: NewApiKeyKeytype;
keyType?: KeyKeytype;
/** The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). */
policy?: any;
}

export interface NewApiKeySolution {}
export interface KeySolution {}

export interface NewApiKeyListInstance {
export interface KeyListInstance {
_version: V1;
_solution: NewApiKeySolution;
_solution: KeySolution;
_uri: string;

/**
* Create a NewApiKeyInstance
* Create a KeyInstance
*
* @param params - Parameter for request
* @param callback - Callback to handle processed record
*
* @returns Resolves to processed NewApiKeyInstance
* @returns Resolves to processed KeyInstance
*/
create(
params: NewApiKeyListInstanceCreateOptions,
callback?: (error: Error | null, item?: NewApiKeyInstance) => any
): Promise<NewApiKeyInstance>;
params: KeyListInstanceCreateOptions,
callback?: (error: Error | null, item?: KeyInstance) => any
): Promise<KeyInstance>;

/**
* Provide a user-friendly representation
Expand All @@ -61,17 +61,17 @@ export interface NewApiKeyListInstance {
[inspect.custom](_depth: any, options: InspectOptions): any;
}

export function NewApiKeyListInstance(version: V1): NewApiKeyListInstance {
const instance = {} as NewApiKeyListInstance;
export function KeyListInstance(version: V1): KeyListInstance {
const instance = {} as KeyListInstance;

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

instance.create = function create(
params: NewApiKeyListInstanceCreateOptions,
callback?: (error: Error | null, items: NewApiKeyInstance) => any
): Promise<NewApiKeyInstance> {
params: KeyListInstanceCreateOptions,
callback?: (error: Error | null, items: KeyInstance) => any
): Promise<KeyInstance> {
if (params === null || params === undefined) {
throw new Error('Required parameter "params" missing.');
}
Expand Down Expand Up @@ -101,7 +101,7 @@ export function NewApiKeyListInstance(version: V1): NewApiKeyListInstance {
});

operationPromise = operationPromise.then(
(payload) => new NewApiKeyInstance(operationVersion, payload)
(payload) => new KeyInstance(operationVersion, payload)
);

operationPromise = instance._version.setPromiseCallback(
Expand All @@ -125,9 +125,9 @@ export function NewApiKeyListInstance(version: V1): NewApiKeyListInstance {
return instance;
}

interface NewApiKeyPayload extends NewApiKeyResource {}
interface KeyPayload extends KeyResource {}

interface NewApiKeyResource {
interface KeyResource {
sid: string;
friendly_name: string;
date_created: Date;
Expand All @@ -136,8 +136,8 @@ interface NewApiKeyResource {
policy: any;
}

export class NewApiKeyInstance {
constructor(protected _version: V1, payload: NewApiKeyResource) {
export class KeyInstance {
constructor(protected _version: V1, payload: KeyResource) {
this.sid = payload.sid;
this.friendlyName = payload.friendly_name;
this.dateCreated = deserialize.rfc2822DateTime(payload.date_created);
Expand Down
4 changes: 4 additions & 0 deletions src/rest/numbers/v1/portingPortability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export type PortingPortabilityNumberType =
export interface PortingPortabilityContextFetchOptions {
/** Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account. */
targetAccountSid?: string;
/** Address Sid of customer to which the number will be ported. */
addressSid?: string;
}

export interface PortingPortabilityContext {
Expand Down Expand Up @@ -99,6 +101,8 @@ export class PortingPortabilityContextImpl

if (params["targetAccountSid"] !== undefined)
data["TargetAccountSid"] = params["targetAccountSid"];
if (params["addressSid"] !== undefined)
data["AddressSid"] = params["addressSid"];

const headers: any = {};

Expand Down
37 changes: 0 additions & 37 deletions src/rest/preview/DeployedDevices.ts

This file was deleted.

Loading

0 comments on commit a7f3211

Please sign in to comment.