onehook-api-client 1.0.0
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/LICENSE +201 -0
- package/dist-cjs/OneHookService.js +83 -0
- package/dist-cjs/OneHookServiceClient.js +43 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +35 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +35 -0
- package/dist-cjs/commands/AuthSocialCommand.js +21 -0
- package/dist-cjs/commands/ClaimPreKeyBundleCommand.js +21 -0
- package/dist-cjs/commands/CompleteLivenessSessionCommand.js +21 -0
- package/dist-cjs/commands/CompleteOnboardingCommand.js +21 -0
- package/dist-cjs/commands/CreateLivenessSessionCommand.js +21 -0
- package/dist-cjs/commands/DeleteMatchMessagesCommand.js +21 -0
- package/dist-cjs/commands/DeleteProfileCommand.js +21 -0
- package/dist-cjs/commands/DiscoverCommand.js +21 -0
- package/dist-cjs/commands/GenerateInviteCommand.js +21 -0
- package/dist-cjs/commands/GenerateUploadUrlCommand.js +21 -0
- package/dist-cjs/commands/GetMatchCommand.js +21 -0
- package/dist-cjs/commands/GetMyProfileCommand.js +21 -0
- package/dist-cjs/commands/GetPreferencesCommand.js +21 -0
- package/dist-cjs/commands/GetProfileCommand.js +21 -0
- package/dist-cjs/commands/GetStateCommand.js +21 -0
- package/dist-cjs/commands/GetUserByEmailCommand.js +21 -0
- package/dist-cjs/commands/GetUserCommand.js +21 -0
- package/dist-cjs/commands/IndexLocationCommand.js +21 -0
- package/dist-cjs/commands/InitUserCommand.js +21 -0
- package/dist-cjs/commands/LinkEmailCommand.js +21 -0
- package/dist-cjs/commands/LinkSocialCommand.js +21 -0
- package/dist-cjs/commands/RegisterPhoneCommand.js +21 -0
- package/dist-cjs/commands/RemoveLocationCommand.js +21 -0
- package/dist-cjs/commands/RequestEmailOtpCommand.js +21 -0
- package/dist-cjs/commands/RequestPhoneOtpCommand.js +21 -0
- package/dist-cjs/commands/RequestPhoneUpdateOtpCommand.js +21 -0
- package/dist-cjs/commands/SwipeCommand.js +21 -0
- package/dist-cjs/commands/UnhookCommand.js +21 -0
- package/dist-cjs/commands/UnlinkSocialCommand.js +21 -0
- package/dist-cjs/commands/UpdateEntitlementsCommand.js +21 -0
- package/dist-cjs/commands/UpdatePhoneNumberCommand.js +21 -0
- package/dist-cjs/commands/UpdatePreferencesCommand.js +21 -0
- package/dist-cjs/commands/UpdateProfileCommand.js +21 -0
- package/dist-cjs/commands/UpgradeUserCommand.js +21 -0
- package/dist-cjs/commands/UploadPreKeysCommand.js +21 -0
- package/dist-cjs/commands/ValidateInviteCommand.js +21 -0
- package/dist-cjs/commands/index.js +39 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/graphql/types.js +11 -0
- package/dist-cjs/index.js +10 -0
- package/dist-cjs/models/OneHookServiceServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +60 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1349 -0
- package/dist-cjs/runtimeConfig.browser.js +32 -0
- package/dist-cjs/runtimeConfig.js +37 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +29 -0
- package/dist-cjs/runtimeExtensions.js +22 -0
- package/dist-es/OneHookService.js +79 -0
- package/dist-es/OneHookServiceClient.js +39 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +30 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +29 -0
- package/dist-es/commands/AuthSocialCommand.js +17 -0
- package/dist-es/commands/ClaimPreKeyBundleCommand.js +17 -0
- package/dist-es/commands/CompleteLivenessSessionCommand.js +17 -0
- package/dist-es/commands/CompleteOnboardingCommand.js +17 -0
- package/dist-es/commands/CreateLivenessSessionCommand.js +17 -0
- package/dist-es/commands/DeleteMatchMessagesCommand.js +17 -0
- package/dist-es/commands/DeleteProfileCommand.js +17 -0
- package/dist-es/commands/DiscoverCommand.js +17 -0
- package/dist-es/commands/GenerateInviteCommand.js +17 -0
- package/dist-es/commands/GenerateUploadUrlCommand.js +17 -0
- package/dist-es/commands/GetMatchCommand.js +17 -0
- package/dist-es/commands/GetMyProfileCommand.js +17 -0
- package/dist-es/commands/GetPreferencesCommand.js +17 -0
- package/dist-es/commands/GetProfileCommand.js +17 -0
- package/dist-es/commands/GetStateCommand.js +17 -0
- package/dist-es/commands/GetUserByEmailCommand.js +17 -0
- package/dist-es/commands/GetUserCommand.js +17 -0
- package/dist-es/commands/IndexLocationCommand.js +17 -0
- package/dist-es/commands/InitUserCommand.js +17 -0
- package/dist-es/commands/LinkEmailCommand.js +17 -0
- package/dist-es/commands/LinkSocialCommand.js +17 -0
- package/dist-es/commands/RegisterPhoneCommand.js +17 -0
- package/dist-es/commands/RemoveLocationCommand.js +17 -0
- package/dist-es/commands/RequestEmailOtpCommand.js +17 -0
- package/dist-es/commands/RequestPhoneOtpCommand.js +17 -0
- package/dist-es/commands/RequestPhoneUpdateOtpCommand.js +17 -0
- package/dist-es/commands/SwipeCommand.js +17 -0
- package/dist-es/commands/UnhookCommand.js +17 -0
- package/dist-es/commands/UnlinkSocialCommand.js +17 -0
- package/dist-es/commands/UpdateEntitlementsCommand.js +17 -0
- package/dist-es/commands/UpdatePhoneNumberCommand.js +17 -0
- package/dist-es/commands/UpdatePreferencesCommand.js +17 -0
- package/dist-es/commands/UpdateProfileCommand.js +17 -0
- package/dist-es/commands/UpgradeUserCommand.js +17 -0
- package/dist-es/commands/UploadPreKeysCommand.js +17 -0
- package/dist-es/commands/ValidateInviteCommand.js +17 -0
- package/dist-es/commands/index.js +36 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/graphql/types.js +8 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/OneHookServiceServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +53 -0
- package/dist-es/protocols/Aws_restJson1.js +1273 -0
- package/dist-es/runtimeConfig.browser.js +27 -0
- package/dist-es/runtimeConfig.js +32 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +25 -0
- package/dist-es/runtimeExtensions.js +18 -0
- package/dist-types/OneHookService.d.ts +267 -0
- package/dist-types/OneHookServiceClient.d.ts +179 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +26 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +59 -0
- package/dist-types/commands/AuthSocialCommand.d.ts +78 -0
- package/dist-types/commands/ClaimPreKeyBundleCommand.d.ts +87 -0
- package/dist-types/commands/CompleteLivenessSessionCommand.d.ts +80 -0
- package/dist-types/commands/CompleteOnboardingCommand.d.ts +75 -0
- package/dist-types/commands/CreateLivenessSessionCommand.d.ts +75 -0
- package/dist-types/commands/DeleteMatchMessagesCommand.d.ts +77 -0
- package/dist-types/commands/DeleteProfileCommand.d.ts +77 -0
- package/dist-types/commands/DiscoverCommand.d.ts +84 -0
- package/dist-types/commands/GenerateInviteCommand.d.ts +78 -0
- package/dist-types/commands/GenerateUploadUrlCommand.d.ts +80 -0
- package/dist-types/commands/GetMatchCommand.d.ts +87 -0
- package/dist-types/commands/GetMyProfileCommand.d.ts +136 -0
- package/dist-types/commands/GetPreferencesCommand.d.ts +83 -0
- package/dist-types/commands/GetProfileCommand.d.ts +136 -0
- package/dist-types/commands/GetStateCommand.d.ts +83 -0
- package/dist-types/commands/GetUserByEmailCommand.d.ts +83 -0
- package/dist-types/commands/GetUserCommand.d.ts +83 -0
- package/dist-types/commands/IndexLocationCommand.d.ts +76 -0
- package/dist-types/commands/InitUserCommand.d.ts +73 -0
- package/dist-types/commands/LinkEmailCommand.d.ts +76 -0
- package/dist-types/commands/LinkSocialCommand.d.ts +76 -0
- package/dist-types/commands/RegisterPhoneCommand.d.ts +79 -0
- package/dist-types/commands/RemoveLocationCommand.d.ts +76 -0
- package/dist-types/commands/RequestEmailOtpCommand.d.ts +76 -0
- package/dist-types/commands/RequestPhoneOtpCommand.d.ts +75 -0
- package/dist-types/commands/RequestPhoneUpdateOtpCommand.d.ts +75 -0
- package/dist-types/commands/SwipeCommand.d.ts +79 -0
- package/dist-types/commands/UnhookCommand.d.ts +78 -0
- package/dist-types/commands/UnlinkSocialCommand.d.ts +75 -0
- package/dist-types/commands/UpdateEntitlementsCommand.d.ts +87 -0
- package/dist-types/commands/UpdatePhoneNumberCommand.d.ts +77 -0
- package/dist-types/commands/UpdatePreferencesCommand.d.ts +81 -0
- package/dist-types/commands/UpdateProfileCommand.d.ts +130 -0
- package/dist-types/commands/UpgradeUserCommand.d.ts +81 -0
- package/dist-types/commands/UploadPreKeysCommand.d.ts +81 -0
- package/dist-types/commands/ValidateInviteCommand.d.ts +78 -0
- package/dist-types/commands/index.d.ts +36 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/graphql/types.d.ts +110 -0
- package/dist-types/index.d.ts +7 -0
- package/dist-types/models/OneHookServiceServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +614 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +326 -0
- package/dist-types/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/runtimeConfig.d.ts +38 -0
- package/dist-types/runtimeConfig.native.d.ts +37 -0
- package/dist-types/runtimeConfig.shared.d.ts +23 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/package.json +95 -0
|
@@ -0,0 +1,1349 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.de_UnlinkSocialCommand = exports.de_RequestPhoneUpdateOtpCommand = exports.de_RequestPhoneOtpCommand = exports.de_RequestEmailOtpCommand = exports.de_RegisterPhoneCommand = exports.de_LinkSocialCommand = exports.de_LinkEmailCommand = exports.de_GetUserByEmailCommand = exports.de_GetUserCommand = exports.de_GenerateInviteCommand = exports.de_AuthSocialCommand = exports.de_UploadPreKeysCommand = exports.de_DeleteMatchMessagesCommand = exports.de_ClaimPreKeyBundleCommand = exports.se_UpgradeUserCommand = exports.se_UnhookCommand = exports.se_InitUserCommand = exports.se_GetStateCommand = exports.se_GetMatchCommand = exports.se_CompleteOnboardingCommand = exports.se_UpdateProfileCommand = exports.se_GetProfileCommand = exports.se_GetMyProfileCommand = exports.se_GenerateUploadUrlCommand = exports.se_DeleteProfileCommand = exports.se_CreateLivenessSessionCommand = exports.se_CompleteLivenessSessionCommand = exports.se_UpdatePreferencesCommand = exports.se_SwipeCommand = exports.se_RemoveLocationCommand = exports.se_IndexLocationCommand = exports.se_GetPreferencesCommand = exports.se_DiscoverCommand = exports.se_ValidateInviteCommand = 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_GetUserByEmailCommand = exports.se_GetUserCommand = exports.se_GenerateInviteCommand = exports.se_AuthSocialCommand = exports.se_UploadPreKeysCommand = exports.se_DeleteMatchMessagesCommand = exports.se_ClaimPreKeyBundleCommand = void 0;
|
|
4
|
+
exports.de_UpgradeUserCommand = exports.de_UnhookCommand = exports.de_InitUserCommand = exports.de_GetStateCommand = exports.de_GetMatchCommand = exports.de_CompleteOnboardingCommand = exports.de_UpdateProfileCommand = exports.de_GetProfileCommand = exports.de_GetMyProfileCommand = exports.de_GenerateUploadUrlCommand = exports.de_DeleteProfileCommand = exports.de_CreateLivenessSessionCommand = exports.de_CompleteLivenessSessionCommand = exports.de_UpdatePreferencesCommand = exports.de_SwipeCommand = exports.de_RemoveLocationCommand = exports.de_IndexLocationCommand = exports.de_GetPreferencesCommand = exports.de_DiscoverCommand = exports.de_ValidateInviteCommand = exports.de_UpdatePhoneNumberCommand = exports.de_UpdateEntitlementsCommand = void 0;
|
|
5
|
+
const OneHookServiceServiceException_1 = require("../models/OneHookServiceServiceException");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const core_1 = require("@aws-sdk/core");
|
|
8
|
+
const core_2 = require("@smithy/core");
|
|
9
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
10
|
+
const se_ClaimPreKeyBundleCommand = async (input, context) => {
|
|
11
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
12
|
+
const headers = {};
|
|
13
|
+
b.bp("/chat/prekeys/{userId}");
|
|
14
|
+
b.p('userId', () => input.userId, '{userId}', false);
|
|
15
|
+
const query = (0, smithy_client_1.map)({
|
|
16
|
+
[_mI]: [, (0, smithy_client_1.expectNonNull)(input[_mI], `matchId`)],
|
|
17
|
+
});
|
|
18
|
+
let body;
|
|
19
|
+
b.m("POST")
|
|
20
|
+
.h(headers)
|
|
21
|
+
.q(query)
|
|
22
|
+
.b(body);
|
|
23
|
+
return b.build();
|
|
24
|
+
};
|
|
25
|
+
exports.se_ClaimPreKeyBundleCommand = se_ClaimPreKeyBundleCommand;
|
|
26
|
+
const se_DeleteMatchMessagesCommand = async (input, context) => {
|
|
27
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
28
|
+
const headers = {};
|
|
29
|
+
b.bp("/chat/match/{matchId}");
|
|
30
|
+
b.p('matchId', () => input.matchId, '{matchId}', false);
|
|
31
|
+
let body;
|
|
32
|
+
b.m("DELETE")
|
|
33
|
+
.h(headers)
|
|
34
|
+
.b(body);
|
|
35
|
+
return b.build();
|
|
36
|
+
};
|
|
37
|
+
exports.se_DeleteMatchMessagesCommand = se_DeleteMatchMessagesCommand;
|
|
38
|
+
const se_UploadPreKeysCommand = async (input, context) => {
|
|
39
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
40
|
+
const headers = {
|
|
41
|
+
'content-type': 'application/json',
|
|
42
|
+
};
|
|
43
|
+
b.bp("/chat/prekeys");
|
|
44
|
+
let body;
|
|
45
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
46
|
+
'identityKey': [],
|
|
47
|
+
'oneTimePreKeys': _ => (0, smithy_client_1._json)(_),
|
|
48
|
+
'signedPreKey': [],
|
|
49
|
+
}));
|
|
50
|
+
b.m("POST")
|
|
51
|
+
.h(headers)
|
|
52
|
+
.b(body);
|
|
53
|
+
return b.build();
|
|
54
|
+
};
|
|
55
|
+
exports.se_UploadPreKeysCommand = se_UploadPreKeysCommand;
|
|
56
|
+
const se_AuthSocialCommand = async (input, context) => {
|
|
57
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
58
|
+
const headers = {
|
|
59
|
+
'content-type': 'application/json',
|
|
60
|
+
};
|
|
61
|
+
b.bp("/identity/auth/social");
|
|
62
|
+
let body;
|
|
63
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
64
|
+
'provider': [],
|
|
65
|
+
'token': [],
|
|
66
|
+
}));
|
|
67
|
+
b.m("POST")
|
|
68
|
+
.h(headers)
|
|
69
|
+
.b(body);
|
|
70
|
+
return b.build();
|
|
71
|
+
};
|
|
72
|
+
exports.se_AuthSocialCommand = se_AuthSocialCommand;
|
|
73
|
+
const se_GenerateInviteCommand = async (input, context) => {
|
|
74
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
75
|
+
const headers = {
|
|
76
|
+
'content-type': 'application/json',
|
|
77
|
+
};
|
|
78
|
+
b.bp("/identity/invite/generate");
|
|
79
|
+
let body;
|
|
80
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
81
|
+
'maxUses': [],
|
|
82
|
+
'referrerId': [],
|
|
83
|
+
}));
|
|
84
|
+
b.m("POST")
|
|
85
|
+
.h(headers)
|
|
86
|
+
.b(body);
|
|
87
|
+
return b.build();
|
|
88
|
+
};
|
|
89
|
+
exports.se_GenerateInviteCommand = se_GenerateInviteCommand;
|
|
90
|
+
const se_GetUserCommand = async (input, context) => {
|
|
91
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
92
|
+
const headers = {};
|
|
93
|
+
b.bp("/identity/user/{userId}");
|
|
94
|
+
b.p('userId', () => input.userId, '{userId}', false);
|
|
95
|
+
let body;
|
|
96
|
+
b.m("GET")
|
|
97
|
+
.h(headers)
|
|
98
|
+
.b(body);
|
|
99
|
+
return b.build();
|
|
100
|
+
};
|
|
101
|
+
exports.se_GetUserCommand = se_GetUserCommand;
|
|
102
|
+
const se_GetUserByEmailCommand = async (input, context) => {
|
|
103
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
104
|
+
const headers = {};
|
|
105
|
+
b.bp("/identity/user/email/{email}");
|
|
106
|
+
b.p('email', () => input.email, '{email}', false);
|
|
107
|
+
let body;
|
|
108
|
+
b.m("GET")
|
|
109
|
+
.h(headers)
|
|
110
|
+
.b(body);
|
|
111
|
+
return b.build();
|
|
112
|
+
};
|
|
113
|
+
exports.se_GetUserByEmailCommand = se_GetUserByEmailCommand;
|
|
114
|
+
const se_LinkEmailCommand = async (input, context) => {
|
|
115
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
116
|
+
const headers = {
|
|
117
|
+
'content-type': 'application/json',
|
|
118
|
+
};
|
|
119
|
+
b.bp("/identity/user/email/link");
|
|
120
|
+
let body;
|
|
121
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
122
|
+
'email': [],
|
|
123
|
+
'otp': [],
|
|
124
|
+
}));
|
|
125
|
+
b.m("POST")
|
|
126
|
+
.h(headers)
|
|
127
|
+
.b(body);
|
|
128
|
+
return b.build();
|
|
129
|
+
};
|
|
130
|
+
exports.se_LinkEmailCommand = se_LinkEmailCommand;
|
|
131
|
+
const se_LinkSocialCommand = async (input, context) => {
|
|
132
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
133
|
+
const headers = {
|
|
134
|
+
'content-type': 'application/json',
|
|
135
|
+
};
|
|
136
|
+
b.bp("/identity/user/social/link");
|
|
137
|
+
let body;
|
|
138
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
139
|
+
'identityToken': [],
|
|
140
|
+
'provider': [],
|
|
141
|
+
}));
|
|
142
|
+
b.m("POST")
|
|
143
|
+
.h(headers)
|
|
144
|
+
.b(body);
|
|
145
|
+
return b.build();
|
|
146
|
+
};
|
|
147
|
+
exports.se_LinkSocialCommand = se_LinkSocialCommand;
|
|
148
|
+
const se_RegisterPhoneCommand = async (input, context) => {
|
|
149
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
150
|
+
const headers = {
|
|
151
|
+
'content-type': 'application/json',
|
|
152
|
+
};
|
|
153
|
+
b.bp("/identity/auth/register/phone");
|
|
154
|
+
let body;
|
|
155
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
156
|
+
'displayName': [],
|
|
157
|
+
'inviteCode': [],
|
|
158
|
+
'otp': [],
|
|
159
|
+
'phoneNumber': [],
|
|
160
|
+
}));
|
|
161
|
+
b.m("POST")
|
|
162
|
+
.h(headers)
|
|
163
|
+
.b(body);
|
|
164
|
+
return b.build();
|
|
165
|
+
};
|
|
166
|
+
exports.se_RegisterPhoneCommand = se_RegisterPhoneCommand;
|
|
167
|
+
const se_RequestEmailOtpCommand = async (input, context) => {
|
|
168
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
169
|
+
const headers = {
|
|
170
|
+
'content-type': 'application/json',
|
|
171
|
+
};
|
|
172
|
+
b.bp("/identity/user/email/link/request-otp");
|
|
173
|
+
let body;
|
|
174
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
175
|
+
'email': [],
|
|
176
|
+
'password': [],
|
|
177
|
+
}));
|
|
178
|
+
b.m("POST")
|
|
179
|
+
.h(headers)
|
|
180
|
+
.b(body);
|
|
181
|
+
return b.build();
|
|
182
|
+
};
|
|
183
|
+
exports.se_RequestEmailOtpCommand = se_RequestEmailOtpCommand;
|
|
184
|
+
const se_RequestPhoneOtpCommand = async (input, context) => {
|
|
185
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
186
|
+
const headers = {
|
|
187
|
+
'content-type': 'application/json',
|
|
188
|
+
};
|
|
189
|
+
b.bp("/identity/auth/register/phone/request-otp");
|
|
190
|
+
let body;
|
|
191
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
192
|
+
'phoneNumber': [],
|
|
193
|
+
}));
|
|
194
|
+
b.m("POST")
|
|
195
|
+
.h(headers)
|
|
196
|
+
.b(body);
|
|
197
|
+
return b.build();
|
|
198
|
+
};
|
|
199
|
+
exports.se_RequestPhoneOtpCommand = se_RequestPhoneOtpCommand;
|
|
200
|
+
const se_RequestPhoneUpdateOtpCommand = async (input, context) => {
|
|
201
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
202
|
+
const headers = {
|
|
203
|
+
'content-type': 'application/json',
|
|
204
|
+
};
|
|
205
|
+
b.bp("/identity/user/phone/request-otp");
|
|
206
|
+
let body;
|
|
207
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
208
|
+
'phoneNumber': [],
|
|
209
|
+
}));
|
|
210
|
+
b.m("POST")
|
|
211
|
+
.h(headers)
|
|
212
|
+
.b(body);
|
|
213
|
+
return b.build();
|
|
214
|
+
};
|
|
215
|
+
exports.se_RequestPhoneUpdateOtpCommand = se_RequestPhoneUpdateOtpCommand;
|
|
216
|
+
const se_UnlinkSocialCommand = async (input, context) => {
|
|
217
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
218
|
+
const headers = {};
|
|
219
|
+
b.bp("/identity/user/social/{provider}");
|
|
220
|
+
b.p('provider', () => input.provider, '{provider}', false);
|
|
221
|
+
let body;
|
|
222
|
+
b.m("DELETE")
|
|
223
|
+
.h(headers)
|
|
224
|
+
.b(body);
|
|
225
|
+
return b.build();
|
|
226
|
+
};
|
|
227
|
+
exports.se_UnlinkSocialCommand = se_UnlinkSocialCommand;
|
|
228
|
+
const se_UpdateEntitlementsCommand = async (input, context) => {
|
|
229
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
230
|
+
const headers = {
|
|
231
|
+
'content-type': 'application/json',
|
|
232
|
+
};
|
|
233
|
+
b.bp("/identity/users/{userId}/entitlements");
|
|
234
|
+
b.p('userId', () => input.userId, '{userId}', false);
|
|
235
|
+
let body;
|
|
236
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
237
|
+
'effectiveAt': [],
|
|
238
|
+
'purchaseRef': [],
|
|
239
|
+
'source': [],
|
|
240
|
+
'subscriptionTier': [],
|
|
241
|
+
}));
|
|
242
|
+
b.m("POST")
|
|
243
|
+
.h(headers)
|
|
244
|
+
.b(body);
|
|
245
|
+
return b.build();
|
|
246
|
+
};
|
|
247
|
+
exports.se_UpdateEntitlementsCommand = se_UpdateEntitlementsCommand;
|
|
248
|
+
const se_UpdatePhoneNumberCommand = async (input, context) => {
|
|
249
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
250
|
+
const headers = {
|
|
251
|
+
'content-type': 'application/json',
|
|
252
|
+
};
|
|
253
|
+
b.bp("/identity/user/phone");
|
|
254
|
+
let body;
|
|
255
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
256
|
+
'otp': [],
|
|
257
|
+
'phoneNumber': [],
|
|
258
|
+
}));
|
|
259
|
+
b.m("PUT")
|
|
260
|
+
.h(headers)
|
|
261
|
+
.b(body);
|
|
262
|
+
return b.build();
|
|
263
|
+
};
|
|
264
|
+
exports.se_UpdatePhoneNumberCommand = se_UpdatePhoneNumberCommand;
|
|
265
|
+
const se_ValidateInviteCommand = async (input, context) => {
|
|
266
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
267
|
+
const headers = {};
|
|
268
|
+
b.bp("/identity/invite/validate/{inviteCode}");
|
|
269
|
+
b.p('inviteCode', () => input.inviteCode, '{inviteCode}', false);
|
|
270
|
+
let body;
|
|
271
|
+
b.m("GET")
|
|
272
|
+
.h(headers)
|
|
273
|
+
.b(body);
|
|
274
|
+
return b.build();
|
|
275
|
+
};
|
|
276
|
+
exports.se_ValidateInviteCommand = se_ValidateInviteCommand;
|
|
277
|
+
const se_DiscoverCommand = async (input, context) => {
|
|
278
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
279
|
+
const headers = {};
|
|
280
|
+
b.bp("/matching/discover");
|
|
281
|
+
const query = (0, smithy_client_1.map)({
|
|
282
|
+
[_l]: [(0, smithy_client_1.expectNonNull)(input.lat, `lat`) != null, () => ((input[_l] % 1 == 0) ? input[_l] + ".0" : input[_l].toString())],
|
|
283
|
+
[_lo]: [(0, smithy_client_1.expectNonNull)(input.lon, `lon`) != null, () => ((input[_lo] % 1 == 0) ? input[_lo] + ".0" : input[_lo].toString())],
|
|
284
|
+
});
|
|
285
|
+
let body;
|
|
286
|
+
b.m("GET")
|
|
287
|
+
.h(headers)
|
|
288
|
+
.q(query)
|
|
289
|
+
.b(body);
|
|
290
|
+
return b.build();
|
|
291
|
+
};
|
|
292
|
+
exports.se_DiscoverCommand = se_DiscoverCommand;
|
|
293
|
+
const se_GetPreferencesCommand = async (input, context) => {
|
|
294
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
295
|
+
const headers = {};
|
|
296
|
+
b.bp("/matching/{userId}/preferences");
|
|
297
|
+
b.p('userId', () => input.userId, '{userId}', false);
|
|
298
|
+
let body;
|
|
299
|
+
b.m("GET")
|
|
300
|
+
.h(headers)
|
|
301
|
+
.b(body);
|
|
302
|
+
return b.build();
|
|
303
|
+
};
|
|
304
|
+
exports.se_GetPreferencesCommand = se_GetPreferencesCommand;
|
|
305
|
+
const se_IndexLocationCommand = async (input, context) => {
|
|
306
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
307
|
+
const headers = {
|
|
308
|
+
'content-type': 'application/json',
|
|
309
|
+
};
|
|
310
|
+
b.bp("/matching/location");
|
|
311
|
+
let body;
|
|
312
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
313
|
+
'lat': _ => (0, smithy_client_1.serializeFloat)(_),
|
|
314
|
+
'lon': _ => (0, smithy_client_1.serializeFloat)(_),
|
|
315
|
+
}));
|
|
316
|
+
b.m("POST")
|
|
317
|
+
.h(headers)
|
|
318
|
+
.b(body);
|
|
319
|
+
return b.build();
|
|
320
|
+
};
|
|
321
|
+
exports.se_IndexLocationCommand = se_IndexLocationCommand;
|
|
322
|
+
const se_RemoveLocationCommand = async (input, context) => {
|
|
323
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
324
|
+
const headers = {
|
|
325
|
+
'content-type': 'application/json',
|
|
326
|
+
};
|
|
327
|
+
b.bp("/matching/location");
|
|
328
|
+
let body;
|
|
329
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
330
|
+
'lat': _ => (0, smithy_client_1.serializeFloat)(_),
|
|
331
|
+
'lon': _ => (0, smithy_client_1.serializeFloat)(_),
|
|
332
|
+
}));
|
|
333
|
+
b.m("DELETE")
|
|
334
|
+
.h(headers)
|
|
335
|
+
.b(body);
|
|
336
|
+
return b.build();
|
|
337
|
+
};
|
|
338
|
+
exports.se_RemoveLocationCommand = se_RemoveLocationCommand;
|
|
339
|
+
const se_SwipeCommand = async (input, context) => {
|
|
340
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
341
|
+
const headers = {
|
|
342
|
+
'content-type': 'application/json',
|
|
343
|
+
};
|
|
344
|
+
b.bp("/matching/swipe");
|
|
345
|
+
let body;
|
|
346
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
347
|
+
'direction': [],
|
|
348
|
+
'targetId': [],
|
|
349
|
+
'viewedSection': [],
|
|
350
|
+
}));
|
|
351
|
+
b.m("POST")
|
|
352
|
+
.h(headers)
|
|
353
|
+
.b(body);
|
|
354
|
+
return b.build();
|
|
355
|
+
};
|
|
356
|
+
exports.se_SwipeCommand = se_SwipeCommand;
|
|
357
|
+
const se_UpdatePreferencesCommand = async (input, context) => {
|
|
358
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
359
|
+
const headers = {
|
|
360
|
+
'content-type': 'application/json',
|
|
361
|
+
};
|
|
362
|
+
b.bp("/matching/{userId}/preferences");
|
|
363
|
+
b.p('userId', () => input.userId, '{userId}', false);
|
|
364
|
+
let body;
|
|
365
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
366
|
+
'genders': _ => (0, smithy_client_1._json)(_),
|
|
367
|
+
'maxAge': [],
|
|
368
|
+
'maxDistanceKm': [],
|
|
369
|
+
'minAge': [],
|
|
370
|
+
}));
|
|
371
|
+
b.m("PUT")
|
|
372
|
+
.h(headers)
|
|
373
|
+
.b(body);
|
|
374
|
+
return b.build();
|
|
375
|
+
};
|
|
376
|
+
exports.se_UpdatePreferencesCommand = se_UpdatePreferencesCommand;
|
|
377
|
+
const se_CompleteLivenessSessionCommand = async (input, context) => {
|
|
378
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
379
|
+
const headers = {
|
|
380
|
+
'content-type': 'application/json',
|
|
381
|
+
};
|
|
382
|
+
b.bp("/profile/liveness/result");
|
|
383
|
+
let body;
|
|
384
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
385
|
+
'sessionId': [],
|
|
386
|
+
}));
|
|
387
|
+
b.m("POST")
|
|
388
|
+
.h(headers)
|
|
389
|
+
.b(body);
|
|
390
|
+
return b.build();
|
|
391
|
+
};
|
|
392
|
+
exports.se_CompleteLivenessSessionCommand = se_CompleteLivenessSessionCommand;
|
|
393
|
+
const se_CreateLivenessSessionCommand = async (input, context) => {
|
|
394
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
395
|
+
const headers = {};
|
|
396
|
+
b.bp("/profile/liveness/session");
|
|
397
|
+
let body;
|
|
398
|
+
b.m("POST")
|
|
399
|
+
.h(headers)
|
|
400
|
+
.b(body);
|
|
401
|
+
return b.build();
|
|
402
|
+
};
|
|
403
|
+
exports.se_CreateLivenessSessionCommand = se_CreateLivenessSessionCommand;
|
|
404
|
+
const se_DeleteProfileCommand = async (input, context) => {
|
|
405
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
406
|
+
const headers = {};
|
|
407
|
+
b.bp("/profile/{userId}");
|
|
408
|
+
b.p('userId', () => input.userId, '{userId}', false);
|
|
409
|
+
let body;
|
|
410
|
+
b.m("DELETE")
|
|
411
|
+
.h(headers)
|
|
412
|
+
.b(body);
|
|
413
|
+
return b.build();
|
|
414
|
+
};
|
|
415
|
+
exports.se_DeleteProfileCommand = se_DeleteProfileCommand;
|
|
416
|
+
const se_GenerateUploadUrlCommand = async (input, context) => {
|
|
417
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
418
|
+
const headers = {
|
|
419
|
+
'content-type': 'application/json',
|
|
420
|
+
};
|
|
421
|
+
b.bp("/profile/media/upload-url");
|
|
422
|
+
let body;
|
|
423
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
424
|
+
'contentLength': [],
|
|
425
|
+
'contentType': [],
|
|
426
|
+
}));
|
|
427
|
+
b.m("POST")
|
|
428
|
+
.h(headers)
|
|
429
|
+
.b(body);
|
|
430
|
+
return b.build();
|
|
431
|
+
};
|
|
432
|
+
exports.se_GenerateUploadUrlCommand = se_GenerateUploadUrlCommand;
|
|
433
|
+
const se_GetMyProfileCommand = async (input, context) => {
|
|
434
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
435
|
+
const headers = {};
|
|
436
|
+
b.bp("/profile");
|
|
437
|
+
let body;
|
|
438
|
+
b.m("GET")
|
|
439
|
+
.h(headers)
|
|
440
|
+
.b(body);
|
|
441
|
+
return b.build();
|
|
442
|
+
};
|
|
443
|
+
exports.se_GetMyProfileCommand = se_GetMyProfileCommand;
|
|
444
|
+
const se_GetProfileCommand = async (input, context) => {
|
|
445
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
446
|
+
const headers = {};
|
|
447
|
+
b.bp("/profile/{userId}");
|
|
448
|
+
b.p('userId', () => input.userId, '{userId}', false);
|
|
449
|
+
let body;
|
|
450
|
+
b.m("GET")
|
|
451
|
+
.h(headers)
|
|
452
|
+
.b(body);
|
|
453
|
+
return b.build();
|
|
454
|
+
};
|
|
455
|
+
exports.se_GetProfileCommand = se_GetProfileCommand;
|
|
456
|
+
const se_UpdateProfileCommand = async (input, context) => {
|
|
457
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
458
|
+
const headers = {
|
|
459
|
+
'content-type': 'application/json',
|
|
460
|
+
};
|
|
461
|
+
b.bp("/profile");
|
|
462
|
+
let body;
|
|
463
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
464
|
+
'age': [],
|
|
465
|
+
'audioPrompt': [],
|
|
466
|
+
'bio': [],
|
|
467
|
+
'cannabisStatus': [],
|
|
468
|
+
'causes': _ => (0, smithy_client_1._json)(_),
|
|
469
|
+
'communities': _ => (0, smithy_client_1._json)(_),
|
|
470
|
+
'currentLocation': [],
|
|
471
|
+
'displayName': [],
|
|
472
|
+
'drinkingStatus': [],
|
|
473
|
+
'drugsStatus': [],
|
|
474
|
+
'education': [],
|
|
475
|
+
'educationLevel': [],
|
|
476
|
+
'exercise': [],
|
|
477
|
+
'familyPlans': [],
|
|
478
|
+
'gender': [],
|
|
479
|
+
'height': [],
|
|
480
|
+
'hometown': [],
|
|
481
|
+
'interestedIn': _ => (0, smithy_client_1._json)(_),
|
|
482
|
+
'interests': _ => (0, smithy_client_1._json)(_),
|
|
483
|
+
'languages': _ => (0, smithy_client_1._json)(_),
|
|
484
|
+
'openers': _ => (0, smithy_client_1._json)(_),
|
|
485
|
+
'pictures': _ => (0, smithy_client_1._json)(_),
|
|
486
|
+
'politicalView': [],
|
|
487
|
+
'prompts': _ => (0, smithy_client_1._json)(_),
|
|
488
|
+
'qualities': _ => (0, smithy_client_1._json)(_),
|
|
489
|
+
'relationshipType': [],
|
|
490
|
+
'religion': [],
|
|
491
|
+
'smokingStatus': [],
|
|
492
|
+
'socialLinks': _ => (0, smithy_client_1._json)(_),
|
|
493
|
+
'starSign': [],
|
|
494
|
+
'videos': _ => (0, smithy_client_1._json)(_),
|
|
495
|
+
'wantsKids': [],
|
|
496
|
+
'work': [],
|
|
497
|
+
}));
|
|
498
|
+
b.m("PUT")
|
|
499
|
+
.h(headers)
|
|
500
|
+
.b(body);
|
|
501
|
+
return b.build();
|
|
502
|
+
};
|
|
503
|
+
exports.se_UpdateProfileCommand = se_UpdateProfileCommand;
|
|
504
|
+
const se_CompleteOnboardingCommand = async (input, context) => {
|
|
505
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
506
|
+
const headers = {};
|
|
507
|
+
b.bp("/state/complete-onboarding");
|
|
508
|
+
let body;
|
|
509
|
+
b.m("POST")
|
|
510
|
+
.h(headers)
|
|
511
|
+
.b(body);
|
|
512
|
+
return b.build();
|
|
513
|
+
};
|
|
514
|
+
exports.se_CompleteOnboardingCommand = se_CompleteOnboardingCommand;
|
|
515
|
+
const se_GetMatchCommand = async (input, context) => {
|
|
516
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
517
|
+
const headers = {};
|
|
518
|
+
b.bp("/state/match/{matchId}");
|
|
519
|
+
b.p('matchId', () => input.matchId, '{matchId}', false);
|
|
520
|
+
let body;
|
|
521
|
+
b.m("GET")
|
|
522
|
+
.h(headers)
|
|
523
|
+
.b(body);
|
|
524
|
+
return b.build();
|
|
525
|
+
};
|
|
526
|
+
exports.se_GetMatchCommand = se_GetMatchCommand;
|
|
527
|
+
const se_GetStateCommand = async (input, context) => {
|
|
528
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
529
|
+
const headers = {};
|
|
530
|
+
b.bp("/state/{userId}");
|
|
531
|
+
b.p('userId', () => input.userId, '{userId}', false);
|
|
532
|
+
let body;
|
|
533
|
+
b.m("GET")
|
|
534
|
+
.h(headers)
|
|
535
|
+
.b(body);
|
|
536
|
+
return b.build();
|
|
537
|
+
};
|
|
538
|
+
exports.se_GetStateCommand = se_GetStateCommand;
|
|
539
|
+
const se_InitUserCommand = async (input, context) => {
|
|
540
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
541
|
+
const headers = {};
|
|
542
|
+
b.bp("/state/init");
|
|
543
|
+
let body;
|
|
544
|
+
b.m("POST")
|
|
545
|
+
.h(headers)
|
|
546
|
+
.b(body);
|
|
547
|
+
return b.build();
|
|
548
|
+
};
|
|
549
|
+
exports.se_InitUserCommand = se_InitUserCommand;
|
|
550
|
+
const se_UnhookCommand = async (input, context) => {
|
|
551
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
552
|
+
const headers = {
|
|
553
|
+
'content-type': 'application/json',
|
|
554
|
+
};
|
|
555
|
+
b.bp("/state/unhook");
|
|
556
|
+
let body;
|
|
557
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
558
|
+
'matchId': [],
|
|
559
|
+
'reason': [],
|
|
560
|
+
}));
|
|
561
|
+
b.m("POST")
|
|
562
|
+
.h(headers)
|
|
563
|
+
.b(body);
|
|
564
|
+
return b.build();
|
|
565
|
+
};
|
|
566
|
+
exports.se_UnhookCommand = se_UnhookCommand;
|
|
567
|
+
const se_UpgradeUserCommand = async (input, context) => {
|
|
568
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
569
|
+
const headers = {};
|
|
570
|
+
b.bp("/state/upgrade");
|
|
571
|
+
let body;
|
|
572
|
+
b.m("POST")
|
|
573
|
+
.h(headers)
|
|
574
|
+
.b(body);
|
|
575
|
+
return b.build();
|
|
576
|
+
};
|
|
577
|
+
exports.se_UpgradeUserCommand = se_UpgradeUserCommand;
|
|
578
|
+
const de_ClaimPreKeyBundleCommand = async (output, context) => {
|
|
579
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
580
|
+
return de_CommandError(output, context);
|
|
581
|
+
}
|
|
582
|
+
const contents = (0, smithy_client_1.map)({
|
|
583
|
+
$metadata: deserializeMetadata(output),
|
|
584
|
+
});
|
|
585
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
586
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
587
|
+
'identityKey': smithy_client_1.expectString,
|
|
588
|
+
'oneTimePreKey': smithy_client_1.expectString,
|
|
589
|
+
'signedPreKey': smithy_client_1.expectString,
|
|
590
|
+
});
|
|
591
|
+
Object.assign(contents, doc);
|
|
592
|
+
return contents;
|
|
593
|
+
};
|
|
594
|
+
exports.de_ClaimPreKeyBundleCommand = de_ClaimPreKeyBundleCommand;
|
|
595
|
+
const de_DeleteMatchMessagesCommand = async (output, context) => {
|
|
596
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
597
|
+
return de_CommandError(output, context);
|
|
598
|
+
}
|
|
599
|
+
const contents = (0, smithy_client_1.map)({
|
|
600
|
+
$metadata: deserializeMetadata(output),
|
|
601
|
+
});
|
|
602
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
603
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
604
|
+
'deleted': smithy_client_1.expectInt32,
|
|
605
|
+
});
|
|
606
|
+
Object.assign(contents, doc);
|
|
607
|
+
return contents;
|
|
608
|
+
};
|
|
609
|
+
exports.de_DeleteMatchMessagesCommand = de_DeleteMatchMessagesCommand;
|
|
610
|
+
const de_UploadPreKeysCommand = async (output, context) => {
|
|
611
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
612
|
+
return de_CommandError(output, context);
|
|
613
|
+
}
|
|
614
|
+
const contents = (0, smithy_client_1.map)({
|
|
615
|
+
$metadata: deserializeMetadata(output),
|
|
616
|
+
});
|
|
617
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
618
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
619
|
+
'status': smithy_client_1.expectString,
|
|
620
|
+
});
|
|
621
|
+
Object.assign(contents, doc);
|
|
622
|
+
return contents;
|
|
623
|
+
};
|
|
624
|
+
exports.de_UploadPreKeysCommand = de_UploadPreKeysCommand;
|
|
625
|
+
const de_AuthSocialCommand = async (output, context) => {
|
|
626
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
627
|
+
return de_CommandError(output, context);
|
|
628
|
+
}
|
|
629
|
+
const contents = (0, smithy_client_1.map)({
|
|
630
|
+
$metadata: deserializeMetadata(output),
|
|
631
|
+
});
|
|
632
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
633
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
634
|
+
'isNewUser': smithy_client_1.expectBoolean,
|
|
635
|
+
'status': smithy_client_1.expectString,
|
|
636
|
+
'userId': smithy_client_1.expectString,
|
|
637
|
+
});
|
|
638
|
+
Object.assign(contents, doc);
|
|
639
|
+
return contents;
|
|
640
|
+
};
|
|
641
|
+
exports.de_AuthSocialCommand = de_AuthSocialCommand;
|
|
642
|
+
const de_GenerateInviteCommand = async (output, context) => {
|
|
643
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
644
|
+
return de_CommandError(output, context);
|
|
645
|
+
}
|
|
646
|
+
const contents = (0, smithy_client_1.map)({
|
|
647
|
+
$metadata: deserializeMetadata(output),
|
|
648
|
+
});
|
|
649
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
650
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
651
|
+
'expiresAt': smithy_client_1.expectLong,
|
|
652
|
+
'inviteCode': smithy_client_1.expectString,
|
|
653
|
+
'maxUses': smithy_client_1.expectInt32,
|
|
654
|
+
});
|
|
655
|
+
Object.assign(contents, doc);
|
|
656
|
+
return contents;
|
|
657
|
+
};
|
|
658
|
+
exports.de_GenerateInviteCommand = de_GenerateInviteCommand;
|
|
659
|
+
const de_GetUserCommand = async (output, context) => {
|
|
660
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
661
|
+
return de_CommandError(output, context);
|
|
662
|
+
}
|
|
663
|
+
const contents = (0, smithy_client_1.map)({
|
|
664
|
+
$metadata: deserializeMetadata(output),
|
|
665
|
+
});
|
|
666
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
667
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
668
|
+
'appleEmail': smithy_client_1.expectString,
|
|
669
|
+
'appleId': smithy_client_1.expectString,
|
|
670
|
+
'displayName': smithy_client_1.expectString,
|
|
671
|
+
'email': smithy_client_1.expectString,
|
|
672
|
+
'googleEmail': smithy_client_1.expectString,
|
|
673
|
+
'googleId': smithy_client_1.expectString,
|
|
674
|
+
'phoneNumber': smithy_client_1.expectString,
|
|
675
|
+
'userId': smithy_client_1.expectString,
|
|
676
|
+
'userState': smithy_client_1.expectString,
|
|
677
|
+
});
|
|
678
|
+
Object.assign(contents, doc);
|
|
679
|
+
return contents;
|
|
680
|
+
};
|
|
681
|
+
exports.de_GetUserCommand = de_GetUserCommand;
|
|
682
|
+
const de_GetUserByEmailCommand = async (output, context) => {
|
|
683
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
684
|
+
return de_CommandError(output, context);
|
|
685
|
+
}
|
|
686
|
+
const contents = (0, smithy_client_1.map)({
|
|
687
|
+
$metadata: deserializeMetadata(output),
|
|
688
|
+
});
|
|
689
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
690
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
691
|
+
'appleEmail': smithy_client_1.expectString,
|
|
692
|
+
'appleId': smithy_client_1.expectString,
|
|
693
|
+
'displayName': smithy_client_1.expectString,
|
|
694
|
+
'email': smithy_client_1.expectString,
|
|
695
|
+
'googleEmail': smithy_client_1.expectString,
|
|
696
|
+
'googleId': smithy_client_1.expectString,
|
|
697
|
+
'phoneNumber': smithy_client_1.expectString,
|
|
698
|
+
'userId': smithy_client_1.expectString,
|
|
699
|
+
'userState': smithy_client_1.expectString,
|
|
700
|
+
});
|
|
701
|
+
Object.assign(contents, doc);
|
|
702
|
+
return contents;
|
|
703
|
+
};
|
|
704
|
+
exports.de_GetUserByEmailCommand = de_GetUserByEmailCommand;
|
|
705
|
+
const de_LinkEmailCommand = async (output, context) => {
|
|
706
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
707
|
+
return de_CommandError(output, context);
|
|
708
|
+
}
|
|
709
|
+
const contents = (0, smithy_client_1.map)({
|
|
710
|
+
$metadata: deserializeMetadata(output),
|
|
711
|
+
});
|
|
712
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
713
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
714
|
+
'status': smithy_client_1.expectString,
|
|
715
|
+
});
|
|
716
|
+
Object.assign(contents, doc);
|
|
717
|
+
return contents;
|
|
718
|
+
};
|
|
719
|
+
exports.de_LinkEmailCommand = de_LinkEmailCommand;
|
|
720
|
+
const de_LinkSocialCommand = async (output, context) => {
|
|
721
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
722
|
+
return de_CommandError(output, context);
|
|
723
|
+
}
|
|
724
|
+
const contents = (0, smithy_client_1.map)({
|
|
725
|
+
$metadata: deserializeMetadata(output),
|
|
726
|
+
});
|
|
727
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
728
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
729
|
+
'status': smithy_client_1.expectString,
|
|
730
|
+
});
|
|
731
|
+
Object.assign(contents, doc);
|
|
732
|
+
return contents;
|
|
733
|
+
};
|
|
734
|
+
exports.de_LinkSocialCommand = de_LinkSocialCommand;
|
|
735
|
+
const de_RegisterPhoneCommand = async (output, context) => {
|
|
736
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
737
|
+
return de_CommandError(output, context);
|
|
738
|
+
}
|
|
739
|
+
const contents = (0, smithy_client_1.map)({
|
|
740
|
+
$metadata: deserializeMetadata(output),
|
|
741
|
+
});
|
|
742
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
743
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
744
|
+
'status': smithy_client_1.expectString,
|
|
745
|
+
'userId': smithy_client_1.expectString,
|
|
746
|
+
});
|
|
747
|
+
Object.assign(contents, doc);
|
|
748
|
+
return contents;
|
|
749
|
+
};
|
|
750
|
+
exports.de_RegisterPhoneCommand = de_RegisterPhoneCommand;
|
|
751
|
+
const de_RequestEmailOtpCommand = async (output, context) => {
|
|
752
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
753
|
+
return de_CommandError(output, context);
|
|
754
|
+
}
|
|
755
|
+
const contents = (0, smithy_client_1.map)({
|
|
756
|
+
$metadata: deserializeMetadata(output),
|
|
757
|
+
});
|
|
758
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
759
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
760
|
+
'status': smithy_client_1.expectString,
|
|
761
|
+
});
|
|
762
|
+
Object.assign(contents, doc);
|
|
763
|
+
return contents;
|
|
764
|
+
};
|
|
765
|
+
exports.de_RequestEmailOtpCommand = de_RequestEmailOtpCommand;
|
|
766
|
+
const de_RequestPhoneOtpCommand = async (output, context) => {
|
|
767
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
768
|
+
return de_CommandError(output, context);
|
|
769
|
+
}
|
|
770
|
+
const contents = (0, smithy_client_1.map)({
|
|
771
|
+
$metadata: deserializeMetadata(output),
|
|
772
|
+
});
|
|
773
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
774
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
775
|
+
'status': smithy_client_1.expectString,
|
|
776
|
+
});
|
|
777
|
+
Object.assign(contents, doc);
|
|
778
|
+
return contents;
|
|
779
|
+
};
|
|
780
|
+
exports.de_RequestPhoneOtpCommand = de_RequestPhoneOtpCommand;
|
|
781
|
+
const de_RequestPhoneUpdateOtpCommand = async (output, context) => {
|
|
782
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
783
|
+
return de_CommandError(output, context);
|
|
784
|
+
}
|
|
785
|
+
const contents = (0, smithy_client_1.map)({
|
|
786
|
+
$metadata: deserializeMetadata(output),
|
|
787
|
+
});
|
|
788
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
789
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
790
|
+
'status': smithy_client_1.expectString,
|
|
791
|
+
});
|
|
792
|
+
Object.assign(contents, doc);
|
|
793
|
+
return contents;
|
|
794
|
+
};
|
|
795
|
+
exports.de_RequestPhoneUpdateOtpCommand = de_RequestPhoneUpdateOtpCommand;
|
|
796
|
+
const de_UnlinkSocialCommand = async (output, context) => {
|
|
797
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
798
|
+
return de_CommandError(output, context);
|
|
799
|
+
}
|
|
800
|
+
const contents = (0, smithy_client_1.map)({
|
|
801
|
+
$metadata: deserializeMetadata(output),
|
|
802
|
+
});
|
|
803
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
804
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
805
|
+
'status': smithy_client_1.expectString,
|
|
806
|
+
});
|
|
807
|
+
Object.assign(contents, doc);
|
|
808
|
+
return contents;
|
|
809
|
+
};
|
|
810
|
+
exports.de_UnlinkSocialCommand = de_UnlinkSocialCommand;
|
|
811
|
+
const de_UpdateEntitlementsCommand = async (output, context) => {
|
|
812
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
813
|
+
return de_CommandError(output, context);
|
|
814
|
+
}
|
|
815
|
+
const contents = (0, smithy_client_1.map)({
|
|
816
|
+
$metadata: deserializeMetadata(output),
|
|
817
|
+
});
|
|
818
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
819
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
820
|
+
'status': smithy_client_1.expectString,
|
|
821
|
+
'subscriptionTier': smithy_client_1.expectString,
|
|
822
|
+
});
|
|
823
|
+
Object.assign(contents, doc);
|
|
824
|
+
return contents;
|
|
825
|
+
};
|
|
826
|
+
exports.de_UpdateEntitlementsCommand = de_UpdateEntitlementsCommand;
|
|
827
|
+
const de_UpdatePhoneNumberCommand = async (output, context) => {
|
|
828
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
829
|
+
return de_CommandError(output, context);
|
|
830
|
+
}
|
|
831
|
+
const contents = (0, smithy_client_1.map)({
|
|
832
|
+
$metadata: deserializeMetadata(output),
|
|
833
|
+
});
|
|
834
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
835
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
836
|
+
'phoneNumber': smithy_client_1.expectString,
|
|
837
|
+
'status': smithy_client_1.expectString,
|
|
838
|
+
});
|
|
839
|
+
Object.assign(contents, doc);
|
|
840
|
+
return contents;
|
|
841
|
+
};
|
|
842
|
+
exports.de_UpdatePhoneNumberCommand = de_UpdatePhoneNumberCommand;
|
|
843
|
+
const de_ValidateInviteCommand = async (output, context) => {
|
|
844
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
845
|
+
return de_CommandError(output, context);
|
|
846
|
+
}
|
|
847
|
+
const contents = (0, smithy_client_1.map)({
|
|
848
|
+
$metadata: deserializeMetadata(output),
|
|
849
|
+
});
|
|
850
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
851
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
852
|
+
'maxUses': smithy_client_1.expectInt32,
|
|
853
|
+
'referrerId': smithy_client_1.expectString,
|
|
854
|
+
'status': smithy_client_1.expectString,
|
|
855
|
+
'usedCount': smithy_client_1.expectInt32,
|
|
856
|
+
});
|
|
857
|
+
Object.assign(contents, doc);
|
|
858
|
+
return contents;
|
|
859
|
+
};
|
|
860
|
+
exports.de_ValidateInviteCommand = de_ValidateInviteCommand;
|
|
861
|
+
const de_DiscoverCommand = async (output, context) => {
|
|
862
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
863
|
+
return de_CommandError(output, context);
|
|
864
|
+
}
|
|
865
|
+
const contents = (0, smithy_client_1.map)({
|
|
866
|
+
$metadata: deserializeMetadata(output),
|
|
867
|
+
});
|
|
868
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
869
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
870
|
+
'algorithm': smithy_client_1.expectString,
|
|
871
|
+
'candidates': _ => de_CandidateList(_, context),
|
|
872
|
+
'count': smithy_client_1.expectInt32,
|
|
873
|
+
});
|
|
874
|
+
Object.assign(contents, doc);
|
|
875
|
+
return contents;
|
|
876
|
+
};
|
|
877
|
+
exports.de_DiscoverCommand = de_DiscoverCommand;
|
|
878
|
+
const de_GetPreferencesCommand = async (output, context) => {
|
|
879
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
880
|
+
return de_CommandError(output, context);
|
|
881
|
+
}
|
|
882
|
+
const contents = (0, smithy_client_1.map)({
|
|
883
|
+
$metadata: deserializeMetadata(output),
|
|
884
|
+
});
|
|
885
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
886
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
887
|
+
'genders': smithy_client_1._json,
|
|
888
|
+
'maxAge': smithy_client_1.expectInt32,
|
|
889
|
+
'maxDistanceKm': smithy_client_1.expectInt32,
|
|
890
|
+
'minAge': smithy_client_1.expectInt32,
|
|
891
|
+
'userId': smithy_client_1.expectString,
|
|
892
|
+
});
|
|
893
|
+
Object.assign(contents, doc);
|
|
894
|
+
return contents;
|
|
895
|
+
};
|
|
896
|
+
exports.de_GetPreferencesCommand = de_GetPreferencesCommand;
|
|
897
|
+
const de_IndexLocationCommand = async (output, context) => {
|
|
898
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
899
|
+
return de_CommandError(output, context);
|
|
900
|
+
}
|
|
901
|
+
const contents = (0, smithy_client_1.map)({
|
|
902
|
+
$metadata: deserializeMetadata(output),
|
|
903
|
+
});
|
|
904
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
905
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
906
|
+
'status': smithy_client_1.expectString,
|
|
907
|
+
});
|
|
908
|
+
Object.assign(contents, doc);
|
|
909
|
+
return contents;
|
|
910
|
+
};
|
|
911
|
+
exports.de_IndexLocationCommand = de_IndexLocationCommand;
|
|
912
|
+
const de_RemoveLocationCommand = async (output, context) => {
|
|
913
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
914
|
+
return de_CommandError(output, context);
|
|
915
|
+
}
|
|
916
|
+
const contents = (0, smithy_client_1.map)({
|
|
917
|
+
$metadata: deserializeMetadata(output),
|
|
918
|
+
});
|
|
919
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
920
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
921
|
+
'status': smithy_client_1.expectString,
|
|
922
|
+
});
|
|
923
|
+
Object.assign(contents, doc);
|
|
924
|
+
return contents;
|
|
925
|
+
};
|
|
926
|
+
exports.de_RemoveLocationCommand = de_RemoveLocationCommand;
|
|
927
|
+
const de_SwipeCommand = async (output, context) => {
|
|
928
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
929
|
+
return de_CommandError(output, context);
|
|
930
|
+
}
|
|
931
|
+
const contents = (0, smithy_client_1.map)({
|
|
932
|
+
$metadata: deserializeMetadata(output),
|
|
933
|
+
});
|
|
934
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
935
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
936
|
+
'matchId': smithy_client_1.expectString,
|
|
937
|
+
'matched': smithy_client_1.expectBoolean,
|
|
938
|
+
'status': smithy_client_1.expectString,
|
|
939
|
+
});
|
|
940
|
+
Object.assign(contents, doc);
|
|
941
|
+
return contents;
|
|
942
|
+
};
|
|
943
|
+
exports.de_SwipeCommand = de_SwipeCommand;
|
|
944
|
+
const de_UpdatePreferencesCommand = async (output, context) => {
|
|
945
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
946
|
+
return de_CommandError(output, context);
|
|
947
|
+
}
|
|
948
|
+
const contents = (0, smithy_client_1.map)({
|
|
949
|
+
$metadata: deserializeMetadata(output),
|
|
950
|
+
});
|
|
951
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
952
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
953
|
+
'status': smithy_client_1.expectString,
|
|
954
|
+
});
|
|
955
|
+
Object.assign(contents, doc);
|
|
956
|
+
return contents;
|
|
957
|
+
};
|
|
958
|
+
exports.de_UpdatePreferencesCommand = de_UpdatePreferencesCommand;
|
|
959
|
+
const de_CompleteLivenessSessionCommand = async (output, context) => {
|
|
960
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
961
|
+
return de_CommandError(output, context);
|
|
962
|
+
}
|
|
963
|
+
const contents = (0, smithy_client_1.map)({
|
|
964
|
+
$metadata: deserializeMetadata(output),
|
|
965
|
+
});
|
|
966
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
967
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
968
|
+
'status': smithy_client_1.expectString,
|
|
969
|
+
});
|
|
970
|
+
Object.assign(contents, doc);
|
|
971
|
+
return contents;
|
|
972
|
+
};
|
|
973
|
+
exports.de_CompleteLivenessSessionCommand = de_CompleteLivenessSessionCommand;
|
|
974
|
+
const de_CreateLivenessSessionCommand = async (output, context) => {
|
|
975
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
976
|
+
return de_CommandError(output, context);
|
|
977
|
+
}
|
|
978
|
+
const contents = (0, smithy_client_1.map)({
|
|
979
|
+
$metadata: deserializeMetadata(output),
|
|
980
|
+
});
|
|
981
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
982
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
983
|
+
'sessionId': smithy_client_1.expectString,
|
|
984
|
+
});
|
|
985
|
+
Object.assign(contents, doc);
|
|
986
|
+
return contents;
|
|
987
|
+
};
|
|
988
|
+
exports.de_CreateLivenessSessionCommand = de_CreateLivenessSessionCommand;
|
|
989
|
+
const de_DeleteProfileCommand = async (output, context) => {
|
|
990
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
991
|
+
return de_CommandError(output, context);
|
|
992
|
+
}
|
|
993
|
+
const contents = (0, smithy_client_1.map)({
|
|
994
|
+
$metadata: deserializeMetadata(output),
|
|
995
|
+
});
|
|
996
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
997
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
998
|
+
'status': smithy_client_1.expectString,
|
|
999
|
+
});
|
|
1000
|
+
Object.assign(contents, doc);
|
|
1001
|
+
return contents;
|
|
1002
|
+
};
|
|
1003
|
+
exports.de_DeleteProfileCommand = de_DeleteProfileCommand;
|
|
1004
|
+
const de_GenerateUploadUrlCommand = async (output, context) => {
|
|
1005
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1006
|
+
return de_CommandError(output, context);
|
|
1007
|
+
}
|
|
1008
|
+
const contents = (0, smithy_client_1.map)({
|
|
1009
|
+
$metadata: deserializeMetadata(output),
|
|
1010
|
+
});
|
|
1011
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1012
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1013
|
+
'formData': smithy_client_1._json,
|
|
1014
|
+
'objectKey': smithy_client_1.expectString,
|
|
1015
|
+
'uploadUrl': smithy_client_1.expectString,
|
|
1016
|
+
});
|
|
1017
|
+
Object.assign(contents, doc);
|
|
1018
|
+
return contents;
|
|
1019
|
+
};
|
|
1020
|
+
exports.de_GenerateUploadUrlCommand = de_GenerateUploadUrlCommand;
|
|
1021
|
+
const de_GetMyProfileCommand = async (output, context) => {
|
|
1022
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1023
|
+
return de_CommandError(output, context);
|
|
1024
|
+
}
|
|
1025
|
+
const contents = (0, smithy_client_1.map)({
|
|
1026
|
+
$metadata: deserializeMetadata(output),
|
|
1027
|
+
});
|
|
1028
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1029
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1030
|
+
'age': smithy_client_1.expectInt32,
|
|
1031
|
+
'audioPrompt': smithy_client_1.expectString,
|
|
1032
|
+
'bio': smithy_client_1.expectString,
|
|
1033
|
+
'cannabisStatus': smithy_client_1.expectString,
|
|
1034
|
+
'causes': smithy_client_1._json,
|
|
1035
|
+
'communities': smithy_client_1._json,
|
|
1036
|
+
'currentLocation': smithy_client_1.expectString,
|
|
1037
|
+
'displayName': smithy_client_1.expectString,
|
|
1038
|
+
'drinkingStatus': smithy_client_1.expectString,
|
|
1039
|
+
'drugsStatus': smithy_client_1.expectString,
|
|
1040
|
+
'education': smithy_client_1.expectString,
|
|
1041
|
+
'educationLevel': smithy_client_1.expectString,
|
|
1042
|
+
'exercise': smithy_client_1.expectString,
|
|
1043
|
+
'familyPlans': smithy_client_1.expectString,
|
|
1044
|
+
'gender': smithy_client_1.expectString,
|
|
1045
|
+
'height': smithy_client_1.expectInt32,
|
|
1046
|
+
'hometown': smithy_client_1.expectString,
|
|
1047
|
+
'interestedIn': smithy_client_1._json,
|
|
1048
|
+
'interests': smithy_client_1._json,
|
|
1049
|
+
'languages': smithy_client_1._json,
|
|
1050
|
+
'moderationStatus': smithy_client_1.expectString,
|
|
1051
|
+
'openers': smithy_client_1._json,
|
|
1052
|
+
'pictures': smithy_client_1._json,
|
|
1053
|
+
'politicalView': smithy_client_1.expectString,
|
|
1054
|
+
'prompts': smithy_client_1._json,
|
|
1055
|
+
'qualities': smithy_client_1._json,
|
|
1056
|
+
'relationshipType': smithy_client_1.expectString,
|
|
1057
|
+
'religion': smithy_client_1.expectString,
|
|
1058
|
+
'smokingStatus': smithy_client_1.expectString,
|
|
1059
|
+
'socialLinks': smithy_client_1._json,
|
|
1060
|
+
'starSign': smithy_client_1.expectString,
|
|
1061
|
+
'subscriptionTier': smithy_client_1.expectString,
|
|
1062
|
+
'userId': smithy_client_1.expectString,
|
|
1063
|
+
'verified': smithy_client_1.expectBoolean,
|
|
1064
|
+
'videos': smithy_client_1._json,
|
|
1065
|
+
'wantsKids': smithy_client_1.expectString,
|
|
1066
|
+
'work': smithy_client_1.expectString,
|
|
1067
|
+
});
|
|
1068
|
+
Object.assign(contents, doc);
|
|
1069
|
+
return contents;
|
|
1070
|
+
};
|
|
1071
|
+
exports.de_GetMyProfileCommand = de_GetMyProfileCommand;
|
|
1072
|
+
const de_GetProfileCommand = async (output, context) => {
|
|
1073
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1074
|
+
return de_CommandError(output, context);
|
|
1075
|
+
}
|
|
1076
|
+
const contents = (0, smithy_client_1.map)({
|
|
1077
|
+
$metadata: deserializeMetadata(output),
|
|
1078
|
+
});
|
|
1079
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1080
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1081
|
+
'age': smithy_client_1.expectInt32,
|
|
1082
|
+
'audioPrompt': smithy_client_1.expectString,
|
|
1083
|
+
'bio': smithy_client_1.expectString,
|
|
1084
|
+
'cannabisStatus': smithy_client_1.expectString,
|
|
1085
|
+
'causes': smithy_client_1._json,
|
|
1086
|
+
'communities': smithy_client_1._json,
|
|
1087
|
+
'currentLocation': smithy_client_1.expectString,
|
|
1088
|
+
'displayName': smithy_client_1.expectString,
|
|
1089
|
+
'drinkingStatus': smithy_client_1.expectString,
|
|
1090
|
+
'drugsStatus': smithy_client_1.expectString,
|
|
1091
|
+
'education': smithy_client_1.expectString,
|
|
1092
|
+
'educationLevel': smithy_client_1.expectString,
|
|
1093
|
+
'exercise': smithy_client_1.expectString,
|
|
1094
|
+
'familyPlans': smithy_client_1.expectString,
|
|
1095
|
+
'gender': smithy_client_1.expectString,
|
|
1096
|
+
'height': smithy_client_1.expectInt32,
|
|
1097
|
+
'hometown': smithy_client_1.expectString,
|
|
1098
|
+
'interestedIn': smithy_client_1._json,
|
|
1099
|
+
'interests': smithy_client_1._json,
|
|
1100
|
+
'languages': smithy_client_1._json,
|
|
1101
|
+
'moderationStatus': smithy_client_1.expectString,
|
|
1102
|
+
'openers': smithy_client_1._json,
|
|
1103
|
+
'pictures': smithy_client_1._json,
|
|
1104
|
+
'politicalView': smithy_client_1.expectString,
|
|
1105
|
+
'prompts': smithy_client_1._json,
|
|
1106
|
+
'qualities': smithy_client_1._json,
|
|
1107
|
+
'relationshipType': smithy_client_1.expectString,
|
|
1108
|
+
'religion': smithy_client_1.expectString,
|
|
1109
|
+
'smokingStatus': smithy_client_1.expectString,
|
|
1110
|
+
'socialLinks': smithy_client_1._json,
|
|
1111
|
+
'starSign': smithy_client_1.expectString,
|
|
1112
|
+
'subscriptionTier': smithy_client_1.expectString,
|
|
1113
|
+
'userId': smithy_client_1.expectString,
|
|
1114
|
+
'verified': smithy_client_1.expectBoolean,
|
|
1115
|
+
'videos': smithy_client_1._json,
|
|
1116
|
+
'wantsKids': smithy_client_1.expectString,
|
|
1117
|
+
'work': smithy_client_1.expectString,
|
|
1118
|
+
});
|
|
1119
|
+
Object.assign(contents, doc);
|
|
1120
|
+
return contents;
|
|
1121
|
+
};
|
|
1122
|
+
exports.de_GetProfileCommand = de_GetProfileCommand;
|
|
1123
|
+
const de_UpdateProfileCommand = async (output, context) => {
|
|
1124
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1125
|
+
return de_CommandError(output, context);
|
|
1126
|
+
}
|
|
1127
|
+
const contents = (0, smithy_client_1.map)({
|
|
1128
|
+
$metadata: deserializeMetadata(output),
|
|
1129
|
+
});
|
|
1130
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1131
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1132
|
+
'status': smithy_client_1.expectString,
|
|
1133
|
+
});
|
|
1134
|
+
Object.assign(contents, doc);
|
|
1135
|
+
return contents;
|
|
1136
|
+
};
|
|
1137
|
+
exports.de_UpdateProfileCommand = de_UpdateProfileCommand;
|
|
1138
|
+
const de_CompleteOnboardingCommand = async (output, context) => {
|
|
1139
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1140
|
+
return de_CommandError(output, context);
|
|
1141
|
+
}
|
|
1142
|
+
const contents = (0, smithy_client_1.map)({
|
|
1143
|
+
$metadata: deserializeMetadata(output),
|
|
1144
|
+
});
|
|
1145
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1146
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1147
|
+
'status': smithy_client_1.expectString,
|
|
1148
|
+
});
|
|
1149
|
+
Object.assign(contents, doc);
|
|
1150
|
+
return contents;
|
|
1151
|
+
};
|
|
1152
|
+
exports.de_CompleteOnboardingCommand = de_CompleteOnboardingCommand;
|
|
1153
|
+
const de_GetMatchCommand = async (output, context) => {
|
|
1154
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1155
|
+
return de_CommandError(output, context);
|
|
1156
|
+
}
|
|
1157
|
+
const contents = (0, smithy_client_1.map)({
|
|
1158
|
+
$metadata: deserializeMetadata(output),
|
|
1159
|
+
});
|
|
1160
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1161
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1162
|
+
'createdAt': smithy_client_1.expectLong,
|
|
1163
|
+
'endReason': smithy_client_1.expectString,
|
|
1164
|
+
'endedAt': smithy_client_1.expectLong,
|
|
1165
|
+
'endedBy': smithy_client_1.expectString,
|
|
1166
|
+
'latestMessageSenderId': smithy_client_1.expectString,
|
|
1167
|
+
'latestMessageTimestamp': smithy_client_1.expectLong,
|
|
1168
|
+
'matchId': smithy_client_1.expectString,
|
|
1169
|
+
'status': smithy_client_1.expectString,
|
|
1170
|
+
'updatedAt': smithy_client_1.expectLong,
|
|
1171
|
+
'userA': smithy_client_1.expectString,
|
|
1172
|
+
'userB': smithy_client_1.expectString,
|
|
1173
|
+
});
|
|
1174
|
+
Object.assign(contents, doc);
|
|
1175
|
+
return contents;
|
|
1176
|
+
};
|
|
1177
|
+
exports.de_GetMatchCommand = de_GetMatchCommand;
|
|
1178
|
+
const de_GetStateCommand = async (output, context) => {
|
|
1179
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1180
|
+
return de_CommandError(output, context);
|
|
1181
|
+
}
|
|
1182
|
+
const contents = (0, smithy_client_1.map)({
|
|
1183
|
+
$metadata: deserializeMetadata(output),
|
|
1184
|
+
});
|
|
1185
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1186
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1187
|
+
'activeConnections': smithy_client_1.expectInt32,
|
|
1188
|
+
'matchIds': smithy_client_1._json,
|
|
1189
|
+
'state': smithy_client_1.expectString,
|
|
1190
|
+
'subscriptionTier': smithy_client_1.expectString,
|
|
1191
|
+
'userId': smithy_client_1.expectString,
|
|
1192
|
+
});
|
|
1193
|
+
Object.assign(contents, doc);
|
|
1194
|
+
return contents;
|
|
1195
|
+
};
|
|
1196
|
+
exports.de_GetStateCommand = de_GetStateCommand;
|
|
1197
|
+
const de_InitUserCommand = async (output, context) => {
|
|
1198
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1199
|
+
return de_CommandError(output, context);
|
|
1200
|
+
}
|
|
1201
|
+
const contents = (0, smithy_client_1.map)({
|
|
1202
|
+
$metadata: deserializeMetadata(output),
|
|
1203
|
+
});
|
|
1204
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1205
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1206
|
+
'status': smithy_client_1.expectString,
|
|
1207
|
+
});
|
|
1208
|
+
Object.assign(contents, doc);
|
|
1209
|
+
return contents;
|
|
1210
|
+
};
|
|
1211
|
+
exports.de_InitUserCommand = de_InitUserCommand;
|
|
1212
|
+
const de_UnhookCommand = async (output, context) => {
|
|
1213
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1214
|
+
return de_CommandError(output, context);
|
|
1215
|
+
}
|
|
1216
|
+
const contents = (0, smithy_client_1.map)({
|
|
1217
|
+
$metadata: deserializeMetadata(output),
|
|
1218
|
+
});
|
|
1219
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1220
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1221
|
+
'status': smithy_client_1.expectString,
|
|
1222
|
+
});
|
|
1223
|
+
Object.assign(contents, doc);
|
|
1224
|
+
return contents;
|
|
1225
|
+
};
|
|
1226
|
+
exports.de_UnhookCommand = de_UnhookCommand;
|
|
1227
|
+
const de_UpgradeUserCommand = async (output, context) => {
|
|
1228
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1229
|
+
return de_CommandError(output, context);
|
|
1230
|
+
}
|
|
1231
|
+
const contents = (0, smithy_client_1.map)({
|
|
1232
|
+
$metadata: deserializeMetadata(output),
|
|
1233
|
+
});
|
|
1234
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1235
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1236
|
+
'activeConnections': smithy_client_1.expectInt32,
|
|
1237
|
+
'matchIds': smithy_client_1._json,
|
|
1238
|
+
'state': smithy_client_1.expectString,
|
|
1239
|
+
'subscriptionTier': smithy_client_1.expectString,
|
|
1240
|
+
'userId': smithy_client_1.expectString,
|
|
1241
|
+
});
|
|
1242
|
+
Object.assign(contents, doc);
|
|
1243
|
+
return contents;
|
|
1244
|
+
};
|
|
1245
|
+
exports.de_UpgradeUserCommand = de_UpgradeUserCommand;
|
|
1246
|
+
const de_CommandError = async (output, context) => {
|
|
1247
|
+
const parsedOutput = {
|
|
1248
|
+
...output,
|
|
1249
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context)
|
|
1250
|
+
};
|
|
1251
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1252
|
+
switch (errorCode) {
|
|
1253
|
+
case "BadRequestError":
|
|
1254
|
+
case "club.onehook.identity#BadRequestError":
|
|
1255
|
+
throw await de_BadRequestErrorRes(parsedOutput, context);
|
|
1256
|
+
case "ForbiddenError":
|
|
1257
|
+
case "club.onehook.chat#ForbiddenError":
|
|
1258
|
+
throw await de_ForbiddenErrorRes(parsedOutput, context);
|
|
1259
|
+
case "InternalServerError":
|
|
1260
|
+
case "club.onehook.identity#InternalServerError":
|
|
1261
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
1262
|
+
case "NotFoundError":
|
|
1263
|
+
case "club.onehook.identity#NotFoundError":
|
|
1264
|
+
throw await de_NotFoundErrorRes(parsedOutput, context);
|
|
1265
|
+
default:
|
|
1266
|
+
const parsedBody = parsedOutput.body;
|
|
1267
|
+
return throwDefaultError({
|
|
1268
|
+
output,
|
|
1269
|
+
parsedBody,
|
|
1270
|
+
errorCode
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
};
|
|
1274
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(OneHookServiceServiceException_1.OneHookServiceServiceException);
|
|
1275
|
+
const de_ForbiddenErrorRes = async (parsedOutput, context) => {
|
|
1276
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1277
|
+
const data = parsedOutput.body;
|
|
1278
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1279
|
+
'error': smithy_client_1.expectString,
|
|
1280
|
+
});
|
|
1281
|
+
Object.assign(contents, doc);
|
|
1282
|
+
const exception = new models_0_1.ForbiddenError({
|
|
1283
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1284
|
+
...contents
|
|
1285
|
+
});
|
|
1286
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1287
|
+
};
|
|
1288
|
+
const de_BadRequestErrorRes = async (parsedOutput, context) => {
|
|
1289
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1290
|
+
const data = parsedOutput.body;
|
|
1291
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1292
|
+
'error': smithy_client_1.expectString,
|
|
1293
|
+
});
|
|
1294
|
+
Object.assign(contents, doc);
|
|
1295
|
+
const exception = new models_0_1.BadRequestError({
|
|
1296
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1297
|
+
...contents
|
|
1298
|
+
});
|
|
1299
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1300
|
+
};
|
|
1301
|
+
const de_InternalServerErrorRes = async (parsedOutput, context) => {
|
|
1302
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1303
|
+
const data = parsedOutput.body;
|
|
1304
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1305
|
+
'error': smithy_client_1.expectString,
|
|
1306
|
+
});
|
|
1307
|
+
Object.assign(contents, doc);
|
|
1308
|
+
const exception = new models_0_1.InternalServerError({
|
|
1309
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1310
|
+
...contents
|
|
1311
|
+
});
|
|
1312
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1313
|
+
};
|
|
1314
|
+
const de_NotFoundErrorRes = async (parsedOutput, context) => {
|
|
1315
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1316
|
+
const data = parsedOutput.body;
|
|
1317
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1318
|
+
'error': smithy_client_1.expectString,
|
|
1319
|
+
});
|
|
1320
|
+
Object.assign(contents, doc);
|
|
1321
|
+
const exception = new models_0_1.NotFoundError({
|
|
1322
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1323
|
+
...contents
|
|
1324
|
+
});
|
|
1325
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1326
|
+
};
|
|
1327
|
+
const de_CandidateDto = (output, context) => {
|
|
1328
|
+
return (0, smithy_client_1.take)(output, {
|
|
1329
|
+
'distanceKm': smithy_client_1.limitedParseDouble,
|
|
1330
|
+
'score': smithy_client_1.limitedParseDouble,
|
|
1331
|
+
'userId': smithy_client_1.expectString,
|
|
1332
|
+
});
|
|
1333
|
+
};
|
|
1334
|
+
const de_CandidateList = (output, context) => {
|
|
1335
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1336
|
+
return de_CandidateDto(entry, context);
|
|
1337
|
+
});
|
|
1338
|
+
return retVal;
|
|
1339
|
+
};
|
|
1340
|
+
const deserializeMetadata = (output) => ({
|
|
1341
|
+
httpStatusCode: output.statusCode,
|
|
1342
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1343
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1344
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1345
|
+
});
|
|
1346
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
|
|
1347
|
+
const _l = "lat";
|
|
1348
|
+
const _lo = "lon";
|
|
1349
|
+
const _mI = "matchId";
|