@aws-sdk/client-sso 3.928.0 → 3.929.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sso",
3
3
  "description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
4
- "version": "3.928.0",
4
+ "version": "3.929.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-sso",
@@ -1,210 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, map, take, withBaseException, } from "@smithy/smithy-client";
4
- import { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
5
- import { SSOServiceException as __BaseException } from "../models/SSOServiceException";
6
- export const se_GetRoleCredentialsCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = map({}, isSerializableHeaderValue, {
9
- [_xasbt]: input[_aT],
10
- });
11
- b.bp("/federation/credentials");
12
- const query = map({
13
- [_rn]: [, __expectNonNull(input[_rN], `roleName`)],
14
- [_ai]: [, __expectNonNull(input[_aI], `accountId`)],
15
- });
16
- let body;
17
- b.m("GET").h(headers).q(query).b(body);
18
- return b.build();
19
- };
20
- export const se_ListAccountRolesCommand = async (input, context) => {
21
- const b = rb(input, context);
22
- const headers = map({}, isSerializableHeaderValue, {
23
- [_xasbt]: input[_aT],
24
- });
25
- b.bp("/assignment/roles");
26
- const query = map({
27
- [_nt]: [, input[_nT]],
28
- [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
29
- [_ai]: [, __expectNonNull(input[_aI], `accountId`)],
30
- });
31
- let body;
32
- b.m("GET").h(headers).q(query).b(body);
33
- return b.build();
34
- };
35
- export const se_ListAccountsCommand = async (input, context) => {
36
- const b = rb(input, context);
37
- const headers = map({}, isSerializableHeaderValue, {
38
- [_xasbt]: input[_aT],
39
- });
40
- b.bp("/assignment/accounts");
41
- const query = map({
42
- [_nt]: [, input[_nT]],
43
- [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
44
- });
45
- let body;
46
- b.m("GET").h(headers).q(query).b(body);
47
- return b.build();
48
- };
49
- export const se_LogoutCommand = async (input, context) => {
50
- const b = rb(input, context);
51
- const headers = map({}, isSerializableHeaderValue, {
52
- [_xasbt]: input[_aT],
53
- });
54
- b.bp("/logout");
55
- let body;
56
- b.m("POST").h(headers).b(body);
57
- return b.build();
58
- };
59
- export const de_GetRoleCredentialsCommand = async (output, context) => {
60
- if (output.statusCode !== 200 && output.statusCode >= 300) {
61
- return de_CommandError(output, context);
62
- }
63
- const contents = map({
64
- $metadata: deserializeMetadata(output),
65
- });
66
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
67
- const doc = take(data, {
68
- roleCredentials: _json,
69
- });
70
- Object.assign(contents, doc);
71
- return contents;
72
- };
73
- export const de_ListAccountRolesCommand = async (output, context) => {
74
- if (output.statusCode !== 200 && output.statusCode >= 300) {
75
- return de_CommandError(output, context);
76
- }
77
- const contents = map({
78
- $metadata: deserializeMetadata(output),
79
- });
80
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
81
- const doc = take(data, {
82
- nextToken: __expectString,
83
- roleList: _json,
84
- });
85
- Object.assign(contents, doc);
86
- return contents;
87
- };
88
- export const de_ListAccountsCommand = async (output, context) => {
89
- if (output.statusCode !== 200 && output.statusCode >= 300) {
90
- return de_CommandError(output, context);
91
- }
92
- const contents = map({
93
- $metadata: deserializeMetadata(output),
94
- });
95
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
96
- const doc = take(data, {
97
- accountList: _json,
98
- nextToken: __expectString,
99
- });
100
- Object.assign(contents, doc);
101
- return contents;
102
- };
103
- export const de_LogoutCommand = async (output, context) => {
104
- if (output.statusCode !== 200 && output.statusCode >= 300) {
105
- return de_CommandError(output, context);
106
- }
107
- const contents = map({
108
- $metadata: deserializeMetadata(output),
109
- });
110
- await collectBody(output.body, context);
111
- return contents;
112
- };
113
- const de_CommandError = async (output, context) => {
114
- const parsedOutput = {
115
- ...output,
116
- body: await parseErrorBody(output.body, context),
117
- };
118
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
119
- switch (errorCode) {
120
- case "InvalidRequestException":
121
- case "com.amazonaws.sso#InvalidRequestException":
122
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
123
- case "ResourceNotFoundException":
124
- case "com.amazonaws.sso#ResourceNotFoundException":
125
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
126
- case "TooManyRequestsException":
127
- case "com.amazonaws.sso#TooManyRequestsException":
128
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
129
- case "UnauthorizedException":
130
- case "com.amazonaws.sso#UnauthorizedException":
131
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
132
- default:
133
- const parsedBody = parsedOutput.body;
134
- return throwDefaultError({
135
- output,
136
- parsedBody,
137
- errorCode,
138
- });
139
- }
140
- };
141
- const throwDefaultError = withBaseException(__BaseException);
142
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
143
- const contents = map({});
144
- const data = parsedOutput.body;
145
- const doc = take(data, {
146
- message: __expectString,
147
- });
148
- Object.assign(contents, doc);
149
- const exception = new InvalidRequestException({
150
- $metadata: deserializeMetadata(parsedOutput),
151
- ...contents,
152
- });
153
- return __decorateServiceException(exception, parsedOutput.body);
154
- };
155
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
156
- const contents = map({});
157
- const data = parsedOutput.body;
158
- const doc = take(data, {
159
- message: __expectString,
160
- });
161
- Object.assign(contents, doc);
162
- const exception = new ResourceNotFoundException({
163
- $metadata: deserializeMetadata(parsedOutput),
164
- ...contents,
165
- });
166
- return __decorateServiceException(exception, parsedOutput.body);
167
- };
168
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
169
- const contents = map({});
170
- const data = parsedOutput.body;
171
- const doc = take(data, {
172
- message: __expectString,
173
- });
174
- Object.assign(contents, doc);
175
- const exception = new TooManyRequestsException({
176
- $metadata: deserializeMetadata(parsedOutput),
177
- ...contents,
178
- });
179
- return __decorateServiceException(exception, parsedOutput.body);
180
- };
181
- const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
182
- const contents = map({});
183
- const data = parsedOutput.body;
184
- const doc = take(data, {
185
- message: __expectString,
186
- });
187
- Object.assign(contents, doc);
188
- const exception = new UnauthorizedException({
189
- $metadata: deserializeMetadata(parsedOutput),
190
- ...contents,
191
- });
192
- return __decorateServiceException(exception, parsedOutput.body);
193
- };
194
- const deserializeMetadata = (output) => ({
195
- httpStatusCode: output.statusCode,
196
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
197
- extendedRequestId: output.headers["x-amz-id-2"],
198
- cfId: output.headers["x-amz-cf-id"],
199
- });
200
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
201
- const _aI = "accountId";
202
- const _aT = "accessToken";
203
- const _ai = "account_id";
204
- const _mR = "maxResults";
205
- const _mr = "max_result";
206
- const _nT = "nextToken";
207
- const _nt = "next_token";
208
- const _rN = "roleName";
209
- const _rn = "role_name";
210
- const _xasbt = "x-amz-sso_bearer_token";
@@ -1,38 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
2
- import { SerdeContext as __SerdeContext } from "@smithy/types";
3
- import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "../commands/GetRoleCredentialsCommand";
4
- import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "../commands/ListAccountRolesCommand";
5
- import { ListAccountsCommandInput, ListAccountsCommandOutput } from "../commands/ListAccountsCommand";
6
- import { LogoutCommandInput, LogoutCommandOutput } from "../commands/LogoutCommand";
7
- /**
8
- * serializeAws_restJson1GetRoleCredentialsCommand
9
- */
10
- export declare const se_GetRoleCredentialsCommand: (input: GetRoleCredentialsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
11
- /**
12
- * serializeAws_restJson1ListAccountRolesCommand
13
- */
14
- export declare const se_ListAccountRolesCommand: (input: ListAccountRolesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
15
- /**
16
- * serializeAws_restJson1ListAccountsCommand
17
- */
18
- export declare const se_ListAccountsCommand: (input: ListAccountsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
19
- /**
20
- * serializeAws_restJson1LogoutCommand
21
- */
22
- export declare const se_LogoutCommand: (input: LogoutCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
23
- /**
24
- * deserializeAws_restJson1GetRoleCredentialsCommand
25
- */
26
- export declare const de_GetRoleCredentialsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetRoleCredentialsCommandOutput>;
27
- /**
28
- * deserializeAws_restJson1ListAccountRolesCommand
29
- */
30
- export declare const de_ListAccountRolesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListAccountRolesCommandOutput>;
31
- /**
32
- * deserializeAws_restJson1ListAccountsCommand
33
- */
34
- export declare const de_ListAccountsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListAccountsCommandOutput>;
35
- /**
36
- * deserializeAws_restJson1LogoutCommand
37
- */
38
- export declare const de_LogoutCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<LogoutCommandOutput>;
@@ -1,53 +0,0 @@
1
- import {
2
- HttpRequest as __HttpRequest,
3
- HttpResponse as __HttpResponse,
4
- } from "@smithy/protocol-http";
5
- import { SerdeContext as __SerdeContext } from "@smithy/types";
6
- import {
7
- GetRoleCredentialsCommandInput,
8
- GetRoleCredentialsCommandOutput,
9
- } from "../commands/GetRoleCredentialsCommand";
10
- import {
11
- ListAccountRolesCommandInput,
12
- ListAccountRolesCommandOutput,
13
- } from "../commands/ListAccountRolesCommand";
14
- import {
15
- ListAccountsCommandInput,
16
- ListAccountsCommandOutput,
17
- } from "../commands/ListAccountsCommand";
18
- import {
19
- LogoutCommandInput,
20
- LogoutCommandOutput,
21
- } from "../commands/LogoutCommand";
22
- export declare const se_GetRoleCredentialsCommand: (
23
- input: GetRoleCredentialsCommandInput,
24
- context: __SerdeContext
25
- ) => Promise<__HttpRequest>;
26
- export declare const se_ListAccountRolesCommand: (
27
- input: ListAccountRolesCommandInput,
28
- context: __SerdeContext
29
- ) => Promise<__HttpRequest>;
30
- export declare const se_ListAccountsCommand: (
31
- input: ListAccountsCommandInput,
32
- context: __SerdeContext
33
- ) => Promise<__HttpRequest>;
34
- export declare const se_LogoutCommand: (
35
- input: LogoutCommandInput,
36
- context: __SerdeContext
37
- ) => Promise<__HttpRequest>;
38
- export declare const de_GetRoleCredentialsCommand: (
39
- output: __HttpResponse,
40
- context: __SerdeContext
41
- ) => Promise<GetRoleCredentialsCommandOutput>;
42
- export declare const de_ListAccountRolesCommand: (
43
- output: __HttpResponse,
44
- context: __SerdeContext
45
- ) => Promise<ListAccountRolesCommandOutput>;
46
- export declare const de_ListAccountsCommand: (
47
- output: __HttpResponse,
48
- context: __SerdeContext
49
- ) => Promise<ListAccountsCommandOutput>;
50
- export declare const de_LogoutCommand: (
51
- output: __HttpResponse,
52
- context: __SerdeContext
53
- ) => Promise<LogoutCommandOutput>;