@wildix/xbees-conversations-client 1.0.23 → 1.0.25
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.
- package/dist-cjs/Conversations.js +2 -0
- package/dist-cjs/commands/ScheduleExternalFlagAdjustmentJobCommand.js +41 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +14 -1
- package/dist-cjs/protocols/Aws_restJson1.js +77 -3
- package/dist-es/Conversations.js +2 -0
- package/dist-es/commands/ScheduleExternalFlagAdjustmentJobCommand.js +37 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +12 -0
- package/dist-es/protocols/Aws_restJson1.js +75 -3
- package/dist-types/Conversations.d.ts +7 -0
- package/dist-types/ConversationsClient.d.ts +3 -2
- package/dist-types/commands/ScheduleExternalFlagAdjustmentJobCommand.d.ts +75 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +26 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ const GetChannelMemberCommand_1 = require("./commands/GetChannelMemberCommand");
|
|
|
10
10
|
const GetMessageCommand_1 = require("./commands/GetMessageCommand");
|
|
11
11
|
const JoinChannelCommand_1 = require("./commands/JoinChannelCommand");
|
|
12
12
|
const PartialUpdateChannelCommand_1 = require("./commands/PartialUpdateChannelCommand");
|
|
13
|
+
const ScheduleExternalFlagAdjustmentJobCommand_1 = require("./commands/ScheduleExternalFlagAdjustmentJobCommand");
|
|
13
14
|
const UpdateChannelCommand_1 = require("./commands/UpdateChannelCommand");
|
|
14
15
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
15
16
|
const commands = {
|
|
@@ -21,6 +22,7 @@ const commands = {
|
|
|
21
22
|
GetMessageCommand: GetMessageCommand_1.GetMessageCommand,
|
|
22
23
|
JoinChannelCommand: JoinChannelCommand_1.JoinChannelCommand,
|
|
23
24
|
PartialUpdateChannelCommand: PartialUpdateChannelCommand_1.PartialUpdateChannelCommand,
|
|
25
|
+
ScheduleExternalFlagAdjustmentJobCommand: ScheduleExternalFlagAdjustmentJobCommand_1.ScheduleExternalFlagAdjustmentJobCommand,
|
|
24
26
|
UpdateChannelCommand: UpdateChannelCommand_1.UpdateChannelCommand,
|
|
25
27
|
};
|
|
26
28
|
class Conversations extends ConversationsClient_1.ConversationsClient {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScheduleExternalFlagAdjustmentJobCommand = 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
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class ScheduleExternalFlagAdjustmentJobCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "ConversationsClient";
|
|
19
|
+
const commandName = "ScheduleExternalFlagAdjustmentJobCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "Conversations",
|
|
28
|
+
operation: "ScheduleExternalFlagAdjustmentJob",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_ScheduleExternalFlagAdjustmentJobCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_ScheduleExternalFlagAdjustmentJobCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.ScheduleExternalFlagAdjustmentJobCommand = ScheduleExternalFlagAdjustmentJobCommand;
|
|
@@ -9,4 +9,5 @@ tslib_1.__exportStar(require("./GetChannelMemberCommand"), exports);
|
|
|
9
9
|
tslib_1.__exportStar(require("./GetMessageCommand"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./JoinChannelCommand"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./PartialUpdateChannelCommand"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./ScheduleExternalFlagAdjustmentJobCommand"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./UpdateChannelCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MemberNotFoundException = exports.MessageType = exports.MessageSmsStatus = exports.ChannelUnsetFields = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.ChannelType = exports.ValidationException = exports.ForbiddenException = void 0;
|
|
3
|
+
exports.ConversationsServiceException = exports.MemberNotFoundException = exports.MessageType = exports.MessageSmsStatus = exports.ChannelUnsetFields = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.ChannelType = exports.ValidationException = exports.ForbiddenException = void 0;
|
|
4
4
|
const ConversationsServiceException_1 = require("./ConversationsServiceException");
|
|
5
5
|
class ForbiddenException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -107,3 +107,16 @@ class MemberNotFoundException extends ConversationsServiceException_1.Conversati
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
exports.MemberNotFoundException = MemberNotFoundException;
|
|
110
|
+
class ConversationsServiceException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
111
|
+
constructor(opts) {
|
|
112
|
+
super({
|
|
113
|
+
name: "ConversationsServiceException",
|
|
114
|
+
$fault: "server",
|
|
115
|
+
...opts
|
|
116
|
+
});
|
|
117
|
+
this.name = "ConversationsServiceException";
|
|
118
|
+
this.$fault = "server";
|
|
119
|
+
Object.setPrototypeOf(this, ConversationsServiceException.prototype);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.ConversationsServiceException = ConversationsServiceException;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateChannelCommand = exports.de_PartialUpdateChannelCommand = exports.de_JoinChannelCommand = exports.de_GetMessageCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DeleteChannelCommand = exports.de_CreateMessageCommand = exports.de_CreateChannelCommand = exports.se_UpdateChannelCommand = exports.se_PartialUpdateChannelCommand = exports.se_JoinChannelCommand = exports.se_GetMessageCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_DeleteChannelCommand = exports.se_CreateMessageCommand = exports.se_CreateChannelCommand = void 0;
|
|
3
|
+
exports.de_UpdateChannelCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_PartialUpdateChannelCommand = exports.de_JoinChannelCommand = exports.de_GetMessageCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DeleteChannelCommand = exports.de_CreateMessageCommand = exports.de_CreateChannelCommand = exports.se_UpdateChannelCommand = exports.se_ScheduleExternalFlagAdjustmentJobCommand = exports.se_PartialUpdateChannelCommand = exports.se_JoinChannelCommand = exports.se_GetMessageCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_DeleteChannelCommand = exports.se_CreateMessageCommand = exports.se_CreateChannelCommand = void 0;
|
|
4
4
|
const ConversationsServiceException_1 = require("../models/ConversationsServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
6
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
@@ -161,6 +161,27 @@ const se_PartialUpdateChannelCommand = async (input, context) => {
|
|
|
161
161
|
});
|
|
162
162
|
};
|
|
163
163
|
exports.se_PartialUpdateChannelCommand = se_PartialUpdateChannelCommand;
|
|
164
|
+
const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
|
|
165
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
166
|
+
const headers = {
|
|
167
|
+
'content-type': 'application/json',
|
|
168
|
+
};
|
|
169
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/schedule_external_flag_adjustment_job";
|
|
170
|
+
let body;
|
|
171
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
172
|
+
'userId': [],
|
|
173
|
+
}));
|
|
174
|
+
return new protocol_http_1.HttpRequest({
|
|
175
|
+
protocol,
|
|
176
|
+
hostname,
|
|
177
|
+
port,
|
|
178
|
+
method: "POST",
|
|
179
|
+
headers,
|
|
180
|
+
path: resolvedPath,
|
|
181
|
+
body,
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
exports.se_ScheduleExternalFlagAdjustmentJobCommand = se_ScheduleExternalFlagAdjustmentJobCommand;
|
|
164
185
|
const se_UpdateChannelCommand = async (input, context) => {
|
|
165
186
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
166
187
|
const headers = {
|
|
@@ -481,6 +502,42 @@ const de_PartialUpdateChannelCommandError = async (output, context) => {
|
|
|
481
502
|
});
|
|
482
503
|
}
|
|
483
504
|
};
|
|
505
|
+
const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
|
|
506
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
507
|
+
return de_ScheduleExternalFlagAdjustmentJobCommandError(output, context);
|
|
508
|
+
}
|
|
509
|
+
const contents = (0, smithy_client_1.map)({
|
|
510
|
+
$metadata: deserializeMetadata(output),
|
|
511
|
+
});
|
|
512
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
513
|
+
return contents;
|
|
514
|
+
};
|
|
515
|
+
exports.de_ScheduleExternalFlagAdjustmentJobCommand = de_ScheduleExternalFlagAdjustmentJobCommand;
|
|
516
|
+
const de_ScheduleExternalFlagAdjustmentJobCommandError = async (output, context) => {
|
|
517
|
+
const parsedOutput = {
|
|
518
|
+
...output,
|
|
519
|
+
body: await parseErrorBody(output.body, context)
|
|
520
|
+
};
|
|
521
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
522
|
+
switch (errorCode) {
|
|
523
|
+
case "ConversationsServiceException":
|
|
524
|
+
case "wildix.xbees.conversations#ConversationsServiceException":
|
|
525
|
+
throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
|
|
526
|
+
case "ForbiddenException":
|
|
527
|
+
case "smithy.framework#ForbiddenException":
|
|
528
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
529
|
+
case "ValidationException":
|
|
530
|
+
case "smithy.framework#ValidationException":
|
|
531
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
532
|
+
default:
|
|
533
|
+
const parsedBody = parsedOutput.body;
|
|
534
|
+
return throwDefaultError({
|
|
535
|
+
output,
|
|
536
|
+
parsedBody,
|
|
537
|
+
errorCode
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
};
|
|
484
541
|
const de_UpdateChannelCommand = async (output, context) => {
|
|
485
542
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
486
543
|
return de_UpdateChannelCommandError(output, context);
|
|
@@ -548,7 +605,9 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
548
605
|
const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
549
606
|
const contents = (0, smithy_client_1.map)({});
|
|
550
607
|
const data = parsedOutput.body;
|
|
551
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
608
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
609
|
+
'message': smithy_client_1.expectString,
|
|
610
|
+
});
|
|
552
611
|
Object.assign(contents, doc);
|
|
553
612
|
const exception = new models_0_1.ChannelNotFoundException({
|
|
554
613
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -556,10 +615,25 @@ const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
556
615
|
});
|
|
557
616
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
558
617
|
};
|
|
618
|
+
const de_ConversationsServiceExceptionRes = async (parsedOutput, context) => {
|
|
619
|
+
const contents = (0, smithy_client_1.map)({});
|
|
620
|
+
const data = parsedOutput.body;
|
|
621
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
622
|
+
'message': smithy_client_1.expectString,
|
|
623
|
+
});
|
|
624
|
+
Object.assign(contents, doc);
|
|
625
|
+
const exception = new models_0_1.ConversationsServiceException({
|
|
626
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
627
|
+
...contents
|
|
628
|
+
});
|
|
629
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
630
|
+
};
|
|
559
631
|
const de_MemberNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
560
632
|
const contents = (0, smithy_client_1.map)({});
|
|
561
633
|
const data = parsedOutput.body;
|
|
562
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
634
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
635
|
+
'message': smithy_client_1.expectString,
|
|
636
|
+
});
|
|
563
637
|
Object.assign(contents, doc);
|
|
564
638
|
const exception = new models_0_1.MemberNotFoundException({
|
|
565
639
|
$metadata: deserializeMetadata(parsedOutput),
|
package/dist-es/Conversations.js
CHANGED
|
@@ -7,6 +7,7 @@ import { GetChannelMemberCommand, } from "./commands/GetChannelMemberCommand";
|
|
|
7
7
|
import { GetMessageCommand, } from "./commands/GetMessageCommand";
|
|
8
8
|
import { JoinChannelCommand, } from "./commands/JoinChannelCommand";
|
|
9
9
|
import { PartialUpdateChannelCommand, } from "./commands/PartialUpdateChannelCommand";
|
|
10
|
+
import { ScheduleExternalFlagAdjustmentJobCommand, } from "./commands/ScheduleExternalFlagAdjustmentJobCommand";
|
|
10
11
|
import { UpdateChannelCommand, } from "./commands/UpdateChannelCommand";
|
|
11
12
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
12
13
|
const commands = {
|
|
@@ -18,6 +19,7 @@ const commands = {
|
|
|
18
19
|
GetMessageCommand,
|
|
19
20
|
JoinChannelCommand,
|
|
20
21
|
PartialUpdateChannelCommand,
|
|
22
|
+
ScheduleExternalFlagAdjustmentJobCommand,
|
|
21
23
|
UpdateChannelCommand,
|
|
22
24
|
};
|
|
23
25
|
export class Conversations extends ConversationsClient {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { de_ScheduleExternalFlagAdjustmentJobCommand, se_ScheduleExternalFlagAdjustmentJobCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ScheduleExternalFlagAdjustmentJobCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
12
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
13
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
14
|
+
const { logger } = configuration;
|
|
15
|
+
const clientName = "ConversationsClient";
|
|
16
|
+
const commandName = "ScheduleExternalFlagAdjustmentJobCommand";
|
|
17
|
+
const handlerExecutionContext = {
|
|
18
|
+
logger,
|
|
19
|
+
clientName,
|
|
20
|
+
commandName,
|
|
21
|
+
inputFilterSensitiveLog: (_) => _,
|
|
22
|
+
outputFilterSensitiveLog: (_) => _,
|
|
23
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
24
|
+
service: "Conversations",
|
|
25
|
+
operation: "ScheduleExternalFlagAdjustmentJob",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return se_ScheduleExternalFlagAdjustmentJobCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return de_ScheduleExternalFlagAdjustmentJobCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -6,4 +6,5 @@ export * from "./GetChannelMemberCommand";
|
|
|
6
6
|
export * from "./GetMessageCommand";
|
|
7
7
|
export * from "./JoinChannelCommand";
|
|
8
8
|
export * from "./PartialUpdateChannelCommand";
|
|
9
|
+
export * from "./ScheduleExternalFlagAdjustmentJobCommand";
|
|
9
10
|
export * from "./UpdateChannelCommand";
|
|
@@ -100,3 +100,15 @@ export class MemberNotFoundException extends __BaseException {
|
|
|
100
100
|
Object.setPrototypeOf(this, MemberNotFoundException.prototype);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
+
export class ConversationsServiceException extends __BaseException {
|
|
104
|
+
constructor(opts) {
|
|
105
|
+
super({
|
|
106
|
+
name: "ConversationsServiceException",
|
|
107
|
+
$fault: "server",
|
|
108
|
+
...opts
|
|
109
|
+
});
|
|
110
|
+
this.name = "ConversationsServiceException";
|
|
111
|
+
this.$fault = "server";
|
|
112
|
+
Object.setPrototypeOf(this, ConversationsServiceException.prototype);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConversationsServiceException as __BaseException } from "../models/ConversationsServiceException";
|
|
2
|
-
import { ChannelNotFoundException, ForbiddenException, MemberNotFoundException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { ChannelNotFoundException, ConversationsServiceException, ForbiddenException, MemberNotFoundException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { HttpRequest as __HttpRequest, } from "@smithy/protocol-http";
|
|
4
4
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, resolvedPath as __resolvedPath, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_CreateChannelCommand = async (input, context) => {
|
|
@@ -150,6 +150,26 @@ export const se_PartialUpdateChannelCommand = async (input, context) => {
|
|
|
150
150
|
body,
|
|
151
151
|
});
|
|
152
152
|
};
|
|
153
|
+
export const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
|
|
154
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
155
|
+
const headers = {
|
|
156
|
+
'content-type': 'application/json',
|
|
157
|
+
};
|
|
158
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/schedule_external_flag_adjustment_job";
|
|
159
|
+
let body;
|
|
160
|
+
body = JSON.stringify(take(input, {
|
|
161
|
+
'userId': [],
|
|
162
|
+
}));
|
|
163
|
+
return new __HttpRequest({
|
|
164
|
+
protocol,
|
|
165
|
+
hostname,
|
|
166
|
+
port,
|
|
167
|
+
method: "POST",
|
|
168
|
+
headers,
|
|
169
|
+
path: resolvedPath,
|
|
170
|
+
body,
|
|
171
|
+
});
|
|
172
|
+
};
|
|
153
173
|
export const se_UpdateChannelCommand = async (input, context) => {
|
|
154
174
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
155
175
|
const headers = {
|
|
@@ -461,6 +481,41 @@ const de_PartialUpdateChannelCommandError = async (output, context) => {
|
|
|
461
481
|
});
|
|
462
482
|
}
|
|
463
483
|
};
|
|
484
|
+
export const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
|
|
485
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
486
|
+
return de_ScheduleExternalFlagAdjustmentJobCommandError(output, context);
|
|
487
|
+
}
|
|
488
|
+
const contents = map({
|
|
489
|
+
$metadata: deserializeMetadata(output),
|
|
490
|
+
});
|
|
491
|
+
await collectBody(output.body, context);
|
|
492
|
+
return contents;
|
|
493
|
+
};
|
|
494
|
+
const de_ScheduleExternalFlagAdjustmentJobCommandError = async (output, context) => {
|
|
495
|
+
const parsedOutput = {
|
|
496
|
+
...output,
|
|
497
|
+
body: await parseErrorBody(output.body, context)
|
|
498
|
+
};
|
|
499
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
500
|
+
switch (errorCode) {
|
|
501
|
+
case "ConversationsServiceException":
|
|
502
|
+
case "wildix.xbees.conversations#ConversationsServiceException":
|
|
503
|
+
throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
|
|
504
|
+
case "ForbiddenException":
|
|
505
|
+
case "smithy.framework#ForbiddenException":
|
|
506
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
507
|
+
case "ValidationException":
|
|
508
|
+
case "smithy.framework#ValidationException":
|
|
509
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
510
|
+
default:
|
|
511
|
+
const parsedBody = parsedOutput.body;
|
|
512
|
+
return throwDefaultError({
|
|
513
|
+
output,
|
|
514
|
+
parsedBody,
|
|
515
|
+
errorCode
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
};
|
|
464
519
|
export const de_UpdateChannelCommand = async (output, context) => {
|
|
465
520
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
466
521
|
return de_UpdateChannelCommandError(output, context);
|
|
@@ -527,7 +582,9 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
527
582
|
const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
528
583
|
const contents = map({});
|
|
529
584
|
const data = parsedOutput.body;
|
|
530
|
-
const doc = take(data, {
|
|
585
|
+
const doc = take(data, {
|
|
586
|
+
'message': __expectString,
|
|
587
|
+
});
|
|
531
588
|
Object.assign(contents, doc);
|
|
532
589
|
const exception = new ChannelNotFoundException({
|
|
533
590
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -535,10 +592,25 @@ const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
535
592
|
});
|
|
536
593
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
537
594
|
};
|
|
595
|
+
const de_ConversationsServiceExceptionRes = async (parsedOutput, context) => {
|
|
596
|
+
const contents = map({});
|
|
597
|
+
const data = parsedOutput.body;
|
|
598
|
+
const doc = take(data, {
|
|
599
|
+
'message': __expectString,
|
|
600
|
+
});
|
|
601
|
+
Object.assign(contents, doc);
|
|
602
|
+
const exception = new ConversationsServiceException({
|
|
603
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
604
|
+
...contents
|
|
605
|
+
});
|
|
606
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
607
|
+
};
|
|
538
608
|
const de_MemberNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
539
609
|
const contents = map({});
|
|
540
610
|
const data = parsedOutput.body;
|
|
541
|
-
const doc = take(data, {
|
|
611
|
+
const doc = take(data, {
|
|
612
|
+
'message': __expectString,
|
|
613
|
+
});
|
|
542
614
|
Object.assign(contents, doc);
|
|
543
615
|
const exception = new MemberNotFoundException({
|
|
544
616
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -7,6 +7,7 @@ import { GetChannelMemberCommandInput, GetChannelMemberCommandOutput } from "./c
|
|
|
7
7
|
import { GetMessageCommandInput, GetMessageCommandOutput } from "./commands/GetMessageCommand";
|
|
8
8
|
import { JoinChannelCommandInput, JoinChannelCommandOutput } from "./commands/JoinChannelCommand";
|
|
9
9
|
import { PartialUpdateChannelCommandInput, PartialUpdateChannelCommandOutput } from "./commands/PartialUpdateChannelCommand";
|
|
10
|
+
import { ScheduleExternalFlagAdjustmentJobCommandInput, ScheduleExternalFlagAdjustmentJobCommandOutput } from "./commands/ScheduleExternalFlagAdjustmentJobCommand";
|
|
10
11
|
import { UpdateChannelCommandInput, UpdateChannelCommandOutput } from "./commands/UpdateChannelCommand";
|
|
11
12
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
12
13
|
export interface Conversations {
|
|
@@ -58,6 +59,12 @@ export interface Conversations {
|
|
|
58
59
|
partialUpdateChannel(args: PartialUpdateChannelCommandInput, options?: __HttpHandlerOptions): Promise<PartialUpdateChannelCommandOutput>;
|
|
59
60
|
partialUpdateChannel(args: PartialUpdateChannelCommandInput, cb: (err: any, data?: PartialUpdateChannelCommandOutput) => void): void;
|
|
60
61
|
partialUpdateChannel(args: PartialUpdateChannelCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PartialUpdateChannelCommandOutput) => void): void;
|
|
62
|
+
/**
|
|
63
|
+
* @see {@link ScheduleExternalFlagAdjustmentJobCommand}
|
|
64
|
+
*/
|
|
65
|
+
scheduleExternalFlagAdjustmentJob(args: ScheduleExternalFlagAdjustmentJobCommandInput, options?: __HttpHandlerOptions): Promise<ScheduleExternalFlagAdjustmentJobCommandOutput>;
|
|
66
|
+
scheduleExternalFlagAdjustmentJob(args: ScheduleExternalFlagAdjustmentJobCommandInput, cb: (err: any, data?: ScheduleExternalFlagAdjustmentJobCommandOutput) => void): void;
|
|
67
|
+
scheduleExternalFlagAdjustmentJob(args: ScheduleExternalFlagAdjustmentJobCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ScheduleExternalFlagAdjustmentJobCommandOutput) => void): void;
|
|
61
68
|
/**
|
|
62
69
|
* @see {@link UpdateChannelCommand}
|
|
63
70
|
*/
|
|
@@ -6,6 +6,7 @@ import { GetChannelMemberCommandInput, GetChannelMemberCommandOutput } from "./c
|
|
|
6
6
|
import { GetMessageCommandInput, GetMessageCommandOutput } from "./commands/GetMessageCommand";
|
|
7
7
|
import { JoinChannelCommandInput, JoinChannelCommandOutput } from "./commands/JoinChannelCommand";
|
|
8
8
|
import { PartialUpdateChannelCommandInput, PartialUpdateChannelCommandOutput } from "./commands/PartialUpdateChannelCommand";
|
|
9
|
+
import { ScheduleExternalFlagAdjustmentJobCommandInput, ScheduleExternalFlagAdjustmentJobCommandOutput } from "./commands/ScheduleExternalFlagAdjustmentJobCommand";
|
|
9
10
|
import { UpdateChannelCommandInput, UpdateChannelCommandOutput } from "./commands/UpdateChannelCommand";
|
|
10
11
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
11
12
|
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
@@ -16,11 +17,11 @@ export { __Client };
|
|
|
16
17
|
/**
|
|
17
18
|
* @public
|
|
18
19
|
*/
|
|
19
|
-
export type ServiceInputTypes = CreateChannelCommandInput | CreateMessageCommandInput | DeleteChannelCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetMessageCommandInput | JoinChannelCommandInput | PartialUpdateChannelCommandInput | UpdateChannelCommandInput;
|
|
20
|
+
export type ServiceInputTypes = CreateChannelCommandInput | CreateMessageCommandInput | DeleteChannelCommandInput | GetChannelCommandInput | GetChannelMemberCommandInput | GetMessageCommandInput | JoinChannelCommandInput | PartialUpdateChannelCommandInput | ScheduleExternalFlagAdjustmentJobCommandInput | UpdateChannelCommandInput;
|
|
20
21
|
/**
|
|
21
22
|
* @public
|
|
22
23
|
*/
|
|
23
|
-
export type ServiceOutputTypes = CreateChannelCommandOutput | CreateMessageCommandOutput | DeleteChannelCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetMessageCommandOutput | JoinChannelCommandOutput | PartialUpdateChannelCommandOutput | UpdateChannelCommandOutput;
|
|
24
|
+
export type ServiceOutputTypes = CreateChannelCommandOutput | CreateMessageCommandOutput | DeleteChannelCommandOutput | GetChannelCommandOutput | GetChannelMemberCommandOutput | GetMessageCommandOutput | JoinChannelCommandOutput | PartialUpdateChannelCommandOutput | ScheduleExternalFlagAdjustmentJobCommandOutput | UpdateChannelCommandOutput;
|
|
24
25
|
/**
|
|
25
26
|
* @public
|
|
26
27
|
*/
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ConversationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConversationsClient";
|
|
2
|
+
import { ScheduleExternalFlagAdjustmentJobInput, ScheduleExternalFlagAdjustmentJobOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { Handler, MiddlewareStack, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export { __MetadataBearer, $Command };
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*
|
|
12
|
+
* The input for {@link ScheduleExternalFlagAdjustmentJobCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface ScheduleExternalFlagAdjustmentJobCommandInput extends ScheduleExternalFlagAdjustmentJobInput {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*
|
|
19
|
+
* The output of {@link ScheduleExternalFlagAdjustmentJobCommand}.
|
|
20
|
+
*/
|
|
21
|
+
export interface ScheduleExternalFlagAdjustmentJobCommandOutput extends ScheduleExternalFlagAdjustmentJobOutput, __MetadataBearer {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
* Job to fix the "external" flag for channels in which the user participates.
|
|
26
|
+
* @example
|
|
27
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
+
* ```javascript
|
|
29
|
+
* import { ConversationsClient, ScheduleExternalFlagAdjustmentJobCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
|
|
30
|
+
* // const { ConversationsClient, ScheduleExternalFlagAdjustmentJobCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
|
|
31
|
+
* const client = new ConversationsClient(config);
|
|
32
|
+
* const input = { // ScheduleExternalFlagAdjustmentJobInput
|
|
33
|
+
* userId: "STRING_VALUE", // required
|
|
34
|
+
* };
|
|
35
|
+
* const command = new ScheduleExternalFlagAdjustmentJobCommand(input);
|
|
36
|
+
* const response = await client.send(command);
|
|
37
|
+
* // {};
|
|
38
|
+
*
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @param ScheduleExternalFlagAdjustmentJobCommandInput - {@link ScheduleExternalFlagAdjustmentJobCommandInput}
|
|
42
|
+
* @returns {@link ScheduleExternalFlagAdjustmentJobCommandOutput}
|
|
43
|
+
* @see {@link ScheduleExternalFlagAdjustmentJobCommandInput} for command's `input` shape.
|
|
44
|
+
* @see {@link ScheduleExternalFlagAdjustmentJobCommandOutput} for command's `response` shape.
|
|
45
|
+
* @see {@link ConversationsClientResolvedConfig | config} for ConversationsClient's `config` shape.
|
|
46
|
+
*
|
|
47
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link ConversationsServiceException} (server fault)
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link ValidationException} (client fault)
|
|
52
|
+
*
|
|
53
|
+
* @throws {@link ConversationsServiceException}
|
|
54
|
+
* <p>Base exception class for all service exceptions from Conversations service.</p>
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
export declare class ScheduleExternalFlagAdjustmentJobCommand extends $Command<ScheduleExternalFlagAdjustmentJobCommandInput, ScheduleExternalFlagAdjustmentJobCommandOutput, ConversationsClientResolvedConfig> {
|
|
58
|
+
readonly input: ScheduleExternalFlagAdjustmentJobCommandInput;
|
|
59
|
+
/**
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
constructor(input: ScheduleExternalFlagAdjustmentJobCommandInput);
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ConversationsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ScheduleExternalFlagAdjustmentJobCommandInput, ScheduleExternalFlagAdjustmentJobCommandOutput>;
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
private serialize;
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
private deserialize;
|
|
75
|
+
}
|
|
@@ -6,4 +6,5 @@ export * from "./GetChannelMemberCommand";
|
|
|
6
6
|
export * from "./GetMessageCommand";
|
|
7
7
|
export * from "./JoinChannelCommand";
|
|
8
8
|
export * from "./PartialUpdateChannelCommand";
|
|
9
|
+
export * from "./ScheduleExternalFlagAdjustmentJobCommand";
|
|
9
10
|
export * from "./UpdateChannelCommand";
|
|
@@ -450,6 +450,32 @@ export interface PartialUpdateChannelInput {
|
|
|
450
450
|
export interface PartialUpdateChannelOutput {
|
|
451
451
|
channel: Channel;
|
|
452
452
|
}
|
|
453
|
+
/**
|
|
454
|
+
* @public
|
|
455
|
+
*/
|
|
456
|
+
export declare class ConversationsServiceException extends __BaseException {
|
|
457
|
+
readonly name: "ConversationsServiceException";
|
|
458
|
+
readonly $fault: "server";
|
|
459
|
+
/**
|
|
460
|
+
* @internal
|
|
461
|
+
*/
|
|
462
|
+
constructor(opts: __ExceptionOptionType<ConversationsServiceException, __BaseException>);
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* @public
|
|
466
|
+
*/
|
|
467
|
+
export interface ScheduleExternalFlagAdjustmentJobInput {
|
|
468
|
+
/**
|
|
469
|
+
* @public
|
|
470
|
+
* User ID at x-bees.
|
|
471
|
+
*/
|
|
472
|
+
userId: string;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* @public
|
|
476
|
+
*/
|
|
477
|
+
export interface ScheduleExternalFlagAdjustmentJobOutput {
|
|
478
|
+
}
|
|
453
479
|
/**
|
|
454
480
|
* @public
|
|
455
481
|
*/
|
|
@@ -6,6 +6,7 @@ import { GetChannelMemberCommandInput, GetChannelMemberCommandOutput } from "../
|
|
|
6
6
|
import { GetMessageCommandInput, GetMessageCommandOutput } from "../commands/GetMessageCommand";
|
|
7
7
|
import { JoinChannelCommandInput, JoinChannelCommandOutput } from "../commands/JoinChannelCommand";
|
|
8
8
|
import { PartialUpdateChannelCommandInput, PartialUpdateChannelCommandOutput } from "../commands/PartialUpdateChannelCommand";
|
|
9
|
+
import { ScheduleExternalFlagAdjustmentJobCommandInput, ScheduleExternalFlagAdjustmentJobCommandOutput } from "../commands/ScheduleExternalFlagAdjustmentJobCommand";
|
|
9
10
|
import { UpdateChannelCommandInput, UpdateChannelCommandOutput } from "../commands/UpdateChannelCommand";
|
|
10
11
|
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
11
12
|
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
@@ -41,6 +42,10 @@ export declare const se_JoinChannelCommand: (input: JoinChannelCommandInput, con
|
|
|
41
42
|
* serializeAws_restJson1PartialUpdateChannelCommand
|
|
42
43
|
*/
|
|
43
44
|
export declare const se_PartialUpdateChannelCommand: (input: PartialUpdateChannelCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
45
|
+
/**
|
|
46
|
+
* serializeAws_restJson1ScheduleExternalFlagAdjustmentJobCommand
|
|
47
|
+
*/
|
|
48
|
+
export declare const se_ScheduleExternalFlagAdjustmentJobCommand: (input: ScheduleExternalFlagAdjustmentJobCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
44
49
|
/**
|
|
45
50
|
* serializeAws_restJson1UpdateChannelCommand
|
|
46
51
|
*/
|
|
@@ -77,6 +82,10 @@ export declare const de_JoinChannelCommand: (output: __HttpResponse, context: __
|
|
|
77
82
|
* deserializeAws_restJson1PartialUpdateChannelCommand
|
|
78
83
|
*/
|
|
79
84
|
export declare const de_PartialUpdateChannelCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PartialUpdateChannelCommandOutput>;
|
|
85
|
+
/**
|
|
86
|
+
* deserializeAws_restJson1ScheduleExternalFlagAdjustmentJobCommand
|
|
87
|
+
*/
|
|
88
|
+
export declare const de_ScheduleExternalFlagAdjustmentJobCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ScheduleExternalFlagAdjustmentJobCommandOutput>;
|
|
80
89
|
/**
|
|
81
90
|
* deserializeAws_restJson1UpdateChannelCommand
|
|
82
91
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-conversations-client",
|
|
3
3
|
"description": "@wildix/xbees-conversations-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.25",
|
|
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",
|