onehook-api-client 1.0.5 → 1.0.7

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 (35) hide show
  1. package/README.md +49 -7
  2. package/dist-cjs/OneHook.js +12 -0
  3. package/dist-cjs/commands/GenerateDownloadUrlCommand.js +21 -0
  4. package/dist-cjs/commands/GetLivenessStatusCommand.js +21 -0
  5. package/dist-cjs/commands/GetParticipantRegistryCommand.js +21 -0
  6. package/dist-cjs/commands/ListMyDevicesCommand.js +21 -0
  7. package/dist-cjs/commands/RegisterDeviceCommand.js +21 -0
  8. package/dist-cjs/commands/RevokeDeviceCommand.js +21 -0
  9. package/dist-cjs/commands/index.js +6 -0
  10. package/dist-cjs/models/models_0.js +21 -1
  11. package/dist-cjs/protocols/Aws_restJson1.js +204 -2
  12. package/dist-es/OneHook.js +12 -0
  13. package/dist-es/commands/GenerateDownloadUrlCommand.js +17 -0
  14. package/dist-es/commands/GetLivenessStatusCommand.js +17 -0
  15. package/dist-es/commands/GetParticipantRegistryCommand.js +17 -0
  16. package/dist-es/commands/ListMyDevicesCommand.js +17 -0
  17. package/dist-es/commands/RegisterDeviceCommand.js +17 -0
  18. package/dist-es/commands/RevokeDeviceCommand.js +17 -0
  19. package/dist-es/commands/index.js +6 -0
  20. package/dist-es/models/models_0.js +19 -0
  21. package/dist-es/protocols/Aws_restJson1.js +191 -1
  22. package/dist-types/OneHook.d.ts +44 -0
  23. package/dist-types/OneHookClient.d.ts +8 -2
  24. package/dist-types/commands/GenerateDownloadUrlCommand.d.ts +82 -0
  25. package/dist-types/commands/GetLivenessStatusCommand.d.ts +77 -0
  26. package/dist-types/commands/GetMyProfileCommand.d.ts +4 -1
  27. package/dist-types/commands/GetParticipantRegistryCommand.d.ts +99 -0
  28. package/dist-types/commands/GetProfileCommand.d.ts +4 -1
  29. package/dist-types/commands/ListMyDevicesCommand.d.ts +89 -0
  30. package/dist-types/commands/RegisterDeviceCommand.d.ts +112 -0
  31. package/dist-types/commands/RevokeDeviceCommand.d.ts +81 -0
  32. package/dist-types/commands/index.d.ts +6 -0
  33. package/dist-types/models/models_0.d.ts +235 -0
  34. package/dist-types/protocols/Aws_restJson1.d.ts +54 -0
  35. package/package.json +1 -1
@@ -83,6 +83,201 @@ export interface DeleteMatchMessagesRequest {
83
83
  export interface DeleteMatchMessagesResponse {
84
84
  deleted: number | undefined;
85
85
  }
86
+ /**
87
+ * @public
88
+ */
89
+ export interface GetParticipantRegistryRequest {
90
+ userId: string | undefined;
91
+ /**
92
+ * The match the caller shares with the target user; used to authorize the read.
93
+ * @public
94
+ */
95
+ matchId: string | undefined;
96
+ }
97
+ /**
98
+ * Immutable per-account history key. Registered first-write-wins and never overwritten.
99
+ * @public
100
+ */
101
+ export interface AccountHistoryKey {
102
+ keyId: string | undefined;
103
+ /**
104
+ * A device long-term public key, SPKI DER encoded then base64 (standard or URL-safe alphabet).
105
+ * @public
106
+ */
107
+ publicKey: string | undefined;
108
+ }
109
+ /**
110
+ * @public
111
+ * @enum
112
+ */
113
+ export declare const Platform: {
114
+ readonly ANDROID: "ANDROID";
115
+ readonly IOS: "IOS";
116
+ readonly WEB: "WEB";
117
+ };
118
+ /**
119
+ * @public
120
+ */
121
+ export type Platform = typeof Platform[keyof typeof Platform];
122
+ /**
123
+ * @public
124
+ */
125
+ export interface Device {
126
+ /**
127
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
128
+ * @public
129
+ */
130
+ deviceId: string | undefined;
131
+ /**
132
+ * A device long-term public key, SPKI DER encoded then base64 (standard or URL-safe alphabet).
133
+ * @public
134
+ */
135
+ publicKey: string | undefined;
136
+ /**
137
+ * Client platform the device runs on.
138
+ * @public
139
+ */
140
+ platform: Platform | undefined;
141
+ /**
142
+ * Human-friendly device label shown in the "your devices" UI.
143
+ * @public
144
+ */
145
+ displayName?: string | undefined;
146
+ /**
147
+ * Highest E2EE envelope/wire version this device understands. Bumped as the protocol evolves.
148
+ * @public
149
+ */
150
+ maxEnvelopeVersion: number | undefined;
151
+ /**
152
+ * Epoch-millis the device was first registered.
153
+ * @public
154
+ */
155
+ createdAt: number | undefined;
156
+ /**
157
+ * Epoch-millis the device was last seen (updated on every re-register).
158
+ * @public
159
+ */
160
+ lastSeenAt: number | undefined;
161
+ /**
162
+ * True for the most recently registered device of the user.
163
+ * @public
164
+ */
165
+ current: boolean | undefined;
166
+ }
167
+ /**
168
+ * @public
169
+ */
170
+ export interface GetParticipantRegistryResponse {
171
+ userId: string | undefined;
172
+ devices: (Device)[] | undefined;
173
+ /**
174
+ * Immutable per-account history key. Registered first-write-wins and never overwritten.
175
+ * @public
176
+ */
177
+ accountHistoryKey?: AccountHistoryKey | undefined;
178
+ }
179
+ /**
180
+ * @public
181
+ */
182
+ export interface ListMyDevicesRequest {
183
+ }
184
+ /**
185
+ * @public
186
+ */
187
+ export interface ListMyDevicesResponse {
188
+ devices: (Device)[] | undefined;
189
+ /**
190
+ * Immutable per-account history key. Registered first-write-wins and never overwritten.
191
+ * @public
192
+ */
193
+ accountHistoryKey?: AccountHistoryKey | undefined;
194
+ }
195
+ /**
196
+ * Returned when registering a new device would exceed the per-user active-device cap.
197
+ * @public
198
+ */
199
+ export declare class DeviceLimitError extends __BaseException {
200
+ readonly name: "DeviceLimitError";
201
+ readonly $fault: "client";
202
+ error: string | undefined;
203
+ /**
204
+ * @internal
205
+ */
206
+ constructor(opts: __ExceptionOptionType<DeviceLimitError, __BaseException>);
207
+ }
208
+ /**
209
+ * @public
210
+ */
211
+ export interface RegisterDeviceRequest {
212
+ /**
213
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
214
+ * @public
215
+ */
216
+ deviceId: string | undefined;
217
+ /**
218
+ * A device long-term public key, SPKI DER encoded then base64 (standard or URL-safe alphabet).
219
+ * @public
220
+ */
221
+ publicKey: string | undefined;
222
+ /**
223
+ * Client platform the device runs on.
224
+ * @public
225
+ */
226
+ platform: Platform | undefined;
227
+ /**
228
+ * Human-friendly device label shown in the "your devices" UI.
229
+ * @public
230
+ */
231
+ displayName?: string | undefined;
232
+ /**
233
+ * Highest E2EE envelope/wire version this device understands. Bumped as the protocol evolves.
234
+ * @public
235
+ */
236
+ maxEnvelopeVersion: number | undefined;
237
+ /**
238
+ * Optional account history key to claim (first-write-wins).
239
+ * @public
240
+ */
241
+ accountHistoryKey?: AccountHistoryKey | undefined;
242
+ }
243
+ /**
244
+ * @public
245
+ */
246
+ export interface RegisterDeviceResponse {
247
+ device: Device | undefined;
248
+ /**
249
+ * The effective stored account history key (the caller's own, or the pre-existing owner's).
250
+ * @public
251
+ */
252
+ accountHistoryKey?: AccountHistoryKey | undefined;
253
+ /**
254
+ * False when a different, pre-existing history key already owned the account and was NOT
255
+ * overwritten — signalling the client that it does not own the account history key.
256
+ * @public
257
+ */
258
+ ownsAccountHistoryKey: boolean | undefined;
259
+ }
260
+ /**
261
+ * @public
262
+ */
263
+ export interface RevokeDeviceRequest {
264
+ /**
265
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
266
+ * @public
267
+ */
268
+ deviceId: string | undefined;
269
+ }
270
+ /**
271
+ * @public
272
+ */
273
+ export interface RevokeDeviceResponse {
274
+ /**
275
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
276
+ * @public
277
+ */
278
+ deviceId: string | undefined;
279
+ revoked: boolean | undefined;
280
+ }
86
281
  /**
87
282
  * @public
88
283
  */
@@ -427,6 +622,31 @@ export interface CreateLivenessSessionResponse {
427
622
  export interface DeleteProfileRequest {
428
623
  userId: string | undefined;
429
624
  }
625
+ /**
626
+ * @public
627
+ */
628
+ export interface MediaDownloadUrlRequest {
629
+ /**
630
+ * The S3 object key to sign, e.g. "media/\{userId\}/\{uuid\}".
631
+ * @public
632
+ */
633
+ key: string | undefined;
634
+ }
635
+ /**
636
+ * @public
637
+ */
638
+ export interface MediaDownloadUrlResponse {
639
+ /**
640
+ * Short-lived presigned GET URL for the requested object.
641
+ * @public
642
+ */
643
+ downloadUrl: string | undefined;
644
+ /**
645
+ * Seconds until the presigned URL expires.
646
+ * @public
647
+ */
648
+ expiresInSeconds: number | undefined;
649
+ }
430
650
  /**
431
651
  * @public
432
652
  */
@@ -442,6 +662,16 @@ export interface MediaUploadUrlResponse {
442
662
  objectKey: string | undefined;
443
663
  formData: Record<string, string> | undefined;
444
664
  }
665
+ /**
666
+ * @public
667
+ */
668
+ export interface LivenessStatusResponse {
669
+ /**
670
+ * Authoritative liveness status: one of NONE | PENDING | APPROVED | REJECTED.
671
+ * @public
672
+ */
673
+ status: string | undefined;
674
+ }
445
675
  /**
446
676
  * A user-authored conversation opener: free text plus an optional image.
447
677
  * The image (if present) is moderated by the same async decency flow as profile pictures
@@ -496,6 +726,11 @@ export interface ProfileResponse {
496
726
  * @public
497
727
  */
498
728
  moderationStatus?: string | undefined;
729
+ /**
730
+ * Granular status per field and asset key (e.g. bio -> APPROVED, picture key -> APPROVED, prompt -> REJECTED)
731
+ * @public
732
+ */
733
+ fieldModerationStatus?: Record<string, string> | undefined;
499
734
  causes?: (string)[] | undefined;
500
735
  communities?: (string)[] | undefined;
501
736
  qualities?: (string)[] | undefined;
@@ -6,10 +6,13 @@ import { CreateLivenessSessionCommandInput, CreateLivenessSessionCommandOutput }
6
6
  import { DeleteMatchMessagesCommandInput, DeleteMatchMessagesCommandOutput } from "../commands/DeleteMatchMessagesCommand";
7
7
  import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "../commands/DeleteProfileCommand";
8
8
  import { DiscoverCommandInput, DiscoverCommandOutput } from "../commands/DiscoverCommand";
9
+ import { GenerateDownloadUrlCommandInput, GenerateDownloadUrlCommandOutput } from "../commands/GenerateDownloadUrlCommand";
9
10
  import { GenerateInviteCommandInput, GenerateInviteCommandOutput } from "../commands/GenerateInviteCommand";
10
11
  import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from "../commands/GenerateUploadUrlCommand";
12
+ import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "../commands/GetLivenessStatusCommand";
11
13
  import { GetMatchCommandInput, GetMatchCommandOutput } from "../commands/GetMatchCommand";
12
14
  import { GetMyProfileCommandInput, GetMyProfileCommandOutput } from "../commands/GetMyProfileCommand";
15
+ import { GetParticipantRegistryCommandInput, GetParticipantRegistryCommandOutput } from "../commands/GetParticipantRegistryCommand";
13
16
  import { GetPreferencesCommandInput, GetPreferencesCommandOutput } from "../commands/GetPreferencesCommand";
14
17
  import { GetProfileCommandInput, GetProfileCommandOutput } from "../commands/GetProfileCommand";
15
18
  import { GetStateCommandInput, GetStateCommandOutput } from "../commands/GetStateCommand";
@@ -19,11 +22,14 @@ import { IndexLocationCommandInput, IndexLocationCommandOutput } from "../comman
19
22
  import { InitUserCommandInput, InitUserCommandOutput } from "../commands/InitUserCommand";
20
23
  import { LinkEmailCommandInput, LinkEmailCommandOutput } from "../commands/LinkEmailCommand";
21
24
  import { LinkSocialCommandInput, LinkSocialCommandOutput } from "../commands/LinkSocialCommand";
25
+ import { ListMyDevicesCommandInput, ListMyDevicesCommandOutput } from "../commands/ListMyDevicesCommand";
26
+ import { RegisterDeviceCommandInput, RegisterDeviceCommandOutput } from "../commands/RegisterDeviceCommand";
22
27
  import { RegisterPhoneCommandInput, RegisterPhoneCommandOutput } from "../commands/RegisterPhoneCommand";
23
28
  import { RemoveLocationCommandInput, RemoveLocationCommandOutput } from "../commands/RemoveLocationCommand";
24
29
  import { RequestEmailOtpCommandInput, RequestEmailOtpCommandOutput } from "../commands/RequestEmailOtpCommand";
25
30
  import { RequestPhoneOtpCommandInput, RequestPhoneOtpCommandOutput } from "../commands/RequestPhoneOtpCommand";
26
31
  import { RequestPhoneUpdateOtpCommandInput, RequestPhoneUpdateOtpCommandOutput } from "../commands/RequestPhoneUpdateOtpCommand";
32
+ import { RevokeDeviceCommandInput, RevokeDeviceCommandOutput } from "../commands/RevokeDeviceCommand";
27
33
  import { SwipeCommandInput, SwipeCommandOutput } from "../commands/SwipeCommand";
28
34
  import { UnhookCommandInput, UnhookCommandOutput } from "../commands/UnhookCommand";
29
35
  import { UnlinkSocialCommandInput, UnlinkSocialCommandOutput } from "../commands/UnlinkSocialCommand";
@@ -44,6 +50,22 @@ export declare const se_ClaimPreKeyBundleCommand: (input: ClaimPreKeyBundleComma
44
50
  * serializeAws_restJson1DeleteMatchMessagesCommand
45
51
  */
46
52
  export declare const se_DeleteMatchMessagesCommand: (input: DeleteMatchMessagesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
53
+ /**
54
+ * serializeAws_restJson1GetParticipantRegistryCommand
55
+ */
56
+ export declare const se_GetParticipantRegistryCommand: (input: GetParticipantRegistryCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
57
+ /**
58
+ * serializeAws_restJson1ListMyDevicesCommand
59
+ */
60
+ export declare const se_ListMyDevicesCommand: (input: ListMyDevicesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
61
+ /**
62
+ * serializeAws_restJson1RegisterDeviceCommand
63
+ */
64
+ export declare const se_RegisterDeviceCommand: (input: RegisterDeviceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
65
+ /**
66
+ * serializeAws_restJson1RevokeDeviceCommand
67
+ */
68
+ export declare const se_RevokeDeviceCommand: (input: RevokeDeviceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
47
69
  /**
48
70
  * serializeAws_restJson1UploadPreKeysCommand
49
71
  */
@@ -140,10 +162,18 @@ export declare const se_CreateLivenessSessionCommand: (input: CreateLivenessSess
140
162
  * serializeAws_restJson1DeleteProfileCommand
141
163
  */
142
164
  export declare const se_DeleteProfileCommand: (input: DeleteProfileCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
165
+ /**
166
+ * serializeAws_restJson1GenerateDownloadUrlCommand
167
+ */
168
+ export declare const se_GenerateDownloadUrlCommand: (input: GenerateDownloadUrlCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
143
169
  /**
144
170
  * serializeAws_restJson1GenerateUploadUrlCommand
145
171
  */
146
172
  export declare const se_GenerateUploadUrlCommand: (input: GenerateUploadUrlCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
173
+ /**
174
+ * serializeAws_restJson1GetLivenessStatusCommand
175
+ */
176
+ export declare const se_GetLivenessStatusCommand: (input: GetLivenessStatusCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
147
177
  /**
148
178
  * serializeAws_restJson1GetMyProfileCommand
149
179
  */
@@ -188,6 +218,22 @@ export declare const de_ClaimPreKeyBundleCommand: (output: __HttpResponse, conte
188
218
  * deserializeAws_restJson1DeleteMatchMessagesCommand
189
219
  */
190
220
  export declare const de_DeleteMatchMessagesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteMatchMessagesCommandOutput>;
221
+ /**
222
+ * deserializeAws_restJson1GetParticipantRegistryCommand
223
+ */
224
+ export declare const de_GetParticipantRegistryCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetParticipantRegistryCommandOutput>;
225
+ /**
226
+ * deserializeAws_restJson1ListMyDevicesCommand
227
+ */
228
+ export declare const de_ListMyDevicesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListMyDevicesCommandOutput>;
229
+ /**
230
+ * deserializeAws_restJson1RegisterDeviceCommand
231
+ */
232
+ export declare const de_RegisterDeviceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RegisterDeviceCommandOutput>;
233
+ /**
234
+ * deserializeAws_restJson1RevokeDeviceCommand
235
+ */
236
+ export declare const de_RevokeDeviceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RevokeDeviceCommandOutput>;
191
237
  /**
192
238
  * deserializeAws_restJson1UploadPreKeysCommand
193
239
  */
@@ -284,10 +330,18 @@ export declare const de_CreateLivenessSessionCommand: (output: __HttpResponse, c
284
330
  * deserializeAws_restJson1DeleteProfileCommand
285
331
  */
286
332
  export declare const de_DeleteProfileCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteProfileCommandOutput>;
333
+ /**
334
+ * deserializeAws_restJson1GenerateDownloadUrlCommand
335
+ */
336
+ export declare const de_GenerateDownloadUrlCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GenerateDownloadUrlCommandOutput>;
287
337
  /**
288
338
  * deserializeAws_restJson1GenerateUploadUrlCommand
289
339
  */
290
340
  export declare const de_GenerateUploadUrlCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GenerateUploadUrlCommandOutput>;
341
+ /**
342
+ * deserializeAws_restJson1GetLivenessStatusCommand
343
+ */
344
+ export declare const de_GetLivenessStatusCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetLivenessStatusCommandOutput>;
291
345
  /**
292
346
  * deserializeAws_restJson1GetMyProfileCommand
293
347
  */
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.5",
4
+ "version": "1.0.7",
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",