bandwidth-sdk 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/coverage/clover.xml +61 -51
  2. package/coverage/coverage-final.json +11 -11
  3. package/coverage/lcov-report/index.html +14 -14
  4. package/coverage/lcov-report/node-sdk/api/calls-api.ts.html +1 -1
  5. package/coverage/lcov-report/node-sdk/api/conferences-api.ts.html +1 -1
  6. package/coverage/lcov-report/node-sdk/api/index.html +1 -1
  7. package/coverage/lcov-report/node-sdk/api/media-api.ts.html +1 -1
  8. package/coverage/lcov-report/node-sdk/api/messages-api.ts.html +1 -1
  9. package/coverage/lcov-report/node-sdk/api/mfaapi.ts.html +1 -1
  10. package/coverage/lcov-report/node-sdk/api/phone-number-lookup-api.ts.html +1 -1
  11. package/coverage/lcov-report/node-sdk/api/recordings-api.ts.html +1 -1
  12. package/coverage/lcov-report/node-sdk/api/statistics-api.ts.html +1 -1
  13. package/coverage/lcov-report/node-sdk/base.ts.html +1 -1
  14. package/coverage/lcov-report/node-sdk/common.ts.html +1 -1
  15. package/coverage/lcov-report/node-sdk/configuration.ts.html +1 -1
  16. package/coverage/lcov-report/node-sdk/index.html +1 -1
  17. package/coverage/lcov-report/node-sdk/models/bxml/Bxml.ts.html +4 -4
  18. package/coverage/lcov-report/node-sdk/models/bxml/NestableVerb.ts.html +38 -14
  19. package/coverage/lcov-report/node-sdk/models/bxml/Response.ts.html +4 -4
  20. package/coverage/lcov-report/node-sdk/models/bxml/Root.ts.html +63 -15
  21. package/coverage/lcov-report/node-sdk/models/bxml/Verb.ts.html +11 -11
  22. package/coverage/lcov-report/node-sdk/models/bxml/index.html +15 -15
  23. package/coverage/lcov-report/node-sdk/models/bxml/index.ts.html +1 -1
  24. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Bridge.ts.html +1 -1
  25. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Conference.ts.html +1 -1
  26. package/coverage/lcov-report/node-sdk/models/bxml/verbs/CustomParam.ts.html +1 -1
  27. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Forward.ts.html +1 -1
  28. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Gather.ts.html +10 -10
  29. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Hangup.ts.html +1 -1
  30. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Pause.ts.html +1 -1
  31. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PauseRecording.ts.html +5 -5
  32. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PhoneNumber.ts.html +1 -1
  33. package/coverage/lcov-report/node-sdk/models/bxml/verbs/PlayAudio.ts.html +1 -1
  34. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Record.ts.html +1 -1
  35. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Redirect.ts.html +1 -1
  36. package/coverage/lcov-report/node-sdk/models/bxml/verbs/ResumeRecording.ts.html +1 -1
  37. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Ring.ts.html +1 -1
  38. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SendDtmf.ts.html +1 -1
  39. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SipUri.ts.html +1 -1
  40. package/coverage/lcov-report/node-sdk/models/bxml/verbs/SpeakSentence.ts.html +1 -1
  41. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartGather.ts.html +1 -1
  42. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartRecording.ts.html +1 -1
  43. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartStream.ts.html +9 -9
  44. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StartTranscription.ts.html +9 -9
  45. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopGather.ts.html +1 -1
  46. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopRecording.ts.html +1 -1
  47. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopStream.ts.html +1 -1
  48. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StopTranscription.ts.html +1 -1
  49. package/coverage/lcov-report/node-sdk/models/bxml/verbs/StreamParam.ts.html +1 -1
  50. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Tag.ts.html +1 -1
  51. package/coverage/lcov-report/node-sdk/models/bxml/verbs/Transfer.ts.html +9 -9
  52. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.html +1 -1
  53. package/coverage/lcov-report/node-sdk/models/bxml/verbs/index.ts.html +1 -1
  54. package/coverage/lcov-report/node-sdk/models/call-direction-enum.ts.html +1 -1
  55. package/coverage/lcov-report/node-sdk/models/call-state-enum.ts.html +1 -1
  56. package/coverage/lcov-report/node-sdk/models/callback-method-enum.ts.html +1 -1
  57. package/coverage/lcov-report/node-sdk/models/conference-state-enum.ts.html +1 -1
  58. package/coverage/lcov-report/node-sdk/models/file-format-enum.ts.html +1 -1
  59. package/coverage/lcov-report/node-sdk/models/index.html +1 -1
  60. package/coverage/lcov-report/node-sdk/models/index.ts.html +1 -1
  61. package/coverage/lcov-report/node-sdk/models/list-message-direction-enum.ts.html +1 -1
  62. package/coverage/lcov-report/node-sdk/models/lookup-status-enum.ts.html +1 -1
  63. package/coverage/lcov-report/node-sdk/models/machine-detection-mode-enum.ts.html +1 -1
  64. package/coverage/lcov-report/node-sdk/models/message-direction-enum.ts.html +1 -1
  65. package/coverage/lcov-report/node-sdk/models/message-status-enum.ts.html +1 -1
  66. package/coverage/lcov-report/node-sdk/models/message-type-enum.ts.html +1 -1
  67. package/coverage/lcov-report/node-sdk/models/priority-enum.ts.html +1 -1
  68. package/coverage/lcov-report/node-sdk/models/recording-state-enum.ts.html +1 -1
  69. package/coverage/lcov-report/node-sdk/models/redirect-method-enum.ts.html +1 -1
  70. package/coverage/lcov-report/node-sdk/tests/callUtils.js.html +5 -5
  71. package/coverage/lcov-report/node-sdk/tests/index.html +1 -1
  72. package/coverage/lcov.info +127 -109
  73. package/dist/models/bxml/Bxml.d.ts +2 -2
  74. package/dist/models/bxml/Bxml.js +1 -1
  75. package/dist/models/bxml/NestableVerb.d.ts +2 -2
  76. package/dist/models/bxml/NestableVerb.js +12 -2
  77. package/dist/models/bxml/Response.d.ts +2 -2
  78. package/dist/models/bxml/Response.js +1 -1
  79. package/dist/models/bxml/Root.d.ts +7 -2
  80. package/dist/models/bxml/Root.js +19 -2
  81. package/dist/models/bxml/verbs/Gather.d.ts +5 -5
  82. package/dist/models/bxml/verbs/Gather.js +5 -5
  83. package/dist/models/bxml/verbs/StartStream.d.ts +5 -5
  84. package/dist/models/bxml/verbs/StartStream.js +5 -5
  85. package/dist/models/bxml/verbs/StartTranscription.d.ts +5 -5
  86. package/dist/models/bxml/verbs/StartTranscription.js +5 -5
  87. package/dist/models/bxml/verbs/Transfer.d.ts +5 -5
  88. package/dist/models/bxml/verbs/Transfer.js +5 -5
  89. package/models/bxml/Bxml.ts +2 -2
  90. package/models/bxml/NestableVerb.ts +11 -3
  91. package/models/bxml/Response.ts +2 -2
  92. package/models/bxml/Root.ts +19 -3
  93. package/models/bxml/verbs/Gather.ts +6 -6
  94. package/models/bxml/verbs/StartStream.ts +6 -6
  95. package/models/bxml/verbs/StartTranscription.ts +6 -6
  96. package/models/bxml/verbs/Transfer.ts +6 -6
  97. package/package.json +1 -1
  98. package/tests/unit/bxml/Bxml.test.js +33 -0
  99. package/tests/unit/bxml/Response.test.js +35 -2
  100. package/tests/unit/bxml/verbs/Gather.test.js +11 -3
  101. package/tests/unit/bxml/verbs/StartStream.test.js +11 -3
  102. package/tests/unit/bxml/verbs/StartTranscription.test.js +11 -3
  103. package/tests/unit/bxml/verbs/Transfer.test.js +11 -3
@@ -3033,15 +3033,15 @@ FN:18,Bxml
3033
3033
  FNF:2
3034
3034
  FNH:2
3035
3035
  FNDA:6,(anonymous_6)
3036
- FNDA:2,Bxml
3036
+ FNDA:6,Bxml
3037
3037
  DA:1,6
3038
3038
  DA:10,6
3039
- DA:19,2
3039
+ DA:19,6
3040
3040
  DA:21,6
3041
3041
  LF:4
3042
3042
  LH:4
3043
- BRDA:19,0,0,2
3044
- BRDA:19,0,1,2
3043
+ BRDA:19,0,0,6
3044
+ BRDA:19,0,1,6
3045
3045
  BRF:2
3046
3046
  BRH:2
3047
3047
  end_of_record
@@ -3049,36 +3049,42 @@ TN:
3049
3049
  SF:models/bxml/NestableVerb.ts
3050
3050
  FN:11,(anonymous_6)
3051
3051
  FN:24,NestableVerb
3052
- FN:32,(anonymous_8)
3053
- FN:34,(anonymous_9)
3052
+ FN:40,(anonymous_8)
3053
+ FN:42,(anonymous_9)
3054
3054
  FNF:4
3055
3055
  FNH:4
3056
3056
  FNDA:10,(anonymous_6)
3057
- FNDA:14,NestableVerb
3058
- FNDA:22,(anonymous_8)
3059
- FNDA:33,(anonymous_9)
3057
+ FNDA:18,NestableVerb
3058
+ FNDA:26,(anonymous_8)
3059
+ FNDA:37,(anonymous_9)
3060
3060
  DA:1,10
3061
3061
  DA:3,10
3062
3062
  DA:11,10
3063
- DA:25,14
3064
- DA:26,14
3065
- DA:32,10
3066
- DA:33,22
3067
- DA:34,33
3068
- DA:35,22
3069
- DA:37,10
3070
- LF:10
3071
- LH:10
3072
- BRDA:25,0,0,14
3073
- BRDA:25,0,1,14
3074
- BRDA:26,1,0,14
3075
- BRDA:26,1,1,6
3076
- BRDA:34,2,0,0
3077
- BRDA:34,2,1,22
3078
- BRDA:34,3,0,22
3079
- BRDA:34,3,1,22
3080
- BRF:8
3081
- BRH:7
3063
+ DA:25,18
3064
+ DA:26,18
3065
+ DA:27,8
3066
+ DA:28,4
3067
+ DA:30,4
3068
+ DA:33,10
3069
+ DA:40,10
3070
+ DA:41,26
3071
+ DA:42,37
3072
+ DA:43,26
3073
+ DA:45,10
3074
+ LF:14
3075
+ LH:14
3076
+ BRDA:25,0,0,18
3077
+ BRDA:25,0,1,18
3078
+ BRDA:26,1,0,8
3079
+ BRDA:26,1,1,10
3080
+ BRDA:27,2,0,4
3081
+ BRDA:27,2,1,4
3082
+ BRDA:42,3,0,0
3083
+ BRDA:42,3,1,26
3084
+ BRDA:42,4,0,26
3085
+ BRDA:42,4,1,26
3086
+ BRF:10
3087
+ BRH:9
3082
3088
  end_of_record
3083
3089
  TN:
3084
3090
  SF:models/bxml/Response.ts
@@ -3087,15 +3093,15 @@ FN:18,Response
3087
3093
  FNF:2
3088
3094
  FNH:2
3089
3095
  FNDA:6,(anonymous_6)
3090
- FNDA:4,Response
3096
+ FNDA:8,Response
3091
3097
  DA:1,6
3092
3098
  DA:10,6
3093
- DA:19,4
3099
+ DA:19,8
3094
3100
  DA:21,6
3095
3101
  LF:4
3096
3102
  LH:4
3097
- BRDA:19,0,0,4
3098
- BRDA:19,0,1,4
3103
+ BRDA:19,0,0,8
3104
+ BRDA:19,0,1,8
3099
3105
  BRF:2
3100
3106
  BRH:2
3101
3107
  end_of_record
@@ -3103,36 +3109,48 @@ TN:
3103
3109
  SF:models/bxml/Root.ts
3104
3110
  FN:13,(anonymous_0)
3105
3111
  FN:22,Root
3106
- FN:30,(anonymous_2)
3107
- FN:32,(anonymous_3)
3108
- FN:40,(anonymous_4)
3109
- FNF:5
3110
- FNH:5
3112
+ FN:38,(anonymous_2)
3113
+ FN:40,(anonymous_3)
3114
+ FN:48,(anonymous_4)
3115
+ FN:56,(anonymous_5)
3116
+ FNF:6
3117
+ FNH:6
3111
3118
  FNDA:9,(anonymous_0)
3112
- FNDA:6,Root
3113
- FNDA:6,(anonymous_2)
3114
- FNDA:26,(anonymous_3)
3115
- FNDA:6,(anonymous_4)
3119
+ FNDA:14,Root
3120
+ FNDA:14,(anonymous_2)
3121
+ FNDA:38,(anonymous_3)
3122
+ FNDA:4,(anonymous_4)
3123
+ FNDA:14,(anonymous_5)
3116
3124
  DA:1,9
3117
3125
  DA:5,9
3118
3126
  DA:13,9
3119
- DA:23,6
3120
- DA:24,6
3121
- DA:30,9
3127
+ DA:23,14
3128
+ DA:24,14
3129
+ DA:25,8
3130
+ DA:26,6
3131
+ DA:28,2
3122
3132
  DA:31,6
3123
- DA:32,26
3124
- DA:33,6
3125
- DA:40,9
3126
- DA:41,6
3127
- DA:43,9
3128
- LF:12
3129
- LH:12
3130
- BRDA:32,0,0,2
3131
- BRDA:32,0,1,4
3132
- BRDA:32,1,0,6
3133
- BRDA:32,1,1,6
3134
- BRF:4
3135
- BRH:4
3133
+ DA:38,9
3134
+ DA:39,14
3135
+ DA:40,38
3136
+ DA:41,14
3137
+ DA:48,9
3138
+ DA:49,4
3139
+ DA:56,9
3140
+ DA:57,14
3141
+ DA:59,9
3142
+ LF:18
3143
+ LH:18
3144
+ BRDA:24,0,0,8
3145
+ BRDA:24,0,1,6
3146
+ BRDA:25,1,0,6
3147
+ BRDA:25,1,1,2
3148
+ BRDA:40,2,0,0
3149
+ BRDA:40,2,1,14
3150
+ BRDA:40,3,0,14
3151
+ BRDA:40,3,1,14
3152
+ BRF:8
3153
+ BRH:7
3136
3154
  end_of_record
3137
3155
  TN:
3138
3156
  SF:models/bxml/Verb.ts
@@ -3142,21 +3160,21 @@ FN:29,(anonymous_2)
3142
3160
  FN:38,(anonymous_3)
3143
3161
  FNF:4
3144
3162
  FNH:4
3145
- FNDA:35,(anonymous_0)
3146
- FNDA:71,Verb
3147
- FNDA:79,(anonymous_2)
3148
- FNDA:37,(anonymous_3)
3149
- DA:1,35
3150
- DA:9,35
3151
- DA:21,71
3152
- DA:22,71
3153
- DA:23,71
3154
- DA:29,35
3155
- DA:30,79
3156
- DA:31,79
3157
- DA:38,35
3158
- DA:39,37
3159
- DA:41,35
3163
+ FNDA:37,(anonymous_0)
3164
+ FNDA:77,Verb
3165
+ FNDA:95,(anonymous_2)
3166
+ FNDA:40,(anonymous_3)
3167
+ DA:1,37
3168
+ DA:9,37
3169
+ DA:21,77
3170
+ DA:22,77
3171
+ DA:23,77
3172
+ DA:29,37
3173
+ DA:30,95
3174
+ DA:31,95
3175
+ DA:38,37
3176
+ DA:39,40
3177
+ DA:41,37
3160
3178
  LF:11
3161
3179
  LH:11
3162
3180
  BRF:0
@@ -3258,21 +3276,21 @@ FN:56,(anonymous_9)
3258
3276
  FNF:4
3259
3277
  FNH:4
3260
3278
  FNDA:6,(anonymous_6)
3261
- FNDA:4,Gather
3262
- FNDA:4,(anonymous_8)
3263
- FNDA:2,(anonymous_9)
3279
+ FNDA:5,Gather
3280
+ FNDA:5,(anonymous_8)
3281
+ FNDA:3,(anonymous_9)
3264
3282
  DA:1,6
3265
3283
  DA:4,6
3266
3284
  DA:32,6
3267
- DA:41,4
3285
+ DA:41,5
3268
3286
  DA:48,6
3269
- DA:49,4
3287
+ DA:49,5
3270
3288
  DA:56,6
3271
- DA:57,2
3289
+ DA:57,3
3272
3290
  DA:59,6
3273
3291
  LF:9
3274
3292
  LH:9
3275
- BRDA:41,0,0,4
3293
+ BRDA:41,0,0,5
3276
3294
  BRDA:41,0,1,0
3277
3295
  BRF:2
3278
3296
  BRH:1
@@ -3321,16 +3339,16 @@ FN:9,(anonymous_6)
3321
3339
  FN:13,PauseRecording
3322
3340
  FNF:2
3323
3341
  FNH:2
3324
- FNDA:6,(anonymous_6)
3325
- FNDA:2,PauseRecording
3326
- DA:1,6
3327
- DA:9,6
3328
- DA:14,2
3329
- DA:16,6
3342
+ FNDA:8,(anonymous_6)
3343
+ FNDA:4,PauseRecording
3344
+ DA:1,8
3345
+ DA:9,8
3346
+ DA:14,4
3347
+ DA:16,8
3330
3348
  LF:4
3331
3349
  LH:4
3332
- BRDA:14,0,0,2
3333
- BRDA:14,0,1,2
3350
+ BRDA:14,0,0,4
3351
+ BRDA:14,0,1,4
3334
3352
  BRF:2
3335
3353
  BRH:2
3336
3354
  end_of_record
@@ -3556,17 +3574,17 @@ FN:36,(anonymous_8)
3556
3574
  FNF:3
3557
3575
  FNH:3
3558
3576
  FNDA:6,(anonymous_6)
3559
- FNDA:3,StartStream
3560
- FNDA:2,(anonymous_8)
3577
+ FNDA:4,StartStream
3578
+ FNDA:3,(anonymous_8)
3561
3579
  DA:1,6
3562
3580
  DA:20,6
3563
- DA:29,3
3581
+ DA:29,4
3564
3582
  DA:36,6
3565
- DA:37,2
3583
+ DA:37,3
3566
3584
  DA:39,6
3567
3585
  LF:6
3568
3586
  LH:6
3569
- BRDA:29,0,0,3
3587
+ BRDA:29,0,0,4
3570
3588
  BRDA:29,0,1,0
3571
3589
  BRF:2
3572
3590
  BRH:1
@@ -3579,17 +3597,17 @@ FN:37,(anonymous_8)
3579
3597
  FNF:3
3580
3598
  FNH:3
3581
3599
  FNDA:6,(anonymous_6)
3582
- FNDA:3,StartTranscription
3583
- FNDA:2,(anonymous_8)
3600
+ FNDA:4,StartTranscription
3601
+ FNDA:3,(anonymous_8)
3584
3602
  DA:1,6
3585
3603
  DA:21,6
3586
- DA:30,3
3604
+ DA:30,4
3587
3605
  DA:37,6
3588
- DA:38,2
3606
+ DA:38,3
3589
3607
  DA:40,6
3590
3608
  LF:6
3591
3609
  LH:6
3592
- BRDA:30,0,0,3
3610
+ BRDA:30,0,0,4
3593
3611
  BRDA:30,0,1,0
3594
3612
  BRF:2
3595
3613
  BRH:1
@@ -3716,17 +3734,17 @@ FN:45,(anonymous_8)
3716
3734
  FNF:3
3717
3735
  FNH:3
3718
3736
  FNDA:6,(anonymous_6)
3719
- FNDA:3,Transfer
3720
- FNDA:2,(anonymous_8)
3737
+ FNDA:4,Transfer
3738
+ FNDA:3,(anonymous_8)
3721
3739
  DA:1,6
3722
3740
  DA:29,6
3723
- DA:38,3
3741
+ DA:38,4
3724
3742
  DA:45,6
3725
- DA:46,2
3743
+ DA:46,3
3726
3744
  DA:48,6
3727
3745
  LF:6
3728
3746
  LH:6
3729
- BRDA:38,0,0,3
3747
+ BRDA:38,0,0,4
3730
3748
  BRDA:38,0,1,0
3731
3749
  BRF:2
3732
3750
  BRH:1
@@ -3781,16 +3799,16 @@ FN:48,(anonymous_5)
3781
3799
  FN:65,(anonymous_6)
3782
3800
  FNF:7
3783
3801
  FNH:7
3784
- FNDA:41,(anonymous_0)
3785
- FNDA:41,(anonymous_1)
3802
+ FNDA:40,(anonymous_0)
3803
+ FNDA:40,(anonymous_1)
3786
3804
  FNDA:2,(anonymous_2)
3787
3805
  FNDA:9,(anonymous_3)
3788
- FNDA:18,(anonymous_4)
3806
+ FNDA:17,(anonymous_4)
3789
3807
  FNDA:4,(anonymous_5)
3790
3808
  FNDA:10,(anonymous_6)
3791
3809
  DA:5,5
3792
3810
  DA:7,5
3793
- DA:8,41
3811
+ DA:8,40
3794
3812
  DA:11,5
3795
3813
  DA:12,2
3796
3814
  DA:18,2
@@ -3804,9 +3822,9 @@ DA:30,9
3804
3822
  DA:38,9
3805
3823
  DA:39,9
3806
3824
  DA:42,5
3807
- DA:43,18
3808
- DA:44,18
3809
- DA:45,18
3825
+ DA:43,17
3826
+ DA:44,17
3827
+ DA:45,17
3810
3828
  DA:48,5
3811
3829
  DA:49,4
3812
3830
  DA:51,4
@@ -11,7 +11,7 @@ export declare class Bxml extends Root {
11
11
  nestedVerbs?: Verb[];
12
12
  /**
13
13
  * Creates an instance of Bxml
14
- * @param nestedVerbs [Array<Verb>] Array of nested verbs
14
+ * @param nestedVerbs [Verb | Array<Verb>] Nested Verb or Array of Nested Verbs
15
15
  */
16
- constructor(nestedVerbs?: Verb[]);
16
+ constructor(nestedVerbs?: Verb | Verb[]);
17
17
  }
@@ -27,7 +27,7 @@ var Bxml = /** @class */ (function (_super) {
27
27
  __extends(Bxml, _super);
28
28
  /**
29
29
  * Creates an instance of Bxml
30
- * @param nestedVerbs [Array<Verb>] Array of nested verbs
30
+ * @param nestedVerbs [Verb | Array<Verb>] Nested Verb or Array of Nested Verbs
31
31
  */
32
32
  function Bxml(nestedVerbs) {
33
33
  return _super.call(this, 'Bxml', nestedVerbs) || this;
@@ -16,9 +16,9 @@ export declare class NestableVerb extends Verb {
16
16
  * @param name [string] Name of the XML element
17
17
  * @param content [string] Content of the XML element
18
18
  * @param attributes [object] Attributes of the XML element
19
- * @param nestedVerbs [Array<Verb>] Array of nested verbs
19
+ * @param nestedVerbs [Verb | Array<Verb>] Nested Verb or Array of Nested Verbs
20
20
  */
21
- constructor(name: string, content?: string, attributes?: object, nestedVerbs?: Verb[]);
21
+ constructor(name: string, content?: string, attributes?: object, nestedVerbs?: Verb | Verb[]);
22
22
  /**
23
23
  * Generate an XML element for the verb
24
24
  */
@@ -31,11 +31,21 @@ var NestableVerb = /** @class */ (function (_super) {
31
31
  * @param name [string] Name of the XML element
32
32
  * @param content [string] Content of the XML element
33
33
  * @param attributes [object] Attributes of the XML element
34
- * @param nestedVerbs [Array<Verb>] Array of nested verbs
34
+ * @param nestedVerbs [Verb | Array<Verb>] Nested Verb or Array of Nested Verbs
35
35
  */
36
36
  function NestableVerb(name, content, attributes, nestedVerbs) {
37
37
  var _this = _super.call(this, name, content, attributes) || this;
38
- _this.nestedVerbs = nestedVerbs || [];
38
+ if (nestedVerbs) {
39
+ if (nestedVerbs instanceof Array) {
40
+ _this.nestedVerbs = nestedVerbs;
41
+ }
42
+ else {
43
+ _this.nestedVerbs = [nestedVerbs];
44
+ }
45
+ }
46
+ else {
47
+ _this.nestedVerbs = [];
48
+ }
39
49
  return _this;
40
50
  }
41
51
  /**
@@ -11,7 +11,7 @@ export declare class Response extends Root {
11
11
  nestedVerbs?: Verb[];
12
12
  /**
13
13
  * Creates an instance of Response
14
- * @param nestedVerbs [Array<Verb>] Array of nested verbs
14
+ * @param nestedVerbs [Verb | Array<Verb>] Nested Verb or Array of Nested Verbs
15
15
  */
16
- constructor(nestedVerbs?: Verb[]);
16
+ constructor(nestedVerbs?: Verb | Verb[]);
17
17
  }
@@ -27,7 +27,7 @@ var Response = /** @class */ (function (_super) {
27
27
  __extends(Response, _super);
28
28
  /**
29
29
  * Creates an instance of Response
30
- * @param nestedVerbs [Array<Verb>] Array of nested verbs
30
+ * @param nestedVerbs [Verb | Array<Verb>] Nested Verb or Array of Nested Verbs
31
31
  */
32
32
  function Response(nestedVerbs) {
33
33
  return _super.call(this, 'Response', nestedVerbs) || this;
@@ -13,13 +13,18 @@ export declare class Root {
13
13
  /**
14
14
  * Creates an instance of Root
15
15
  * @param name [string] Name of the XML element
16
- * @param nestedVerbs [Array<Verb>] Array of nested verbs
16
+ * @param nestedVerbs [Verb | Array<Verb>] Nested Verb or Array of Nested Verbs
17
17
  */
18
- constructor(name: string, nestedVerbs?: Verb[]);
18
+ constructor(name: string, nestedVerbs?: Verb | Verb[]);
19
19
  /**
20
20
  * Generate an XML element for the verb
21
21
  */
22
22
  generateXml(): XMLBuilder;
23
+ /**
24
+ * Add a verb or verbs to the root element
25
+ * @param {Verb | Verb[]} verbs The verb or verbs to add
26
+ */
27
+ addVerbs(verbs: Verb | Verb[]): void;
23
28
  /**
24
29
  * Return BXML representation of this element
25
30
  * @param options XML Serialization options
@@ -13,11 +13,21 @@ var Root = /** @class */ (function () {
13
13
  /**
14
14
  * Creates an instance of Root
15
15
  * @param name [string] Name of the XML element
16
- * @param nestedVerbs [Array<Verb>] Array of nested verbs
16
+ * @param nestedVerbs [Verb | Array<Verb>] Nested Verb or Array of Nested Verbs
17
17
  */
18
18
  function Root(name, nestedVerbs) {
19
19
  this.name = name;
20
- this.nestedVerbs = nestedVerbs;
20
+ if (nestedVerbs) {
21
+ if (nestedVerbs instanceof Array) {
22
+ this.nestedVerbs = nestedVerbs;
23
+ }
24
+ else {
25
+ this.nestedVerbs = [nestedVerbs];
26
+ }
27
+ }
28
+ else {
29
+ this.nestedVerbs = [];
30
+ }
21
31
  }
22
32
  /**
23
33
  * Generate an XML element for the verb
@@ -28,6 +38,13 @@ var Root = /** @class */ (function () {
28
38
  (_a = this.nestedVerbs) === null || _a === void 0 ? void 0 : _a.forEach(function (verb) { xml.import(verb.generateXml()); });
29
39
  return xml;
30
40
  };
41
+ /**
42
+ * Add a verb or verbs to the root element
43
+ * @param {Verb | Verb[]} verbs The verb or verbs to add
44
+ */
45
+ Root.prototype.addVerbs = function (verbs) {
46
+ this.nestedVerbs = this.nestedVerbs.concat(verbs);
47
+ };
31
48
  /**
32
49
  * Return BXML representation of this element
33
50
  * @param options XML Serialization options
@@ -30,18 +30,18 @@ export declare class Gather extends NestableVerb {
30
30
  /**
31
31
  * Creates an instance of Gather
32
32
  * @param {GatherAttributes} attributes The attributes to add to the element
33
- * @param {AudioVerbs} audioVerbs The audio verbs to be played
33
+ * @param {PlayAudio | SpeakSentence | AudioVerbs} audioVerbs The audio verbs to be played
34
34
  */
35
- constructor(attributes?: GatherAttributes, audioVerbs?: AudioVerbs);
35
+ constructor(attributes?: GatherAttributes, audioVerbs?: PlayAudio | SpeakSentence | AudioVerbs);
36
36
  /**
37
37
  * Return BXML representation of this element
38
38
  * @param options XML Serialization options
39
39
  */
40
40
  toBxml(options?: XMLWriterOptions): string;
41
41
  /**
42
- * Add an audio verb to the gather
43
- * @param {AudioVerbs} audioVerb The audio verb or verbs to add
42
+ * Add an audio verb or verbs to the gather
43
+ * @param {PlayAudio | SpeakSentence | AudioVerbs} audioVerbs The audio verb or verbs to add
44
44
  */
45
- addAudioVerb(audioVerb: PlayAudio | SpeakSentence | AudioVerbs): void;
45
+ addAudioVerbs(audioVerbs: PlayAudio | SpeakSentence | AudioVerbs): void;
46
46
  }
47
47
  export {};
@@ -29,7 +29,7 @@ var Gather = /** @class */ (function (_super) {
29
29
  /**
30
30
  * Creates an instance of Gather
31
31
  * @param {GatherAttributes} attributes The attributes to add to the element
32
- * @param {AudioVerbs} audioVerbs The audio verbs to be played
32
+ * @param {PlayAudio | SpeakSentence | AudioVerbs} audioVerbs The audio verbs to be played
33
33
  */
34
34
  function Gather(attributes, audioVerbs) {
35
35
  return _super.call(this, 'Gather', undefined, attributes, audioVerbs) || this;
@@ -42,11 +42,11 @@ var Gather = /** @class */ (function (_super) {
42
42
  return this.generateXml().toString(options).replace(Root_1.SSML_REGEX, '<$1>');
43
43
  };
44
44
  /**
45
- * Add an audio verb to the gather
46
- * @param {AudioVerbs} audioVerb The audio verb or verbs to add
45
+ * Add an audio verb or verbs to the gather
46
+ * @param {PlayAudio | SpeakSentence | AudioVerbs} audioVerbs The audio verb or verbs to add
47
47
  */
48
- Gather.prototype.addAudioVerb = function (audioVerb) {
49
- this.nestedVerbs = this.nestedVerbs.concat(audioVerb);
48
+ Gather.prototype.addAudioVerbs = function (audioVerbs) {
49
+ this.nestedVerbs = this.nestedVerbs.concat(audioVerbs);
50
50
  };
51
51
  return Gather;
52
52
  }(NestableVerb_1.NestableVerb));
@@ -20,13 +20,13 @@ export declare class StartStream extends NestableVerb {
20
20
  /**
21
21
  * Creates an instance of StartStream
22
22
  * @param {StartStreamAttributes} attributes The attributes to add to the element
23
- * @param {StreamParam[]} streamParams The stream params to add to the element
23
+ * @param {StreamParam | StreamParam[]} streamParams The stream params to add to the element
24
24
  */
25
- constructor(attributes?: StartStreamAttributes, streamParams?: StreamParam[]);
25
+ constructor(attributes?: StartStreamAttributes, streamParams?: StreamParam | StreamParam[]);
26
26
  /**
27
- * Add a stream param to the StartStream
28
- * @param {StreamParam} streamParam The stream param to add
27
+ * Add a stream param or params to the StartStream
28
+ * @param {StreamParam | StreamParam[]} streamParams The stream param or params to add
29
29
  */
30
- addStreamParam(streamParam: StreamParam | StreamParam[]): void;
30
+ addStreamParams(streamParams: StreamParam | StreamParam[]): void;
31
31
  }
32
32
  export {};
@@ -28,17 +28,17 @@ var StartStream = /** @class */ (function (_super) {
28
28
  /**
29
29
  * Creates an instance of StartStream
30
30
  * @param {StartStreamAttributes} attributes The attributes to add to the element
31
- * @param {StreamParam[]} streamParams The stream params to add to the element
31
+ * @param {StreamParam | StreamParam[]} streamParams The stream params to add to the element
32
32
  */
33
33
  function StartStream(attributes, streamParams) {
34
34
  return _super.call(this, 'StartStream', undefined, attributes, streamParams) || this;
35
35
  }
36
36
  /**
37
- * Add a stream param to the StartStream
38
- * @param {StreamParam} streamParam The stream param to add
37
+ * Add a stream param or params to the StartStream
38
+ * @param {StreamParam | StreamParam[]} streamParams The stream param or params to add
39
39
  */
40
- StartStream.prototype.addStreamParam = function (streamParam) {
41
- this.nestedVerbs = this.nestedVerbs.concat(streamParam);
40
+ StartStream.prototype.addStreamParams = function (streamParams) {
41
+ this.nestedVerbs = this.nestedVerbs.concat(streamParams);
42
42
  };
43
43
  return StartStream;
44
44
  }(NestableVerb_1.NestableVerb));
@@ -21,13 +21,13 @@ export declare class StartTranscription extends NestableVerb {
21
21
  /**
22
22
  * Creates an instance of StartTranscription
23
23
  * @param {StartTranscriptionAttributes} attributes The attributes to add to the element
24
- * @param {CustomParam[]} customParams The custom params to add to the element
24
+ * @param {CustomParam | CustomParam[]} customParams The custom params to add to the element
25
25
  */
26
- constructor(attributes?: StartTranscriptionAttributes, customParams?: CustomParam[]);
26
+ constructor(attributes?: StartTranscriptionAttributes, customParams?: CustomParam | CustomParam[]);
27
27
  /**
28
- * Add a custom param to the StartTranscription
29
- * @param {CustomParam} customParam The custom param to add
28
+ * Add a custom param or params to the StartTranscription
29
+ * @param {CustomParam | CustomParam[]} customParams The custom param or params to add
30
30
  */
31
- addCustomParam(customParam: CustomParam | CustomParam[]): void;
31
+ addCustomParams(customParams: CustomParam | CustomParam[]): void;
32
32
  }
33
33
  export {};
@@ -28,17 +28,17 @@ var StartTranscription = /** @class */ (function (_super) {
28
28
  /**
29
29
  * Creates an instance of StartTranscription
30
30
  * @param {StartTranscriptionAttributes} attributes The attributes to add to the element
31
- * @param {CustomParam[]} customParams The custom params to add to the element
31
+ * @param {CustomParam | CustomParam[]} customParams The custom params to add to the element
32
32
  */
33
33
  function StartTranscription(attributes, customParams) {
34
34
  return _super.call(this, 'StartTranscription', undefined, attributes, customParams) || this;
35
35
  }
36
36
  /**
37
- * Add a custom param to the StartTranscription
38
- * @param {CustomParam} customParam The custom param to add
37
+ * Add a custom param or params to the StartTranscription
38
+ * @param {CustomParam | CustomParam[]} customParams The custom param or params to add
39
39
  */
40
- StartTranscription.prototype.addCustomParam = function (customParam) {
41
- this.nestedVerbs = this.nestedVerbs.concat(customParam);
40
+ StartTranscription.prototype.addCustomParams = function (customParams) {
41
+ this.nestedVerbs = this.nestedVerbs.concat(customParams);
42
42
  };
43
43
  return StartTranscription;
44
44
  }(NestableVerb_1.NestableVerb));
@@ -28,13 +28,13 @@ export declare class Transfer extends NestableVerb {
28
28
  /**
29
29
  * Creates an instance of Transfer
30
30
  * @param {TransferAttributes} attributes The attributes to add to the element
31
- * @param {NumberEntities} transferTo The number entities to transfer to
31
+ * @param {PhoneNumber | SipUri | NumberEntities} transferTo The number entities to transfer to
32
32
  */
33
- constructor(attributes?: TransferAttributes, transferTo?: NumberEntities);
33
+ constructor(attributes?: TransferAttributes, transferTo?: PhoneNumber | SipUri | NumberEntities);
34
34
  /**
35
- * Add a number entity to the transfer
36
- * @param {NumberEntities} recipient The number entity or entities to add
35
+ * Add a number entity or entities to the transfer
36
+ * @param {PhoneNumber | SipUri | NumberEntities} recipients The number entity or entities to add
37
37
  */
38
- addTransferRecipient(recipient: PhoneNumber | SipUri | NumberEntities): void;
38
+ addTransferRecipients(recipients: PhoneNumber | SipUri | NumberEntities): void;
39
39
  }
40
40
  export {};