onehook-api-client 1.0.6 → 1.0.8

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 (33) hide show
  1. package/README.md +27 -13
  2. package/dist-cjs/OneHook.js +8 -4
  3. package/dist-cjs/commands/GetParticipantRegistryCommand.js +21 -0
  4. package/dist-cjs/commands/{UploadPreKeysCommand.js → ListMyDevicesCommand.js} +7 -7
  5. package/dist-cjs/commands/{ClaimPreKeyBundleCommand.js → RegisterDeviceCommand.js} +7 -7
  6. package/dist-cjs/commands/RevokeDeviceCommand.js +21 -0
  7. package/dist-cjs/commands/index.js +4 -2
  8. package/dist-cjs/graphql/types.js +8 -1
  9. package/dist-cjs/models/models_0.js +21 -1
  10. package/dist-cjs/protocols/Aws_restJson1.js +104 -28
  11. package/dist-es/OneHook.js +8 -4
  12. package/dist-es/commands/GetParticipantRegistryCommand.js +17 -0
  13. package/dist-es/commands/{UploadPreKeysCommand.js → ListMyDevicesCommand.js} +6 -6
  14. package/dist-es/commands/RegisterDeviceCommand.js +17 -0
  15. package/dist-es/commands/RevokeDeviceCommand.js +17 -0
  16. package/dist-es/commands/index.js +4 -2
  17. package/dist-es/graphql/types.js +7 -0
  18. package/dist-es/models/models_0.js +19 -0
  19. package/dist-es/protocols/Aws_restJson1.js +93 -21
  20. package/dist-types/OneHook.d.ts +27 -12
  21. package/dist-types/OneHookClient.d.ts +6 -4
  22. package/dist-types/commands/GetParticipantRegistryCommand.d.ts +98 -0
  23. package/dist-types/commands/ListMyDevicesCommand.d.ts +89 -0
  24. package/dist-types/commands/RegisterDeviceCommand.d.ts +112 -0
  25. package/dist-types/commands/RevokeDeviceCommand.d.ts +81 -0
  26. package/dist-types/commands/index.d.ts +4 -2
  27. package/dist-types/graphql/types.d.ts +51 -0
  28. package/dist-types/models/models_0.d.ts +188 -24
  29. package/dist-types/protocols/Aws_restJson1.d.ts +32 -14
  30. package/package.json +1 -1
  31. package/dist-es/commands/ClaimPreKeyBundleCommand.js +0 -17
  32. package/dist-types/commands/ClaimPreKeyBundleCommand.d.ts +0 -88
  33. package/dist-types/commands/UploadPreKeysCommand.d.ts +0 -82
@@ -0,0 +1,112 @@
1
+ import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
+ import { RegisterDeviceRequest, RegisterDeviceResponse } 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 RegisterDeviceCommand}.
14
+ */
15
+ export interface RegisterDeviceCommandInput extends RegisterDeviceRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link RegisterDeviceCommand}.
21
+ */
22
+ export interface RegisterDeviceCommandOutput extends RegisterDeviceResponse, __MetadataBearer {
23
+ }
24
+ declare const RegisterDeviceCommand_base: {
25
+ new (input: RegisterDeviceCommandInput): import("@smithy/smithy-client").CommandImpl<RegisterDeviceCommandInput, RegisterDeviceCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: RegisterDeviceCommandInput): import("@smithy/smithy-client").CommandImpl<RegisterDeviceCommandInput, RegisterDeviceCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Register (or refresh) the calling device in the authenticated user's device registry.
31
+ *
32
+ * Idempotent on `deviceId`: re-registering the same device updates its metadata and
33
+ * `lastSeenAt`. The newly-registered device becomes the `current` device; sibling devices
34
+ * are demoted. A user may have at most \{@code 10\} active devices.
35
+ *
36
+ * Optionally carries the account's immutable history key. The history key is FIRST-WRITE-WINS:
37
+ * the first device to register it owns it, and later/conflicting values are NEVER overwritten.
38
+ * When a conflicting key is submitted, the response echoes the stored key and sets
39
+ * `ownsAccountHistoryKey = false` so the client learns it does not own the account history key.
40
+ * @example
41
+ * Use a bare-bones client and the command you need to make an API call.
42
+ * ```javascript
43
+ * import { OneHookClient, RegisterDeviceCommand } from "onehook-api-client"; // ES Modules import
44
+ * // const { OneHookClient, RegisterDeviceCommand } = require("onehook-api-client"); // CommonJS import
45
+ * const client = new OneHookClient(config);
46
+ * const input = { // RegisterDeviceRequest
47
+ * deviceId: "STRING_VALUE", // required
48
+ * publicKey: "STRING_VALUE", // required
49
+ * platform: "IOS" || "ANDROID" || "WEB", // required
50
+ * displayName: "STRING_VALUE",
51
+ * maxEnvelopeVersion: Number("int"), // required
52
+ * accountHistoryKey: { // AccountHistoryKey
53
+ * keyId: "STRING_VALUE", // required
54
+ * publicKey: "STRING_VALUE", // required
55
+ * },
56
+ * };
57
+ * const command = new RegisterDeviceCommand(input);
58
+ * const response = await client.send(command);
59
+ * // { // RegisterDeviceResponse
60
+ * // device: { // Device
61
+ * // deviceId: "STRING_VALUE", // required
62
+ * // publicKey: "STRING_VALUE", // required
63
+ * // platform: "IOS" || "ANDROID" || "WEB", // required
64
+ * // displayName: "STRING_VALUE",
65
+ * // maxEnvelopeVersion: Number("int"), // required
66
+ * // createdAt: Number("long"), // required
67
+ * // lastSeenAt: Number("long"), // required
68
+ * // current: true || false, // required
69
+ * // },
70
+ * // accountHistoryKey: { // AccountHistoryKey
71
+ * // keyId: "STRING_VALUE", // required
72
+ * // publicKey: "STRING_VALUE", // required
73
+ * // },
74
+ * // ownsAccountHistoryKey: true || false, // required
75
+ * // };
76
+ *
77
+ * ```
78
+ *
79
+ * @param RegisterDeviceCommandInput - {@link RegisterDeviceCommandInput}
80
+ * @returns {@link RegisterDeviceCommandOutput}
81
+ * @see {@link RegisterDeviceCommandInput} for command's `input` shape.
82
+ * @see {@link RegisterDeviceCommandOutput} for command's `response` shape.
83
+ * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
84
+ *
85
+ * @throws {@link BadRequestError} (client fault)
86
+ *
87
+ * @throws {@link ForbiddenError} (client fault)
88
+ *
89
+ * @throws {@link DeviceLimitError} (client fault)
90
+ * Returned when registering a new device would exceed the per-user active-device cap.
91
+ *
92
+ * @throws {@link InternalServerError} (server fault)
93
+ *
94
+ * @throws {@link OneHookServiceException}
95
+ * <p>Base exception class for all service exceptions from OneHook service.</p>
96
+ *
97
+ *
98
+ * @public
99
+ */
100
+ export declare class RegisterDeviceCommand extends RegisterDeviceCommand_base {
101
+ /** @internal type navigation helper, not in runtime. */
102
+ protected static __types: {
103
+ api: {
104
+ input: RegisterDeviceRequest;
105
+ output: RegisterDeviceResponse;
106
+ };
107
+ sdk: {
108
+ input: RegisterDeviceCommandInput;
109
+ output: RegisterDeviceCommandOutput;
110
+ };
111
+ };
112
+ }
@@ -0,0 +1,81 @@
1
+ import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
+ import { RevokeDeviceRequest, RevokeDeviceResponse } 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 RevokeDeviceCommand}.
14
+ */
15
+ export interface RevokeDeviceCommandInput extends RevokeDeviceRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link RevokeDeviceCommand}.
21
+ */
22
+ export interface RevokeDeviceCommandOutput extends RevokeDeviceResponse, __MetadataBearer {
23
+ }
24
+ declare const RevokeDeviceCommand_base: {
25
+ new (input: RevokeDeviceCommandInput): import("@smithy/smithy-client").CommandImpl<RevokeDeviceCommandInput, RevokeDeviceCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: RevokeDeviceCommandInput): import("@smithy/smithy-client").CommandImpl<RevokeDeviceCommandInput, RevokeDeviceCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Revoke one of the authenticated caller's own devices, removing it from the registry.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { OneHookClient, RevokeDeviceCommand } from "onehook-api-client"; // ES Modules import
35
+ * // const { OneHookClient, RevokeDeviceCommand } = require("onehook-api-client"); // CommonJS import
36
+ * const client = new OneHookClient(config);
37
+ * const input = { // RevokeDeviceRequest
38
+ * deviceId: "STRING_VALUE", // required
39
+ * };
40
+ * const command = new RevokeDeviceCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // RevokeDeviceResponse
43
+ * // deviceId: "STRING_VALUE", // required
44
+ * // revoked: true || false, // required
45
+ * // };
46
+ *
47
+ * ```
48
+ *
49
+ * @param RevokeDeviceCommandInput - {@link RevokeDeviceCommandInput}
50
+ * @returns {@link RevokeDeviceCommandOutput}
51
+ * @see {@link RevokeDeviceCommandInput} for command's `input` shape.
52
+ * @see {@link RevokeDeviceCommandOutput} for command's `response` shape.
53
+ * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
54
+ *
55
+ * @throws {@link BadRequestError} (client fault)
56
+ *
57
+ * @throws {@link ForbiddenError} (client fault)
58
+ *
59
+ * @throws {@link NotFoundError} (client fault)
60
+ *
61
+ * @throws {@link InternalServerError} (server fault)
62
+ *
63
+ * @throws {@link OneHookServiceException}
64
+ * <p>Base exception class for all service exceptions from OneHook service.</p>
65
+ *
66
+ *
67
+ * @public
68
+ */
69
+ export declare class RevokeDeviceCommand extends RevokeDeviceCommand_base {
70
+ /** @internal type navigation helper, not in runtime. */
71
+ protected static __types: {
72
+ api: {
73
+ input: RevokeDeviceRequest;
74
+ output: RevokeDeviceResponse;
75
+ };
76
+ sdk: {
77
+ input: RevokeDeviceCommandInput;
78
+ output: RevokeDeviceCommandOutput;
79
+ };
80
+ };
81
+ }
@@ -1,6 +1,8 @@
1
- export * from "./ClaimPreKeyBundleCommand";
2
1
  export * from "./DeleteMatchMessagesCommand";
3
- export * from "./UploadPreKeysCommand";
2
+ export * from "./GetParticipantRegistryCommand";
3
+ export * from "./ListMyDevicesCommand";
4
+ export * from "./RegisterDeviceCommand";
5
+ export * from "./RevokeDeviceCommand";
4
6
  export * from "./AuthSocialCommand";
5
7
  export * from "./GenerateInviteCommand";
6
8
  export * from "./GetUserCommand";
@@ -33,6 +33,24 @@ export type DeletedMessage = {
33
33
  messageId: Scalars['ID']['output'];
34
34
  timestamp: Scalars['AWSTimestamp']['output'];
35
35
  };
36
+ export type KeyRecoverySession = {
37
+ __typename?: 'KeyRecoverySession';
38
+ challenge: Scalars['String']['output'];
39
+ createdAt: Scalars['AWSTimestamp']['output'];
40
+ expiresAt: Scalars['AWSTimestamp']['output'];
41
+ sessionId: Scalars['ID']['output'];
42
+ sourceDeviceId: Scalars['ID']['output'];
43
+ status: KeyRecoveryStatus;
44
+ targetDeviceId: Scalars['ID']['output'];
45
+ targetEphemeralPublicKey: Scalars['String']['output'];
46
+ userId: Scalars['ID']['output'];
47
+ };
48
+ export declare enum KeyRecoveryStatus {
49
+ Completed = "COMPLETED",
50
+ Declined = "DECLINED",
51
+ Displaying = "DISPLAYING",
52
+ Pending = "PENDING"
53
+ }
36
54
  export type Message = {
37
55
  __typename?: 'Message';
38
56
  ciphertext: Scalars['String']['output'];
@@ -62,7 +80,9 @@ export type Mutation = {
62
80
  deleteMessage?: Maybe<DeletedMessage>;
63
81
  markAsDelivered?: Maybe<MessageReceipt>;
64
82
  markAsRead?: Maybe<MessageReceipt>;
83
+ requestKeyRecovery?: Maybe<KeyRecoverySession>;
65
84
  sendMessage?: Maybe<Message>;
85
+ updateKeyRecovery?: Maybe<KeyRecoverySession>;
66
86
  };
67
87
  export type MutationDeleteMessageArgs = {
68
88
  matchId: Scalars['ID']['input'];
@@ -80,25 +100,56 @@ export type MutationMarkAsReadArgs = {
80
100
  timestamp: Scalars['AWSTimestamp']['input'];
81
101
  userId: Scalars['String']['input'];
82
102
  };
103
+ export type MutationRequestKeyRecoveryArgs = {
104
+ challenge: Scalars['String']['input'];
105
+ sourceDeviceId: Scalars['ID']['input'];
106
+ targetDeviceId: Scalars['ID']['input'];
107
+ targetEphemeralPublicKey: Scalars['String']['input'];
108
+ };
83
109
  export type MutationSendMessageArgs = {
84
110
  ciphertext: Scalars['String']['input'];
85
111
  matchId: Scalars['ID']['input'];
86
112
  senderId: Scalars['String']['input'];
87
113
  };
114
+ export type MutationUpdateKeyRecoveryArgs = {
115
+ sessionId: Scalars['ID']['input'];
116
+ sourceDeviceId: Scalars['ID']['input'];
117
+ status: KeyRecoveryStatus;
118
+ targetDeviceId: Scalars['ID']['input'];
119
+ };
88
120
  export type Query = {
89
121
  __typename?: 'Query';
122
+ getKeyRecoveryRequests?: Maybe<Array<Maybe<KeyRecoverySession>>>;
123
+ getKeyRecoverySession?: Maybe<KeyRecoverySession>;
90
124
  getMessages?: Maybe<Array<Maybe<Message>>>;
91
125
  };
126
+ export type QueryGetKeyRecoveryRequestsArgs = {
127
+ sourceDeviceId: Scalars['ID']['input'];
128
+ };
129
+ export type QueryGetKeyRecoverySessionArgs = {
130
+ sourceDeviceId: Scalars['ID']['input'];
131
+ targetDeviceId: Scalars['ID']['input'];
132
+ };
92
133
  export type QueryGetMessagesArgs = {
93
134
  after?: InputMaybe<Scalars['AWSTimestamp']['input']>;
94
135
  matchId: Scalars['ID']['input'];
95
136
  };
96
137
  export type Subscription = {
97
138
  __typename?: 'Subscription';
139
+ onKeyRecoveryRequested?: Maybe<KeyRecoverySession>;
140
+ onKeyRecoveryUpdated?: Maybe<KeyRecoverySession>;
98
141
  onMessageDeleted?: Maybe<DeletedMessage>;
99
142
  onMessageStatusUpdate?: Maybe<MessageReceipt>;
100
143
  onNewMessage?: Maybe<Message>;
101
144
  };
145
+ export type SubscriptionOnKeyRecoveryRequestedArgs = {
146
+ sourceDeviceId: Scalars['ID']['input'];
147
+ userId: Scalars['ID']['input'];
148
+ };
149
+ export type SubscriptionOnKeyRecoveryUpdatedArgs = {
150
+ targetDeviceId: Scalars['ID']['input'];
151
+ userId: Scalars['ID']['input'];
152
+ };
102
153
  export type SubscriptionOnMessageDeletedArgs = {
103
154
  matchId: Scalars['ID']['input'];
104
155
  };
@@ -3,25 +3,14 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-cli
3
3
  /**
4
4
  * @public
5
5
  */
6
- export interface ClaimPreKeyBundleRequest {
7
- userId: string | undefined;
8
- /**
9
- * The match the caller shares with the target user; used to authorize the claim.
10
- * @public
11
- */
6
+ export interface DeleteMatchMessagesRequest {
12
7
  matchId: string | undefined;
13
8
  }
14
9
  /**
15
10
  * @public
16
11
  */
17
- export interface ClaimPreKeyBundleResponse {
18
- identityKey: string | undefined;
19
- signedPreKey: string | undefined;
20
- /**
21
- * Omitted when the target user has exhausted their one-time pre-keys.
22
- * @public
23
- */
24
- oneTimePreKey?: string | undefined;
12
+ export interface DeleteMatchMessagesResponse {
13
+ deleted: number | undefined;
25
14
  }
26
15
  /**
27
16
  * @public
@@ -59,6 +48,99 @@ export declare class InternalServerError extends __BaseException {
59
48
  */
60
49
  constructor(opts: __ExceptionOptionType<InternalServerError, __BaseException>);
61
50
  }
51
+ /**
52
+ * @public
53
+ */
54
+ export interface GetParticipantRegistryRequest {
55
+ userId: string | undefined;
56
+ /**
57
+ * The match the caller shares with the target user; used to authorize the read.
58
+ * @public
59
+ */
60
+ matchId: string | undefined;
61
+ }
62
+ /**
63
+ * Immutable per-account history key. Registered first-write-wins and never overwritten.
64
+ * @public
65
+ */
66
+ export interface AccountHistoryKey {
67
+ keyId: string | undefined;
68
+ /**
69
+ * A device long-term public key, SPKI DER encoded then base64 (standard or URL-safe alphabet).
70
+ * @public
71
+ */
72
+ publicKey: string | undefined;
73
+ }
74
+ /**
75
+ * @public
76
+ * @enum
77
+ */
78
+ export declare const Platform: {
79
+ readonly ANDROID: "ANDROID";
80
+ readonly IOS: "IOS";
81
+ readonly WEB: "WEB";
82
+ };
83
+ /**
84
+ * @public
85
+ */
86
+ export type Platform = typeof Platform[keyof typeof Platform];
87
+ /**
88
+ * @public
89
+ */
90
+ export interface Device {
91
+ /**
92
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
93
+ * @public
94
+ */
95
+ deviceId: string | undefined;
96
+ /**
97
+ * A device long-term public key, SPKI DER encoded then base64 (standard or URL-safe alphabet).
98
+ * @public
99
+ */
100
+ publicKey: string | undefined;
101
+ /**
102
+ * Client platform the device runs on.
103
+ * @public
104
+ */
105
+ platform: Platform | undefined;
106
+ /**
107
+ * Human-friendly device label shown in the "your devices" UI.
108
+ * @public
109
+ */
110
+ displayName?: string | undefined;
111
+ /**
112
+ * Highest E2EE envelope/wire version this device understands. Bumped as the protocol evolves.
113
+ * @public
114
+ */
115
+ maxEnvelopeVersion: number | undefined;
116
+ /**
117
+ * Epoch-millis the device was first registered.
118
+ * @public
119
+ */
120
+ createdAt: number | undefined;
121
+ /**
122
+ * Epoch-millis the device was last seen (updated on every re-register).
123
+ * @public
124
+ */
125
+ lastSeenAt: number | undefined;
126
+ /**
127
+ * True for the most recently registered device of the user.
128
+ * @public
129
+ */
130
+ current: boolean | undefined;
131
+ }
132
+ /**
133
+ * @public
134
+ */
135
+ export interface GetParticipantRegistryResponse {
136
+ userId: string | undefined;
137
+ devices: (Device)[] | undefined;
138
+ /**
139
+ * Immutable per-account history key. Registered first-write-wins and never overwritten.
140
+ * @public
141
+ */
142
+ accountHistoryKey?: AccountHistoryKey | undefined;
143
+ }
62
144
  /**
63
145
  * @public
64
146
  */
@@ -74,28 +156,104 @@ export declare class NotFoundError extends __BaseException {
74
156
  /**
75
157
  * @public
76
158
  */
77
- export interface DeleteMatchMessagesRequest {
78
- matchId: string | undefined;
159
+ export interface ListMyDevicesRequest {
79
160
  }
80
161
  /**
81
162
  * @public
82
163
  */
83
- export interface DeleteMatchMessagesResponse {
84
- deleted: number | undefined;
164
+ export interface ListMyDevicesResponse {
165
+ devices: (Device)[] | undefined;
166
+ /**
167
+ * Immutable per-account history key. Registered first-write-wins and never overwritten.
168
+ * @public
169
+ */
170
+ accountHistoryKey?: AccountHistoryKey | undefined;
85
171
  }
86
172
  /**
173
+ * Returned when registering a new device would exceed the per-user active-device cap.
87
174
  * @public
88
175
  */
89
- export interface UploadPreKeysRequest {
90
- identityKey: string | undefined;
91
- signedPreKey: string | undefined;
92
- oneTimePreKeys: (string)[] | undefined;
176
+ export declare class DeviceLimitError extends __BaseException {
177
+ readonly name: "DeviceLimitError";
178
+ readonly $fault: "client";
179
+ error: string | undefined;
180
+ /**
181
+ * @internal
182
+ */
183
+ constructor(opts: __ExceptionOptionType<DeviceLimitError, __BaseException>);
93
184
  }
94
185
  /**
95
186
  * @public
96
187
  */
97
- export interface StatusResponse {
98
- status: string | undefined;
188
+ export interface RegisterDeviceRequest {
189
+ /**
190
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
191
+ * @public
192
+ */
193
+ deviceId: string | undefined;
194
+ /**
195
+ * A device long-term public key, SPKI DER encoded then base64 (standard or URL-safe alphabet).
196
+ * @public
197
+ */
198
+ publicKey: string | undefined;
199
+ /**
200
+ * Client platform the device runs on.
201
+ * @public
202
+ */
203
+ platform: Platform | undefined;
204
+ /**
205
+ * Human-friendly device label shown in the "your devices" UI.
206
+ * @public
207
+ */
208
+ displayName?: string | undefined;
209
+ /**
210
+ * Highest E2EE envelope/wire version this device understands. Bumped as the protocol evolves.
211
+ * @public
212
+ */
213
+ maxEnvelopeVersion: number | undefined;
214
+ /**
215
+ * Optional account history key to claim (first-write-wins).
216
+ * @public
217
+ */
218
+ accountHistoryKey?: AccountHistoryKey | undefined;
219
+ }
220
+ /**
221
+ * @public
222
+ */
223
+ export interface RegisterDeviceResponse {
224
+ device: Device | undefined;
225
+ /**
226
+ * The effective stored account history key (the caller's own, or the pre-existing owner's).
227
+ * @public
228
+ */
229
+ accountHistoryKey?: AccountHistoryKey | undefined;
230
+ /**
231
+ * False when a different, pre-existing history key already owned the account and was NOT
232
+ * overwritten — signalling the client that it does not own the account history key.
233
+ * @public
234
+ */
235
+ ownsAccountHistoryKey: boolean | undefined;
236
+ }
237
+ /**
238
+ * @public
239
+ */
240
+ export interface RevokeDeviceRequest {
241
+ /**
242
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
243
+ * @public
244
+ */
245
+ deviceId: string | undefined;
246
+ }
247
+ /**
248
+ * @public
249
+ */
250
+ export interface RevokeDeviceResponse {
251
+ /**
252
+ * UUID-ish opaque device identifier minted by the client, bounded to 64 chars.
253
+ * @public
254
+ */
255
+ deviceId: string | undefined;
256
+ revoked: boolean | undefined;
99
257
  }
100
258
  /**
101
259
  * @public
@@ -349,6 +507,12 @@ export interface UserPreferencesResponse {
349
507
  maxDistanceKm?: number | undefined;
350
508
  genders?: (string)[] | undefined;
351
509
  }
510
+ /**
511
+ * @public
512
+ */
513
+ export interface StatusResponse {
514
+ status: string | undefined;
515
+ }
352
516
  /**
353
517
  * @public
354
518
  */
@@ -1,5 +1,4 @@
1
1
  import { AuthSocialCommandInput, AuthSocialCommandOutput } from "../commands/AuthSocialCommand";
2
- import { ClaimPreKeyBundleCommandInput, ClaimPreKeyBundleCommandOutput } from "../commands/ClaimPreKeyBundleCommand";
3
2
  import { CompleteLivenessSessionCommandInput, CompleteLivenessSessionCommandOutput } from "../commands/CompleteLivenessSessionCommand";
4
3
  import { CompleteOnboardingCommandInput, CompleteOnboardingCommandOutput } from "../commands/CompleteOnboardingCommand";
5
4
  import { CreateLivenessSessionCommandInput, CreateLivenessSessionCommandOutput } from "../commands/CreateLivenessSessionCommand";
@@ -12,6 +11,7 @@ import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from ".
12
11
  import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "../commands/GetLivenessStatusCommand";
13
12
  import { GetMatchCommandInput, GetMatchCommandOutput } from "../commands/GetMatchCommand";
14
13
  import { GetMyProfileCommandInput, GetMyProfileCommandOutput } from "../commands/GetMyProfileCommand";
14
+ import { GetParticipantRegistryCommandInput, GetParticipantRegistryCommandOutput } from "../commands/GetParticipantRegistryCommand";
15
15
  import { GetPreferencesCommandInput, GetPreferencesCommandOutput } from "../commands/GetPreferencesCommand";
16
16
  import { GetProfileCommandInput, GetProfileCommandOutput } from "../commands/GetProfileCommand";
17
17
  import { GetStateCommandInput, GetStateCommandOutput } from "../commands/GetStateCommand";
@@ -21,11 +21,14 @@ import { IndexLocationCommandInput, IndexLocationCommandOutput } from "../comman
21
21
  import { InitUserCommandInput, InitUserCommandOutput } from "../commands/InitUserCommand";
22
22
  import { LinkEmailCommandInput, LinkEmailCommandOutput } from "../commands/LinkEmailCommand";
23
23
  import { LinkSocialCommandInput, LinkSocialCommandOutput } from "../commands/LinkSocialCommand";
24
+ import { ListMyDevicesCommandInput, ListMyDevicesCommandOutput } from "../commands/ListMyDevicesCommand";
25
+ import { RegisterDeviceCommandInput, RegisterDeviceCommandOutput } from "../commands/RegisterDeviceCommand";
24
26
  import { RegisterPhoneCommandInput, RegisterPhoneCommandOutput } from "../commands/RegisterPhoneCommand";
25
27
  import { RemoveLocationCommandInput, RemoveLocationCommandOutput } from "../commands/RemoveLocationCommand";
26
28
  import { RequestEmailOtpCommandInput, RequestEmailOtpCommandOutput } from "../commands/RequestEmailOtpCommand";
27
29
  import { RequestPhoneOtpCommandInput, RequestPhoneOtpCommandOutput } from "../commands/RequestPhoneOtpCommand";
28
30
  import { RequestPhoneUpdateOtpCommandInput, RequestPhoneUpdateOtpCommandOutput } from "../commands/RequestPhoneUpdateOtpCommand";
31
+ import { RevokeDeviceCommandInput, RevokeDeviceCommandOutput } from "../commands/RevokeDeviceCommand";
29
32
  import { SwipeCommandInput, SwipeCommandOutput } from "../commands/SwipeCommand";
30
33
  import { UnhookCommandInput, UnhookCommandOutput } from "../commands/UnhookCommand";
31
34
  import { UnlinkSocialCommandInput, UnlinkSocialCommandOutput } from "../commands/UnlinkSocialCommand";
@@ -34,22 +37,29 @@ import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from ".
34
37
  import { UpdatePreferencesCommandInput, UpdatePreferencesCommandOutput } from "../commands/UpdatePreferencesCommand";
35
38
  import { UpdateProfileCommandInput, UpdateProfileCommandOutput } from "../commands/UpdateProfileCommand";
36
39
  import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "../commands/UpgradeUserCommand";
37
- import { UploadPreKeysCommandInput, UploadPreKeysCommandOutput } from "../commands/UploadPreKeysCommand";
38
40
  import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "../commands/ValidateInviteCommand";
39
41
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
40
42
  import { SerdeContext as __SerdeContext } from "@smithy/types";
41
- /**
42
- * serializeAws_restJson1ClaimPreKeyBundleCommand
43
- */
44
- export declare const se_ClaimPreKeyBundleCommand: (input: ClaimPreKeyBundleCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
45
43
  /**
46
44
  * serializeAws_restJson1DeleteMatchMessagesCommand
47
45
  */
48
46
  export declare const se_DeleteMatchMessagesCommand: (input: DeleteMatchMessagesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
49
47
  /**
50
- * serializeAws_restJson1UploadPreKeysCommand
48
+ * serializeAws_restJson1GetParticipantRegistryCommand
49
+ */
50
+ export declare const se_GetParticipantRegistryCommand: (input: GetParticipantRegistryCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
51
+ /**
52
+ * serializeAws_restJson1ListMyDevicesCommand
53
+ */
54
+ export declare const se_ListMyDevicesCommand: (input: ListMyDevicesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
55
+ /**
56
+ * serializeAws_restJson1RegisterDeviceCommand
57
+ */
58
+ export declare const se_RegisterDeviceCommand: (input: RegisterDeviceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
59
+ /**
60
+ * serializeAws_restJson1RevokeDeviceCommand
51
61
  */
52
- export declare const se_UploadPreKeysCommand: (input: UploadPreKeysCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
62
+ export declare const se_RevokeDeviceCommand: (input: RevokeDeviceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
53
63
  /**
54
64
  * serializeAws_restJson1AuthSocialCommand
55
65
  */
@@ -190,18 +200,26 @@ export declare const se_UnhookCommand: (input: UnhookCommandInput, context: __Se
190
200
  * serializeAws_restJson1UpgradeUserCommand
191
201
  */
192
202
  export declare const se_UpgradeUserCommand: (input: UpgradeUserCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
193
- /**
194
- * deserializeAws_restJson1ClaimPreKeyBundleCommand
195
- */
196
- export declare const de_ClaimPreKeyBundleCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ClaimPreKeyBundleCommandOutput>;
197
203
  /**
198
204
  * deserializeAws_restJson1DeleteMatchMessagesCommand
199
205
  */
200
206
  export declare const de_DeleteMatchMessagesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteMatchMessagesCommandOutput>;
201
207
  /**
202
- * deserializeAws_restJson1UploadPreKeysCommand
208
+ * deserializeAws_restJson1GetParticipantRegistryCommand
209
+ */
210
+ export declare const de_GetParticipantRegistryCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetParticipantRegistryCommandOutput>;
211
+ /**
212
+ * deserializeAws_restJson1ListMyDevicesCommand
213
+ */
214
+ export declare const de_ListMyDevicesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListMyDevicesCommandOutput>;
215
+ /**
216
+ * deserializeAws_restJson1RegisterDeviceCommand
217
+ */
218
+ export declare const de_RegisterDeviceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RegisterDeviceCommandOutput>;
219
+ /**
220
+ * deserializeAws_restJson1RevokeDeviceCommand
203
221
  */
204
- export declare const de_UploadPreKeysCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UploadPreKeysCommandOutput>;
222
+ export declare const de_RevokeDeviceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RevokeDeviceCommandOutput>;
205
223
  /**
206
224
  * deserializeAws_restJson1AuthSocialCommand
207
225
  */
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.6",
4
+ "version": "1.0.8",
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",
@@ -1,17 +0,0 @@
1
- import { de_ClaimPreKeyBundleCommand, se_ClaimPreKeyBundleCommand, } from "../protocols/Aws_restJson1";
2
- import { getSerdePlugin } from "@smithy/middleware-serde";
3
- import { Command as $Command } from "@smithy/smithy-client";
4
- export { $Command };
5
- export class ClaimPreKeyBundleCommand extends $Command.classBuilder()
6
- .m(function (Command, cs, config, o) {
7
- return [
8
- getSerdePlugin(config, this.serialize, this.deserialize),
9
- ];
10
- })
11
- .s("OneHookService", "ClaimPreKeyBundle", {})
12
- .n("OneHookClient", "ClaimPreKeyBundleCommand")
13
- .f(void 0, void 0)
14
- .ser(se_ClaimPreKeyBundleCommand)
15
- .de(de_ClaimPreKeyBundleCommand)
16
- .build() {
17
- }