onehook-api-client 1.0.16 → 1.0.18
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 +7 -0
- package/dist-cjs/OneHook.js +2 -0
- package/dist-cjs/commands/GetAiContextMatchCommand.js +21 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/graphql/types.js +1 -0
- package/dist-cjs/models/models_0.js +16 -16
- package/dist-cjs/protocols/Aws_restJson1.js +41 -6
- package/dist-es/OneHook.js +2 -0
- package/dist-es/commands/GetAiContextMatchCommand.js +17 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/graphql/types.js +1 -0
- package/dist-es/models/models_0.js +14 -14
- package/dist-es/protocols/Aws_restJson1.js +37 -4
- package/dist-types/OneHook.d.ts +7 -0
- package/dist-types/OneHookClient.d.ts +3 -2
- package/dist-types/commands/GetAiContextMatchCommand.d.ts +117 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/graphql/types.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +95 -14
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -197,6 +197,13 @@ see LICENSE for more information.
|
|
|
197
197
|
|
|
198
198
|
## Client Commands (Operations List)
|
|
199
199
|
|
|
200
|
+
<details>
|
|
201
|
+
<summary>
|
|
202
|
+
GetAiContextMatch
|
|
203
|
+
</summary>
|
|
204
|
+
|
|
205
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetAiContextMatchCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetAiContextMatchCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetAiContextMatchCommandOutput/)
|
|
206
|
+
</details>
|
|
200
207
|
<details>
|
|
201
208
|
<summary>
|
|
202
209
|
CreateMediaDownloadUrl
|
package/dist-cjs/OneHook.js
CHANGED
|
@@ -15,6 +15,7 @@ const DiscoverCommand_1 = require("./commands/DiscoverCommand");
|
|
|
15
15
|
const GenerateDownloadUrlCommand_1 = require("./commands/GenerateDownloadUrlCommand");
|
|
16
16
|
const GenerateInviteCommand_1 = require("./commands/GenerateInviteCommand");
|
|
17
17
|
const GenerateUploadUrlCommand_1 = require("./commands/GenerateUploadUrlCommand");
|
|
18
|
+
const GetAiContextMatchCommand_1 = require("./commands/GetAiContextMatchCommand");
|
|
18
19
|
const GetChatSettingsCommand_1 = require("./commands/GetChatSettingsCommand");
|
|
19
20
|
const GetCredentialReadinessCommand_1 = require("./commands/GetCredentialReadinessCommand");
|
|
20
21
|
const GetLivenessStatusCommand_1 = require("./commands/GetLivenessStatusCommand");
|
|
@@ -57,6 +58,7 @@ const UpgradeUserCommand_1 = require("./commands/UpgradeUserCommand");
|
|
|
57
58
|
const ValidateInviteCommand_1 = require("./commands/ValidateInviteCommand");
|
|
58
59
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
59
60
|
const commands = {
|
|
61
|
+
GetAiContextMatchCommand: GetAiContextMatchCommand_1.GetAiContextMatchCommand,
|
|
60
62
|
CreateMediaDownloadUrlCommand: CreateMediaDownloadUrlCommand_1.CreateMediaDownloadUrlCommand,
|
|
61
63
|
CreateMediaUploadUrlCommand: CreateMediaUploadUrlCommand_1.CreateMediaUploadUrlCommand,
|
|
62
64
|
DeleteMatchMessagesCommand: DeleteMatchMessagesCommand_1.DeleteMatchMessagesCommand,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetAiContextMatchCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class GetAiContextMatchCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("OneHookService", "GetAiContextMatch", {})
|
|
15
|
+
.n("OneHookClient", "GetAiContextMatchCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_GetAiContextMatchCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_GetAiContextMatchCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.GetAiContextMatchCommand = GetAiContextMatchCommand;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./GetAiContextMatchCommand"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./CreateMediaDownloadUrlCommand"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./CreateMediaUploadUrlCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./DeleteMatchMessagesCommand"), exports);
|
|
@@ -18,6 +18,7 @@ var MessageStatus;
|
|
|
18
18
|
})(MessageStatus || (exports.MessageStatus = MessageStatus = {}));
|
|
19
19
|
var NotificationKind;
|
|
20
20
|
(function (NotificationKind) {
|
|
21
|
+
NotificationKind["ConversationCooling"] = "CONVERSATION_COOLING";
|
|
21
22
|
NotificationKind["MutualMatch"] = "MUTUAL_MATCH";
|
|
22
23
|
NotificationKind["ProfileLiked"] = "PROFILE_LIKED";
|
|
23
24
|
})(NotificationKind || (exports.NotificationKind = NotificationKind = {}));
|
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CredentialGap = exports.DeviceLimitError = exports.Platform = exports.LastSeenVisibility = exports.MediaKind = exports.
|
|
3
|
+
exports.CredentialGap = exports.DeviceLimitError = exports.Platform = exports.LastSeenVisibility = exports.MediaKind = exports.ForbiddenError = exports.NotFoundError = exports.InternalServerError = exports.BadRequestError = void 0;
|
|
4
4
|
const OneHookServiceException_1 = require("./OneHookServiceException");
|
|
5
|
-
class ForbiddenError extends OneHookServiceException_1.OneHookServiceException {
|
|
6
|
-
name = "ForbiddenError";
|
|
7
|
-
$fault = "client";
|
|
8
|
-
error;
|
|
9
|
-
constructor(opts) {
|
|
10
|
-
super({
|
|
11
|
-
name: "ForbiddenError",
|
|
12
|
-
$fault: "client",
|
|
13
|
-
...opts
|
|
14
|
-
});
|
|
15
|
-
Object.setPrototypeOf(this, ForbiddenError.prototype);
|
|
16
|
-
this.error = opts.error;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.ForbiddenError = ForbiddenError;
|
|
20
5
|
class BadRequestError extends OneHookServiceException_1.OneHookServiceException {
|
|
21
6
|
name = "BadRequestError";
|
|
22
7
|
$fault = "client";
|
|
@@ -62,6 +47,21 @@ class NotFoundError extends OneHookServiceException_1.OneHookServiceException {
|
|
|
62
47
|
}
|
|
63
48
|
}
|
|
64
49
|
exports.NotFoundError = NotFoundError;
|
|
50
|
+
class ForbiddenError extends OneHookServiceException_1.OneHookServiceException {
|
|
51
|
+
name = "ForbiddenError";
|
|
52
|
+
$fault = "client";
|
|
53
|
+
error;
|
|
54
|
+
constructor(opts) {
|
|
55
|
+
super({
|
|
56
|
+
name: "ForbiddenError",
|
|
57
|
+
$fault: "client",
|
|
58
|
+
...opts
|
|
59
|
+
});
|
|
60
|
+
Object.setPrototypeOf(this, ForbiddenError.prototype);
|
|
61
|
+
this.error = opts.error;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.ForbiddenError = ForbiddenError;
|
|
65
65
|
exports.MediaKind = {
|
|
66
66
|
AUDIO: "AUDIO",
|
|
67
67
|
FILE: "FILE",
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.de_UpgradeUserCommand = exports.de_UnhookCommand = exports.de_InitUserCommand = exports.de_GetStateCommand = exports.de_GetMatchCommand = exports.de_CompleteOnboardingCommand = void 0;
|
|
3
|
+
exports.se_GetMatchCommand = exports.se_CompleteOnboardingCommand = exports.se_UpdateProfileCommand = exports.se_GetProfileCommand = exports.se_GetMyProfileCommand = exports.se_GetLivenessStatusCommand = exports.se_GenerateUploadUrlCommand = exports.se_GenerateDownloadUrlCommand = exports.se_DeleteProfileCommand = exports.se_CreateLivenessSessionCommand = exports.se_CompleteLivenessSessionCommand = exports.se_UpdatePreferencesCommand = exports.se_SwipeByUsernameCommand = exports.se_SwipeCommand = exports.se_RemoveLocationCommand = exports.se_IndexLocationCommand = exports.se_GetRosesCommand = exports.se_GetReceivedLikesCommand = exports.se_GetPreferencesCommand = exports.se_GetNotificationPreferencesCommand = exports.se_DiscoverCommand = exports.se_ValidateInviteCommand = exports.se_UpdateUsernameCommand = exports.se_UpdatePhoneNumberCommand = exports.se_UpdateEntitlementsCommand = exports.se_UnlinkSocialCommand = exports.se_RequestPhoneUpdateOtpCommand = exports.se_RequestPhoneOtpCommand = exports.se_RequestEmailOtpCommand = exports.se_RegisterPhoneCommand = exports.se_LinkSocialCommand = exports.se_LinkEmailCommand = exports.se_GetUserIdByUsernameCommand = exports.se_GetUserByEmailCommand = exports.se_GetUserCommand = exports.se_GetCredentialReadinessCommand = exports.se_GenerateInviteCommand = exports.se_AuthSocialCommand = exports.se_UpdateChatSettingsCommand = exports.se_RevokeDeviceCommand = exports.se_RegisterPushTokenCommand = exports.se_RegisterDeviceCommand = exports.se_ListMyDevicesCommand = exports.se_GetParticipantRegistryCommand = exports.se_GetChatSettingsCommand = exports.se_DeletePushTokenCommand = exports.se_DeleteMatchMessagesCommand = exports.se_CreateMediaUploadUrlCommand = exports.se_CreateMediaDownloadUrlCommand = exports.se_GetAiContextMatchCommand = void 0;
|
|
4
|
+
exports.de_GetMyProfileCommand = exports.de_GetLivenessStatusCommand = exports.de_GenerateUploadUrlCommand = exports.de_GenerateDownloadUrlCommand = exports.de_DeleteProfileCommand = exports.de_CreateLivenessSessionCommand = exports.de_CompleteLivenessSessionCommand = exports.de_UpdatePreferencesCommand = exports.de_SwipeByUsernameCommand = exports.de_SwipeCommand = exports.de_RemoveLocationCommand = exports.de_IndexLocationCommand = exports.de_GetRosesCommand = exports.de_GetReceivedLikesCommand = exports.de_GetPreferencesCommand = exports.de_GetNotificationPreferencesCommand = exports.de_DiscoverCommand = exports.de_ValidateInviteCommand = exports.de_UpdateUsernameCommand = exports.de_UpdatePhoneNumberCommand = exports.de_UpdateEntitlementsCommand = exports.de_UnlinkSocialCommand = exports.de_RequestPhoneUpdateOtpCommand = exports.de_RequestPhoneOtpCommand = exports.de_RequestEmailOtpCommand = exports.de_RegisterPhoneCommand = exports.de_LinkSocialCommand = exports.de_LinkEmailCommand = exports.de_GetUserIdByUsernameCommand = exports.de_GetUserByEmailCommand = exports.de_GetUserCommand = exports.de_GetCredentialReadinessCommand = exports.de_GenerateInviteCommand = exports.de_AuthSocialCommand = exports.de_UpdateChatSettingsCommand = exports.de_RevokeDeviceCommand = exports.de_RegisterPushTokenCommand = exports.de_RegisterDeviceCommand = exports.de_ListMyDevicesCommand = exports.de_GetParticipantRegistryCommand = exports.de_GetChatSettingsCommand = exports.de_DeletePushTokenCommand = exports.de_DeleteMatchMessagesCommand = exports.de_CreateMediaUploadUrlCommand = exports.de_CreateMediaDownloadUrlCommand = exports.de_GetAiContextMatchCommand = exports.se_UpgradeUserCommand = exports.se_UnhookCommand = exports.se_InitUserCommand = exports.se_GetStateCommand = void 0;
|
|
5
|
+
exports.de_UpgradeUserCommand = exports.de_UnhookCommand = exports.de_InitUserCommand = exports.de_GetStateCommand = exports.de_GetMatchCommand = exports.de_CompleteOnboardingCommand = exports.de_UpdateProfileCommand = exports.de_GetProfileCommand = void 0;
|
|
6
6
|
const OneHookServiceException_1 = require("../models/OneHookServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const core_1 = require("@aws-sdk/core");
|
|
9
9
|
const core_2 = require("@smithy/core");
|
|
10
10
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
11
|
+
const se_GetAiContextMatchCommand = async (input, context) => {
|
|
12
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
13
|
+
const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
|
|
14
|
+
[_xoui]: input[_rUI],
|
|
15
|
+
});
|
|
16
|
+
b.bp("/api/ai-context/matches/{matchId}");
|
|
17
|
+
b.p('matchId', () => input.matchId, '{matchId}', false);
|
|
18
|
+
let body;
|
|
19
|
+
b.m("GET")
|
|
20
|
+
.h(headers)
|
|
21
|
+
.b(body);
|
|
22
|
+
return b.build();
|
|
23
|
+
};
|
|
24
|
+
exports.se_GetAiContextMatchCommand = se_GetAiContextMatchCommand;
|
|
11
25
|
const se_CreateMediaDownloadUrlCommand = async (input, context) => {
|
|
12
26
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
13
27
|
const headers = {
|
|
@@ -851,6 +865,25 @@ const se_UpgradeUserCommand = async (input, context) => {
|
|
|
851
865
|
return b.build();
|
|
852
866
|
};
|
|
853
867
|
exports.se_UpgradeUserCommand = se_UpgradeUserCommand;
|
|
868
|
+
const de_GetAiContextMatchCommand = async (output, context) => {
|
|
869
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
870
|
+
return de_CommandError(output, context);
|
|
871
|
+
}
|
|
872
|
+
const contents = (0, smithy_client_1.map)({
|
|
873
|
+
$metadata: deserializeMetadata(output),
|
|
874
|
+
});
|
|
875
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
876
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
877
|
+
'contextPolicy': smithy_client_1._json,
|
|
878
|
+
'matchId': smithy_client_1.expectString,
|
|
879
|
+
'matchedUser': smithy_client_1._json,
|
|
880
|
+
'requestingUser': smithy_client_1._json,
|
|
881
|
+
'status': smithy_client_1.expectString,
|
|
882
|
+
});
|
|
883
|
+
Object.assign(contents, doc);
|
|
884
|
+
return contents;
|
|
885
|
+
};
|
|
886
|
+
exports.de_GetAiContextMatchCommand = de_GetAiContextMatchCommand;
|
|
854
887
|
const de_CreateMediaDownloadUrlCommand = async (output, context) => {
|
|
855
888
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
856
889
|
return de_CommandError(output, context);
|
|
@@ -1836,15 +1869,15 @@ const de_CommandError = async (output, context) => {
|
|
|
1836
1869
|
case "BadRequestError":
|
|
1837
1870
|
case "club.onehook.identity#BadRequestError":
|
|
1838
1871
|
throw await de_BadRequestErrorRes(parsedOutput, context);
|
|
1839
|
-
case "ForbiddenError":
|
|
1840
|
-
case "club.onehook.chat#ForbiddenError":
|
|
1841
|
-
throw await de_ForbiddenErrorRes(parsedOutput, context);
|
|
1842
1872
|
case "InternalServerError":
|
|
1843
1873
|
case "club.onehook.identity#InternalServerError":
|
|
1844
1874
|
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1845
1875
|
case "NotFoundError":
|
|
1846
1876
|
case "club.onehook.identity#NotFoundError":
|
|
1847
1877
|
throw await de_NotFoundErrorRes(parsedOutput, context);
|
|
1878
|
+
case "ForbiddenError":
|
|
1879
|
+
case "club.onehook.chat#ForbiddenError":
|
|
1880
|
+
throw await de_ForbiddenErrorRes(parsedOutput, context);
|
|
1848
1881
|
case "DeviceLimitError":
|
|
1849
1882
|
case "club.onehook.chat#DeviceLimitError":
|
|
1850
1883
|
throw await de_DeviceLimitErrorRes(parsedOutput, context);
|
|
@@ -1947,3 +1980,5 @@ const _k = "key";
|
|
|
1947
1980
|
const _l = "lat";
|
|
1948
1981
|
const _lo = "lon";
|
|
1949
1982
|
const _mI = "matchId";
|
|
1983
|
+
const _rUI = "requestingUserId";
|
|
1984
|
+
const _xoui = "x-onehook-user-id";
|
package/dist-es/OneHook.js
CHANGED
|
@@ -12,6 +12,7 @@ import { DiscoverCommand, } from "./commands/DiscoverCommand";
|
|
|
12
12
|
import { GenerateDownloadUrlCommand, } from "./commands/GenerateDownloadUrlCommand";
|
|
13
13
|
import { GenerateInviteCommand, } from "./commands/GenerateInviteCommand";
|
|
14
14
|
import { GenerateUploadUrlCommand, } from "./commands/GenerateUploadUrlCommand";
|
|
15
|
+
import { GetAiContextMatchCommand, } from "./commands/GetAiContextMatchCommand";
|
|
15
16
|
import { GetChatSettingsCommand, } from "./commands/GetChatSettingsCommand";
|
|
16
17
|
import { GetCredentialReadinessCommand, } from "./commands/GetCredentialReadinessCommand";
|
|
17
18
|
import { GetLivenessStatusCommand, } from "./commands/GetLivenessStatusCommand";
|
|
@@ -54,6 +55,7 @@ import { UpgradeUserCommand, } from "./commands/UpgradeUserCommand";
|
|
|
54
55
|
import { ValidateInviteCommand, } from "./commands/ValidateInviteCommand";
|
|
55
56
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
56
57
|
const commands = {
|
|
58
|
+
GetAiContextMatchCommand,
|
|
57
59
|
CreateMediaDownloadUrlCommand,
|
|
58
60
|
CreateMediaUploadUrlCommand,
|
|
59
61
|
DeleteMatchMessagesCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetAiContextMatchCommand, se_GetAiContextMatchCommand, } 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 GetAiContextMatchCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("OneHookService", "GetAiContextMatch", {})
|
|
12
|
+
.n("OneHookClient", "GetAiContextMatchCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetAiContextMatchCommand)
|
|
15
|
+
.de(de_GetAiContextMatchCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
package/dist-es/graphql/types.js
CHANGED
|
@@ -15,6 +15,7 @@ export var MessageStatus;
|
|
|
15
15
|
})(MessageStatus || (MessageStatus = {}));
|
|
16
16
|
export var NotificationKind;
|
|
17
17
|
(function (NotificationKind) {
|
|
18
|
+
NotificationKind["ConversationCooling"] = "CONVERSATION_COOLING";
|
|
18
19
|
NotificationKind["MutualMatch"] = "MUTUAL_MATCH";
|
|
19
20
|
NotificationKind["ProfileLiked"] = "PROFILE_LIKED";
|
|
20
21
|
})(NotificationKind || (NotificationKind = {}));
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import { OneHookServiceException as __BaseException } from "./OneHookServiceException";
|
|
2
|
-
export class ForbiddenError extends __BaseException {
|
|
3
|
-
name = "ForbiddenError";
|
|
4
|
-
$fault = "client";
|
|
5
|
-
error;
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super({
|
|
8
|
-
name: "ForbiddenError",
|
|
9
|
-
$fault: "client",
|
|
10
|
-
...opts
|
|
11
|
-
});
|
|
12
|
-
Object.setPrototypeOf(this, ForbiddenError.prototype);
|
|
13
|
-
this.error = opts.error;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
2
|
export class BadRequestError extends __BaseException {
|
|
17
3
|
name = "BadRequestError";
|
|
18
4
|
$fault = "client";
|
|
@@ -55,6 +41,20 @@ export class NotFoundError extends __BaseException {
|
|
|
55
41
|
this.error = opts.error;
|
|
56
42
|
}
|
|
57
43
|
}
|
|
44
|
+
export class ForbiddenError extends __BaseException {
|
|
45
|
+
name = "ForbiddenError";
|
|
46
|
+
$fault = "client";
|
|
47
|
+
error;
|
|
48
|
+
constructor(opts) {
|
|
49
|
+
super({
|
|
50
|
+
name: "ForbiddenError",
|
|
51
|
+
$fault: "client",
|
|
52
|
+
...opts
|
|
53
|
+
});
|
|
54
|
+
Object.setPrototypeOf(this, ForbiddenError.prototype);
|
|
55
|
+
this.error = opts.error;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
58
|
export const MediaKind = {
|
|
59
59
|
AUDIO: "AUDIO",
|
|
60
60
|
FILE: "FILE",
|
|
@@ -2,7 +2,20 @@ import { OneHookServiceException as __BaseException } from "../models/OneHookSer
|
|
|
2
2
|
import { BadRequestError, DeviceLimitError, ForbiddenError, InternalServerError, NotFoundError, } from "../models/models_0";
|
|
3
3
|
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
|
-
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
|
+
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, _json, collectBody, isSerializableHeaderValue, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
|
+
export const se_GetAiContextMatchCommand = async (input, context) => {
|
|
7
|
+
const b = rb(input, context);
|
|
8
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
9
|
+
[_xoui]: input[_rUI],
|
|
10
|
+
});
|
|
11
|
+
b.bp("/api/ai-context/matches/{matchId}");
|
|
12
|
+
b.p('matchId', () => input.matchId, '{matchId}', false);
|
|
13
|
+
let body;
|
|
14
|
+
b.m("GET")
|
|
15
|
+
.h(headers)
|
|
16
|
+
.b(body);
|
|
17
|
+
return b.build();
|
|
18
|
+
};
|
|
6
19
|
export const se_CreateMediaDownloadUrlCommand = async (input, context) => {
|
|
7
20
|
const b = rb(input, context);
|
|
8
21
|
const headers = {
|
|
@@ -793,6 +806,24 @@ export const se_UpgradeUserCommand = async (input, context) => {
|
|
|
793
806
|
.b(body);
|
|
794
807
|
return b.build();
|
|
795
808
|
};
|
|
809
|
+
export const de_GetAiContextMatchCommand = async (output, context) => {
|
|
810
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
811
|
+
return de_CommandError(output, context);
|
|
812
|
+
}
|
|
813
|
+
const contents = map({
|
|
814
|
+
$metadata: deserializeMetadata(output),
|
|
815
|
+
});
|
|
816
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
817
|
+
const doc = take(data, {
|
|
818
|
+
'contextPolicy': _json,
|
|
819
|
+
'matchId': __expectString,
|
|
820
|
+
'matchedUser': _json,
|
|
821
|
+
'requestingUser': _json,
|
|
822
|
+
'status': __expectString,
|
|
823
|
+
});
|
|
824
|
+
Object.assign(contents, doc);
|
|
825
|
+
return contents;
|
|
826
|
+
};
|
|
796
827
|
export const de_CreateMediaDownloadUrlCommand = async (output, context) => {
|
|
797
828
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
798
829
|
return de_CommandError(output, context);
|
|
@@ -1725,15 +1756,15 @@ const de_CommandError = async (output, context) => {
|
|
|
1725
1756
|
case "BadRequestError":
|
|
1726
1757
|
case "club.onehook.identity#BadRequestError":
|
|
1727
1758
|
throw await de_BadRequestErrorRes(parsedOutput, context);
|
|
1728
|
-
case "ForbiddenError":
|
|
1729
|
-
case "club.onehook.chat#ForbiddenError":
|
|
1730
|
-
throw await de_ForbiddenErrorRes(parsedOutput, context);
|
|
1731
1759
|
case "InternalServerError":
|
|
1732
1760
|
case "club.onehook.identity#InternalServerError":
|
|
1733
1761
|
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1734
1762
|
case "NotFoundError":
|
|
1735
1763
|
case "club.onehook.identity#NotFoundError":
|
|
1736
1764
|
throw await de_NotFoundErrorRes(parsedOutput, context);
|
|
1765
|
+
case "ForbiddenError":
|
|
1766
|
+
case "club.onehook.chat#ForbiddenError":
|
|
1767
|
+
throw await de_ForbiddenErrorRes(parsedOutput, context);
|
|
1737
1768
|
case "DeviceLimitError":
|
|
1738
1769
|
case "club.onehook.chat#DeviceLimitError":
|
|
1739
1770
|
throw await de_DeviceLimitErrorRes(parsedOutput, context);
|
|
@@ -1836,3 +1867,5 @@ const _k = "key";
|
|
|
1836
1867
|
const _l = "lat";
|
|
1837
1868
|
const _lo = "lon";
|
|
1838
1869
|
const _mI = "matchId";
|
|
1870
|
+
const _rUI = "requestingUserId";
|
|
1871
|
+
const _xoui = "x-onehook-user-id";
|
package/dist-types/OneHook.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { DiscoverCommandInput, DiscoverCommandOutput } from "./commands/Discover
|
|
|
12
12
|
import { GenerateDownloadUrlCommandInput, GenerateDownloadUrlCommandOutput } from "./commands/GenerateDownloadUrlCommand";
|
|
13
13
|
import { GenerateInviteCommandInput, GenerateInviteCommandOutput } from "./commands/GenerateInviteCommand";
|
|
14
14
|
import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from "./commands/GenerateUploadUrlCommand";
|
|
15
|
+
import { GetAiContextMatchCommandInput, GetAiContextMatchCommandOutput } from "./commands/GetAiContextMatchCommand";
|
|
15
16
|
import { GetChatSettingsCommandInput, GetChatSettingsCommandOutput } from "./commands/GetChatSettingsCommand";
|
|
16
17
|
import { GetCredentialReadinessCommandInput, GetCredentialReadinessCommandOutput } from "./commands/GetCredentialReadinessCommand";
|
|
17
18
|
import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "./commands/GetLivenessStatusCommand";
|
|
@@ -54,6 +55,12 @@ import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "./commands/Up
|
|
|
54
55
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "./commands/ValidateInviteCommand";
|
|
55
56
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
56
57
|
export interface OneHook {
|
|
58
|
+
/**
|
|
59
|
+
* @see {@link GetAiContextMatchCommand}
|
|
60
|
+
*/
|
|
61
|
+
getAiContextMatch(args: GetAiContextMatchCommandInput, options?: __HttpHandlerOptions): Promise<GetAiContextMatchCommandOutput>;
|
|
62
|
+
getAiContextMatch(args: GetAiContextMatchCommandInput, cb: (err: any, data?: GetAiContextMatchCommandOutput) => void): void;
|
|
63
|
+
getAiContextMatch(args: GetAiContextMatchCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAiContextMatchCommandOutput) => void): void;
|
|
57
64
|
/**
|
|
58
65
|
* @see {@link CreateMediaDownloadUrlCommand}
|
|
59
66
|
*/
|
|
@@ -12,6 +12,7 @@ import { DiscoverCommandInput, DiscoverCommandOutput } from "./commands/Discover
|
|
|
12
12
|
import { GenerateDownloadUrlCommandInput, GenerateDownloadUrlCommandOutput } from "./commands/GenerateDownloadUrlCommand";
|
|
13
13
|
import { GenerateInviteCommandInput, GenerateInviteCommandOutput } from "./commands/GenerateInviteCommand";
|
|
14
14
|
import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from "./commands/GenerateUploadUrlCommand";
|
|
15
|
+
import { GetAiContextMatchCommandInput, GetAiContextMatchCommandOutput } from "./commands/GetAiContextMatchCommand";
|
|
15
16
|
import { GetChatSettingsCommandInput, GetChatSettingsCommandOutput } from "./commands/GetChatSettingsCommand";
|
|
16
17
|
import { GetCredentialReadinessCommandInput, GetCredentialReadinessCommandOutput } from "./commands/GetCredentialReadinessCommand";
|
|
17
18
|
import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "./commands/GetLivenessStatusCommand";
|
|
@@ -64,11 +65,11 @@ export { __Client };
|
|
|
64
65
|
/**
|
|
65
66
|
* @public
|
|
66
67
|
*/
|
|
67
|
-
export type ServiceInputTypes = AuthSocialCommandInput | CompleteLivenessSessionCommandInput | CompleteOnboardingCommandInput | CreateLivenessSessionCommandInput | CreateMediaDownloadUrlCommandInput | CreateMediaUploadUrlCommandInput | DeleteMatchMessagesCommandInput | DeleteProfileCommandInput | DeletePushTokenCommandInput | DiscoverCommandInput | GenerateDownloadUrlCommandInput | GenerateInviteCommandInput | GenerateUploadUrlCommandInput | GetChatSettingsCommandInput | GetCredentialReadinessCommandInput | GetLivenessStatusCommandInput | GetMatchCommandInput | GetMyProfileCommandInput | GetNotificationPreferencesCommandInput | GetParticipantRegistryCommandInput | GetPreferencesCommandInput | GetProfileCommandInput | GetReceivedLikesCommandInput | GetRosesCommandInput | GetStateCommandInput | GetUserByEmailCommandInput | GetUserCommandInput | GetUserIdByUsernameCommandInput | IndexLocationCommandInput | InitUserCommandInput | LinkEmailCommandInput | LinkSocialCommandInput | ListMyDevicesCommandInput | RegisterDeviceCommandInput | RegisterPhoneCommandInput | RegisterPushTokenCommandInput | RemoveLocationCommandInput | RequestEmailOtpCommandInput | RequestPhoneOtpCommandInput | RequestPhoneUpdateOtpCommandInput | RevokeDeviceCommandInput | SwipeByUsernameCommandInput | SwipeCommandInput | UnhookCommandInput | UnlinkSocialCommandInput | UpdateChatSettingsCommandInput | UpdateEntitlementsCommandInput | UpdatePhoneNumberCommandInput | UpdatePreferencesCommandInput | UpdateProfileCommandInput | UpdateUsernameCommandInput | UpgradeUserCommandInput | ValidateInviteCommandInput;
|
|
68
|
+
export type ServiceInputTypes = AuthSocialCommandInput | CompleteLivenessSessionCommandInput | CompleteOnboardingCommandInput | CreateLivenessSessionCommandInput | CreateMediaDownloadUrlCommandInput | CreateMediaUploadUrlCommandInput | DeleteMatchMessagesCommandInput | DeleteProfileCommandInput | DeletePushTokenCommandInput | DiscoverCommandInput | GenerateDownloadUrlCommandInput | GenerateInviteCommandInput | GenerateUploadUrlCommandInput | GetAiContextMatchCommandInput | GetChatSettingsCommandInput | GetCredentialReadinessCommandInput | GetLivenessStatusCommandInput | GetMatchCommandInput | GetMyProfileCommandInput | GetNotificationPreferencesCommandInput | GetParticipantRegistryCommandInput | GetPreferencesCommandInput | GetProfileCommandInput | GetReceivedLikesCommandInput | GetRosesCommandInput | GetStateCommandInput | GetUserByEmailCommandInput | GetUserCommandInput | GetUserIdByUsernameCommandInput | IndexLocationCommandInput | InitUserCommandInput | LinkEmailCommandInput | LinkSocialCommandInput | ListMyDevicesCommandInput | RegisterDeviceCommandInput | RegisterPhoneCommandInput | RegisterPushTokenCommandInput | RemoveLocationCommandInput | RequestEmailOtpCommandInput | RequestPhoneOtpCommandInput | RequestPhoneUpdateOtpCommandInput | RevokeDeviceCommandInput | SwipeByUsernameCommandInput | SwipeCommandInput | UnhookCommandInput | UnlinkSocialCommandInput | UpdateChatSettingsCommandInput | UpdateEntitlementsCommandInput | UpdatePhoneNumberCommandInput | UpdatePreferencesCommandInput | UpdateProfileCommandInput | UpdateUsernameCommandInput | UpgradeUserCommandInput | ValidateInviteCommandInput;
|
|
68
69
|
/**
|
|
69
70
|
* @public
|
|
70
71
|
*/
|
|
71
|
-
export type ServiceOutputTypes = AuthSocialCommandOutput | CompleteLivenessSessionCommandOutput | CompleteOnboardingCommandOutput | CreateLivenessSessionCommandOutput | CreateMediaDownloadUrlCommandOutput | CreateMediaUploadUrlCommandOutput | DeleteMatchMessagesCommandOutput | DeleteProfileCommandOutput | DeletePushTokenCommandOutput | DiscoverCommandOutput | GenerateDownloadUrlCommandOutput | GenerateInviteCommandOutput | GenerateUploadUrlCommandOutput | GetChatSettingsCommandOutput | GetCredentialReadinessCommandOutput | GetLivenessStatusCommandOutput | GetMatchCommandOutput | GetMyProfileCommandOutput | GetNotificationPreferencesCommandOutput | GetParticipantRegistryCommandOutput | GetPreferencesCommandOutput | GetProfileCommandOutput | GetReceivedLikesCommandOutput | GetRosesCommandOutput | GetStateCommandOutput | GetUserByEmailCommandOutput | GetUserCommandOutput | GetUserIdByUsernameCommandOutput | IndexLocationCommandOutput | InitUserCommandOutput | LinkEmailCommandOutput | LinkSocialCommandOutput | ListMyDevicesCommandOutput | RegisterDeviceCommandOutput | RegisterPhoneCommandOutput | RegisterPushTokenCommandOutput | RemoveLocationCommandOutput | RequestEmailOtpCommandOutput | RequestPhoneOtpCommandOutput | RequestPhoneUpdateOtpCommandOutput | RevokeDeviceCommandOutput | SwipeByUsernameCommandOutput | SwipeCommandOutput | UnhookCommandOutput | UnlinkSocialCommandOutput | UpdateChatSettingsCommandOutput | UpdateEntitlementsCommandOutput | UpdatePhoneNumberCommandOutput | UpdatePreferencesCommandOutput | UpdateProfileCommandOutput | UpdateUsernameCommandOutput | UpgradeUserCommandOutput | ValidateInviteCommandOutput;
|
|
72
|
+
export type ServiceOutputTypes = AuthSocialCommandOutput | CompleteLivenessSessionCommandOutput | CompleteOnboardingCommandOutput | CreateLivenessSessionCommandOutput | CreateMediaDownloadUrlCommandOutput | CreateMediaUploadUrlCommandOutput | DeleteMatchMessagesCommandOutput | DeleteProfileCommandOutput | DeletePushTokenCommandOutput | DiscoverCommandOutput | GenerateDownloadUrlCommandOutput | GenerateInviteCommandOutput | GenerateUploadUrlCommandOutput | GetAiContextMatchCommandOutput | GetChatSettingsCommandOutput | GetCredentialReadinessCommandOutput | GetLivenessStatusCommandOutput | GetMatchCommandOutput | GetMyProfileCommandOutput | GetNotificationPreferencesCommandOutput | GetParticipantRegistryCommandOutput | GetPreferencesCommandOutput | GetProfileCommandOutput | GetReceivedLikesCommandOutput | GetRosesCommandOutput | GetStateCommandOutput | GetUserByEmailCommandOutput | GetUserCommandOutput | GetUserIdByUsernameCommandOutput | IndexLocationCommandOutput | InitUserCommandOutput | LinkEmailCommandOutput | LinkSocialCommandOutput | ListMyDevicesCommandOutput | RegisterDeviceCommandOutput | RegisterPhoneCommandOutput | RegisterPushTokenCommandOutput | RemoveLocationCommandOutput | RequestEmailOtpCommandOutput | RequestPhoneOtpCommandOutput | RequestPhoneUpdateOtpCommandOutput | RevokeDeviceCommandOutput | SwipeByUsernameCommandOutput | SwipeCommandOutput | UnhookCommandOutput | UnlinkSocialCommandOutput | UpdateChatSettingsCommandOutput | UpdateEntitlementsCommandOutput | UpdatePhoneNumberCommandOutput | UpdatePreferencesCommandOutput | UpdateProfileCommandOutput | UpdateUsernameCommandOutput | UpgradeUserCommandOutput | ValidateInviteCommandOutput;
|
|
72
73
|
/**
|
|
73
74
|
* @public
|
|
74
75
|
*/
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OneHookClient";
|
|
2
|
+
import { AiContextMatch, GetAiContextMatchRequest } 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 GetAiContextMatchCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetAiContextMatchCommandInput extends GetAiContextMatchRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetAiContextMatchCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetAiContextMatchCommandOutput extends AiContextMatch, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GetAiContextMatchCommand_base: {
|
|
25
|
+
new (input: GetAiContextMatchCommandInput): import("@smithy/smithy-client").CommandImpl<GetAiContextMatchCommandInput, GetAiContextMatchCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: GetAiContextMatchCommandInput): import("@smithy/smithy-client").CommandImpl<GetAiContextMatchCommandInput, GetAiContextMatchCommandOutput, OneHookClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @public
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
34
|
+
* ```javascript
|
|
35
|
+
* import { OneHookClient, GetAiContextMatchCommand } from "onehook-api-client"; // ES Modules import
|
|
36
|
+
* // const { OneHookClient, GetAiContextMatchCommand } = require("onehook-api-client"); // CommonJS import
|
|
37
|
+
* const client = new OneHookClient(config);
|
|
38
|
+
* const input = { // GetAiContextMatchRequest
|
|
39
|
+
* matchId: "STRING_VALUE", // required
|
|
40
|
+
* requestingUserId: "STRING_VALUE", // required
|
|
41
|
+
* };
|
|
42
|
+
* const command = new GetAiContextMatchCommand(input);
|
|
43
|
+
* const response = await client.send(command);
|
|
44
|
+
* // { // AiContextMatch
|
|
45
|
+
* // matchId: "STRING_VALUE", // required
|
|
46
|
+
* // status: "STRING_VALUE", // required
|
|
47
|
+
* // requestingUser: { // AiContextParticipant
|
|
48
|
+
* // id: "STRING_VALUE",
|
|
49
|
+
* // visibleProfile: { // AiVisibleProfile
|
|
50
|
+
* // displayName: "STRING_VALUE",
|
|
51
|
+
* // pronouns: "STRING_VALUE",
|
|
52
|
+
* // bio: "STRING_VALUE",
|
|
53
|
+
* // interests: [ // StringList
|
|
54
|
+
* // "STRING_VALUE",
|
|
55
|
+
* // ],
|
|
56
|
+
* // communicationPreferences: [
|
|
57
|
+
* // "STRING_VALUE",
|
|
58
|
+
* // ],
|
|
59
|
+
* // relationshipGoals: [
|
|
60
|
+
* // "STRING_VALUE",
|
|
61
|
+
* // ],
|
|
62
|
+
* // },
|
|
63
|
+
* // },
|
|
64
|
+
* // matchedUser: {
|
|
65
|
+
* // id: "STRING_VALUE",
|
|
66
|
+
* // visibleProfile: {
|
|
67
|
+
* // displayName: "STRING_VALUE",
|
|
68
|
+
* // pronouns: "STRING_VALUE",
|
|
69
|
+
* // bio: "STRING_VALUE",
|
|
70
|
+
* // interests: [
|
|
71
|
+
* // "STRING_VALUE",
|
|
72
|
+
* // ],
|
|
73
|
+
* // communicationPreferences: [
|
|
74
|
+
* // "STRING_VALUE",
|
|
75
|
+
* // ],
|
|
76
|
+
* // relationshipGoals: "<StringList>",
|
|
77
|
+
* // },
|
|
78
|
+
* // },
|
|
79
|
+
* // contextPolicy: { // AiContextPolicy
|
|
80
|
+
* // profileAllowed: true || false, // required
|
|
81
|
+
* // messageHistoryAllowed: true || false, // required
|
|
82
|
+
* // policyVersion: "STRING_VALUE", // required
|
|
83
|
+
* // },
|
|
84
|
+
* // };
|
|
85
|
+
*
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @param GetAiContextMatchCommandInput - {@link GetAiContextMatchCommandInput}
|
|
89
|
+
* @returns {@link GetAiContextMatchCommandOutput}
|
|
90
|
+
* @see {@link GetAiContextMatchCommandInput} for command's `input` shape.
|
|
91
|
+
* @see {@link GetAiContextMatchCommandOutput} for command's `response` shape.
|
|
92
|
+
* @see {@link OneHookClientResolvedConfig | config} for OneHookClient's `config` shape.
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link BadRequestError} (client fault)
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link NotFoundError} (client fault)
|
|
97
|
+
*
|
|
98
|
+
* @throws {@link InternalServerError} (server fault)
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link OneHookServiceException}
|
|
101
|
+
* <p>Base exception class for all service exceptions from OneHook service.</p>
|
|
102
|
+
*
|
|
103
|
+
*
|
|
104
|
+
*/
|
|
105
|
+
export declare class GetAiContextMatchCommand extends GetAiContextMatchCommand_base {
|
|
106
|
+
/** @internal type navigation helper, not in runtime. */
|
|
107
|
+
protected static __types: {
|
|
108
|
+
api: {
|
|
109
|
+
input: GetAiContextMatchRequest;
|
|
110
|
+
output: AiContextMatch;
|
|
111
|
+
};
|
|
112
|
+
sdk: {
|
|
113
|
+
input: GetAiContextMatchCommandInput;
|
|
114
|
+
output: GetAiContextMatchCommandOutput;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
}
|
|
@@ -145,6 +145,8 @@ export type Notification = {
|
|
|
145
145
|
userId: Scalars['ID']['output'];
|
|
146
146
|
};
|
|
147
147
|
export declare enum NotificationKind {
|
|
148
|
+
/** An established conversation went quiet and the user owes a reply (re-engagement nudge). */
|
|
149
|
+
ConversationCooling = "CONVERSATION_COOLING",
|
|
148
150
|
/** Both people liked each other and State created the hook. */
|
|
149
151
|
MutualMatch = "MUTUAL_MATCH",
|
|
150
152
|
/** Someone liked this user. Does NOT reveal whether the like was reciprocated. */
|
|
@@ -1,38 +1,85 @@
|
|
|
1
1
|
import { OneHookServiceException as __BaseException } from "./OneHookServiceException";
|
|
2
2
|
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
|
3
3
|
/**
|
|
4
|
+
* The server's decision about what the model may use for this match. Fails closed:
|
|
5
|
+
* `profileAllowed` / `messageHistoryAllowed` are false unless an active, mutually
|
|
6
|
+
* participating match is confirmed. `policyVersion` lets the caller log and reason about
|
|
7
|
+
* which policy produced the decision.
|
|
4
8
|
* @public
|
|
5
9
|
*/
|
|
6
|
-
export interface
|
|
7
|
-
|
|
10
|
+
export interface AiContextPolicy {
|
|
11
|
+
profileAllowed: boolean | undefined;
|
|
12
|
+
messageHistoryAllowed: boolean | undefined;
|
|
13
|
+
policyVersion: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Allow-listed, AI-visible profile fields. Every field is optional: the server emits only
|
|
17
|
+
* what is present and non-empty, and the contextual-AI backend independently re-sanitises
|
|
18
|
+
* and bounds these on receipt.
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export interface AiVisibleProfile {
|
|
22
|
+
displayName?: string | undefined;
|
|
23
|
+
pronouns?: string | undefined;
|
|
24
|
+
bio?: string | undefined;
|
|
25
|
+
interests?: (string)[] | undefined;
|
|
26
|
+
communicationPreferences?: (string)[] | undefined;
|
|
27
|
+
relationshipGoals?: (string)[] | undefined;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export interface AiContextParticipant {
|
|
8
33
|
/**
|
|
9
|
-
*
|
|
34
|
+
* Present only for the requesting participant, as a defence-in-depth echo of the
|
|
35
|
+
* asserted member id. Omitted for the matched participant to avoid disclosing their
|
|
36
|
+
* opaque identifier to the model layer.
|
|
10
37
|
* @public
|
|
11
38
|
*/
|
|
12
|
-
|
|
39
|
+
id?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Allow-listed, AI-visible profile fields. Every field is optional: the server emits only
|
|
42
|
+
* what is present and non-empty, and the contextual-AI backend independently re-sanitises
|
|
43
|
+
* and bounds these on receipt.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
visibleProfile: AiVisibleProfile | undefined;
|
|
13
47
|
}
|
|
14
48
|
/**
|
|
49
|
+
* The consent-gated, AI-visible projection of an active match. Mirrors the shape the
|
|
50
|
+
* contextual-AI backend sanitises on receipt: `status` is always "active" (the endpoint
|
|
51
|
+
* 404s otherwise), `requestingUser.id` echoes the asserted member for a defence-in-depth
|
|
52
|
+
* cross-check, and `contextPolicy` carries the server's decision about what the model is
|
|
53
|
+
* allowed to use.
|
|
15
54
|
* @public
|
|
16
55
|
*/
|
|
17
|
-
export interface
|
|
56
|
+
export interface AiContextMatch {
|
|
57
|
+
matchId: string | undefined;
|
|
58
|
+
status: string | undefined;
|
|
59
|
+
requestingUser: AiContextParticipant | undefined;
|
|
60
|
+
matchedUser: AiContextParticipant | undefined;
|
|
18
61
|
/**
|
|
19
|
-
*
|
|
62
|
+
* The server's decision about what the model may use for this match. Fails closed:
|
|
63
|
+
* `profileAllowed` / `messageHistoryAllowed` are false unless an active, mutually
|
|
64
|
+
* participating match is confirmed. `policyVersion` lets the caller log and reason about
|
|
65
|
+
* which policy produced the decision.
|
|
20
66
|
* @public
|
|
21
67
|
*/
|
|
22
|
-
|
|
23
|
-
expiresInSeconds: number | undefined;
|
|
68
|
+
contextPolicy: AiContextPolicy | undefined;
|
|
24
69
|
}
|
|
25
70
|
/**
|
|
26
71
|
* @public
|
|
27
72
|
*/
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
readonly $fault: "client";
|
|
31
|
-
error: string | undefined;
|
|
73
|
+
export interface GetAiContextMatchRequest {
|
|
74
|
+
matchId: string | undefined;
|
|
32
75
|
/**
|
|
33
|
-
*
|
|
76
|
+
* The acting member, asserted by the trusted caller via the `X-OneHook-User-Id`
|
|
77
|
+
* request header. The endpoint fails closed (404) unless this user is an active
|
|
78
|
+
* participant of the match, so a spoofed value can only ever reference a match the
|
|
79
|
+
* named user is genuinely part of.
|
|
80
|
+
* @public
|
|
34
81
|
*/
|
|
35
|
-
|
|
82
|
+
requestingUserId: string | undefined;
|
|
36
83
|
}
|
|
37
84
|
/**
|
|
38
85
|
* @public
|
|
@@ -70,6 +117,40 @@ export declare class NotFoundError extends __BaseException {
|
|
|
70
117
|
*/
|
|
71
118
|
constructor(opts: __ExceptionOptionType<NotFoundError, __BaseException>);
|
|
72
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
export interface CreateMediaDownloadUrlRequest {
|
|
124
|
+
matchId: string | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Must be under `<matchId>/`; anything else is rejected as forbidden.
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
objectKey: string | undefined;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* @public
|
|
133
|
+
*/
|
|
134
|
+
export interface CreateMediaDownloadUrlResponse {
|
|
135
|
+
/**
|
|
136
|
+
* Presigned GET returning ciphertext.
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
downloadUrl: string | undefined;
|
|
140
|
+
expiresInSeconds: number | undefined;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* @public
|
|
144
|
+
*/
|
|
145
|
+
export declare class ForbiddenError extends __BaseException {
|
|
146
|
+
readonly name: "ForbiddenError";
|
|
147
|
+
readonly $fault: "client";
|
|
148
|
+
error: string | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
constructor(opts: __ExceptionOptionType<ForbiddenError, __BaseException>);
|
|
153
|
+
}
|
|
73
154
|
/**
|
|
74
155
|
* @public
|
|
75
156
|
* @enum
|
|
@@ -11,6 +11,7 @@ import { DiscoverCommandInput, DiscoverCommandOutput } from "../commands/Discove
|
|
|
11
11
|
import { GenerateDownloadUrlCommandInput, GenerateDownloadUrlCommandOutput } from "../commands/GenerateDownloadUrlCommand";
|
|
12
12
|
import { GenerateInviteCommandInput, GenerateInviteCommandOutput } from "../commands/GenerateInviteCommand";
|
|
13
13
|
import { GenerateUploadUrlCommandInput, GenerateUploadUrlCommandOutput } from "../commands/GenerateUploadUrlCommand";
|
|
14
|
+
import { GetAiContextMatchCommandInput, GetAiContextMatchCommandOutput } from "../commands/GetAiContextMatchCommand";
|
|
14
15
|
import { GetChatSettingsCommandInput, GetChatSettingsCommandOutput } from "../commands/GetChatSettingsCommand";
|
|
15
16
|
import { GetCredentialReadinessCommandInput, GetCredentialReadinessCommandOutput } from "../commands/GetCredentialReadinessCommand";
|
|
16
17
|
import { GetLivenessStatusCommandInput, GetLivenessStatusCommandOutput } from "../commands/GetLivenessStatusCommand";
|
|
@@ -53,6 +54,10 @@ import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "../commands/U
|
|
|
53
54
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "../commands/ValidateInviteCommand";
|
|
54
55
|
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
55
56
|
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
57
|
+
/**
|
|
58
|
+
* serializeAws_restJson1GetAiContextMatchCommand
|
|
59
|
+
*/
|
|
60
|
+
export declare const se_GetAiContextMatchCommand: (input: GetAiContextMatchCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
56
61
|
/**
|
|
57
62
|
* serializeAws_restJson1CreateMediaDownloadUrlCommand
|
|
58
63
|
*/
|
|
@@ -265,6 +270,10 @@ export declare const se_UnhookCommand: (input: UnhookCommandInput, context: __Se
|
|
|
265
270
|
* serializeAws_restJson1UpgradeUserCommand
|
|
266
271
|
*/
|
|
267
272
|
export declare const se_UpgradeUserCommand: (input: UpgradeUserCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
273
|
+
/**
|
|
274
|
+
* deserializeAws_restJson1GetAiContextMatchCommand
|
|
275
|
+
*/
|
|
276
|
+
export declare const de_GetAiContextMatchCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetAiContextMatchCommandOutput>;
|
|
268
277
|
/**
|
|
269
278
|
* deserializeAws_restJson1CreateMediaDownloadUrlCommand
|
|
270
279
|
*/
|
package/package.json
CHANGED