onehook-api-client 1.0.11 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +56 -0
  2. package/dist-cjs/OneHook.js +16 -0
  3. package/dist-cjs/commands/DeletePushTokenCommand.js +21 -0
  4. package/dist-cjs/commands/GetChatSettingsCommand.js +21 -0
  5. package/dist-cjs/commands/GetCredentialReadinessCommand.js +21 -0
  6. package/dist-cjs/commands/GetNotificationPreferencesCommand.js +21 -0
  7. package/dist-cjs/commands/GetUserIdByUsernameCommand.js +21 -0
  8. package/dist-cjs/commands/RegisterPushTokenCommand.js +21 -0
  9. package/dist-cjs/commands/SwipeByUsernameCommand.js +21 -0
  10. package/dist-cjs/commands/UpdateChatSettingsCommand.js +21 -0
  11. package/dist-cjs/commands/index.js +8 -0
  12. package/dist-cjs/graphql/types.js +6 -1
  13. package/dist-cjs/models/models_0.js +17 -6
  14. package/dist-cjs/protocols/Aws_restJson1.js +304 -3
  15. package/dist-es/OneHook.js +16 -0
  16. package/dist-es/commands/DeletePushTokenCommand.js +17 -0
  17. package/dist-es/commands/GetChatSettingsCommand.js +17 -0
  18. package/dist-es/commands/GetCredentialReadinessCommand.js +17 -0
  19. package/dist-es/commands/GetNotificationPreferencesCommand.js +17 -0
  20. package/dist-es/commands/GetUserIdByUsernameCommand.js +17 -0
  21. package/dist-es/commands/RegisterPushTokenCommand.js +17 -0
  22. package/dist-es/commands/SwipeByUsernameCommand.js +17 -0
  23. package/dist-es/commands/UpdateChatSettingsCommand.js +17 -0
  24. package/dist-es/commands/index.js +8 -0
  25. package/dist-es/graphql/types.js +5 -0
  26. package/dist-es/models/models_0.js +16 -5
  27. package/dist-es/protocols/Aws_restJson1.js +286 -1
  28. package/dist-types/OneHook.d.ts +58 -0
  29. package/dist-types/OneHookClient.d.ts +10 -2
  30. package/dist-types/commands/DeletePushTokenCommand.d.ts +85 -0
  31. package/dist-types/commands/GetChatSettingsCommand.d.ts +85 -0
  32. package/dist-types/commands/GetCredentialReadinessCommand.d.ts +93 -0
  33. package/dist-types/commands/GetMyProfileCommand.d.ts +4 -1
  34. package/dist-types/commands/GetNotificationPreferencesCommand.d.ts +91 -0
  35. package/dist-types/commands/GetPreferencesCommand.d.ts +37 -1
  36. package/dist-types/commands/GetProfileCommand.d.ts +4 -1
  37. package/dist-types/commands/GetUserIdByUsernameCommand.d.ts +84 -0
  38. package/dist-types/commands/RegisterPushTokenCommand.d.ts +93 -0
  39. package/dist-types/commands/SwipeByUsernameCommand.d.ts +93 -0
  40. package/dist-types/commands/UpdateChatSettingsCommand.d.ts +95 -0
  41. package/dist-types/commands/UpdatePreferencesCommand.d.ts +37 -1
  42. package/dist-types/commands/UpdateProfileCommand.d.ts +4 -1
  43. package/dist-types/commands/index.d.ts +8 -0
  44. package/dist-types/graphql/types.d.ts +33 -0
  45. package/dist-types/models/models_0.d.ts +466 -13
  46. package/dist-types/protocols/Aws_restJson1.d.ts +72 -0
  47. package/package.json +1 -1
@@ -5,19 +5,24 @@ import { CompleteOnboardingCommandInput, CompleteOnboardingCommandOutput } from
5
5
  import { CreateLivenessSessionCommandInput, CreateLivenessSessionCommandOutput } from "./commands/CreateLivenessSessionCommand";
6
6
  import { DeleteMatchMessagesCommandInput, DeleteMatchMessagesCommandOutput } from "./commands/DeleteMatchMessagesCommand";
7
7
  import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "./commands/DeleteProfileCommand";
8
+ import { DeletePushTokenCommandInput, DeletePushTokenCommandOutput } from "./commands/DeletePushTokenCommand";
8
9
  import { DiscoverCommandInput, DiscoverCommandOutput } from "./commands/DiscoverCommand";
9
10
  import { GenerateDownloadUrlCommandInput, GenerateDownloadUrlCommandOutput } from "./commands/GenerateDownloadUrlCommand";
10
11
  import { GenerateInviteCommandInput, GenerateInviteCommandOutput } from "./commands/GenerateInviteCommand";
11
12
  import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from "./commands/GenerateUploadUrlCommand";
13
+ import { GetChatSettingsCommandInput, GetChatSettingsCommandOutput } from "./commands/GetChatSettingsCommand";
14
+ import { GetCredentialReadinessCommandInput, GetCredentialReadinessCommandOutput } from "./commands/GetCredentialReadinessCommand";
12
15
  import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "./commands/GetLivenessStatusCommand";
13
16
  import { GetMatchCommandInput, GetMatchCommandOutput } from "./commands/GetMatchCommand";
14
17
  import { GetMyProfileCommandInput, GetMyProfileCommandOutput } from "./commands/GetMyProfileCommand";
18
+ import { GetNotificationPreferencesCommandInput, GetNotificationPreferencesCommandOutput } from "./commands/GetNotificationPreferencesCommand";
15
19
  import { GetParticipantRegistryCommandInput, GetParticipantRegistryCommandOutput } from "./commands/GetParticipantRegistryCommand";
16
20
  import { GetPreferencesCommandInput, GetPreferencesCommandOutput } from "./commands/GetPreferencesCommand";
17
21
  import { GetProfileCommandInput, GetProfileCommandOutput } from "./commands/GetProfileCommand";
18
22
  import { GetStateCommandInput, GetStateCommandOutput } from "./commands/GetStateCommand";
19
23
  import { GetUserByEmailCommandInput, GetUserByEmailCommandOutput } from "./commands/GetUserByEmailCommand";
20
24
  import { GetUserCommandInput, GetUserCommandOutput } from "./commands/GetUserCommand";
25
+ import { GetUserIdByUsernameCommandInput, GetUserIdByUsernameCommandOutput } from "./commands/GetUserIdByUsernameCommand";
21
26
  import { IndexLocationCommandInput, IndexLocationCommandOutput } from "./commands/IndexLocationCommand";
22
27
  import { InitUserCommandInput, InitUserCommandOutput } from "./commands/InitUserCommand";
23
28
  import { LinkEmailCommandInput, LinkEmailCommandOutput } from "./commands/LinkEmailCommand";
@@ -25,14 +30,17 @@ import { LinkSocialCommandInput, LinkSocialCommandOutput } from "./commands/Link
25
30
  import { ListMyDevicesCommandInput, ListMyDevicesCommandOutput } from "./commands/ListMyDevicesCommand";
26
31
  import { RegisterDeviceCommandInput, RegisterDeviceCommandOutput } from "./commands/RegisterDeviceCommand";
27
32
  import { RegisterPhoneCommandInput, RegisterPhoneCommandOutput } from "./commands/RegisterPhoneCommand";
33
+ import { RegisterPushTokenCommandInput, RegisterPushTokenCommandOutput } from "./commands/RegisterPushTokenCommand";
28
34
  import { RemoveLocationCommandInput, RemoveLocationCommandOutput } from "./commands/RemoveLocationCommand";
29
35
  import { RequestEmailOtpCommandInput, RequestEmailOtpCommandOutput } from "./commands/RequestEmailOtpCommand";
30
36
  import { RequestPhoneOtpCommandInput, RequestPhoneOtpCommandOutput } from "./commands/RequestPhoneOtpCommand";
31
37
  import { RequestPhoneUpdateOtpCommandInput, RequestPhoneUpdateOtpCommandOutput } from "./commands/RequestPhoneUpdateOtpCommand";
32
38
  import { RevokeDeviceCommandInput, RevokeDeviceCommandOutput } from "./commands/RevokeDeviceCommand";
39
+ import { SwipeByUsernameCommandInput, SwipeByUsernameCommandOutput } from "./commands/SwipeByUsernameCommand";
33
40
  import { SwipeCommandInput, SwipeCommandOutput } from "./commands/SwipeCommand";
34
41
  import { UnhookCommandInput, UnhookCommandOutput } from "./commands/UnhookCommand";
35
42
  import { UnlinkSocialCommandInput, UnlinkSocialCommandOutput } from "./commands/UnlinkSocialCommand";
43
+ import { UpdateChatSettingsCommandInput, UpdateChatSettingsCommandOutput } from "./commands/UpdateChatSettingsCommand";
36
44
  import { UpdateEntitlementsCommandInput, UpdateEntitlementsCommandOutput } from "./commands/UpdateEntitlementsCommand";
37
45
  import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from "./commands/UpdatePhoneNumberCommand";
38
46
  import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "./commands/UpdatePreferencesCommand";
@@ -52,11 +60,11 @@ export { __Client };
52
60
  /**
53
61
  * @public
54
62
  */
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;
63
+ export type ServiceInputTypes = AuthSocialCommandInput | CompleteLivenessSessionCommandInput | CompleteOnboardingCommandInput | CreateLivenessSessionCommandInput | DeleteMatchMessagesCommandInput | DeleteProfileCommandInput | DeletePushTokenCommandInput | DiscoverCommandInput | GenerateDownloadUrlCommandInput | GenerateInviteCommandInput | GenerateUploadUrlCommandInput | GetChatSettingsCommandInput | GetCredentialReadinessCommandInput | GetLivenessStatusCommandInput | GetMatchCommandInput | GetMyProfileCommandInput | GetNotificationPreferencesCommandInput | GetParticipantRegistryCommandInput | GetPreferencesCommandInput | GetProfileCommandInput | GetStateCommandInput | GetUserByEmailCommandInput | GetUserCommandInput | GetUserIdByUsernameCommandInput | IndexLocationCommandInput | InitUserCommandInput | LinkEmailCommandInput | LinkSocialCommandInput | ListMyDevicesCommandInput | RegisterDeviceCommandInput | RegisterPhoneCommandInput | RegisterPushTokenCommandInput | RemoveLocationCommandInput | RequestEmailOtpCommandInput | RequestPhoneOtpCommandInput | RequestPhoneUpdateOtpCommandInput | RevokeDeviceCommandInput | SwipeByUsernameCommandInput | SwipeCommandInput | UnhookCommandInput | UnlinkSocialCommandInput | UpdateChatSettingsCommandInput | UpdateEntitlementsCommandInput | UpdatePhoneNumberCommandInput | UpdatePreferencesCommandInput | UpdateProfileCommandInput | UpdateUsernameCommandInput | UpgradeUserCommandInput | ValidateInviteCommandInput;
56
64
  /**
57
65
  * @public
58
66
  */
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;
67
+ export type ServiceOutputTypes = AuthSocialCommandOutput | CompleteLivenessSessionCommandOutput | CompleteOnboardingCommandOutput | CreateLivenessSessionCommandOutput | DeleteMatchMessagesCommandOutput | DeleteProfileCommandOutput | DeletePushTokenCommandOutput | DiscoverCommandOutput | GenerateDownloadUrlCommandOutput | GenerateInviteCommandOutput | GenerateUploadUrlCommandOutput | GetChatSettingsCommandOutput | GetCredentialReadinessCommandOutput | GetLivenessStatusCommandOutput | GetMatchCommandOutput | GetMyProfileCommandOutput | GetNotificationPreferencesCommandOutput | GetParticipantRegistryCommandOutput | GetPreferencesCommandOutput | GetProfileCommandOutput | GetStateCommandOutput | GetUserByEmailCommandOutput | GetUserCommandOutput | GetUserIdByUsernameCommandOutput | IndexLocationCommandOutput | InitUserCommandOutput | LinkEmailCommandOutput | LinkSocialCommandOutput | ListMyDevicesCommandOutput | RegisterDeviceCommandOutput | RegisterPhoneCommandOutput | RegisterPushTokenCommandOutput | RemoveLocationCommandOutput | RequestEmailOtpCommandOutput | RequestPhoneOtpCommandOutput | RequestPhoneUpdateOtpCommandOutput | RevokeDeviceCommandOutput | SwipeByUsernameCommandOutput | SwipeCommandOutput | UnhookCommandOutput | UnlinkSocialCommandOutput | UpdateChatSettingsCommandOutput | UpdateEntitlementsCommandOutput | UpdatePhoneNumberCommandOutput | UpdatePreferencesCommandOutput | UpdateProfileCommandOutput | UpdateUsernameCommandOutput | UpgradeUserCommandOutput | ValidateInviteCommandOutput;
60
68
  /**
61
69
  * @public
62
70
  */
@@ -0,0 +1,85 @@
1
+ import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
+ import { DeletePushTokenRequest, DeletePushTokenResponse } 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 DeletePushTokenCommand}.
14
+ */
15
+ export interface DeletePushTokenCommandInput extends DeletePushTokenRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link DeletePushTokenCommand}.
21
+ */
22
+ export interface DeletePushTokenCommandOutput extends DeletePushTokenResponse, __MetadataBearer {
23
+ }
24
+ declare const DeletePushTokenCommand_base: {
25
+ new (input: DeletePushTokenCommandInput): import("@smithy/smithy-client").CommandImpl<DeletePushTokenCommandInput, DeletePushTokenCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: DeletePushTokenCommandInput): import("@smithy/smithy-client").CommandImpl<DeletePushTokenCommandInput, DeletePushTokenCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Removes this device's push token WITHOUT revoking the device.
31
+ *
32
+ * Deliberately separate from `RevokeDevice`: signing out or turning notifications off should stop
33
+ * pushes while leaving the device's E2EE identity and its history-key wraps intact. Revoking the
34
+ * device instead would strand its ability to read message history.
35
+ * @example
36
+ * Use a bare-bones client and the command you need to make an API call.
37
+ * ```javascript
38
+ * import { OneHookClient, DeletePushTokenCommand } from "onehook-api-client"; // ES Modules import
39
+ * // const { OneHookClient, DeletePushTokenCommand } = require("onehook-api-client"); // CommonJS import
40
+ * const client = new OneHookClient(config);
41
+ * const input = { // DeletePushTokenRequest
42
+ * deviceId: "STRING_VALUE", // required
43
+ * };
44
+ * const command = new DeletePushTokenCommand(input);
45
+ * const response = await client.send(command);
46
+ * // { // DeletePushTokenResponse
47
+ * // deviceId: "STRING_VALUE", // required
48
+ * // deleted: true || false, // required
49
+ * // };
50
+ *
51
+ * ```
52
+ *
53
+ * @param DeletePushTokenCommandInput - {@link DeletePushTokenCommandInput}
54
+ * @returns {@link DeletePushTokenCommandOutput}
55
+ * @see {@link DeletePushTokenCommandInput} for command's `input` shape.
56
+ * @see {@link DeletePushTokenCommandOutput} for command's `response` shape.
57
+ * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
58
+ *
59
+ * @throws {@link BadRequestError} (client fault)
60
+ *
61
+ * @throws {@link ForbiddenError} (client fault)
62
+ *
63
+ * @throws {@link NotFoundError} (client fault)
64
+ *
65
+ * @throws {@link InternalServerError} (server fault)
66
+ *
67
+ * @throws {@link OneHookServiceException}
68
+ * <p>Base exception class for all service exceptions from OneHook service.</p>
69
+ *
70
+ *
71
+ * @public
72
+ */
73
+ export declare class DeletePushTokenCommand extends DeletePushTokenCommand_base {
74
+ /** @internal type navigation helper, not in runtime. */
75
+ protected static __types: {
76
+ api: {
77
+ input: DeletePushTokenRequest;
78
+ output: DeletePushTokenResponse;
79
+ };
80
+ sdk: {
81
+ input: DeletePushTokenCommandInput;
82
+ output: DeletePushTokenCommandOutput;
83
+ };
84
+ };
85
+ }
@@ -0,0 +1,85 @@
1
+ import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
+ import { GetChatSettingsRequest, GetChatSettingsResponse } 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 GetChatSettingsCommand}.
14
+ */
15
+ export interface GetChatSettingsCommandInput extends GetChatSettingsRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetChatSettingsCommand}.
21
+ */
22
+ export interface GetChatSettingsCommandOutput extends GetChatSettingsResponse, __MetadataBearer {
23
+ }
24
+ declare const GetChatSettingsCommand_base: {
25
+ new (input: GetChatSettingsCommandInput): import("@smithy/smithy-client").CommandImpl<GetChatSettingsCommandInput, GetChatSettingsCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [GetChatSettingsCommandInput]): import("@smithy/smithy-client").CommandImpl<GetChatSettingsCommandInput, GetChatSettingsCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Read the authenticated caller's chat settings. Returns sensible defaults when the user has no
31
+ * stored settings row (all notifications on, read receipts + typing indicators on, last-seen
32
+ * EVERYONE, screenshot protection off, disappearing messages off).
33
+ * @example
34
+ * Use a bare-bones client and the command you need to make an API call.
35
+ * ```javascript
36
+ * import { OneHookClient, GetChatSettingsCommand } from "onehook-api-client"; // ES Modules import
37
+ * // const { OneHookClient, GetChatSettingsCommand } = require("onehook-api-client"); // CommonJS import
38
+ * const client = new OneHookClient(config);
39
+ * const input = {};
40
+ * const command = new GetChatSettingsCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // GetChatSettingsResponse
43
+ * // settings: { // ChatSettings
44
+ * // messageNotifications: true || false,
45
+ * // showPreviews: true || false,
46
+ * // reactionNotifications: true || false,
47
+ * // readReceipts: true || false,
48
+ * // typingIndicators: true || false,
49
+ * // lastSeenVisibility: "EVERYONE" || "MATCHES" || "NOBODY",
50
+ * // screenshotProtection: true || false,
51
+ * // defaultDisappearingSeconds: Number("int"),
52
+ * // },
53
+ * // };
54
+ *
55
+ * ```
56
+ *
57
+ * @param GetChatSettingsCommandInput - {@link GetChatSettingsCommandInput}
58
+ * @returns {@link GetChatSettingsCommandOutput}
59
+ * @see {@link GetChatSettingsCommandInput} for command's `input` shape.
60
+ * @see {@link GetChatSettingsCommandOutput} for command's `response` shape.
61
+ * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
62
+ *
63
+ * @throws {@link ForbiddenError} (client fault)
64
+ *
65
+ * @throws {@link InternalServerError} (server fault)
66
+ *
67
+ * @throws {@link OneHookServiceException}
68
+ * <p>Base exception class for all service exceptions from OneHook service.</p>
69
+ *
70
+ *
71
+ * @public
72
+ */
73
+ export declare class GetChatSettingsCommand extends GetChatSettingsCommand_base {
74
+ /** @internal type navigation helper, not in runtime. */
75
+ protected static __types: {
76
+ api: {
77
+ input: {};
78
+ output: GetChatSettingsResponse;
79
+ };
80
+ sdk: {
81
+ input: GetChatSettingsCommandInput;
82
+ output: GetChatSettingsCommandOutput;
83
+ };
84
+ };
85
+ }
@@ -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
+ }
@@ -65,12 +65,15 @@ declare const GetMyProfileCommand_base: {
65
65
  * // pictures: [
66
66
  * // "STRING_VALUE",
67
67
  * // ],
68
+ * // pictureTransforms: { // StringMap
69
+ * // "<keys>": "STRING_VALUE",
70
+ * // },
68
71
  * // videos: [
69
72
  * // "STRING_VALUE",
70
73
  * // ],
71
74
  * // audioPrompt: "STRING_VALUE",
72
75
  * // moderationStatus: "STRING_VALUE",
73
- * // fieldModerationStatus: { // StringMap
76
+ * // fieldModerationStatus: {
74
77
  * // "<keys>": "STRING_VALUE",
75
78
  * // },
76
79
  * // causes: [
@@ -0,0 +1,91 @@
1
+ import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
+ import { GetNotificationPreferencesRequest, GetNotificationPreferencesResponse } 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 GetNotificationPreferencesCommand}.
14
+ */
15
+ export interface GetNotificationPreferencesCommandInput extends GetNotificationPreferencesRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetNotificationPreferencesCommand}.
21
+ */
22
+ export interface GetNotificationPreferencesCommandOutput extends GetNotificationPreferencesResponse, __MetadataBearer {
23
+ }
24
+ declare const GetNotificationPreferencesCommand_base: {
25
+ new (input: GetNotificationPreferencesCommandInput): import("@smithy/smithy-client").CommandImpl<GetNotificationPreferencesCommandInput, GetNotificationPreferencesCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: GetNotificationPreferencesCommandInput): import("@smithy/smithy-client").CommandImpl<GetNotificationPreferencesCommandInput, GetNotificationPreferencesCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Internal, IAM-authorized read of a user's notification toggles, for the push NotificationWorker.
31
+ *
32
+ * WHY A SEPARATE ROUTE. The public `GetPreferences` is strictly caller==self
33
+ * (`SecurityValidator.validateUserAccess`), so a worker cannot use it to read the preferences of the
34
+ * person it is about to notify. This route takes the userId from the PATH and is authorized with AWS
35
+ * IAM rather than the Cognito authorizer, so only principals granted `execute-api:Invoke` on it (the
36
+ * worker's role) may call it.
37
+ *
38
+ * It returns ONLY the notify flags — not the match filters, not location, not age. A worker deciding
39
+ * whether to send a push has no business reading who someone wants to date, and narrowing the response
40
+ * means a leak here cannot become a profile disclosure.
41
+ * @example
42
+ * Use a bare-bones client and the command you need to make an API call.
43
+ * ```javascript
44
+ * import { OneHookClient, GetNotificationPreferencesCommand } from "onehook-api-client"; // ES Modules import
45
+ * // const { OneHookClient, GetNotificationPreferencesCommand } = require("onehook-api-client"); // CommonJS import
46
+ * const client = new OneHookClient(config);
47
+ * const input = { // GetNotificationPreferencesRequest
48
+ * userId: "STRING_VALUE", // required
49
+ * };
50
+ * const command = new GetNotificationPreferencesCommand(input);
51
+ * const response = await client.send(command);
52
+ * // { // GetNotificationPreferencesResponse
53
+ * // userId: "STRING_VALUE", // required
54
+ * // notifyMatches: true || false, // required
55
+ * // notifyLikes: true || false, // required
56
+ * // notifyDailyPicks: true || false, // required
57
+ * // };
58
+ *
59
+ * ```
60
+ *
61
+ * @param GetNotificationPreferencesCommandInput - {@link GetNotificationPreferencesCommandInput}
62
+ * @returns {@link GetNotificationPreferencesCommandOutput}
63
+ * @see {@link GetNotificationPreferencesCommandInput} for command's `input` shape.
64
+ * @see {@link GetNotificationPreferencesCommandOutput} for command's `response` shape.
65
+ * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
66
+ *
67
+ * @throws {@link BadRequestError} (client fault)
68
+ *
69
+ * @throws {@link NotFoundError} (client fault)
70
+ *
71
+ * @throws {@link InternalServerError} (server fault)
72
+ *
73
+ * @throws {@link OneHookServiceException}
74
+ * <p>Base exception class for all service exceptions from OneHook service.</p>
75
+ *
76
+ *
77
+ * @public
78
+ */
79
+ export declare class GetNotificationPreferencesCommand extends GetNotificationPreferencesCommand_base {
80
+ /** @internal type navigation helper, not in runtime. */
81
+ protected static __types: {
82
+ api: {
83
+ input: GetNotificationPreferencesRequest;
84
+ output: GetNotificationPreferencesResponse;
85
+ };
86
+ sdk: {
87
+ input: GetNotificationPreferencesCommandInput;
88
+ output: GetNotificationPreferencesCommandOutput;
89
+ };
90
+ };
91
+ }
@@ -45,9 +45,45 @@ declare const GetPreferencesCommand_base: {
45
45
  * // minAge: Number("int"),
46
46
  * // maxAge: Number("int"),
47
47
  * // maxDistanceKm: Number("int"),
48
- * // genders: [ // StringList
48
+ * // interestedInGenders: [ // StringList
49
49
  * // "STRING_VALUE",
50
50
  * // ],
51
+ * // relationshipType: "STRING_VALUE",
52
+ * // wantsKids: "STRING_VALUE",
53
+ * // familyPlans: "STRING_VALUE",
54
+ * // verifiedOnly: true || false,
55
+ * // smoking: "STRING_VALUE",
56
+ * // drinking: "STRING_VALUE",
57
+ * // cannabis: "STRING_VALUE",
58
+ * // drugs: "STRING_VALUE",
59
+ * // exercise: "STRING_VALUE",
60
+ * // religion: "STRING_VALUE",
61
+ * // educationLevel: "STRING_VALUE",
62
+ * // politicalView: "STRING_VALUE",
63
+ * // starSigns: [
64
+ * // "STRING_VALUE",
65
+ * // ],
66
+ * // preferredLanguages: [
67
+ * // "STRING_VALUE",
68
+ * // ],
69
+ * // interests: [
70
+ * // "STRING_VALUE",
71
+ * // ],
72
+ * // minHeight: Number("int"),
73
+ * // maxHeight: Number("int"),
74
+ * // dealbreakers: [
75
+ * // "STRING_VALUE",
76
+ * // ],
77
+ * // requirePhoto: true || false,
78
+ * // requireBio: true || false,
79
+ * // requireRecentlyActive: true || false,
80
+ * // recentlyActiveDays: Number("int"),
81
+ * // discoverable: true || false,
82
+ * // incognito: true || false,
83
+ * // distanceUnit: "STRING_VALUE",
84
+ * // notifyMatches: true || false,
85
+ * // notifyLikes: true || false,
86
+ * // notifyDailyPicks: true || false,
51
87
  * // };
52
88
  *
53
89
  * ```
@@ -66,12 +66,15 @@ declare const GetProfileCommand_base: {
66
66
  * // pictures: [
67
67
  * // "STRING_VALUE",
68
68
  * // ],
69
+ * // pictureTransforms: { // StringMap
70
+ * // "<keys>": "STRING_VALUE",
71
+ * // },
69
72
  * // videos: [
70
73
  * // "STRING_VALUE",
71
74
  * // ],
72
75
  * // audioPrompt: "STRING_VALUE",
73
76
  * // moderationStatus: "STRING_VALUE",
74
- * // fieldModerationStatus: { // StringMap
77
+ * // fieldModerationStatus: {
75
78
  * // "<keys>": "STRING_VALUE",
76
79
  * // },
77
80
  * // causes: [
@@ -0,0 +1,84 @@
1
+ import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
+ import { GetUserIdByUsernameRequest, GetUserIdByUsernameResponse } 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 GetUserIdByUsernameCommand}.
14
+ */
15
+ export interface GetUserIdByUsernameCommandInput extends GetUserIdByUsernameRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetUserIdByUsernameCommand}.
21
+ */
22
+ export interface GetUserIdByUsernameCommandOutput extends GetUserIdByUsernameResponse, __MetadataBearer {
23
+ }
24
+ declare const GetUserIdByUsernameCommand_base: {
25
+ new (input: GetUserIdByUsernameCommandInput): import("@smithy/smithy-client").CommandImpl<GetUserIdByUsernameCommandInput, GetUserIdByUsernameCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: GetUserIdByUsernameCommandInput): import("@smithy/smithy-client").CommandImpl<GetUserIdByUsernameCommandInput, GetUserIdByUsernameCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Resolves a public handle to the internal userId. Internal, IAM-authorized (SigV4) — Matching calls
31
+ * it to turn an "add by username" request into a swipe target.
32
+ *
33
+ * DELIBERATELY NOT EXPOSED TO CLIENTS. A handle→userId lookup any signed-in user could call is a
34
+ * username enumeration oracle: it confirms which handles exist and hands out a stable identifier for
35
+ * them. Keeping resolution server-side is what lets the caller-facing swipe-by-username response stay
36
+ * identical whether the handle exists or not.
37
+ * @example
38
+ * Use a bare-bones client and the command you need to make an API call.
39
+ * ```javascript
40
+ * import { OneHookClient, GetUserIdByUsernameCommand } from "onehook-api-client"; // ES Modules import
41
+ * // const { OneHookClient, GetUserIdByUsernameCommand } = require("onehook-api-client"); // CommonJS import
42
+ * const client = new OneHookClient(config);
43
+ * const input = { // GetUserIdByUsernameRequest
44
+ * username: "STRING_VALUE", // required
45
+ * };
46
+ * const command = new GetUserIdByUsernameCommand(input);
47
+ * const response = await client.send(command);
48
+ * // { // GetUserIdByUsernameResponse
49
+ * // userId: "STRING_VALUE", // required
50
+ * // };
51
+ *
52
+ * ```
53
+ *
54
+ * @param GetUserIdByUsernameCommandInput - {@link GetUserIdByUsernameCommandInput}
55
+ * @returns {@link GetUserIdByUsernameCommandOutput}
56
+ * @see {@link GetUserIdByUsernameCommandInput} for command's `input` shape.
57
+ * @see {@link GetUserIdByUsernameCommandOutput} for command's `response` shape.
58
+ * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
59
+ *
60
+ * @throws {@link BadRequestError} (client fault)
61
+ *
62
+ * @throws {@link NotFoundError} (client fault)
63
+ *
64
+ * @throws {@link InternalServerError} (server fault)
65
+ *
66
+ * @throws {@link OneHookServiceException}
67
+ * <p>Base exception class for all service exceptions from OneHook service.</p>
68
+ *
69
+ *
70
+ * @public
71
+ */
72
+ export declare class GetUserIdByUsernameCommand extends GetUserIdByUsernameCommand_base {
73
+ /** @internal type navigation helper, not in runtime. */
74
+ protected static __types: {
75
+ api: {
76
+ input: GetUserIdByUsernameRequest;
77
+ output: GetUserIdByUsernameResponse;
78
+ };
79
+ sdk: {
80
+ input: GetUserIdByUsernameCommandInput;
81
+ output: GetUserIdByUsernameCommandOutput;
82
+ };
83
+ };
84
+ }