@rivet-gg/chat 0.0.2 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist-cjs/ChatService.js +112 -0
  2. package/dist-cjs/ChatServiceClient.js +47 -0
  3. package/dist-cjs/commands/GetDirectThreadCommand.js +36 -0
  4. package/dist-cjs/commands/GetThreadHistoryCommand.js +36 -0
  5. package/dist-cjs/commands/GetThreadTopicCommand.js +36 -0
  6. package/dist-cjs/commands/SendChatMessageCommand.js +36 -0
  7. package/dist-cjs/commands/SetThreadReadCommand.js +36 -0
  8. package/dist-cjs/commands/SetTypingStatusCommand.js +36 -0
  9. package/dist-cjs/commands/WatchThreadCommand.js +36 -0
  10. package/dist-cjs/commands/index.js +10 -0
  11. package/dist-cjs/index.js +11 -0
  12. package/dist-cjs/models/ChatServiceServiceException.js +11 -0
  13. package/dist-cjs/models/index.js +4 -0
  14. package/dist-cjs/models/models_0.js +600 -0
  15. package/dist-cjs/protocols/Aws_restJson1.js +1055 -0
  16. package/dist-cjs/runtimeConfig.browser.js +42 -0
  17. package/dist-cjs/runtimeConfig.js +45 -0
  18. package/dist-cjs/runtimeConfig.native.js +16 -0
  19. package/dist-cjs/runtimeConfig.shared.js +14 -0
  20. package/dist-es/ChatService.js +115 -0
  21. package/dist-es/ChatServiceClient.js +49 -0
  22. package/dist-es/commands/GetDirectThreadCommand.js +39 -0
  23. package/dist-es/commands/GetThreadHistoryCommand.js +39 -0
  24. package/dist-es/commands/GetThreadTopicCommand.js +39 -0
  25. package/dist-es/commands/SendChatMessageCommand.js +39 -0
  26. package/dist-es/commands/SetThreadReadCommand.js +39 -0
  27. package/dist-es/commands/SetTypingStatusCommand.js +39 -0
  28. package/dist-es/commands/WatchThreadCommand.js +39 -0
  29. package/dist-es/commands/index.js +7 -0
  30. package/dist-es/index.js +6 -0
  31. package/dist-es/models/ChatServiceServiceException.js +12 -0
  32. package/dist-es/models/index.js +1 -0
  33. package/dist-es/models/models_0.js +492 -0
  34. package/dist-es/protocols/Aws_restJson1.js +1238 -0
  35. package/dist-es/runtimeConfig.browser.js +25 -0
  36. package/dist-es/runtimeConfig.js +28 -0
  37. package/dist-es/runtimeConfig.native.js +8 -0
  38. package/dist-es/runtimeConfig.shared.js +10 -0
  39. package/dist-types/models/models_0.d.ts +1 -1
  40. package/package.json +1 -1
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const config_resolver_1 = require("@aws-sdk/config-resolver");
8
+ const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
9
+ const middleware_retry_1 = require("@aws-sdk/middleware-retry");
10
+ const util_base64_browser_1 = require("@aws-sdk/util-base64-browser");
11
+ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
12
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
13
+ const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
14
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
15
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
16
+ const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
17
+ const getRuntimeConfig = (config) => {
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
20
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
21
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
22
+ return {
23
+ ...clientSharedValues,
24
+ ...config,
25
+ runtime: "browser",
26
+ defaultsMode,
27
+ base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
28
+ base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
29
+ bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
30
+ defaultUserAgentProvider: (_d = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _d !== void 0 ? _d : (0, util_user_agent_browser_1.defaultUserAgent)({ clientVersion: package_json_1.default.version }),
31
+ maxAttempts: (_e = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _e !== void 0 ? _e : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
32
+ requestHandler: (_f = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _f !== void 0 ? _f : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
33
+ retryMode: (_g = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _g !== void 0 ? _g : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
34
+ sha256: (_h = config === null || config === void 0 ? void 0 : config.sha256) !== null && _h !== void 0 ? _h : sha256_browser_1.Sha256,
35
+ streamCollector: (_j = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _j !== void 0 ? _j : fetch_http_handler_1.streamCollector,
36
+ useDualstackEndpoint: (_k = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _k !== void 0 ? _k : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
37
+ useFipsEndpoint: (_l = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _l !== void 0 ? _l : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
38
+ utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : util_utf8_browser_1.fromUtf8,
39
+ utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : util_utf8_browser_1.toUtf8,
40
+ };
41
+ };
42
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const config_resolver_1 = require("@aws-sdk/config-resolver");
7
+ const hash_node_1 = require("@aws-sdk/hash-node");
8
+ const middleware_retry_1 = require("@aws-sdk/middleware-retry");
9
+ const node_config_provider_1 = require("@aws-sdk/node-config-provider");
10
+ const node_http_handler_1 = require("@aws-sdk/node-http-handler");
11
+ const util_base64_node_1 = require("@aws-sdk/util-base64-node");
12
+ const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
13
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
14
+ const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
15
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
17
+ const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
18
+ const smithy_client_2 = require("@aws-sdk/smithy-client");
19
+ const getRuntimeConfig = (config) => {
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
21
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
22
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
24
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
25
+ return {
26
+ ...clientSharedValues,
27
+ ...config,
28
+ runtime: "node",
29
+ defaultsMode,
30
+ base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
31
+ base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
32
+ bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
33
+ defaultUserAgentProvider: (_d = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _d !== void 0 ? _d : (0, util_user_agent_node_1.defaultUserAgent)({ clientVersion: package_json_1.default.version }),
34
+ maxAttempts: (_e = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _e !== void 0 ? _e : (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
35
+ requestHandler: (_f = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _f !== void 0 ? _f : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
36
+ retryMode: (_g = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _g !== void 0 ? _g : (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE, }),
37
+ sha256: (_h = config === null || config === void 0 ? void 0 : config.sha256) !== null && _h !== void 0 ? _h : hash_node_1.Hash.bind(null, "sha256"),
38
+ streamCollector: (_j = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _j !== void 0 ? _j : node_http_handler_1.streamCollector,
39
+ useDualstackEndpoint: (_k = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _k !== void 0 ? _k : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
40
+ useFipsEndpoint: (_l = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _l !== void 0 ? _l : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
41
+ utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : util_utf8_node_1.fromUtf8,
42
+ utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : util_utf8_node_1.toUtf8,
43
+ };
44
+ };
45
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ var _a;
8
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
9
+ return {
10
+ ...browserDefaults,
11
+ ...config,
12
+ runtime: "react-native",
13
+ sha256: (_a = config === null || config === void 0 ? void 0 : config.sha256) !== null && _a !== void 0 ? _a : sha256_js_1.Sha256,
14
+ };
15
+ };
16
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const url_parser_1 = require("@aws-sdk/url-parser");
5
+ const getRuntimeConfig = (config) => {
6
+ var _a, _b, _c;
7
+ return ({
8
+ apiVersion: "2022-5-28",
9
+ disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
10
+ logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
11
+ urlParser: (_c = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _c !== void 0 ? _c : url_parser_1.parseUrl,
12
+ });
13
+ };
14
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,115 @@
1
+ import { __extends } from "tslib";
2
+ import { ChatServiceClient } from "./ChatServiceClient";
3
+ import { GetDirectThreadCommand, } from "./commands/GetDirectThreadCommand";
4
+ import { GetThreadHistoryCommand, } from "./commands/GetThreadHistoryCommand";
5
+ import { GetThreadTopicCommand, } from "./commands/GetThreadTopicCommand";
6
+ import { SendChatMessageCommand, } from "./commands/SendChatMessageCommand";
7
+ import { SetThreadReadCommand, } from "./commands/SetThreadReadCommand";
8
+ import { SetTypingStatusCommand, } from "./commands/SetTypingStatusCommand";
9
+ import { WatchThreadCommand, } from "./commands/WatchThreadCommand";
10
+ var ChatService = (function (_super) {
11
+ __extends(ChatService, _super);
12
+ function ChatService() {
13
+ return _super !== null && _super.apply(this, arguments) || this;
14
+ }
15
+ ChatService.prototype.getDirectThread = function (args, optionsOrCb, cb) {
16
+ var command = new GetDirectThreadCommand(args);
17
+ if (typeof optionsOrCb === "function") {
18
+ this.send(command, optionsOrCb);
19
+ }
20
+ else if (typeof cb === "function") {
21
+ if (typeof optionsOrCb !== "object")
22
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
23
+ this.send(command, optionsOrCb || {}, cb);
24
+ }
25
+ else {
26
+ return this.send(command, optionsOrCb);
27
+ }
28
+ };
29
+ ChatService.prototype.getThreadHistory = function (args, optionsOrCb, cb) {
30
+ var command = new GetThreadHistoryCommand(args);
31
+ if (typeof optionsOrCb === "function") {
32
+ this.send(command, optionsOrCb);
33
+ }
34
+ else if (typeof cb === "function") {
35
+ if (typeof optionsOrCb !== "object")
36
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
37
+ this.send(command, optionsOrCb || {}, cb);
38
+ }
39
+ else {
40
+ return this.send(command, optionsOrCb);
41
+ }
42
+ };
43
+ ChatService.prototype.getThreadTopic = function (args, optionsOrCb, cb) {
44
+ var command = new GetThreadTopicCommand(args);
45
+ if (typeof optionsOrCb === "function") {
46
+ this.send(command, optionsOrCb);
47
+ }
48
+ else if (typeof cb === "function") {
49
+ if (typeof optionsOrCb !== "object")
50
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
51
+ this.send(command, optionsOrCb || {}, cb);
52
+ }
53
+ else {
54
+ return this.send(command, optionsOrCb);
55
+ }
56
+ };
57
+ ChatService.prototype.sendChatMessage = function (args, optionsOrCb, cb) {
58
+ var command = new SendChatMessageCommand(args);
59
+ if (typeof optionsOrCb === "function") {
60
+ this.send(command, optionsOrCb);
61
+ }
62
+ else if (typeof cb === "function") {
63
+ if (typeof optionsOrCb !== "object")
64
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
65
+ this.send(command, optionsOrCb || {}, cb);
66
+ }
67
+ else {
68
+ return this.send(command, optionsOrCb);
69
+ }
70
+ };
71
+ ChatService.prototype.setThreadRead = function (args, optionsOrCb, cb) {
72
+ var command = new SetThreadReadCommand(args);
73
+ if (typeof optionsOrCb === "function") {
74
+ this.send(command, optionsOrCb);
75
+ }
76
+ else if (typeof cb === "function") {
77
+ if (typeof optionsOrCb !== "object")
78
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
79
+ this.send(command, optionsOrCb || {}, cb);
80
+ }
81
+ else {
82
+ return this.send(command, optionsOrCb);
83
+ }
84
+ };
85
+ ChatService.prototype.setTypingStatus = function (args, optionsOrCb, cb) {
86
+ var command = new SetTypingStatusCommand(args);
87
+ if (typeof optionsOrCb === "function") {
88
+ this.send(command, optionsOrCb);
89
+ }
90
+ else if (typeof cb === "function") {
91
+ if (typeof optionsOrCb !== "object")
92
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
93
+ this.send(command, optionsOrCb || {}, cb);
94
+ }
95
+ else {
96
+ return this.send(command, optionsOrCb);
97
+ }
98
+ };
99
+ ChatService.prototype.watchThread = function (args, optionsOrCb, cb) {
100
+ var command = new WatchThreadCommand(args);
101
+ if (typeof optionsOrCb === "function") {
102
+ this.send(command, optionsOrCb);
103
+ }
104
+ else if (typeof cb === "function") {
105
+ if (typeof optionsOrCb !== "object")
106
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
107
+ this.send(command, optionsOrCb || {}, cb);
108
+ }
109
+ else {
110
+ return this.send(command, optionsOrCb);
111
+ }
112
+ };
113
+ return ChatService;
114
+ }(ChatServiceClient));
115
+ export { ChatService };
@@ -0,0 +1,49 @@
1
+ import { __extends } from "tslib";
2
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
3
+ import { resolveCustomEndpointsConfig, } from "@aws-sdk/config-resolver";
4
+ import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
5
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
6
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
7
+ import { getRetryPlugin, resolveRetryConfig, } from "@aws-sdk/middleware-retry";
8
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
9
+ import { Client as __Client, } from "@aws-sdk/smithy-client";
10
+ import { middleware as __middleware } from "@rivet-gg/common";
11
+ var ChatServiceClient = (function (_super) {
12
+ __extends(ChatServiceClient, _super);
13
+ function ChatServiceClient(configuration) {
14
+ var _this = this;
15
+ if (!configuration.hasOwnProperty("requestHandler")) {
16
+ if (typeof window !== "undefined")
17
+ configuration.requestHandler = __middleware.browser.requestHandlerMiddleware(configuration.token);
18
+ else
19
+ configuration.requestHandler = __middleware.nodejs.requestHandlerMiddleware(configuration.token);
20
+ }
21
+ function rivetConfig(input) {
22
+ var _a, _b, _c;
23
+ return Object.assign(Object.assign({}, input), {
24
+ endpoint: (_a = configuration.endpoint) !== null && _a !== void 0 ? _a : (typeof process !== "undefined" ?
25
+ ((_b = process.env.RIVET_CHAT_API_URL) !== null && _b !== void 0 ? _b : "") : ""),
26
+ token: (_c = input.token) !== null && _c !== void 0 ? _c : null,
27
+ });
28
+ }
29
+ var _config_0 = __getRuntimeConfig(configuration);
30
+ var _config_1 = rivetConfig(_config_0);
31
+ var _config_2 = resolveCustomEndpointsConfig(_config_1);
32
+ var _config_3 = resolveRetryConfig(_config_2);
33
+ var _config_4 = resolveHostHeaderConfig(_config_3);
34
+ var _config_5 = resolveUserAgentConfig(_config_4);
35
+ _this = _super.call(this, _config_5) || this;
36
+ _this.config = _config_5;
37
+ _this.middlewareStack.use(getRetryPlugin(_this.config));
38
+ _this.middlewareStack.use(getContentLengthPlugin(_this.config));
39
+ _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
40
+ _this.middlewareStack.use(getLoggerPlugin(_this.config));
41
+ _this.middlewareStack.use(getUserAgentPlugin(_this.config));
42
+ return _this;
43
+ }
44
+ ChatServiceClient.prototype.destroy = function () {
45
+ _super.prototype.destroy.call(this);
46
+ };
47
+ return ChatServiceClient;
48
+ }(__Client));
49
+ export { ChatServiceClient };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { GetDirectThreadInput, GetDirectThreadOutput, } from "../models/models_0";
3
+ import { deserializeAws_restJson1GetDirectThreadCommand, serializeAws_restJson1GetDirectThreadCommand, } from "../protocols/Aws_restJson1";
4
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
+ import { Command as $Command } from "@aws-sdk/smithy-client";
6
+ var GetDirectThreadCommand = (function (_super) {
7
+ __extends(GetDirectThreadCommand, _super);
8
+ function GetDirectThreadCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ GetDirectThreadCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ChatServiceClient";
18
+ var commandName = "GetDirectThreadCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: GetDirectThreadInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: GetDirectThreadOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ GetDirectThreadCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1GetDirectThreadCommand(input, context);
33
+ };
34
+ GetDirectThreadCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1GetDirectThreadCommand(output, context);
36
+ };
37
+ return GetDirectThreadCommand;
38
+ }($Command));
39
+ export { GetDirectThreadCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { GetThreadHistoryInput, GetThreadHistoryOutput, } from "../models/models_0";
3
+ import { deserializeAws_restJson1GetThreadHistoryCommand, serializeAws_restJson1GetThreadHistoryCommand, } from "../protocols/Aws_restJson1";
4
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
+ import { Command as $Command } from "@aws-sdk/smithy-client";
6
+ var GetThreadHistoryCommand = (function (_super) {
7
+ __extends(GetThreadHistoryCommand, _super);
8
+ function GetThreadHistoryCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ GetThreadHistoryCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ChatServiceClient";
18
+ var commandName = "GetThreadHistoryCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: GetThreadHistoryInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: GetThreadHistoryOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ GetThreadHistoryCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1GetThreadHistoryCommand(input, context);
33
+ };
34
+ GetThreadHistoryCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1GetThreadHistoryCommand(output, context);
36
+ };
37
+ return GetThreadHistoryCommand;
38
+ }($Command));
39
+ export { GetThreadHistoryCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { GetThreadTopicInput, GetThreadTopicOutput, } from "../models/models_0";
3
+ import { deserializeAws_restJson1GetThreadTopicCommand, serializeAws_restJson1GetThreadTopicCommand, } from "../protocols/Aws_restJson1";
4
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
+ import { Command as $Command } from "@aws-sdk/smithy-client";
6
+ var GetThreadTopicCommand = (function (_super) {
7
+ __extends(GetThreadTopicCommand, _super);
8
+ function GetThreadTopicCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ GetThreadTopicCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ChatServiceClient";
18
+ var commandName = "GetThreadTopicCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: GetThreadTopicInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: GetThreadTopicOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ GetThreadTopicCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1GetThreadTopicCommand(input, context);
33
+ };
34
+ GetThreadTopicCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1GetThreadTopicCommand(output, context);
36
+ };
37
+ return GetThreadTopicCommand;
38
+ }($Command));
39
+ export { GetThreadTopicCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { SendChatMessageInput, SendChatMessageOutput, } from "../models/models_0";
3
+ import { deserializeAws_restJson1SendChatMessageCommand, serializeAws_restJson1SendChatMessageCommand, } from "../protocols/Aws_restJson1";
4
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
+ import { Command as $Command } from "@aws-sdk/smithy-client";
6
+ var SendChatMessageCommand = (function (_super) {
7
+ __extends(SendChatMessageCommand, _super);
8
+ function SendChatMessageCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ SendChatMessageCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ChatServiceClient";
18
+ var commandName = "SendChatMessageCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: SendChatMessageInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: SendChatMessageOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ SendChatMessageCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1SendChatMessageCommand(input, context);
33
+ };
34
+ SendChatMessageCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1SendChatMessageCommand(output, context);
36
+ };
37
+ return SendChatMessageCommand;
38
+ }($Command));
39
+ export { SendChatMessageCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { SetThreadReadInput, SetThreadReadOutput, } from "../models/models_0";
3
+ import { deserializeAws_restJson1SetThreadReadCommand, serializeAws_restJson1SetThreadReadCommand, } from "../protocols/Aws_restJson1";
4
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
+ import { Command as $Command } from "@aws-sdk/smithy-client";
6
+ var SetThreadReadCommand = (function (_super) {
7
+ __extends(SetThreadReadCommand, _super);
8
+ function SetThreadReadCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ SetThreadReadCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ChatServiceClient";
18
+ var commandName = "SetThreadReadCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: SetThreadReadInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: SetThreadReadOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ SetThreadReadCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1SetThreadReadCommand(input, context);
33
+ };
34
+ SetThreadReadCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1SetThreadReadCommand(output, context);
36
+ };
37
+ return SetThreadReadCommand;
38
+ }($Command));
39
+ export { SetThreadReadCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { SetTypingStatusInput, SetTypingStatusOutput, } from "../models/models_0";
3
+ import { deserializeAws_restJson1SetTypingStatusCommand, serializeAws_restJson1SetTypingStatusCommand, } from "../protocols/Aws_restJson1";
4
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
+ import { Command as $Command } from "@aws-sdk/smithy-client";
6
+ var SetTypingStatusCommand = (function (_super) {
7
+ __extends(SetTypingStatusCommand, _super);
8
+ function SetTypingStatusCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ SetTypingStatusCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ChatServiceClient";
18
+ var commandName = "SetTypingStatusCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: SetTypingStatusInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: SetTypingStatusOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ SetTypingStatusCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1SetTypingStatusCommand(input, context);
33
+ };
34
+ SetTypingStatusCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1SetTypingStatusCommand(output, context);
36
+ };
37
+ return SetTypingStatusCommand;
38
+ }($Command));
39
+ export { SetTypingStatusCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { WatchThreadInput, WatchThreadOutput, } from "../models/models_0";
3
+ import { deserializeAws_restJson1WatchThreadCommand, serializeAws_restJson1WatchThreadCommand, } from "../protocols/Aws_restJson1";
4
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
5
+ import { Command as $Command } from "@aws-sdk/smithy-client";
6
+ var WatchThreadCommand = (function (_super) {
7
+ __extends(WatchThreadCommand, _super);
8
+ function WatchThreadCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ WatchThreadCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ChatServiceClient";
18
+ var commandName = "WatchThreadCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: WatchThreadInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: WatchThreadOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ WatchThreadCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1WatchThreadCommand(input, context);
33
+ };
34
+ WatchThreadCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1WatchThreadCommand(output, context);
36
+ };
37
+ return WatchThreadCommand;
38
+ }($Command));
39
+ export { WatchThreadCommand };
@@ -0,0 +1,7 @@
1
+ export * from "./GetDirectThreadCommand";
2
+ export * from "./GetThreadHistoryCommand";
3
+ export * from "./GetThreadTopicCommand";
4
+ export * from "./SendChatMessageCommand";
5
+ export * from "./SetThreadReadCommand";
6
+ export * from "./SetTypingStatusCommand";
7
+ export * from "./WatchThreadCommand";
@@ -0,0 +1,6 @@
1
+ export * from "./ChatServiceClient";
2
+ export * from "./ChatService";
3
+ export * from "./commands";
4
+ export * from "./models";
5
+ export * as common from "@rivet-gg/common";
6
+ export { ChatServiceServiceException } from "./models/ChatServiceServiceException";
@@ -0,0 +1,12 @@
1
+ import { __extends } from "tslib";
2
+ import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
+ var ChatServiceServiceException = (function (_super) {
4
+ __extends(ChatServiceServiceException, _super);
5
+ function ChatServiceServiceException(options) {
6
+ var _this = _super.call(this, options) || this;
7
+ Object.setPrototypeOf(_this, ChatServiceServiceException.prototype);
8
+ return _this;
9
+ }
10
+ return ChatServiceServiceException;
11
+ }(__ServiceException));
12
+ export { ChatServiceServiceException };
@@ -0,0 +1 @@
1
+ export * from "./models_0";