@wildix/wim-cache-client 1.0.1 → 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/dist-cjs/WimCache.js +8 -0
- package/dist-cjs/WimCacheClient.js +14 -8
- package/dist-cjs/commands/DeleteEntitiesFromGeneralCacheCommand.js +12 -32
- package/dist-cjs/commands/DeleteIntegrationDataCommand.js +21 -0
- package/dist-cjs/commands/GetEntitiesByIdsCommand.js +12 -32
- package/dist-cjs/commands/GetIntegrationDataCommand.js +21 -0
- package/dist-cjs/commands/PutEntitiesToGeneralCacheCommand.js +12 -32
- package/dist-cjs/commands/PutIntegrationDataCommand.js +21 -0
- package/dist-cjs/commands/SearchEntitiesByListParamsCommand.js +12 -32
- package/dist-cjs/commands/SearchEntitiesByParamsCommand.js +12 -32
- package/dist-cjs/commands/SyncCacheCommand.js +12 -32
- package/dist-cjs/commands/UpdateEntitiesWeightCommand.js +21 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/models/models_0.js +16 -3
- package/dist-cjs/protocols/Aws_restJson1.js +227 -227
- package/dist-cjs/runtimeConfig.browser.js +5 -1
- package/dist-cjs/runtimeConfig.js +8 -3
- package/dist-cjs/runtimeConfig.shared.js +13 -11
- package/dist-cjs/runtimeExtensions.js +2 -10
- package/dist-es/WimCache.js +8 -0
- package/dist-es/WimCacheClient.js +15 -9
- package/dist-es/commands/DeleteEntitiesFromGeneralCacheCommand.js +12 -32
- package/dist-es/commands/DeleteIntegrationDataCommand.js +17 -0
- package/dist-es/commands/GetEntitiesByIdsCommand.js +12 -32
- package/dist-es/commands/GetIntegrationDataCommand.js +17 -0
- package/dist-es/commands/PutEntitiesToGeneralCacheCommand.js +12 -32
- package/dist-es/commands/PutIntegrationDataCommand.js +17 -0
- package/dist-es/commands/SearchEntitiesByListParamsCommand.js +12 -32
- package/dist-es/commands/SearchEntitiesByParamsCommand.js +12 -32
- package/dist-es/commands/SyncCacheCommand.js +12 -32
- package/dist-es/commands/UpdateEntitiesWeightCommand.js +17 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/models/models_0.js +14 -2
- package/dist-es/protocols/Aws_restJson1.js +209 -217
- package/dist-es/runtimeConfig.browser.js +4 -1
- package/dist-es/runtimeConfig.js +7 -3
- package/dist-es/runtimeConfig.shared.js +13 -11
- package/dist-es/runtimeExtensions.js +2 -10
- package/dist-types/WimCache.d.ts +31 -0
- package/dist-types/WimCacheClient.d.ts +22 -11
- package/dist-types/commands/DeleteEntitiesFromGeneralCacheCommand.d.ts +24 -21
- package/dist-types/commands/DeleteIntegrationDataCommand.d.ts +76 -0
- package/dist-types/commands/GetEntitiesByIdsCommand.d.ts +27 -21
- package/dist-types/commands/GetIntegrationDataCommand.d.ts +84 -0
- package/dist-types/commands/PutEntitiesToGeneralCacheCommand.d.ts +24 -21
- package/dist-types/commands/PutIntegrationDataCommand.d.ts +78 -0
- package/dist-types/commands/SearchEntitiesByListParamsCommand.d.ts +27 -21
- package/dist-types/commands/SearchEntitiesByParamsCommand.d.ts +27 -21
- package/dist-types/commands/SyncCacheCommand.d.ts +24 -21
- package/dist-types/commands/UpdateEntitiesWeightCommand.d.ts +79 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/index.d.ts +2 -0
- package/dist-types/models/WimCacheServiceException.d.ts +2 -1
- package/dist-types/models/models_0.d.ts +213 -71
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- package/dist-types/runtimeConfig.browser.d.ts +12 -5
- package/dist-types/runtimeConfig.d.ts +12 -5
- package/dist-types/runtimeConfig.native.d.ts +12 -5
- package/package.json +41 -35
|
@@ -1,146 +1,191 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_SyncCacheCommand = exports.de_SearchEntitiesByParamsCommand = exports.de_SearchEntitiesByListParamsCommand = exports.de_PutEntitiesToGeneralCacheCommand = exports.de_GetEntitiesByIdsCommand = exports.de_DeleteEntitiesFromGeneralCacheCommand = exports.se_SyncCacheCommand = exports.se_SearchEntitiesByParamsCommand = exports.se_SearchEntitiesByListParamsCommand = exports.se_PutEntitiesToGeneralCacheCommand = exports.se_GetEntitiesByIdsCommand = exports.se_DeleteEntitiesFromGeneralCacheCommand = void 0;
|
|
3
|
+
exports.de_UpdateEntitiesWeightCommand = exports.de_SyncCacheCommand = exports.de_SearchEntitiesByParamsCommand = exports.de_SearchEntitiesByListParamsCommand = exports.de_PutIntegrationDataCommand = exports.de_PutEntitiesToGeneralCacheCommand = exports.de_GetIntegrationDataCommand = exports.de_GetEntitiesByIdsCommand = exports.de_DeleteIntegrationDataCommand = exports.de_DeleteEntitiesFromGeneralCacheCommand = exports.se_UpdateEntitiesWeightCommand = exports.se_SyncCacheCommand = exports.se_SearchEntitiesByParamsCommand = exports.se_SearchEntitiesByListParamsCommand = exports.se_PutIntegrationDataCommand = exports.se_PutEntitiesToGeneralCacheCommand = exports.se_GetIntegrationDataCommand = exports.se_GetEntitiesByIdsCommand = exports.se_DeleteIntegrationDataCommand = exports.se_DeleteEntitiesFromGeneralCacheCommand = void 0;
|
|
4
4
|
const WimCacheServiceException_1 = require("../models/WimCacheServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
|
-
const
|
|
6
|
+
const core_1 = require("@aws-sdk/core");
|
|
7
|
+
const core_2 = require("@smithy/core");
|
|
7
8
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
9
|
const se_DeleteEntitiesFromGeneralCacheCommand = async (input, context) => {
|
|
9
|
-
const
|
|
10
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
10
11
|
const headers = {};
|
|
11
|
-
|
|
12
|
+
b.bp("/v1/cache/general");
|
|
12
13
|
const query = (0, smithy_client_1.map)({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
[_e]: [, input[_e]],
|
|
15
|
+
[_p]: [, input[_p]],
|
|
16
|
+
[_c]: [() => input.clean !== void 0, () => (input[_c].toString())],
|
|
16
17
|
});
|
|
17
18
|
let body;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
headers,
|
|
24
|
-
path: resolvedPath,
|
|
25
|
-
query,
|
|
26
|
-
body,
|
|
27
|
-
});
|
|
19
|
+
b.m("DELETE")
|
|
20
|
+
.h(headers)
|
|
21
|
+
.q(query)
|
|
22
|
+
.b(body);
|
|
23
|
+
return b.build();
|
|
28
24
|
};
|
|
29
25
|
exports.se_DeleteEntitiesFromGeneralCacheCommand = se_DeleteEntitiesFromGeneralCacheCommand;
|
|
26
|
+
const se_DeleteIntegrationDataCommand = async (input, context) => {
|
|
27
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
28
|
+
const headers = {};
|
|
29
|
+
b.bp("/v1/cache/integration-data/{id}");
|
|
30
|
+
b.p('id', () => input.id, '{id}', false);
|
|
31
|
+
const query = (0, smithy_client_1.map)({
|
|
32
|
+
[_cI]: [, input[_cI]],
|
|
33
|
+
[_t]: [, input[_t]],
|
|
34
|
+
});
|
|
35
|
+
let body;
|
|
36
|
+
b.m("DELETE")
|
|
37
|
+
.h(headers)
|
|
38
|
+
.q(query)
|
|
39
|
+
.b(body);
|
|
40
|
+
return b.build();
|
|
41
|
+
};
|
|
42
|
+
exports.se_DeleteIntegrationDataCommand = se_DeleteIntegrationDataCommand;
|
|
30
43
|
const se_GetEntitiesByIdsCommand = async (input, context) => {
|
|
31
|
-
const
|
|
44
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
32
45
|
const headers = {
|
|
33
46
|
'content-type': 'application/json',
|
|
34
47
|
};
|
|
35
|
-
|
|
48
|
+
b.bp("/v1/cache/object");
|
|
36
49
|
let body;
|
|
37
50
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
38
51
|
'entityIds': _ => (0, smithy_client_1._json)(_),
|
|
39
52
|
'organizationId': [],
|
|
40
53
|
}));
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
method: "POST",
|
|
46
|
-
headers,
|
|
47
|
-
path: resolvedPath,
|
|
48
|
-
body,
|
|
49
|
-
});
|
|
54
|
+
b.m("POST")
|
|
55
|
+
.h(headers)
|
|
56
|
+
.b(body);
|
|
57
|
+
return b.build();
|
|
50
58
|
};
|
|
51
59
|
exports.se_GetEntitiesByIdsCommand = se_GetEntitiesByIdsCommand;
|
|
60
|
+
const se_GetIntegrationDataCommand = async (input, context) => {
|
|
61
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
62
|
+
const headers = {};
|
|
63
|
+
b.bp("/v1/cache/integration-data/{id}");
|
|
64
|
+
b.p('id', () => input.id, '{id}', false);
|
|
65
|
+
const query = (0, smithy_client_1.map)({
|
|
66
|
+
[_cI]: [, input[_cI]],
|
|
67
|
+
[_t]: [, input[_t]],
|
|
68
|
+
});
|
|
69
|
+
let body;
|
|
70
|
+
b.m("GET")
|
|
71
|
+
.h(headers)
|
|
72
|
+
.q(query)
|
|
73
|
+
.b(body);
|
|
74
|
+
return b.build();
|
|
75
|
+
};
|
|
76
|
+
exports.se_GetIntegrationDataCommand = se_GetIntegrationDataCommand;
|
|
52
77
|
const se_PutEntitiesToGeneralCacheCommand = async (input, context) => {
|
|
53
|
-
const
|
|
78
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
54
79
|
const headers = {
|
|
55
80
|
'content-type': 'application/json',
|
|
56
81
|
};
|
|
57
|
-
|
|
82
|
+
b.bp("/v1/cache/general");
|
|
58
83
|
let body;
|
|
59
84
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
60
85
|
'items': _ => (0, smithy_client_1._json)(_),
|
|
61
86
|
}));
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
method: "PUT",
|
|
67
|
-
headers,
|
|
68
|
-
path: resolvedPath,
|
|
69
|
-
body,
|
|
70
|
-
});
|
|
87
|
+
b.m("PUT")
|
|
88
|
+
.h(headers)
|
|
89
|
+
.b(body);
|
|
90
|
+
return b.build();
|
|
71
91
|
};
|
|
72
92
|
exports.se_PutEntitiesToGeneralCacheCommand = se_PutEntitiesToGeneralCacheCommand;
|
|
93
|
+
const se_PutIntegrationDataCommand = async (input, context) => {
|
|
94
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
95
|
+
const headers = {
|
|
96
|
+
'content-type': 'application/json',
|
|
97
|
+
};
|
|
98
|
+
b.bp("/v1/cache/integration-data");
|
|
99
|
+
const query = (0, smithy_client_1.map)({
|
|
100
|
+
[_cI]: [, input[_cI]],
|
|
101
|
+
});
|
|
102
|
+
let body;
|
|
103
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
104
|
+
'data': _ => se_Document(_, context),
|
|
105
|
+
'id': [],
|
|
106
|
+
'integrationId': [],
|
|
107
|
+
'type': [],
|
|
108
|
+
}));
|
|
109
|
+
b.m("PUT")
|
|
110
|
+
.h(headers)
|
|
111
|
+
.q(query)
|
|
112
|
+
.b(body);
|
|
113
|
+
return b.build();
|
|
114
|
+
};
|
|
115
|
+
exports.se_PutIntegrationDataCommand = se_PutIntegrationDataCommand;
|
|
73
116
|
const se_SearchEntitiesByListParamsCommand = async (input, context) => {
|
|
74
|
-
const
|
|
117
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
75
118
|
const headers = {
|
|
76
119
|
'content-type': 'application/json',
|
|
77
120
|
};
|
|
78
|
-
|
|
121
|
+
b.bp("/v1/cache/search");
|
|
79
122
|
let body;
|
|
80
123
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
81
124
|
'organizationId': [],
|
|
82
125
|
'params': _ => (0, smithy_client_1._json)(_),
|
|
83
126
|
}));
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
method: "POST",
|
|
89
|
-
headers,
|
|
90
|
-
path: resolvedPath,
|
|
91
|
-
body,
|
|
92
|
-
});
|
|
127
|
+
b.m("POST")
|
|
128
|
+
.h(headers)
|
|
129
|
+
.b(body);
|
|
130
|
+
return b.build();
|
|
93
131
|
};
|
|
94
132
|
exports.se_SearchEntitiesByListParamsCommand = se_SearchEntitiesByListParamsCommand;
|
|
95
133
|
const se_SearchEntitiesByParamsCommand = async (input, context) => {
|
|
96
|
-
const
|
|
134
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
97
135
|
const headers = {};
|
|
98
|
-
|
|
136
|
+
b.bp("/v1/cache/search");
|
|
99
137
|
const query = (0, smithy_client_1.map)({
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
138
|
+
[_oI]: [, input[_oI]],
|
|
139
|
+
[_p]: [, input[_p]],
|
|
140
|
+
[_e]: [, input[_e]],
|
|
141
|
+
[_q]: [, input[_q]],
|
|
142
|
+
[_f]: [() => input.from !== void 0, () => (input[_f].toString())],
|
|
143
|
+
[_s]: [() => input.size !== void 0, () => (input[_s].toString())],
|
|
106
144
|
});
|
|
107
145
|
let body;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
headers,
|
|
114
|
-
path: resolvedPath,
|
|
115
|
-
query,
|
|
116
|
-
body,
|
|
117
|
-
});
|
|
146
|
+
b.m("GET")
|
|
147
|
+
.h(headers)
|
|
148
|
+
.q(query)
|
|
149
|
+
.b(body);
|
|
150
|
+
return b.build();
|
|
118
151
|
};
|
|
119
152
|
exports.se_SearchEntitiesByParamsCommand = se_SearchEntitiesByParamsCommand;
|
|
120
153
|
const se_SyncCacheCommand = async (input, context) => {
|
|
121
|
-
const
|
|
154
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
122
155
|
const headers = {
|
|
123
156
|
'content-type': 'application/json',
|
|
124
157
|
};
|
|
125
|
-
|
|
158
|
+
b.bp("/v1/cache/sync");
|
|
126
159
|
let body;
|
|
127
160
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
128
161
|
'organizationId': [],
|
|
129
162
|
}));
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
method: "POST",
|
|
135
|
-
headers,
|
|
136
|
-
path: resolvedPath,
|
|
137
|
-
body,
|
|
138
|
-
});
|
|
163
|
+
b.m("POST")
|
|
164
|
+
.h(headers)
|
|
165
|
+
.b(body);
|
|
166
|
+
return b.build();
|
|
139
167
|
};
|
|
140
168
|
exports.se_SyncCacheCommand = se_SyncCacheCommand;
|
|
169
|
+
const se_UpdateEntitiesWeightCommand = async (input, context) => {
|
|
170
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
171
|
+
const headers = {
|
|
172
|
+
'content-type': 'application/json',
|
|
173
|
+
};
|
|
174
|
+
b.bp("/v1/cache/weight");
|
|
175
|
+
let body;
|
|
176
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
177
|
+
'entityIds': _ => (0, smithy_client_1._json)(_),
|
|
178
|
+
'organizationId': [],
|
|
179
|
+
}));
|
|
180
|
+
b.m("POST")
|
|
181
|
+
.h(headers)
|
|
182
|
+
.b(body);
|
|
183
|
+
return b.build();
|
|
184
|
+
};
|
|
185
|
+
exports.se_UpdateEntitiesWeightCommand = se_UpdateEntitiesWeightCommand;
|
|
141
186
|
const de_DeleteEntitiesFromGeneralCacheCommand = async (output, context) => {
|
|
142
187
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
143
|
-
return
|
|
188
|
+
return de_CommandError(output, context);
|
|
144
189
|
}
|
|
145
190
|
const contents = (0, smithy_client_1.map)({
|
|
146
191
|
$metadata: deserializeMetadata(output),
|
|
@@ -149,33 +194,25 @@ const de_DeleteEntitiesFromGeneralCacheCommand = async (output, context) => {
|
|
|
149
194
|
return contents;
|
|
150
195
|
};
|
|
151
196
|
exports.de_DeleteEntitiesFromGeneralCacheCommand = de_DeleteEntitiesFromGeneralCacheCommand;
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
body: await parseErrorBody(output.body, context)
|
|
156
|
-
};
|
|
157
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
158
|
-
switch (errorCode) {
|
|
159
|
-
case "ValidationException":
|
|
160
|
-
case "smithy.framework#ValidationException":
|
|
161
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
162
|
-
default:
|
|
163
|
-
const parsedBody = parsedOutput.body;
|
|
164
|
-
return throwDefaultError({
|
|
165
|
-
output,
|
|
166
|
-
parsedBody,
|
|
167
|
-
errorCode
|
|
168
|
-
});
|
|
197
|
+
const de_DeleteIntegrationDataCommand = async (output, context) => {
|
|
198
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
199
|
+
return de_CommandError(output, context);
|
|
169
200
|
}
|
|
201
|
+
const contents = (0, smithy_client_1.map)({
|
|
202
|
+
$metadata: deserializeMetadata(output),
|
|
203
|
+
});
|
|
204
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
205
|
+
return contents;
|
|
170
206
|
};
|
|
207
|
+
exports.de_DeleteIntegrationDataCommand = de_DeleteIntegrationDataCommand;
|
|
171
208
|
const de_GetEntitiesByIdsCommand = async (output, context) => {
|
|
172
209
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
173
|
-
return
|
|
210
|
+
return de_CommandError(output, context);
|
|
174
211
|
}
|
|
175
212
|
const contents = (0, smithy_client_1.map)({
|
|
176
213
|
$metadata: deserializeMetadata(output),
|
|
177
214
|
});
|
|
178
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
215
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
179
216
|
const doc = (0, smithy_client_1.take)(data, {
|
|
180
217
|
'items': smithy_client_1._json,
|
|
181
218
|
});
|
|
@@ -183,28 +220,24 @@ const de_GetEntitiesByIdsCommand = async (output, context) => {
|
|
|
183
220
|
return contents;
|
|
184
221
|
};
|
|
185
222
|
exports.de_GetEntitiesByIdsCommand = de_GetEntitiesByIdsCommand;
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
body: await parseErrorBody(output.body, context)
|
|
190
|
-
};
|
|
191
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
192
|
-
switch (errorCode) {
|
|
193
|
-
case "ValidationException":
|
|
194
|
-
case "smithy.framework#ValidationException":
|
|
195
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
196
|
-
default:
|
|
197
|
-
const parsedBody = parsedOutput.body;
|
|
198
|
-
return throwDefaultError({
|
|
199
|
-
output,
|
|
200
|
-
parsedBody,
|
|
201
|
-
errorCode
|
|
202
|
-
});
|
|
223
|
+
const de_GetIntegrationDataCommand = async (output, context) => {
|
|
224
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
225
|
+
return de_CommandError(output, context);
|
|
203
226
|
}
|
|
227
|
+
const contents = (0, smithy_client_1.map)({
|
|
228
|
+
$metadata: deserializeMetadata(output),
|
|
229
|
+
});
|
|
230
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
231
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
232
|
+
'items': _ => de_IntegrationDataList(_, context),
|
|
233
|
+
});
|
|
234
|
+
Object.assign(contents, doc);
|
|
235
|
+
return contents;
|
|
204
236
|
};
|
|
237
|
+
exports.de_GetIntegrationDataCommand = de_GetIntegrationDataCommand;
|
|
205
238
|
const de_PutEntitiesToGeneralCacheCommand = async (output, context) => {
|
|
206
239
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
207
|
-
return
|
|
240
|
+
return de_CommandError(output, context);
|
|
208
241
|
}
|
|
209
242
|
const contents = (0, smithy_client_1.map)({
|
|
210
243
|
$metadata: deserializeMetadata(output),
|
|
@@ -213,33 +246,25 @@ const de_PutEntitiesToGeneralCacheCommand = async (output, context) => {
|
|
|
213
246
|
return contents;
|
|
214
247
|
};
|
|
215
248
|
exports.de_PutEntitiesToGeneralCacheCommand = de_PutEntitiesToGeneralCacheCommand;
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
body: await parseErrorBody(output.body, context)
|
|
220
|
-
};
|
|
221
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
222
|
-
switch (errorCode) {
|
|
223
|
-
case "ValidationException":
|
|
224
|
-
case "smithy.framework#ValidationException":
|
|
225
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
226
|
-
default:
|
|
227
|
-
const parsedBody = parsedOutput.body;
|
|
228
|
-
return throwDefaultError({
|
|
229
|
-
output,
|
|
230
|
-
parsedBody,
|
|
231
|
-
errorCode
|
|
232
|
-
});
|
|
249
|
+
const de_PutIntegrationDataCommand = async (output, context) => {
|
|
250
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
251
|
+
return de_CommandError(output, context);
|
|
233
252
|
}
|
|
253
|
+
const contents = (0, smithy_client_1.map)({
|
|
254
|
+
$metadata: deserializeMetadata(output),
|
|
255
|
+
});
|
|
256
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
257
|
+
return contents;
|
|
234
258
|
};
|
|
259
|
+
exports.de_PutIntegrationDataCommand = de_PutIntegrationDataCommand;
|
|
235
260
|
const de_SearchEntitiesByListParamsCommand = async (output, context) => {
|
|
236
261
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
237
|
-
return
|
|
262
|
+
return de_CommandError(output, context);
|
|
238
263
|
}
|
|
239
264
|
const contents = (0, smithy_client_1.map)({
|
|
240
265
|
$metadata: deserializeMetadata(output),
|
|
241
266
|
});
|
|
242
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
267
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
243
268
|
const doc = (0, smithy_client_1.take)(data, {
|
|
244
269
|
'items': smithy_client_1._json,
|
|
245
270
|
});
|
|
@@ -247,33 +272,14 @@ const de_SearchEntitiesByListParamsCommand = async (output, context) => {
|
|
|
247
272
|
return contents;
|
|
248
273
|
};
|
|
249
274
|
exports.de_SearchEntitiesByListParamsCommand = de_SearchEntitiesByListParamsCommand;
|
|
250
|
-
const de_SearchEntitiesByListParamsCommandError = async (output, context) => {
|
|
251
|
-
const parsedOutput = {
|
|
252
|
-
...output,
|
|
253
|
-
body: await parseErrorBody(output.body, context)
|
|
254
|
-
};
|
|
255
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
256
|
-
switch (errorCode) {
|
|
257
|
-
case "ValidationException":
|
|
258
|
-
case "smithy.framework#ValidationException":
|
|
259
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
260
|
-
default:
|
|
261
|
-
const parsedBody = parsedOutput.body;
|
|
262
|
-
return throwDefaultError({
|
|
263
|
-
output,
|
|
264
|
-
parsedBody,
|
|
265
|
-
errorCode
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
275
|
const de_SearchEntitiesByParamsCommand = async (output, context) => {
|
|
270
276
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
271
|
-
return
|
|
277
|
+
return de_CommandError(output, context);
|
|
272
278
|
}
|
|
273
279
|
const contents = (0, smithy_client_1.map)({
|
|
274
280
|
$metadata: deserializeMetadata(output),
|
|
275
281
|
});
|
|
276
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
282
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
277
283
|
const doc = (0, smithy_client_1.take)(data, {
|
|
278
284
|
'items': smithy_client_1._json,
|
|
279
285
|
});
|
|
@@ -281,33 +287,14 @@ const de_SearchEntitiesByParamsCommand = async (output, context) => {
|
|
|
281
287
|
return contents;
|
|
282
288
|
};
|
|
283
289
|
exports.de_SearchEntitiesByParamsCommand = de_SearchEntitiesByParamsCommand;
|
|
284
|
-
const de_SearchEntitiesByParamsCommandError = async (output, context) => {
|
|
285
|
-
const parsedOutput = {
|
|
286
|
-
...output,
|
|
287
|
-
body: await parseErrorBody(output.body, context)
|
|
288
|
-
};
|
|
289
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
290
|
-
switch (errorCode) {
|
|
291
|
-
case "ValidationException":
|
|
292
|
-
case "smithy.framework#ValidationException":
|
|
293
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
294
|
-
default:
|
|
295
|
-
const parsedBody = parsedOutput.body;
|
|
296
|
-
return throwDefaultError({
|
|
297
|
-
output,
|
|
298
|
-
parsedBody,
|
|
299
|
-
errorCode
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
};
|
|
303
290
|
const de_SyncCacheCommand = async (output, context) => {
|
|
304
291
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
305
|
-
return
|
|
292
|
+
return de_CommandError(output, context);
|
|
306
293
|
}
|
|
307
294
|
const contents = (0, smithy_client_1.map)({
|
|
308
295
|
$metadata: deserializeMetadata(output),
|
|
309
296
|
});
|
|
310
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
297
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
311
298
|
const doc = (0, smithy_client_1.take)(data, {
|
|
312
299
|
'success': smithy_client_1.expectBoolean,
|
|
313
300
|
});
|
|
@@ -315,13 +302,31 @@ const de_SyncCacheCommand = async (output, context) => {
|
|
|
315
302
|
return contents;
|
|
316
303
|
};
|
|
317
304
|
exports.de_SyncCacheCommand = de_SyncCacheCommand;
|
|
318
|
-
const
|
|
305
|
+
const de_UpdateEntitiesWeightCommand = async (output, context) => {
|
|
306
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
307
|
+
return de_CommandError(output, context);
|
|
308
|
+
}
|
|
309
|
+
const contents = (0, smithy_client_1.map)({
|
|
310
|
+
$metadata: deserializeMetadata(output),
|
|
311
|
+
});
|
|
312
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
313
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
314
|
+
'success': smithy_client_1.expectBoolean,
|
|
315
|
+
});
|
|
316
|
+
Object.assign(contents, doc);
|
|
317
|
+
return contents;
|
|
318
|
+
};
|
|
319
|
+
exports.de_UpdateEntitiesWeightCommand = de_UpdateEntitiesWeightCommand;
|
|
320
|
+
const de_CommandError = async (output, context) => {
|
|
319
321
|
const parsedOutput = {
|
|
320
322
|
...output,
|
|
321
|
-
body: await
|
|
323
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context)
|
|
322
324
|
};
|
|
323
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
325
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
324
326
|
switch (errorCode) {
|
|
327
|
+
case "ForbiddenException":
|
|
328
|
+
case "smithy.framework#ForbiddenException":
|
|
329
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
325
330
|
case "ValidationException":
|
|
326
331
|
case "smithy.framework#ValidationException":
|
|
327
332
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -335,6 +340,19 @@ const de_SyncCacheCommandError = async (output, context) => {
|
|
|
335
340
|
}
|
|
336
341
|
};
|
|
337
342
|
const throwDefaultError = (0, smithy_client_1.withBaseException)(WimCacheServiceException_1.WimCacheServiceException);
|
|
343
|
+
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
344
|
+
const contents = (0, smithy_client_1.map)({});
|
|
345
|
+
const data = parsedOutput.body;
|
|
346
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
347
|
+
'message': smithy_client_1.expectString,
|
|
348
|
+
});
|
|
349
|
+
Object.assign(contents, doc);
|
|
350
|
+
const exception = new models_0_1.ForbiddenException({
|
|
351
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
352
|
+
...contents
|
|
353
|
+
});
|
|
354
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
355
|
+
};
|
|
338
356
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
339
357
|
const contents = (0, smithy_client_1.map)({});
|
|
340
358
|
const data = parsedOutput.body;
|
|
@@ -348,6 +366,25 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
348
366
|
});
|
|
349
367
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
350
368
|
};
|
|
369
|
+
const se_Document = (input, context) => {
|
|
370
|
+
return input;
|
|
371
|
+
};
|
|
372
|
+
const de_Document = (output, context) => {
|
|
373
|
+
return output;
|
|
374
|
+
};
|
|
375
|
+
const de_IntegrationDataItem = (output, context) => {
|
|
376
|
+
return (0, smithy_client_1.take)(output, {
|
|
377
|
+
'data': (_) => de_Document(_, context),
|
|
378
|
+
'integrationId': smithy_client_1.expectString,
|
|
379
|
+
'type': smithy_client_1.expectString,
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
const de_IntegrationDataList = (output, context) => {
|
|
383
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
384
|
+
return de_IntegrationDataItem(entry, context);
|
|
385
|
+
});
|
|
386
|
+
return retVal;
|
|
387
|
+
};
|
|
351
388
|
const deserializeMetadata = (output) => ({
|
|
352
389
|
httpStatusCode: output.statusCode,
|
|
353
390
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -355,49 +392,12 @@ const deserializeMetadata = (output) => ({
|
|
|
355
392
|
cfId: output.headers["x-amz-cf-id"],
|
|
356
393
|
});
|
|
357
394
|
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
return {};
|
|
369
|
-
});
|
|
370
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
371
|
-
const value = await parseBody(errorBody, context);
|
|
372
|
-
value.message = value.message ?? value.Message;
|
|
373
|
-
return value;
|
|
374
|
-
};
|
|
375
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
376
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
377
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
378
|
-
let cleanValue = rawValue;
|
|
379
|
-
if (typeof cleanValue === "number") {
|
|
380
|
-
cleanValue = cleanValue.toString();
|
|
381
|
-
}
|
|
382
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
383
|
-
cleanValue = cleanValue.split(",")[0];
|
|
384
|
-
}
|
|
385
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
386
|
-
cleanValue = cleanValue.split(":")[0];
|
|
387
|
-
}
|
|
388
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
389
|
-
cleanValue = cleanValue.split("#")[1];
|
|
390
|
-
}
|
|
391
|
-
return cleanValue;
|
|
392
|
-
};
|
|
393
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
394
|
-
if (headerKey !== undefined) {
|
|
395
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
396
|
-
}
|
|
397
|
-
if (data.code !== undefined) {
|
|
398
|
-
return sanitizeErrorCode(data.code);
|
|
399
|
-
}
|
|
400
|
-
if (data["__type"] !== undefined) {
|
|
401
|
-
return sanitizeErrorCode(data["__type"]);
|
|
402
|
-
}
|
|
403
|
-
};
|
|
395
|
+
const _c = "clean";
|
|
396
|
+
const _cI = "companyId";
|
|
397
|
+
const _e = "email";
|
|
398
|
+
const _f = "from";
|
|
399
|
+
const _oI = "organizationId";
|
|
400
|
+
const _p = "phone";
|
|
401
|
+
const _q = "query";
|
|
402
|
+
const _s = "size";
|
|
403
|
+
const _t = "type";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
4
6
|
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
|
+
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
5
8
|
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
6
9
|
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
7
10
|
const util_retry_1 = require("@smithy/util-retry");
|
|
@@ -18,8 +21,9 @@ const getRuntimeConfig = (config) => {
|
|
|
18
21
|
runtime: "browser",
|
|
19
22
|
defaultsMode,
|
|
20
23
|
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
|
|
21
25
|
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
22
|
-
requestHandler: config?.requestHandler ??
|
|
26
|
+
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
23
27
|
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
24
28
|
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
25
29
|
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
4
7
|
const hash_node_1 = require("@smithy/hash-node");
|
|
5
8
|
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
6
9
|
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
@@ -22,11 +25,13 @@ const getRuntimeConfig = (config) => {
|
|
|
22
25
|
runtime: "node",
|
|
23
26
|
defaultsMode,
|
|
24
27
|
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
30
|
+
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
31
|
+
retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }, config),
|
|
28
32
|
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
29
33
|
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
34
|
+
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
|
|
30
35
|
};
|
|
31
36
|
};
|
|
32
37
|
exports.getRuntimeConfig = getRuntimeConfig;
|