onehook-api-client 1.0.6 → 1.0.8

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 (33) hide show
  1. package/README.md +27 -13
  2. package/dist-cjs/OneHook.js +8 -4
  3. package/dist-cjs/commands/GetParticipantRegistryCommand.js +21 -0
  4. package/dist-cjs/commands/{UploadPreKeysCommand.js → ListMyDevicesCommand.js} +7 -7
  5. package/dist-cjs/commands/{ClaimPreKeyBundleCommand.js → RegisterDeviceCommand.js} +7 -7
  6. package/dist-cjs/commands/RevokeDeviceCommand.js +21 -0
  7. package/dist-cjs/commands/index.js +4 -2
  8. package/dist-cjs/graphql/types.js +8 -1
  9. package/dist-cjs/models/models_0.js +21 -1
  10. package/dist-cjs/protocols/Aws_restJson1.js +104 -28
  11. package/dist-es/OneHook.js +8 -4
  12. package/dist-es/commands/GetParticipantRegistryCommand.js +17 -0
  13. package/dist-es/commands/{UploadPreKeysCommand.js → ListMyDevicesCommand.js} +6 -6
  14. package/dist-es/commands/RegisterDeviceCommand.js +17 -0
  15. package/dist-es/commands/RevokeDeviceCommand.js +17 -0
  16. package/dist-es/commands/index.js +4 -2
  17. package/dist-es/graphql/types.js +7 -0
  18. package/dist-es/models/models_0.js +19 -0
  19. package/dist-es/protocols/Aws_restJson1.js +93 -21
  20. package/dist-types/OneHook.d.ts +27 -12
  21. package/dist-types/OneHookClient.d.ts +6 -4
  22. package/dist-types/commands/GetParticipantRegistryCommand.d.ts +98 -0
  23. package/dist-types/commands/ListMyDevicesCommand.d.ts +89 -0
  24. package/dist-types/commands/RegisterDeviceCommand.d.ts +112 -0
  25. package/dist-types/commands/RevokeDeviceCommand.d.ts +81 -0
  26. package/dist-types/commands/index.d.ts +4 -2
  27. package/dist-types/graphql/types.d.ts +51 -0
  28. package/dist-types/models/models_0.d.ts +188 -24
  29. package/dist-types/protocols/Aws_restJson1.d.ts +32 -14
  30. package/package.json +1 -1
  31. package/dist-es/commands/ClaimPreKeyBundleCommand.js +0 -17
  32. package/dist-types/commands/ClaimPreKeyBundleCommand.d.ts +0 -88
  33. package/dist-types/commands/UploadPreKeysCommand.d.ts +0 -82
@@ -1,17 +1,17 @@
1
- import { de_UploadPreKeysCommand, se_UploadPreKeysCommand, } from "../protocols/Aws_restJson1";
1
+ import { de_ListMyDevicesCommand, se_ListMyDevicesCommand, } from "../protocols/Aws_restJson1";
2
2
  import { getSerdePlugin } from "@smithy/middleware-serde";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
4
  export { $Command };
5
- export class UploadPreKeysCommand extends $Command.classBuilder()
5
+ export class ListMyDevicesCommand extends $Command.classBuilder()
6
6
  .m(function (Command, cs, config, o) {
7
7
  return [
8
8
  getSerdePlugin(config, this.serialize, this.deserialize),
9
9
  ];
10
10
  })
11
- .s("OneHookService", "UploadPreKeys", {})
12
- .n("OneHookClient", "UploadPreKeysCommand")
11
+ .s("OneHookService", "ListMyDevices", {})
12
+ .n("OneHookClient", "ListMyDevicesCommand")
13
13
  .f(void 0, void 0)
14
- .ser(se_UploadPreKeysCommand)
15
- .de(de_UploadPreKeysCommand)
14
+ .ser(se_ListMyDevicesCommand)
15
+ .de(de_ListMyDevicesCommand)
16
16
  .build() {
17
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,6 +1,8 @@
1
- export * from "./ClaimPreKeyBundleCommand";
2
1
  export * from "./DeleteMatchMessagesCommand";
3
- export * from "./UploadPreKeysCommand";
2
+ export * from "./GetParticipantRegistryCommand";
3
+ export * from "./ListMyDevicesCommand";
4
+ export * from "./RegisterDeviceCommand";
5
+ export * from "./RevokeDeviceCommand";
4
6
  export * from "./AuthSocialCommand";
5
7
  export * from "./GenerateInviteCommand";
6
8
  export * from "./GetUserCommand";
@@ -1,3 +1,10 @@
1
+ export var KeyRecoveryStatus;
2
+ (function (KeyRecoveryStatus) {
3
+ KeyRecoveryStatus["Completed"] = "COMPLETED";
4
+ KeyRecoveryStatus["Declined"] = "DECLINED";
5
+ KeyRecoveryStatus["Displaying"] = "DISPLAYING";
6
+ KeyRecoveryStatus["Pending"] = "PENDING";
7
+ })(KeyRecoveryStatus || (KeyRecoveryStatus = {}));
1
8
  export var MessageStatus;
2
9
  (function (MessageStatus) {
3
10
  MessageStatus["Delivered"] = "DELIVERED";
@@ -41,6 +41,11 @@ export class InternalServerError extends __BaseException {
41
41
  this.error = opts.error;
42
42
  }
43
43
  }
44
+ export const Platform = {
45
+ ANDROID: "ANDROID",
46
+ IOS: "IOS",
47
+ WEB: "WEB",
48
+ };
44
49
  export class NotFoundError extends __BaseException {
45
50
  name = "NotFoundError";
46
51
  $fault = "client";
@@ -55,3 +60,17 @@ export class NotFoundError extends __BaseException {
55
60
  this.error = opts.error;
56
61
  }
57
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
+ }
@@ -1,51 +1,75 @@
1
1
  import { OneHookServiceException as __BaseException } from "../models/OneHookServiceException";
2
- import { BadRequestError, ForbiddenError, InternalServerError, NotFoundError, } from "../models/models_0";
2
+ import { BadRequestError, DeviceLimitError, ForbiddenError, InternalServerError, NotFoundError, } from "../models/models_0";
3
3
  import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
4
4
  import { requestBuilder as rb } from "@smithy/core";
5
5
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
6
- export const se_ClaimPreKeyBundleCommand = async (input, context) => {
6
+ export const se_DeleteMatchMessagesCommand = async (input, context) => {
7
7
  const b = rb(input, context);
8
8
  const headers = {};
9
- b.bp("/chat/prekeys/{userId}");
9
+ b.bp("/chat/match/{matchId}");
10
+ b.p('matchId', () => input.matchId, '{matchId}', false);
11
+ let body;
12
+ b.m("DELETE")
13
+ .h(headers)
14
+ .b(body);
15
+ return b.build();
16
+ };
17
+ export const se_GetParticipantRegistryCommand = async (input, context) => {
18
+ const b = rb(input, context);
19
+ const headers = {};
20
+ b.bp("/chat/registry/{userId}");
10
21
  b.p('userId', () => input.userId, '{userId}', false);
11
22
  const query = map({
12
23
  [_mI]: [, __expectNonNull(input[_mI], `matchId`)],
13
24
  });
14
25
  let body;
15
- b.m("POST")
26
+ b.m("GET")
16
27
  .h(headers)
17
28
  .q(query)
18
29
  .b(body);
19
30
  return b.build();
20
31
  };
21
- export const se_DeleteMatchMessagesCommand = async (input, context) => {
32
+ export const se_ListMyDevicesCommand = async (input, context) => {
22
33
  const b = rb(input, context);
23
34
  const headers = {};
24
- b.bp("/chat/match/{matchId}");
25
- b.p('matchId', () => input.matchId, '{matchId}', false);
35
+ b.bp("/chat/devices");
26
36
  let body;
27
- b.m("DELETE")
37
+ b.m("GET")
28
38
  .h(headers)
29
39
  .b(body);
30
40
  return b.build();
31
41
  };
32
- export const se_UploadPreKeysCommand = async (input, context) => {
42
+ export const se_RegisterDeviceCommand = async (input, context) => {
33
43
  const b = rb(input, context);
34
44
  const headers = {
35
45
  'content-type': 'application/json',
36
46
  };
37
- b.bp("/chat/prekeys");
47
+ b.bp("/chat/devices");
38
48
  let body;
39
49
  body = JSON.stringify(take(input, {
40
- 'identityKey': [],
41
- 'oneTimePreKeys': _ => _json(_),
42
- 'signedPreKey': [],
50
+ 'accountHistoryKey': _ => _json(_),
51
+ 'deviceId': [],
52
+ 'displayName': [],
53
+ 'maxEnvelopeVersion': [],
54
+ 'platform': [],
55
+ 'publicKey': [],
43
56
  }));
44
57
  b.m("POST")
45
58
  .h(headers)
46
59
  .b(body);
47
60
  return b.build();
48
61
  };
62
+ export const se_RevokeDeviceCommand = async (input, context) => {
63
+ const b = rb(input, context);
64
+ const headers = {};
65
+ b.bp("/chat/devices/{deviceId}");
66
+ b.p('deviceId', () => input.deviceId, '{deviceId}', false);
67
+ let body;
68
+ b.m("DELETE")
69
+ .h(headers)
70
+ .b(body);
71
+ return b.build();
72
+ };
49
73
  export const se_AuthSocialCommand = async (input, context) => {
50
74
  const b = rb(input, context);
51
75
  const headers = {
@@ -559,7 +583,7 @@ export const se_UpgradeUserCommand = async (input, context) => {
559
583
  .b(body);
560
584
  return b.build();
561
585
  };
562
- export const de_ClaimPreKeyBundleCommand = async (output, context) => {
586
+ export const de_DeleteMatchMessagesCommand = async (output, context) => {
563
587
  if (output.statusCode !== 200 && output.statusCode >= 300) {
564
588
  return de_CommandError(output, context);
565
589
  }
@@ -568,14 +592,12 @@ export const de_ClaimPreKeyBundleCommand = async (output, context) => {
568
592
  });
569
593
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
570
594
  const doc = take(data, {
571
- 'identityKey': __expectString,
572
- 'oneTimePreKey': __expectString,
573
- 'signedPreKey': __expectString,
595
+ 'deleted': __expectInt32,
574
596
  });
575
597
  Object.assign(contents, doc);
576
598
  return contents;
577
599
  };
578
- export const de_DeleteMatchMessagesCommand = async (output, context) => {
600
+ export const de_GetParticipantRegistryCommand = async (output, context) => {
579
601
  if (output.statusCode !== 200 && output.statusCode >= 300) {
580
602
  return de_CommandError(output, context);
581
603
  }
@@ -584,12 +606,14 @@ export const de_DeleteMatchMessagesCommand = async (output, context) => {
584
606
  });
585
607
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
586
608
  const doc = take(data, {
587
- 'deleted': __expectInt32,
609
+ 'accountHistoryKey': _json,
610
+ 'devices': _json,
611
+ 'userId': __expectString,
588
612
  });
589
613
  Object.assign(contents, doc);
590
614
  return contents;
591
615
  };
592
- export const de_UploadPreKeysCommand = async (output, context) => {
616
+ export const de_ListMyDevicesCommand = async (output, context) => {
593
617
  if (output.statusCode !== 200 && output.statusCode >= 300) {
594
618
  return de_CommandError(output, context);
595
619
  }
@@ -598,7 +622,39 @@ export const de_UploadPreKeysCommand = async (output, context) => {
598
622
  });
599
623
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
600
624
  const doc = take(data, {
601
- 'status': __expectString,
625
+ 'accountHistoryKey': _json,
626
+ 'devices': _json,
627
+ });
628
+ Object.assign(contents, doc);
629
+ return contents;
630
+ };
631
+ export const de_RegisterDeviceCommand = async (output, context) => {
632
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
633
+ return de_CommandError(output, context);
634
+ }
635
+ const contents = map({
636
+ $metadata: deserializeMetadata(output),
637
+ });
638
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
639
+ const doc = take(data, {
640
+ 'accountHistoryKey': _json,
641
+ 'device': _json,
642
+ 'ownsAccountHistoryKey': __expectBoolean,
643
+ });
644
+ Object.assign(contents, doc);
645
+ return contents;
646
+ };
647
+ export const de_RevokeDeviceCommand = async (output, context) => {
648
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
649
+ return de_CommandError(output, context);
650
+ }
651
+ const contents = map({
652
+ $metadata: deserializeMetadata(output),
653
+ });
654
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
655
+ const doc = take(data, {
656
+ 'deviceId': __expectString,
657
+ 'revoked': __expectBoolean,
602
658
  });
603
659
  Object.assign(contents, doc);
604
660
  return contents;
@@ -1241,6 +1297,9 @@ const de_CommandError = async (output, context) => {
1241
1297
  case "NotFoundError":
1242
1298
  case "club.onehook.identity#NotFoundError":
1243
1299
  throw await de_NotFoundErrorRes(parsedOutput, context);
1300
+ case "DeviceLimitError":
1301
+ case "club.onehook.chat#DeviceLimitError":
1302
+ throw await de_DeviceLimitErrorRes(parsedOutput, context);
1244
1303
  default:
1245
1304
  const parsedBody = parsedOutput.body;
1246
1305
  return throwDefaultError({
@@ -1251,6 +1310,19 @@ const de_CommandError = async (output, context) => {
1251
1310
  }
1252
1311
  };
1253
1312
  const throwDefaultError = withBaseException(__BaseException);
1313
+ const de_DeviceLimitErrorRes = async (parsedOutput, context) => {
1314
+ const contents = map({});
1315
+ const data = parsedOutput.body;
1316
+ const doc = take(data, {
1317
+ 'error': __expectString,
1318
+ });
1319
+ Object.assign(contents, doc);
1320
+ const exception = new DeviceLimitError({
1321
+ $metadata: deserializeMetadata(parsedOutput),
1322
+ ...contents
1323
+ });
1324
+ return __decorateServiceException(exception, parsedOutput.body);
1325
+ };
1254
1326
  const de_ForbiddenErrorRes = async (parsedOutput, context) => {
1255
1327
  const contents = map({});
1256
1328
  const data = parsedOutput.body;
@@ -1,6 +1,5 @@
1
1
  import { OneHookClient } from "./OneHookClient";
2
2
  import { AuthSocialCommandInput, AuthSocialCommandOutput } from "./commands/AuthSocialCommand";
3
- import { ClaimPreKeyBundleCommandInput, ClaimPreKeyBundleCommandOutput } from "./commands/ClaimPreKeyBundleCommand";
4
3
  import { CompleteLivenessSessionCommandInput, CompleteLivenessSessionCommandOutput } from "./commands/CompleteLivenessSessionCommand";
5
4
  import { CompleteOnboardingCommandInput, CompleteOnboardingCommandOutput } from "./commands/CompleteOnboardingCommand";
6
5
  import { CreateLivenessSessionCommandInput, CreateLivenessSessionCommandOutput } from "./commands/CreateLivenessSessionCommand";
@@ -13,6 +12,7 @@ import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from ".
13
12
  import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "./commands/GetLivenessStatusCommand";
14
13
  import { GetMatchCommandInput, GetMatchCommandOutput } from "./commands/GetMatchCommand";
15
14
  import { GetMyProfileCommandInput, GetMyProfileCommandOutput } from "./commands/GetMyProfileCommand";
15
+ import { GetParticipantRegistryCommandInput, GetParticipantRegistryCommandOutput } from "./commands/GetParticipantRegistryCommand";
16
16
  import { GetPreferencesCommandInput, GetPreferencesCommandOutput } from "./commands/GetPreferencesCommand";
17
17
  import { GetProfileCommandInput, GetProfileCommandOutput } from "./commands/GetProfileCommand";
18
18
  import { GetStateCommandInput, GetStateCommandOutput } from "./commands/GetStateCommand";
@@ -22,11 +22,14 @@ import { IndexLocationCommandInput, IndexLocationCommandOutput } from "./command
22
22
  import { InitUserCommandInput, InitUserCommandOutput } from "./commands/InitUserCommand";
23
23
  import { LinkEmailCommandInput, LinkEmailCommandOutput } from "./commands/LinkEmailCommand";
24
24
  import { LinkSocialCommandInput, LinkSocialCommandOutput } from "./commands/LinkSocialCommand";
25
+ import { ListMyDevicesCommandInput, ListMyDevicesCommandOutput } from "./commands/ListMyDevicesCommand";
26
+ import { RegisterDeviceCommandInput, RegisterDeviceCommandOutput } from "./commands/RegisterDeviceCommand";
25
27
  import { RegisterPhoneCommandInput, RegisterPhoneCommandOutput } from "./commands/RegisterPhoneCommand";
26
28
  import { RemoveLocationCommandInput, RemoveLocationCommandOutput } from "./commands/RemoveLocationCommand";
27
29
  import { RequestEmailOtpCommandInput, RequestEmailOtpCommandOutput } from "./commands/RequestEmailOtpCommand";
28
30
  import { RequestPhoneOtpCommandInput, RequestPhoneOtpCommandOutput } from "./commands/RequestPhoneOtpCommand";
29
31
  import { RequestPhoneUpdateOtpCommandInput, RequestPhoneUpdateOtpCommandOutput } from "./commands/RequestPhoneUpdateOtpCommand";
32
+ import { RevokeDeviceCommandInput, RevokeDeviceCommandOutput } from "./commands/RevokeDeviceCommand";
30
33
  import { SwipeCommandInput, SwipeCommandOutput } from "./commands/SwipeCommand";
31
34
  import { UnhookCommandInput, UnhookCommandOutput } from "./commands/UnhookCommand";
32
35
  import { UnlinkSocialCommandInput, UnlinkSocialCommandOutput } from "./commands/UnlinkSocialCommand";
@@ -35,16 +38,9 @@ import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from ".
35
38
  import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "./commands/UpdatePreferencesCommand";
36
39
  import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "./commands/UpdateProfileCommand";
37
40
  import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "./commands/UpgradeUserCommand";
38
- import { UploadPreKeysCommandInput, UploadPreKeysCommandOutput } from "./commands/UploadPreKeysCommand";
39
41
  import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "./commands/ValidateInviteCommand";
40
42
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
41
43
  export interface OneHook {
42
- /**
43
- * @see {@link ClaimPreKeyBundleCommand}
44
- */
45
- claimPreKeyBundle(args: ClaimPreKeyBundleCommandInput, options?: __HttpHandlerOptions): Promise<ClaimPreKeyBundleCommandOutput>;
46
- claimPreKeyBundle(args: ClaimPreKeyBundleCommandInput, cb: (err: any, data?: ClaimPreKeyBundleCommandOutput) => void): void;
47
- claimPreKeyBundle(args: ClaimPreKeyBundleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ClaimPreKeyBundleCommandOutput) => void): void;
48
44
  /**
49
45
  * @see {@link DeleteMatchMessagesCommand}
50
46
  */
@@ -52,11 +48,30 @@ export interface OneHook {
52
48
  deleteMatchMessages(args: DeleteMatchMessagesCommandInput, cb: (err: any, data?: DeleteMatchMessagesCommandOutput) => void): void;
53
49
  deleteMatchMessages(args: DeleteMatchMessagesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteMatchMessagesCommandOutput) => void): void;
54
50
  /**
55
- * @see {@link UploadPreKeysCommand}
51
+ * @see {@link GetParticipantRegistryCommand}
52
+ */
53
+ getParticipantRegistry(args: GetParticipantRegistryCommandInput, options?: __HttpHandlerOptions): Promise<GetParticipantRegistryCommandOutput>;
54
+ getParticipantRegistry(args: GetParticipantRegistryCommandInput, cb: (err: any, data?: GetParticipantRegistryCommandOutput) => void): void;
55
+ getParticipantRegistry(args: GetParticipantRegistryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetParticipantRegistryCommandOutput) => void): void;
56
+ /**
57
+ * @see {@link ListMyDevicesCommand}
58
+ */
59
+ listMyDevices(): Promise<ListMyDevicesCommandOutput>;
60
+ listMyDevices(args: ListMyDevicesCommandInput, options?: __HttpHandlerOptions): Promise<ListMyDevicesCommandOutput>;
61
+ listMyDevices(args: ListMyDevicesCommandInput, cb: (err: any, data?: ListMyDevicesCommandOutput) => void): void;
62
+ listMyDevices(args: ListMyDevicesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListMyDevicesCommandOutput) => void): void;
63
+ /**
64
+ * @see {@link RegisterDeviceCommand}
65
+ */
66
+ registerDevice(args: RegisterDeviceCommandInput, options?: __HttpHandlerOptions): Promise<RegisterDeviceCommandOutput>;
67
+ registerDevice(args: RegisterDeviceCommandInput, cb: (err: any, data?: RegisterDeviceCommandOutput) => void): void;
68
+ registerDevice(args: RegisterDeviceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RegisterDeviceCommandOutput) => void): void;
69
+ /**
70
+ * @see {@link RevokeDeviceCommand}
56
71
  */
57
- uploadPreKeys(args: UploadPreKeysCommandInput, options?: __HttpHandlerOptions): Promise<UploadPreKeysCommandOutput>;
58
- uploadPreKeys(args: UploadPreKeysCommandInput, cb: (err: any, data?: UploadPreKeysCommandOutput) => void): void;
59
- uploadPreKeys(args: UploadPreKeysCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UploadPreKeysCommandOutput) => void): void;
72
+ revokeDevice(args: RevokeDeviceCommandInput, options?: __HttpHandlerOptions): Promise<RevokeDeviceCommandOutput>;
73
+ revokeDevice(args: RevokeDeviceCommandInput, cb: (err: any, data?: RevokeDeviceCommandOutput) => void): void;
74
+ revokeDevice(args: RevokeDeviceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RevokeDeviceCommandOutput) => void): void;
60
75
  /**
61
76
  * @see {@link AuthSocialCommand}
62
77
  */
@@ -1,6 +1,5 @@
1
1
  import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
2
2
  import { AuthSocialCommandInput, AuthSocialCommandOutput } from "./commands/AuthSocialCommand";
3
- import { ClaimPreKeyBundleCommandInput, ClaimPreKeyBundleCommandOutput } from "./commands/ClaimPreKeyBundleCommand";
4
3
  import { CompleteLivenessSessionCommandInput, CompleteLivenessSessionCommandOutput } from "./commands/CompleteLivenessSessionCommand";
5
4
  import { CompleteOnboardingCommandInput, CompleteOnboardingCommandOutput } from "./commands/CompleteOnboardingCommand";
6
5
  import { CreateLivenessSessionCommandInput, CreateLivenessSessionCommandOutput } from "./commands/CreateLivenessSessionCommand";
@@ -13,6 +12,7 @@ import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from ".
13
12
  import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "./commands/GetLivenessStatusCommand";
14
13
  import { GetMatchCommandInput, GetMatchCommandOutput } from "./commands/GetMatchCommand";
15
14
  import { GetMyProfileCommandInput, GetMyProfileCommandOutput } from "./commands/GetMyProfileCommand";
15
+ import { GetParticipantRegistryCommandInput, GetParticipantRegistryCommandOutput } from "./commands/GetParticipantRegistryCommand";
16
16
  import { GetPreferencesCommandInput, GetPreferencesCommandOutput } from "./commands/GetPreferencesCommand";
17
17
  import { GetProfileCommandInput, GetProfileCommandOutput } from "./commands/GetProfileCommand";
18
18
  import { GetStateCommandInput, GetStateCommandOutput } from "./commands/GetStateCommand";
@@ -22,11 +22,14 @@ import { IndexLocationCommandInput, IndexLocationCommandOutput } from "./command
22
22
  import { InitUserCommandInput, InitUserCommandOutput } from "./commands/InitUserCommand";
23
23
  import { LinkEmailCommandInput, LinkEmailCommandOutput } from "./commands/LinkEmailCommand";
24
24
  import { LinkSocialCommandInput, LinkSocialCommandOutput } from "./commands/LinkSocialCommand";
25
+ import { ListMyDevicesCommandInput, ListMyDevicesCommandOutput } from "./commands/ListMyDevicesCommand";
26
+ import { RegisterDeviceCommandInput, RegisterDeviceCommandOutput } from "./commands/RegisterDeviceCommand";
25
27
  import { RegisterPhoneCommandInput, RegisterPhoneCommandOutput } from "./commands/RegisterPhoneCommand";
26
28
  import { RemoveLocationCommandInput, RemoveLocationCommandOutput } from "./commands/RemoveLocationCommand";
27
29
  import { RequestEmailOtpCommandInput, RequestEmailOtpCommandOutput } from "./commands/RequestEmailOtpCommand";
28
30
  import { RequestPhoneOtpCommandInput, RequestPhoneOtpCommandOutput } from "./commands/RequestPhoneOtpCommand";
29
31
  import { RequestPhoneUpdateOtpCommandInput, RequestPhoneUpdateOtpCommandOutput } from "./commands/RequestPhoneUpdateOtpCommand";
32
+ import { RevokeDeviceCommandInput, RevokeDeviceCommandOutput } from "./commands/RevokeDeviceCommand";
30
33
  import { SwipeCommandInput, SwipeCommandOutput } from "./commands/SwipeCommand";
31
34
  import { UnhookCommandInput, UnhookCommandOutput } from "./commands/UnhookCommand";
32
35
  import { UnlinkSocialCommandInput, UnlinkSocialCommandOutput } from "./commands/UnlinkSocialCommand";
@@ -35,7 +38,6 @@ import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from ".
35
38
  import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "./commands/UpdatePreferencesCommand";
36
39
  import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "./commands/UpdateProfileCommand";
37
40
  import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "./commands/UpgradeUserCommand";
38
- import { UploadPreKeysCommandInput, UploadPreKeysCommandOutput } from "./commands/UploadPreKeysCommand";
39
41
  import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "./commands/ValidateInviteCommand";
40
42
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
41
43
  import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
@@ -49,11 +51,11 @@ export { __Client };
49
51
  /**
50
52
  * @public
51
53
  */
52
- export type ServiceInputTypes = AuthSocialCommandInput | ClaimPreKeyBundleCommandInput | CompleteLivenessSessionCommandInput | CompleteOnboardingCommandInput | CreateLivenessSessionCommandInput | DeleteMatchMessagesCommandInput | DeleteProfileCommandInput | DiscoverCommandInput | GenerateDownloadUrlCommandInput | GenerateInviteCommandInput | GenerateUploadUrlCommandInput | GetLivenessStatusCommandInput | GetMatchCommandInput | GetMyProfileCommandInput | GetPreferencesCommandInput | GetProfileCommandInput | GetStateCommandInput | GetUserByEmailCommandInput | GetUserCommandInput | IndexLocationCommandInput | InitUserCommandInput | LinkEmailCommandInput | LinkSocialCommandInput | RegisterPhoneCommandInput | RemoveLocationCommandInput | RequestEmailOtpCommandInput | RequestPhoneOtpCommandInput | RequestPhoneUpdateOtpCommandInput | SwipeCommandInput | UnhookCommandInput | UnlinkSocialCommandInput | UpdateEntitlementsCommandInput | UpdatePhoneNumberCommandInput | UpdatePreferencesCommandInput | UpdateProfileCommandInput | UpgradeUserCommandInput | UploadPreKeysCommandInput | ValidateInviteCommandInput;
54
+ export type ServiceInputTypes = AuthSocialCommandInput | CompleteLivenessSessionCommandInput | CompleteOnboardingCommandInput | CreateLivenessSessionCommandInput | DeleteMatchMessagesCommandInput | DeleteProfileCommandInput | DiscoverCommandInput | GenerateDownloadUrlCommandInput | GenerateInviteCommandInput | GenerateUploadUrlCommandInput | GetLivenessStatusCommandInput | GetMatchCommandInput | GetMyProfileCommandInput | GetParticipantRegistryCommandInput | GetPreferencesCommandInput | GetProfileCommandInput | GetStateCommandInput | GetUserByEmailCommandInput | GetUserCommandInput | IndexLocationCommandInput | InitUserCommandInput | LinkEmailCommandInput | LinkSocialCommandInput | ListMyDevicesCommandInput | RegisterDeviceCommandInput | RegisterPhoneCommandInput | RemoveLocationCommandInput | RequestEmailOtpCommandInput | RequestPhoneOtpCommandInput | RequestPhoneUpdateOtpCommandInput | RevokeDeviceCommandInput | SwipeCommandInput | UnhookCommandInput | UnlinkSocialCommandInput | UpdateEntitlementsCommandInput | UpdatePhoneNumberCommandInput | UpdatePreferencesCommandInput | UpdateProfileCommandInput | UpgradeUserCommandInput | ValidateInviteCommandInput;
53
55
  /**
54
56
  * @public
55
57
  */
56
- export type ServiceOutputTypes = AuthSocialCommandOutput | ClaimPreKeyBundleCommandOutput | CompleteLivenessSessionCommandOutput | CompleteOnboardingCommandOutput | CreateLivenessSessionCommandOutput | DeleteMatchMessagesCommandOutput | DeleteProfileCommandOutput | DiscoverCommandOutput | GenerateDownloadUrlCommandOutput | GenerateInviteCommandOutput | GenerateUploadUrlCommandOutput | GetLivenessStatusCommandOutput | GetMatchCommandOutput | GetMyProfileCommandOutput | GetPreferencesCommandOutput | GetProfileCommandOutput | GetStateCommandOutput | GetUserByEmailCommandOutput | GetUserCommandOutput | IndexLocationCommandOutput | InitUserCommandOutput | LinkEmailCommandOutput | LinkSocialCommandOutput | RegisterPhoneCommandOutput | RemoveLocationCommandOutput | RequestEmailOtpCommandOutput | RequestPhoneOtpCommandOutput | RequestPhoneUpdateOtpCommandOutput | SwipeCommandOutput | UnhookCommandOutput | UnlinkSocialCommandOutput | UpdateEntitlementsCommandOutput | UpdatePhoneNumberCommandOutput | UpdatePreferencesCommandOutput | UpdateProfileCommandOutput | UpgradeUserCommandOutput | UploadPreKeysCommandOutput | ValidateInviteCommandOutput;
58
+ export type ServiceOutputTypes = AuthSocialCommandOutput | CompleteLivenessSessionCommandOutput | CompleteOnboardingCommandOutput | CreateLivenessSessionCommandOutput | DeleteMatchMessagesCommandOutput | DeleteProfileCommandOutput | DiscoverCommandOutput | GenerateDownloadUrlCommandOutput | GenerateInviteCommandOutput | GenerateUploadUrlCommandOutput | GetLivenessStatusCommandOutput | GetMatchCommandOutput | GetMyProfileCommandOutput | GetParticipantRegistryCommandOutput | GetPreferencesCommandOutput | GetProfileCommandOutput | GetStateCommandOutput | GetUserByEmailCommandOutput | GetUserCommandOutput | IndexLocationCommandOutput | InitUserCommandOutput | LinkEmailCommandOutput | LinkSocialCommandOutput | ListMyDevicesCommandOutput | RegisterDeviceCommandOutput | RegisterPhoneCommandOutput | RemoveLocationCommandOutput | RequestEmailOtpCommandOutput | RequestPhoneOtpCommandOutput | RequestPhoneUpdateOtpCommandOutput | RevokeDeviceCommandOutput | SwipeCommandOutput | UnhookCommandOutput | UnlinkSocialCommandOutput | UpdateEntitlementsCommandOutput | UpdatePhoneNumberCommandOutput | UpdatePreferencesCommandOutput | UpdateProfileCommandOutput | UpgradeUserCommandOutput | ValidateInviteCommandOutput;
57
59
  /**
58
60
  * @public
59
61
  */
@@ -0,0 +1,98 @@
1
+ import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
+ import { GetParticipantRegistryRequest, GetParticipantRegistryResponse } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetParticipantRegistryCommand}.
14
+ */
15
+ export interface GetParticipantRegistryCommandInput extends GetParticipantRegistryRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetParticipantRegistryCommand}.
21
+ */
22
+ export interface GetParticipantRegistryCommandOutput extends GetParticipantRegistryResponse, __MetadataBearer {
23
+ }
24
+ declare const GetParticipantRegistryCommand_base: {
25
+ new (input: GetParticipantRegistryCommandInput): import("@smithy/smithy-client").CommandImpl<GetParticipantRegistryCommandInput, GetParticipantRegistryCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: GetParticipantRegistryCommandInput): import("@smithy/smithy-client").CommandImpl<GetParticipantRegistryCommandInput, GetParticipantRegistryCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Fetch a match participant's device registry so the caller can encrypt to every one of the
31
+ * participant's devices. Authorized by a shared `matchId`; exposes only public key material.
32
+ * @example
33
+ * Use a bare-bones client and the command you need to make an API call.
34
+ * ```javascript
35
+ * import { OneHookClient, GetParticipantRegistryCommand } from "onehook-api-client"; // ES Modules import
36
+ * // const { OneHookClient, GetParticipantRegistryCommand } = require("onehook-api-client"); // CommonJS import
37
+ * const client = new OneHookClient(config);
38
+ * const input = { // GetParticipantRegistryRequest
39
+ * userId: "STRING_VALUE", // required
40
+ * matchId: "STRING_VALUE", // required
41
+ * };
42
+ * const command = new GetParticipantRegistryCommand(input);
43
+ * const response = await client.send(command);
44
+ * // { // GetParticipantRegistryResponse
45
+ * // userId: "STRING_VALUE", // required
46
+ * // devices: [ // DeviceList // required
47
+ * // { // Device
48
+ * // deviceId: "STRING_VALUE", // required
49
+ * // publicKey: "STRING_VALUE", // required
50
+ * // platform: "IOS" || "ANDROID" || "WEB", // required
51
+ * // displayName: "STRING_VALUE",
52
+ * // maxEnvelopeVersion: Number("int"), // required
53
+ * // createdAt: Number("long"), // required
54
+ * // lastSeenAt: Number("long"), // required
55
+ * // current: true || false, // required
56
+ * // },
57
+ * // ],
58
+ * // accountHistoryKey: { // AccountHistoryKey
59
+ * // keyId: "STRING_VALUE", // required
60
+ * // publicKey: "STRING_VALUE", // required
61
+ * // },
62
+ * // };
63
+ *
64
+ * ```
65
+ *
66
+ * @param GetParticipantRegistryCommandInput - {@link GetParticipantRegistryCommandInput}
67
+ * @returns {@link GetParticipantRegistryCommandOutput}
68
+ * @see {@link GetParticipantRegistryCommandInput} for command's `input` shape.
69
+ * @see {@link GetParticipantRegistryCommandOutput} for command's `response` shape.
70
+ * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
71
+ *
72
+ * @throws {@link BadRequestError} (client fault)
73
+ *
74
+ * @throws {@link ForbiddenError} (client fault)
75
+ *
76
+ * @throws {@link NotFoundError} (client fault)
77
+ *
78
+ * @throws {@link InternalServerError} (server fault)
79
+ *
80
+ * @throws {@link OneHookServiceException}
81
+ * <p>Base exception class for all service exceptions from OneHook service.</p>
82
+ *
83
+ *
84
+ * @public
85
+ */
86
+ export declare class GetParticipantRegistryCommand extends GetParticipantRegistryCommand_base {
87
+ /** @internal type navigation helper, not in runtime. */
88
+ protected static __types: {
89
+ api: {
90
+ input: GetParticipantRegistryRequest;
91
+ output: GetParticipantRegistryResponse;
92
+ };
93
+ sdk: {
94
+ input: GetParticipantRegistryCommandInput;
95
+ output: GetParticipantRegistryCommandOutput;
96
+ };
97
+ };
98
+ }
@@ -0,0 +1,89 @@
1
+ import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
+ import { ListMyDevicesRequest, ListMyDevicesResponse } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListMyDevicesCommand}.
14
+ */
15
+ export interface ListMyDevicesCommandInput extends ListMyDevicesRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListMyDevicesCommand}.
21
+ */
22
+ export interface ListMyDevicesCommandOutput extends ListMyDevicesResponse, __MetadataBearer {
23
+ }
24
+ declare const ListMyDevicesCommand_base: {
25
+ new (input: ListMyDevicesCommandInput): import("@smithy/smithy-client").CommandImpl<ListMyDevicesCommandInput, ListMyDevicesCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [ListMyDevicesCommandInput]): import("@smithy/smithy-client").CommandImpl<ListMyDevicesCommandInput, ListMyDevicesCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * List the authenticated caller's own registered devices (and account history key, if any).
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { OneHookClient, ListMyDevicesCommand } from "onehook-api-client"; // ES Modules import
35
+ * // const { OneHookClient, ListMyDevicesCommand } = require("onehook-api-client"); // CommonJS import
36
+ * const client = new OneHookClient(config);
37
+ * const input = {};
38
+ * const command = new ListMyDevicesCommand(input);
39
+ * const response = await client.send(command);
40
+ * // { // ListMyDevicesResponse
41
+ * // devices: [ // DeviceList // required
42
+ * // { // Device
43
+ * // deviceId: "STRING_VALUE", // required
44
+ * // publicKey: "STRING_VALUE", // required
45
+ * // platform: "IOS" || "ANDROID" || "WEB", // required
46
+ * // displayName: "STRING_VALUE",
47
+ * // maxEnvelopeVersion: Number("int"), // required
48
+ * // createdAt: Number("long"), // required
49
+ * // lastSeenAt: Number("long"), // required
50
+ * // current: true || false, // required
51
+ * // },
52
+ * // ],
53
+ * // accountHistoryKey: { // AccountHistoryKey
54
+ * // keyId: "STRING_VALUE", // required
55
+ * // publicKey: "STRING_VALUE", // required
56
+ * // },
57
+ * // };
58
+ *
59
+ * ```
60
+ *
61
+ * @param ListMyDevicesCommandInput - {@link ListMyDevicesCommandInput}
62
+ * @returns {@link ListMyDevicesCommandOutput}
63
+ * @see {@link ListMyDevicesCommandInput} for command's `input` shape.
64
+ * @see {@link ListMyDevicesCommandOutput} for command's `response` shape.
65
+ * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
66
+ *
67
+ * @throws {@link ForbiddenError} (client fault)
68
+ *
69
+ * @throws {@link InternalServerError} (server fault)
70
+ *
71
+ * @throws {@link OneHookServiceException}
72
+ * <p>Base exception class for all service exceptions from OneHook service.</p>
73
+ *
74
+ *
75
+ * @public
76
+ */
77
+ export declare class ListMyDevicesCommand extends ListMyDevicesCommand_base {
78
+ /** @internal type navigation helper, not in runtime. */
79
+ protected static __types: {
80
+ api: {
81
+ input: {};
82
+ output: ListMyDevicesResponse;
83
+ };
84
+ sdk: {
85
+ input: ListMyDevicesCommandInput;
86
+ output: ListMyDevicesCommandOutput;
87
+ };
88
+ };
89
+ }