onehook-api-client 1.0.12 → 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.
- package/README.md +49 -0
- package/dist-cjs/OneHook.js +14 -0
- package/dist-cjs/commands/DeletePushTokenCommand.js +21 -0
- package/dist-cjs/commands/GetChatSettingsCommand.js +21 -0
- package/dist-cjs/commands/GetNotificationPreferencesCommand.js +21 -0
- package/dist-cjs/commands/GetUserIdByUsernameCommand.js +21 -0
- package/dist-cjs/commands/RegisterPushTokenCommand.js +21 -0
- package/dist-cjs/commands/SwipeByUsernameCommand.js +21 -0
- package/dist-cjs/commands/UpdateChatSettingsCommand.js +21 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/graphql/types.js +6 -1
- package/dist-cjs/models/models_0.js +11 -6
- package/dist-cjs/protocols/Aws_restJson1.js +276 -3
- package/dist-es/OneHook.js +14 -0
- package/dist-es/commands/DeletePushTokenCommand.js +17 -0
- package/dist-es/commands/GetChatSettingsCommand.js +17 -0
- package/dist-es/commands/GetNotificationPreferencesCommand.js +17 -0
- package/dist-es/commands/GetUserIdByUsernameCommand.js +17 -0
- package/dist-es/commands/RegisterPushTokenCommand.js +17 -0
- package/dist-es/commands/SwipeByUsernameCommand.js +17 -0
- package/dist-es/commands/UpdateChatSettingsCommand.js +17 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/graphql/types.js +5 -0
- package/dist-es/models/models_0.js +10 -5
- package/dist-es/protocols/Aws_restJson1.js +260 -1
- package/dist-types/OneHook.d.ts +51 -0
- package/dist-types/OneHookClient.d.ts +9 -2
- package/dist-types/commands/DeletePushTokenCommand.d.ts +85 -0
- package/dist-types/commands/GetChatSettingsCommand.d.ts +85 -0
- package/dist-types/commands/GetMyProfileCommand.d.ts +4 -1
- package/dist-types/commands/GetNotificationPreferencesCommand.d.ts +91 -0
- package/dist-types/commands/GetPreferencesCommand.d.ts +37 -1
- package/dist-types/commands/GetProfileCommand.d.ts +4 -1
- package/dist-types/commands/GetUserIdByUsernameCommand.d.ts +84 -0
- package/dist-types/commands/RegisterPushTokenCommand.d.ts +93 -0
- package/dist-types/commands/SwipeByUsernameCommand.d.ts +93 -0
- package/dist-types/commands/UpdateChatSettingsCommand.d.ts +95 -0
- package/dist-types/commands/UpdatePreferencesCommand.d.ts +37 -1
- package/dist-types/commands/UpdateProfileCommand.d.ts +4 -1
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/graphql/types.d.ts +33 -0
- package/dist-types/models/models_0.d.ts +431 -13
- package/dist-types/protocols/Aws_restJson1.d.ts +63 -0
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
+
import { UpdateChatSettingsRequest, UpdateChatSettingsResponse } 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 UpdateChatSettingsCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface UpdateChatSettingsCommandInput extends UpdateChatSettingsRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link UpdateChatSettingsCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface UpdateChatSettingsCommandOutput extends UpdateChatSettingsResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const UpdateChatSettingsCommand_base: {
|
|
25
|
+
new (input: UpdateChatSettingsCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateChatSettingsCommandInput, UpdateChatSettingsCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (...[input]: [] | [UpdateChatSettingsCommandInput]): import("@smithy/smithy-client").CommandImpl<UpdateChatSettingsCommandInput, UpdateChatSettingsCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Partially update the authenticated caller's chat settings. Only the fields present in the
|
|
31
|
+
* request are changed; absent fields are left untouched. Returns the full effective settings.
|
|
32
|
+
* @example
|
|
33
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
34
|
+
* ```javascript
|
|
35
|
+
* import { OneHookClient, UpdateChatSettingsCommand } from "onehook-api-client"; // ES Modules import
|
|
36
|
+
* // const { OneHookClient, UpdateChatSettingsCommand } = require("onehook-api-client"); // CommonJS import
|
|
37
|
+
* const client = new OneHookClient(config);
|
|
38
|
+
* const input = { // UpdateChatSettingsRequest
|
|
39
|
+
* messageNotifications: true || false,
|
|
40
|
+
* showPreviews: true || false,
|
|
41
|
+
* reactionNotifications: true || false,
|
|
42
|
+
* readReceipts: true || false,
|
|
43
|
+
* typingIndicators: true || false,
|
|
44
|
+
* lastSeenVisibility: "EVERYONE" || "MATCHES" || "NOBODY",
|
|
45
|
+
* screenshotProtection: true || false,
|
|
46
|
+
* defaultDisappearingSeconds: Number("int"),
|
|
47
|
+
* };
|
|
48
|
+
* const command = new UpdateChatSettingsCommand(input);
|
|
49
|
+
* const response = await client.send(command);
|
|
50
|
+
* // { // UpdateChatSettingsResponse
|
|
51
|
+
* // settings: { // ChatSettings
|
|
52
|
+
* // messageNotifications: true || false,
|
|
53
|
+
* // showPreviews: true || false,
|
|
54
|
+
* // reactionNotifications: true || false,
|
|
55
|
+
* // readReceipts: true || false,
|
|
56
|
+
* // typingIndicators: true || false,
|
|
57
|
+
* // lastSeenVisibility: "EVERYONE" || "MATCHES" || "NOBODY",
|
|
58
|
+
* // screenshotProtection: true || false,
|
|
59
|
+
* // defaultDisappearingSeconds: Number("int"),
|
|
60
|
+
* // },
|
|
61
|
+
* // };
|
|
62
|
+
*
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @param UpdateChatSettingsCommandInput - {@link UpdateChatSettingsCommandInput}
|
|
66
|
+
* @returns {@link UpdateChatSettingsCommandOutput}
|
|
67
|
+
* @see {@link UpdateChatSettingsCommandInput} for command's `input` shape.
|
|
68
|
+
* @see {@link UpdateChatSettingsCommandOutput} for command's `response` shape.
|
|
69
|
+
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link BadRequestError} (client fault)
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link ForbiddenError} (client fault)
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link InternalServerError} (server fault)
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link OneHookServiceException}
|
|
78
|
+
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
79
|
+
*
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export declare class UpdateChatSettingsCommand extends UpdateChatSettingsCommand_base {
|
|
84
|
+
/** @internal type navigation helper, not in runtime. */
|
|
85
|
+
protected static __types: {
|
|
86
|
+
api: {
|
|
87
|
+
input: UpdateChatSettingsRequest;
|
|
88
|
+
output: UpdateChatSettingsResponse;
|
|
89
|
+
};
|
|
90
|
+
sdk: {
|
|
91
|
+
input: UpdateChatSettingsCommandInput;
|
|
92
|
+
output: UpdateChatSettingsCommandOutput;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
}
|
|
@@ -40,9 +40,45 @@ declare const UpdatePreferencesCommand_base: {
|
|
|
40
40
|
* minAge: Number("int"),
|
|
41
41
|
* maxAge: Number("int"),
|
|
42
42
|
* maxDistanceKm: Number("int"),
|
|
43
|
-
*
|
|
43
|
+
* interestedInGenders: [ // StringList
|
|
44
44
|
* "STRING_VALUE",
|
|
45
45
|
* ],
|
|
46
|
+
* genders: [
|
|
47
|
+
* "STRING_VALUE",
|
|
48
|
+
* ],
|
|
49
|
+
* relationshipType: "STRING_VALUE",
|
|
50
|
+
* wantsKids: "STRING_VALUE",
|
|
51
|
+
* familyPlans: "STRING_VALUE",
|
|
52
|
+
* verifiedOnly: true || false,
|
|
53
|
+
* smoking: "STRING_VALUE",
|
|
54
|
+
* drinking: "STRING_VALUE",
|
|
55
|
+
* cannabis: "STRING_VALUE",
|
|
56
|
+
* drugs: "STRING_VALUE",
|
|
57
|
+
* exercise: "STRING_VALUE",
|
|
58
|
+
* religion: "STRING_VALUE",
|
|
59
|
+
* educationLevel: "STRING_VALUE",
|
|
60
|
+
* politicalView: "STRING_VALUE",
|
|
61
|
+
* starSigns: [
|
|
62
|
+
* "STRING_VALUE",
|
|
63
|
+
* ],
|
|
64
|
+
* preferredLanguages: [
|
|
65
|
+
* "STRING_VALUE",
|
|
66
|
+
* ],
|
|
67
|
+
* interests: [
|
|
68
|
+
* "STRING_VALUE",
|
|
69
|
+
* ],
|
|
70
|
+
* minHeight: Number("int"),
|
|
71
|
+
* maxHeight: Number("int"),
|
|
72
|
+
* dealbreakers: "<StringList>",
|
|
73
|
+
* requirePhoto: true || false,
|
|
74
|
+
* requireBio: true || false,
|
|
75
|
+
* requireRecentlyActive: true || false,
|
|
76
|
+
* discoverable: true || false,
|
|
77
|
+
* incognito: true || false,
|
|
78
|
+
* distanceUnit: "STRING_VALUE",
|
|
79
|
+
* notifyMatches: true || false,
|
|
80
|
+
* notifyLikes: true || false,
|
|
81
|
+
* notifyDailyPicks: true || false,
|
|
46
82
|
* };
|
|
47
83
|
* const command = new UpdatePreferencesCommand(input);
|
|
48
84
|
* const response = await client.send(command);
|
|
@@ -58,6 +58,9 @@ declare const UpdateProfileCommand_base: {
|
|
|
58
58
|
* pictures: [
|
|
59
59
|
* "STRING_VALUE",
|
|
60
60
|
* ],
|
|
61
|
+
* pictureTransforms: { // StringMap
|
|
62
|
+
* "<keys>": "STRING_VALUE",
|
|
63
|
+
* },
|
|
61
64
|
* videos: [
|
|
62
65
|
* "STRING_VALUE",
|
|
63
66
|
* ],
|
|
@@ -74,7 +77,7 @@ declare const UpdateProfileCommand_base: {
|
|
|
74
77
|
* imageKey: "STRING_VALUE",
|
|
75
78
|
* },
|
|
76
79
|
* ],
|
|
77
|
-
* socialLinks: {
|
|
80
|
+
* socialLinks: {
|
|
78
81
|
* "<keys>": "STRING_VALUE",
|
|
79
82
|
* },
|
|
80
83
|
* openers: [ // OpenerList
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
export * from "./DeleteMatchMessagesCommand";
|
|
2
|
+
export * from "./DeletePushTokenCommand";
|
|
3
|
+
export * from "./GetChatSettingsCommand";
|
|
2
4
|
export * from "./GetParticipantRegistryCommand";
|
|
3
5
|
export * from "./ListMyDevicesCommand";
|
|
4
6
|
export * from "./RegisterDeviceCommand";
|
|
7
|
+
export * from "./RegisterPushTokenCommand";
|
|
5
8
|
export * from "./RevokeDeviceCommand";
|
|
9
|
+
export * from "./UpdateChatSettingsCommand";
|
|
6
10
|
export * from "./AuthSocialCommand";
|
|
7
11
|
export * from "./GenerateInviteCommand";
|
|
8
12
|
export * from "./GetCredentialReadinessCommand";
|
|
9
13
|
export * from "./GetUserCommand";
|
|
10
14
|
export * from "./GetUserByEmailCommand";
|
|
15
|
+
export * from "./GetUserIdByUsernameCommand";
|
|
11
16
|
export * from "./LinkEmailCommand";
|
|
12
17
|
export * from "./LinkSocialCommand";
|
|
13
18
|
export * from "./RegisterPhoneCommand";
|
|
@@ -20,10 +25,12 @@ export * from "./UpdatePhoneNumberCommand";
|
|
|
20
25
|
export * from "./UpdateUsernameCommand";
|
|
21
26
|
export * from "./ValidateInviteCommand";
|
|
22
27
|
export * from "./DiscoverCommand";
|
|
28
|
+
export * from "./GetNotificationPreferencesCommand";
|
|
23
29
|
export * from "./GetPreferencesCommand";
|
|
24
30
|
export * from "./IndexLocationCommand";
|
|
25
31
|
export * from "./RemoveLocationCommand";
|
|
26
32
|
export * from "./SwipeCommand";
|
|
33
|
+
export * from "./SwipeByUsernameCommand";
|
|
27
34
|
export * from "./UpdatePreferencesCommand";
|
|
28
35
|
export * from "./CompleteLivenessSessionCommand";
|
|
29
36
|
export * from "./CreateLivenessSessionCommand";
|
|
@@ -84,6 +84,7 @@ export type Mutation = {
|
|
|
84
84
|
deleteMessage?: Maybe<DeletedMessage>;
|
|
85
85
|
markAsDelivered?: Maybe<MessageReceipt>;
|
|
86
86
|
markAsRead?: Maybe<MessageReceipt>;
|
|
87
|
+
publishNotification?: Maybe<Notification>;
|
|
87
88
|
requestKeyRecovery?: Maybe<KeyRecoverySession>;
|
|
88
89
|
sendMessage?: Maybe<Message>;
|
|
89
90
|
updateKeyRecovery?: Maybe<KeyRecoverySession>;
|
|
@@ -104,6 +105,14 @@ export type MutationMarkAsReadArgs = {
|
|
|
104
105
|
timestamp: Scalars['AWSTimestamp']['input'];
|
|
105
106
|
userId: Scalars['String']['input'];
|
|
106
107
|
};
|
|
108
|
+
export type MutationPublishNotificationArgs = {
|
|
109
|
+
body: Scalars['String']['input'];
|
|
110
|
+
id?: InputMaybe<Scalars['ID']['input']>;
|
|
111
|
+
kind: NotificationKind;
|
|
112
|
+
matchId?: InputMaybe<Scalars['ID']['input']>;
|
|
113
|
+
title: Scalars['String']['input'];
|
|
114
|
+
userId: Scalars['ID']['input'];
|
|
115
|
+
};
|
|
107
116
|
export type MutationRequestKeyRecoveryArgs = {
|
|
108
117
|
challenge: Scalars['String']['input'];
|
|
109
118
|
sourceDeviceId: Scalars['ID']['input'];
|
|
@@ -121,6 +130,26 @@ export type MutationUpdateKeyRecoveryArgs = {
|
|
|
121
130
|
status: KeyRecoveryStatus;
|
|
122
131
|
targetDeviceId: Scalars['ID']['input'];
|
|
123
132
|
};
|
|
133
|
+
export type Notification = {
|
|
134
|
+
__typename?: 'Notification';
|
|
135
|
+
/** Server-authored copy. Never message content (the backend cannot read it). */
|
|
136
|
+
body: Scalars['String']['output'];
|
|
137
|
+
createdAt: Scalars['AWSTimestamp']['output'];
|
|
138
|
+
/** Idempotency/dedup key, so a redelivered event renders once. */
|
|
139
|
+
id: Scalars['ID']['output'];
|
|
140
|
+
kind: NotificationKind;
|
|
141
|
+
/** Present on MUTUAL_MATCH so the client can deep-link to the conversation. */
|
|
142
|
+
matchId?: Maybe<Scalars['ID']['output']>;
|
|
143
|
+
title: Scalars['String']['output'];
|
|
144
|
+
/** Recipient. Always the subscriber's own subject — the resolver enforces it. */
|
|
145
|
+
userId: Scalars['ID']['output'];
|
|
146
|
+
};
|
|
147
|
+
export declare enum NotificationKind {
|
|
148
|
+
/** Both people liked each other and State created the hook. */
|
|
149
|
+
MutualMatch = "MUTUAL_MATCH",
|
|
150
|
+
/** Someone liked this user. Does NOT reveal whether the like was reciprocated. */
|
|
151
|
+
ProfileLiked = "PROFILE_LIKED"
|
|
152
|
+
}
|
|
124
153
|
export type Query = {
|
|
125
154
|
__typename?: 'Query';
|
|
126
155
|
getKeyRecoveryRequests?: Maybe<Array<Maybe<KeyRecoverySession>>>;
|
|
@@ -145,6 +174,7 @@ export type Subscription = {
|
|
|
145
174
|
onMessageDeleted?: Maybe<DeletedMessage>;
|
|
146
175
|
onMessageStatusUpdate?: Maybe<MessageReceipt>;
|
|
147
176
|
onNewMessage?: Maybe<Message>;
|
|
177
|
+
onNotification?: Maybe<Notification>;
|
|
148
178
|
};
|
|
149
179
|
export type SubscriptionOnKeyRecoveryRequestedArgs = {
|
|
150
180
|
sourceDeviceId: Scalars['ID']['input'];
|
|
@@ -163,3 +193,6 @@ export type SubscriptionOnMessageStatusUpdateArgs = {
|
|
|
163
193
|
export type SubscriptionOnNewMessageArgs = {
|
|
164
194
|
matchId: Scalars['ID']['input'];
|
|
165
195
|
};
|
|
196
|
+
export type SubscriptionOnNotificationArgs = {
|
|
197
|
+
userId: Scalars['ID']['input'];
|
|
198
|
+
};
|