import { inspect, InspectOptions } from "util"; import TokenPage, { TokenPaginationPayload } from "../../../base/TokenPage"; import Response from "../../../http/response"; import V1 from "../V1"; import { ApiResponse } from "../../../base/ApiResponse"; /** * Authentication configuration for Settings. Discriminated by \'source\' field: - source: INLINE → credentials embedded in \'value\' object; \'value.scheme\' selects the auth type - source: REFERENCE → references an AuthProfile resource via authProfileId */ export declare class AuthSetting { /** * Indicates credentials come from an AuthProfile resource */ "source": string; "value": InlineAuthValue; /** * AuthProfile resource ID (TypeID/TTID format) */ "authProfileId": string; constructor(payload: any); } /** * HTTP connection settings for webhook requests */ export declare class ConnectionSetting { /** * TCP connection timeout in milliseconds (100ms - 15s) */ "connectTimeoutMs": number; /** * Response read timeout in milliseconds (100ms - 15s) */ "readTimeoutMs": number; /** * Total request timeout including retries (100ms - 60s). Optional. */ "totalTimeoutMs"?: number; "retryPolicy"?: RetryPolicy; constructor(payload: any); } /** * Edge zone configuration for webhook delivery. Omitting this field means all zones are eligible and Twilio selects freely. */ export declare class EdgeZones { /** * Priority-ordered list of zone IDs. Twilio routes to the first available zone in order. Individual PoP identifiers (e.g. `IAD-1`) are not valid — use zone IDs only (see `GET /EdgeZones` for available values). */ "zones": Array; /** * Controls delivery when none of the configured zones have available PoPs. - `false` (default): delivery fails rather than routing through an unconfigured zone. - `true`: Twilio falls back to any available zone outside the configured list. */ "allowZoneFallback"?: boolean; constructor(payload: any); } /** * Credential payload, discriminated by \'scheme\'. */ export declare class InlineAuthValue { "scheme": string; /** * OAuth2 token endpoint URL */ "tokenUrl": string; /** * OAuth2 client identifier */ "clientId": string; /** * OAuth2 client secret (write-only, never returned) */ "clientSecret"?: string; /** * OAuth2 scope to request */ "scope"?: string; /** * OAuth2 audience parameter */ "audience"?: string; /** * Client credentials authentication method (defaults to CLIENT_SECRET_POST) */ "clientCredentialsAuthMethod"?: string; "username": string; /** * Password (write-only, never returned) */ "password"?: string; constructor(payload: any); } /** * Request body for PATCH Setting - only friendlyName and description can be updated */ export declare class PatchSetting { /** * Human-readable name */ "friendlyName"?: string; /** * Optional description of the Setting\'s purpose and usage */ "description"?: string; constructor(payload: any); } /** * Authentication configuration for creating a Setting. Discriminated by \'source\' field: - source: INLINE → credentials embedded in \'value\' object; \'value.scheme\' selects the auth type - source: REFERENCE → references an AuthProfile resource via authProfileId */ export declare class PostAuthSetting { /** * Indicates credentials come from an AuthProfile resource */ "source": string; "value": PostInlineAuthValue; /** * AuthProfile resource ID (TypeID/TTID format) */ "authProfileId": string; constructor(payload: any); } /** * Credential payload, discriminated by \'scheme\'. */ export declare class PostInlineAuthValue { "scheme": string; /** * OAuth2 token endpoint URL */ "tokenUrl": string; /** * OAuth2 client identifier */ "clientId": string; /** * OAuth2 client secret (write-only, never returned) */ "clientSecret": string; /** * OAuth2 scope to request */ "scope"?: string; /** * OAuth2 audience parameter */ "audience"?: string; /** * Client credentials authentication method (defaults to CLIENT_SECRET_POST) */ "clientCredentialsAuthMethod"?: string; "username": string; /** * Password (write-only, never returned) */ "password": string; constructor(payload: any); } /** * Request body for creating a new Setting */ export declare class PostSetting { /** * Human-readable name (optional, defaults to blank) */ "friendlyName"?: string | null; /** * Optional description of the Setting\'s purpose and usage */ "description"?: string; "auth": PostAuthSetting; "signature"?: SignatureSetting; /** * HTTP connection settings. If omitted, system defaults are applied. */ "connection"?: ConnectionSetting; /** * Edge zone configuration for webhook delivery. When omitted, all zones are eligible and Twilio selects freely. When set, `zones` lists preferred zones in priority order. */ "edgeZones"?: EdgeZones; constructor(payload: any); } /** * Retry behavior for failed webhook requests. If not specified, no retries are attempted (retryCount: 0 is the default). */ export declare class RetryPolicy { /** * Number of retry attempts (default: 0, no retries) */ "retryCount": number; /** * Conditions that trigger retries: - HTTP_4XX: Retry on 4xx HTTP status codes - HTTP_5XX: Retry on 5xx HTTP status codes - CONNECTION_TIMEOUT: Retry on TCP/TLS connection failures - READ_TIMEOUT: Retry when server doesn\'t respond in time - ALL: Retry on all failure types */ "retryOn": Array; constructor(payload: any); } /** * Webhook request signing configuration. Uses discriminator on \'type\' field to determine required properties. Use type: none to explicitly disable signing. */ export declare class SignatureSetting { /** * Indicates SharedKey-based signing */ "type": string; /** * SharedKey SID to use for signing */ "sharedKeyId": string; /** * Signing algorithm used to compute the request signature. Must be specified when creating a signature configuration via the v2 API; not modifiable afterward. */ "algorithm": string; constructor(payload: any); } /** * Options to pass to patch a SettingInstance */ export interface SettingContextPatchOptions { /** */ patchSetting: PatchSetting; } /** * Options to pass to create a SettingInstance */ export interface SettingListInstanceCreateOptions { /** */ postSetting: PostSetting; /** Idempotency key for mutation operations. Must be a UUIDv7 (other UUID versions are rejected with a 400). */ idempotencyKey?: string; } /** * Options to pass to each */ export interface SettingListInstanceEachOptions { /** Number of items per page (max 100, reflecting the 50-resource account limit per resource type) */ pageSize?: number; /** Token for pagination */ pageToken?: string; /** Filter Settings that reference this AuthProfile ID */ authProfileId?: string; /** Filter Settings that reference this SharedKey ID */ sharedKeyId?: string; /** Whether to list your own Settings or Twilio-managed system Settings. - CUSTOMER (default): Settings created by you - SYSTEM: Twilio-managed Settings, such as the account\'s default legacy configuration */ type?: "CUSTOMER" | "SYSTEM"; /** Function to process each record. If this and a positional callback are passed, this one will be used */ callback?: (item: SettingInstance, done: (err?: Error) => void) => void; /** Function to be called upon completion of streaming */ done?: Function; /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */ limit?: number; } /** * Options to pass to list */ export interface SettingListInstanceOptions { /** Number of items per page (max 100, reflecting the 50-resource account limit per resource type) */ pageSize?: number; /** Token for pagination */ pageToken?: string; /** Filter Settings that reference this AuthProfile ID */ authProfileId?: string; /** Filter Settings that reference this SharedKey ID */ sharedKeyId?: string; /** Whether to list your own Settings or Twilio-managed system Settings. - CUSTOMER (default): Settings created by you - SYSTEM: Twilio-managed Settings, such as the account\'s default legacy configuration */ type?: "CUSTOMER" | "SYSTEM"; /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */ limit?: number; } /** * Options to pass to page */ export interface SettingListInstancePageOptions { /** Number of items per page (max 100, reflecting the 50-resource account limit per resource type) */ pageSize?: number; /** Token for pagination */ pageToken?: string; /** Filter Settings that reference this AuthProfile ID */ authProfileId?: string; /** Filter Settings that reference this SharedKey ID */ sharedKeyId?: string; /** Whether to list your own Settings or Twilio-managed system Settings. - CUSTOMER (default): Settings created by you - SYSTEM: Twilio-managed Settings, such as the account\'s default legacy configuration */ type?: "CUSTOMER" | "SYSTEM"; } export interface SettingContext { /** * Remove a SettingInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed boolean */ remove(callback?: (error: Error | null, item?: boolean) => any): Promise; /** * Remove a SettingInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed boolean with HTTP metadata */ removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Fetch a SettingInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance */ fetch(callback?: (error: Error | null, item?: SettingInstance) => any): Promise; /** * Fetch a SettingInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance with HTTP metadata */ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Patch a SettingInstance * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance */ patch(params: PatchSetting, headers?: any, callback?: (error: Error | null, item?: SettingInstance) => any): Promise; /** * Patch a SettingInstance and return HTTP info * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance with HTTP metadata */ patchWithHttpInfo(params: PatchSetting, headers?: any, callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation */ toJSON(): any; [inspect.custom](_depth: any, options: InspectOptions): any; } export interface SettingContextSolution { settingId: string; } export declare class SettingContextImpl implements SettingContext { protected _version: V1; protected _solution: SettingContextSolution; protected _uri: string; constructor(_version: V1, settingId: string); remove(callback?: (error: Error | null, item?: boolean) => any): Promise; removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; fetch(callback?: (error: Error | null, item?: SettingInstance) => any): Promise; fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; patch(params: PatchSetting, headers?: any, callback?: (error: Error | null, item?: SettingInstance) => any): Promise; patchWithHttpInfo(params: PatchSetting, headers?: any, callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation * * @returns Object */ toJSON(): SettingContextSolution; [inspect.custom](_depth: any, options: InspectOptions): string; } interface SettingPayload extends TokenPaginationPayload { settings: SettingResource[]; } interface SettingResource { id: string; type: string; friendlyName: string; description: string; auth: AuthSetting; signature: SignatureSetting; connection: ConnectionSetting; edgeZones: EdgeZones; createdAt: Date; updatedAt: Date; } /** * Reusable webhook configuration combining auth, signing, and connection settings */ export declare class SettingInstance { protected _version: V1; protected _solution: SettingContextSolution; protected _context?: SettingContext; constructor(_version: V1, _payload: SettingResource, settingId?: string); /** * Unique Setting identifier (TypeID/TTID format) */ id: string; /** * Setting ownership (read-only): - **system**: Managed by Twilio - Twilio provides managed Settings to simplify your onboarding journey - Cannot be modified or deleted - Used for default account configuration - **customer**: Created by you - Can update friendlyName via PATCH - Can delete via DELETE (if not in use) - Core config (auth, signature) is immutable */ type: string; /** * Human-readable name */ friendlyName: string; /** * Optional description of the Setting\'s purpose and usage */ description: string; auth: AuthSetting; signature: SignatureSetting; /** * HTTP connection settings. If omitted, system defaults are applied. */ connection: ConnectionSetting; /** * Edge zone configuration for webhook delivery. When omitted, all zones are eligible and Twilio selects freely. When set, `zones` lists preferred zones in priority order. */ edgeZones: EdgeZones; createdAt: Date; updatedAt: Date; private get _proxy(); /** * Remove a SettingInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed boolean */ remove(callback?: (error: Error | null, item?: boolean) => any): Promise; /** * Remove a SettingInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed boolean with HTTP metadata */ removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Fetch a SettingInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance */ fetch(callback?: (error: Error | null, item?: SettingInstance) => any): Promise; /** * Fetch a SettingInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance with HTTP metadata */ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Patch a SettingInstance * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance */ patch(params: PatchSetting, headers?: any, callback?: (error: Error | null, item?: SettingInstance) => any): Promise; /** * Patch a SettingInstance and return HTTP info * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance with HTTP metadata */ patchWithHttpInfo(params: PatchSetting, headers?: any, callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation * * @returns Object */ toJSON(): { id: string; type: string; friendlyName: string; description: string; auth: AuthSetting; signature: SignatureSetting; connection: ConnectionSetting; edgeZones: EdgeZones; createdAt: Date; updatedAt: Date; }; [inspect.custom](_depth: any, options: InspectOptions): string; } export interface SettingSolution { } export interface SettingListInstance { _version: V1; _solution: SettingSolution; _uri: string; (settingId: string): SettingContext; get(settingId: string): SettingContext; /** * Create a SettingInstance * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance */ create(params: PostSetting, headers?: any, callback?: (error: Error | null, item?: SettingInstance) => any): Promise; /** * Create a SettingInstance and return HTTP info * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed SettingInstance with HTTP metadata */ createWithHttpInfo(params: PostSetting, headers?: any, callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Streams SettingInstance records from the API. * * This operation lazily loads records as efficiently as possible until the limit * is reached. * * The results are passed into the callback function, so this operation is memory * efficient. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { SettingListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ each(callback?: (item: SettingInstance, done: (err?: Error) => void) => void): void; each(params: SettingListInstanceEachOptions, callback?: (item: SettingInstance, done: (err?: Error) => void) => void): void; /** * Streams SettingInstance records from the API with HTTP metadata captured per page. * * This operation lazily loads records as efficiently as possible until the limit * is reached. HTTP metadata (status code, headers) is captured for each page request. * * The results are passed into the callback function, so this operation is memory * efficient. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { SettingListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ eachWithHttpInfo(callback?: (item: SettingInstance, done: (err?: Error) => void) => void): void; eachWithHttpInfo(params: SettingListInstanceEachOptions, callback?: (item: SettingInstance, done: (err?: Error) => void) => void): void; /** * Retrieve a single target page of SettingInstance records from the API. * * The request is executed immediately. * * @param { string } [targetUrl] - API-generated URL for the requested results page * @param { function } [callback] - Callback to handle list of records */ getPage(targetUrl: string, callback?: (error: Error | null, items: SettingPage) => any): Promise; /** * Retrieve a single target page of SettingInstance records from the API with HTTP metadata. * * The request is executed immediately. * * @param { string } [targetUrl] - API-generated URL for the requested results page * @param { function } [callback] - Callback to handle list of records with metadata */ getPageWithHttpInfo(targetUrl: string, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Lists SettingInstance records from the API as a list. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { SettingListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ list(callback?: (error: Error | null, items: SettingInstance[]) => any): Promise; list(params: SettingListInstanceOptions, callback?: (error: Error | null, items: SettingInstance[]) => any): Promise; /** * Lists SettingInstance records from the API as a list with HTTP metadata. * * Returns all records along with HTTP metadata from the first page fetched. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { SettingListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records with metadata */ listWithHttpInfo(callback?: (error: Error | null, items: ApiResponse) => any): Promise>; listWithHttpInfo(params: SettingListInstanceOptions, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Retrieve a single page of SettingInstance records from the API. * * The request is executed immediately. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { SettingListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ page(callback?: (error: Error | null, items: SettingPage) => any): Promise; page(params: SettingListInstancePageOptions, callback?: (error: Error | null, items: SettingPage) => any): Promise; /** * Retrieve a single page of SettingInstance records from the API with HTTP metadata. * * The request is executed immediately. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { SettingListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records with metadata */ pageWithHttpInfo(callback?: (error: Error | null, items: ApiResponse) => any): Promise>; pageWithHttpInfo(params: SettingListInstancePageOptions, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation */ toJSON(): any; [inspect.custom](_depth: any, options: InspectOptions): any; } export declare function SettingListInstance(version: V1): SettingListInstance; export declare class SettingPage extends TokenPage { /** * Initialize the SettingPage * * @param version - Version of the resource * @param response - Response from the API * @param uri - URI of the resource * @param params - Query parameters * @param solution - Path solution */ constructor(version: V1, response: Response, uri: string, params: any, solution: SettingSolution); /** * Build an instance of SettingInstance * * @param payload - Payload response from the API */ getInstance(payload: SettingResource): SettingInstance; [inspect.custom](depth: any, options: InspectOptions): string; } export {};