onehook-api-client 1.0.14 → 1.0.16
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 +28 -0
- package/dist-cjs/OneHook.js +8 -0
- package/dist-cjs/commands/CreateMediaDownloadUrlCommand.js +21 -0
- package/dist-cjs/commands/CreateMediaUploadUrlCommand.js +21 -0
- package/dist-cjs/commands/GetReceivedLikesCommand.js +21 -0
- package/dist-cjs/commands/GetRosesCommand.js +21 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/models/models_0.js +7 -1
- package/dist-cjs/protocols/Aws_restJson1.js +130 -2
- package/dist-es/OneHook.js +8 -0
- package/dist-es/commands/CreateMediaDownloadUrlCommand.js +17 -0
- package/dist-es/commands/CreateMediaUploadUrlCommand.js +17 -0
- package/dist-es/commands/GetReceivedLikesCommand.js +17 -0
- package/dist-es/commands/GetRosesCommand.js +17 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/models/models_0.js +6 -0
- package/dist-es/protocols/Aws_restJson1.js +119 -0
- package/dist-types/OneHook.d.ts +30 -0
- package/dist-types/OneHookClient.d.ts +6 -2
- package/dist-types/commands/CreateMediaDownloadUrlCommand.d.ts +87 -0
- package/dist-types/commands/CreateMediaUploadUrlCommand.d.ts +92 -0
- package/dist-types/commands/GetReceivedLikesCommand.d.ts +89 -0
- package/dist-types/commands/GetRosesCommand.d.ts +85 -0
- package/dist-types/commands/SwipeCommand.d.ts +4 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +205 -15
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- package/package.json +1 -1
|
@@ -3,14 +3,24 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-cli
|
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface CreateMediaDownloadUrlRequest {
|
|
7
7
|
matchId: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Must be under `<matchId>/`; anything else is rejected as forbidden.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
objectKey: string | undefined;
|
|
8
13
|
}
|
|
9
14
|
/**
|
|
10
15
|
* @public
|
|
11
16
|
*/
|
|
12
|
-
export interface
|
|
13
|
-
|
|
17
|
+
export interface CreateMediaDownloadUrlResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Presigned GET returning ciphertext.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
downloadUrl: string | undefined;
|
|
23
|
+
expiresInSeconds: number | undefined;
|
|
14
24
|
}
|
|
15
25
|
/**
|
|
16
26
|
* @public
|
|
@@ -48,6 +58,85 @@ export declare class InternalServerError extends __BaseException {
|
|
|
48
58
|
*/
|
|
49
59
|
constructor(opts: __ExceptionOptionType<InternalServerError, __BaseException>);
|
|
50
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export declare class NotFoundError extends __BaseException {
|
|
65
|
+
readonly name: "NotFoundError";
|
|
66
|
+
readonly $fault: "client";
|
|
67
|
+
error: string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
constructor(opts: __ExceptionOptionType<NotFoundError, __BaseException>);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
* @enum
|
|
76
|
+
*/
|
|
77
|
+
export declare const MediaKind: {
|
|
78
|
+
readonly AUDIO: "AUDIO";
|
|
79
|
+
readonly FILE: "FILE";
|
|
80
|
+
readonly IMAGE: "IMAGE";
|
|
81
|
+
readonly VIDEO: "VIDEO";
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
export type MediaKind = typeof MediaKind[keyof typeof MediaKind];
|
|
87
|
+
/**
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export interface CreateMediaUploadUrlRequest {
|
|
91
|
+
/**
|
|
92
|
+
* Conversation the attachment belongs to. The caller must be a participant.
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
matchId: string | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Byte length of the CIPHERTEXT to upload, which the presigned URL is bound to.
|
|
98
|
+
*
|
|
99
|
+
* 100 MiB plus an allowance for the AES-GCM tag. A hard cap here is what stops a participant from
|
|
100
|
+
* parking arbitrary amounts of data in the bucket.
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
contentLength: number | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Kind of attachment. Carried so the service can apply per-kind limits; the authoritative kind used
|
|
106
|
+
* for rendering lives in the encrypted payload, where the service cannot see it.
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
109
|
+
kind: MediaKind | undefined;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
export interface CreateMediaUploadUrlResponse {
|
|
115
|
+
/**
|
|
116
|
+
* `<matchId>/<uuid>`. The client puts this in the encrypted envelope so the recipient can fetch
|
|
117
|
+
* it; the matchId prefix is what makes prefix deletion on HookReleased possible.
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
objectKey: string | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Presigned PUT, valid only for the requested byte length.
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
uploadUrl: string | undefined;
|
|
126
|
+
expiresInSeconds: number | undefined;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
export interface DeleteMatchMessagesRequest {
|
|
132
|
+
matchId: string | undefined;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* @public
|
|
136
|
+
*/
|
|
137
|
+
export interface DeleteMatchMessagesResponse {
|
|
138
|
+
deleted: number | undefined;
|
|
139
|
+
}
|
|
51
140
|
/**
|
|
52
141
|
* @public
|
|
53
142
|
*/
|
|
@@ -74,18 +163,6 @@ export interface DeletePushTokenResponse {
|
|
|
74
163
|
*/
|
|
75
164
|
deleted: boolean | undefined;
|
|
76
165
|
}
|
|
77
|
-
/**
|
|
78
|
-
* @public
|
|
79
|
-
*/
|
|
80
|
-
export declare class NotFoundError extends __BaseException {
|
|
81
|
-
readonly name: "NotFoundError";
|
|
82
|
-
readonly $fault: "client";
|
|
83
|
-
error: string | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* @internal
|
|
86
|
-
*/
|
|
87
|
-
constructor(opts: __ExceptionOptionType<NotFoundError, __BaseException>);
|
|
88
|
-
}
|
|
89
166
|
/**
|
|
90
167
|
* @public
|
|
91
168
|
*/
|
|
@@ -806,6 +883,71 @@ export interface UserPreferencesResponse {
|
|
|
806
883
|
notifyLikes?: boolean | undefined;
|
|
807
884
|
notifyDailyPicks?: boolean | undefined;
|
|
808
885
|
}
|
|
886
|
+
/**
|
|
887
|
+
* One received, still-pending like: who sent it, the comment they left, and which profile element
|
|
888
|
+
* it was attached to.
|
|
889
|
+
* @public
|
|
890
|
+
*/
|
|
891
|
+
export interface ReceivedLike {
|
|
892
|
+
/**
|
|
893
|
+
* The user who liked the caller.
|
|
894
|
+
* @public
|
|
895
|
+
*/
|
|
896
|
+
fromUserId: string | undefined;
|
|
897
|
+
/**
|
|
898
|
+
* The liker's comment. NULL only for a `SwipeByUsername` like (recorded with no profile element
|
|
899
|
+
* in view), which carries no comment.
|
|
900
|
+
* @public
|
|
901
|
+
*/
|
|
902
|
+
comment?: string | undefined;
|
|
903
|
+
/**
|
|
904
|
+
* The KIND of element the comment is attached to: PHOTO | VIDEO | PROMPT | INTEREST | BIO |
|
|
905
|
+
* VOICE. NULL for a `SwipeByUsername` like.
|
|
906
|
+
* @public
|
|
907
|
+
*/
|
|
908
|
+
likeTargetType?: string | undefined;
|
|
909
|
+
/**
|
|
910
|
+
* Which specific element the comment is attached to (media key / promptId / interest value /
|
|
911
|
+
* "bio"), per `likeTargetType`. NULL for a `SwipeByUsername` like.
|
|
912
|
+
* @public
|
|
913
|
+
*/
|
|
914
|
+
likeTargetRef?: string | undefined;
|
|
915
|
+
/**
|
|
916
|
+
* When the like was recorded, ISO-8601 (UTC).
|
|
917
|
+
* @public
|
|
918
|
+
*/
|
|
919
|
+
createdAt: string | undefined;
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* The pending likes the caller has received, newest first, plus their count. See
|
|
923
|
+
* `GetReceivedLikes`.
|
|
924
|
+
* @public
|
|
925
|
+
*/
|
|
926
|
+
export interface GetReceivedLikesResponse {
|
|
927
|
+
likes: (ReceivedLike)[] | undefined;
|
|
928
|
+
count: number | undefined;
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* The caller's rose availability for the current UTC day. See `GetRoses`.
|
|
932
|
+
* @public
|
|
933
|
+
*/
|
|
934
|
+
export interface GetRosesResponse {
|
|
935
|
+
/**
|
|
936
|
+
* Roses the caller may still send today (never negative).
|
|
937
|
+
* @public
|
|
938
|
+
*/
|
|
939
|
+
remaining: number | undefined;
|
|
940
|
+
/**
|
|
941
|
+
* The caller's per-day rose allowance, from their stored tier (Must=1, Super=3, Infinity=10).
|
|
942
|
+
* @public
|
|
943
|
+
*/
|
|
944
|
+
limit: number | undefined;
|
|
945
|
+
/**
|
|
946
|
+
* The next UTC midnight (ISO-8601), when `remaining` resets to `limit`.
|
|
947
|
+
* @public
|
|
948
|
+
*/
|
|
949
|
+
resetsAt: string | undefined;
|
|
950
|
+
}
|
|
809
951
|
/**
|
|
810
952
|
* @public
|
|
811
953
|
*/
|
|
@@ -833,6 +975,54 @@ export interface SwipeRequest {
|
|
|
833
975
|
* @public
|
|
834
976
|
*/
|
|
835
977
|
viewedSection?: string | undefined;
|
|
978
|
+
/**
|
|
979
|
+
* The like's comment. In the Hinge-style model a like is never bare — it must carry a comment
|
|
980
|
+
* attached to a specific element of the target's profile.
|
|
981
|
+
*
|
|
982
|
+
* REQUIRED when `direction == RIGHT`: a RIGHT swipe with a blank/missing `comment` is rejected
|
|
983
|
+
* (HTTP 400). Trimmed server-side and capped at 500 characters (longer is rejected).
|
|
984
|
+
*
|
|
985
|
+
* MUST be absent for `direction == LEFT` (a pass). Any value a client sends on a LEFT swipe is
|
|
986
|
+
* IGNORED and never persisted. (`SwipeByUsername` is the one exempt like-path — it records a
|
|
987
|
+
* like with no profile element in view and therefore no comment.)
|
|
988
|
+
* @public
|
|
989
|
+
*/
|
|
990
|
+
comment?: string | undefined;
|
|
991
|
+
/**
|
|
992
|
+
* Which KIND of profile element the `comment` is attached to. REQUIRED (and validated against
|
|
993
|
+
* the allowlist) when `direction == RIGHT`; an unknown value is rejected (HTTP 400). Ignored on
|
|
994
|
+
* a LEFT swipe.
|
|
995
|
+
*
|
|
996
|
+
* Valid values: PHOTO | VIDEO | PROMPT | INTEREST | BIO | VOICE.
|
|
997
|
+
* @public
|
|
998
|
+
*/
|
|
999
|
+
likeTargetType?: string | undefined;
|
|
1000
|
+
/**
|
|
1001
|
+
* Which SPECIFIC element the `comment` is attached to, interpreted per `likeTargetType`:
|
|
1002
|
+
* * PHOTO / VIDEO / VOICE → the media object key,
|
|
1003
|
+
* * PROMPT → the promptId,
|
|
1004
|
+
* * INTEREST → the interest value,
|
|
1005
|
+
* * BIO → not needed (empty or the literal "bio").
|
|
1006
|
+
*
|
|
1007
|
+
* REQUIRED for every `likeTargetType` EXCEPT BIO when `direction == RIGHT`. Ignored on a LEFT
|
|
1008
|
+
* swipe. Capped at 512 characters.
|
|
1009
|
+
* @public
|
|
1010
|
+
*/
|
|
1011
|
+
likeTargetRef?: string | undefined;
|
|
1012
|
+
/**
|
|
1013
|
+
* The KIND of like this swipe records. Optional; defaults to "LIKE" when absent.
|
|
1014
|
+
*
|
|
1015
|
+
* Valid values: "LIKE" (an ordinary like) | "ROSE" (a premium, daily-limited like). Validated
|
|
1016
|
+
* server-side against that allowlist — an unknown value is rejected (HTTP 400).
|
|
1017
|
+
*
|
|
1018
|
+
* A ROSE is still a LIKE for matching purposes: a reciprocated rose creates a match exactly as a
|
|
1019
|
+
* like does. It must accompany a RIGHT swipe, and it is subject to a per-tier DAILY QUOTA
|
|
1020
|
+
* (Must=1, Super=3, Infinity=10) enforced server-side from the caller's STORED subscription tier —
|
|
1021
|
+
* never a tier value sent by the client. Over quota returns HTTP 429. The tier-aware comment rules
|
|
1022
|
+
* are identical to an ordinary like (Must must write >= 10 words; Super/Infinity may send none).
|
|
1023
|
+
* @public
|
|
1024
|
+
*/
|
|
1025
|
+
likeKind?: string | undefined;
|
|
836
1026
|
}
|
|
837
1027
|
/**
|
|
838
1028
|
* @public
|
|
@@ -2,6 +2,8 @@ import { AuthSocialCommandInput, AuthSocialCommandOutput } from "../commands/Aut
|
|
|
2
2
|
import { CompleteLivenessSessionCommandInput, CompleteLivenessSessionCommandOutput } from "../commands/CompleteLivenessSessionCommand";
|
|
3
3
|
import { CompleteOnboardingCommandInput, CompleteOnboardingCommandOutput } from "../commands/CompleteOnboardingCommand";
|
|
4
4
|
import { CreateLivenessSessionCommandInput, CreateLivenessSessionCommandOutput } from "../commands/CreateLivenessSessionCommand";
|
|
5
|
+
import { CreateMediaDownloadUrlCommandInput, CreateMediaDownloadUrlCommandOutput } from "../commands/CreateMediaDownloadUrlCommand";
|
|
6
|
+
import { CreateMediaUploadUrlCommandInput, CreateMediaUploadUrlCommandOutput } from "../commands/CreateMediaUploadUrlCommand";
|
|
5
7
|
import { DeleteMatchMessagesCommandInput, DeleteMatchMessagesCommandOutput } from "../commands/DeleteMatchMessagesCommand";
|
|
6
8
|
import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "../commands/DeleteProfileCommand";
|
|
7
9
|
import { DeletePushTokenCommandInput, DeletePushTokenCommandOutput } from "../commands/DeletePushTokenCommand";
|
|
@@ -18,6 +20,8 @@ import { GetNotificationPreferencesCommandInput, GetNotificationPreferencesComma
|
|
|
18
20
|
import { GetParticipantRegistryCommandInput, GetParticipantRegistryCommandOutput } from "../commands/GetParticipantRegistryCommand";
|
|
19
21
|
import { GetPreferencesCommandInput, GetPreferencesCommandOutput } from "../commands/GetPreferencesCommand";
|
|
20
22
|
import { GetProfileCommandInput, GetProfileCommandOutput } from "../commands/GetProfileCommand";
|
|
23
|
+
import { GetReceivedLikesCommandInput, GetReceivedLikesCommandOutput } from "../commands/GetReceivedLikesCommand";
|
|
24
|
+
import { GetRosesCommandInput, GetRosesCommandOutput } from "../commands/GetRosesCommand";
|
|
21
25
|
import { GetStateCommandInput, GetStateCommandOutput } from "../commands/GetStateCommand";
|
|
22
26
|
import { GetUserByEmailCommandInput, GetUserByEmailCommandOutput } from "../commands/GetUserByEmailCommand";
|
|
23
27
|
import { GetUserCommandInput, GetUserCommandOutput } from "../commands/GetUserCommand";
|
|
@@ -49,6 +53,14 @@ import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "../commands/U
|
|
|
49
53
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "../commands/ValidateInviteCommand";
|
|
50
54
|
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
51
55
|
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
56
|
+
/**
|
|
57
|
+
* serializeAws_restJson1CreateMediaDownloadUrlCommand
|
|
58
|
+
*/
|
|
59
|
+
export declare const se_CreateMediaDownloadUrlCommand: (input: CreateMediaDownloadUrlCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
60
|
+
/**
|
|
61
|
+
* serializeAws_restJson1CreateMediaUploadUrlCommand
|
|
62
|
+
*/
|
|
63
|
+
export declare const se_CreateMediaUploadUrlCommand: (input: CreateMediaUploadUrlCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
52
64
|
/**
|
|
53
65
|
* serializeAws_restJson1DeleteMatchMessagesCommand
|
|
54
66
|
*/
|
|
@@ -165,6 +177,14 @@ export declare const se_GetNotificationPreferencesCommand: (input: GetNotificati
|
|
|
165
177
|
* serializeAws_restJson1GetPreferencesCommand
|
|
166
178
|
*/
|
|
167
179
|
export declare const se_GetPreferencesCommand: (input: GetPreferencesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
180
|
+
/**
|
|
181
|
+
* serializeAws_restJson1GetReceivedLikesCommand
|
|
182
|
+
*/
|
|
183
|
+
export declare const se_GetReceivedLikesCommand: (input: GetReceivedLikesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
184
|
+
/**
|
|
185
|
+
* serializeAws_restJson1GetRosesCommand
|
|
186
|
+
*/
|
|
187
|
+
export declare const se_GetRosesCommand: (input: GetRosesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
168
188
|
/**
|
|
169
189
|
* serializeAws_restJson1IndexLocationCommand
|
|
170
190
|
*/
|
|
@@ -245,6 +265,14 @@ export declare const se_UnhookCommand: (input: UnhookCommandInput, context: __Se
|
|
|
245
265
|
* serializeAws_restJson1UpgradeUserCommand
|
|
246
266
|
*/
|
|
247
267
|
export declare const se_UpgradeUserCommand: (input: UpgradeUserCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
268
|
+
/**
|
|
269
|
+
* deserializeAws_restJson1CreateMediaDownloadUrlCommand
|
|
270
|
+
*/
|
|
271
|
+
export declare const de_CreateMediaDownloadUrlCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateMediaDownloadUrlCommandOutput>;
|
|
272
|
+
/**
|
|
273
|
+
* deserializeAws_restJson1CreateMediaUploadUrlCommand
|
|
274
|
+
*/
|
|
275
|
+
export declare const de_CreateMediaUploadUrlCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateMediaUploadUrlCommandOutput>;
|
|
248
276
|
/**
|
|
249
277
|
* deserializeAws_restJson1DeleteMatchMessagesCommand
|
|
250
278
|
*/
|
|
@@ -361,6 +389,14 @@ export declare const de_GetNotificationPreferencesCommand: (output: __HttpRespon
|
|
|
361
389
|
* deserializeAws_restJson1GetPreferencesCommand
|
|
362
390
|
*/
|
|
363
391
|
export declare const de_GetPreferencesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetPreferencesCommandOutput>;
|
|
392
|
+
/**
|
|
393
|
+
* deserializeAws_restJson1GetReceivedLikesCommand
|
|
394
|
+
*/
|
|
395
|
+
export declare const de_GetReceivedLikesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetReceivedLikesCommandOutput>;
|
|
396
|
+
/**
|
|
397
|
+
* deserializeAws_restJson1GetRosesCommand
|
|
398
|
+
*/
|
|
399
|
+
export declare const de_GetRosesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetRosesCommandOutput>;
|
|
364
400
|
/**
|
|
365
401
|
* deserializeAws_restJson1IndexLocationCommand
|
|
366
402
|
*/
|
package/package.json
CHANGED