onehook-api-client 1.0.0 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +451 -0
- package/dist-cjs/{OneHookService.js → OneHook.js} +5 -5
- package/dist-cjs/{OneHookServiceClient.js → OneHookClient.js} +16 -11
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +8 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +24 -11
- package/dist-cjs/commands/AuthSocialCommand.js +1 -1
- package/dist-cjs/commands/ClaimPreKeyBundleCommand.js +1 -1
- package/dist-cjs/commands/CompleteLivenessSessionCommand.js +1 -1
- package/dist-cjs/commands/CompleteOnboardingCommand.js +1 -1
- package/dist-cjs/commands/CreateLivenessSessionCommand.js +1 -1
- package/dist-cjs/commands/DeleteMatchMessagesCommand.js +1 -1
- package/dist-cjs/commands/DeleteProfileCommand.js +1 -1
- package/dist-cjs/commands/DiscoverCommand.js +1 -1
- package/dist-cjs/commands/GenerateInviteCommand.js +1 -1
- package/dist-cjs/commands/GenerateUploadUrlCommand.js +1 -1
- package/dist-cjs/commands/GetMatchCommand.js +1 -1
- package/dist-cjs/commands/GetMyProfileCommand.js +1 -1
- package/dist-cjs/commands/GetPreferencesCommand.js +1 -1
- package/dist-cjs/commands/GetProfileCommand.js +1 -1
- package/dist-cjs/commands/GetStateCommand.js +1 -1
- package/dist-cjs/commands/GetUserByEmailCommand.js +1 -1
- package/dist-cjs/commands/GetUserCommand.js +1 -1
- package/dist-cjs/commands/IndexLocationCommand.js +1 -1
- package/dist-cjs/commands/InitUserCommand.js +1 -1
- package/dist-cjs/commands/LinkEmailCommand.js +1 -1
- package/dist-cjs/commands/LinkSocialCommand.js +1 -1
- package/dist-cjs/commands/RegisterPhoneCommand.js +1 -1
- package/dist-cjs/commands/RemoveLocationCommand.js +1 -1
- package/dist-cjs/commands/RequestEmailOtpCommand.js +1 -1
- package/dist-cjs/commands/RequestPhoneOtpCommand.js +1 -1
- package/dist-cjs/commands/RequestPhoneUpdateOtpCommand.js +1 -1
- package/dist-cjs/commands/SwipeCommand.js +1 -1
- package/dist-cjs/commands/UnhookCommand.js +1 -1
- package/dist-cjs/commands/UnlinkSocialCommand.js +1 -1
- package/dist-cjs/commands/UpdateEntitlementsCommand.js +1 -1
- package/dist-cjs/commands/UpdatePhoneNumberCommand.js +1 -1
- package/dist-cjs/commands/UpdatePreferencesCommand.js +1 -1
- package/dist-cjs/commands/UpdateProfileCommand.js +1 -1
- package/dist-cjs/commands/UpgradeUserCommand.js +1 -1
- package/dist-cjs/commands/UploadPreKeysCommand.js +1 -1
- package/dist-cjs/commands/ValidateInviteCommand.js +1 -1
- package/dist-cjs/endpoints.js +232 -0
- package/dist-cjs/graphql/types.js +1 -1
- package/dist-cjs/index.js +5 -5
- package/dist-cjs/models/{OneHookServiceServiceException.js → OneHookServiceException.js} +4 -4
- package/dist-cjs/models/models_0.js +17 -13
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-cjs/runtimeConfig.browser.js +7 -1
- package/dist-cjs/runtimeConfig.js +13 -4
- package/dist-cjs/runtimeConfig.shared.js +8 -5
- package/dist-cjs/runtimeExtensions.js +3 -12
- package/dist-es/{OneHookService.js → OneHook.js} +3 -3
- package/dist-es/{OneHookServiceClient.js → OneHookClient.js} +16 -11
- package/dist-es/auth/httpAuthExtensionConfiguration.js +8 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +22 -9
- package/dist-es/commands/AuthSocialCommand.js +1 -1
- package/dist-es/commands/ClaimPreKeyBundleCommand.js +1 -1
- package/dist-es/commands/CompleteLivenessSessionCommand.js +1 -1
- package/dist-es/commands/CompleteOnboardingCommand.js +1 -1
- package/dist-es/commands/CreateLivenessSessionCommand.js +1 -1
- package/dist-es/commands/DeleteMatchMessagesCommand.js +1 -1
- package/dist-es/commands/DeleteProfileCommand.js +1 -1
- package/dist-es/commands/DiscoverCommand.js +1 -1
- package/dist-es/commands/GenerateInviteCommand.js +1 -1
- package/dist-es/commands/GenerateUploadUrlCommand.js +1 -1
- package/dist-es/commands/GetMatchCommand.js +1 -1
- package/dist-es/commands/GetMyProfileCommand.js +1 -1
- package/dist-es/commands/GetPreferencesCommand.js +1 -1
- package/dist-es/commands/GetProfileCommand.js +1 -1
- package/dist-es/commands/GetStateCommand.js +1 -1
- package/dist-es/commands/GetUserByEmailCommand.js +1 -1
- package/dist-es/commands/GetUserCommand.js +1 -1
- package/dist-es/commands/IndexLocationCommand.js +1 -1
- package/dist-es/commands/InitUserCommand.js +1 -1
- package/dist-es/commands/LinkEmailCommand.js +1 -1
- package/dist-es/commands/LinkSocialCommand.js +1 -1
- package/dist-es/commands/RegisterPhoneCommand.js +1 -1
- package/dist-es/commands/RemoveLocationCommand.js +1 -1
- package/dist-es/commands/RequestEmailOtpCommand.js +1 -1
- package/dist-es/commands/RequestPhoneOtpCommand.js +1 -1
- package/dist-es/commands/RequestPhoneUpdateOtpCommand.js +1 -1
- package/dist-es/commands/SwipeCommand.js +1 -1
- package/dist-es/commands/UnhookCommand.js +1 -1
- package/dist-es/commands/UnlinkSocialCommand.js +1 -1
- package/dist-es/commands/UpdateEntitlementsCommand.js +1 -1
- package/dist-es/commands/UpdatePhoneNumberCommand.js +1 -1
- package/dist-es/commands/UpdatePreferencesCommand.js +1 -1
- package/dist-es/commands/UpdateProfileCommand.js +1 -1
- package/dist-es/commands/UpgradeUserCommand.js +1 -1
- package/dist-es/commands/UploadPreKeysCommand.js +1 -1
- package/dist-es/commands/ValidateInviteCommand.js +1 -1
- package/dist-es/endpoints.js +228 -0
- package/dist-es/index.js +3 -3
- package/dist-es/models/{OneHookServiceServiceException.js → OneHookServiceException.js} +2 -2
- package/dist-es/models/models_0.js +13 -9
- package/dist-es/protocols/Aws_restJson1.js +1 -1
- package/dist-es/runtimeConfig.browser.js +7 -1
- package/dist-es/runtimeConfig.js +13 -4
- package/dist-es/runtimeConfig.shared.js +9 -6
- package/dist-es/runtimeExtensions.js +3 -12
- package/dist-types/{OneHookService.d.ts → OneHook.d.ts} +3 -3
- package/dist-types/{OneHookServiceClient.d.ts → OneHookClient.d.ts} +58 -12
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +8 -5
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +13 -11
- package/dist-types/commands/AuthSocialCommand.d.ts +11 -10
- package/dist-types/commands/ClaimPreKeyBundleCommand.d.ts +11 -10
- package/dist-types/commands/CompleteLivenessSessionCommand.d.ts +11 -10
- package/dist-types/commands/CompleteOnboardingCommand.d.ts +11 -10
- package/dist-types/commands/CreateLivenessSessionCommand.d.ts +11 -10
- package/dist-types/commands/DeleteMatchMessagesCommand.d.ts +11 -10
- package/dist-types/commands/DeleteProfileCommand.d.ts +11 -10
- package/dist-types/commands/DiscoverCommand.d.ts +11 -10
- package/dist-types/commands/GenerateInviteCommand.d.ts +11 -10
- package/dist-types/commands/GenerateUploadUrlCommand.d.ts +11 -10
- package/dist-types/commands/GetMatchCommand.d.ts +11 -10
- package/dist-types/commands/GetMyProfileCommand.d.ts +11 -10
- package/dist-types/commands/GetPreferencesCommand.d.ts +11 -10
- package/dist-types/commands/GetProfileCommand.d.ts +11 -10
- package/dist-types/commands/GetStateCommand.d.ts +11 -10
- package/dist-types/commands/GetUserByEmailCommand.d.ts +11 -10
- package/dist-types/commands/GetUserCommand.d.ts +11 -10
- package/dist-types/commands/IndexLocationCommand.d.ts +11 -10
- package/dist-types/commands/InitUserCommand.d.ts +11 -10
- package/dist-types/commands/LinkEmailCommand.d.ts +11 -10
- package/dist-types/commands/LinkSocialCommand.d.ts +11 -10
- package/dist-types/commands/RegisterPhoneCommand.d.ts +11 -10
- package/dist-types/commands/RemoveLocationCommand.d.ts +11 -10
- package/dist-types/commands/RequestEmailOtpCommand.d.ts +11 -10
- package/dist-types/commands/RequestPhoneOtpCommand.d.ts +11 -10
- package/dist-types/commands/RequestPhoneUpdateOtpCommand.d.ts +11 -10
- package/dist-types/commands/SwipeCommand.d.ts +11 -10
- package/dist-types/commands/UnhookCommand.d.ts +11 -10
- package/dist-types/commands/UnlinkSocialCommand.d.ts +11 -10
- package/dist-types/commands/UpdateEntitlementsCommand.d.ts +11 -10
- package/dist-types/commands/UpdatePhoneNumberCommand.d.ts +11 -10
- package/dist-types/commands/UpdatePreferencesCommand.d.ts +11 -10
- package/dist-types/commands/UpdateProfileCommand.d.ts +11 -10
- package/dist-types/commands/UpgradeUserCommand.d.ts +11 -10
- package/dist-types/commands/UploadPreKeysCommand.d.ts +11 -10
- package/dist-types/commands/ValidateInviteCommand.d.ts +11 -10
- package/dist-types/endpoints.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +2 -1
- package/dist-types/index.d.ts +4 -4
- package/dist-types/models/{OneHookServiceServiceException.d.ts → OneHookServiceException.d.ts} +2 -2
- package/dist-types/models/models_0.d.ts +5 -1
- package/dist-types/runtimeConfig.browser.d.ts +28 -13
- package/dist-types/runtimeConfig.d.ts +28 -13
- package/dist-types/runtimeConfig.native.d.ts +28 -13
- package/dist-types/runtimeConfig.shared.d.ts +6 -10
- package/dist-types/runtimeExtensions.d.ts +2 -2
- package/package.json +38 -36
|
@@ -9,7 +9,7 @@ export class RequestPhoneOtpCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "RequestPhoneOtp", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "RequestPhoneOtpCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_RequestPhoneOtpCommand)
|
|
15
15
|
.de(de_RequestPhoneOtpCommand)
|
|
@@ -9,7 +9,7 @@ export class RequestPhoneUpdateOtpCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "RequestPhoneUpdateOtp", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "RequestPhoneUpdateOtpCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_RequestPhoneUpdateOtpCommand)
|
|
15
15
|
.de(de_RequestPhoneUpdateOtpCommand)
|
|
@@ -9,7 +9,7 @@ export class UnhookCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "Unhook", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "UnhookCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_UnhookCommand)
|
|
15
15
|
.de(de_UnhookCommand)
|
|
@@ -9,7 +9,7 @@ export class UnlinkSocialCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "UnlinkSocial", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "UnlinkSocialCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_UnlinkSocialCommand)
|
|
15
15
|
.de(de_UnlinkSocialCommand)
|
|
@@ -9,7 +9,7 @@ export class UpdateEntitlementsCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "UpdateEntitlements", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "UpdateEntitlementsCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_UpdateEntitlementsCommand)
|
|
15
15
|
.de(de_UpdateEntitlementsCommand)
|
|
@@ -9,7 +9,7 @@ export class UpdatePhoneNumberCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "UpdatePhoneNumber", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "UpdatePhoneNumberCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_UpdatePhoneNumberCommand)
|
|
15
15
|
.de(de_UpdatePhoneNumberCommand)
|
|
@@ -9,7 +9,7 @@ export class UpdatePreferencesCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "UpdatePreferences", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "UpdatePreferencesCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_UpdatePreferencesCommand)
|
|
15
15
|
.de(de_UpdatePreferencesCommand)
|
|
@@ -9,7 +9,7 @@ export class UpdateProfileCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "UpdateProfile", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "UpdateProfileCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_UpdateProfileCommand)
|
|
15
15
|
.de(de_UpdateProfileCommand)
|
|
@@ -9,7 +9,7 @@ export class UpgradeUserCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "UpgradeUser", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "UpgradeUserCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_UpgradeUserCommand)
|
|
15
15
|
.de(de_UpgradeUserCommand)
|
|
@@ -9,7 +9,7 @@ export class UploadPreKeysCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "UploadPreKeys", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "UploadPreKeysCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_UploadPreKeysCommand)
|
|
15
15
|
.de(de_UploadPreKeysCommand)
|
|
@@ -9,7 +9,7 @@ export class ValidateInviteCommand extends $Command.classBuilder()
|
|
|
9
9
|
];
|
|
10
10
|
})
|
|
11
11
|
.s("OneHookService", "ValidateInvite", {})
|
|
12
|
-
.n("
|
|
12
|
+
.n("OneHookClient", "ValidateInviteCommand")
|
|
13
13
|
.f(void 0, void 0)
|
|
14
14
|
.ser(se_ValidateInviteCommand)
|
|
15
15
|
.de(de_ValidateInviteCommand)
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { getRegionInfo, } from "@smithy/config-resolver";
|
|
2
|
+
const regionHash = {};
|
|
3
|
+
const partitionHash = {
|
|
4
|
+
"aws": {
|
|
5
|
+
regions: [
|
|
6
|
+
"af-south-1",
|
|
7
|
+
"ap-east-1",
|
|
8
|
+
"ap-northeast-1",
|
|
9
|
+
"ap-northeast-2",
|
|
10
|
+
"ap-northeast-3",
|
|
11
|
+
"ap-south-1",
|
|
12
|
+
"ap-south-2",
|
|
13
|
+
"ap-southeast-1",
|
|
14
|
+
"ap-southeast-2",
|
|
15
|
+
"ap-southeast-3",
|
|
16
|
+
"ap-southeast-4",
|
|
17
|
+
"ap-southeast-5",
|
|
18
|
+
"ap-southeast-7",
|
|
19
|
+
"ca-central-1",
|
|
20
|
+
"ca-west-1",
|
|
21
|
+
"eu-central-1",
|
|
22
|
+
"eu-central-2",
|
|
23
|
+
"eu-north-1",
|
|
24
|
+
"eu-south-1",
|
|
25
|
+
"eu-south-2",
|
|
26
|
+
"eu-west-1",
|
|
27
|
+
"eu-west-2",
|
|
28
|
+
"eu-west-3",
|
|
29
|
+
"il-central-1",
|
|
30
|
+
"me-central-1",
|
|
31
|
+
"me-south-1",
|
|
32
|
+
"mx-central-1",
|
|
33
|
+
"sa-east-1",
|
|
34
|
+
"us-east-1",
|
|
35
|
+
"us-east-2",
|
|
36
|
+
"us-west-1",
|
|
37
|
+
"us-west-2",
|
|
38
|
+
],
|
|
39
|
+
regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
|
|
40
|
+
variants: [
|
|
41
|
+
{
|
|
42
|
+
"hostname": "onehook.{region}.amazonaws.com",
|
|
43
|
+
"tags": []
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"hostname": "onehook-fips.{region}.amazonaws.com",
|
|
47
|
+
"tags": [
|
|
48
|
+
"fips"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"hostname": "onehook-fips.{region}.api.aws",
|
|
53
|
+
"tags": [
|
|
54
|
+
"dualstack",
|
|
55
|
+
"fips"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"hostname": "onehook.{region}.api.aws",
|
|
60
|
+
"tags": [
|
|
61
|
+
"dualstack"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
"aws-cn": {
|
|
67
|
+
regions: [
|
|
68
|
+
"cn-north-1",
|
|
69
|
+
"cn-northwest-1",
|
|
70
|
+
],
|
|
71
|
+
regionRegex: "^cn\\-\\w+\\-\\d+$",
|
|
72
|
+
variants: [
|
|
73
|
+
{
|
|
74
|
+
"hostname": "onehook.{region}.amazonaws.com.cn",
|
|
75
|
+
"tags": []
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"hostname": "onehook-fips.{region}.amazonaws.com.cn",
|
|
79
|
+
"tags": [
|
|
80
|
+
"fips"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"hostname": "onehook-fips.{region}.api.amazonwebservices.com.cn",
|
|
85
|
+
"tags": [
|
|
86
|
+
"dualstack",
|
|
87
|
+
"fips"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"hostname": "onehook.{region}.api.amazonwebservices.com.cn",
|
|
92
|
+
"tags": [
|
|
93
|
+
"dualstack"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
"aws-eusc": {
|
|
99
|
+
regions: [
|
|
100
|
+
"eusc-de-east-1",
|
|
101
|
+
],
|
|
102
|
+
regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
|
|
103
|
+
variants: [
|
|
104
|
+
{
|
|
105
|
+
"hostname": "onehook.{region}.amazonaws.eu",
|
|
106
|
+
"tags": []
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"hostname": "onehook-fips.{region}.amazonaws.eu",
|
|
110
|
+
"tags": [
|
|
111
|
+
"fips"
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
"aws-iso": {
|
|
117
|
+
regions: [
|
|
118
|
+
"us-iso-east-1",
|
|
119
|
+
"us-iso-west-1",
|
|
120
|
+
],
|
|
121
|
+
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
|
|
122
|
+
variants: [
|
|
123
|
+
{
|
|
124
|
+
"hostname": "onehook.{region}.c2s.ic.gov",
|
|
125
|
+
"tags": []
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"hostname": "onehook-fips.{region}.c2s.ic.gov",
|
|
129
|
+
"tags": [
|
|
130
|
+
"fips"
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
"aws-iso-b": {
|
|
136
|
+
regions: [
|
|
137
|
+
"us-isob-east-1",
|
|
138
|
+
],
|
|
139
|
+
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
|
|
140
|
+
variants: [
|
|
141
|
+
{
|
|
142
|
+
"hostname": "onehook.{region}.sc2s.sgov.gov",
|
|
143
|
+
"tags": []
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"hostname": "onehook-fips.{region}.sc2s.sgov.gov",
|
|
147
|
+
"tags": [
|
|
148
|
+
"fips"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
"aws-iso-e": {
|
|
154
|
+
regions: [
|
|
155
|
+
"eu-isoe-west-1",
|
|
156
|
+
],
|
|
157
|
+
regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
|
|
158
|
+
variants: [
|
|
159
|
+
{
|
|
160
|
+
"hostname": "onehook.{region}.cloud.adc-e.uk",
|
|
161
|
+
"tags": []
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"hostname": "onehook-fips.{region}.cloud.adc-e.uk",
|
|
165
|
+
"tags": [
|
|
166
|
+
"fips"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
"aws-iso-f": {
|
|
172
|
+
regions: [
|
|
173
|
+
"us-isof-east-1",
|
|
174
|
+
"us-isof-south-1",
|
|
175
|
+
],
|
|
176
|
+
regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
|
|
177
|
+
variants: [
|
|
178
|
+
{
|
|
179
|
+
"hostname": "onehook.{region}.csp.hci.ic.gov",
|
|
180
|
+
"tags": []
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"hostname": "onehook-fips.{region}.csp.hci.ic.gov",
|
|
184
|
+
"tags": [
|
|
185
|
+
"fips"
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
"aws-us-gov": {
|
|
191
|
+
regions: [
|
|
192
|
+
"us-gov-east-1",
|
|
193
|
+
"us-gov-west-1",
|
|
194
|
+
],
|
|
195
|
+
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
|
|
196
|
+
variants: [
|
|
197
|
+
{
|
|
198
|
+
"hostname": "onehook.{region}.amazonaws.com",
|
|
199
|
+
"tags": []
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"hostname": "onehook-fips.{region}.amazonaws.com",
|
|
203
|
+
"tags": [
|
|
204
|
+
"fips"
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"hostname": "onehook-fips.{region}.api.aws",
|
|
209
|
+
"tags": [
|
|
210
|
+
"dualstack",
|
|
211
|
+
"fips"
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"hostname": "onehook.{region}.api.aws",
|
|
216
|
+
"tags": [
|
|
217
|
+
"dualstack"
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
|
|
224
|
+
...options,
|
|
225
|
+
signingService: "onehook",
|
|
226
|
+
regionHash,
|
|
227
|
+
partitionHash,
|
|
228
|
+
});
|
package/dist-es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./OneHookClient";
|
|
2
|
+
export * from "./OneHook";
|
|
3
3
|
export * from "./commands";
|
|
4
4
|
export * from "./models";
|
|
5
|
-
export {
|
|
5
|
+
export { OneHookServiceException } from "./models/OneHookServiceException";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
|
|
2
2
|
export { __ServiceException };
|
|
3
|
-
export class
|
|
3
|
+
export class OneHookServiceException extends __ServiceException {
|
|
4
4
|
constructor(options) {
|
|
5
5
|
super(options);
|
|
6
|
-
Object.setPrototypeOf(this,
|
|
6
|
+
Object.setPrototypeOf(this, OneHookServiceException.prototype);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -1,52 +1,56 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OneHookServiceException as __BaseException } from "./OneHookServiceException";
|
|
2
2
|
export class ForbiddenError extends __BaseException {
|
|
3
|
+
name = "ForbiddenError";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
error;
|
|
3
6
|
constructor(opts) {
|
|
4
7
|
super({
|
|
5
8
|
name: "ForbiddenError",
|
|
6
9
|
$fault: "client",
|
|
7
10
|
...opts
|
|
8
11
|
});
|
|
9
|
-
this.name = "ForbiddenError";
|
|
10
|
-
this.$fault = "client";
|
|
11
12
|
Object.setPrototypeOf(this, ForbiddenError.prototype);
|
|
12
13
|
this.error = opts.error;
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
export class BadRequestError extends __BaseException {
|
|
17
|
+
name = "BadRequestError";
|
|
18
|
+
$fault = "client";
|
|
19
|
+
error;
|
|
16
20
|
constructor(opts) {
|
|
17
21
|
super({
|
|
18
22
|
name: "BadRequestError",
|
|
19
23
|
$fault: "client",
|
|
20
24
|
...opts
|
|
21
25
|
});
|
|
22
|
-
this.name = "BadRequestError";
|
|
23
|
-
this.$fault = "client";
|
|
24
26
|
Object.setPrototypeOf(this, BadRequestError.prototype);
|
|
25
27
|
this.error = opts.error;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
export class InternalServerError extends __BaseException {
|
|
31
|
+
name = "InternalServerError";
|
|
32
|
+
$fault = "server";
|
|
33
|
+
error;
|
|
29
34
|
constructor(opts) {
|
|
30
35
|
super({
|
|
31
36
|
name: "InternalServerError",
|
|
32
37
|
$fault: "server",
|
|
33
38
|
...opts
|
|
34
39
|
});
|
|
35
|
-
this.name = "InternalServerError";
|
|
36
|
-
this.$fault = "server";
|
|
37
40
|
Object.setPrototypeOf(this, InternalServerError.prototype);
|
|
38
41
|
this.error = opts.error;
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
export class NotFoundError extends __BaseException {
|
|
45
|
+
name = "NotFoundError";
|
|
46
|
+
$fault = "client";
|
|
47
|
+
error;
|
|
42
48
|
constructor(opts) {
|
|
43
49
|
super({
|
|
44
50
|
name: "NotFoundError",
|
|
45
51
|
$fault: "client",
|
|
46
52
|
...opts
|
|
47
53
|
});
|
|
48
|
-
this.name = "NotFoundError";
|
|
49
|
-
this.$fault = "client";
|
|
50
54
|
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
51
55
|
this.error = opts.error;
|
|
52
56
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OneHookServiceException as __BaseException } from "../models/OneHookServiceException";
|
|
2
2
|
import { BadRequestError, ForbiddenError, InternalServerError, NotFoundError, } from "../models/models_0";
|
|
3
3
|
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
3
|
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, } from "@smithy/config-resolver";
|
|
4
5
|
import { FetchHttpHandler as RequestHandler, streamCollector, } from "@smithy/fetch-http-handler";
|
|
6
|
+
import { invalidProvider } from "@smithy/invalid-dependency";
|
|
5
7
|
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
6
8
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, } from "@smithy/util-retry";
|
|
7
9
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
@@ -17,11 +19,15 @@ export const getRuntimeConfig = (config) => {
|
|
|
17
19
|
runtime: "browser",
|
|
18
20
|
defaultsMode,
|
|
19
21
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
-
|
|
22
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
23
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
21
24
|
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
25
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
22
26
|
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
23
27
|
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
24
28
|
sha256: config?.sha256 ?? Sha256,
|
|
25
29
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
31
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
26
32
|
};
|
|
27
33
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
|
+
import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
3
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
2
4
|
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider, } from "@aws-sdk/util-user-agent-node";
|
|
5
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
3
6
|
import { Hash } from "@smithy/hash-node";
|
|
4
7
|
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/middleware-retry";
|
|
5
8
|
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
@@ -15,18 +18,24 @@ export const getRuntimeConfig = (config) => {
|
|
|
15
18
|
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
19
|
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
20
|
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
21
|
+
awsCheckVersion(process.version);
|
|
22
|
+
const profileConfig = { profile: config?.profile };
|
|
18
23
|
return {
|
|
19
24
|
...clientSharedValues,
|
|
20
25
|
...config,
|
|
21
26
|
runtime: "node",
|
|
22
27
|
defaultsMode,
|
|
23
28
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
30
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
31
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
32
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
|
|
26
33
|
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
-
retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }),
|
|
34
|
+
retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }, config),
|
|
28
35
|
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
29
36
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
-
|
|
37
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
|
|
38
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
|
|
39
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
|
|
31
40
|
};
|
|
32
41
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defaultOneHookHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
2
|
+
import { defaultRegionInfoProvider } from "./endpoints";
|
|
3
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
3
4
|
import { NoOpLogger } from "@smithy/smithy-client";
|
|
4
5
|
import { parseUrl } from "@smithy/url-parser";
|
|
5
6
|
import { fromBase64, toBase64, } from "@smithy/util-base64";
|
|
@@ -11,13 +12,15 @@ export const getRuntimeConfig = (config) => {
|
|
|
11
12
|
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
12
13
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
13
14
|
extensions: config?.extensions ?? [],
|
|
14
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ??
|
|
15
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultOneHookHttpAuthSchemeProvider,
|
|
15
16
|
httpAuthSchemes: config?.httpAuthSchemes ?? [{
|
|
16
|
-
schemeId: "
|
|
17
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("
|
|
18
|
-
signer: new
|
|
17
|
+
schemeId: "aws.auth#sigv4",
|
|
18
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
19
|
+
signer: new AwsSdkSigV4Signer(),
|
|
19
20
|
}],
|
|
20
21
|
logger: config?.logger ?? new NoOpLogger(),
|
|
22
|
+
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
|
|
23
|
+
serviceId: config?.serviceId ?? "OneHook",
|
|
21
24
|
urlParser: config?.urlParser ?? parseUrl,
|
|
22
25
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
23
26
|
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig, } from "./auth/httpAuthExtensionConfiguration";
|
|
2
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
3
|
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, } from "@smithy/protocol-http";
|
|
3
4
|
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, } from "@smithy/smithy-client";
|
|
4
|
-
const asPartial = (t) => t;
|
|
5
5
|
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
-
const extensionConfiguration =
|
|
7
|
-
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
8
|
-
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
9
|
-
...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
|
|
10
|
-
};
|
|
6
|
+
const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig), getAwsRegionExtensionConfiguration(runtimeConfig));
|
|
11
7
|
extensions.forEach(extension => extension.configure(extensionConfiguration));
|
|
12
|
-
return
|
|
13
|
-
...runtimeConfig,
|
|
14
|
-
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
15
|
-
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
16
|
-
...resolveHttpAuthRuntimeConfig(extensionConfiguration),
|
|
17
|
-
};
|
|
8
|
+
return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration), resolveAwsRegionExtensionConfiguration(extensionConfiguration));
|
|
18
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OneHookClient } from "./OneHookClient";
|
|
2
2
|
import { AuthSocialCommandInput, AuthSocialCommandOutput } from "./commands/AuthSocialCommand";
|
|
3
3
|
import { ClaimPreKeyBundleCommandInput, ClaimPreKeyBundleCommandOutput } from "./commands/ClaimPreKeyBundleCommand";
|
|
4
4
|
import { CompleteLivenessSessionCommandInput, CompleteLivenessSessionCommandOutput } from "./commands/CompleteLivenessSessionCommand";
|
|
@@ -36,7 +36,7 @@ import { UpgradeUserCommandInput, UpgradeUserCommandOutput } from "./commands/Up
|
|
|
36
36
|
import { UploadPreKeysCommandInput, UploadPreKeysCommandOutput } from "./commands/UploadPreKeysCommand";
|
|
37
37
|
import { ValidateInviteCommandInput, ValidateInviteCommandOutput } from "./commands/ValidateInviteCommand";
|
|
38
38
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
39
|
-
export interface
|
|
39
|
+
export interface OneHook {
|
|
40
40
|
/**
|
|
41
41
|
* @see {@link ClaimPreKeyBundleCommand}
|
|
42
42
|
*/
|
|
@@ -263,5 +263,5 @@ export interface OneHookService {
|
|
|
263
263
|
/**
|
|
264
264
|
* @public
|
|
265
265
|
*/
|
|
266
|
-
export declare class
|
|
266
|
+
export declare class OneHook extends OneHookClient implements OneHook {
|
|
267
267
|
}
|