onehook-api-client 1.0.0 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/LICENSE +28 -201
  2. package/README.md +451 -0
  3. package/dist-cjs/{OneHookService.js → OneHook.js} +5 -5
  4. package/dist-cjs/{OneHookServiceClient.js → OneHookClient.js} +16 -11
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +8 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +24 -11
  7. package/dist-cjs/commands/AuthSocialCommand.js +1 -1
  8. package/dist-cjs/commands/ClaimPreKeyBundleCommand.js +1 -1
  9. package/dist-cjs/commands/CompleteLivenessSessionCommand.js +1 -1
  10. package/dist-cjs/commands/CompleteOnboardingCommand.js +1 -1
  11. package/dist-cjs/commands/CreateLivenessSessionCommand.js +1 -1
  12. package/dist-cjs/commands/DeleteMatchMessagesCommand.js +1 -1
  13. package/dist-cjs/commands/DeleteProfileCommand.js +1 -1
  14. package/dist-cjs/commands/DiscoverCommand.js +1 -1
  15. package/dist-cjs/commands/GenerateInviteCommand.js +1 -1
  16. package/dist-cjs/commands/GenerateUploadUrlCommand.js +1 -1
  17. package/dist-cjs/commands/GetMatchCommand.js +1 -1
  18. package/dist-cjs/commands/GetMyProfileCommand.js +1 -1
  19. package/dist-cjs/commands/GetPreferencesCommand.js +1 -1
  20. package/dist-cjs/commands/GetProfileCommand.js +1 -1
  21. package/dist-cjs/commands/GetStateCommand.js +1 -1
  22. package/dist-cjs/commands/GetUserByEmailCommand.js +1 -1
  23. package/dist-cjs/commands/GetUserCommand.js +1 -1
  24. package/dist-cjs/commands/IndexLocationCommand.js +1 -1
  25. package/dist-cjs/commands/InitUserCommand.js +1 -1
  26. package/dist-cjs/commands/LinkEmailCommand.js +1 -1
  27. package/dist-cjs/commands/LinkSocialCommand.js +1 -1
  28. package/dist-cjs/commands/RegisterPhoneCommand.js +1 -1
  29. package/dist-cjs/commands/RemoveLocationCommand.js +1 -1
  30. package/dist-cjs/commands/RequestEmailOtpCommand.js +1 -1
  31. package/dist-cjs/commands/RequestPhoneOtpCommand.js +1 -1
  32. package/dist-cjs/commands/RequestPhoneUpdateOtpCommand.js +1 -1
  33. package/dist-cjs/commands/SwipeCommand.js +1 -1
  34. package/dist-cjs/commands/UnhookCommand.js +1 -1
  35. package/dist-cjs/commands/UnlinkSocialCommand.js +1 -1
  36. package/dist-cjs/commands/UpdateEntitlementsCommand.js +1 -1
  37. package/dist-cjs/commands/UpdatePhoneNumberCommand.js +1 -1
  38. package/dist-cjs/commands/UpdatePreferencesCommand.js +1 -1
  39. package/dist-cjs/commands/UpdateProfileCommand.js +1 -1
  40. package/dist-cjs/commands/UpgradeUserCommand.js +1 -1
  41. package/dist-cjs/commands/UploadPreKeysCommand.js +1 -1
  42. package/dist-cjs/commands/ValidateInviteCommand.js +1 -1
  43. package/dist-cjs/endpoints.js +232 -0
  44. package/dist-cjs/graphql/types.js +1 -1
  45. package/dist-cjs/index.js +5 -5
  46. package/dist-cjs/models/{OneHookServiceServiceException.js → OneHookServiceException.js} +4 -4
  47. package/dist-cjs/models/models_0.js +17 -13
  48. package/dist-cjs/protocols/Aws_restJson1.js +2 -2
  49. package/dist-cjs/runtimeConfig.browser.js +7 -1
  50. package/dist-cjs/runtimeConfig.js +13 -4
  51. package/dist-cjs/runtimeConfig.shared.js +8 -5
  52. package/dist-cjs/runtimeExtensions.js +3 -12
  53. package/dist-es/{OneHookService.js → OneHook.js} +3 -3
  54. package/dist-es/{OneHookServiceClient.js → OneHookClient.js} +16 -11
  55. package/dist-es/auth/httpAuthExtensionConfiguration.js +8 -0
  56. package/dist-es/auth/httpAuthSchemeProvider.js +22 -9
  57. package/dist-es/commands/AuthSocialCommand.js +1 -1
  58. package/dist-es/commands/ClaimPreKeyBundleCommand.js +1 -1
  59. package/dist-es/commands/CompleteLivenessSessionCommand.js +1 -1
  60. package/dist-es/commands/CompleteOnboardingCommand.js +1 -1
  61. package/dist-es/commands/CreateLivenessSessionCommand.js +1 -1
  62. package/dist-es/commands/DeleteMatchMessagesCommand.js +1 -1
  63. package/dist-es/commands/DeleteProfileCommand.js +1 -1
  64. package/dist-es/commands/DiscoverCommand.js +1 -1
  65. package/dist-es/commands/GenerateInviteCommand.js +1 -1
  66. package/dist-es/commands/GenerateUploadUrlCommand.js +1 -1
  67. package/dist-es/commands/GetMatchCommand.js +1 -1
  68. package/dist-es/commands/GetMyProfileCommand.js +1 -1
  69. package/dist-es/commands/GetPreferencesCommand.js +1 -1
  70. package/dist-es/commands/GetProfileCommand.js +1 -1
  71. package/dist-es/commands/GetStateCommand.js +1 -1
  72. package/dist-es/commands/GetUserByEmailCommand.js +1 -1
  73. package/dist-es/commands/GetUserCommand.js +1 -1
  74. package/dist-es/commands/IndexLocationCommand.js +1 -1
  75. package/dist-es/commands/InitUserCommand.js +1 -1
  76. package/dist-es/commands/LinkEmailCommand.js +1 -1
  77. package/dist-es/commands/LinkSocialCommand.js +1 -1
  78. package/dist-es/commands/RegisterPhoneCommand.js +1 -1
  79. package/dist-es/commands/RemoveLocationCommand.js +1 -1
  80. package/dist-es/commands/RequestEmailOtpCommand.js +1 -1
  81. package/dist-es/commands/RequestPhoneOtpCommand.js +1 -1
  82. package/dist-es/commands/RequestPhoneUpdateOtpCommand.js +1 -1
  83. package/dist-es/commands/SwipeCommand.js +1 -1
  84. package/dist-es/commands/UnhookCommand.js +1 -1
  85. package/dist-es/commands/UnlinkSocialCommand.js +1 -1
  86. package/dist-es/commands/UpdateEntitlementsCommand.js +1 -1
  87. package/dist-es/commands/UpdatePhoneNumberCommand.js +1 -1
  88. package/dist-es/commands/UpdatePreferencesCommand.js +1 -1
  89. package/dist-es/commands/UpdateProfileCommand.js +1 -1
  90. package/dist-es/commands/UpgradeUserCommand.js +1 -1
  91. package/dist-es/commands/UploadPreKeysCommand.js +1 -1
  92. package/dist-es/commands/ValidateInviteCommand.js +1 -1
  93. package/dist-es/endpoints.js +228 -0
  94. package/dist-es/index.js +3 -3
  95. package/dist-es/models/{OneHookServiceServiceException.js → OneHookServiceException.js} +2 -2
  96. package/dist-es/models/models_0.js +13 -9
  97. package/dist-es/protocols/Aws_restJson1.js +1 -1
  98. package/dist-es/runtimeConfig.browser.js +7 -1
  99. package/dist-es/runtimeConfig.js +13 -4
  100. package/dist-es/runtimeConfig.shared.js +9 -6
  101. package/dist-es/runtimeExtensions.js +3 -12
  102. package/dist-types/{OneHookService.d.ts → OneHook.d.ts} +3 -3
  103. package/dist-types/{OneHookServiceClient.d.ts → OneHookClient.d.ts} +58 -12
  104. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +8 -5
  105. package/dist-types/auth/httpAuthSchemeProvider.d.ts +13 -11
  106. package/dist-types/commands/AuthSocialCommand.d.ts +11 -10
  107. package/dist-types/commands/ClaimPreKeyBundleCommand.d.ts +11 -10
  108. package/dist-types/commands/CompleteLivenessSessionCommand.d.ts +11 -10
  109. package/dist-types/commands/CompleteOnboardingCommand.d.ts +11 -10
  110. package/dist-types/commands/CreateLivenessSessionCommand.d.ts +11 -10
  111. package/dist-types/commands/DeleteMatchMessagesCommand.d.ts +11 -10
  112. package/dist-types/commands/DeleteProfileCommand.d.ts +11 -10
  113. package/dist-types/commands/DiscoverCommand.d.ts +11 -10
  114. package/dist-types/commands/GenerateInviteCommand.d.ts +11 -10
  115. package/dist-types/commands/GenerateUploadUrlCommand.d.ts +11 -10
  116. package/dist-types/commands/GetMatchCommand.d.ts +11 -10
  117. package/dist-types/commands/GetMyProfileCommand.d.ts +11 -10
  118. package/dist-types/commands/GetPreferencesCommand.d.ts +11 -10
  119. package/dist-types/commands/GetProfileCommand.d.ts +11 -10
  120. package/dist-types/commands/GetStateCommand.d.ts +11 -10
  121. package/dist-types/commands/GetUserByEmailCommand.d.ts +11 -10
  122. package/dist-types/commands/GetUserCommand.d.ts +11 -10
  123. package/dist-types/commands/IndexLocationCommand.d.ts +11 -10
  124. package/dist-types/commands/InitUserCommand.d.ts +11 -10
  125. package/dist-types/commands/LinkEmailCommand.d.ts +11 -10
  126. package/dist-types/commands/LinkSocialCommand.d.ts +11 -10
  127. package/dist-types/commands/RegisterPhoneCommand.d.ts +11 -10
  128. package/dist-types/commands/RemoveLocationCommand.d.ts +11 -10
  129. package/dist-types/commands/RequestEmailOtpCommand.d.ts +11 -10
  130. package/dist-types/commands/RequestPhoneOtpCommand.d.ts +11 -10
  131. package/dist-types/commands/RequestPhoneUpdateOtpCommand.d.ts +11 -10
  132. package/dist-types/commands/SwipeCommand.d.ts +11 -10
  133. package/dist-types/commands/UnhookCommand.d.ts +11 -10
  134. package/dist-types/commands/UnlinkSocialCommand.d.ts +11 -10
  135. package/dist-types/commands/UpdateEntitlementsCommand.d.ts +11 -10
  136. package/dist-types/commands/UpdatePhoneNumberCommand.d.ts +11 -10
  137. package/dist-types/commands/UpdatePreferencesCommand.d.ts +11 -10
  138. package/dist-types/commands/UpdateProfileCommand.d.ts +11 -10
  139. package/dist-types/commands/UpgradeUserCommand.d.ts +11 -10
  140. package/dist-types/commands/UploadPreKeysCommand.d.ts +11 -10
  141. package/dist-types/commands/ValidateInviteCommand.d.ts +11 -10
  142. package/dist-types/endpoints.d.ts +2 -0
  143. package/dist-types/extensionConfiguration.d.ts +2 -1
  144. package/dist-types/index.d.ts +4 -4
  145. package/dist-types/models/{OneHookServiceServiceException.d.ts → OneHookServiceException.d.ts} +2 -2
  146. package/dist-types/models/models_0.d.ts +5 -1
  147. package/dist-types/runtimeConfig.browser.d.ts +28 -13
  148. package/dist-types/runtimeConfig.d.ts +28 -13
  149. package/dist-types/runtimeConfig.native.d.ts +28 -13
  150. package/dist-types/runtimeConfig.shared.d.ts +6 -10
  151. package/dist-types/runtimeExtensions.d.ts +2 -2
  152. package/package.json +55 -37
package/README.md ADDED
@@ -0,0 +1,451 @@
1
+ <!-- generated file, do not edit directly -->
2
+
3
+ # onehook-api-client
4
+
5
+ ## Description
6
+
7
+ AWS SDK for JavaScript OneHook Client for Node.js, Browser and React Native.
8
+
9
+ ## Installing
10
+ To install this package, simply type add or install onehook-api-client
11
+ using your favorite package manager:
12
+ - `npm install onehook-api-client`
13
+ - `yarn add onehook-api-client`
14
+ - `pnpm add onehook-api-client`
15
+
16
+ ## Getting Started
17
+
18
+ ### Import
19
+
20
+ The AWS SDK is modulized by clients and commands.
21
+ To send a request, you only need to import the `OneHookClient` and
22
+ the commands you need, for example `GetUserCommand`:
23
+
24
+ ```js
25
+ // ES5 example
26
+ const { OneHookClient, GetUserCommand } = require("onehook-api-client");
27
+ ```
28
+
29
+ ```ts
30
+ // ES6+ example
31
+ import { OneHookClient, GetUserCommand } from "onehook-api-client";
32
+ ```
33
+
34
+ ### Usage
35
+
36
+ To send a request, you:
37
+
38
+ - Initiate client with configuration (e.g. credentials, region).
39
+ - Initiate command with input parameters.
40
+ - Call `send` operation on client with command object as input.
41
+ - If you are using a custom http handler, you may call `destroy()` to close open connections.
42
+
43
+ ```js
44
+ // a client can be shared by different commands.
45
+ const client = new OneHookClient({ region: "REGION" });
46
+
47
+ const params = { /** input parameters */ };
48
+ const command = new GetUserCommand(params);
49
+ ```
50
+
51
+ #### Async/await
52
+
53
+ We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
54
+ operator to wait for the promise returned by send operation as follows:
55
+
56
+ ```js
57
+ // async/await.
58
+ try {
59
+ const data = await client.send(command);
60
+ // process data.
61
+ } catch (error) {
62
+ // error handling.
63
+ } finally {
64
+ // finally.
65
+ }
66
+ ```
67
+
68
+ Async-await is clean, concise, intuitive, easy to debug and has better error handling
69
+ as compared to using Promise chains or callbacks.
70
+
71
+ #### Promises
72
+
73
+ You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
74
+ to execute send operation.
75
+
76
+ ```js
77
+ client.send(command).then(
78
+ (data) => {
79
+ // process data.
80
+ },
81
+ (error) => {
82
+ // error handling.
83
+ }
84
+ );
85
+ ```
86
+
87
+ Promises can also be called using `.catch()` and `.finally()` as follows:
88
+
89
+ ```js
90
+ client
91
+ .send(command)
92
+ .then((data) => {
93
+ // process data.
94
+ })
95
+ .catch((error) => {
96
+ // error handling.
97
+ })
98
+ .finally(() => {
99
+ // finally.
100
+ });
101
+ ```
102
+
103
+ #### Callbacks
104
+
105
+ We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
106
+ but they are supported by the send operation.
107
+
108
+ ```js
109
+ // callbacks.
110
+ client.send(command, (err, data) => {
111
+ // process err and data.
112
+ });
113
+ ```
114
+
115
+ #### v2 compatible style
116
+
117
+ The client can also send requests using v2 compatible style.
118
+ However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post
119
+ on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)
120
+
121
+ ```ts
122
+ import * as AWS from "onehook-api-client";
123
+ const client = new AWS.OneHook({ region: "REGION" });
124
+
125
+ // async/await.
126
+ try {
127
+ const data = await client.getUser(params);
128
+ // process data.
129
+ } catch (error) {
130
+ // error handling.
131
+ }
132
+
133
+ // Promises.
134
+ client
135
+ .getUser(params)
136
+ .then((data) => {
137
+ // process data.
138
+ })
139
+ .catch((error) => {
140
+ // error handling.
141
+ });
142
+
143
+ // callbacks.
144
+ client.getUser(params, (err, data) => {
145
+ // process err and data.
146
+ });
147
+ ```
148
+
149
+ ### Troubleshooting
150
+
151
+ When the service returns an exception, the error will include the exception information,
152
+ as well as response metadata (e.g. request id).
153
+
154
+ ```js
155
+ try {
156
+ const data = await client.send(command);
157
+ // process data.
158
+ } catch (error) {
159
+ const { requestId, cfId, extendedRequestId } = error.$metadata;
160
+ console.log({ requestId, cfId, extendedRequestId });
161
+ /**
162
+ * The keys within exceptions are also parsed.
163
+ * You can access them by specifying exception names:
164
+ * if (error.name === 'SomeServiceException') {
165
+ * const value = error.specialKeyInException;
166
+ * }
167
+ */
168
+ }
169
+ ```
170
+
171
+ ## Getting Help
172
+
173
+ Please use these community resources for getting help.
174
+ We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
175
+
176
+ - Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
177
+ or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
178
+ - Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
179
+ on AWS Developer Blog.
180
+ - Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`.
181
+ - Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3).
182
+ - If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose).
183
+
184
+ To test your universal JavaScript code in Node.js, browser and react-native environments,
185
+ visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests).
186
+
187
+ ## Contributing
188
+
189
+ This client code is generated automatically. Any modifications will be overwritten the next time the `onehook-api-client` package is updated.
190
+ To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients).
191
+
192
+ ## License
193
+
194
+ This SDK is distributed under the
195
+ [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
196
+ see LICENSE for more information.
197
+
198
+ ## Client Commands (Operations List)
199
+
200
+ <details>
201
+ <summary>
202
+ ClaimPreKeyBundle
203
+ </summary>
204
+
205
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/ClaimPreKeyBundleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/ClaimPreKeyBundleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/ClaimPreKeyBundleCommandOutput/)
206
+ </details>
207
+ <details>
208
+ <summary>
209
+ DeleteMatchMessages
210
+ </summary>
211
+
212
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/DeleteMatchMessagesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/DeleteMatchMessagesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/DeleteMatchMessagesCommandOutput/)
213
+ </details>
214
+ <details>
215
+ <summary>
216
+ UploadPreKeys
217
+ </summary>
218
+
219
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UploadPreKeysCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UploadPreKeysCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UploadPreKeysCommandOutput/)
220
+ </details>
221
+ <details>
222
+ <summary>
223
+ AuthSocial
224
+ </summary>
225
+
226
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/AuthSocialCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/AuthSocialCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/AuthSocialCommandOutput/)
227
+ </details>
228
+ <details>
229
+ <summary>
230
+ GenerateInvite
231
+ </summary>
232
+
233
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GenerateInviteCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GenerateInviteCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GenerateInviteCommandOutput/)
234
+ </details>
235
+ <details>
236
+ <summary>
237
+ GetUser
238
+ </summary>
239
+
240
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetUserCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetUserCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetUserCommandOutput/)
241
+ </details>
242
+ <details>
243
+ <summary>
244
+ GetUserByEmail
245
+ </summary>
246
+
247
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetUserByEmailCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetUserByEmailCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetUserByEmailCommandOutput/)
248
+ </details>
249
+ <details>
250
+ <summary>
251
+ LinkEmail
252
+ </summary>
253
+
254
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/LinkEmailCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/LinkEmailCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/LinkEmailCommandOutput/)
255
+ </details>
256
+ <details>
257
+ <summary>
258
+ LinkSocial
259
+ </summary>
260
+
261
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/LinkSocialCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/LinkSocialCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/LinkSocialCommandOutput/)
262
+ </details>
263
+ <details>
264
+ <summary>
265
+ RegisterPhone
266
+ </summary>
267
+
268
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/RegisterPhoneCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RegisterPhoneCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RegisterPhoneCommandOutput/)
269
+ </details>
270
+ <details>
271
+ <summary>
272
+ RequestEmailOtp
273
+ </summary>
274
+
275
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/RequestEmailOtpCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RequestEmailOtpCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RequestEmailOtpCommandOutput/)
276
+ </details>
277
+ <details>
278
+ <summary>
279
+ RequestPhoneOtp
280
+ </summary>
281
+
282
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/RequestPhoneOtpCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RequestPhoneOtpCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RequestPhoneOtpCommandOutput/)
283
+ </details>
284
+ <details>
285
+ <summary>
286
+ RequestPhoneUpdateOtp
287
+ </summary>
288
+
289
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/RequestPhoneUpdateOtpCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RequestPhoneUpdateOtpCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RequestPhoneUpdateOtpCommandOutput/)
290
+ </details>
291
+ <details>
292
+ <summary>
293
+ UnlinkSocial
294
+ </summary>
295
+
296
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UnlinkSocialCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UnlinkSocialCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UnlinkSocialCommandOutput/)
297
+ </details>
298
+ <details>
299
+ <summary>
300
+ UpdateEntitlements
301
+ </summary>
302
+
303
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UpdateEntitlementsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdateEntitlementsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdateEntitlementsCommandOutput/)
304
+ </details>
305
+ <details>
306
+ <summary>
307
+ UpdatePhoneNumber
308
+ </summary>
309
+
310
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UpdatePhoneNumberCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdatePhoneNumberCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdatePhoneNumberCommandOutput/)
311
+ </details>
312
+ <details>
313
+ <summary>
314
+ ValidateInvite
315
+ </summary>
316
+
317
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/ValidateInviteCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/ValidateInviteCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/ValidateInviteCommandOutput/)
318
+ </details>
319
+ <details>
320
+ <summary>
321
+ Discover
322
+ </summary>
323
+
324
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/DiscoverCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/DiscoverCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/DiscoverCommandOutput/)
325
+ </details>
326
+ <details>
327
+ <summary>
328
+ GetPreferences
329
+ </summary>
330
+
331
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetPreferencesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetPreferencesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetPreferencesCommandOutput/)
332
+ </details>
333
+ <details>
334
+ <summary>
335
+ IndexLocation
336
+ </summary>
337
+
338
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/IndexLocationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/IndexLocationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/IndexLocationCommandOutput/)
339
+ </details>
340
+ <details>
341
+ <summary>
342
+ RemoveLocation
343
+ </summary>
344
+
345
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/RemoveLocationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RemoveLocationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/RemoveLocationCommandOutput/)
346
+ </details>
347
+ <details>
348
+ <summary>
349
+ Swipe
350
+ </summary>
351
+
352
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/SwipeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/SwipeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/SwipeCommandOutput/)
353
+ </details>
354
+ <details>
355
+ <summary>
356
+ UpdatePreferences
357
+ </summary>
358
+
359
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UpdatePreferencesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdatePreferencesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdatePreferencesCommandOutput/)
360
+ </details>
361
+ <details>
362
+ <summary>
363
+ CompleteLivenessSession
364
+ </summary>
365
+
366
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/CompleteLivenessSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/CompleteLivenessSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/CompleteLivenessSessionCommandOutput/)
367
+ </details>
368
+ <details>
369
+ <summary>
370
+ CreateLivenessSession
371
+ </summary>
372
+
373
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/CreateLivenessSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/CreateLivenessSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/CreateLivenessSessionCommandOutput/)
374
+ </details>
375
+ <details>
376
+ <summary>
377
+ DeleteProfile
378
+ </summary>
379
+
380
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/DeleteProfileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/DeleteProfileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/DeleteProfileCommandOutput/)
381
+ </details>
382
+ <details>
383
+ <summary>
384
+ GenerateUploadUrl
385
+ </summary>
386
+
387
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GenerateUploadUrlCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GenerateUploadUrlCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GenerateUploadUrlCommandOutput/)
388
+ </details>
389
+ <details>
390
+ <summary>
391
+ GetMyProfile
392
+ </summary>
393
+
394
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetMyProfileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetMyProfileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetMyProfileCommandOutput/)
395
+ </details>
396
+ <details>
397
+ <summary>
398
+ GetProfile
399
+ </summary>
400
+
401
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetProfileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetProfileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetProfileCommandOutput/)
402
+ </details>
403
+ <details>
404
+ <summary>
405
+ UpdateProfile
406
+ </summary>
407
+
408
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UpdateProfileCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdateProfileCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpdateProfileCommandOutput/)
409
+ </details>
410
+ <details>
411
+ <summary>
412
+ CompleteOnboarding
413
+ </summary>
414
+
415
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/CompleteOnboardingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/CompleteOnboardingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/CompleteOnboardingCommandOutput/)
416
+ </details>
417
+ <details>
418
+ <summary>
419
+ GetMatch
420
+ </summary>
421
+
422
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetMatchCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetMatchCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetMatchCommandOutput/)
423
+ </details>
424
+ <details>
425
+ <summary>
426
+ GetState
427
+ </summary>
428
+
429
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/GetStateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetStateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/GetStateCommandOutput/)
430
+ </details>
431
+ <details>
432
+ <summary>
433
+ InitUser
434
+ </summary>
435
+
436
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/InitUserCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/InitUserCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/InitUserCommandOutput/)
437
+ </details>
438
+ <details>
439
+ <summary>
440
+ Unhook
441
+ </summary>
442
+
443
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UnhookCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UnhookCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UnhookCommandOutput/)
444
+ </details>
445
+ <details>
446
+ <summary>
447
+ UpgradeUser
448
+ </summary>
449
+
450
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/onehook/command/UpgradeUserCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpgradeUserCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-onehook/Interface/UpgradeUserCommandOutput/)
451
+ </details>
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OneHookService = void 0;
4
- const OneHookServiceClient_1 = require("./OneHookServiceClient");
3
+ exports.OneHook = void 0;
4
+ const OneHookClient_1 = require("./OneHookClient");
5
5
  const AuthSocialCommand_1 = require("./commands/AuthSocialCommand");
6
6
  const ClaimPreKeyBundleCommand_1 = require("./commands/ClaimPreKeyBundleCommand");
7
7
  const CompleteLivenessSessionCommand_1 = require("./commands/CompleteLivenessSessionCommand");
@@ -77,7 +77,7 @@ const commands = {
77
77
  UnhookCommand: UnhookCommand_1.UnhookCommand,
78
78
  UpgradeUserCommand: UpgradeUserCommand_1.UpgradeUserCommand,
79
79
  };
80
- class OneHookService extends OneHookServiceClient_1.OneHookServiceClient {
80
+ class OneHook extends OneHookClient_1.OneHookClient {
81
81
  }
82
- exports.OneHookService = OneHookService;
83
- (0, smithy_client_1.createAggregatedClient)(commands, OneHookService);
82
+ exports.OneHook = OneHook;
83
+ (0, smithy_client_1.createAggregatedClient)(commands, OneHook);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OneHookServiceClient = exports.__Client = void 0;
3
+ exports.OneHookClient = exports.__Client = void 0;
4
4
  const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
5
5
  const runtimeConfig_1 = require("./runtimeConfig");
6
6
  const runtimeExtensions_1 = require("./runtimeExtensions");
@@ -14,17 +14,20 @@ const middleware_content_length_1 = require("@smithy/middleware-content-length")
14
14
  const middleware_retry_1 = require("@smithy/middleware-retry");
15
15
  const smithy_client_1 = require("@smithy/smithy-client");
16
16
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
17
- class OneHookServiceClient extends smithy_client_1.Client {
17
+ class OneHookClient extends smithy_client_1.Client {
18
+ config;
18
19
  constructor(...[configuration]) {
19
20
  let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
20
- let _config_1 = (0, config_resolver_1.resolveCustomEndpointsConfig)(_config_0);
21
- let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
21
+ super(_config_0);
22
+ this.initConfig = _config_0;
23
+ let _config_1 = (0, middleware_retry_1.resolveRetryConfig)(_config_0);
24
+ let _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
22
25
  let _config_3 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_2);
23
- let _config_4 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_3);
24
- let _config_5 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_4);
25
- let _config_6 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_5, configuration?.extensions || []);
26
- super(_config_6);
27
- this.config = _config_6;
26
+ let _config_4 = (0, config_resolver_1.resolveEndpointsConfig)(_config_3);
27
+ let _config_5 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_4);
28
+ let _config_6 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_5);
29
+ let _config_7 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_6, configuration?.extensions || []);
30
+ this.config = _config_7;
28
31
  this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
29
32
  this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
30
33
  this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
@@ -33,11 +36,13 @@ class OneHookServiceClient extends smithy_client_1.Client {
33
36
  this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
34
37
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
35
38
  this.middlewareStack.use((0, core_1.getHttpAuthSchemePlugin)(this.config, {
36
- httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultOneHookServiceHttpAuthSchemeParametersProvider, identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({}),
39
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultOneHookHttpAuthSchemeParametersProvider, identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
40
+ "aws.auth#sigv4": config.credentials,
41
+ }),
37
42
  }));
38
43
  }
39
44
  destroy() {
40
45
  super.destroy();
41
46
  }
42
47
  }
43
- exports.OneHookServiceClient = OneHookServiceClient;
48
+ exports.OneHookClient = OneHookClient;
@@ -4,6 +4,7 @@ exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration
4
4
  const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
5
5
  let _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
6
6
  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
7
+ let _credentials = runtimeConfig.credentials;
7
8
  return {
8
9
  setHttpAuthScheme(httpAuthScheme) {
9
10
  const index = _httpAuthSchemes.findIndex(scheme => scheme.schemeId === httpAuthScheme.schemeId);
@@ -23,6 +24,12 @@ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
23
24
  httpAuthSchemeProvider() {
24
25
  return _httpAuthSchemeProvider;
25
26
  },
27
+ setCredentials(credentials) {
28
+ _credentials = credentials;
29
+ },
30
+ credentials() {
31
+ return _credentials;
32
+ },
26
33
  };
27
34
  };
28
35
  exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
@@ -30,6 +37,7 @@ const resolveHttpAuthRuntimeConfig = (config) => {
30
37
  return {
31
38
  httpAuthSchemes: config.httpAuthSchemes(),
32
39
  httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
40
+ credentials: config.credentials(),
33
41
  };
34
42
  };
35
43
  exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
@@ -1,35 +1,48 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveHttpAuthSchemeConfig = exports.defaultOneHookServiceHttpAuthSchemeProvider = exports.defaultOneHookServiceHttpAuthSchemeParametersProvider = void 0;
3
+ exports.resolveHttpAuthSchemeConfig = exports.defaultOneHookHttpAuthSchemeProvider = exports.defaultOneHookHttpAuthSchemeParametersProvider = void 0;
4
+ const core_1 = require("@aws-sdk/core");
4
5
  const util_middleware_1 = require("@smithy/util-middleware");
5
- const defaultOneHookServiceHttpAuthSchemeParametersProvider = async (config, context, input) => {
6
+ const defaultOneHookHttpAuthSchemeParametersProvider = async (config, context, input) => {
6
7
  return {
7
8
  operation: (0, util_middleware_1.getSmithyContext)(context).operation,
9
+ region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
10
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
11
+ })(),
8
12
  };
9
13
  };
10
- exports.defaultOneHookServiceHttpAuthSchemeParametersProvider = defaultOneHookServiceHttpAuthSchemeParametersProvider;
11
- function createSmithyApiNoAuthHttpAuthOption(authParameters) {
14
+ exports.defaultOneHookHttpAuthSchemeParametersProvider = defaultOneHookHttpAuthSchemeParametersProvider;
15
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
12
16
  return {
13
- schemeId: "smithy.api#noAuth",
17
+ schemeId: "aws.auth#sigv4",
18
+ signingProperties: {
19
+ name: "onehook",
20
+ region: authParameters.region,
21
+ },
22
+ propertiesExtractor: (config, context) => ({
23
+ signingProperties: {
24
+ config,
25
+ context,
26
+ },
27
+ }),
14
28
  };
15
29
  }
16
30
  ;
17
- const defaultOneHookServiceHttpAuthSchemeProvider = (authParameters) => {
31
+ const defaultOneHookHttpAuthSchemeProvider = (authParameters) => {
18
32
  const options = [];
19
33
  switch (authParameters.operation) {
20
34
  default:
21
35
  {
22
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
36
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
23
37
  }
24
38
  ;
25
39
  }
26
40
  ;
27
41
  return options;
28
42
  };
29
- exports.defaultOneHookServiceHttpAuthSchemeProvider = defaultOneHookServiceHttpAuthSchemeProvider;
43
+ exports.defaultOneHookHttpAuthSchemeProvider = defaultOneHookHttpAuthSchemeProvider;
30
44
  const resolveHttpAuthSchemeConfig = (config) => {
31
- return {
32
- ...config,
33
- };
45
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
46
+ return Object.assign(config_0, {});
34
47
  };
35
48
  exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
@@ -12,7 +12,7 @@ class AuthSocialCommand extends smithy_client_1.Command.classBuilder()
12
12
  ];
13
13
  })
14
14
  .s("OneHookService", "AuthSocial", {})
15
- .n("OneHookServiceClient", "AuthSocialCommand")
15
+ .n("OneHookClient", "AuthSocialCommand")
16
16
  .f(void 0, void 0)
17
17
  .ser(Aws_restJson1_1.se_AuthSocialCommand)
18
18
  .de(Aws_restJson1_1.de_AuthSocialCommand)
@@ -12,7 +12,7 @@ class ClaimPreKeyBundleCommand extends smithy_client_1.Command.classBuilder()
12
12
  ];
13
13
  })
14
14
  .s("OneHookService", "ClaimPreKeyBundle", {})
15
- .n("OneHookServiceClient", "ClaimPreKeyBundleCommand")
15
+ .n("OneHookClient", "ClaimPreKeyBundleCommand")
16
16
  .f(void 0, void 0)
17
17
  .ser(Aws_restJson1_1.se_ClaimPreKeyBundleCommand)
18
18
  .de(Aws_restJson1_1.de_ClaimPreKeyBundleCommand)
@@ -12,7 +12,7 @@ class CompleteLivenessSessionCommand extends smithy_client_1.Command.classBuilde
12
12
  ];
13
13
  })
14
14
  .s("OneHookService", "CompleteLivenessSession", {})
15
- .n("OneHookServiceClient", "CompleteLivenessSessionCommand")
15
+ .n("OneHookClient", "CompleteLivenessSessionCommand")
16
16
  .f(void 0, void 0)
17
17
  .ser(Aws_restJson1_1.se_CompleteLivenessSessionCommand)
18
18
  .de(Aws_restJson1_1.de_CompleteLivenessSessionCommand)