@wildix/wda-stream-client 1.0.30 → 1.0.32

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.
@@ -6,12 +6,18 @@ const ConsumeEventCommand_1 = require("./commands/ConsumeEventCommand");
6
6
  const DescribeEventCommand_1 = require("./commands/DescribeEventCommand");
7
7
  const GetConferenceIdCommand_1 = require("./commands/GetConferenceIdCommand");
8
8
  const GetConversationsCommand_1 = require("./commands/GetConversationsCommand");
9
+ const QueryPresenceCommand_1 = require("./commands/QueryPresenceCommand");
10
+ const QueryPresencesCommand_1 = require("./commands/QueryPresencesCommand");
11
+ const UpdatePresenceLastSeenCommand_1 = require("./commands/UpdatePresenceLastSeenCommand");
9
12
  const smithy_client_1 = require("@smithy/smithy-client");
10
13
  const commands = {
11
14
  ConsumeEventCommand: ConsumeEventCommand_1.ConsumeEventCommand,
12
15
  DescribeEventCommand: DescribeEventCommand_1.DescribeEventCommand,
13
16
  GetConferenceIdCommand: GetConferenceIdCommand_1.GetConferenceIdCommand,
14
17
  GetConversationsCommand: GetConversationsCommand_1.GetConversationsCommand,
18
+ QueryPresenceCommand: QueryPresenceCommand_1.QueryPresenceCommand,
19
+ QueryPresencesCommand: QueryPresencesCommand_1.QueryPresencesCommand,
20
+ UpdatePresenceLastSeenCommand: UpdatePresenceLastSeenCommand_1.UpdatePresenceLastSeenCommand,
15
21
  };
16
22
  class WdaStream extends WdaStreamClient_1.WdaStreamClient {
17
23
  }
@@ -4,6 +4,8 @@ exports.WdaStreamClient = exports.__Client = void 0;
4
4
  const runtimeConfig_1 = require("./runtimeConfig");
5
5
  const runtimeExtensions_1 = require("./runtimeExtensions");
6
6
  const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
7
+ const middleware_content_length_1 = require("@smithy/middleware-content-length");
8
+ const middleware_retry_1 = require("@smithy/middleware-retry");
7
9
  const smithy_client_1 = require("@smithy/smithy-client");
8
10
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
9
11
  const smithy_utils_1 = require("@wildix/smithy-utils");
@@ -11,7 +13,8 @@ class WdaStreamClient extends smithy_client_1.Client {
11
13
  constructor(...[configuration]) {
12
14
  let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
13
15
  let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
14
- let _config_2 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_1, configuration?.extensions || []);
16
+ let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
17
+ let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
15
18
  const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `wda-${configuration.env}.wildix.com` : 'wda.wildix.com';
16
19
  const endpoint = () => {
17
20
  return {
@@ -22,13 +25,15 @@ class WdaStreamClient extends smithy_client_1.Client {
22
25
  };
23
26
  };
24
27
  const config = {
25
- ..._config_2,
28
+ ..._config_3,
26
29
  endpoint,
27
30
  };
28
31
  super(config);
29
32
  this.config = config;
30
33
  this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
31
34
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
35
+ this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
36
+ this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
32
37
  }
33
38
  destroy() {
34
39
  super.destroy();
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueryPresenceCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class QueryPresenceCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("WdaStream", "QueryPresence", {})
15
+ .n("WdaStreamClient", "QueryPresenceCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_QueryPresenceCommand)
18
+ .de(Aws_restJson1_1.de_QueryPresenceCommand)
19
+ .build() {
20
+ }
21
+ exports.QueryPresenceCommand = QueryPresenceCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueryPresencesCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class QueryPresencesCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("WdaStream", "QueryPresences", {})
15
+ .n("WdaStreamClient", "QueryPresencesCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_QueryPresencesCommand)
18
+ .de(Aws_restJson1_1.de_QueryPresencesCommand)
19
+ .build() {
20
+ }
21
+ exports.QueryPresencesCommand = QueryPresencesCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePresenceLastSeenCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class UpdatePresenceLastSeenCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("WdaStream", "UpdatePresenceLastSeen", {})
15
+ .n("WdaStreamClient", "UpdatePresenceLastSeenCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_UpdatePresenceLastSeenCommand)
18
+ .de(Aws_restJson1_1.de_UpdatePresenceLastSeenCommand)
19
+ .build() {
20
+ }
21
+ exports.UpdatePresenceLastSeenCommand = UpdatePresenceLastSeenCommand;
@@ -5,3 +5,6 @@ tslib_1.__exportStar(require("./ConsumeEventCommand"), exports);
5
5
  tslib_1.__exportStar(require("./DescribeEventCommand"), exports);
6
6
  tslib_1.__exportStar(require("./GetConferenceIdCommand"), exports);
7
7
  tslib_1.__exportStar(require("./GetConversationsCommand"), exports);
8
+ tslib_1.__exportStar(require("./QueryPresenceCommand"), exports);
9
+ tslib_1.__exportStar(require("./QueryPresencesCommand"), exports);
10
+ tslib_1.__exportStar(require("./UpdatePresenceLastSeenCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebsocketEvent = exports.WebhookEventType = exports.PresenceEventType = exports.PresenceAnalyticsEventType = exports.ConsumeEventInputEvent = exports.SmsStatus = exports.SmsChannelType = exports.SmsConsumeEventType = exports.PresenceConsumeEventType = exports.ConferenceTranscriptionSentiment = exports.ConferenceEventType = exports.ConferenceConsumeEventType = exports.ConferenceConsumeDirection = exports.ChatEventType = exports.ChatConsumeEventType = exports.ChatTag = exports.ChatStatus = exports.ChatParticipantType = exports.ChatParticipantRole = exports.ChatDirection = exports.ChannelType = exports.CallFlowConsumeStatus = exports.CallEventType = exports.CallEndConsume = exports.CallFlowAttachmentConsumeType = exports.CallEndBy = exports.CallFlowStatus = exports.CallAnalyticsLiveProgressEventTrigger = exports.LiveEventType = exports.CallConsumeEventType = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.PbxLicenseType = exports.ConferenceDirection = exports.CallTranscriptionSpeaker = exports.CallFlowTranscriptionStatus = exports.CallRecordPauseReason = exports.CallRecordOwner = exports.License = exports.CallDirection = exports.ConversationStatus = exports.CallDevice = exports.CallParticipantType = exports.CallParticipantRole = exports.CallFlowAttachmentType = exports.WhatsAppStatus = exports.WhatsAppEventType = exports.ForbiddenException = exports.ValidationException = void 0;
4
- exports.MatchNotFoundException = exports.WebsocketTopic = void 0;
4
+ exports.PresenceNotAvailableException = exports.TelephonyStatus = exports.PresenceStatus = exports.MatchNotFoundException = exports.WebsocketTopic = void 0;
5
5
  const WdaStreamServiceException_1 = require("./WdaStreamServiceException");
6
6
  class ValidationException extends WdaStreamServiceException_1.WdaStreamServiceException {
7
7
  constructor(opts) {
@@ -403,3 +403,30 @@ class MatchNotFoundException extends WdaStreamServiceException_1.WdaStreamServic
403
403
  }
404
404
  }
405
405
  exports.MatchNotFoundException = MatchNotFoundException;
406
+ exports.PresenceStatus = {
407
+ AWAY: "AWAY",
408
+ DND: "DND",
409
+ OFFLINE: "OFFLINE",
410
+ ONLINE: "ONLINE",
411
+ ONLY_SIP: "ONLY_SIP",
412
+ };
413
+ exports.TelephonyStatus = {
414
+ REGISTERED: "REGISTERED",
415
+ RINGING: "RINGING",
416
+ RT: "RT",
417
+ TALKING: "TALKING",
418
+ UNREGISTERED: "UNREGISTERED",
419
+ };
420
+ class PresenceNotAvailableException extends WdaStreamServiceException_1.WdaStreamServiceException {
421
+ constructor(opts) {
422
+ super({
423
+ name: "PresenceNotAvailableException",
424
+ $fault: "client",
425
+ ...opts
426
+ });
427
+ this.name = "PresenceNotAvailableException";
428
+ this.$fault = "client";
429
+ Object.setPrototypeOf(this, PresenceNotAvailableException.prototype);
430
+ }
431
+ }
432
+ exports.PresenceNotAvailableException = PresenceNotAvailableException;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetConversationsCommand = exports.de_GetConferenceIdCommand = exports.de_DescribeEventCommand = exports.de_ConsumeEventCommand = exports.se_GetConversationsCommand = exports.se_GetConferenceIdCommand = exports.se_DescribeEventCommand = exports.se_ConsumeEventCommand = void 0;
3
+ exports.de_UpdatePresenceLastSeenCommand = exports.de_QueryPresencesCommand = exports.de_QueryPresenceCommand = exports.de_GetConversationsCommand = exports.de_GetConferenceIdCommand = exports.de_DescribeEventCommand = exports.de_ConsumeEventCommand = exports.se_UpdatePresenceLastSeenCommand = exports.se_QueryPresencesCommand = exports.se_QueryPresenceCommand = exports.se_GetConversationsCommand = exports.se_GetConferenceIdCommand = exports.se_DescribeEventCommand = exports.se_ConsumeEventCommand = void 0;
4
4
  const WdaStreamServiceException_1 = require("../models/WdaStreamServiceException");
5
5
  const models_0_1 = require("../models/models_0");
6
6
  const core_1 = require("@smithy/core");
@@ -71,6 +71,53 @@ const se_GetConversationsCommand = async (input, context) => {
71
71
  return b.build();
72
72
  };
73
73
  exports.se_GetConversationsCommand = se_GetConversationsCommand;
74
+ const se_QueryPresenceCommand = async (input, context) => {
75
+ const b = (0, core_1.requestBuilder)(input, context);
76
+ const headers = {
77
+ 'content-type': 'application/json',
78
+ };
79
+ b.bp("/v2/stream/presence/query");
80
+ let body;
81
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
82
+ 'filter': _ => (0, smithy_client_1._json)(_),
83
+ }));
84
+ b.m("POST")
85
+ .h(headers)
86
+ .b(body);
87
+ return b.build();
88
+ };
89
+ exports.se_QueryPresenceCommand = se_QueryPresenceCommand;
90
+ const se_QueryPresencesCommand = async (input, context) => {
91
+ const b = (0, core_1.requestBuilder)(input, context);
92
+ const headers = {
93
+ 'content-type': 'application/json',
94
+ };
95
+ b.bp("/v2/stream/query_presences");
96
+ let body;
97
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
98
+ 'filter': _ => (0, smithy_client_1._json)(_),
99
+ }));
100
+ b.m("POST")
101
+ .h(headers)
102
+ .b(body);
103
+ return b.build();
104
+ };
105
+ exports.se_QueryPresencesCommand = se_QueryPresencesCommand;
106
+ const se_UpdatePresenceLastSeenCommand = async (input, context) => {
107
+ const b = (0, core_1.requestBuilder)(input, context);
108
+ const headers = {};
109
+ b.bp("/v2/stream/presence/update_last_seen");
110
+ const query = (0, smithy_client_1.map)({
111
+ [_u]: [, input[_uI]],
112
+ });
113
+ let body;
114
+ b.m("POST")
115
+ .h(headers)
116
+ .q(query)
117
+ .b(body);
118
+ return b.build();
119
+ };
120
+ exports.se_UpdatePresenceLastSeenCommand = se_UpdatePresenceLastSeenCommand;
74
121
  const de_ConsumeEventCommand = async (output, context) => {
75
122
  if (output.statusCode !== 200 && output.statusCode >= 300) {
76
123
  return de_CommandError(output, context);
@@ -181,6 +228,47 @@ const de_GetConversationsCommand = async (output, context) => {
181
228
  return contents;
182
229
  };
183
230
  exports.de_GetConversationsCommand = de_GetConversationsCommand;
231
+ const de_QueryPresenceCommand = async (output, context) => {
232
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
233
+ return de_CommandError(output, context);
234
+ }
235
+ const contents = (0, smithy_client_1.map)({
236
+ $metadata: deserializeMetadata(output),
237
+ });
238
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
239
+ const doc = (0, smithy_client_1.take)(data, {
240
+ 'presence': smithy_client_1._json,
241
+ });
242
+ Object.assign(contents, doc);
243
+ return contents;
244
+ };
245
+ exports.de_QueryPresenceCommand = de_QueryPresenceCommand;
246
+ const de_QueryPresencesCommand = async (output, context) => {
247
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
248
+ return de_CommandError(output, context);
249
+ }
250
+ const contents = (0, smithy_client_1.map)({
251
+ $metadata: deserializeMetadata(output),
252
+ });
253
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
254
+ const doc = (0, smithy_client_1.take)(data, {
255
+ 'presences': smithy_client_1._json,
256
+ });
257
+ Object.assign(contents, doc);
258
+ return contents;
259
+ };
260
+ exports.de_QueryPresencesCommand = de_QueryPresencesCommand;
261
+ const de_UpdatePresenceLastSeenCommand = async (output, context) => {
262
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
263
+ return de_CommandError(output, context);
264
+ }
265
+ const contents = (0, smithy_client_1.map)({
266
+ $metadata: deserializeMetadata(output),
267
+ });
268
+ await (0, smithy_client_1.collectBody)(output.body, context);
269
+ return contents;
270
+ };
271
+ exports.de_UpdatePresenceLastSeenCommand = de_UpdatePresenceLastSeenCommand;
184
272
  const de_CommandError = async (output, context) => {
185
273
  const parsedOutput = {
186
274
  ...output,
@@ -197,6 +285,9 @@ const de_CommandError = async (output, context) => {
197
285
  case "MatchNotFoundException":
198
286
  case "wildix.wda.stream#MatchNotFoundException":
199
287
  throw await de_MatchNotFoundExceptionRes(parsedOutput, context);
288
+ case "PresenceNotAvailableException":
289
+ case "wildix.wda.stream#PresenceNotAvailableException":
290
+ throw await de_PresenceNotAvailableExceptionRes(parsedOutput, context);
200
291
  default:
201
292
  const parsedBody = parsedOutput.body;
202
293
  return throwDefaultError({
@@ -246,6 +337,19 @@ const de_MatchNotFoundExceptionRes = async (parsedOutput, context) => {
246
337
  });
247
338
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
248
339
  };
340
+ const de_PresenceNotAvailableExceptionRes = async (parsedOutput, context) => {
341
+ const contents = (0, smithy_client_1.map)({});
342
+ const data = parsedOutput.body;
343
+ const doc = (0, smithy_client_1.take)(data, {
344
+ 'message': smithy_client_1.expectString,
345
+ });
346
+ Object.assign(contents, doc);
347
+ const exception = new models_0_1.PresenceNotAvailableException({
348
+ $metadata: deserializeMetadata(parsedOutput),
349
+ ...contents
350
+ });
351
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
352
+ };
249
353
  const se_ConsumeEventInputEvent = (input, context) => {
250
354
  return models_0_1.ConsumeEventInputEvent.visit(input, {
251
355
  callAgentsCancel: value => ({ "callAgentsCancel": (0, smithy_client_1._json)(value) }),
@@ -370,6 +474,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
370
474
  value.length != 0) &&
371
475
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
372
476
  const _c = "company";
477
+ const _u = "user";
478
+ const _uI = "userId";
373
479
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
374
480
  if (encoded.length) {
375
481
  return JSON.parse(encoded);
@@ -3,12 +3,18 @@ import { ConsumeEventCommand, } from "./commands/ConsumeEventCommand";
3
3
  import { DescribeEventCommand, } from "./commands/DescribeEventCommand";
4
4
  import { GetConferenceIdCommand, } from "./commands/GetConferenceIdCommand";
5
5
  import { GetConversationsCommand, } from "./commands/GetConversationsCommand";
6
+ import { QueryPresenceCommand, } from "./commands/QueryPresenceCommand";
7
+ import { QueryPresencesCommand, } from "./commands/QueryPresencesCommand";
8
+ import { UpdatePresenceLastSeenCommand, } from "./commands/UpdatePresenceLastSeenCommand";
6
9
  import { createAggregatedClient } from "@smithy/smithy-client";
7
10
  const commands = {
8
11
  ConsumeEventCommand,
9
12
  DescribeEventCommand,
10
13
  GetConferenceIdCommand,
11
14
  GetConversationsCommand,
15
+ QueryPresenceCommand,
16
+ QueryPresencesCommand,
17
+ UpdatePresenceLastSeenCommand,
12
18
  };
13
19
  export class WdaStream extends WdaStreamClient {
14
20
  }
@@ -1,6 +1,8 @@
1
1
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
2
2
  import { resolveRuntimeExtensions, } from "./runtimeExtensions";
3
3
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
4
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
5
+ import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
4
6
  import { Client as __Client, } from "@smithy/smithy-client";
5
7
  import { authorizationMiddleware } from '@wildix/smithy-utils';
6
8
  export { __Client };
@@ -8,7 +10,8 @@ export class WdaStreamClient extends __Client {
8
10
  constructor(...[configuration]) {
9
11
  let _config_0 = __getRuntimeConfig(configuration || {});
10
12
  let _config_1 = resolveUserAgentConfig(_config_0);
11
- let _config_2 = resolveRuntimeExtensions(_config_1, configuration?.extensions || []);
13
+ let _config_2 = resolveRetryConfig(_config_1);
14
+ let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
12
15
  const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `wda-${configuration.env}.wildix.com` : 'wda.wildix.com';
13
16
  const endpoint = () => {
14
17
  return {
@@ -19,13 +22,15 @@ export class WdaStreamClient extends __Client {
19
22
  };
20
23
  };
21
24
  const config = {
22
- ..._config_2,
25
+ ..._config_3,
23
26
  endpoint,
24
27
  };
25
28
  super(config);
26
29
  this.config = config;
27
30
  this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
28
31
  this.middlewareStack.use(getUserAgentPlugin(this.config));
32
+ this.middlewareStack.use(getRetryPlugin(this.config));
33
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
29
34
  }
30
35
  destroy() {
31
36
  super.destroy();
@@ -0,0 +1,17 @@
1
+ import { de_QueryPresenceCommand, se_QueryPresenceCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class QueryPresenceCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WdaStream", "QueryPresence", {})
12
+ .n("WdaStreamClient", "QueryPresenceCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_QueryPresenceCommand)
15
+ .de(de_QueryPresenceCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_QueryPresencesCommand, se_QueryPresencesCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class QueryPresencesCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WdaStream", "QueryPresences", {})
12
+ .n("WdaStreamClient", "QueryPresencesCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_QueryPresencesCommand)
15
+ .de(de_QueryPresencesCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_UpdatePresenceLastSeenCommand, se_UpdatePresenceLastSeenCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class UpdatePresenceLastSeenCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WdaStream", "UpdatePresenceLastSeen", {})
12
+ .n("WdaStreamClient", "UpdatePresenceLastSeenCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_UpdatePresenceLastSeenCommand)
15
+ .de(de_UpdatePresenceLastSeenCommand)
16
+ .build() {
17
+ }
@@ -2,3 +2,6 @@ export * from "./ConsumeEventCommand";
2
2
  export * from "./DescribeEventCommand";
3
3
  export * from "./GetConferenceIdCommand";
4
4
  export * from "./GetConversationsCommand";
5
+ export * from "./QueryPresenceCommand";
6
+ export * from "./QueryPresencesCommand";
7
+ export * from "./UpdatePresenceLastSeenCommand";
@@ -396,3 +396,29 @@ export class MatchNotFoundException extends __BaseException {
396
396
  Object.setPrototypeOf(this, MatchNotFoundException.prototype);
397
397
  }
398
398
  }
399
+ export const PresenceStatus = {
400
+ AWAY: "AWAY",
401
+ DND: "DND",
402
+ OFFLINE: "OFFLINE",
403
+ ONLINE: "ONLINE",
404
+ ONLY_SIP: "ONLY_SIP",
405
+ };
406
+ export const TelephonyStatus = {
407
+ REGISTERED: "REGISTERED",
408
+ RINGING: "RINGING",
409
+ RT: "RT",
410
+ TALKING: "TALKING",
411
+ UNREGISTERED: "UNREGISTERED",
412
+ };
413
+ export class PresenceNotAvailableException extends __BaseException {
414
+ constructor(opts) {
415
+ super({
416
+ name: "PresenceNotAvailableException",
417
+ $fault: "client",
418
+ ...opts
419
+ });
420
+ this.name = "PresenceNotAvailableException";
421
+ this.$fault = "client";
422
+ Object.setPrototypeOf(this, PresenceNotAvailableException.prototype);
423
+ }
424
+ }
@@ -1,5 +1,5 @@
1
1
  import { WdaStreamServiceException as __BaseException } from "../models/WdaStreamServiceException";
2
- import { ConsumeEventInputEvent, ForbiddenException, MatchNotFoundException, ValidationException, } from "../models/models_0";
2
+ import { ConsumeEventInputEvent, ForbiddenException, MatchNotFoundException, PresenceNotAvailableException, ValidationException, } from "../models/models_0";
3
3
  import { requestBuilder as rb } from "@smithy/core";
4
4
  import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
5
  export const se_ConsumeEventCommand = async (input, context) => {
@@ -64,6 +64,50 @@ export const se_GetConversationsCommand = async (input, context) => {
64
64
  .b(body);
65
65
  return b.build();
66
66
  };
67
+ export const se_QueryPresenceCommand = async (input, context) => {
68
+ const b = rb(input, context);
69
+ const headers = {
70
+ 'content-type': 'application/json',
71
+ };
72
+ b.bp("/v2/stream/presence/query");
73
+ let body;
74
+ body = JSON.stringify(take(input, {
75
+ 'filter': _ => _json(_),
76
+ }));
77
+ b.m("POST")
78
+ .h(headers)
79
+ .b(body);
80
+ return b.build();
81
+ };
82
+ export const se_QueryPresencesCommand = async (input, context) => {
83
+ const b = rb(input, context);
84
+ const headers = {
85
+ 'content-type': 'application/json',
86
+ };
87
+ b.bp("/v2/stream/query_presences");
88
+ let body;
89
+ body = JSON.stringify(take(input, {
90
+ 'filter': _ => _json(_),
91
+ }));
92
+ b.m("POST")
93
+ .h(headers)
94
+ .b(body);
95
+ return b.build();
96
+ };
97
+ export const se_UpdatePresenceLastSeenCommand = async (input, context) => {
98
+ const b = rb(input, context);
99
+ const headers = {};
100
+ b.bp("/v2/stream/presence/update_last_seen");
101
+ const query = map({
102
+ [_u]: [, input[_uI]],
103
+ });
104
+ let body;
105
+ b.m("POST")
106
+ .h(headers)
107
+ .q(query)
108
+ .b(body);
109
+ return b.build();
110
+ };
67
111
  export const de_ConsumeEventCommand = async (output, context) => {
68
112
  if (output.statusCode !== 200 && output.statusCode >= 300) {
69
113
  return de_CommandError(output, context);
@@ -170,6 +214,44 @@ export const de_GetConversationsCommand = async (output, context) => {
170
214
  Object.assign(contents, doc);
171
215
  return contents;
172
216
  };
217
+ export const de_QueryPresenceCommand = async (output, context) => {
218
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
219
+ return de_CommandError(output, context);
220
+ }
221
+ const contents = map({
222
+ $metadata: deserializeMetadata(output),
223
+ });
224
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
225
+ const doc = take(data, {
226
+ 'presence': _json,
227
+ });
228
+ Object.assign(contents, doc);
229
+ return contents;
230
+ };
231
+ export const de_QueryPresencesCommand = async (output, context) => {
232
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
233
+ return de_CommandError(output, context);
234
+ }
235
+ const contents = map({
236
+ $metadata: deserializeMetadata(output),
237
+ });
238
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
239
+ const doc = take(data, {
240
+ 'presences': _json,
241
+ });
242
+ Object.assign(contents, doc);
243
+ return contents;
244
+ };
245
+ export const de_UpdatePresenceLastSeenCommand = async (output, context) => {
246
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
247
+ return de_CommandError(output, context);
248
+ }
249
+ const contents = map({
250
+ $metadata: deserializeMetadata(output),
251
+ });
252
+ await collectBody(output.body, context);
253
+ return contents;
254
+ };
173
255
  const de_CommandError = async (output, context) => {
174
256
  const parsedOutput = {
175
257
  ...output,
@@ -186,6 +268,9 @@ const de_CommandError = async (output, context) => {
186
268
  case "MatchNotFoundException":
187
269
  case "wildix.wda.stream#MatchNotFoundException":
188
270
  throw await de_MatchNotFoundExceptionRes(parsedOutput, context);
271
+ case "PresenceNotAvailableException":
272
+ case "wildix.wda.stream#PresenceNotAvailableException":
273
+ throw await de_PresenceNotAvailableExceptionRes(parsedOutput, context);
189
274
  default:
190
275
  const parsedBody = parsedOutput.body;
191
276
  return throwDefaultError({
@@ -235,6 +320,19 @@ const de_MatchNotFoundExceptionRes = async (parsedOutput, context) => {
235
320
  });
236
321
  return __decorateServiceException(exception, parsedOutput.body);
237
322
  };
323
+ const de_PresenceNotAvailableExceptionRes = async (parsedOutput, context) => {
324
+ const contents = map({});
325
+ const data = parsedOutput.body;
326
+ const doc = take(data, {
327
+ 'message': __expectString,
328
+ });
329
+ Object.assign(contents, doc);
330
+ const exception = new PresenceNotAvailableException({
331
+ $metadata: deserializeMetadata(parsedOutput),
332
+ ...contents
333
+ });
334
+ return __decorateServiceException(exception, parsedOutput.body);
335
+ };
238
336
  const se_ConsumeEventInputEvent = (input, context) => {
239
337
  return ConsumeEventInputEvent.visit(input, {
240
338
  callAgentsCancel: value => ({ "callAgentsCancel": _json(value) }),
@@ -359,6 +457,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
359
457
  value.length != 0) &&
360
458
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
361
459
  const _c = "company";
460
+ const _u = "user";
461
+ const _uI = "userId";
362
462
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
363
463
  if (encoded.length) {
364
464
  return JSON.parse(encoded);
@@ -3,6 +3,9 @@ import { ConsumeEventCommandInput, ConsumeEventCommandOutput } from "./commands/
3
3
  import { DescribeEventCommandInput, DescribeEventCommandOutput } from "./commands/DescribeEventCommand";
4
4
  import { GetConferenceIdCommandInput, GetConferenceIdCommandOutput } from "./commands/GetConferenceIdCommand";
5
5
  import { GetConversationsCommandInput, GetConversationsCommandOutput } from "./commands/GetConversationsCommand";
6
+ import { QueryPresenceCommandInput, QueryPresenceCommandOutput } from "./commands/QueryPresenceCommand";
7
+ import { QueryPresencesCommandInput, QueryPresencesCommandOutput } from "./commands/QueryPresencesCommand";
8
+ import { UpdatePresenceLastSeenCommandInput, UpdatePresenceLastSeenCommandOutput } from "./commands/UpdatePresenceLastSeenCommand";
6
9
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
7
10
  export interface WdaStream {
8
11
  /**
@@ -31,6 +34,25 @@ export interface WdaStream {
31
34
  getConversations(args: GetConversationsCommandInput, options?: __HttpHandlerOptions): Promise<GetConversationsCommandOutput>;
32
35
  getConversations(args: GetConversationsCommandInput, cb: (err: any, data?: GetConversationsCommandOutput) => void): void;
33
36
  getConversations(args: GetConversationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetConversationsCommandOutput) => void): void;
37
+ /**
38
+ * @see {@link QueryPresenceCommand}
39
+ */
40
+ queryPresence(args: QueryPresenceCommandInput, options?: __HttpHandlerOptions): Promise<QueryPresenceCommandOutput>;
41
+ queryPresence(args: QueryPresenceCommandInput, cb: (err: any, data?: QueryPresenceCommandOutput) => void): void;
42
+ queryPresence(args: QueryPresenceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryPresenceCommandOutput) => void): void;
43
+ /**
44
+ * @see {@link QueryPresencesCommand}
45
+ */
46
+ queryPresences(args: QueryPresencesCommandInput, options?: __HttpHandlerOptions): Promise<QueryPresencesCommandOutput>;
47
+ queryPresences(args: QueryPresencesCommandInput, cb: (err: any, data?: QueryPresencesCommandOutput) => void): void;
48
+ queryPresences(args: QueryPresencesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryPresencesCommandOutput) => void): void;
49
+ /**
50
+ * @see {@link UpdatePresenceLastSeenCommand}
51
+ */
52
+ updatePresenceLastSeen(): Promise<UpdatePresenceLastSeenCommandOutput>;
53
+ updatePresenceLastSeen(args: UpdatePresenceLastSeenCommandInput, options?: __HttpHandlerOptions): Promise<UpdatePresenceLastSeenCommandOutput>;
54
+ updatePresenceLastSeen(args: UpdatePresenceLastSeenCommandInput, cb: (err: any, data?: UpdatePresenceLastSeenCommandOutput) => void): void;
55
+ updatePresenceLastSeen(args: UpdatePresenceLastSeenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdatePresenceLastSeenCommandOutput) => void): void;
34
56
  }
35
57
  /**
36
58
  * @public
@@ -2,8 +2,12 @@ import { ConsumeEventCommandInput, ConsumeEventCommandOutput } from "./commands/
2
2
  import { DescribeEventCommandInput, DescribeEventCommandOutput } from "./commands/DescribeEventCommand";
3
3
  import { GetConferenceIdCommandInput, GetConferenceIdCommandOutput } from "./commands/GetConferenceIdCommand";
4
4
  import { GetConversationsCommandInput, GetConversationsCommandOutput } from "./commands/GetConversationsCommand";
5
+ import { QueryPresenceCommandInput, QueryPresenceCommandOutput } from "./commands/QueryPresenceCommand";
6
+ import { QueryPresencesCommandInput, QueryPresencesCommandOutput } from "./commands/QueryPresencesCommand";
7
+ import { UpdatePresenceLastSeenCommandInput, UpdatePresenceLastSeenCommandOutput } from "./commands/UpdatePresenceLastSeenCommand";
5
8
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
6
9
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
10
+ import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
7
11
  import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
8
12
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
9
13
  import { Provider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
@@ -12,11 +16,11 @@ export { __Client };
12
16
  /**
13
17
  * @public
14
18
  */
15
- export type ServiceInputTypes = ConsumeEventCommandInput | DescribeEventCommandInput | GetConferenceIdCommandInput | GetConversationsCommandInput;
19
+ export type ServiceInputTypes = ConsumeEventCommandInput | DescribeEventCommandInput | GetConferenceIdCommandInput | GetConversationsCommandInput | QueryPresenceCommandInput | QueryPresencesCommandInput | UpdatePresenceLastSeenCommandInput;
16
20
  /**
17
21
  * @public
18
22
  */
19
- export type ServiceOutputTypes = ConsumeEventCommandOutput | DescribeEventCommandOutput | GetConferenceIdCommandOutput | GetConversationsCommandOutput;
23
+ export type ServiceOutputTypes = ConsumeEventCommandOutput | DescribeEventCommandOutput | GetConferenceIdCommandOutput | GetConversationsCommandOutput | QueryPresenceCommandOutput | QueryPresencesCommandOutput | UpdatePresenceLastSeenCommandOutput;
20
24
  /**
21
25
  * @public
22
26
  */
@@ -107,7 +111,7 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
107
111
  /**
108
112
  * @public
109
113
  */
110
- export type WdaStreamClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig;
114
+ export type WdaStreamClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig;
111
115
  /**
112
116
  * @public
113
117
  *
@@ -120,7 +124,7 @@ export interface WdaStreamClientConfig extends WdaStreamClientConfigType {
120
124
  /**
121
125
  * @public
122
126
  */
123
- export type WdaStreamClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig;
127
+ export type WdaStreamClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig;
124
128
  /**
125
129
  * @public
126
130
  *
@@ -0,0 +1,82 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, WdaStreamClientResolvedConfig } from "../WdaStreamClient";
2
+ import { QueryPresenceInput, QueryPresenceOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link QueryPresenceCommand}.
14
+ */
15
+ export interface QueryPresenceCommandInput extends QueryPresenceInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link QueryPresenceCommand}.
21
+ */
22
+ export interface QueryPresenceCommandOutput extends QueryPresenceOutput, __MetadataBearer {
23
+ }
24
+ declare const QueryPresenceCommand_base: {
25
+ new (input: QueryPresenceCommandInput): import("@smithy/smithy-client").CommandImpl<QueryPresenceCommandInput, QueryPresenceCommandOutput, WdaStreamClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: QueryPresenceCommandInput): import("@smithy/smithy-client").CommandImpl<QueryPresenceCommandInput, QueryPresenceCommandOutput, WdaStreamClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Retrieves the presence of a single user using specified query. If no presence information found for the query a PresenceNotAvailableException will be thrown.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { WdaStreamClient, QueryPresenceCommand } from "@wildix/wda-stream-client"; // ES Modules import
35
+ * // const { WdaStreamClient, QueryPresenceCommand } = require("@wildix/wda-stream-client"); // CommonJS import
36
+ * const client = new WdaStreamClient(config);
37
+ * const input = { // QueryPresenceInput
38
+ * filter: { // PresenceQueryFilter
39
+ * id: "STRING_VALUE",
40
+ * company: "STRING_VALUE",
41
+ * extension: "STRING_VALUE",
42
+ * },
43
+ * };
44
+ * const command = new QueryPresenceCommand(input);
45
+ * const response = await client.send(command);
46
+ * // { // QueryPresenceOutput
47
+ * // presence: { // Presence
48
+ * // company: "STRING_VALUE",
49
+ * // address: "STRING_VALUE",
50
+ * // extension: "STRING_VALUE",
51
+ * // id: "STRING_VALUE",
52
+ * // lng: "STRING_VALUE",
53
+ * // lat: "STRING_VALUE",
54
+ * // until: "STRING_VALUE",
55
+ * // status: "ONLINE" || "OFFLINE" || "DND" || "AWAY" || "ONLY_SIP",
56
+ * // message: "STRING_VALUE",
57
+ * // telephony: "REGISTERED" || "UNREGISTERED" || "RINGING" || "TALKING" || "RT",
58
+ * // seen: "STRING_VALUE",
59
+ * // },
60
+ * // };
61
+ *
62
+ * ```
63
+ *
64
+ * @param QueryPresenceCommandInput - {@link QueryPresenceCommandInput}
65
+ * @returns {@link QueryPresenceCommandOutput}
66
+ * @see {@link QueryPresenceCommandInput} for command's `input` shape.
67
+ * @see {@link QueryPresenceCommandOutput} for command's `response` shape.
68
+ * @see {@link WdaStreamClientResolvedConfig | config} for WdaStreamClient's `config` shape.
69
+ *
70
+ * @throws {@link ForbiddenException} (client fault)
71
+ *
72
+ * @throws {@link PresenceNotAvailableException} (client fault)
73
+ *
74
+ * @throws {@link ValidationException} (client fault)
75
+ *
76
+ * @throws {@link WdaStreamServiceException}
77
+ * <p>Base exception class for all service exceptions from WdaStream service.</p>
78
+ *
79
+ * @public
80
+ */
81
+ export declare class QueryPresenceCommand extends QueryPresenceCommand_base {
82
+ }
@@ -0,0 +1,84 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, WdaStreamClientResolvedConfig } from "../WdaStreamClient";
2
+ import { QueryPresencesInput, QueryPresencesOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link QueryPresencesCommand}.
14
+ */
15
+ export interface QueryPresencesCommandInput extends QueryPresencesInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link QueryPresencesCommand}.
21
+ */
22
+ export interface QueryPresencesCommandOutput extends QueryPresencesOutput, __MetadataBearer {
23
+ }
24
+ declare const QueryPresencesCommand_base: {
25
+ new (input: QueryPresencesCommandInput): import("@smithy/smithy-client").CommandImpl<QueryPresencesCommandInput, QueryPresencesCommandOutput, WdaStreamClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: QueryPresencesCommandInput): import("@smithy/smithy-client").CommandImpl<QueryPresencesCommandInput, QueryPresencesCommandOutput, WdaStreamClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Retrieves users presences
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { WdaStreamClient, QueryPresencesCommand } from "@wildix/wda-stream-client"; // ES Modules import
35
+ * // const { WdaStreamClient, QueryPresencesCommand } = require("@wildix/wda-stream-client"); // CommonJS import
36
+ * const client = new WdaStreamClient(config);
37
+ * const input = { // QueryPresencesInput
38
+ * filter: [ // PresenceQueryFilterList // required
39
+ * { // PresenceQueryFilter
40
+ * id: "STRING_VALUE",
41
+ * company: "STRING_VALUE",
42
+ * extension: "STRING_VALUE",
43
+ * },
44
+ * ],
45
+ * };
46
+ * const command = new QueryPresencesCommand(input);
47
+ * const response = await client.send(command);
48
+ * // { // QueryPresencesOutput
49
+ * // presences: [ // PresenceList // required
50
+ * // { // Presence
51
+ * // company: "STRING_VALUE",
52
+ * // address: "STRING_VALUE",
53
+ * // extension: "STRING_VALUE",
54
+ * // id: "STRING_VALUE",
55
+ * // lng: "STRING_VALUE",
56
+ * // lat: "STRING_VALUE",
57
+ * // until: "STRING_VALUE",
58
+ * // status: "ONLINE" || "OFFLINE" || "DND" || "AWAY" || "ONLY_SIP",
59
+ * // message: "STRING_VALUE",
60
+ * // telephony: "REGISTERED" || "UNREGISTERED" || "RINGING" || "TALKING" || "RT",
61
+ * // seen: "STRING_VALUE",
62
+ * // },
63
+ * // ],
64
+ * // };
65
+ *
66
+ * ```
67
+ *
68
+ * @param QueryPresencesCommandInput - {@link QueryPresencesCommandInput}
69
+ * @returns {@link QueryPresencesCommandOutput}
70
+ * @see {@link QueryPresencesCommandInput} for command's `input` shape.
71
+ * @see {@link QueryPresencesCommandOutput} for command's `response` shape.
72
+ * @see {@link WdaStreamClientResolvedConfig | config} for WdaStreamClient's `config` shape.
73
+ *
74
+ * @throws {@link ForbiddenException} (client fault)
75
+ *
76
+ * @throws {@link ValidationException} (client fault)
77
+ *
78
+ * @throws {@link WdaStreamServiceException}
79
+ * <p>Base exception class for all service exceptions from WdaStream service.</p>
80
+ *
81
+ * @public
82
+ */
83
+ export declare class QueryPresencesCommand extends QueryPresencesCommand_base {
84
+ }
@@ -0,0 +1,62 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, WdaStreamClientResolvedConfig } from "../WdaStreamClient";
2
+ import { UpdatePresenceLastSeenInput, UpdatePresenceLastSeenOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link UpdatePresenceLastSeenCommand}.
14
+ */
15
+ export interface UpdatePresenceLastSeenCommandInput extends UpdatePresenceLastSeenInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link UpdatePresenceLastSeenCommand}.
21
+ */
22
+ export interface UpdatePresenceLastSeenCommandOutput extends UpdatePresenceLastSeenOutput, __MetadataBearer {
23
+ }
24
+ declare const UpdatePresenceLastSeenCommand_base: {
25
+ new (input: UpdatePresenceLastSeenCommandInput): import("@smithy/smithy-client").CommandImpl<UpdatePresenceLastSeenCommandInput, UpdatePresenceLastSeenCommandOutput, WdaStreamClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [UpdatePresenceLastSeenCommandInput]): import("@smithy/smithy-client").CommandImpl<UpdatePresenceLastSeenCommandInput, UpdatePresenceLastSeenCommandOutput, WdaStreamClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Updates the user's last seen presence information.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { WdaStreamClient, UpdatePresenceLastSeenCommand } from "@wildix/wda-stream-client"; // ES Modules import
35
+ * // const { WdaStreamClient, UpdatePresenceLastSeenCommand } = require("@wildix/wda-stream-client"); // CommonJS import
36
+ * const client = new WdaStreamClient(config);
37
+ * const input = { // UpdatePresenceLastSeenInput
38
+ * userId: "STRING_VALUE",
39
+ * };
40
+ * const command = new UpdatePresenceLastSeenCommand(input);
41
+ * const response = await client.send(command);
42
+ * // {};
43
+ *
44
+ * ```
45
+ *
46
+ * @param UpdatePresenceLastSeenCommandInput - {@link UpdatePresenceLastSeenCommandInput}
47
+ * @returns {@link UpdatePresenceLastSeenCommandOutput}
48
+ * @see {@link UpdatePresenceLastSeenCommandInput} for command's `input` shape.
49
+ * @see {@link UpdatePresenceLastSeenCommandOutput} for command's `response` shape.
50
+ * @see {@link WdaStreamClientResolvedConfig | config} for WdaStreamClient's `config` shape.
51
+ *
52
+ * @throws {@link ForbiddenException} (client fault)
53
+ *
54
+ * @throws {@link ValidationException} (client fault)
55
+ *
56
+ * @throws {@link WdaStreamServiceException}
57
+ * <p>Base exception class for all service exceptions from WdaStream service.</p>
58
+ *
59
+ * @public
60
+ */
61
+ export declare class UpdatePresenceLastSeenCommand extends UpdatePresenceLastSeenCommand_base {
62
+ }
@@ -2,3 +2,6 @@ export * from "./ConsumeEventCommand";
2
2
  export * from "./DescribeEventCommand";
3
3
  export * from "./GetConferenceIdCommand";
4
4
  export * from "./GetConversationsCommand";
5
+ export * from "./QueryPresenceCommand";
6
+ export * from "./QueryPresencesCommand";
7
+ export * from "./UpdatePresenceLastSeenCommand";
@@ -3437,3 +3437,179 @@ export interface GetConversationsOutput {
3437
3437
  conferences: (ConferenceAnalyticsLiveProgressEvent)[];
3438
3438
  chats: (ChatAnalyticsLiveProgressEvent)[];
3439
3439
  }
3440
+ /**
3441
+ * @public
3442
+ * @enum
3443
+ */
3444
+ export declare const PresenceStatus: {
3445
+ readonly AWAY: "AWAY";
3446
+ readonly DND: "DND";
3447
+ readonly OFFLINE: "OFFLINE";
3448
+ readonly ONLINE: "ONLINE";
3449
+ readonly ONLY_SIP: "ONLY_SIP";
3450
+ };
3451
+ /**
3452
+ * @public
3453
+ */
3454
+ export type PresenceStatus = typeof PresenceStatus[keyof typeof PresenceStatus];
3455
+ /**
3456
+ * @public
3457
+ * @enum
3458
+ */
3459
+ export declare const TelephonyStatus: {
3460
+ readonly REGISTERED: "REGISTERED";
3461
+ readonly RINGING: "RINGING";
3462
+ readonly RT: "RT";
3463
+ readonly TALKING: "TALKING";
3464
+ readonly UNREGISTERED: "UNREGISTERED";
3465
+ };
3466
+ /**
3467
+ * @public
3468
+ */
3469
+ export type TelephonyStatus = typeof TelephonyStatus[keyof typeof TelephonyStatus];
3470
+ /**
3471
+ * @public
3472
+ */
3473
+ export interface Presence {
3474
+ /**
3475
+ * The unique identifier of the organization user belongs to (example: it_w119845).
3476
+ * @public
3477
+ */
3478
+ company?: string;
3479
+ /**
3480
+ * The user's geographic address (example: 1 Kynner Way, Binley, Coventry, CV3 2TU, England).
3481
+ * @public
3482
+ */
3483
+ address?: string;
3484
+ /**
3485
+ * The user extension (example: 2001)
3486
+ * @public
3487
+ */
3488
+ extension?: string;
3489
+ /**
3490
+ * The unique identifier of the user (example: F2P9tcKrYI9p).
3491
+ * @public
3492
+ */
3493
+ id?: string;
3494
+ /**
3495
+ * Longitude is the unit that represent the coordinates at geographic coordinate system (example: 35.5753).
3496
+ * @public
3497
+ */
3498
+ lng?: string;
3499
+ /**
3500
+ * Latitude is the unit that represent the coordinates at geographic coordinate system(example: 23.2954).
3501
+ * @public
3502
+ */
3503
+ lat?: string;
3504
+ /**
3505
+ * If it is defined, user status switches back to Available after the time (example: 2024-08-08T17:16:00Z).
3506
+ * @public
3507
+ */
3508
+ until?: string;
3509
+ /**
3510
+ * User status (example: AWAY)
3511
+ * @public
3512
+ */
3513
+ status?: PresenceStatus;
3514
+ /**
3515
+ * User status custom message (example: on vacation).
3516
+ * @public
3517
+ */
3518
+ message?: string;
3519
+ /**
3520
+ * User telephony status (example: TALKING)
3521
+ * @public
3522
+ */
3523
+ telephony?: TelephonyStatus;
3524
+ /**
3525
+ * The flag indicates that the user has just been seen (example: true).
3526
+ * @public
3527
+ */
3528
+ seen?: string;
3529
+ }
3530
+ /**
3531
+ * @public
3532
+ */
3533
+ export declare class PresenceNotAvailableException extends __BaseException {
3534
+ readonly name: "PresenceNotAvailableException";
3535
+ readonly $fault: "client";
3536
+ /**
3537
+ * @internal
3538
+ */
3539
+ constructor(opts: __ExceptionOptionType<PresenceNotAvailableException, __BaseException>);
3540
+ }
3541
+ /**
3542
+ * @public
3543
+ */
3544
+ export interface PresenceQueryFilter {
3545
+ /**
3546
+ * The unique identifier of the user (example: F2P9tcKrYI9p).
3547
+ * @public
3548
+ */
3549
+ id?: string;
3550
+ /**
3551
+ * The unique identifier of the organization user belongs to (example: it_w119845).
3552
+ * @public
3553
+ */
3554
+ company?: string;
3555
+ /**
3556
+ * The user extension (example: 2001
3557
+ * @public
3558
+ */
3559
+ extension?: string;
3560
+ }
3561
+ /**
3562
+ * @public
3563
+ */
3564
+ export interface QueryPresenceInput {
3565
+ /**
3566
+ * The filter, to match a presence of certain user
3567
+ * @public
3568
+ */
3569
+ filter: PresenceQueryFilter;
3570
+ }
3571
+ /**
3572
+ * @public
3573
+ */
3574
+ export interface QueryPresenceOutput {
3575
+ /**
3576
+ * The presence matched specified query.
3577
+ * @public
3578
+ */
3579
+ presence: Presence;
3580
+ }
3581
+ /**
3582
+ * @public
3583
+ */
3584
+ export interface QueryPresencesInput {
3585
+ /**
3586
+ * The maximum filter items
3587
+ * @public
3588
+ */
3589
+ filter: (PresenceQueryFilter)[];
3590
+ }
3591
+ /**
3592
+ * @public
3593
+ */
3594
+ export interface QueryPresencesOutput {
3595
+ /**
3596
+ * A list of presences matched the filter. If filter does not match any presence the presence would not be added to the list.
3597
+ * @public
3598
+ */
3599
+ presences: (Presence)[];
3600
+ }
3601
+ /**
3602
+ * @public
3603
+ */
3604
+ export interface UpdatePresenceLastSeenInput {
3605
+ /**
3606
+ * The unique identifier of the user when a service token is used.
3607
+ * @public
3608
+ */
3609
+ userId?: string;
3610
+ }
3611
+ /**
3612
+ * @public
3613
+ */
3614
+ export interface UpdatePresenceLastSeenOutput {
3615
+ }
@@ -2,6 +2,9 @@ import { ConsumeEventCommandInput, ConsumeEventCommandOutput } from "../commands
2
2
  import { DescribeEventCommandInput, DescribeEventCommandOutput } from "../commands/DescribeEventCommand";
3
3
  import { GetConferenceIdCommandInput, GetConferenceIdCommandOutput } from "../commands/GetConferenceIdCommand";
4
4
  import { GetConversationsCommandInput, GetConversationsCommandOutput } from "../commands/GetConversationsCommand";
5
+ import { QueryPresenceCommandInput, QueryPresenceCommandOutput } from "../commands/QueryPresenceCommand";
6
+ import { QueryPresencesCommandInput, QueryPresencesCommandOutput } from "../commands/QueryPresencesCommand";
7
+ import { UpdatePresenceLastSeenCommandInput, UpdatePresenceLastSeenCommandOutput } from "../commands/UpdatePresenceLastSeenCommand";
5
8
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
6
9
  import { SerdeContext as __SerdeContext } from "@smithy/types";
7
10
  /**
@@ -20,6 +23,18 @@ export declare const se_GetConferenceIdCommand: (input: GetConferenceIdCommandIn
20
23
  * serializeAws_restJson1GetConversationsCommand
21
24
  */
22
25
  export declare const se_GetConversationsCommand: (input: GetConversationsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
26
+ /**
27
+ * serializeAws_restJson1QueryPresenceCommand
28
+ */
29
+ export declare const se_QueryPresenceCommand: (input: QueryPresenceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
30
+ /**
31
+ * serializeAws_restJson1QueryPresencesCommand
32
+ */
33
+ export declare const se_QueryPresencesCommand: (input: QueryPresencesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
34
+ /**
35
+ * serializeAws_restJson1UpdatePresenceLastSeenCommand
36
+ */
37
+ export declare const se_UpdatePresenceLastSeenCommand: (input: UpdatePresenceLastSeenCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
23
38
  /**
24
39
  * deserializeAws_restJson1ConsumeEventCommand
25
40
  */
@@ -36,3 +51,15 @@ export declare const de_GetConferenceIdCommand: (output: __HttpResponse, context
36
51
  * deserializeAws_restJson1GetConversationsCommand
37
52
  */
38
53
  export declare const de_GetConversationsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetConversationsCommandOutput>;
54
+ /**
55
+ * deserializeAws_restJson1QueryPresenceCommand
56
+ */
57
+ export declare const de_QueryPresenceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<QueryPresenceCommandOutput>;
58
+ /**
59
+ * deserializeAws_restJson1QueryPresencesCommand
60
+ */
61
+ export declare const de_QueryPresencesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<QueryPresencesCommandOutput>;
62
+ /**
63
+ * deserializeAws_restJson1UpdatePresenceLastSeenCommand
64
+ */
65
+ export declare const de_UpdatePresenceLastSeenCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdatePresenceLastSeenCommandOutput>;
@@ -25,4 +25,5 @@ export declare const getRuntimeConfig: (config: WdaStreamClientConfig) => {
25
25
  logger: import("@smithy/types").Logger;
26
26
  extensions: import("./runtimeExtensions").RuntimeExtension[];
27
27
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
28
+ retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
28
29
  };
@@ -25,4 +25,5 @@ export declare const getRuntimeConfig: (config: WdaStreamClientConfig) => {
25
25
  logger: import("@smithy/types").Logger;
26
26
  extensions: import("./runtimeExtensions").RuntimeExtension[];
27
27
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
28
+ retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
28
29
  };
@@ -24,4 +24,5 @@ export declare const getRuntimeConfig: (config: WdaStreamClientConfig) => {
24
24
  extensions: import("./runtimeExtensions").RuntimeExtension[];
25
25
  defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
26
26
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
27
+ retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
27
28
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wda-stream-client",
3
3
  "description": "@wildix/wda-stream-client client",
4
- "version": "1.0.30",
4
+ "version": "1.0.32",
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",