onehook-api-client 1.0.27 → 1.0.29
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 -0
- package/dist-cjs/OneHook.js +10 -0
- package/dist-cjs/commands/DiscoverByIntentCommand.js +21 -0
- package/dist-cjs/commands/DiscoverSuggestedCommand.js +21 -0
- package/dist-cjs/commands/GetAccountStateCommand.js +21 -0
- package/dist-cjs/commands/GetAdminPhoneStatusCommand.js +21 -0
- package/dist-cjs/commands/SetAccountStateCommand.js +21 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +30 -1
- package/dist-cjs/protocols/Aws_restJson1.js +190 -3
- package/dist-cjs/telemetry/index.js +38 -2
- package/dist-es/OneHook.js +10 -0
- package/dist-es/commands/DiscoverByIntentCommand.js +17 -0
- package/dist-es/commands/DiscoverSuggestedCommand.js +17 -0
- package/dist-es/commands/GetAccountStateCommand.js +17 -0
- package/dist-es/commands/GetAdminPhoneStatusCommand.js +17 -0
- package/dist-es/commands/SetAccountStateCommand.js +17 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +28 -0
- package/dist-es/protocols/Aws_restJson1.js +178 -1
- package/dist-es/telemetry/index.js +38 -2
- package/dist-types/OneHook.d.ts +35 -0
- package/dist-types/OneHookClient.d.ts +7 -2
- package/dist-types/commands/DiscoverByIntentCommand.d.ts +97 -0
- package/dist-types/commands/DiscoverCommand.d.ts +4 -0
- package/dist-types/commands/DiscoverSuggestedCommand.d.ts +92 -0
- package/dist-types/commands/GetAccountStateCommand.d.ts +83 -0
- package/dist-types/commands/GetAdminPhoneStatusCommand.d.ts +86 -0
- package/dist-types/commands/SetAccountStateCommand.d.ts +95 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +188 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
- package/dist-types/telemetry/index.d.ts +22 -2
- package/package.json +1 -1
- package/telemetry/TelemetryCatalog.kt +22 -4
- package/telemetry/TelemetryCatalog.swift +38 -4
- package/telemetry/telemetry-catalog.json +264 -2
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
+
import { DiscoverByIntentRequest, DiscoverResponse } 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 DiscoverByIntentCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface DiscoverByIntentCommandInput extends DiscoverByIntentRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link DiscoverByIntentCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface DiscoverByIntentCommandOutput extends DiscoverResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const DiscoverByIntentCommand_base: {
|
|
25
|
+
new (input: DiscoverByIntentCommandInput): import("@smithy/smithy-client").CommandImpl<DiscoverByIntentCommandInput, DiscoverByIntentCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: DiscoverByIntentCommandInput): import("@smithy/smithy-client").CommandImpl<DiscoverByIntentCommandInput, DiscoverByIntentCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* "Mr. OneHook, find me ...": candidates closest in meaning to a free-text description of who the
|
|
31
|
+
* caller is looking for (typically distilled by OneHook AI from a conversation). The description is
|
|
32
|
+
* embedded and matched against candidates' profile embeddings, under the same eligibility rules and
|
|
33
|
+
* saved preferences as `Discover`. Every candidate is attributed `MR_ONEHOOK` /
|
|
34
|
+
* `EXPLICIT_REQUEST`. Paid tiers only (403 `PREMIUM_REQUIRED` otherwise); 503 when the embedding
|
|
35
|
+
* model is unavailable (retry later). The description is not stored or logged.
|
|
36
|
+
* @example
|
|
37
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
38
|
+
* ```javascript
|
|
39
|
+
* import { OneHookClient, DiscoverByIntentCommand } from "onehook-api-client"; // ES Modules import
|
|
40
|
+
* // const { OneHookClient, DiscoverByIntentCommand } = require("onehook-api-client"); // CommonJS import
|
|
41
|
+
* const client = new OneHookClient(config);
|
|
42
|
+
* const input = { // DiscoverByIntentRequest
|
|
43
|
+
* lat: Number("double"), // required
|
|
44
|
+
* lon: Number("double"), // required
|
|
45
|
+
* description: "STRING_VALUE", // required
|
|
46
|
+
* };
|
|
47
|
+
* const command = new DiscoverByIntentCommand(input);
|
|
48
|
+
* const response = await client.send(command);
|
|
49
|
+
* // { // DiscoverResponse
|
|
50
|
+
* // candidates: [ // CandidateList // required
|
|
51
|
+
* // { // CandidateDto
|
|
52
|
+
* // userId: "STRING_VALUE", // required
|
|
53
|
+
* // distanceKm: Number("double"), // required
|
|
54
|
+
* // score: Number("double"), // required
|
|
55
|
+
* // matchFinder: "ONEHOOK_INTELLIGENCE" || "MR_ONEHOOK", // required
|
|
56
|
+
* // matchFinderLabel: "STRING_VALUE", // required
|
|
57
|
+
* // suggestionBasis: "EXPLICIT_REQUEST" || "INFERRED_INCLINATION",
|
|
58
|
+
* // similarity: Number("double"),
|
|
59
|
+
* // },
|
|
60
|
+
* // ],
|
|
61
|
+
* // count: Number("int"), // required
|
|
62
|
+
* // algorithm: "STRING_VALUE", // required
|
|
63
|
+
* // };
|
|
64
|
+
*
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @param DiscoverByIntentCommandInput - {@link DiscoverByIntentCommandInput}
|
|
68
|
+
* @returns {@link DiscoverByIntentCommandOutput}
|
|
69
|
+
* @see {@link DiscoverByIntentCommandInput} for command's `input` shape.
|
|
70
|
+
* @see {@link DiscoverByIntentCommandOutput} for command's `response` shape.
|
|
71
|
+
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link BadRequestError} (client fault)
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link ForbiddenError} (client fault)
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link InternalServerError} (server fault)
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link OneHookServiceException}
|
|
80
|
+
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
81
|
+
*
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
export declare class DiscoverByIntentCommand extends DiscoverByIntentCommand_base {
|
|
86
|
+
/** @internal type navigation helper, not in runtime. */
|
|
87
|
+
protected static __types: {
|
|
88
|
+
api: {
|
|
89
|
+
input: DiscoverByIntentRequest;
|
|
90
|
+
output: DiscoverResponse;
|
|
91
|
+
};
|
|
92
|
+
sdk: {
|
|
93
|
+
input: DiscoverByIntentCommandInput;
|
|
94
|
+
output: DiscoverByIntentCommandOutput;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
}
|
|
@@ -47,6 +47,10 @@ declare const DiscoverCommand_base: {
|
|
|
47
47
|
* // userId: "STRING_VALUE", // required
|
|
48
48
|
* // distanceKm: Number("double"), // required
|
|
49
49
|
* // score: Number("double"), // required
|
|
50
|
+
* // matchFinder: "ONEHOOK_INTELLIGENCE" || "MR_ONEHOOK", // required
|
|
51
|
+
* // matchFinderLabel: "STRING_VALUE", // required
|
|
52
|
+
* // suggestionBasis: "EXPLICIT_REQUEST" || "INFERRED_INCLINATION",
|
|
53
|
+
* // similarity: Number("double"),
|
|
50
54
|
* // },
|
|
51
55
|
* // ],
|
|
52
56
|
* // count: Number("int"), // required
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
+
import { DiscoverRequest, DiscoverResponse } 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 DiscoverSuggestedCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface DiscoverSuggestedCommandInput extends DiscoverRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link DiscoverSuggestedCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface DiscoverSuggestedCommandOutput extends DiscoverResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const DiscoverSuggestedCommand_base: {
|
|
25
|
+
new (input: DiscoverSuggestedCommandInput): import("@smithy/smithy-client").CommandImpl<DiscoverSuggestedCommandInput, DiscoverSuggestedCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: DiscoverSuggestedCommandInput): import("@smithy/smithy-client").CommandImpl<DiscoverSuggestedCommandInput, DiscoverSuggestedCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Proactive Mr. OneHook suggestions: candidates closest in meaning to the people the caller has
|
|
31
|
+
* recently liked (an inferred inclination). New people only; anyone already swiped is excluded.
|
|
32
|
+
* Returns an empty list until the caller has liked enough embedded profiles to infer from. Every
|
|
33
|
+
* candidate is attributed `MR_ONEHOOK` / `INFERRED_INCLINATION`.
|
|
34
|
+
* @example
|
|
35
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
36
|
+
* ```javascript
|
|
37
|
+
* import { OneHookClient, DiscoverSuggestedCommand } from "onehook-api-client"; // ES Modules import
|
|
38
|
+
* // const { OneHookClient, DiscoverSuggestedCommand } = require("onehook-api-client"); // CommonJS import
|
|
39
|
+
* const client = new OneHookClient(config);
|
|
40
|
+
* const input = { // DiscoverRequest
|
|
41
|
+
* lat: Number("double"), // required
|
|
42
|
+
* lon: Number("double"), // required
|
|
43
|
+
* };
|
|
44
|
+
* const command = new DiscoverSuggestedCommand(input);
|
|
45
|
+
* const response = await client.send(command);
|
|
46
|
+
* // { // DiscoverResponse
|
|
47
|
+
* // candidates: [ // CandidateList // required
|
|
48
|
+
* // { // CandidateDto
|
|
49
|
+
* // userId: "STRING_VALUE", // required
|
|
50
|
+
* // distanceKm: Number("double"), // required
|
|
51
|
+
* // score: Number("double"), // required
|
|
52
|
+
* // matchFinder: "ONEHOOK_INTELLIGENCE" || "MR_ONEHOOK", // required
|
|
53
|
+
* // matchFinderLabel: "STRING_VALUE", // required
|
|
54
|
+
* // suggestionBasis: "EXPLICIT_REQUEST" || "INFERRED_INCLINATION",
|
|
55
|
+
* // similarity: Number("double"),
|
|
56
|
+
* // },
|
|
57
|
+
* // ],
|
|
58
|
+
* // count: Number("int"), // required
|
|
59
|
+
* // algorithm: "STRING_VALUE", // required
|
|
60
|
+
* // };
|
|
61
|
+
*
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @param DiscoverSuggestedCommandInput - {@link DiscoverSuggestedCommandInput}
|
|
65
|
+
* @returns {@link DiscoverSuggestedCommandOutput}
|
|
66
|
+
* @see {@link DiscoverSuggestedCommandInput} for command's `input` shape.
|
|
67
|
+
* @see {@link DiscoverSuggestedCommandOutput} for command's `response` shape.
|
|
68
|
+
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link BadRequestError} (client fault)
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link InternalServerError} (server fault)
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link OneHookServiceException}
|
|
75
|
+
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
76
|
+
*
|
|
77
|
+
*
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
export declare class DiscoverSuggestedCommand extends DiscoverSuggestedCommand_base {
|
|
81
|
+
/** @internal type navigation helper, not in runtime. */
|
|
82
|
+
protected static __types: {
|
|
83
|
+
api: {
|
|
84
|
+
input: DiscoverRequest;
|
|
85
|
+
output: DiscoverResponse;
|
|
86
|
+
};
|
|
87
|
+
sdk: {
|
|
88
|
+
input: DiscoverSuggestedCommandInput;
|
|
89
|
+
output: DiscoverSuggestedCommandOutput;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
+
import { GetAccountStateRequest, GetAccountStateResponse } 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 GetAccountStateCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetAccountStateCommandInput extends GetAccountStateRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetAccountStateCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetAccountStateCommandOutput extends GetAccountStateResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GetAccountStateCommand_base: {
|
|
25
|
+
new (input: GetAccountStateCommandInput): import("@smithy/smithy-client").CommandImpl<GetAccountStateCommandInput, GetAccountStateCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: GetAccountStateCommandInput): import("@smithy/smithy-client").CommandImpl<GetAccountStateCommandInput, GetAccountStateCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Reads a member's current moderation account state. Internal, IAM-authorized (SigV4). An expired
|
|
31
|
+
* RESTRICTED/SUSPENDED window reads back as ACTIVE (no sweep required). The returned `version` is
|
|
32
|
+
* the optimistic-concurrency token to pass to the next SetAccountState.
|
|
33
|
+
* @example
|
|
34
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
35
|
+
* ```javascript
|
|
36
|
+
* import { OneHookClient, GetAccountStateCommand } from "onehook-api-client"; // ES Modules import
|
|
37
|
+
* // const { OneHookClient, GetAccountStateCommand } = require("onehook-api-client"); // CommonJS import
|
|
38
|
+
* const client = new OneHookClient(config);
|
|
39
|
+
* const input = { // GetAccountStateRequest
|
|
40
|
+
* userId: "STRING_VALUE", // required
|
|
41
|
+
* };
|
|
42
|
+
* const command = new GetAccountStateCommand(input);
|
|
43
|
+
* const response = await client.send(command);
|
|
44
|
+
* // { // GetAccountStateResponse
|
|
45
|
+
* // state: "STRING_VALUE", // required
|
|
46
|
+
* // until: Number("long"),
|
|
47
|
+
* // version: Number("int"), // required
|
|
48
|
+
* // reasonCode: "STRING_VALUE",
|
|
49
|
+
* // };
|
|
50
|
+
*
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @param GetAccountStateCommandInput - {@link GetAccountStateCommandInput}
|
|
54
|
+
* @returns {@link GetAccountStateCommandOutput}
|
|
55
|
+
* @see {@link GetAccountStateCommandInput} for command's `input` shape.
|
|
56
|
+
* @see {@link GetAccountStateCommandOutput} for command's `response` shape.
|
|
57
|
+
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link BadRequestError} (client fault)
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link NotFoundError} (client fault)
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link InternalServerError} (server fault)
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link OneHookServiceException}
|
|
66
|
+
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
67
|
+
*
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export declare class GetAccountStateCommand extends GetAccountStateCommand_base {
|
|
72
|
+
/** @internal type navigation helper, not in runtime. */
|
|
73
|
+
protected static __types: {
|
|
74
|
+
api: {
|
|
75
|
+
input: GetAccountStateRequest;
|
|
76
|
+
output: GetAccountStateResponse;
|
|
77
|
+
};
|
|
78
|
+
sdk: {
|
|
79
|
+
input: GetAccountStateCommandInput;
|
|
80
|
+
output: GetAccountStateCommandOutput;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
+
import { GetAdminPhoneStatusRequest, GetAdminPhoneStatusResponse } 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 GetAdminPhoneStatusCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetAdminPhoneStatusCommandInput extends GetAdminPhoneStatusRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetAdminPhoneStatusCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetAdminPhoneStatusCommandOutput extends GetAdminPhoneStatusResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GetAdminPhoneStatusCommand_base: {
|
|
25
|
+
new (input: GetAdminPhoneStatusCommandInput): import("@smithy/smithy-client").CommandImpl<GetAdminPhoneStatusCommandInput, GetAdminPhoneStatusCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: GetAdminPhoneStatusCommandInput): import("@smithy/smithy-client").CommandImpl<GetAdminPhoneStatusCommandInput, GetAdminPhoneStatusCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Reports whether a phone number is already bound to an existing OneHook account, so the admin
|
|
31
|
+
* portal's Admissions module can decide — BEFORE sending an applicant a registration OTP — whether
|
|
32
|
+
* the number is free to onboard. Internal, IAM-authorized (SigV4) — NOT the Cognito user-pool
|
|
33
|
+
* authorizer — so the only callers are principals granted \{@code execute-api:Invoke\} (the portal's
|
|
34
|
+
* per-module invoke role).
|
|
35
|
+
*
|
|
36
|
+
* \{@code registered\} is true when the number holds the SAME phone-uniqueness claim sign-up enforces
|
|
37
|
+
* (the \{@code PHONECLAIM#<e164>\} item in UserTable), which also covers a phone currently claimed by
|
|
38
|
+
* an in-progress registration — exactly what the sign-up uniqueness check rejects as a duplicate.
|
|
39
|
+
* Backed by a single strongly-consistent \{@code GetItem\}; the result is never cached. The phone is
|
|
40
|
+
* validated as E.164 (400 on invalid) and is NEVER echoed back nor logged in clear.
|
|
41
|
+
* @example
|
|
42
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
43
|
+
* ```javascript
|
|
44
|
+
* import { OneHookClient, GetAdminPhoneStatusCommand } from "onehook-api-client"; // ES Modules import
|
|
45
|
+
* // const { OneHookClient, GetAdminPhoneStatusCommand } = require("onehook-api-client"); // CommonJS import
|
|
46
|
+
* const client = new OneHookClient(config);
|
|
47
|
+
* const input = { // GetAdminPhoneStatusRequest
|
|
48
|
+
* phoneNumber: "STRING_VALUE", // required
|
|
49
|
+
* };
|
|
50
|
+
* const command = new GetAdminPhoneStatusCommand(input);
|
|
51
|
+
* const response = await client.send(command);
|
|
52
|
+
* // { // GetAdminPhoneStatusResponse
|
|
53
|
+
* // registered: true || false, // required
|
|
54
|
+
* // };
|
|
55
|
+
*
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @param GetAdminPhoneStatusCommandInput - {@link GetAdminPhoneStatusCommandInput}
|
|
59
|
+
* @returns {@link GetAdminPhoneStatusCommandOutput}
|
|
60
|
+
* @see {@link GetAdminPhoneStatusCommandInput} for command's `input` shape.
|
|
61
|
+
* @see {@link GetAdminPhoneStatusCommandOutput} for command's `response` shape.
|
|
62
|
+
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link BadRequestError} (client fault)
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link InternalServerError} (server fault)
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link OneHookServiceException}
|
|
69
|
+
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
70
|
+
*
|
|
71
|
+
*
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
export declare class GetAdminPhoneStatusCommand extends GetAdminPhoneStatusCommand_base {
|
|
75
|
+
/** @internal type navigation helper, not in runtime. */
|
|
76
|
+
protected static __types: {
|
|
77
|
+
api: {
|
|
78
|
+
input: GetAdminPhoneStatusRequest;
|
|
79
|
+
output: GetAdminPhoneStatusResponse;
|
|
80
|
+
};
|
|
81
|
+
sdk: {
|
|
82
|
+
input: GetAdminPhoneStatusCommandInput;
|
|
83
|
+
output: GetAdminPhoneStatusCommandOutput;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
+
import { SetAccountStateRequest, SetAccountStateResponse } 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 SetAccountStateCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface SetAccountStateCommandInput extends SetAccountStateRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link SetAccountStateCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface SetAccountStateCommandOutput extends SetAccountStateResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const SetAccountStateCommand_base: {
|
|
25
|
+
new (input: SetAccountStateCommandInput): import("@smithy/smithy-client").CommandImpl<SetAccountStateCommandInput, SetAccountStateCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: SetAccountStateCommandInput): import("@smithy/smithy-client").CommandImpl<SetAccountStateCommandInput, SetAccountStateCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Sets a member's moderation account state. Internal, IAM-authorized (SigV4) — NOT the Cognito
|
|
31
|
+
* user-pool authorizer — so the only caller is the admin portal's moderation module (its per-module
|
|
32
|
+
* invoke role). The write is optimistic-concurrency guarded: pass the `expectedVersion` read from
|
|
33
|
+
* GetAccountState and a concurrent change returns 409. Emits an `AccountStateChanged` domain event
|
|
34
|
+
* through the Identity transactional outbox. No PII is accepted or logged — the reason is a CODE.
|
|
35
|
+
*
|
|
36
|
+
* RESTRICTED/SUSPENDED require an `until` (epoch ms); BANNED is permanent and must NOT carry one.
|
|
37
|
+
* SUSPENDED and BANNED members are refused at sign-in and token refresh (ACCOUNT_SUSPENDED /
|
|
38
|
+
* ACCOUNT_BANNED); RESTRICTED members can still sign in but are hidden from discovery.
|
|
39
|
+
* @example
|
|
40
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
41
|
+
* ```javascript
|
|
42
|
+
* import { OneHookClient, SetAccountStateCommand } from "onehook-api-client"; // ES Modules import
|
|
43
|
+
* // const { OneHookClient, SetAccountStateCommand } = require("onehook-api-client"); // CommonJS import
|
|
44
|
+
* const client = new OneHookClient(config);
|
|
45
|
+
* const input = { // SetAccountStateRequest
|
|
46
|
+
* userId: "STRING_VALUE", // required
|
|
47
|
+
* state: "STRING_VALUE", // required
|
|
48
|
+
* reasonCode: "STRING_VALUE", // required
|
|
49
|
+
* until: Number("long"),
|
|
50
|
+
* actor: "STRING_VALUE", // required
|
|
51
|
+
* expectedVersion: Number("int"),
|
|
52
|
+
* };
|
|
53
|
+
* const command = new SetAccountStateCommand(input);
|
|
54
|
+
* const response = await client.send(command);
|
|
55
|
+
* // { // SetAccountStateResponse
|
|
56
|
+
* // state: "STRING_VALUE", // required
|
|
57
|
+
* // until: Number("long"),
|
|
58
|
+
* // version: Number("int"), // required
|
|
59
|
+
* // };
|
|
60
|
+
*
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param SetAccountStateCommandInput - {@link SetAccountStateCommandInput}
|
|
64
|
+
* @returns {@link SetAccountStateCommandOutput}
|
|
65
|
+
* @see {@link SetAccountStateCommandInput} for command's `input` shape.
|
|
66
|
+
* @see {@link SetAccountStateCommandOutput} for command's `response` shape.
|
|
67
|
+
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link BadRequestError} (client fault)
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link NotFoundError} (client fault)
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link ConflictError} (client fault)
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link InternalServerError} (server fault)
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link OneHookServiceException}
|
|
78
|
+
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
79
|
+
*
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export declare class SetAccountStateCommand extends SetAccountStateCommand_base {
|
|
84
|
+
/** @internal type navigation helper, not in runtime. */
|
|
85
|
+
protected static __types: {
|
|
86
|
+
api: {
|
|
87
|
+
input: SetAccountStateRequest;
|
|
88
|
+
output: SetAccountStateResponse;
|
|
89
|
+
};
|
|
90
|
+
sdk: {
|
|
91
|
+
input: SetAccountStateCommandInput;
|
|
92
|
+
output: SetAccountStateCommandOutput;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
}
|
|
@@ -13,6 +13,8 @@ export * from "./UpdateChatSettingsCommand";
|
|
|
13
13
|
export * from "./AuthSocialCommand";
|
|
14
14
|
export * from "./CreateAdminInviteCommand";
|
|
15
15
|
export * from "./GenerateInviteCommand";
|
|
16
|
+
export * from "./GetAccountStateCommand";
|
|
17
|
+
export * from "./GetAdminPhoneStatusCommand";
|
|
16
18
|
export * from "./GetCredentialReadinessCommand";
|
|
17
19
|
export * from "./GetUserCommand";
|
|
18
20
|
export * from "./GetUserByEmailCommand";
|
|
@@ -24,6 +26,7 @@ export * from "./RequestEmailOtpCommand";
|
|
|
24
26
|
export * from "./RequestPhoneOtpCommand";
|
|
25
27
|
export * from "./RequestPhoneUpdateOtpCommand";
|
|
26
28
|
export * from "./SendAdminLinkOtpCommand";
|
|
29
|
+
export * from "./SetAccountStateCommand";
|
|
27
30
|
export * from "./UnlinkSocialCommand";
|
|
28
31
|
export * from "./UpdateEntitlementsCommand";
|
|
29
32
|
export * from "./UpdatePhoneNumberCommand";
|
|
@@ -31,6 +34,8 @@ export * from "./UpdateUsernameCommand";
|
|
|
31
34
|
export * from "./ValidateInviteCommand";
|
|
32
35
|
export * from "./VerifyAdminLinkOtpCommand";
|
|
33
36
|
export * from "./DiscoverCommand";
|
|
37
|
+
export * from "./DiscoverByIntentCommand";
|
|
38
|
+
export * from "./DiscoverSuggestedCommand";
|
|
34
39
|
export * from "./GetNotificationPreferencesCommand";
|
|
35
40
|
export * from "./GetPreferencesCommand";
|
|
36
41
|
export * from "./GetReceivedLikesCommand";
|