onehook-api-client 1.0.8 → 1.0.10
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 +7 -0
- package/dist-cjs/OneHook.js +2 -0
- package/dist-cjs/commands/UpdateUsernameCommand.js +21 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +37 -2
- package/dist-es/OneHook.js +2 -0
- package/dist-es/commands/UpdateUsernameCommand.js +17 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +33 -0
- package/dist-types/OneHook.d.ts +7 -0
- package/dist-types/OneHookClient.d.ts +3 -2
- package/dist-types/commands/GetUserByEmailCommand.d.ts +1 -0
- package/dist-types/commands/GetUserCommand.d.ts +1 -0
- package/dist-types/commands/RegisterPhoneCommand.d.ts +1 -0
- package/dist-types/commands/UpdateUsernameCommand.d.ts +77 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/graphql/types.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +22 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -325,6 +325,13 @@ UpdatePhoneNumber
|
|
|
325
325
|
</details>
|
|
326
326
|
<details>
|
|
327
327
|
<summary>
|
|
328
|
+
UpdateUsername
|
|
329
|
+
</summary>
|
|
330
|
+
|
|
331
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UpdateUsernameCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdateUsernameCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdateUsernameCommandOutput/)
|
|
332
|
+
</details>
|
|
333
|
+
<details>
|
|
334
|
+
<summary>
|
|
328
335
|
ValidateInvite
|
|
329
336
|
</summary>
|
|
330
337
|
|
package/dist-cjs/OneHook.js
CHANGED
|
@@ -40,6 +40,7 @@ const UpdateEntitlementsCommand_1 = require("./commands/UpdateEntitlementsComman
|
|
|
40
40
|
const UpdatePhoneNumberCommand_1 = require("./commands/UpdatePhoneNumberCommand");
|
|
41
41
|
const UpdatePreferencesCommand_1 = require("./commands/UpdatePreferencesCommand");
|
|
42
42
|
const UpdateProfileCommand_1 = require("./commands/UpdateProfileCommand");
|
|
43
|
+
const UpdateUsernameCommand_1 = require("./commands/UpdateUsernameCommand");
|
|
43
44
|
const UpgradeUserCommand_1 = require("./commands/UpgradeUserCommand");
|
|
44
45
|
const ValidateInviteCommand_1 = require("./commands/ValidateInviteCommand");
|
|
45
46
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
@@ -62,6 +63,7 @@ const commands = {
|
|
|
62
63
|
UnlinkSocialCommand: UnlinkSocialCommand_1.UnlinkSocialCommand,
|
|
63
64
|
UpdateEntitlementsCommand: UpdateEntitlementsCommand_1.UpdateEntitlementsCommand,
|
|
64
65
|
UpdatePhoneNumberCommand: UpdatePhoneNumberCommand_1.UpdatePhoneNumberCommand,
|
|
66
|
+
UpdateUsernameCommand: UpdateUsernameCommand_1.UpdateUsernameCommand,
|
|
65
67
|
ValidateInviteCommand: ValidateInviteCommand_1.ValidateInviteCommand,
|
|
66
68
|
DiscoverCommand: DiscoverCommand_1.DiscoverCommand,
|
|
67
69
|
GetPreferencesCommand: GetPreferencesCommand_1.GetPreferencesCommand,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateUsernameCommand = 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 UpdateUsernameCommand 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", "UpdateUsername", {})
|
|
15
|
+
.n("OneHookClient", "UpdateUsernameCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_UpdateUsernameCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_UpdateUsernameCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.UpdateUsernameCommand = UpdateUsernameCommand;
|
|
@@ -19,6 +19,7 @@ tslib_1.__exportStar(require("./RequestPhoneUpdateOtpCommand"), exports);
|
|
|
19
19
|
tslib_1.__exportStar(require("./UnlinkSocialCommand"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./UpdateEntitlementsCommand"), exports);
|
|
21
21
|
tslib_1.__exportStar(require("./UpdatePhoneNumberCommand"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./UpdateUsernameCommand"), exports);
|
|
22
23
|
tslib_1.__exportStar(require("./ValidateInviteCommand"), exports);
|
|
23
24
|
tslib_1.__exportStar(require("./DiscoverCommand"), exports);
|
|
24
25
|
tslib_1.__exportStar(require("./GetPreferencesCommand"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
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 = void 0;
|
|
3
|
+
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_UpdateUsernameCommand = 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_UpdateUsernameCommand = exports.de_UpdatePhoneNumberCommand = exports.de_UpdateEntitlementsCommand = exports.de_UnlinkSocialCommand = exports.de_RequestPhoneUpdateOtpCommand = exports.de_RequestPhoneOtpCommand = exports.de_RequestEmailOtpCommand = exports.de_RegisterPhoneCommand = exports.de_LinkSocialCommand = exports.de_LinkEmailCommand = 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");
|
|
@@ -183,6 +183,7 @@ const se_RegisterPhoneCommand = async (input, context) => {
|
|
|
183
183
|
'inviteCode': [],
|
|
184
184
|
'otp': [],
|
|
185
185
|
'phoneNumber': [],
|
|
186
|
+
'username': [],
|
|
186
187
|
}));
|
|
187
188
|
b.m("POST")
|
|
188
189
|
.h(headers)
|
|
@@ -288,6 +289,22 @@ const se_UpdatePhoneNumberCommand = async (input, context) => {
|
|
|
288
289
|
return b.build();
|
|
289
290
|
};
|
|
290
291
|
exports.se_UpdatePhoneNumberCommand = se_UpdatePhoneNumberCommand;
|
|
292
|
+
const se_UpdateUsernameCommand = async (input, context) => {
|
|
293
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
294
|
+
const headers = {
|
|
295
|
+
'content-type': 'application/json',
|
|
296
|
+
};
|
|
297
|
+
b.bp("/identity/user/username");
|
|
298
|
+
let body;
|
|
299
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
300
|
+
'username': [],
|
|
301
|
+
}));
|
|
302
|
+
b.m("PUT")
|
|
303
|
+
.h(headers)
|
|
304
|
+
.b(body);
|
|
305
|
+
return b.build();
|
|
306
|
+
};
|
|
307
|
+
exports.se_UpdateUsernameCommand = se_UpdateUsernameCommand;
|
|
291
308
|
const se_ValidateInviteCommand = async (input, context) => {
|
|
292
309
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
293
310
|
const headers = {};
|
|
@@ -760,6 +777,7 @@ const de_GetUserCommand = async (output, context) => {
|
|
|
760
777
|
'phoneNumber': smithy_client_1.expectString,
|
|
761
778
|
'userId': smithy_client_1.expectString,
|
|
762
779
|
'userState': smithy_client_1.expectString,
|
|
780
|
+
'username': smithy_client_1.expectString,
|
|
763
781
|
});
|
|
764
782
|
Object.assign(contents, doc);
|
|
765
783
|
return contents;
|
|
@@ -783,6 +801,7 @@ const de_GetUserByEmailCommand = async (output, context) => {
|
|
|
783
801
|
'phoneNumber': smithy_client_1.expectString,
|
|
784
802
|
'userId': smithy_client_1.expectString,
|
|
785
803
|
'userState': smithy_client_1.expectString,
|
|
804
|
+
'username': smithy_client_1.expectString,
|
|
786
805
|
});
|
|
787
806
|
Object.assign(contents, doc);
|
|
788
807
|
return contents;
|
|
@@ -926,6 +945,22 @@ const de_UpdatePhoneNumberCommand = async (output, context) => {
|
|
|
926
945
|
return contents;
|
|
927
946
|
};
|
|
928
947
|
exports.de_UpdatePhoneNumberCommand = de_UpdatePhoneNumberCommand;
|
|
948
|
+
const de_UpdateUsernameCommand = async (output, context) => {
|
|
949
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
950
|
+
return de_CommandError(output, context);
|
|
951
|
+
}
|
|
952
|
+
const contents = (0, smithy_client_1.map)({
|
|
953
|
+
$metadata: deserializeMetadata(output),
|
|
954
|
+
});
|
|
955
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
956
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
957
|
+
'status': smithy_client_1.expectString,
|
|
958
|
+
'username': smithy_client_1.expectString,
|
|
959
|
+
});
|
|
960
|
+
Object.assign(contents, doc);
|
|
961
|
+
return contents;
|
|
962
|
+
};
|
|
963
|
+
exports.de_UpdateUsernameCommand = de_UpdateUsernameCommand;
|
|
929
964
|
const de_ValidateInviteCommand = async (output, context) => {
|
|
930
965
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
931
966
|
return de_CommandError(output, context);
|
package/dist-es/OneHook.js
CHANGED
|
@@ -37,6 +37,7 @@ import { UpdateEntitlementsCommand, } from "./commands/UpdateEntitlementsCommand
|
|
|
37
37
|
import { UpdatePhoneNumberCommand, } from "./commands/UpdatePhoneNumberCommand";
|
|
38
38
|
import { UpdatePreferencesCommand, } from "./commands/UpdatePreferencesCommand";
|
|
39
39
|
import { UpdateProfileCommand, } from "./commands/UpdateProfileCommand";
|
|
40
|
+
import { UpdateUsernameCommand, } from "./commands/UpdateUsernameCommand";
|
|
40
41
|
import { UpgradeUserCommand, } from "./commands/UpgradeUserCommand";
|
|
41
42
|
import { ValidateInviteCommand, } from "./commands/ValidateInviteCommand";
|
|
42
43
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
@@ -59,6 +60,7 @@ const commands = {
|
|
|
59
60
|
UnlinkSocialCommand,
|
|
60
61
|
UpdateEntitlementsCommand,
|
|
61
62
|
UpdatePhoneNumberCommand,
|
|
63
|
+
UpdateUsernameCommand,
|
|
62
64
|
ValidateInviteCommand,
|
|
63
65
|
DiscoverCommand,
|
|
64
66
|
GetPreferencesCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_UpdateUsernameCommand, se_UpdateUsernameCommand, } 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 UpdateUsernameCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("OneHookService", "UpdateUsername", {})
|
|
12
|
+
.n("OneHookClient", "UpdateUsernameCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_UpdateUsernameCommand)
|
|
15
|
+
.de(de_UpdateUsernameCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -16,6 +16,7 @@ export * from "./RequestPhoneUpdateOtpCommand";
|
|
|
16
16
|
export * from "./UnlinkSocialCommand";
|
|
17
17
|
export * from "./UpdateEntitlementsCommand";
|
|
18
18
|
export * from "./UpdatePhoneNumberCommand";
|
|
19
|
+
export * from "./UpdateUsernameCommand";
|
|
19
20
|
export * from "./ValidateInviteCommand";
|
|
20
21
|
export * from "./DiscoverCommand";
|
|
21
22
|
export * from "./GetPreferencesCommand";
|
|
@@ -168,6 +168,7 @@ export const se_RegisterPhoneCommand = async (input, context) => {
|
|
|
168
168
|
'inviteCode': [],
|
|
169
169
|
'otp': [],
|
|
170
170
|
'phoneNumber': [],
|
|
171
|
+
'username': [],
|
|
171
172
|
}));
|
|
172
173
|
b.m("POST")
|
|
173
174
|
.h(headers)
|
|
@@ -266,6 +267,21 @@ export const se_UpdatePhoneNumberCommand = async (input, context) => {
|
|
|
266
267
|
.b(body);
|
|
267
268
|
return b.build();
|
|
268
269
|
};
|
|
270
|
+
export const se_UpdateUsernameCommand = async (input, context) => {
|
|
271
|
+
const b = rb(input, context);
|
|
272
|
+
const headers = {
|
|
273
|
+
'content-type': 'application/json',
|
|
274
|
+
};
|
|
275
|
+
b.bp("/identity/user/username");
|
|
276
|
+
let body;
|
|
277
|
+
body = JSON.stringify(take(input, {
|
|
278
|
+
'username': [],
|
|
279
|
+
}));
|
|
280
|
+
b.m("PUT")
|
|
281
|
+
.h(headers)
|
|
282
|
+
.b(body);
|
|
283
|
+
return b.build();
|
|
284
|
+
};
|
|
269
285
|
export const se_ValidateInviteCommand = async (input, context) => {
|
|
270
286
|
const b = rb(input, context);
|
|
271
287
|
const headers = {};
|
|
@@ -709,6 +725,7 @@ export const de_GetUserCommand = async (output, context) => {
|
|
|
709
725
|
'phoneNumber': __expectString,
|
|
710
726
|
'userId': __expectString,
|
|
711
727
|
'userState': __expectString,
|
|
728
|
+
'username': __expectString,
|
|
712
729
|
});
|
|
713
730
|
Object.assign(contents, doc);
|
|
714
731
|
return contents;
|
|
@@ -731,6 +748,7 @@ export const de_GetUserByEmailCommand = async (output, context) => {
|
|
|
731
748
|
'phoneNumber': __expectString,
|
|
732
749
|
'userId': __expectString,
|
|
733
750
|
'userState': __expectString,
|
|
751
|
+
'username': __expectString,
|
|
734
752
|
});
|
|
735
753
|
Object.assign(contents, doc);
|
|
736
754
|
return contents;
|
|
@@ -864,6 +882,21 @@ export const de_UpdatePhoneNumberCommand = async (output, context) => {
|
|
|
864
882
|
Object.assign(contents, doc);
|
|
865
883
|
return contents;
|
|
866
884
|
};
|
|
885
|
+
export const de_UpdateUsernameCommand = async (output, context) => {
|
|
886
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
887
|
+
return de_CommandError(output, context);
|
|
888
|
+
}
|
|
889
|
+
const contents = map({
|
|
890
|
+
$metadata: deserializeMetadata(output),
|
|
891
|
+
});
|
|
892
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
893
|
+
const doc = take(data, {
|
|
894
|
+
'status': __expectString,
|
|
895
|
+
'username': __expectString,
|
|
896
|
+
});
|
|
897
|
+
Object.assign(contents, doc);
|
|
898
|
+
return contents;
|
|
899
|
+
};
|
|
867
900
|
export const de_ValidateInviteCommand = async (output, context) => {
|
|
868
901
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
869
902
|
return de_CommandError(output, context);
|
package/dist-types/OneHook.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ import { UpdateEntitlementsCommandInput, UpdateEntitlementsCommandOutput } from
|
|
|
37
37
|
import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from "./commands/UpdatePhoneNumberCommand";
|
|
38
38
|
import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "./commands/UpdatePreferencesCommand";
|
|
39
39
|
import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "./commands/UpdateProfileCommand";
|
|
40
|
+
import { UpdateUsernameCommandInput, UpdateUsernameCommandOutput } from "./commands/UpdateUsernameCommand";
|
|
40
41
|
import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "./commands/UpgradeUserCommand";
|
|
41
42
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "./commands/ValidateInviteCommand";
|
|
42
43
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
@@ -150,6 +151,12 @@ export interface OneHook {
|
|
|
150
151
|
updatePhoneNumber(args: UpdatePhoneNumberCommandInput, options?: __HttpHandlerOptions): Promise<UpdatePhoneNumberCommandOutput>;
|
|
151
152
|
updatePhoneNumber(args: UpdatePhoneNumberCommandInput, cb: (err: any, data?: UpdatePhoneNumberCommandOutput) => void): void;
|
|
152
153
|
updatePhoneNumber(args: UpdatePhoneNumberCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdatePhoneNumberCommandOutput) => void): void;
|
|
154
|
+
/**
|
|
155
|
+
* @see {@link UpdateUsernameCommand}
|
|
156
|
+
*/
|
|
157
|
+
updateUsername(args: UpdateUsernameCommandInput, options?: __HttpHandlerOptions): Promise<UpdateUsernameCommandOutput>;
|
|
158
|
+
updateUsername(args: UpdateUsernameCommandInput, cb: (err: any, data?: UpdateUsernameCommandOutput) => void): void;
|
|
159
|
+
updateUsername(args: UpdateUsernameCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateUsernameCommandOutput) => void): void;
|
|
153
160
|
/**
|
|
154
161
|
* @see {@link ValidateInviteCommand}
|
|
155
162
|
*/
|
|
@@ -37,6 +37,7 @@ import { UpdateEntitlementsCommandInput, UpdateEntitlementsCommandOutput } from
|
|
|
37
37
|
import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from "./commands/UpdatePhoneNumberCommand";
|
|
38
38
|
import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "./commands/UpdatePreferencesCommand";
|
|
39
39
|
import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "./commands/UpdateProfileCommand";
|
|
40
|
+
import { UpdateUsernameCommandInput, UpdateUsernameCommandOutput } from "./commands/UpdateUsernameCommand";
|
|
40
41
|
import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "./commands/UpgradeUserCommand";
|
|
41
42
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "./commands/ValidateInviteCommand";
|
|
42
43
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
@@ -51,11 +52,11 @@ export { __Client };
|
|
|
51
52
|
/**
|
|
52
53
|
* @public
|
|
53
54
|
*/
|
|
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;
|
|
55
|
+
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 | UpdateUsernameCommandInput | UpgradeUserCommandInput | ValidateInviteCommandInput;
|
|
55
56
|
/**
|
|
56
57
|
* @public
|
|
57
58
|
*/
|
|
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;
|
|
59
|
+
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 | UpdateUsernameCommandOutput | UpgradeUserCommandOutput | ValidateInviteCommandOutput;
|
|
59
60
|
/**
|
|
60
61
|
* @public
|
|
61
62
|
*/
|
|
@@ -40,6 +40,7 @@ declare const RegisterPhoneCommand_base: {
|
|
|
40
40
|
* otp: "STRING_VALUE", // required
|
|
41
41
|
* inviteCode: "STRING_VALUE", // required
|
|
42
42
|
* displayName: "STRING_VALUE",
|
|
43
|
+
* username: "STRING_VALUE",
|
|
43
44
|
* };
|
|
44
45
|
* const command = new RegisterPhoneCommand(input);
|
|
45
46
|
* const response = await client.send(command);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
+
import { UpdateUsernameRequest, UsernameResponse } 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 UpdateUsernameCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface UpdateUsernameCommandInput extends UpdateUsernameRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link UpdateUsernameCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface UpdateUsernameCommandOutput extends UsernameResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const UpdateUsernameCommand_base: {
|
|
25
|
+
new (input: UpdateUsernameCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateUsernameCommandInput, UpdateUsernameCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: UpdateUsernameCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateUsernameCommandInput, UpdateUsernameCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @public
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
34
|
+
* ```javascript
|
|
35
|
+
* import { OneHookClient, UpdateUsernameCommand } from "onehook-api-client"; // ES Modules import
|
|
36
|
+
* // const { OneHookClient, UpdateUsernameCommand } = require("onehook-api-client"); // CommonJS import
|
|
37
|
+
* const client = new OneHookClient(config);
|
|
38
|
+
* const input = { // UpdateUsernameRequest
|
|
39
|
+
* username: "STRING_VALUE", // required
|
|
40
|
+
* };
|
|
41
|
+
* const command = new UpdateUsernameCommand(input);
|
|
42
|
+
* const response = await client.send(command);
|
|
43
|
+
* // { // UsernameResponse
|
|
44
|
+
* // status: "STRING_VALUE", // required
|
|
45
|
+
* // username: "STRING_VALUE", // required
|
|
46
|
+
* // };
|
|
47
|
+
*
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @param UpdateUsernameCommandInput - {@link UpdateUsernameCommandInput}
|
|
51
|
+
* @returns {@link UpdateUsernameCommandOutput}
|
|
52
|
+
* @see {@link UpdateUsernameCommandInput} for command's `input` shape.
|
|
53
|
+
* @see {@link UpdateUsernameCommandOutput} for command's `response` shape.
|
|
54
|
+
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link BadRequestError} (client fault)
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link InternalServerError} (server fault)
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link OneHookServiceException}
|
|
61
|
+
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
62
|
+
*
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
export declare class UpdateUsernameCommand extends UpdateUsernameCommand_base {
|
|
66
|
+
/** @internal type navigation helper, not in runtime. */
|
|
67
|
+
protected static __types: {
|
|
68
|
+
api: {
|
|
69
|
+
input: UpdateUsernameRequest;
|
|
70
|
+
output: UsernameResponse;
|
|
71
|
+
};
|
|
72
|
+
sdk: {
|
|
73
|
+
input: UpdateUsernameCommandInput;
|
|
74
|
+
output: UpdateUsernameCommandOutput;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -16,6 +16,7 @@ export * from "./RequestPhoneUpdateOtpCommand";
|
|
|
16
16
|
export * from "./UnlinkSocialCommand";
|
|
17
17
|
export * from "./UpdateEntitlementsCommand";
|
|
18
18
|
export * from "./UpdatePhoneNumberCommand";
|
|
19
|
+
export * from "./UpdateUsernameCommand";
|
|
19
20
|
export * from "./ValidateInviteCommand";
|
|
20
21
|
export * from "./DiscoverCommand";
|
|
21
22
|
export * from "./GetPreferencesCommand";
|
|
@@ -46,9 +46,13 @@ export type KeyRecoverySession = {
|
|
|
46
46
|
userId: Scalars['ID']['output'];
|
|
47
47
|
};
|
|
48
48
|
export declare enum KeyRecoveryStatus {
|
|
49
|
+
/** The new device scanned and imported the keys. */
|
|
49
50
|
Completed = "COMPLETED",
|
|
51
|
+
/** The user refused on the chosen device, or cancelled on the new one. */
|
|
50
52
|
Declined = "DECLINED",
|
|
53
|
+
/** The chosen device has verified user intent and is showing the QR code. */
|
|
51
54
|
Displaying = "DISPLAYING",
|
|
55
|
+
/** The new device has asked; the chosen device has not responded yet. */
|
|
52
56
|
Pending = "PENDING"
|
|
53
57
|
}
|
|
54
58
|
export type Message = {
|
|
@@ -304,6 +304,7 @@ export interface UserResponse {
|
|
|
304
304
|
googleId?: string | undefined;
|
|
305
305
|
googleEmail?: string | undefined;
|
|
306
306
|
userState?: string | undefined;
|
|
307
|
+
username?: string | undefined;
|
|
307
308
|
}
|
|
308
309
|
/**
|
|
309
310
|
* @public
|
|
@@ -345,6 +346,12 @@ export interface RegisterPhoneRequest {
|
|
|
345
346
|
otp: string | undefined;
|
|
346
347
|
inviteCode: string | undefined;
|
|
347
348
|
displayName?: string | undefined;
|
|
349
|
+
/**
|
|
350
|
+
* Optional user-chosen handle. When omitted (or blank) a random handle is assigned; a
|
|
351
|
+
* present-but-malformed/reserved value is rejected rather than silently replaced.
|
|
352
|
+
* @public
|
|
353
|
+
*/
|
|
354
|
+
username?: string | undefined;
|
|
348
355
|
}
|
|
349
356
|
/**
|
|
350
357
|
* @public
|
|
@@ -453,6 +460,21 @@ export interface UpdatePhoneNumberRequest {
|
|
|
453
460
|
*/
|
|
454
461
|
otp: string | undefined;
|
|
455
462
|
}
|
|
463
|
+
/**
|
|
464
|
+
* Changes the authenticated caller's user-chosen handle. The new handle is claimed atomically and
|
|
465
|
+
* the old one released in a single transaction; a no-op rename is rejected.
|
|
466
|
+
* @public
|
|
467
|
+
*/
|
|
468
|
+
export interface UpdateUsernameRequest {
|
|
469
|
+
username: string | undefined;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* @public
|
|
473
|
+
*/
|
|
474
|
+
export interface UsernameResponse {
|
|
475
|
+
status: string | undefined;
|
|
476
|
+
username: string | undefined;
|
|
477
|
+
}
|
|
456
478
|
/**
|
|
457
479
|
* @public
|
|
458
480
|
*/
|
|
@@ -36,6 +36,7 @@ import { UpdateEntitlementsCommandInput, UpdateEntitlementsCommandOutput } from
|
|
|
36
36
|
import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from "../commands/UpdatePhoneNumberCommand";
|
|
37
37
|
import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "../commands/UpdatePreferencesCommand";
|
|
38
38
|
import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "../commands/UpdateProfileCommand";
|
|
39
|
+
import { UpdateUsernameCommandInput, UpdateUsernameCommandOutput } from "../commands/UpdateUsernameCommand";
|
|
39
40
|
import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "../commands/UpgradeUserCommand";
|
|
40
41
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "../commands/ValidateInviteCommand";
|
|
41
42
|
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
@@ -112,6 +113,10 @@ export declare const se_UpdateEntitlementsCommand: (input: UpdateEntitlementsCom
|
|
|
112
113
|
* serializeAws_restJson1UpdatePhoneNumberCommand
|
|
113
114
|
*/
|
|
114
115
|
export declare const se_UpdatePhoneNumberCommand: (input: UpdatePhoneNumberCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
116
|
+
/**
|
|
117
|
+
* serializeAws_restJson1UpdateUsernameCommand
|
|
118
|
+
*/
|
|
119
|
+
export declare const se_UpdateUsernameCommand: (input: UpdateUsernameCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
115
120
|
/**
|
|
116
121
|
* serializeAws_restJson1ValidateInviteCommand
|
|
117
122
|
*/
|
|
@@ -272,6 +277,10 @@ export declare const de_UpdateEntitlementsCommand: (output: __HttpResponse, cont
|
|
|
272
277
|
* deserializeAws_restJson1UpdatePhoneNumberCommand
|
|
273
278
|
*/
|
|
274
279
|
export declare const de_UpdatePhoneNumberCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdatePhoneNumberCommandOutput>;
|
|
280
|
+
/**
|
|
281
|
+
* deserializeAws_restJson1UpdateUsernameCommand
|
|
282
|
+
*/
|
|
283
|
+
export declare const de_UpdateUsernameCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdateUsernameCommandOutput>;
|
|
275
284
|
/**
|
|
276
285
|
* deserializeAws_restJson1ValidateInviteCommand
|
|
277
286
|
*/
|
package/package.json
CHANGED