onehook-api-client 1.0.6 → 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.
- package/README.md +35 -7
- package/dist-cjs/OneHook.js +8 -0
- package/dist-cjs/commands/GetParticipantRegistryCommand.js +21 -0
- package/dist-cjs/commands/ListMyDevicesCommand.js +21 -0
- package/dist-cjs/commands/RegisterDeviceCommand.js +21 -0
- package/dist-cjs/commands/RevokeDeviceCommand.js +21 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/models/models_0.js +21 -1
- package/dist-cjs/protocols/Aws_restJson1.js +144 -2
- package/dist-es/OneHook.js +8 -0
- package/dist-es/commands/GetParticipantRegistryCommand.js +17 -0
- package/dist-es/commands/ListMyDevicesCommand.js +17 -0
- package/dist-es/commands/RegisterDeviceCommand.js +17 -0
- package/dist-es/commands/RevokeDeviceCommand.js +17 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/models/models_0.js +19 -0
- package/dist-es/protocols/Aws_restJson1.js +135 -1
- package/dist-types/OneHook.d.ts +29 -0
- package/dist-types/OneHookClient.d.ts +6 -2
- package/dist-types/commands/GetParticipantRegistryCommand.d.ts +99 -0
- package/dist-types/commands/ListMyDevicesCommand.d.ts +89 -0
- package/dist-types/commands/RegisterDeviceCommand.d.ts +112 -0
- package/dist-types/commands/RevokeDeviceCommand.d.ts +81 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +195 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- 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
|
*/
|
|
@@ -12,6 +12,7 @@ import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from ".
|
|
|
12
12
|
import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "../commands/GetLivenessStatusCommand";
|
|
13
13
|
import { GetMatchCommandInput, GetMatchCommandOutput } from "../commands/GetMatchCommand";
|
|
14
14
|
import { GetMyProfileCommandInput, GetMyProfileCommandOutput } from "../commands/GetMyProfileCommand";
|
|
15
|
+
import { GetParticipantRegistryCommandInput, GetParticipantRegistryCommandOutput } from "../commands/GetParticipantRegistryCommand";
|
|
15
16
|
import { GetPreferencesCommandInput, GetPreferencesCommandOutput } from "../commands/GetPreferencesCommand";
|
|
16
17
|
import { GetProfileCommandInput, GetProfileCommandOutput } from "../commands/GetProfileCommand";
|
|
17
18
|
import { GetStateCommandInput, GetStateCommandOutput } from "../commands/GetStateCommand";
|
|
@@ -21,11 +22,14 @@ import { IndexLocationCommandInput, IndexLocationCommandOutput } from "../comman
|
|
|
21
22
|
import { InitUserCommandInput, InitUserCommandOutput } from "../commands/InitUserCommand";
|
|
22
23
|
import { LinkEmailCommandInput, LinkEmailCommandOutput } from "../commands/LinkEmailCommand";
|
|
23
24
|
import { LinkSocialCommandInput, LinkSocialCommandOutput } from "../commands/LinkSocialCommand";
|
|
25
|
+
import { ListMyDevicesCommandInput, ListMyDevicesCommandOutput } from "../commands/ListMyDevicesCommand";
|
|
26
|
+
import { RegisterDeviceCommandInput, RegisterDeviceCommandOutput } from "../commands/RegisterDeviceCommand";
|
|
24
27
|
import { RegisterPhoneCommandInput, RegisterPhoneCommandOutput } from "../commands/RegisterPhoneCommand";
|
|
25
28
|
import { RemoveLocationCommandInput, RemoveLocationCommandOutput } from "../commands/RemoveLocationCommand";
|
|
26
29
|
import { RequestEmailOtpCommandInput, RequestEmailOtpCommandOutput } from "../commands/RequestEmailOtpCommand";
|
|
27
30
|
import { RequestPhoneOtpCommandInput, RequestPhoneOtpCommandOutput } from "../commands/RequestPhoneOtpCommand";
|
|
28
31
|
import { RequestPhoneUpdateOtpCommandInput, RequestPhoneUpdateOtpCommandOutput } from "../commands/RequestPhoneUpdateOtpCommand";
|
|
32
|
+
import { RevokeDeviceCommandInput, RevokeDeviceCommandOutput } from "../commands/RevokeDeviceCommand";
|
|
29
33
|
import { SwipeCommandInput, SwipeCommandOutput } from "../commands/SwipeCommand";
|
|
30
34
|
import { UnhookCommandInput, UnhookCommandOutput } from "../commands/UnhookCommand";
|
|
31
35
|
import { UnlinkSocialCommandInput, UnlinkSocialCommandOutput } from "../commands/UnlinkSocialCommand";
|
|
@@ -46,6 +50,22 @@ export declare const se_ClaimPreKeyBundleCommand: (input: ClaimPreKeyBundleComma
|
|
|
46
50
|
* serializeAws_restJson1DeleteMatchMessagesCommand
|
|
47
51
|
*/
|
|
48
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>;
|
|
49
69
|
/**
|
|
50
70
|
* serializeAws_restJson1UploadPreKeysCommand
|
|
51
71
|
*/
|
|
@@ -198,6 +218,22 @@ export declare const de_ClaimPreKeyBundleCommand: (output: __HttpResponse, conte
|
|
|
198
218
|
* deserializeAws_restJson1DeleteMatchMessagesCommand
|
|
199
219
|
*/
|
|
200
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>;
|
|
201
237
|
/**
|
|
202
238
|
* deserializeAws_restJson1UploadPreKeysCommand
|
|
203
239
|
*/
|
package/package.json
CHANGED