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
@@ -1,88 +0,0 @@
1
- import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
- import { ClaimPreKeyBundleRequest, ClaimPreKeyBundleResponse } 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 ClaimPreKeyBundleCommand}.
14
- */
15
- export interface ClaimPreKeyBundleCommandInput extends ClaimPreKeyBundleRequest {
16
- }
17
- /**
18
- * @public
19
- *
20
- * The output of {@link ClaimPreKeyBundleCommand}.
21
- */
22
- export interface ClaimPreKeyBundleCommandOutput extends ClaimPreKeyBundleResponse, __MetadataBearer {
23
- }
24
- declare const ClaimPreKeyBundleCommand_base: {
25
- new (input: ClaimPreKeyBundleCommandInput): import("@smithy/smithy-client").CommandImpl<ClaimPreKeyBundleCommandInput, ClaimPreKeyBundleCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (__0_0: ClaimPreKeyBundleCommandInput): import("@smithy/smithy-client").CommandImpl<ClaimPreKeyBundleCommandInput, ClaimPreKeyBundleCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
- };
29
- /**
30
- * Claim a pre-key bundle for a target user to initiate an E2EE (X3DH) session.
31
- *
32
- * This is intentionally a NON-idempotent POST — fulfilling the request consumes
33
- * (deletes) one of the target user's one-time pre-keys. It must not be modeled as a
34
- * GET: doing so would make it eligible for prefetch, caching, and automatic retries,
35
- * which could burn through a user's one-time pre-keys and break session starts.
36
- * @example
37
- * Use a bare-bones client and the command you need to make an API call.
38
- * ```javascript
39
- * import { OneHookClient, ClaimPreKeyBundleCommand } from "onehook-api-client"; // ES Modules import
40
- * // const { OneHookClient, ClaimPreKeyBundleCommand } = require("onehook-api-client"); // CommonJS import
41
- * const client = new OneHookClient(config);
42
- * const input = { // ClaimPreKeyBundleRequest
43
- * userId: "STRING_VALUE", // required
44
- * matchId: "STRING_VALUE", // required
45
- * };
46
- * const command = new ClaimPreKeyBundleCommand(input);
47
- * const response = await client.send(command);
48
- * // { // ClaimPreKeyBundleResponse
49
- * // identityKey: "STRING_VALUE", // required
50
- * // signedPreKey: "STRING_VALUE", // required
51
- * // oneTimePreKey: "STRING_VALUE",
52
- * // };
53
- *
54
- * ```
55
- *
56
- * @param ClaimPreKeyBundleCommandInput - {@link ClaimPreKeyBundleCommandInput}
57
- * @returns {@link ClaimPreKeyBundleCommandOutput}
58
- * @see {@link ClaimPreKeyBundleCommandInput} for command's `input` shape.
59
- * @see {@link ClaimPreKeyBundleCommandOutput} for command's `response` shape.
60
- * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
61
- *
62
- * @throws {@link BadRequestError} (client fault)
63
- *
64
- * @throws {@link ForbiddenError} (client fault)
65
- *
66
- * @throws {@link NotFoundError} (client fault)
67
- *
68
- * @throws {@link InternalServerError} (server fault)
69
- *
70
- * @throws {@link OneHookServiceException}
71
- * <p>Base exception class for all service exceptions from OneHook service.</p>
72
- *
73
- *
74
- * @public
75
- */
76
- export declare class ClaimPreKeyBundleCommand extends ClaimPreKeyBundleCommand_base {
77
- /** @internal type navigation helper, not in runtime. */
78
- protected static __types: {
79
- api: {
80
- input: ClaimPreKeyBundleRequest;
81
- output: ClaimPreKeyBundleResponse;
82
- };
83
- sdk: {
84
- input: ClaimPreKeyBundleCommandInput;
85
- output: ClaimPreKeyBundleCommandOutput;
86
- };
87
- };
88
- }
@@ -1,82 +0,0 @@
1
- import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
2
- import { StatusResponse, UploadPreKeysRequest } 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 UploadPreKeysCommand}.
14
- */
15
- export interface UploadPreKeysCommandInput extends UploadPreKeysRequest {
16
- }
17
- /**
18
- * @public
19
- *
20
- * The output of {@link UploadPreKeysCommand}.
21
- */
22
- export interface UploadPreKeysCommandOutput extends StatusResponse, __MetadataBearer {
23
- }
24
- declare const UploadPreKeysCommand_base: {
25
- new (input: UploadPreKeysCommandInput): import("@smithy/smithy-client").CommandImpl<UploadPreKeysCommandInput, UploadPreKeysCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (__0_0: UploadPreKeysCommandInput): import("@smithy/smithy-client").CommandImpl<UploadPreKeysCommandInput, UploadPreKeysCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
- };
29
- /**
30
- * Upload (or replenish) the caller's own E2EE pre-keys.
31
- * @example
32
- * Use a bare-bones client and the command you need to make an API call.
33
- * ```javascript
34
- * import { OneHookClient, UploadPreKeysCommand } from "onehook-api-client"; // ES Modules import
35
- * // const { OneHookClient, UploadPreKeysCommand } = require("onehook-api-client"); // CommonJS import
36
- * const client = new OneHookClient(config);
37
- * const input = { // UploadPreKeysRequest
38
- * identityKey: "STRING_VALUE", // required
39
- * signedPreKey: "STRING_VALUE", // required
40
- * oneTimePreKeys: [ // StringList // required
41
- * "STRING_VALUE",
42
- * ],
43
- * };
44
- * const command = new UploadPreKeysCommand(input);
45
- * const response = await client.send(command);
46
- * // { // StatusResponse
47
- * // status: "STRING_VALUE", // required
48
- * // };
49
- *
50
- * ```
51
- *
52
- * @param UploadPreKeysCommandInput - {@link UploadPreKeysCommandInput}
53
- * @returns {@link UploadPreKeysCommandOutput}
54
- * @see {@link UploadPreKeysCommandInput} for command's `input` shape.
55
- * @see {@link UploadPreKeysCommandOutput} for command's `response` shape.
56
- * @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
57
- *
58
- * @throws {@link BadRequestError} (client fault)
59
- *
60
- * @throws {@link ForbiddenError} (client fault)
61
- *
62
- * @throws {@link InternalServerError} (server fault)
63
- *
64
- * @throws {@link OneHookServiceException}
65
- * <p>Base exception class for all service exceptions from OneHook service.</p>
66
- *
67
- *
68
- * @public
69
- */
70
- export declare class UploadPreKeysCommand extends UploadPreKeysCommand_base {
71
- /** @internal type navigation helper, not in runtime. */
72
- protected static __types: {
73
- api: {
74
- input: UploadPreKeysRequest;
75
- output: StatusResponse;
76
- };
77
- sdk: {
78
- input: UploadPreKeysCommandInput;
79
- output: UploadPreKeysCommandOutput;
80
- };
81
- };
82
- }