onehook-api-client 1.0.7 → 1.0.9
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 +0 -14
- package/dist-cjs/OneHook.js +0 -4
- package/dist-cjs/commands/index.js +0 -2
- package/dist-cjs/graphql/types.js +8 -1
- package/dist-cjs/models/models_0.js +6 -6
- package/dist-cjs/protocols/Aws_restJson1.js +2 -68
- package/dist-es/OneHook.js +0 -4
- package/dist-es/commands/index.js +0 -2
- package/dist-es/graphql/types.js +7 -0
- package/dist-es/models/models_0.js +5 -5
- package/dist-es/protocols/Aws_restJson1.js +0 -62
- package/dist-types/OneHook.d.ts +0 -14
- package/dist-types/OneHookClient.d.ts +2 -4
- package/dist-types/commands/GetParticipantRegistryCommand.d.ts +1 -2
- package/dist-types/commands/index.d.ts +0 -2
- package/dist-types/graphql/types.d.ts +55 -0
- package/dist-types/models/models_0.d.ts +21 -52
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -18
- package/package.json +1 -1
- package/dist-cjs/commands/ClaimPreKeyBundleCommand.js +0 -21
- package/dist-cjs/commands/UploadPreKeysCommand.js +0 -21
- package/dist-es/commands/ClaimPreKeyBundleCommand.js +0 -17
- package/dist-es/commands/UploadPreKeysCommand.js +0 -17
- package/dist-types/commands/ClaimPreKeyBundleCommand.d.ts +0 -88
- package/dist-types/commands/UploadPreKeysCommand.d.ts +0 -82
package/README.md
CHANGED
|
@@ -197,13 +197,6 @@ see LICENSE for more information.
|
|
|
197
197
|
|
|
198
198
|
## Client Commands (Operations List)
|
|
199
199
|
|
|
200
|
-
<details>
|
|
201
|
-
<summary>
|
|
202
|
-
ClaimPreKeyBundle
|
|
203
|
-
</summary>
|
|
204
|
-
|
|
205
|
-
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/ClaimPreKeyBundleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/ClaimPreKeyBundleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/ClaimPreKeyBundleCommandOutput/)
|
|
206
|
-
</details>
|
|
207
200
|
<details>
|
|
208
201
|
<summary>
|
|
209
202
|
DeleteMatchMessages
|
|
@@ -241,13 +234,6 @@ RevokeDevice
|
|
|
241
234
|
</details>
|
|
242
235
|
<details>
|
|
243
236
|
<summary>
|
|
244
|
-
UploadPreKeys
|
|
245
|
-
</summary>
|
|
246
|
-
|
|
247
|
-
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UploadPreKeysCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UploadPreKeysCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UploadPreKeysCommandOutput/)
|
|
248
|
-
</details>
|
|
249
|
-
<details>
|
|
250
|
-
<summary>
|
|
251
237
|
AuthSocial
|
|
252
238
|
</summary>
|
|
253
239
|
|
package/dist-cjs/OneHook.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OneHook = void 0;
|
|
4
4
|
const OneHookClient_1 = require("./OneHookClient");
|
|
5
5
|
const AuthSocialCommand_1 = require("./commands/AuthSocialCommand");
|
|
6
|
-
const ClaimPreKeyBundleCommand_1 = require("./commands/ClaimPreKeyBundleCommand");
|
|
7
6
|
const CompleteLivenessSessionCommand_1 = require("./commands/CompleteLivenessSessionCommand");
|
|
8
7
|
const CompleteOnboardingCommand_1 = require("./commands/CompleteOnboardingCommand");
|
|
9
8
|
const CreateLivenessSessionCommand_1 = require("./commands/CreateLivenessSessionCommand");
|
|
@@ -42,17 +41,14 @@ const UpdatePhoneNumberCommand_1 = require("./commands/UpdatePhoneNumberCommand"
|
|
|
42
41
|
const UpdatePreferencesCommand_1 = require("./commands/UpdatePreferencesCommand");
|
|
43
42
|
const UpdateProfileCommand_1 = require("./commands/UpdateProfileCommand");
|
|
44
43
|
const UpgradeUserCommand_1 = require("./commands/UpgradeUserCommand");
|
|
45
|
-
const UploadPreKeysCommand_1 = require("./commands/UploadPreKeysCommand");
|
|
46
44
|
const ValidateInviteCommand_1 = require("./commands/ValidateInviteCommand");
|
|
47
45
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
48
46
|
const commands = {
|
|
49
|
-
ClaimPreKeyBundleCommand: ClaimPreKeyBundleCommand_1.ClaimPreKeyBundleCommand,
|
|
50
47
|
DeleteMatchMessagesCommand: DeleteMatchMessagesCommand_1.DeleteMatchMessagesCommand,
|
|
51
48
|
GetParticipantRegistryCommand: GetParticipantRegistryCommand_1.GetParticipantRegistryCommand,
|
|
52
49
|
ListMyDevicesCommand: ListMyDevicesCommand_1.ListMyDevicesCommand,
|
|
53
50
|
RegisterDeviceCommand: RegisterDeviceCommand_1.RegisterDeviceCommand,
|
|
54
51
|
RevokeDeviceCommand: RevokeDeviceCommand_1.RevokeDeviceCommand,
|
|
55
|
-
UploadPreKeysCommand: UploadPreKeysCommand_1.UploadPreKeysCommand,
|
|
56
52
|
AuthSocialCommand: AuthSocialCommand_1.AuthSocialCommand,
|
|
57
53
|
GenerateInviteCommand: GenerateInviteCommand_1.GenerateInviteCommand,
|
|
58
54
|
GetUserCommand: GetUserCommand_1.GetUserCommand,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./ClaimPreKeyBundleCommand"), exports);
|
|
5
4
|
tslib_1.__exportStar(require("./DeleteMatchMessagesCommand"), exports);
|
|
6
5
|
tslib_1.__exportStar(require("./GetParticipantRegistryCommand"), exports);
|
|
7
6
|
tslib_1.__exportStar(require("./ListMyDevicesCommand"), exports);
|
|
8
7
|
tslib_1.__exportStar(require("./RegisterDeviceCommand"), exports);
|
|
9
8
|
tslib_1.__exportStar(require("./RevokeDeviceCommand"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./UploadPreKeysCommand"), exports);
|
|
11
9
|
tslib_1.__exportStar(require("./AuthSocialCommand"), exports);
|
|
12
10
|
tslib_1.__exportStar(require("./GenerateInviteCommand"), exports);
|
|
13
11
|
tslib_1.__exportStar(require("./GetUserCommand"), exports);
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageStatus = void 0;
|
|
3
|
+
exports.MessageStatus = exports.KeyRecoveryStatus = void 0;
|
|
4
|
+
var KeyRecoveryStatus;
|
|
5
|
+
(function (KeyRecoveryStatus) {
|
|
6
|
+
KeyRecoveryStatus["Completed"] = "COMPLETED";
|
|
7
|
+
KeyRecoveryStatus["Declined"] = "DECLINED";
|
|
8
|
+
KeyRecoveryStatus["Displaying"] = "DISPLAYING";
|
|
9
|
+
KeyRecoveryStatus["Pending"] = "PENDING";
|
|
10
|
+
})(KeyRecoveryStatus || (exports.KeyRecoveryStatus = KeyRecoveryStatus = {}));
|
|
4
11
|
var MessageStatus;
|
|
5
12
|
(function (MessageStatus) {
|
|
6
13
|
MessageStatus["Delivered"] = "DELIVERED";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeviceLimitError = exports.
|
|
3
|
+
exports.DeviceLimitError = exports.NotFoundError = exports.Platform = 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";
|
|
@@ -47,6 +47,11 @@ class InternalServerError extends OneHookServiceException_1.OneHookServiceExcept
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
exports.InternalServerError = InternalServerError;
|
|
50
|
+
exports.Platform = {
|
|
51
|
+
ANDROID: "ANDROID",
|
|
52
|
+
IOS: "IOS",
|
|
53
|
+
WEB: "WEB",
|
|
54
|
+
};
|
|
50
55
|
class NotFoundError extends OneHookServiceException_1.OneHookServiceException {
|
|
51
56
|
name = "NotFoundError";
|
|
52
57
|
$fault = "client";
|
|
@@ -62,11 +67,6 @@ class NotFoundError extends OneHookServiceException_1.OneHookServiceException {
|
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
exports.NotFoundError = NotFoundError;
|
|
65
|
-
exports.Platform = {
|
|
66
|
-
ANDROID: "ANDROID",
|
|
67
|
-
IOS: "IOS",
|
|
68
|
-
WEB: "WEB",
|
|
69
|
-
};
|
|
70
70
|
class DeviceLimitError extends OneHookServiceException_1.OneHookServiceException {
|
|
71
71
|
name = "DeviceLimitError";
|
|
72
72
|
$fault = "client";
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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 =
|
|
3
|
+
exports.de_LinkEmailCommand = exports.de_GetUserByEmailCommand = exports.de_GetUserCommand = exports.de_GenerateInviteCommand = exports.de_AuthSocialCommand = exports.de_RevokeDeviceCommand = exports.de_RegisterDeviceCommand = exports.de_ListMyDevicesCommand = exports.de_GetParticipantRegistryCommand = exports.de_DeleteMatchMessagesCommand = 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_RevokeDeviceCommand = exports.se_RegisterDeviceCommand = exports.se_ListMyDevicesCommand = exports.se_GetParticipantRegistryCommand = exports.se_DeleteMatchMessagesCommand = 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 = 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");
|
|
8
8
|
const core_2 = require("@smithy/core");
|
|
9
9
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
10
|
-
const se_ClaimPreKeyBundleCommand = async (input, context) => {
|
|
11
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
12
|
-
const headers = {};
|
|
13
|
-
b.bp("/chat/prekeys/{userId}");
|
|
14
|
-
b.p('userId', () => input.userId, '{userId}', false);
|
|
15
|
-
const query = (0, smithy_client_1.map)({
|
|
16
|
-
[_mI]: [, (0, smithy_client_1.expectNonNull)(input[_mI], `matchId`)],
|
|
17
|
-
});
|
|
18
|
-
let body;
|
|
19
|
-
b.m("POST")
|
|
20
|
-
.h(headers)
|
|
21
|
-
.q(query)
|
|
22
|
-
.b(body);
|
|
23
|
-
return b.build();
|
|
24
|
-
};
|
|
25
|
-
exports.se_ClaimPreKeyBundleCommand = se_ClaimPreKeyBundleCommand;
|
|
26
10
|
const se_DeleteMatchMessagesCommand = async (input, context) => {
|
|
27
11
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
28
12
|
const headers = {};
|
|
@@ -95,24 +79,6 @@ const se_RevokeDeviceCommand = async (input, context) => {
|
|
|
95
79
|
return b.build();
|
|
96
80
|
};
|
|
97
81
|
exports.se_RevokeDeviceCommand = se_RevokeDeviceCommand;
|
|
98
|
-
const se_UploadPreKeysCommand = async (input, context) => {
|
|
99
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
100
|
-
const headers = {
|
|
101
|
-
'content-type': 'application/json',
|
|
102
|
-
};
|
|
103
|
-
b.bp("/chat/prekeys");
|
|
104
|
-
let body;
|
|
105
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
106
|
-
'identityKey': [],
|
|
107
|
-
'oneTimePreKeys': _ => (0, smithy_client_1._json)(_),
|
|
108
|
-
'signedPreKey': [],
|
|
109
|
-
}));
|
|
110
|
-
b.m("POST")
|
|
111
|
-
.h(headers)
|
|
112
|
-
.b(body);
|
|
113
|
-
return b.build();
|
|
114
|
-
};
|
|
115
|
-
exports.se_UploadPreKeysCommand = se_UploadPreKeysCommand;
|
|
116
82
|
const se_AuthSocialCommand = async (input, context) => {
|
|
117
83
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
118
84
|
const headers = {
|
|
@@ -661,23 +627,6 @@ const se_UpgradeUserCommand = async (input, context) => {
|
|
|
661
627
|
return b.build();
|
|
662
628
|
};
|
|
663
629
|
exports.se_UpgradeUserCommand = se_UpgradeUserCommand;
|
|
664
|
-
const de_ClaimPreKeyBundleCommand = async (output, context) => {
|
|
665
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
666
|
-
return de_CommandError(output, context);
|
|
667
|
-
}
|
|
668
|
-
const contents = (0, smithy_client_1.map)({
|
|
669
|
-
$metadata: deserializeMetadata(output),
|
|
670
|
-
});
|
|
671
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
672
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
673
|
-
'identityKey': smithy_client_1.expectString,
|
|
674
|
-
'oneTimePreKey': smithy_client_1.expectString,
|
|
675
|
-
'signedPreKey': smithy_client_1.expectString,
|
|
676
|
-
});
|
|
677
|
-
Object.assign(contents, doc);
|
|
678
|
-
return contents;
|
|
679
|
-
};
|
|
680
|
-
exports.de_ClaimPreKeyBundleCommand = de_ClaimPreKeyBundleCommand;
|
|
681
630
|
const de_DeleteMatchMessagesCommand = async (output, context) => {
|
|
682
631
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
683
632
|
return de_CommandError(output, context);
|
|
@@ -759,21 +708,6 @@ const de_RevokeDeviceCommand = async (output, context) => {
|
|
|
759
708
|
return contents;
|
|
760
709
|
};
|
|
761
710
|
exports.de_RevokeDeviceCommand = de_RevokeDeviceCommand;
|
|
762
|
-
const de_UploadPreKeysCommand = async (output, context) => {
|
|
763
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
764
|
-
return de_CommandError(output, context);
|
|
765
|
-
}
|
|
766
|
-
const contents = (0, smithy_client_1.map)({
|
|
767
|
-
$metadata: deserializeMetadata(output),
|
|
768
|
-
});
|
|
769
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
770
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
771
|
-
'status': smithy_client_1.expectString,
|
|
772
|
-
});
|
|
773
|
-
Object.assign(contents, doc);
|
|
774
|
-
return contents;
|
|
775
|
-
};
|
|
776
|
-
exports.de_UploadPreKeysCommand = de_UploadPreKeysCommand;
|
|
777
711
|
const de_AuthSocialCommand = async (output, context) => {
|
|
778
712
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
779
713
|
return de_CommandError(output, context);
|
package/dist-es/OneHook.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { OneHookClient, } from "./OneHookClient";
|
|
2
2
|
import { AuthSocialCommand, } from "./commands/AuthSocialCommand";
|
|
3
|
-
import { ClaimPreKeyBundleCommand, } from "./commands/ClaimPreKeyBundleCommand";
|
|
4
3
|
import { CompleteLivenessSessionCommand, } from "./commands/CompleteLivenessSessionCommand";
|
|
5
4
|
import { CompleteOnboardingCommand, } from "./commands/CompleteOnboardingCommand";
|
|
6
5
|
import { CreateLivenessSessionCommand, } from "./commands/CreateLivenessSessionCommand";
|
|
@@ -39,17 +38,14 @@ import { UpdatePhoneNumberCommand, } from "./commands/UpdatePhoneNumberCommand";
|
|
|
39
38
|
import { UpdatePreferencesCommand, } from "./commands/UpdatePreferencesCommand";
|
|
40
39
|
import { UpdateProfileCommand, } from "./commands/UpdateProfileCommand";
|
|
41
40
|
import { UpgradeUserCommand, } from "./commands/UpgradeUserCommand";
|
|
42
|
-
import { UploadPreKeysCommand, } from "./commands/UploadPreKeysCommand";
|
|
43
41
|
import { ValidateInviteCommand, } from "./commands/ValidateInviteCommand";
|
|
44
42
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
45
43
|
const commands = {
|
|
46
|
-
ClaimPreKeyBundleCommand,
|
|
47
44
|
DeleteMatchMessagesCommand,
|
|
48
45
|
GetParticipantRegistryCommand,
|
|
49
46
|
ListMyDevicesCommand,
|
|
50
47
|
RegisterDeviceCommand,
|
|
51
48
|
RevokeDeviceCommand,
|
|
52
|
-
UploadPreKeysCommand,
|
|
53
49
|
AuthSocialCommand,
|
|
54
50
|
GenerateInviteCommand,
|
|
55
51
|
GetUserCommand,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export * from "./ClaimPreKeyBundleCommand";
|
|
2
1
|
export * from "./DeleteMatchMessagesCommand";
|
|
3
2
|
export * from "./GetParticipantRegistryCommand";
|
|
4
3
|
export * from "./ListMyDevicesCommand";
|
|
5
4
|
export * from "./RegisterDeviceCommand";
|
|
6
5
|
export * from "./RevokeDeviceCommand";
|
|
7
|
-
export * from "./UploadPreKeysCommand";
|
|
8
6
|
export * from "./AuthSocialCommand";
|
|
9
7
|
export * from "./GenerateInviteCommand";
|
|
10
8
|
export * from "./GetUserCommand";
|
package/dist-es/graphql/types.js
CHANGED
|
@@ -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,11 +60,6 @@ export class NotFoundError extends __BaseException {
|
|
|
55
60
|
this.error = opts.error;
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
|
-
export const Platform = {
|
|
59
|
-
ANDROID: "ANDROID",
|
|
60
|
-
IOS: "IOS",
|
|
61
|
-
WEB: "WEB",
|
|
62
|
-
};
|
|
63
63
|
export class DeviceLimitError extends __BaseException {
|
|
64
64
|
name = "DeviceLimitError";
|
|
65
65
|
$fault = "client";
|
|
@@ -3,21 +3,6 @@ import { BadRequestError, DeviceLimitError, ForbiddenError, InternalServerError,
|
|
|
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) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {};
|
|
9
|
-
b.bp("/chat/prekeys/{userId}");
|
|
10
|
-
b.p('userId', () => input.userId, '{userId}', false);
|
|
11
|
-
const query = map({
|
|
12
|
-
[_mI]: [, __expectNonNull(input[_mI], `matchId`)],
|
|
13
|
-
});
|
|
14
|
-
let body;
|
|
15
|
-
b.m("POST")
|
|
16
|
-
.h(headers)
|
|
17
|
-
.q(query)
|
|
18
|
-
.b(body);
|
|
19
|
-
return b.build();
|
|
20
|
-
};
|
|
21
6
|
export const se_DeleteMatchMessagesCommand = async (input, context) => {
|
|
22
7
|
const b = rb(input, context);
|
|
23
8
|
const headers = {};
|
|
@@ -85,23 +70,6 @@ export const se_RevokeDeviceCommand = async (input, context) => {
|
|
|
85
70
|
.b(body);
|
|
86
71
|
return b.build();
|
|
87
72
|
};
|
|
88
|
-
export const se_UploadPreKeysCommand = async (input, context) => {
|
|
89
|
-
const b = rb(input, context);
|
|
90
|
-
const headers = {
|
|
91
|
-
'content-type': 'application/json',
|
|
92
|
-
};
|
|
93
|
-
b.bp("/chat/prekeys");
|
|
94
|
-
let body;
|
|
95
|
-
body = JSON.stringify(take(input, {
|
|
96
|
-
'identityKey': [],
|
|
97
|
-
'oneTimePreKeys': _ => _json(_),
|
|
98
|
-
'signedPreKey': [],
|
|
99
|
-
}));
|
|
100
|
-
b.m("POST")
|
|
101
|
-
.h(headers)
|
|
102
|
-
.b(body);
|
|
103
|
-
return b.build();
|
|
104
|
-
};
|
|
105
73
|
export const se_AuthSocialCommand = async (input, context) => {
|
|
106
74
|
const b = rb(input, context);
|
|
107
75
|
const headers = {
|
|
@@ -615,22 +583,6 @@ export const se_UpgradeUserCommand = async (input, context) => {
|
|
|
615
583
|
.b(body);
|
|
616
584
|
return b.build();
|
|
617
585
|
};
|
|
618
|
-
export const de_ClaimPreKeyBundleCommand = async (output, context) => {
|
|
619
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
620
|
-
return de_CommandError(output, context);
|
|
621
|
-
}
|
|
622
|
-
const contents = map({
|
|
623
|
-
$metadata: deserializeMetadata(output),
|
|
624
|
-
});
|
|
625
|
-
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
626
|
-
const doc = take(data, {
|
|
627
|
-
'identityKey': __expectString,
|
|
628
|
-
'oneTimePreKey': __expectString,
|
|
629
|
-
'signedPreKey': __expectString,
|
|
630
|
-
});
|
|
631
|
-
Object.assign(contents, doc);
|
|
632
|
-
return contents;
|
|
633
|
-
};
|
|
634
586
|
export const de_DeleteMatchMessagesCommand = async (output, context) => {
|
|
635
587
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
636
588
|
return de_CommandError(output, context);
|
|
@@ -707,20 +659,6 @@ export const de_RevokeDeviceCommand = async (output, context) => {
|
|
|
707
659
|
Object.assign(contents, doc);
|
|
708
660
|
return contents;
|
|
709
661
|
};
|
|
710
|
-
export const de_UploadPreKeysCommand = async (output, context) => {
|
|
711
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
712
|
-
return de_CommandError(output, context);
|
|
713
|
-
}
|
|
714
|
-
const contents = map({
|
|
715
|
-
$metadata: deserializeMetadata(output),
|
|
716
|
-
});
|
|
717
|
-
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
718
|
-
const doc = take(data, {
|
|
719
|
-
'status': __expectString,
|
|
720
|
-
});
|
|
721
|
-
Object.assign(contents, doc);
|
|
722
|
-
return contents;
|
|
723
|
-
};
|
|
724
662
|
export const de_AuthSocialCommand = async (output, context) => {
|
|
725
663
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
726
664
|
return de_CommandError(output, context);
|
package/dist-types/OneHook.d.ts
CHANGED
|
@@ -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";
|
|
@@ -39,16 +38,9 @@ import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from ".
|
|
|
39
38
|
import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "./commands/UpdatePreferencesCommand";
|
|
40
39
|
import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "./commands/UpdateProfileCommand";
|
|
41
40
|
import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "./commands/UpgradeUserCommand";
|
|
42
|
-
import { UploadPreKeysCommandInput, UploadPreKeysCommandOutput } from "./commands/UploadPreKeysCommand";
|
|
43
41
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "./commands/ValidateInviteCommand";
|
|
44
42
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
45
43
|
export interface OneHook {
|
|
46
|
-
/**
|
|
47
|
-
* @see {@link ClaimPreKeyBundleCommand}
|
|
48
|
-
*/
|
|
49
|
-
claimPreKeyBundle(args: ClaimPreKeyBundleCommandInput, options?: __HttpHandlerOptions): Promise<ClaimPreKeyBundleCommandOutput>;
|
|
50
|
-
claimPreKeyBundle(args: ClaimPreKeyBundleCommandInput, cb: (err: any, data?: ClaimPreKeyBundleCommandOutput) => void): void;
|
|
51
|
-
claimPreKeyBundle(args: ClaimPreKeyBundleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ClaimPreKeyBundleCommandOutput) => void): void;
|
|
52
44
|
/**
|
|
53
45
|
* @see {@link DeleteMatchMessagesCommand}
|
|
54
46
|
*/
|
|
@@ -80,12 +72,6 @@ export interface OneHook {
|
|
|
80
72
|
revokeDevice(args: RevokeDeviceCommandInput, options?: __HttpHandlerOptions): Promise<RevokeDeviceCommandOutput>;
|
|
81
73
|
revokeDevice(args: RevokeDeviceCommandInput, cb: (err: any, data?: RevokeDeviceCommandOutput) => void): void;
|
|
82
74
|
revokeDevice(args: RevokeDeviceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RevokeDeviceCommandOutput) => void): void;
|
|
83
|
-
/**
|
|
84
|
-
* @see {@link UploadPreKeysCommand}
|
|
85
|
-
*/
|
|
86
|
-
uploadPreKeys(args: UploadPreKeysCommandInput, options?: __HttpHandlerOptions): Promise<UploadPreKeysCommandOutput>;
|
|
87
|
-
uploadPreKeys(args: UploadPreKeysCommandInput, cb: (err: any, data?: UploadPreKeysCommandOutput) => void): void;
|
|
88
|
-
uploadPreKeys(args: UploadPreKeysCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UploadPreKeysCommandOutput) => void): void;
|
|
89
75
|
/**
|
|
90
76
|
* @see {@link AuthSocialCommand}
|
|
91
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";
|
|
@@ -39,7 +38,6 @@ import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from ".
|
|
|
39
38
|
import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "./commands/UpdatePreferencesCommand";
|
|
40
39
|
import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "./commands/UpdateProfileCommand";
|
|
41
40
|
import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "./commands/UpgradeUserCommand";
|
|
42
|
-
import { UploadPreKeysCommandInput, UploadPreKeysCommandOutput } from "./commands/UploadPreKeysCommand";
|
|
43
41
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "./commands/ValidateInviteCommand";
|
|
44
42
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
45
43
|
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
@@ -53,11 +51,11 @@ export { __Client };
|
|
|
53
51
|
/**
|
|
54
52
|
* @public
|
|
55
53
|
*/
|
|
56
|
-
export type ServiceInputTypes = AuthSocialCommandInput |
|
|
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;
|
|
57
55
|
/**
|
|
58
56
|
* @public
|
|
59
57
|
*/
|
|
60
|
-
export type ServiceOutputTypes = AuthSocialCommandOutput |
|
|
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;
|
|
61
59
|
/**
|
|
62
60
|
* @public
|
|
63
61
|
*/
|
|
@@ -28,8 +28,7 @@ declare const GetParticipantRegistryCommand_base: {
|
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
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
|
|
32
|
-
* exposes only public key material.
|
|
31
|
+
* participant's devices. Authorized by a shared `matchId`; exposes only public key material.
|
|
33
32
|
* @example
|
|
34
33
|
* Use a bare-bones client and the command you need to make an API call.
|
|
35
34
|
* ```javascript
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export * from "./ClaimPreKeyBundleCommand";
|
|
2
1
|
export * from "./DeleteMatchMessagesCommand";
|
|
3
2
|
export * from "./GetParticipantRegistryCommand";
|
|
4
3
|
export * from "./ListMyDevicesCommand";
|
|
5
4
|
export * from "./RegisterDeviceCommand";
|
|
6
5
|
export * from "./RevokeDeviceCommand";
|
|
7
|
-
export * from "./UploadPreKeysCommand";
|
|
8
6
|
export * from "./AuthSocialCommand";
|
|
9
7
|
export * from "./GenerateInviteCommand";
|
|
10
8
|
export * from "./GetUserCommand";
|
|
@@ -33,6 +33,28 @@ export type DeletedMessage = {
|
|
|
33
33
|
messageId: Scalars['ID']['output'];
|
|
34
34
|
timestamp: Scalars['AWSTimestamp']['output'];
|
|
35
35
|
};
|
|
36
|
+
export type KeyRecoverySession = {
|
|
37
|
+
__typename?: 'KeyRecoverySession';
|
|
38
|
+
challenge: Scalars['String']['output'];
|
|
39
|
+
createdAt: Scalars['AWSTimestamp']['output'];
|
|
40
|
+
expiresAt: Scalars['AWSTimestamp']['output'];
|
|
41
|
+
sessionId: Scalars['ID']['output'];
|
|
42
|
+
sourceDeviceId: Scalars['ID']['output'];
|
|
43
|
+
status: KeyRecoveryStatus;
|
|
44
|
+
targetDeviceId: Scalars['ID']['output'];
|
|
45
|
+
targetEphemeralPublicKey: Scalars['String']['output'];
|
|
46
|
+
userId: Scalars['ID']['output'];
|
|
47
|
+
};
|
|
48
|
+
export declare enum KeyRecoveryStatus {
|
|
49
|
+
/** The new device scanned and imported the keys. */
|
|
50
|
+
Completed = "COMPLETED",
|
|
51
|
+
/** The user refused on the chosen device, or cancelled on the new one. */
|
|
52
|
+
Declined = "DECLINED",
|
|
53
|
+
/** The chosen device has verified user intent and is showing the QR code. */
|
|
54
|
+
Displaying = "DISPLAYING",
|
|
55
|
+
/** The new device has asked; the chosen device has not responded yet. */
|
|
56
|
+
Pending = "PENDING"
|
|
57
|
+
}
|
|
36
58
|
export type Message = {
|
|
37
59
|
__typename?: 'Message';
|
|
38
60
|
ciphertext: Scalars['String']['output'];
|
|
@@ -62,7 +84,9 @@ export type Mutation = {
|
|
|
62
84
|
deleteMessage?: Maybe<DeletedMessage>;
|
|
63
85
|
markAsDelivered?: Maybe<MessageReceipt>;
|
|
64
86
|
markAsRead?: Maybe<MessageReceipt>;
|
|
87
|
+
requestKeyRecovery?: Maybe<KeyRecoverySession>;
|
|
65
88
|
sendMessage?: Maybe<Message>;
|
|
89
|
+
updateKeyRecovery?: Maybe<KeyRecoverySession>;
|
|
66
90
|
};
|
|
67
91
|
export type MutationDeleteMessageArgs = {
|
|
68
92
|
matchId: Scalars['ID']['input'];
|
|
@@ -80,25 +104,56 @@ export type MutationMarkAsReadArgs = {
|
|
|
80
104
|
timestamp: Scalars['AWSTimestamp']['input'];
|
|
81
105
|
userId: Scalars['String']['input'];
|
|
82
106
|
};
|
|
107
|
+
export type MutationRequestKeyRecoveryArgs = {
|
|
108
|
+
challenge: Scalars['String']['input'];
|
|
109
|
+
sourceDeviceId: Scalars['ID']['input'];
|
|
110
|
+
targetDeviceId: Scalars['ID']['input'];
|
|
111
|
+
targetEphemeralPublicKey: Scalars['String']['input'];
|
|
112
|
+
};
|
|
83
113
|
export type MutationSendMessageArgs = {
|
|
84
114
|
ciphertext: Scalars['String']['input'];
|
|
85
115
|
matchId: Scalars['ID']['input'];
|
|
86
116
|
senderId: Scalars['String']['input'];
|
|
87
117
|
};
|
|
118
|
+
export type MutationUpdateKeyRecoveryArgs = {
|
|
119
|
+
sessionId: Scalars['ID']['input'];
|
|
120
|
+
sourceDeviceId: Scalars['ID']['input'];
|
|
121
|
+
status: KeyRecoveryStatus;
|
|
122
|
+
targetDeviceId: Scalars['ID']['input'];
|
|
123
|
+
};
|
|
88
124
|
export type Query = {
|
|
89
125
|
__typename?: 'Query';
|
|
126
|
+
getKeyRecoveryRequests?: Maybe<Array<Maybe<KeyRecoverySession>>>;
|
|
127
|
+
getKeyRecoverySession?: Maybe<KeyRecoverySession>;
|
|
90
128
|
getMessages?: Maybe<Array<Maybe<Message>>>;
|
|
91
129
|
};
|
|
130
|
+
export type QueryGetKeyRecoveryRequestsArgs = {
|
|
131
|
+
sourceDeviceId: Scalars['ID']['input'];
|
|
132
|
+
};
|
|
133
|
+
export type QueryGetKeyRecoverySessionArgs = {
|
|
134
|
+
sourceDeviceId: Scalars['ID']['input'];
|
|
135
|
+
targetDeviceId: Scalars['ID']['input'];
|
|
136
|
+
};
|
|
92
137
|
export type QueryGetMessagesArgs = {
|
|
93
138
|
after?: InputMaybe<Scalars['AWSTimestamp']['input']>;
|
|
94
139
|
matchId: Scalars['ID']['input'];
|
|
95
140
|
};
|
|
96
141
|
export type Subscription = {
|
|
97
142
|
__typename?: 'Subscription';
|
|
143
|
+
onKeyRecoveryRequested?: Maybe<KeyRecoverySession>;
|
|
144
|
+
onKeyRecoveryUpdated?: Maybe<KeyRecoverySession>;
|
|
98
145
|
onMessageDeleted?: Maybe<DeletedMessage>;
|
|
99
146
|
onMessageStatusUpdate?: Maybe<MessageReceipt>;
|
|
100
147
|
onNewMessage?: Maybe<Message>;
|
|
101
148
|
};
|
|
149
|
+
export type SubscriptionOnKeyRecoveryRequestedArgs = {
|
|
150
|
+
sourceDeviceId: Scalars['ID']['input'];
|
|
151
|
+
userId: Scalars['ID']['input'];
|
|
152
|
+
};
|
|
153
|
+
export type SubscriptionOnKeyRecoveryUpdatedArgs = {
|
|
154
|
+
targetDeviceId: Scalars['ID']['input'];
|
|
155
|
+
userId: Scalars['ID']['input'];
|
|
156
|
+
};
|
|
102
157
|
export type SubscriptionOnMessageDeletedArgs = {
|
|
103
158
|
matchId: Scalars['ID']['input'];
|
|
104
159
|
};
|
|
@@ -3,25 +3,14 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-cli
|
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
7
|
-
userId: string | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* The match the caller shares with the target user; used to authorize the claim.
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
6
|
+
export interface DeleteMatchMessagesRequest {
|
|
12
7
|
matchId: string | undefined;
|
|
13
8
|
}
|
|
14
9
|
/**
|
|
15
10
|
* @public
|
|
16
11
|
*/
|
|
17
|
-
export interface
|
|
18
|
-
|
|
19
|
-
signedPreKey: string | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Omitted when the target user has exhausted their one-time pre-keys.
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
24
|
-
oneTimePreKey?: string | undefined;
|
|
12
|
+
export interface DeleteMatchMessagesResponse {
|
|
13
|
+
deleted: number | undefined;
|
|
25
14
|
}
|
|
26
15
|
/**
|
|
27
16
|
* @public
|
|
@@ -59,30 +48,6 @@ export declare class InternalServerError extends __BaseException {
|
|
|
59
48
|
*/
|
|
60
49
|
constructor(opts: __ExceptionOptionType<InternalServerError, __BaseException>);
|
|
61
50
|
}
|
|
62
|
-
/**
|
|
63
|
-
* @public
|
|
64
|
-
*/
|
|
65
|
-
export declare class NotFoundError extends __BaseException {
|
|
66
|
-
readonly name: "NotFoundError";
|
|
67
|
-
readonly $fault: "client";
|
|
68
|
-
error: string | undefined;
|
|
69
|
-
/**
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
|
-
constructor(opts: __ExceptionOptionType<NotFoundError, __BaseException>);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* @public
|
|
76
|
-
*/
|
|
77
|
-
export interface DeleteMatchMessagesRequest {
|
|
78
|
-
matchId: string | undefined;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* @public
|
|
82
|
-
*/
|
|
83
|
-
export interface DeleteMatchMessagesResponse {
|
|
84
|
-
deleted: number | undefined;
|
|
85
|
-
}
|
|
86
51
|
/**
|
|
87
52
|
* @public
|
|
88
53
|
*/
|
|
@@ -176,6 +141,18 @@ export interface GetParticipantRegistryResponse {
|
|
|
176
141
|
*/
|
|
177
142
|
accountHistoryKey?: AccountHistoryKey | undefined;
|
|
178
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
147
|
+
export declare class NotFoundError extends __BaseException {
|
|
148
|
+
readonly name: "NotFoundError";
|
|
149
|
+
readonly $fault: "client";
|
|
150
|
+
error: string | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
constructor(opts: __ExceptionOptionType<NotFoundError, __BaseException>);
|
|
155
|
+
}
|
|
179
156
|
/**
|
|
180
157
|
* @public
|
|
181
158
|
*/
|
|
@@ -278,20 +255,6 @@ export interface RevokeDeviceResponse {
|
|
|
278
255
|
deviceId: string | undefined;
|
|
279
256
|
revoked: boolean | undefined;
|
|
280
257
|
}
|
|
281
|
-
/**
|
|
282
|
-
* @public
|
|
283
|
-
*/
|
|
284
|
-
export interface UploadPreKeysRequest {
|
|
285
|
-
identityKey: string | undefined;
|
|
286
|
-
signedPreKey: string | undefined;
|
|
287
|
-
oneTimePreKeys: (string)[] | undefined;
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* @public
|
|
291
|
-
*/
|
|
292
|
-
export interface StatusResponse {
|
|
293
|
-
status: string | undefined;
|
|
294
|
-
}
|
|
295
258
|
/**
|
|
296
259
|
* @public
|
|
297
260
|
*/
|
|
@@ -544,6 +507,12 @@ export interface UserPreferencesResponse {
|
|
|
544
507
|
maxDistanceKm?: number | undefined;
|
|
545
508
|
genders?: (string)[] | undefined;
|
|
546
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* @public
|
|
512
|
+
*/
|
|
513
|
+
export interface StatusResponse {
|
|
514
|
+
status: string | undefined;
|
|
515
|
+
}
|
|
547
516
|
/**
|
|
548
517
|
* @public
|
|
549
518
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AuthSocialCommandInput, AuthSocialCommandOutput } from "../commands/AuthSocialCommand";
|
|
2
|
-
import { ClaimPreKeyBundleCommandInput, ClaimPreKeyBundleCommandOutput } from "../commands/ClaimPreKeyBundleCommand";
|
|
3
2
|
import { CompleteLivenessSessionCommandInput, CompleteLivenessSessionCommandOutput } from "../commands/CompleteLivenessSessionCommand";
|
|
4
3
|
import { CompleteOnboardingCommandInput, CompleteOnboardingCommandOutput } from "../commands/CompleteOnboardingCommand";
|
|
5
4
|
import { CreateLivenessSessionCommandInput, CreateLivenessSessionCommandOutput } from "../commands/CreateLivenessSessionCommand";
|
|
@@ -38,14 +37,9 @@ import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from ".
|
|
|
38
37
|
import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "../commands/UpdatePreferencesCommand";
|
|
39
38
|
import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "../commands/UpdateProfileCommand";
|
|
40
39
|
import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "../commands/UpgradeUserCommand";
|
|
41
|
-
import { UploadPreKeysCommandInput, UploadPreKeysCommandOutput } from "../commands/UploadPreKeysCommand";
|
|
42
40
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "../commands/ValidateInviteCommand";
|
|
43
41
|
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
44
42
|
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
45
|
-
/**
|
|
46
|
-
* serializeAws_restJson1ClaimPreKeyBundleCommand
|
|
47
|
-
*/
|
|
48
|
-
export declare const se_ClaimPreKeyBundleCommand: (input: ClaimPreKeyBundleCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
49
43
|
/**
|
|
50
44
|
* serializeAws_restJson1DeleteMatchMessagesCommand
|
|
51
45
|
*/
|
|
@@ -66,10 +60,6 @@ export declare const se_RegisterDeviceCommand: (input: RegisterDeviceCommandInpu
|
|
|
66
60
|
* serializeAws_restJson1RevokeDeviceCommand
|
|
67
61
|
*/
|
|
68
62
|
export declare const se_RevokeDeviceCommand: (input: RevokeDeviceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
69
|
-
/**
|
|
70
|
-
* serializeAws_restJson1UploadPreKeysCommand
|
|
71
|
-
*/
|
|
72
|
-
export declare const se_UploadPreKeysCommand: (input: UploadPreKeysCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
73
63
|
/**
|
|
74
64
|
* serializeAws_restJson1AuthSocialCommand
|
|
75
65
|
*/
|
|
@@ -210,10 +200,6 @@ export declare const se_UnhookCommand: (input: UnhookCommandInput, context: __Se
|
|
|
210
200
|
* serializeAws_restJson1UpgradeUserCommand
|
|
211
201
|
*/
|
|
212
202
|
export declare const se_UpgradeUserCommand: (input: UpgradeUserCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
213
|
-
/**
|
|
214
|
-
* deserializeAws_restJson1ClaimPreKeyBundleCommand
|
|
215
|
-
*/
|
|
216
|
-
export declare const de_ClaimPreKeyBundleCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ClaimPreKeyBundleCommandOutput>;
|
|
217
203
|
/**
|
|
218
204
|
* deserializeAws_restJson1DeleteMatchMessagesCommand
|
|
219
205
|
*/
|
|
@@ -234,10 +220,6 @@ export declare const de_RegisterDeviceCommand: (output: __HttpResponse, context:
|
|
|
234
220
|
* deserializeAws_restJson1RevokeDeviceCommand
|
|
235
221
|
*/
|
|
236
222
|
export declare const de_RevokeDeviceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RevokeDeviceCommandOutput>;
|
|
237
|
-
/**
|
|
238
|
-
* deserializeAws_restJson1UploadPreKeysCommand
|
|
239
|
-
*/
|
|
240
|
-
export declare const de_UploadPreKeysCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UploadPreKeysCommandOutput>;
|
|
241
223
|
/**
|
|
242
224
|
* deserializeAws_restJson1AuthSocialCommand
|
|
243
225
|
*/
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ClaimPreKeyBundleCommand = 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 ClaimPreKeyBundleCommand 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", "ClaimPreKeyBundle", {})
|
|
15
|
-
.n("OneHookClient", "ClaimPreKeyBundleCommand")
|
|
16
|
-
.f(void 0, void 0)
|
|
17
|
-
.ser(Aws_restJson1_1.se_ClaimPreKeyBundleCommand)
|
|
18
|
-
.de(Aws_restJson1_1.de_ClaimPreKeyBundleCommand)
|
|
19
|
-
.build() {
|
|
20
|
-
}
|
|
21
|
-
exports.ClaimPreKeyBundleCommand = ClaimPreKeyBundleCommand;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UploadPreKeysCommand = 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 UploadPreKeysCommand 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", "UploadPreKeys", {})
|
|
15
|
-
.n("OneHookClient", "UploadPreKeysCommand")
|
|
16
|
-
.f(void 0, void 0)
|
|
17
|
-
.ser(Aws_restJson1_1.se_UploadPreKeysCommand)
|
|
18
|
-
.de(Aws_restJson1_1.de_UploadPreKeysCommand)
|
|
19
|
-
.build() {
|
|
20
|
-
}
|
|
21
|
-
exports.UploadPreKeysCommand = UploadPreKeysCommand;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { de_ClaimPreKeyBundleCommand, se_ClaimPreKeyBundleCommand, } 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 ClaimPreKeyBundleCommand extends $Command.classBuilder()
|
|
6
|
-
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
-
})
|
|
11
|
-
.s("OneHookService", "ClaimPreKeyBundle", {})
|
|
12
|
-
.n("OneHookClient", "ClaimPreKeyBundleCommand")
|
|
13
|
-
.f(void 0, void 0)
|
|
14
|
-
.ser(se_ClaimPreKeyBundleCommand)
|
|
15
|
-
.de(de_ClaimPreKeyBundleCommand)
|
|
16
|
-
.build() {
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { de_UploadPreKeysCommand, se_UploadPreKeysCommand, } 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 UploadPreKeysCommand extends $Command.classBuilder()
|
|
6
|
-
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
-
})
|
|
11
|
-
.s("OneHookService", "UploadPreKeys", {})
|
|
12
|
-
.n("OneHookClient", "UploadPreKeysCommand")
|
|
13
|
-
.f(void 0, void 0)
|
|
14
|
-
.ser(se_UploadPreKeysCommand)
|
|
15
|
-
.de(de_UploadPreKeysCommand)
|
|
16
|
-
.build() {
|
|
17
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
-
import { ClaimPreKeyBundleRequest, ClaimPreKeyBundleResponse } 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 ClaimPreKeyBundleCommand}.
|
|
14
|
-
*/
|
|
15
|
-
export interface ClaimPreKeyBundleCommandInput extends ClaimPreKeyBundleRequest {
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*
|
|
20
|
-
* The output of {@link ClaimPreKeyBundleCommand}.
|
|
21
|
-
*/
|
|
22
|
-
export interface ClaimPreKeyBundleCommandOutput extends ClaimPreKeyBundleResponse, __MetadataBearer {
|
|
23
|
-
}
|
|
24
|
-
declare const ClaimPreKeyBundleCommand_base: {
|
|
25
|
-
new (input: ClaimPreKeyBundleCommandInput): import("@smithy/smithy-client").CommandImpl<ClaimPreKeyBundleCommandInput, ClaimPreKeyBundleCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
-
new (__0_0: ClaimPreKeyBundleCommandInput): import("@smithy/smithy-client").CommandImpl<ClaimPreKeyBundleCommandInput, ClaimPreKeyBundleCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
-
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Claim a pre-key bundle for a target user to initiate an E2EE (X3DH) session.
|
|
31
|
-
*
|
|
32
|
-
* This is intentionally a NON-idempotent POST — fulfilling the request consumes
|
|
33
|
-
* (deletes) one of the target user's one-time pre-keys. It must not be modeled as a
|
|
34
|
-
* GET: doing so would make it eligible for prefetch, caching, and automatic retries,
|
|
35
|
-
* which could burn through a user's one-time pre-keys and break session starts.
|
|
36
|
-
* @example
|
|
37
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
38
|
-
* ```javascript
|
|
39
|
-
* import { OneHookClient, ClaimPreKeyBundleCommand } from "onehook-api-client"; // ES Modules import
|
|
40
|
-
* // const { OneHookClient, ClaimPreKeyBundleCommand } = require("onehook-api-client"); // CommonJS import
|
|
41
|
-
* const client = new OneHookClient(config);
|
|
42
|
-
* const input = { // ClaimPreKeyBundleRequest
|
|
43
|
-
* userId: "STRING_VALUE", // required
|
|
44
|
-
* matchId: "STRING_VALUE", // required
|
|
45
|
-
* };
|
|
46
|
-
* const command = new ClaimPreKeyBundleCommand(input);
|
|
47
|
-
* const response = await client.send(command);
|
|
48
|
-
* // { // ClaimPreKeyBundleResponse
|
|
49
|
-
* // identityKey: "STRING_VALUE", // required
|
|
50
|
-
* // signedPreKey: "STRING_VALUE", // required
|
|
51
|
-
* // oneTimePreKey: "STRING_VALUE",
|
|
52
|
-
* // };
|
|
53
|
-
*
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* @param ClaimPreKeyBundleCommandInput - {@link ClaimPreKeyBundleCommandInput}
|
|
57
|
-
* @returns {@link ClaimPreKeyBundleCommandOutput}
|
|
58
|
-
* @see {@link ClaimPreKeyBundleCommandInput} for command's `input` shape.
|
|
59
|
-
* @see {@link ClaimPreKeyBundleCommandOutput} for command's `response` shape.
|
|
60
|
-
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
61
|
-
*
|
|
62
|
-
* @throws {@link BadRequestError} (client fault)
|
|
63
|
-
*
|
|
64
|
-
* @throws {@link ForbiddenError} (client fault)
|
|
65
|
-
*
|
|
66
|
-
* @throws {@link NotFoundError} (client fault)
|
|
67
|
-
*
|
|
68
|
-
* @throws {@link InternalServerError} (server fault)
|
|
69
|
-
*
|
|
70
|
-
* @throws {@link OneHookServiceException}
|
|
71
|
-
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* @public
|
|
75
|
-
*/
|
|
76
|
-
export declare class ClaimPreKeyBundleCommand extends ClaimPreKeyBundleCommand_base {
|
|
77
|
-
/** @internal type navigation helper, not in runtime. */
|
|
78
|
-
protected static __types: {
|
|
79
|
-
api: {
|
|
80
|
-
input: ClaimPreKeyBundleRequest;
|
|
81
|
-
output: ClaimPreKeyBundleResponse;
|
|
82
|
-
};
|
|
83
|
-
sdk: {
|
|
84
|
-
input: ClaimPreKeyBundleCommandInput;
|
|
85
|
-
output: ClaimPreKeyBundleCommandOutput;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
-
import { StatusResponse, UploadPreKeysRequest } 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 UploadPreKeysCommand}.
|
|
14
|
-
*/
|
|
15
|
-
export interface UploadPreKeysCommandInput extends UploadPreKeysRequest {
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*
|
|
20
|
-
* The output of {@link UploadPreKeysCommand}.
|
|
21
|
-
*/
|
|
22
|
-
export interface UploadPreKeysCommandOutput extends StatusResponse, __MetadataBearer {
|
|
23
|
-
}
|
|
24
|
-
declare const UploadPreKeysCommand_base: {
|
|
25
|
-
new (input: UploadPreKeysCommandInput): import("@smithy/smithy-client").CommandImpl<UploadPreKeysCommandInput, UploadPreKeysCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
-
new (__0_0: UploadPreKeysCommandInput): import("@smithy/smithy-client").CommandImpl<UploadPreKeysCommandInput, UploadPreKeysCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
-
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Upload (or replenish) the caller's own E2EE pre-keys.
|
|
31
|
-
* @example
|
|
32
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
-
* ```javascript
|
|
34
|
-
* import { OneHookClient, UploadPreKeysCommand } from "onehook-api-client"; // ES Modules import
|
|
35
|
-
* // const { OneHookClient, UploadPreKeysCommand } = require("onehook-api-client"); // CommonJS import
|
|
36
|
-
* const client = new OneHookClient(config);
|
|
37
|
-
* const input = { // UploadPreKeysRequest
|
|
38
|
-
* identityKey: "STRING_VALUE", // required
|
|
39
|
-
* signedPreKey: "STRING_VALUE", // required
|
|
40
|
-
* oneTimePreKeys: [ // StringList // required
|
|
41
|
-
* "STRING_VALUE",
|
|
42
|
-
* ],
|
|
43
|
-
* };
|
|
44
|
-
* const command = new UploadPreKeysCommand(input);
|
|
45
|
-
* const response = await client.send(command);
|
|
46
|
-
* // { // StatusResponse
|
|
47
|
-
* // status: "STRING_VALUE", // required
|
|
48
|
-
* // };
|
|
49
|
-
*
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @param UploadPreKeysCommandInput - {@link UploadPreKeysCommandInput}
|
|
53
|
-
* @returns {@link UploadPreKeysCommandOutput}
|
|
54
|
-
* @see {@link UploadPreKeysCommandInput} for command's `input` shape.
|
|
55
|
-
* @see {@link UploadPreKeysCommandOutput} for command's `response` shape.
|
|
56
|
-
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
57
|
-
*
|
|
58
|
-
* @throws {@link BadRequestError} (client fault)
|
|
59
|
-
*
|
|
60
|
-
* @throws {@link ForbiddenError} (client fault)
|
|
61
|
-
*
|
|
62
|
-
* @throws {@link InternalServerError} (server fault)
|
|
63
|
-
*
|
|
64
|
-
* @throws {@link OneHookServiceException}
|
|
65
|
-
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* @public
|
|
69
|
-
*/
|
|
70
|
-
export declare class UploadPreKeysCommand extends UploadPreKeysCommand_base {
|
|
71
|
-
/** @internal type navigation helper, not in runtime. */
|
|
72
|
-
protected static __types: {
|
|
73
|
-
api: {
|
|
74
|
-
input: UploadPreKeysRequest;
|
|
75
|
-
output: StatusResponse;
|
|
76
|
-
};
|
|
77
|
-
sdk: {
|
|
78
|
-
input: UploadPreKeysCommandInput;
|
|
79
|
-
output: UploadPreKeysCommandOutput;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
}
|