onehook-api-client 1.0.6 → 1.0.7

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/README.md CHANGED
@@ -19,16 +19,16 @@ using your favorite package manager:
19
19
 
20
20
  The AWS SDK is modulized by clients and commands.
21
21
  To send a request, you only need to import the `OneHookClient` and
22
- the commands you need, for example `GetUserCommand`:
22
+ the commands you need, for example `ListMyDevicesCommand`:
23
23
 
24
24
  ```js
25
25
  // ES5 example
26
- const { OneHookClient, GetUserCommand } = require("onehook-api-client");
26
+ const { OneHookClient, ListMyDevicesCommand } = require("onehook-api-client");
27
27
  ```
28
28
 
29
29
  ```ts
30
30
  // ES6+ example
31
- import { OneHookClient, GetUserCommand } from "onehook-api-client";
31
+ import { OneHookClient, ListMyDevicesCommand } from "onehook-api-client";
32
32
  ```
33
33
 
34
34
  ### Usage
@@ -45,7 +45,7 @@ To send a request, you:
45
45
  const client = new OneHookClient({ region: "REGION" });
46
46
 
47
47
  const params = { /** input parameters */ };
48
- const command = new GetUserCommand(params);
48
+ const command = new ListMyDevicesCommand(params);
49
49
  ```
50
50
 
51
51
  #### Async/await
@@ -124,7 +124,7 @@ const client = new AWS.OneHook({ region: "REGION" });
124
124
 
125
125
  // async/await.
126
126
  try {
127
- const data = await client.getUser(params);
127
+ const data = await client.listMyDevices(params);
128
128
  // process data.
129
129
  } catch (error) {
130
130
  // error handling.
@@ -132,7 +132,7 @@ try {
132
132
 
133
133
  // Promises.
134
134
  client
135
- .getUser(params)
135
+ .listMyDevices(params)
136
136
  .then((data) => {
137
137
  // process data.
138
138
  })
@@ -141,7 +141,7 @@ client
141
141
  });
142
142
 
143
143
  // callbacks.
144
- client.getUser(params, (err, data) => {
144
+ client.listMyDevices(params, (err, data) => {
145
145
  // process err and data.
146
146
  });
147
147
  ```
@@ -213,6 +213,34 @@ DeleteMatchMessages
213
213
  </details>
214
214
  <details>
215
215
  <summary>
216
+ GetParticipantRegistry
217
+ </summary>
218
+
219
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetParticipantRegistryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetParticipantRegistryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetParticipantRegistryCommandOutput/)
220
+ </details>
221
+ <details>
222
+ <summary>
223
+ ListMyDevices
224
+ </summary>
225
+
226
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/ListMyDevicesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/ListMyDevicesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/ListMyDevicesCommandOutput/)
227
+ </details>
228
+ <details>
229
+ <summary>
230
+ RegisterDevice
231
+ </summary>
232
+
233
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/RegisterDeviceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RegisterDeviceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RegisterDeviceCommandOutput/)
234
+ </details>
235
+ <details>
236
+ <summary>
237
+ RevokeDevice
238
+ </summary>
239
+
240
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/RevokeDeviceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RevokeDeviceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RevokeDeviceCommandOutput/)
241
+ </details>
242
+ <details>
243
+ <summary>
216
244
  UploadPreKeys
217
245
  </summary>
218
246
 
@@ -16,6 +16,7 @@ const GenerateUploadUrlCommand_1 = require("./commands/GenerateUploadUrlCommand"
16
16
  const GetLivenessStatusCommand_1 = require("./commands/GetLivenessStatusCommand");
17
17
  const GetMatchCommand_1 = require("./commands/GetMatchCommand");
18
18
  const GetMyProfileCommand_1 = require("./commands/GetMyProfileCommand");
19
+ const GetParticipantRegistryCommand_1 = require("./commands/GetParticipantRegistryCommand");
19
20
  const GetPreferencesCommand_1 = require("./commands/GetPreferencesCommand");
20
21
  const GetProfileCommand_1 = require("./commands/GetProfileCommand");
21
22
  const GetStateCommand_1 = require("./commands/GetStateCommand");
@@ -25,11 +26,14 @@ const IndexLocationCommand_1 = require("./commands/IndexLocationCommand");
25
26
  const InitUserCommand_1 = require("./commands/InitUserCommand");
26
27
  const LinkEmailCommand_1 = require("./commands/LinkEmailCommand");
27
28
  const LinkSocialCommand_1 = require("./commands/LinkSocialCommand");
29
+ const ListMyDevicesCommand_1 = require("./commands/ListMyDevicesCommand");
30
+ const RegisterDeviceCommand_1 = require("./commands/RegisterDeviceCommand");
28
31
  const RegisterPhoneCommand_1 = require("./commands/RegisterPhoneCommand");
29
32
  const RemoveLocationCommand_1 = require("./commands/RemoveLocationCommand");
30
33
  const RequestEmailOtpCommand_1 = require("./commands/RequestEmailOtpCommand");
31
34
  const RequestPhoneOtpCommand_1 = require("./commands/RequestPhoneOtpCommand");
32
35
  const RequestPhoneUpdateOtpCommand_1 = require("./commands/RequestPhoneUpdateOtpCommand");
36
+ const RevokeDeviceCommand_1 = require("./commands/RevokeDeviceCommand");
33
37
  const SwipeCommand_1 = require("./commands/SwipeCommand");
34
38
  const UnhookCommand_1 = require("./commands/UnhookCommand");
35
39
  const UnlinkSocialCommand_1 = require("./commands/UnlinkSocialCommand");
@@ -44,6 +48,10 @@ const smithy_client_1 = require("@smithy/smithy-client");
44
48
  const commands = {
45
49
  ClaimPreKeyBundleCommand: ClaimPreKeyBundleCommand_1.ClaimPreKeyBundleCommand,
46
50
  DeleteMatchMessagesCommand: DeleteMatchMessagesCommand_1.DeleteMatchMessagesCommand,
51
+ GetParticipantRegistryCommand: GetParticipantRegistryCommand_1.GetParticipantRegistryCommand,
52
+ ListMyDevicesCommand: ListMyDevicesCommand_1.ListMyDevicesCommand,
53
+ RegisterDeviceCommand: RegisterDeviceCommand_1.RegisterDeviceCommand,
54
+ RevokeDeviceCommand: RevokeDeviceCommand_1.RevokeDeviceCommand,
47
55
  UploadPreKeysCommand: UploadPreKeysCommand_1.UploadPreKeysCommand,
48
56
  AuthSocialCommand: AuthSocialCommand_1.AuthSocialCommand,
49
57
  GenerateInviteCommand: GenerateInviteCommand_1.GenerateInviteCommand,
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetParticipantRegistryCommand = 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 GetParticipantRegistryCommand 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("OneHookService", "GetParticipantRegistry", {})
15
+ .n("OneHookClient", "GetParticipantRegistryCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetParticipantRegistryCommand)
18
+ .de(Aws_restJson1_1.de_GetParticipantRegistryCommand)
19
+ .build() {
20
+ }
21
+ exports.GetParticipantRegistryCommand = GetParticipantRegistryCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListMyDevicesCommand = 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 ListMyDevicesCommand 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("OneHookService", "ListMyDevices", {})
15
+ .n("OneHookClient", "ListMyDevicesCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ListMyDevicesCommand)
18
+ .de(Aws_restJson1_1.de_ListMyDevicesCommand)
19
+ .build() {
20
+ }
21
+ exports.ListMyDevicesCommand = ListMyDevicesCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RegisterDeviceCommand = 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 RegisterDeviceCommand 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("OneHookService", "RegisterDevice", {})
15
+ .n("OneHookClient", "RegisterDeviceCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_RegisterDeviceCommand)
18
+ .de(Aws_restJson1_1.de_RegisterDeviceCommand)
19
+ .build() {
20
+ }
21
+ exports.RegisterDeviceCommand = RegisterDeviceCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RevokeDeviceCommand = 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 RevokeDeviceCommand 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("OneHookService", "RevokeDevice", {})
15
+ .n("OneHookClient", "RevokeDeviceCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_RevokeDeviceCommand)
18
+ .de(Aws_restJson1_1.de_RevokeDeviceCommand)
19
+ .build() {
20
+ }
21
+ exports.RevokeDeviceCommand = RevokeDeviceCommand;
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./ClaimPreKeyBundleCommand"), exports);
5
5
  tslib_1.__exportStar(require("./DeleteMatchMessagesCommand"), exports);
6
+ tslib_1.__exportStar(require("./GetParticipantRegistryCommand"), exports);
7
+ tslib_1.__exportStar(require("./ListMyDevicesCommand"), exports);
8
+ tslib_1.__exportStar(require("./RegisterDeviceCommand"), exports);
9
+ tslib_1.__exportStar(require("./RevokeDeviceCommand"), exports);
6
10
  tslib_1.__exportStar(require("./UploadPreKeysCommand"), exports);
7
11
  tslib_1.__exportStar(require("./AuthSocialCommand"), exports);
8
12
  tslib_1.__exportStar(require("./GenerateInviteCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotFoundError = exports.InternalServerError = exports.BadRequestError = exports.ForbiddenError = void 0;
3
+ exports.DeviceLimitError = exports.Platform = exports.NotFoundError = exports.InternalServerError = exports.BadRequestError = exports.ForbiddenError = void 0;
4
4
  const OneHookServiceException_1 = require("./OneHookServiceException");
5
5
  class ForbiddenError extends OneHookServiceException_1.OneHookServiceException {
6
6
  name = "ForbiddenError";
@@ -62,3 +62,23 @@ class NotFoundError extends OneHookServiceException_1.OneHookServiceException {
62
62
  }
63
63
  }
64
64
  exports.NotFoundError = NotFoundError;
65
+ exports.Platform = {
66
+ ANDROID: "ANDROID",
67
+ IOS: "IOS",
68
+ WEB: "WEB",
69
+ };
70
+ class DeviceLimitError extends OneHookServiceException_1.OneHookServiceException {
71
+ name = "DeviceLimitError";
72
+ $fault = "client";
73
+ error;
74
+ constructor(opts) {
75
+ super({
76
+ name: "DeviceLimitError",
77
+ $fault: "client",
78
+ ...opts
79
+ });
80
+ Object.setPrototypeOf(this, DeviceLimitError.prototype);
81
+ this.error = opts.error;
82
+ }
83
+ }
84
+ exports.DeviceLimitError = DeviceLimitError;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_RequestPhoneOtpCommand = exports.de_RequestEmailOtpCommand = exports.de_RegisterPhoneCommand = exports.de_LinkSocialCommand = exports.de_LinkEmailCommand = exports.de_GetUserByEmailCommand = exports.de_GetUserCommand = exports.de_GenerateInviteCommand = exports.de_AuthSocialCommand = exports.de_UploadPreKeysCommand = exports.de_DeleteMatchMessagesCommand = exports.de_ClaimPreKeyBundleCommand = exports.se_UpgradeUserCommand = exports.se_UnhookCommand = exports.se_InitUserCommand = exports.se_GetStateCommand = exports.se_GetMatchCommand = exports.se_CompleteOnboardingCommand = exports.se_UpdateProfileCommand = exports.se_GetProfileCommand = exports.se_GetMyProfileCommand = exports.se_GetLivenessStatusCommand = exports.se_GenerateUploadUrlCommand = exports.se_GenerateDownloadUrlCommand = exports.se_DeleteProfileCommand = exports.se_CreateLivenessSessionCommand = exports.se_CompleteLivenessSessionCommand = exports.se_UpdatePreferencesCommand = exports.se_SwipeCommand = exports.se_RemoveLocationCommand = exports.se_IndexLocationCommand = exports.se_GetPreferencesCommand = exports.se_DiscoverCommand = exports.se_ValidateInviteCommand = exports.se_UpdatePhoneNumberCommand = exports.se_UpdateEntitlementsCommand = exports.se_UnlinkSocialCommand = exports.se_RequestPhoneUpdateOtpCommand = exports.se_RequestPhoneOtpCommand = exports.se_RequestEmailOtpCommand = exports.se_RegisterPhoneCommand = exports.se_LinkSocialCommand = exports.se_LinkEmailCommand = exports.se_GetUserByEmailCommand = exports.se_GetUserCommand = exports.se_GenerateInviteCommand = exports.se_AuthSocialCommand = exports.se_UploadPreKeysCommand = exports.se_DeleteMatchMessagesCommand = exports.se_ClaimPreKeyBundleCommand = void 0;
4
- exports.de_UpgradeUserCommand = exports.de_UnhookCommand = exports.de_InitUserCommand = exports.de_GetStateCommand = exports.de_GetMatchCommand = exports.de_CompleteOnboardingCommand = exports.de_UpdateProfileCommand = exports.de_GetProfileCommand = exports.de_GetMyProfileCommand = exports.de_GetLivenessStatusCommand = exports.de_GenerateUploadUrlCommand = exports.de_GenerateDownloadUrlCommand = exports.de_DeleteProfileCommand = exports.de_CreateLivenessSessionCommand = exports.de_CompleteLivenessSessionCommand = exports.de_UpdatePreferencesCommand = exports.de_SwipeCommand = exports.de_RemoveLocationCommand = exports.de_IndexLocationCommand = exports.de_GetPreferencesCommand = exports.de_DiscoverCommand = exports.de_ValidateInviteCommand = exports.de_UpdatePhoneNumberCommand = exports.de_UpdateEntitlementsCommand = exports.de_UnlinkSocialCommand = exports.de_RequestPhoneUpdateOtpCommand = void 0;
3
+ exports.de_AuthSocialCommand = exports.de_UploadPreKeysCommand = exports.de_RevokeDeviceCommand = exports.de_RegisterDeviceCommand = exports.de_ListMyDevicesCommand = exports.de_GetParticipantRegistryCommand = exports.de_DeleteMatchMessagesCommand = exports.de_ClaimPreKeyBundleCommand = exports.se_UpgradeUserCommand = exports.se_UnhookCommand = exports.se_InitUserCommand = exports.se_GetStateCommand = exports.se_GetMatchCommand = exports.se_CompleteOnboardingCommand = exports.se_UpdateProfileCommand = exports.se_GetProfileCommand = exports.se_GetMyProfileCommand = exports.se_GetLivenessStatusCommand = exports.se_GenerateUploadUrlCommand = exports.se_GenerateDownloadUrlCommand = exports.se_DeleteProfileCommand = exports.se_CreateLivenessSessionCommand = exports.se_CompleteLivenessSessionCommand = exports.se_UpdatePreferencesCommand = exports.se_SwipeCommand = exports.se_RemoveLocationCommand = exports.se_IndexLocationCommand = exports.se_GetPreferencesCommand = exports.se_DiscoverCommand = exports.se_ValidateInviteCommand = exports.se_UpdatePhoneNumberCommand = exports.se_UpdateEntitlementsCommand = exports.se_UnlinkSocialCommand = exports.se_RequestPhoneUpdateOtpCommand = exports.se_RequestPhoneOtpCommand = exports.se_RequestEmailOtpCommand = exports.se_RegisterPhoneCommand = exports.se_LinkSocialCommand = exports.se_LinkEmailCommand = exports.se_GetUserByEmailCommand = exports.se_GetUserCommand = exports.se_GenerateInviteCommand = exports.se_AuthSocialCommand = exports.se_UploadPreKeysCommand = exports.se_RevokeDeviceCommand = exports.se_RegisterDeviceCommand = exports.se_ListMyDevicesCommand = exports.se_GetParticipantRegistryCommand = exports.se_DeleteMatchMessagesCommand = exports.se_ClaimPreKeyBundleCommand = void 0;
4
+ exports.de_UpgradeUserCommand = exports.de_UnhookCommand = exports.de_InitUserCommand = exports.de_GetStateCommand = exports.de_GetMatchCommand = exports.de_CompleteOnboardingCommand = exports.de_UpdateProfileCommand = exports.de_GetProfileCommand = exports.de_GetMyProfileCommand = exports.de_GetLivenessStatusCommand = exports.de_GenerateUploadUrlCommand = exports.de_GenerateDownloadUrlCommand = exports.de_DeleteProfileCommand = exports.de_CreateLivenessSessionCommand = exports.de_CompleteLivenessSessionCommand = exports.de_UpdatePreferencesCommand = exports.de_SwipeCommand = exports.de_RemoveLocationCommand = exports.de_IndexLocationCommand = exports.de_GetPreferencesCommand = exports.de_DiscoverCommand = exports.de_ValidateInviteCommand = exports.de_UpdatePhoneNumberCommand = exports.de_UpdateEntitlementsCommand = exports.de_UnlinkSocialCommand = exports.de_RequestPhoneUpdateOtpCommand = exports.de_RequestPhoneOtpCommand = exports.de_RequestEmailOtpCommand = exports.de_RegisterPhoneCommand = exports.de_LinkSocialCommand = exports.de_LinkEmailCommand = exports.de_GetUserByEmailCommand = exports.de_GetUserCommand = exports.de_GenerateInviteCommand = void 0;
5
5
  const OneHookServiceException_1 = require("../models/OneHookServiceException");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const core_1 = require("@aws-sdk/core");
@@ -35,6 +35,66 @@ const se_DeleteMatchMessagesCommand = async (input, context) => {
35
35
  return b.build();
36
36
  };
37
37
  exports.se_DeleteMatchMessagesCommand = se_DeleteMatchMessagesCommand;
38
+ const se_GetParticipantRegistryCommand = async (input, context) => {
39
+ const b = (0, core_2.requestBuilder)(input, context);
40
+ const headers = {};
41
+ b.bp("/chat/registry/{userId}");
42
+ b.p('userId', () => input.userId, '{userId}', false);
43
+ const query = (0, smithy_client_1.map)({
44
+ [_mI]: [, (0, smithy_client_1.expectNonNull)(input[_mI], `matchId`)],
45
+ });
46
+ let body;
47
+ b.m("GET")
48
+ .h(headers)
49
+ .q(query)
50
+ .b(body);
51
+ return b.build();
52
+ };
53
+ exports.se_GetParticipantRegistryCommand = se_GetParticipantRegistryCommand;
54
+ const se_ListMyDevicesCommand = async (input, context) => {
55
+ const b = (0, core_2.requestBuilder)(input, context);
56
+ const headers = {};
57
+ b.bp("/chat/devices");
58
+ let body;
59
+ b.m("GET")
60
+ .h(headers)
61
+ .b(body);
62
+ return b.build();
63
+ };
64
+ exports.se_ListMyDevicesCommand = se_ListMyDevicesCommand;
65
+ const se_RegisterDeviceCommand = async (input, context) => {
66
+ const b = (0, core_2.requestBuilder)(input, context);
67
+ const headers = {
68
+ 'content-type': 'application/json',
69
+ };
70
+ b.bp("/chat/devices");
71
+ let body;
72
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
73
+ 'accountHistoryKey': _ => (0, smithy_client_1._json)(_),
74
+ 'deviceId': [],
75
+ 'displayName': [],
76
+ 'maxEnvelopeVersion': [],
77
+ 'platform': [],
78
+ 'publicKey': [],
79
+ }));
80
+ b.m("POST")
81
+ .h(headers)
82
+ .b(body);
83
+ return b.build();
84
+ };
85
+ exports.se_RegisterDeviceCommand = se_RegisterDeviceCommand;
86
+ const se_RevokeDeviceCommand = async (input, context) => {
87
+ const b = (0, core_2.requestBuilder)(input, context);
88
+ const headers = {};
89
+ b.bp("/chat/devices/{deviceId}");
90
+ b.p('deviceId', () => input.deviceId, '{deviceId}', false);
91
+ let body;
92
+ b.m("DELETE")
93
+ .h(headers)
94
+ .b(body);
95
+ return b.build();
96
+ };
97
+ exports.se_RevokeDeviceCommand = se_RevokeDeviceCommand;
38
98
  const se_UploadPreKeysCommand = async (input, context) => {
39
99
  const b = (0, core_2.requestBuilder)(input, context);
40
100
  const headers = {
@@ -633,6 +693,72 @@ const de_DeleteMatchMessagesCommand = async (output, context) => {
633
693
  return contents;
634
694
  };
635
695
  exports.de_DeleteMatchMessagesCommand = de_DeleteMatchMessagesCommand;
696
+ const de_GetParticipantRegistryCommand = async (output, context) => {
697
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
698
+ return de_CommandError(output, context);
699
+ }
700
+ const contents = (0, smithy_client_1.map)({
701
+ $metadata: deserializeMetadata(output),
702
+ });
703
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
704
+ const doc = (0, smithy_client_1.take)(data, {
705
+ 'accountHistoryKey': smithy_client_1._json,
706
+ 'devices': smithy_client_1._json,
707
+ 'userId': smithy_client_1.expectString,
708
+ });
709
+ Object.assign(contents, doc);
710
+ return contents;
711
+ };
712
+ exports.de_GetParticipantRegistryCommand = de_GetParticipantRegistryCommand;
713
+ const de_ListMyDevicesCommand = async (output, context) => {
714
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
715
+ return de_CommandError(output, context);
716
+ }
717
+ const contents = (0, smithy_client_1.map)({
718
+ $metadata: deserializeMetadata(output),
719
+ });
720
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
721
+ const doc = (0, smithy_client_1.take)(data, {
722
+ 'accountHistoryKey': smithy_client_1._json,
723
+ 'devices': smithy_client_1._json,
724
+ });
725
+ Object.assign(contents, doc);
726
+ return contents;
727
+ };
728
+ exports.de_ListMyDevicesCommand = de_ListMyDevicesCommand;
729
+ const de_RegisterDeviceCommand = async (output, context) => {
730
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
731
+ return de_CommandError(output, context);
732
+ }
733
+ const contents = (0, smithy_client_1.map)({
734
+ $metadata: deserializeMetadata(output),
735
+ });
736
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
737
+ const doc = (0, smithy_client_1.take)(data, {
738
+ 'accountHistoryKey': smithy_client_1._json,
739
+ 'device': smithy_client_1._json,
740
+ 'ownsAccountHistoryKey': smithy_client_1.expectBoolean,
741
+ });
742
+ Object.assign(contents, doc);
743
+ return contents;
744
+ };
745
+ exports.de_RegisterDeviceCommand = de_RegisterDeviceCommand;
746
+ const de_RevokeDeviceCommand = async (output, context) => {
747
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
748
+ return de_CommandError(output, context);
749
+ }
750
+ const contents = (0, smithy_client_1.map)({
751
+ $metadata: deserializeMetadata(output),
752
+ });
753
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
754
+ const doc = (0, smithy_client_1.take)(data, {
755
+ 'deviceId': smithy_client_1.expectString,
756
+ 'revoked': smithy_client_1.expectBoolean,
757
+ });
758
+ Object.assign(contents, doc);
759
+ return contents;
760
+ };
761
+ exports.de_RevokeDeviceCommand = de_RevokeDeviceCommand;
636
762
  const de_UploadPreKeysCommand = async (output, context) => {
637
763
  if (output.statusCode !== 200 && output.statusCode >= 300) {
638
764
  return de_CommandError(output, context);
@@ -1321,6 +1447,9 @@ const de_CommandError = async (output, context) => {
1321
1447
  case "NotFoundError":
1322
1448
  case "club.onehook.identity#NotFoundError":
1323
1449
  throw await de_NotFoundErrorRes(parsedOutput, context);
1450
+ case "DeviceLimitError":
1451
+ case "club.onehook.chat#DeviceLimitError":
1452
+ throw await de_DeviceLimitErrorRes(parsedOutput, context);
1324
1453
  default:
1325
1454
  const parsedBody = parsedOutput.body;
1326
1455
  return throwDefaultError({
@@ -1331,6 +1460,19 @@ const de_CommandError = async (output, context) => {
1331
1460
  }
1332
1461
  };
1333
1462
  const throwDefaultError = (0, smithy_client_1.withBaseException)(OneHookServiceException_1.OneHookServiceException);
1463
+ const de_DeviceLimitErrorRes = async (parsedOutput, context) => {
1464
+ const contents = (0, smithy_client_1.map)({});
1465
+ const data = parsedOutput.body;
1466
+ const doc = (0, smithy_client_1.take)(data, {
1467
+ 'error': smithy_client_1.expectString,
1468
+ });
1469
+ Object.assign(contents, doc);
1470
+ const exception = new models_0_1.DeviceLimitError({
1471
+ $metadata: deserializeMetadata(parsedOutput),
1472
+ ...contents
1473
+ });
1474
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1475
+ };
1334
1476
  const de_ForbiddenErrorRes = async (parsedOutput, context) => {
1335
1477
  const contents = (0, smithy_client_1.map)({});
1336
1478
  const data = parsedOutput.body;
@@ -13,6 +13,7 @@ import { GenerateUploadUrlCommand, } from "./commands/GenerateUploadUrlCommand";
13
13
  import { GetLivenessStatusCommand, } from "./commands/GetLivenessStatusCommand";
14
14
  import { GetMatchCommand, } from "./commands/GetMatchCommand";
15
15
  import { GetMyProfileCommand, } from "./commands/GetMyProfileCommand";
16
+ import { GetParticipantRegistryCommand, } from "./commands/GetParticipantRegistryCommand";
16
17
  import { GetPreferencesCommand, } from "./commands/GetPreferencesCommand";
17
18
  import { GetProfileCommand, } from "./commands/GetProfileCommand";
18
19
  import { GetStateCommand, } from "./commands/GetStateCommand";
@@ -22,11 +23,14 @@ import { IndexLocationCommand, } from "./commands/IndexLocationCommand";
22
23
  import { InitUserCommand, } from "./commands/InitUserCommand";
23
24
  import { LinkEmailCommand, } from "./commands/LinkEmailCommand";
24
25
  import { LinkSocialCommand, } from "./commands/LinkSocialCommand";
26
+ import { ListMyDevicesCommand, } from "./commands/ListMyDevicesCommand";
27
+ import { RegisterDeviceCommand, } from "./commands/RegisterDeviceCommand";
25
28
  import { RegisterPhoneCommand, } from "./commands/RegisterPhoneCommand";
26
29
  import { RemoveLocationCommand, } from "./commands/RemoveLocationCommand";
27
30
  import { RequestEmailOtpCommand, } from "./commands/RequestEmailOtpCommand";
28
31
  import { RequestPhoneOtpCommand, } from "./commands/RequestPhoneOtpCommand";
29
32
  import { RequestPhoneUpdateOtpCommand, } from "./commands/RequestPhoneUpdateOtpCommand";
33
+ import { RevokeDeviceCommand, } from "./commands/RevokeDeviceCommand";
30
34
  import { SwipeCommand, } from "./commands/SwipeCommand";
31
35
  import { UnhookCommand, } from "./commands/UnhookCommand";
32
36
  import { UnlinkSocialCommand, } from "./commands/UnlinkSocialCommand";
@@ -41,6 +45,10 @@ import { createAggregatedClient } from "@smithy/smithy-client";
41
45
  const commands = {
42
46
  ClaimPreKeyBundleCommand,
43
47
  DeleteMatchMessagesCommand,
48
+ GetParticipantRegistryCommand,
49
+ ListMyDevicesCommand,
50
+ RegisterDeviceCommand,
51
+ RevokeDeviceCommand,
44
52
  UploadPreKeysCommand,
45
53
  AuthSocialCommand,
46
54
  GenerateInviteCommand,
@@ -0,0 +1,17 @@
1
+ import { de_GetParticipantRegistryCommand, se_GetParticipantRegistryCommand, } 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 GetParticipantRegistryCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("OneHookService", "GetParticipantRegistry", {})
12
+ .n("OneHookClient", "GetParticipantRegistryCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_GetParticipantRegistryCommand)
15
+ .de(de_GetParticipantRegistryCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_ListMyDevicesCommand, se_ListMyDevicesCommand, } 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 ListMyDevicesCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("OneHookService", "ListMyDevices", {})
12
+ .n("OneHookClient", "ListMyDevicesCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_ListMyDevicesCommand)
15
+ .de(de_ListMyDevicesCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_RegisterDeviceCommand, se_RegisterDeviceCommand, } 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 RegisterDeviceCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("OneHookService", "RegisterDevice", {})
12
+ .n("OneHookClient", "RegisterDeviceCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_RegisterDeviceCommand)
15
+ .de(de_RegisterDeviceCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_RevokeDeviceCommand, se_RevokeDeviceCommand, } 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 RevokeDeviceCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("OneHookService", "RevokeDevice", {})
12
+ .n("OneHookClient", "RevokeDeviceCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_RevokeDeviceCommand)
15
+ .de(de_RevokeDeviceCommand)
16
+ .build() {
17
+ }
@@ -1,5 +1,9 @@
1
1
  export * from "./ClaimPreKeyBundleCommand";
2
2
  export * from "./DeleteMatchMessagesCommand";
3
+ export * from "./GetParticipantRegistryCommand";
4
+ export * from "./ListMyDevicesCommand";
5
+ export * from "./RegisterDeviceCommand";
6
+ export * from "./RevokeDeviceCommand";
3
7
  export * from "./UploadPreKeysCommand";
4
8
  export * from "./AuthSocialCommand";
5
9
  export * from "./GenerateInviteCommand";
@@ -55,3 +55,22 @@ export class NotFoundError extends __BaseException {
55
55
  this.error = opts.error;
56
56
  }
57
57
  }
58
+ export const Platform = {
59
+ ANDROID: "ANDROID",
60
+ IOS: "IOS",
61
+ WEB: "WEB",
62
+ };
63
+ export class DeviceLimitError extends __BaseException {
64
+ name = "DeviceLimitError";
65
+ $fault = "client";
66
+ error;
67
+ constructor(opts) {
68
+ super({
69
+ name: "DeviceLimitError",
70
+ $fault: "client",
71
+ ...opts
72
+ });
73
+ Object.setPrototypeOf(this, DeviceLimitError.prototype);
74
+ this.error = opts.error;
75
+ }
76
+ }