@wildix/wilma-voice-client 0.0.3 → 0.0.5

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.
@@ -38,6 +38,10 @@ class WilmaVoiceClient extends client_2.Client {
38
38
  httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultWilmaVoiceHttpAuthSchemeParametersProvider,
39
39
  identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
40
40
  "smithy.api#httpBearerAuth": config.token,
41
+ "wildix.auth#apiKeys": config.token,
42
+ "wildix.auth#pbx": config.token,
43
+ "wildix.auth#s2s": config.token,
44
+ "wildix.auth#xbs": config.token,
41
45
  }),
42
46
  }));
43
47
  this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VoiceSessionNotFoundException = exports.ValidationException = exports.ForbiddenException = void 0;
3
+ exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = void 0;
4
4
  const WilmaVoiceServiceException_1 = require("./WilmaVoiceServiceException");
5
5
  class ForbiddenException extends WilmaVoiceServiceException_1.WilmaVoiceServiceException {
6
6
  name = "ForbiddenException";
@@ -15,31 +15,29 @@ class ForbiddenException extends WilmaVoiceServiceException_1.WilmaVoiceServiceE
15
15
  }
16
16
  }
17
17
  exports.ForbiddenException = ForbiddenException;
18
- class ValidationException extends WilmaVoiceServiceException_1.WilmaVoiceServiceException {
19
- name = "ValidationException";
18
+ class NotFoundException extends WilmaVoiceServiceException_1.WilmaVoiceServiceException {
19
+ name = "NotFoundException";
20
20
  $fault = "client";
21
21
  constructor(opts) {
22
22
  super({
23
- name: "ValidationException",
23
+ name: "NotFoundException",
24
24
  $fault: "client",
25
25
  ...opts,
26
26
  });
27
- Object.setPrototypeOf(this, ValidationException.prototype);
27
+ Object.setPrototypeOf(this, NotFoundException.prototype);
28
28
  }
29
29
  }
30
- exports.ValidationException = ValidationException;
31
- class VoiceSessionNotFoundException extends WilmaVoiceServiceException_1.WilmaVoiceServiceException {
32
- name = "VoiceSessionNotFoundException";
30
+ exports.NotFoundException = NotFoundException;
31
+ class ValidationException extends WilmaVoiceServiceException_1.WilmaVoiceServiceException {
32
+ name = "ValidationException";
33
33
  $fault = "client";
34
- type;
35
34
  constructor(opts) {
36
35
  super({
37
- name: "VoiceSessionNotFoundException",
36
+ name: "ValidationException",
38
37
  $fault: "client",
39
38
  ...opts,
40
39
  });
41
- Object.setPrototypeOf(this, VoiceSessionNotFoundException.prototype);
42
- this.type = opts.type;
40
+ Object.setPrototypeOf(this, ValidationException.prototype);
43
41
  }
44
42
  }
45
- exports.VoiceSessionNotFoundException = VoiceSessionNotFoundException;
43
+ exports.ValidationException = ValidationException;
@@ -24,6 +24,26 @@ const getRuntimeConfig = (config) => {
24
24
  identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
25
25
  signer: new core_1.HttpBearerAuthSigner(),
26
26
  },
27
+ {
28
+ schemeId: "wildix.auth#apiKeys",
29
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#apiKeys"),
30
+ signer: new core_1.HttpBearerAuthSigner(),
31
+ },
32
+ {
33
+ schemeId: "wildix.auth#pbx",
34
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#pbx"),
35
+ signer: new core_1.HttpBearerAuthSigner(),
36
+ },
37
+ {
38
+ schemeId: "wildix.auth#s2s",
39
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#s2s"),
40
+ signer: new core_1.HttpBearerAuthSigner(),
41
+ },
42
+ {
43
+ schemeId: "wildix.auth#xbs",
44
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#xbs"),
45
+ signer: new core_1.HttpBearerAuthSigner(),
46
+ },
27
47
  ],
28
48
  logger: config?.logger ?? new client_1.NoOpLogger(),
29
49
  protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VoiceErrorEvent$ = exports.VoiceConnectParams$ = exports.VoiceAudioFormat$ = exports.TransferWebsocketCommand$ = exports.TransferCommandData$ = exports.TranscriptionWebsocketEvent$ = exports.TranscriptionEvent$ = exports.StopWebsocketCommand$ = exports.StopCommandData$ = exports.SessionStartedWebsocketEvent$ = exports.SessionStartedEvent$ = exports.SessionEndedWebsocketEvent$ = exports.SessionEndedEvent$ = exports.SendTransferOutput$ = exports.SendTransferInput$ = exports.SendStopOutput$ = exports.SendStopInput$ = exports.SendSayOutput$ = exports.SendSayInput$ = exports.SendPlayOutput$ = exports.SendPlayInput$ = exports.SendHangupOutput$ = exports.SendHangupInput$ = exports.SayWebsocketCommand$ = exports.SayCommandData$ = exports.SayCommandAudioOptions$ = exports.ReplyWebsocketEvent$ = exports.ReplyEvent$ = exports.PlayWebsocketCommand$ = exports.PlayCommandData$ = exports.PlaybackWebsocketEvent$ = exports.PlaybackEvent$ = exports.InterruptionWebsocketEvent$ = exports.InterruptionEvent$ = exports.HangupWebsocketCommand$ = exports.HangupCommandData$ = exports.ErrorWebsocketEvent$ = exports.DescribeVoiceProtocolOutput$ = exports.DescribeVoiceProtocolInput$ = exports.ControlWebsocketEvent$ = exports.ControlEvent$ = exports.CompleteWebsocketEvent$ = exports.CompleteEvent$ = exports.AudioWebsocketEvent$ = exports.AudioEvent$ = exports.errorTypeRegistries = exports.VoiceSessionNotFoundException$ = exports.ValidationException$ = exports.ForbiddenException$ = exports.WilmaVoiceServiceException$ = void 0;
3
+ exports.VoiceErrorEvent$ = exports.VoiceConnectParams$ = exports.VoiceAudioFormat$ = exports.TransferWebsocketCommand$ = exports.TransferCommandData$ = exports.TranscriptionWebsocketEvent$ = exports.TranscriptionEvent$ = exports.StopWebsocketCommand$ = exports.StopCommandData$ = exports.SessionStartedWebsocketEvent$ = exports.SessionStartedEvent$ = exports.SessionEndedWebsocketEvent$ = exports.SessionEndedEvent$ = exports.SendTransferOutput$ = exports.SendTransferInput$ = exports.SendStopOutput$ = exports.SendStopInput$ = exports.SendSayOutput$ = exports.SendSayInput$ = exports.SendPlayOutput$ = exports.SendPlayInput$ = exports.SendHangupOutput$ = exports.SendHangupInput$ = exports.SayWebsocketCommand$ = exports.SayCommandData$ = exports.SayCommandAudioOptions$ = exports.ReplyWebsocketEvent$ = exports.ReplyEvent$ = exports.PlayWebsocketCommand$ = exports.PlayCommandData$ = exports.PlaybackWebsocketEvent$ = exports.PlaybackEvent$ = exports.InterruptionWebsocketEvent$ = exports.InterruptionEvent$ = exports.HangupWebsocketCommand$ = exports.HangupCommandData$ = exports.ErrorWebsocketEvent$ = exports.DescribeVoiceProtocolOutput$ = exports.DescribeVoiceProtocolInput$ = exports.ControlWebsocketEvent$ = exports.ControlEvent$ = exports.CompleteWebsocketEvent$ = exports.CompleteEvent$ = exports.AudioWebsocketEvent$ = exports.AudioEvent$ = exports.errorTypeRegistries = exports.ValidationException$ = exports.NotFoundException$ = exports.ForbiddenException$ = exports.WilmaVoiceServiceException$ = void 0;
4
4
  exports.SendTransfer$ = exports.SendStop$ = exports.SendSay$ = exports.SendPlay$ = exports.SendHangup$ = exports.DescribeVoiceProtocol$ = void 0;
5
5
  const _AE = "AudioEvent";
6
6
  const _AWE = "AudioWebsocketEvent";
@@ -17,6 +17,7 @@ const _HCD = "HangupCommandData";
17
17
  const _HWC = "HangupWebsocketCommand";
18
18
  const _IE = "InterruptionEvent";
19
19
  const _IWE = "InterruptionWebsocketEvent";
20
+ const _NFE = "NotFoundException";
20
21
  const _PCD = "PlayCommandData";
21
22
  const _PE = "PlaybackEvent";
22
23
  const _PWC = "PlayWebsocketCommand";
@@ -55,7 +56,6 @@ const _VAF = "VoiceAudioFormat";
55
56
  const _VCP = "VoiceConnectParams";
56
57
  const _VE = "ValidationException";
57
58
  const _VEE = "VoiceErrorEvent";
58
- const _VSNFE = "VoiceSessionNotFoundException";
59
59
  const _a = "action";
60
60
  const _aD = "agentDeployment";
61
61
  const _aDg = "agentDraft";
@@ -135,29 +135,27 @@ const _s_registry = schema_1.TypeRegistry.for(_s);
135
135
  exports.WilmaVoiceServiceException$ = [-3, _s, "WilmaVoiceServiceException", 0, [], []];
136
136
  _s_registry.registerError(exports.WilmaVoiceServiceException$, WilmaVoiceServiceException_1.WilmaVoiceServiceException);
137
137
  const n0_registry = schema_1.TypeRegistry.for(n0);
138
- const n1_registry = schema_1.TypeRegistry.for(n1);
139
138
  exports.ForbiddenException$ = [-3, n0, _FE,
140
139
  { [_e]: _c, [_hE]: 403 },
141
140
  [_m],
142
141
  [0], 1
143
142
  ];
144
143
  n0_registry.registerError(exports.ForbiddenException$, errors_1.ForbiddenException);
144
+ exports.NotFoundException$ = [-3, n0, _NFE,
145
+ { [_e]: _c, [_hE]: 404 },
146
+ [_m],
147
+ [0], 1
148
+ ];
149
+ n0_registry.registerError(exports.NotFoundException$, errors_1.NotFoundException);
145
150
  exports.ValidationException$ = [-3, n0, _VE,
146
151
  { [_e]: _c, [_hE]: 400 },
147
152
  [_m],
148
153
  [0], 1
149
154
  ];
150
155
  n0_registry.registerError(exports.ValidationException$, errors_1.ValidationException);
151
- exports.VoiceSessionNotFoundException$ = [-3, n1, _VSNFE,
152
- { [_e]: _c, [_hE]: 404 },
153
- [_m, _t],
154
- [0, 0], 1
155
- ];
156
- n1_registry.registerError(exports.VoiceSessionNotFoundException$, errors_1.VoiceSessionNotFoundException);
157
156
  exports.errorTypeRegistries = [
158
157
  _s_registry,
159
158
  n0_registry,
160
- n1_registry,
161
159
  ];
162
160
  exports.AudioEvent$ = [3, n1, _AE,
163
161
  0,
@@ -35,6 +35,10 @@ export class WilmaVoiceClient extends __Client {
35
35
  httpAuthSchemeParametersProvider: defaultWilmaVoiceHttpAuthSchemeParametersProvider,
36
36
  identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
37
37
  "smithy.api#httpBearerAuth": config.token,
38
+ "wildix.auth#apiKeys": config.token,
39
+ "wildix.auth#pbx": config.token,
40
+ "wildix.auth#s2s": config.token,
41
+ "wildix.auth#xbs": config.token,
38
42
  }),
39
43
  }));
40
44
  this.middlewareStack.use(getHttpSigningPlugin(this.config));
@@ -11,29 +11,27 @@ export class ForbiddenException extends __BaseException {
11
11
  Object.setPrototypeOf(this, ForbiddenException.prototype);
12
12
  }
13
13
  }
14
- export class ValidationException extends __BaseException {
15
- name = "ValidationException";
14
+ export class NotFoundException extends __BaseException {
15
+ name = "NotFoundException";
16
16
  $fault = "client";
17
17
  constructor(opts) {
18
18
  super({
19
- name: "ValidationException",
19
+ name: "NotFoundException",
20
20
  $fault: "client",
21
21
  ...opts,
22
22
  });
23
- Object.setPrototypeOf(this, ValidationException.prototype);
23
+ Object.setPrototypeOf(this, NotFoundException.prototype);
24
24
  }
25
25
  }
26
- export class VoiceSessionNotFoundException extends __BaseException {
27
- name = "VoiceSessionNotFoundException";
26
+ export class ValidationException extends __BaseException {
27
+ name = "ValidationException";
28
28
  $fault = "client";
29
- type;
30
29
  constructor(opts) {
31
30
  super({
32
- name: "VoiceSessionNotFoundException",
31
+ name: "ValidationException",
33
32
  $fault: "client",
34
33
  ...opts,
35
34
  });
36
- Object.setPrototypeOf(this, VoiceSessionNotFoundException.prototype);
37
- this.type = opts.type;
35
+ Object.setPrototypeOf(this, ValidationException.prototype);
38
36
  }
39
37
  }
@@ -21,6 +21,26 @@ export const getRuntimeConfig = (config) => {
21
21
  identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
22
22
  signer: new HttpBearerAuthSigner(),
23
23
  },
24
+ {
25
+ schemeId: "wildix.auth#apiKeys",
26
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#apiKeys"),
27
+ signer: new HttpBearerAuthSigner(),
28
+ },
29
+ {
30
+ schemeId: "wildix.auth#pbx",
31
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#pbx"),
32
+ signer: new HttpBearerAuthSigner(),
33
+ },
34
+ {
35
+ schemeId: "wildix.auth#s2s",
36
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#s2s"),
37
+ signer: new HttpBearerAuthSigner(),
38
+ },
39
+ {
40
+ schemeId: "wildix.auth#xbs",
41
+ identityProvider: (ipc) => ipc.getIdentityProvider("wildix.auth#xbs"),
42
+ signer: new HttpBearerAuthSigner(),
43
+ },
24
44
  ],
25
45
  logger: config?.logger ?? new NoOpLogger(),
26
46
  protocol: config?.protocol ?? AwsRestJsonProtocol,
@@ -13,6 +13,7 @@ const _HCD = "HangupCommandData";
13
13
  const _HWC = "HangupWebsocketCommand";
14
14
  const _IE = "InterruptionEvent";
15
15
  const _IWE = "InterruptionWebsocketEvent";
16
+ const _NFE = "NotFoundException";
16
17
  const _PCD = "PlayCommandData";
17
18
  const _PE = "PlaybackEvent";
18
19
  const _PWC = "PlayWebsocketCommand";
@@ -51,7 +52,6 @@ const _VAF = "VoiceAudioFormat";
51
52
  const _VCP = "VoiceConnectParams";
52
53
  const _VE = "ValidationException";
53
54
  const _VEE = "VoiceErrorEvent";
54
- const _VSNFE = "VoiceSessionNotFoundException";
55
55
  const _a = "action";
56
56
  const _aD = "agentDeployment";
57
57
  const _aDg = "agentDraft";
@@ -125,35 +125,33 @@ const _va = "variables";
125
125
  const n0 = "smithy.framework";
126
126
  const n1 = "wildix.wilma.voice";
127
127
  import { TypeRegistry } from "@smithy/core/schema";
128
- import { ForbiddenException, ValidationException, VoiceSessionNotFoundException } from "../models/errors";
128
+ import { ForbiddenException, NotFoundException, ValidationException } from "../models/errors";
129
129
  import { WilmaVoiceServiceException } from "../models/WilmaVoiceServiceException";
130
130
  const _s_registry = TypeRegistry.for(_s);
131
131
  export var WilmaVoiceServiceException$ = [-3, _s, "WilmaVoiceServiceException", 0, [], []];
132
132
  _s_registry.registerError(WilmaVoiceServiceException$, WilmaVoiceServiceException);
133
133
  const n0_registry = TypeRegistry.for(n0);
134
- const n1_registry = TypeRegistry.for(n1);
135
134
  export var ForbiddenException$ = [-3, n0, _FE,
136
135
  { [_e]: _c, [_hE]: 403 },
137
136
  [_m],
138
137
  [0], 1
139
138
  ];
140
139
  n0_registry.registerError(ForbiddenException$, ForbiddenException);
140
+ export var NotFoundException$ = [-3, n0, _NFE,
141
+ { [_e]: _c, [_hE]: 404 },
142
+ [_m],
143
+ [0], 1
144
+ ];
145
+ n0_registry.registerError(NotFoundException$, NotFoundException);
141
146
  export var ValidationException$ = [-3, n0, _VE,
142
147
  { [_e]: _c, [_hE]: 400 },
143
148
  [_m],
144
149
  [0], 1
145
150
  ];
146
151
  n0_registry.registerError(ValidationException$, ValidationException);
147
- export var VoiceSessionNotFoundException$ = [-3, n1, _VSNFE,
148
- { [_e]: _c, [_hE]: 404 },
149
- [_m, _t],
150
- [0, 0], 1
151
- ];
152
- n1_registry.registerError(VoiceSessionNotFoundException$, VoiceSessionNotFoundException);
153
152
  export const errorTypeRegistries = [
154
153
  _s_registry,
155
154
  n0_registry,
156
- n1_registry,
157
155
  ];
158
156
  export var AudioEvent$ = [3, n1, _AE,
159
157
  0,
@@ -52,7 +52,7 @@ declare const SendHangupCommand_base: {
52
52
  * @see {@link SendHangupCommandOutput} for command's `response` shape.
53
53
  * @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
54
54
  *
55
- * @throws {@link VoiceSessionNotFoundException} (client fault)
55
+ * @throws {@link NotFoundException} (client fault)
56
56
  *
57
57
  * @throws {@link ValidationException} (client fault)
58
58
  *
@@ -54,7 +54,7 @@ declare const SendPlayCommand_base: {
54
54
  * @see {@link SendPlayCommandOutput} for command's `response` shape.
55
55
  * @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
56
56
  *
57
- * @throws {@link VoiceSessionNotFoundException} (client fault)
57
+ * @throws {@link NotFoundException} (client fault)
58
58
  *
59
59
  * @throws {@link ValidationException} (client fault)
60
60
  *
@@ -58,7 +58,7 @@ declare const SendSayCommand_base: {
58
58
  * @see {@link SendSayCommandOutput} for command's `response` shape.
59
59
  * @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
60
60
  *
61
- * @throws {@link VoiceSessionNotFoundException} (client fault)
61
+ * @throws {@link NotFoundException} (client fault)
62
62
  *
63
63
  * @throws {@link ValidationException} (client fault)
64
64
  *
@@ -51,7 +51,7 @@ declare const SendStopCommand_base: {
51
51
  * @see {@link SendStopCommandOutput} for command's `response` shape.
52
52
  * @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
53
53
  *
54
- * @throws {@link VoiceSessionNotFoundException} (client fault)
54
+ * @throws {@link NotFoundException} (client fault)
55
55
  *
56
56
  * @throws {@link ValidationException} (client fault)
57
57
  *
@@ -53,7 +53,7 @@ declare const SendTransferCommand_base: {
53
53
  * @see {@link SendTransferCommandOutput} for command's `response` shape.
54
54
  * @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
55
55
  *
56
- * @throws {@link VoiceSessionNotFoundException} (client fault)
56
+ * @throws {@link NotFoundException} (client fault)
57
57
  *
58
58
  * @throws {@link ValidationException} (client fault)
59
59
  *
@@ -14,23 +14,22 @@ export declare class ForbiddenException extends __BaseException {
14
14
  /**
15
15
  * @public
16
16
  */
17
- export declare class ValidationException extends __BaseException {
18
- readonly name: "ValidationException";
17
+ export declare class NotFoundException extends __BaseException {
18
+ readonly name: "NotFoundException";
19
19
  readonly $fault: "client";
20
20
  /**
21
21
  * @internal
22
22
  */
23
- constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
23
+ constructor(opts: __ExceptionOptionType<NotFoundException, __BaseException>);
24
24
  }
25
25
  /**
26
26
  * @public
27
27
  */
28
- export declare class VoiceSessionNotFoundException extends __BaseException {
29
- readonly name: "VoiceSessionNotFoundException";
28
+ export declare class ValidationException extends __BaseException {
29
+ readonly name: "ValidationException";
30
30
  readonly $fault: "client";
31
- type?: string | undefined;
32
31
  /**
33
32
  * @internal
34
33
  */
35
- constructor(opts: __ExceptionOptionType<VoiceSessionNotFoundException, __BaseException>);
34
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
36
35
  }
@@ -2,8 +2,8 @@ import { TypeRegistry } from "@smithy/core/schema";
2
2
  import type { StaticErrorSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
3
3
  export declare var WilmaVoiceServiceException$: StaticErrorSchema;
4
4
  export declare var ForbiddenException$: StaticErrorSchema;
5
+ export declare var NotFoundException$: StaticErrorSchema;
5
6
  export declare var ValidationException$: StaticErrorSchema;
6
- export declare var VoiceSessionNotFoundException$: StaticErrorSchema;
7
7
  /**
8
8
  * TypeRegistry instances containing modeled errors.
9
9
  * @internal
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wilma-voice-client",
3
3
  "description": "@wildix/wilma-voice-client client",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",