Skip to content

Commit

Permalink
Merge pull request #34 from Bandwidth/task/update-machine-detection-name
Browse files Browse the repository at this point in the history
DX-2243 Update Machine Detection Model Name
  • Loading branch information
ajrice6713 authored Sep 27, 2021
2 parents 40c3f4b + ce75bbb commit d0f9213
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export { DisconnectMethodEnum } from './models/disconnectMethodEnum';
export { Diversion } from './models/diversion';
export { FallbackMethodEnum } from './models/fallbackMethodEnum';
export { FileFormatEnum } from './models/fileFormatEnum';
export { MachineDetectionRequest } from './models/machineDetectionRequest';
export { MachineDetectionConfiguration } from './models/machineDetectionConfiguration';
export { ModeEnum } from './models/modeEnum';
export { ModifyCallRecordingRequest } from './models/modifyCallRecordingRequest';
export { ModifyCallRequest } from './models/modifyCallRequest';
Expand Down
10 changes: 5 additions & 5 deletions src/models/createCallRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import {
disconnectMethodEnumSchema,
} from './disconnectMethodEnum';
import {
MachineDetectionRequest,
machineDetectionRequestSchema,
} from './machineDetectionRequest';
MachineDetectionConfiguration,
machineDetectionConfigurationSchema,
} from './machineDetectionConfiguration';

export interface CreateCallRequest {
/** Format is E164 */
Expand All @@ -48,7 +48,7 @@ export interface CreateCallRequest {
disconnectMethod?: DisconnectMethodEnum | null;
tag?: string | null;
applicationId: string;
machineDetection?: MachineDetectionRequest;
machineDetection?: MachineDetectionConfiguration;
}

export const createCallRequestSchema: Schema<CreateCallRequest> = object({
Expand Down Expand Up @@ -77,6 +77,6 @@ export const createCallRequestSchema: Schema<CreateCallRequest> = object({
applicationId: ['applicationId', string()],
machineDetection: [
'machineDetection',
optional(lazy(() => machineDetectionRequestSchema)),
optional(lazy(() => machineDetectionConfigurationSchema)),
],
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from './fallbackMethodEnum';
import { ModeEnum, modeEnumSchema } from './modeEnum';

export interface MachineDetectionRequest {
export interface MachineDetectionConfiguration {
/** The machine detection mode. If set to 'async', the detection result will be sent in a 'machineDetectionComplete' callback. If set to 'sync', the 'answer' callback will wait for the machine detection to complete and will include its result. Default is 'async'. */
mode?: ModeEnum;
/** Total amount of time (in seconds) before giving up. */
Expand All @@ -47,7 +47,7 @@ export interface MachineDetectionRequest {
fallbackPassword?: string | null;
}

export const machineDetectionRequestSchema: Schema<MachineDetectionRequest> = object(
export const machineDetectionConfigurationSchema: Schema<MachineDetectionConfiguration> = object(
{
mode: ['mode', optional(modeEnumSchema)],
detectionTimeout: ['detectionTimeout', optional(number())],
Expand Down
2 changes: 1 addition & 1 deletion tests/api.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApiError, ApiController, Client, ModeEnum, CallbackMethodEnum, MachineDetectionRequest } from '../src';
import { ApiError, ApiController, Client, ModeEnum, CallbackMethodEnum, MachineDetectionConfiguration } from '../src';

let controller;

Expand Down

0 comments on commit d0f9213

Please sign in to comment.