onehook-api-client 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -248,6 +248,13 @@ GenerateInvite
248
248
  </details>
249
249
  <details>
250
250
  <summary>
251
+ GetCredentialReadiness
252
+ </summary>
253
+
254
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetCredentialReadinessCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetCredentialReadinessCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetCredentialReadinessCommandOutput/)
255
+ </details>
256
+ <details>
257
+ <summary>
251
258
  GetUser
252
259
  </summary>
253
260
 
@@ -12,6 +12,7 @@ const DiscoverCommand_1 = require("./commands/DiscoverCommand");
12
12
  const GenerateDownloadUrlCommand_1 = require("./commands/GenerateDownloadUrlCommand");
13
13
  const GenerateInviteCommand_1 = require("./commands/GenerateInviteCommand");
14
14
  const GenerateUploadUrlCommand_1 = require("./commands/GenerateUploadUrlCommand");
15
+ const GetCredentialReadinessCommand_1 = require("./commands/GetCredentialReadinessCommand");
15
16
  const GetLivenessStatusCommand_1 = require("./commands/GetLivenessStatusCommand");
16
17
  const GetMatchCommand_1 = require("./commands/GetMatchCommand");
17
18
  const GetMyProfileCommand_1 = require("./commands/GetMyProfileCommand");
@@ -52,6 +53,7 @@ const commands = {
52
53
  RevokeDeviceCommand: RevokeDeviceCommand_1.RevokeDeviceCommand,
53
54
  AuthSocialCommand: AuthSocialCommand_1.AuthSocialCommand,
54
55
  GenerateInviteCommand: GenerateInviteCommand_1.GenerateInviteCommand,
56
+ GetCredentialReadinessCommand: GetCredentialReadinessCommand_1.GetCredentialReadinessCommand,
55
57
  GetUserCommand: GetUserCommand_1.GetUserCommand,
56
58
  GetUserByEmailCommand: GetUserByEmailCommand_1.GetUserByEmailCommand,
57
59
  LinkEmailCommand: LinkEmailCommand_1.LinkEmailCommand,
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetCredentialReadinessCommand = 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 GetCredentialReadinessCommand 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", "GetCredentialReadiness", {})
15
+ .n("OneHookClient", "GetCredentialReadinessCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetCredentialReadinessCommand)
18
+ .de(Aws_restJson1_1.de_GetCredentialReadinessCommand)
19
+ .build() {
20
+ }
21
+ exports.GetCredentialReadinessCommand = GetCredentialReadinessCommand;
@@ -8,6 +8,7 @@ tslib_1.__exportStar(require("./RegisterDeviceCommand"), exports);
8
8
  tslib_1.__exportStar(require("./RevokeDeviceCommand"), exports);
9
9
  tslib_1.__exportStar(require("./AuthSocialCommand"), exports);
10
10
  tslib_1.__exportStar(require("./GenerateInviteCommand"), exports);
11
+ tslib_1.__exportStar(require("./GetCredentialReadinessCommand"), exports);
11
12
  tslib_1.__exportStar(require("./GetUserCommand"), exports);
12
13
  tslib_1.__exportStar(require("./GetUserByEmailCommand"), exports);
13
14
  tslib_1.__exportStar(require("./LinkEmailCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeviceLimitError = exports.NotFoundError = exports.Platform = exports.InternalServerError = exports.BadRequestError = exports.ForbiddenError = void 0;
3
+ exports.CredentialGap = 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";
@@ -82,3 +82,9 @@ class DeviceLimitError extends OneHookServiceException_1.OneHookServiceException
82
82
  }
83
83
  }
84
84
  exports.DeviceLimitError = DeviceLimitError;
85
+ exports.CredentialGap = {
86
+ NO_COGNITO_USERNAME_ON_PROFILE: "NO_COGNITO_USERNAME_ON_PROFILE",
87
+ PHONE_NOT_VERIFIED: "PHONE_NOT_VERIFIED",
88
+ USERNAME_MISMATCHED_IN_COGNITO: "USERNAME_MISMATCHED_IN_COGNITO",
89
+ USERNAME_NOT_SYNCED_TO_COGNITO: "USERNAME_NOT_SYNCED_TO_COGNITO",
90
+ };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.de_GetCredentialReadinessCommand = 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_GetCredentialReadinessCommand = 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 = exports.de_GetUserByEmailCommand = exports.de_GetUserCommand = 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");
@@ -113,6 +113,18 @@ const se_GenerateInviteCommand = async (input, context) => {
113
113
  return b.build();
114
114
  };
115
115
  exports.se_GenerateInviteCommand = se_GenerateInviteCommand;
116
+ const se_GetCredentialReadinessCommand = async (input, context) => {
117
+ const b = (0, core_2.requestBuilder)(input, context);
118
+ const headers = {};
119
+ b.bp("/identity/users/{userId}/credential-readiness");
120
+ b.p('userId', () => input.userId, '{userId}', false);
121
+ let body;
122
+ b.m("GET")
123
+ .h(headers)
124
+ .b(body);
125
+ return b.build();
126
+ };
127
+ exports.se_GetCredentialReadinessCommand = se_GetCredentialReadinessCommand;
116
128
  const se_GetUserCommand = async (input, context) => {
117
129
  const b = (0, core_2.requestBuilder)(input, context);
118
130
  const headers = {};
@@ -759,6 +771,22 @@ const de_GenerateInviteCommand = async (output, context) => {
759
771
  return contents;
760
772
  };
761
773
  exports.de_GenerateInviteCommand = de_GenerateInviteCommand;
774
+ const de_GetCredentialReadinessCommand = async (output, context) => {
775
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
776
+ return de_CommandError(output, context);
777
+ }
778
+ const contents = (0, smithy_client_1.map)({
779
+ $metadata: deserializeMetadata(output),
780
+ });
781
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
782
+ const doc = (0, smithy_client_1.take)(data, {
783
+ 'gaps': smithy_client_1._json,
784
+ 'ready': smithy_client_1.expectBoolean,
785
+ });
786
+ Object.assign(contents, doc);
787
+ return contents;
788
+ };
789
+ exports.de_GetCredentialReadinessCommand = de_GetCredentialReadinessCommand;
762
790
  const de_GetUserCommand = async (output, context) => {
763
791
  if (output.statusCode !== 200 && output.statusCode >= 300) {
764
792
  return de_CommandError(output, context);
@@ -9,6 +9,7 @@ import { DiscoverCommand, } from "./commands/DiscoverCommand";
9
9
  import { GenerateDownloadUrlCommand, } from "./commands/GenerateDownloadUrlCommand";
10
10
  import { GenerateInviteCommand, } from "./commands/GenerateInviteCommand";
11
11
  import { GenerateUploadUrlCommand, } from "./commands/GenerateUploadUrlCommand";
12
+ import { GetCredentialReadinessCommand, } from "./commands/GetCredentialReadinessCommand";
12
13
  import { GetLivenessStatusCommand, } from "./commands/GetLivenessStatusCommand";
13
14
  import { GetMatchCommand, } from "./commands/GetMatchCommand";
14
15
  import { GetMyProfileCommand, } from "./commands/GetMyProfileCommand";
@@ -49,6 +50,7 @@ const commands = {
49
50
  RevokeDeviceCommand,
50
51
  AuthSocialCommand,
51
52
  GenerateInviteCommand,
53
+ GetCredentialReadinessCommand,
52
54
  GetUserCommand,
53
55
  GetUserByEmailCommand,
54
56
  LinkEmailCommand,
@@ -0,0 +1,17 @@
1
+ import { de_GetCredentialReadinessCommand, se_GetCredentialReadinessCommand, } 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 GetCredentialReadinessCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("OneHookService", "GetCredentialReadiness", {})
12
+ .n("OneHookClient", "GetCredentialReadinessCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_GetCredentialReadinessCommand)
15
+ .de(de_GetCredentialReadinessCommand)
16
+ .build() {
17
+ }
@@ -5,6 +5,7 @@ export * from "./RegisterDeviceCommand";
5
5
  export * from "./RevokeDeviceCommand";
6
6
  export * from "./AuthSocialCommand";
7
7
  export * from "./GenerateInviteCommand";
8
+ export * from "./GetCredentialReadinessCommand";
8
9
  export * from "./GetUserCommand";
9
10
  export * from "./GetUserByEmailCommand";
10
11
  export * from "./LinkEmailCommand";
@@ -74,3 +74,9 @@ export class DeviceLimitError extends __BaseException {
74
74
  this.error = opts.error;
75
75
  }
76
76
  }
77
+ export const CredentialGap = {
78
+ NO_COGNITO_USERNAME_ON_PROFILE: "NO_COGNITO_USERNAME_ON_PROFILE",
79
+ PHONE_NOT_VERIFIED: "PHONE_NOT_VERIFIED",
80
+ USERNAME_MISMATCHED_IN_COGNITO: "USERNAME_MISMATCHED_IN_COGNITO",
81
+ USERNAME_NOT_SYNCED_TO_COGNITO: "USERNAME_NOT_SYNCED_TO_COGNITO",
82
+ };
@@ -102,6 +102,17 @@ export const se_GenerateInviteCommand = async (input, context) => {
102
102
  .b(body);
103
103
  return b.build();
104
104
  };
105
+ export const se_GetCredentialReadinessCommand = async (input, context) => {
106
+ const b = rb(input, context);
107
+ const headers = {};
108
+ b.bp("/identity/users/{userId}/credential-readiness");
109
+ b.p('userId', () => input.userId, '{userId}', false);
110
+ let body;
111
+ b.m("GET")
112
+ .h(headers)
113
+ .b(body);
114
+ return b.build();
115
+ };
105
116
  export const se_GetUserCommand = async (input, context) => {
106
117
  const b = rb(input, context);
107
118
  const headers = {};
@@ -707,6 +718,21 @@ export const de_GenerateInviteCommand = async (output, context) => {
707
718
  Object.assign(contents, doc);
708
719
  return contents;
709
720
  };
721
+ export const de_GetCredentialReadinessCommand = async (output, context) => {
722
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
723
+ return de_CommandError(output, context);
724
+ }
725
+ const contents = map({
726
+ $metadata: deserializeMetadata(output),
727
+ });
728
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
729
+ const doc = take(data, {
730
+ 'gaps': _json,
731
+ 'ready': __expectBoolean,
732
+ });
733
+ Object.assign(contents, doc);
734
+ return contents;
735
+ };
710
736
  export const de_GetUserCommand = async (output, context) => {
711
737
  if (output.statusCode !== 200 && output.statusCode >= 300) {
712
738
  return de_CommandError(output, context);
@@ -9,6 +9,7 @@ import { DiscoverCommandInput, DiscoverCommandOutput } from "./commands/Discover
9
9
  import { GenerateDownloadUrlCommandInput, GenerateDownloadUrlCommandOutput } from "./commands/GenerateDownloadUrlCommand";
10
10
  import { GenerateInviteCommandInput, GenerateInviteCommandOutput } from "./commands/GenerateInviteCommand";
11
11
  import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from "./commands/GenerateUploadUrlCommand";
12
+ import { GetCredentialReadinessCommandInput, GetCredentialReadinessCommandOutput } from "./commands/GetCredentialReadinessCommand";
12
13
  import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "./commands/GetLivenessStatusCommand";
13
14
  import { GetMatchCommandInput, GetMatchCommandOutput } from "./commands/GetMatchCommand";
14
15
  import { GetMyProfileCommandInput, GetMyProfileCommandOutput } from "./commands/GetMyProfileCommand";
@@ -85,6 +86,12 @@ export interface OneHook {
85
86
  generateInvite(args: GenerateInviteCommandInput, options?: __HttpHandlerOptions): Promise<GenerateInviteCommandOutput>;
86
87
  generateInvite(args: GenerateInviteCommandInput, cb: (err: any, data?: GenerateInviteCommandOutput) => void): void;
87
88
  generateInvite(args: GenerateInviteCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateInviteCommandOutput) => void): void;
89
+ /**
90
+ * @see {@link GetCredentialReadinessCommand}
91
+ */
92
+ getCredentialReadiness(args: GetCredentialReadinessCommandInput, options?: __HttpHandlerOptions): Promise<GetCredentialReadinessCommandOutput>;
93
+ getCredentialReadiness(args: GetCredentialReadinessCommandInput, cb: (err: any, data?: GetCredentialReadinessCommandOutput) => void): void;
94
+ getCredentialReadiness(args: GetCredentialReadinessCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetCredentialReadinessCommandOutput) => void): void;
88
95
  /**
89
96
  * @see {@link GetUserCommand}
90
97
  */
@@ -9,6 +9,7 @@ import { DiscoverCommandInput, DiscoverCommandOutput } from "./commands/Discover
9
9
  import { GenerateDownloadUrlCommandInput, GenerateDownloadUrlCommandOutput } from "./commands/GenerateDownloadUrlCommand";
10
10
  import { GenerateInviteCommandInput, GenerateInviteCommandOutput } from "./commands/GenerateInviteCommand";
11
11
  import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from "./commands/GenerateUploadUrlCommand";
12
+ import { GetCredentialReadinessCommandInput, GetCredentialReadinessCommandOutput } from "./commands/GetCredentialReadinessCommand";
12
13
  import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "./commands/GetLivenessStatusCommand";
13
14
  import { GetMatchCommandInput, GetMatchCommandOutput } from "./commands/GetMatchCommand";
14
15
  import { GetMyProfileCommandInput, GetMyProfileCommandOutput } from "./commands/GetMyProfileCommand";
@@ -52,11 +53,11 @@ export { __Client };
52
53
  /**
53
54
  * @public
54
55
  */
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;
56
+ export type ServiceInputTypes = AuthSocialCommandInput | CompleteLivenessSessionCommandInput | CompleteOnboardingCommandInput | CreateLivenessSessionCommandInput | DeleteMatchMessagesCommandInput | DeleteProfileCommandInput | DiscoverCommandInput | GenerateDownloadUrlCommandInput | GenerateInviteCommandInput | GenerateUploadUrlCommandInput | GetCredentialReadinessCommandInput | 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;
56
57
  /**
57
58
  * @public
58
59
  */
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;
60
+ export type ServiceOutputTypes = AuthSocialCommandOutput | CompleteLivenessSessionCommandOutput | CompleteOnboardingCommandOutput | CreateLivenessSessionCommandOutput | DeleteMatchMessagesCommandOutput | DeleteProfileCommandOutput | DiscoverCommandOutput | GenerateDownloadUrlCommandOutput | GenerateInviteCommandOutput | GenerateUploadUrlCommandOutput | GetCredentialReadinessCommandOutput | 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;
60
61
  /**
61
62
  * @public
62
63
  */
@@ -0,0 +1,93 @@
1
+ import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
+ import { GetCredentialReadinessRequest, GetCredentialReadinessResponse } 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 GetCredentialReadinessCommand}.
14
+ */
15
+ export interface GetCredentialReadinessCommandInput extends GetCredentialReadinessRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetCredentialReadinessCommand}.
21
+ */
22
+ export interface GetCredentialReadinessCommandOutput extends GetCredentialReadinessResponse, __MetadataBearer {
23
+ }
24
+ declare const GetCredentialReadinessCommand_base: {
25
+ new (input: GetCredentialReadinessCommandInput): import("@smithy/smithy-client").CommandImpl<GetCredentialReadinessCommandInput, GetCredentialReadinessCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: GetCredentialReadinessCommandInput): import("@smithy/smithy-client").CommandImpl<GetCredentialReadinessCommandInput, GetCredentialReadinessCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Reports whether the user holds a working set of PORTABLE login credentials — ones that let them
31
+ * sign in on a DIFFERENT device from the one they registered on.
32
+ *
33
+ * Read-only and IAM-authenticated: it is called service-to-service by State to gate onboarding
34
+ * completion, never by an end user. Identity owns the Cognito user pool, so it is the only service
35
+ * that may inspect the live alias attributes; State must not read Cognito directly.
36
+ *
37
+ * "Portable" means a Cognito sign-in ALIAS (phone_number, email, preferred_username). A WebAuthn
38
+ * passkey is deliberately NOT counted: it is bound to the device that created it, so a user holding
39
+ * only a passkey is locked out everywhere else.
40
+ *
41
+ * The response lists what is missing rather than returning a bare boolean, so the caller can tell
42
+ * the user which credential to fix instead of failing opaquely.
43
+ * @example
44
+ * Use a bare-bones client and the command you need to make an API call.
45
+ * ```javascript
46
+ * import { OneHookClient, GetCredentialReadinessCommand } from "onehook-api-client"; // ES Modules import
47
+ * // const { OneHookClient, GetCredentialReadinessCommand } = require("onehook-api-client"); // CommonJS import
48
+ * const client = new OneHookClient(config);
49
+ * const input = { // GetCredentialReadinessRequest
50
+ * userId: "STRING_VALUE", // required
51
+ * };
52
+ * const command = new GetCredentialReadinessCommand(input);
53
+ * const response = await client.send(command);
54
+ * // { // GetCredentialReadinessResponse
55
+ * // ready: true || false, // required
56
+ * // gaps: [ // CredentialGapList // required
57
+ * // "STRING_VALUE",
58
+ * // ],
59
+ * // };
60
+ *
61
+ * ```
62
+ *
63
+ * @param GetCredentialReadinessCommandInput - {@link GetCredentialReadinessCommandInput}
64
+ * @returns {@link GetCredentialReadinessCommandOutput}
65
+ * @see {@link GetCredentialReadinessCommandInput} for command's `input` shape.
66
+ * @see {@link GetCredentialReadinessCommandOutput} for command's `response` shape.
67
+ * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
68
+ *
69
+ * @throws {@link BadRequestError} (client fault)
70
+ *
71
+ * @throws {@link NotFoundError} (client fault)
72
+ *
73
+ * @throws {@link InternalServerError} (server fault)
74
+ *
75
+ * @throws {@link OneHookServiceException}
76
+ * <p>Base exception class for all service exceptions from OneHook service.</p>
77
+ *
78
+ *
79
+ * @public
80
+ */
81
+ export declare class GetCredentialReadinessCommand extends GetCredentialReadinessCommand_base {
82
+ /** @internal type navigation helper, not in runtime. */
83
+ protected static __types: {
84
+ api: {
85
+ input: GetCredentialReadinessRequest;
86
+ output: GetCredentialReadinessResponse;
87
+ };
88
+ sdk: {
89
+ input: GetCredentialReadinessCommandInput;
90
+ output: GetCredentialReadinessCommandOutput;
91
+ };
92
+ };
93
+ }
@@ -5,6 +5,7 @@ export * from "./RegisterDeviceCommand";
5
5
  export * from "./RevokeDeviceCommand";
6
6
  export * from "./AuthSocialCommand";
7
7
  export * from "./GenerateInviteCommand";
8
+ export * from "./GetCredentialReadinessCommand";
8
9
  export * from "./GetUserCommand";
9
10
  export * from "./GetUserByEmailCommand";
10
11
  export * from "./LinkEmailCommand";
@@ -285,6 +285,41 @@ export interface GenerateInviteResponse {
285
285
  expiresAt: number | undefined;
286
286
  maxUses: number | undefined;
287
287
  }
288
+ /**
289
+ * @public
290
+ */
291
+ export interface GetCredentialReadinessRequest {
292
+ userId: string | undefined;
293
+ }
294
+ /**
295
+ * @public
296
+ * @enum
297
+ */
298
+ export declare const CredentialGap: {
299
+ readonly NO_COGNITO_USERNAME_ON_PROFILE: "NO_COGNITO_USERNAME_ON_PROFILE";
300
+ readonly PHONE_NOT_VERIFIED: "PHONE_NOT_VERIFIED";
301
+ readonly USERNAME_MISMATCHED_IN_COGNITO: "USERNAME_MISMATCHED_IN_COGNITO";
302
+ readonly USERNAME_NOT_SYNCED_TO_COGNITO: "USERNAME_NOT_SYNCED_TO_COGNITO";
303
+ };
304
+ /**
305
+ * @public
306
+ */
307
+ export type CredentialGap = typeof CredentialGap[keyof typeof CredentialGap];
308
+ /**
309
+ * @public
310
+ */
311
+ export interface GetCredentialReadinessResponse {
312
+ /**
313
+ * True only when EVERY portable credential the profile advertises is live in Cognito.
314
+ * @public
315
+ */
316
+ ready: boolean | undefined;
317
+ /**
318
+ * Empty when ready. Machine-readable so the caller can explain the specific gap.
319
+ * @public
320
+ */
321
+ gaps: (CredentialGap)[] | undefined;
322
+ }
288
323
  /**
289
324
  * @public
290
325
  */
@@ -8,6 +8,7 @@ import { DiscoverCommandInput, DiscoverCommandOutput } from "../commands/Discove
8
8
  import { GenerateDownloadUrlCommandInput, GenerateDownloadUrlCommandOutput } from "../commands/GenerateDownloadUrlCommand";
9
9
  import { GenerateInviteCommandInput, GenerateInviteCommandOutput } from "../commands/GenerateInviteCommand";
10
10
  import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from "../commands/GenerateUploadUrlCommand";
11
+ import { GetCredentialReadinessCommandInput, GetCredentialReadinessCommandOutput } from "../commands/GetCredentialReadinessCommand";
11
12
  import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "../commands/GetLivenessStatusCommand";
12
13
  import { GetMatchCommandInput, GetMatchCommandOutput } from "../commands/GetMatchCommand";
13
14
  import { GetMyProfileCommandInput, GetMyProfileCommandOutput } from "../commands/GetMyProfileCommand";
@@ -69,6 +70,10 @@ export declare const se_AuthSocialCommand: (input: AuthSocialCommandInput, conte
69
70
  * serializeAws_restJson1GenerateInviteCommand
70
71
  */
71
72
  export declare const se_GenerateInviteCommand: (input: GenerateInviteCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
73
+ /**
74
+ * serializeAws_restJson1GetCredentialReadinessCommand
75
+ */
76
+ export declare const se_GetCredentialReadinessCommand: (input: GetCredentialReadinessCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
72
77
  /**
73
78
  * serializeAws_restJson1GetUserCommand
74
79
  */
@@ -233,6 +238,10 @@ export declare const de_AuthSocialCommand: (output: __HttpResponse, context: __S
233
238
  * deserializeAws_restJson1GenerateInviteCommand
234
239
  */
235
240
  export declare const de_GenerateInviteCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GenerateInviteCommandOutput>;
241
+ /**
242
+ * deserializeAws_restJson1GetCredentialReadinessCommand
243
+ */
244
+ export declare const de_GetCredentialReadinessCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetCredentialReadinessCommandOutput>;
236
245
  /**
237
246
  * deserializeAws_restJson1GetUserCommand
238
247
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onehook-api-client",
3
3
  "description": "OneHook API Client",
4
- "version": "1.0.10",
4
+ "version": "1.0.12",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",