airborne-server-sdk 0.9.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.
Files changed (109) hide show
  1. package/dist-cjs/Airborne.js +51 -0
  2. package/dist-cjs/AirborneClient.js +47 -0
  3. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +49 -0
  5. package/dist-cjs/commands/CreateApplicationCommand.js +21 -0
  6. package/dist-cjs/commands/CreateDimensionCommand.js +21 -0
  7. package/dist-cjs/commands/CreateFileCommand.js +21 -0
  8. package/dist-cjs/commands/CreateOrganisationCommand.js +21 -0
  9. package/dist-cjs/commands/CreatePackageCommand.js +21 -0
  10. package/dist-cjs/commands/CreateReleaseCommand.js +21 -0
  11. package/dist-cjs/commands/DeleteDimensionCommand.js +21 -0
  12. package/dist-cjs/commands/GetReleaseCommand.js +21 -0
  13. package/dist-cjs/commands/GetUserCommand.js +21 -0
  14. package/dist-cjs/commands/ListDimensionsCommand.js +21 -0
  15. package/dist-cjs/commands/ListFilesCommand.js +21 -0
  16. package/dist-cjs/commands/ListOrganisationsCommand.js +21 -0
  17. package/dist-cjs/commands/ListPackagesCommand.js +21 -0
  18. package/dist-cjs/commands/ListReleasesCommand.js +21 -0
  19. package/dist-cjs/commands/PostLoginCommand.js +21 -0
  20. package/dist-cjs/commands/RequestOrganisationCommand.js +21 -0
  21. package/dist-cjs/commands/ServeReleaseCommand.js +21 -0
  22. package/dist-cjs/commands/ServeReleaseV2Command.js +21 -0
  23. package/dist-cjs/commands/UpdateDimensionCommand.js +21 -0
  24. package/dist-cjs/commands/UploadFileCommand.js +22 -0
  25. package/dist-cjs/commands/index.js +23 -0
  26. package/dist-cjs/extensionConfiguration.js +2 -0
  27. package/dist-cjs/index.js +10 -0
  28. package/dist-cjs/models/AirborneServiceException.js +12 -0
  29. package/dist-cjs/models/index.js +4 -0
  30. package/dist-cjs/models/models_0.js +77 -0
  31. package/dist-cjs/protocols/Aws_restJson1.js +953 -0
  32. package/dist-cjs/runtimeConfig.browser.js +32 -0
  33. package/dist-cjs/runtimeConfig.js +38 -0
  34. package/dist-cjs/runtimeConfig.native.js +15 -0
  35. package/dist-cjs/runtimeConfig.shared.js +33 -0
  36. package/dist-cjs/runtimeExtensions.js +12 -0
  37. package/dist-es/Airborne.js +47 -0
  38. package/dist-es/AirborneClient.js +43 -0
  39. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  40. package/dist-es/auth/httpAuthSchemeProvider.js +43 -0
  41. package/dist-es/commands/CreateApplicationCommand.js +17 -0
  42. package/dist-es/commands/CreateDimensionCommand.js +17 -0
  43. package/dist-es/commands/CreateFileCommand.js +17 -0
  44. package/dist-es/commands/CreateOrganisationCommand.js +17 -0
  45. package/dist-es/commands/CreatePackageCommand.js +17 -0
  46. package/dist-es/commands/CreateReleaseCommand.js +17 -0
  47. package/dist-es/commands/DeleteDimensionCommand.js +17 -0
  48. package/dist-es/commands/GetReleaseCommand.js +17 -0
  49. package/dist-es/commands/GetUserCommand.js +17 -0
  50. package/dist-es/commands/ListDimensionsCommand.js +17 -0
  51. package/dist-es/commands/ListFilesCommand.js +17 -0
  52. package/dist-es/commands/ListOrganisationsCommand.js +17 -0
  53. package/dist-es/commands/ListPackagesCommand.js +17 -0
  54. package/dist-es/commands/ListReleasesCommand.js +17 -0
  55. package/dist-es/commands/PostLoginCommand.js +17 -0
  56. package/dist-es/commands/RequestOrganisationCommand.js +17 -0
  57. package/dist-es/commands/ServeReleaseCommand.js +17 -0
  58. package/dist-es/commands/ServeReleaseV2Command.js +17 -0
  59. package/dist-es/commands/UpdateDimensionCommand.js +17 -0
  60. package/dist-es/commands/UploadFileCommand.js +18 -0
  61. package/dist-es/commands/index.js +20 -0
  62. package/dist-es/extensionConfiguration.js +1 -0
  63. package/dist-es/index.js +5 -0
  64. package/dist-es/models/AirborneServiceException.js +8 -0
  65. package/dist-es/models/index.js +1 -0
  66. package/dist-es/models/models_0.js +68 -0
  67. package/dist-es/protocols/Aws_restJson1.js +910 -0
  68. package/dist-es/runtimeConfig.browser.js +27 -0
  69. package/dist-es/runtimeConfig.js +33 -0
  70. package/dist-es/runtimeConfig.native.js +11 -0
  71. package/dist-es/runtimeConfig.shared.js +29 -0
  72. package/dist-es/runtimeExtensions.js +8 -0
  73. package/dist-types/Airborne.d.ts +152 -0
  74. package/dist-types/AirborneClient.d.ts +182 -0
  75. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  76. package/dist-types/auth/httpAuthSchemeProvider.d.ts +67 -0
  77. package/dist-types/commands/CreateApplicationCommand.d.ts +91 -0
  78. package/dist-types/commands/CreateDimensionCommand.d.ts +95 -0
  79. package/dist-types/commands/CreateFileCommand.d.ts +100 -0
  80. package/dist-types/commands/CreateOrganisationCommand.d.ts +98 -0
  81. package/dist-types/commands/CreatePackageCommand.d.ts +97 -0
  82. package/dist-types/commands/CreateReleaseCommand.d.ts +152 -0
  83. package/dist-types/commands/DeleteDimensionCommand.d.ts +86 -0
  84. package/dist-types/commands/GetReleaseCommand.d.ts +139 -0
  85. package/dist-types/commands/GetUserCommand.d.ts +108 -0
  86. package/dist-types/commands/ListDimensionsCommand.d.ts +100 -0
  87. package/dist-types/commands/ListFilesCommand.d.ts +108 -0
  88. package/dist-types/commands/ListOrganisationsCommand.d.ts +100 -0
  89. package/dist-types/commands/ListPackagesCommand.d.ts +102 -0
  90. package/dist-types/commands/ListReleasesCommand.d.ts +143 -0
  91. package/dist-types/commands/PostLoginCommand.d.ts +111 -0
  92. package/dist-types/commands/RequestOrganisationCommand.d.ts +92 -0
  93. package/dist-types/commands/ServeReleaseCommand.d.ts +103 -0
  94. package/dist-types/commands/ServeReleaseV2Command.d.ts +103 -0
  95. package/dist-types/commands/UpdateDimensionCommand.d.ts +95 -0
  96. package/dist-types/commands/UploadFileCommand.d.ts +101 -0
  97. package/dist-types/commands/index.d.ts +20 -0
  98. package/dist-types/extensionConfiguration.d.ts +8 -0
  99. package/dist-types/index.d.ts +12 -0
  100. package/dist-types/models/AirborneServiceException.d.ts +14 -0
  101. package/dist-types/models/index.d.ts +1 -0
  102. package/dist-types/models/models_0.d.ts +961 -0
  103. package/dist-types/protocols/Aws_restJson1.d.ts +182 -0
  104. package/dist-types/runtimeConfig.browser.d.ts +44 -0
  105. package/dist-types/runtimeConfig.d.ts +44 -0
  106. package/dist-types/runtimeConfig.native.d.ts +43 -0
  107. package/dist-types/runtimeConfig.shared.d.ts +27 -0
  108. package/dist-types/runtimeExtensions.d.ts +17 -0
  109. package/package.json +81 -0
@@ -0,0 +1,953 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_UploadFileCommand = exports.de_UpdateDimensionCommand = exports.de_ServeReleaseV2Command = exports.de_ServeReleaseCommand = exports.de_RequestOrganisationCommand = exports.de_PostLoginCommand = exports.de_ListReleasesCommand = exports.de_ListPackagesCommand = exports.de_ListOrganisationsCommand = exports.de_ListFilesCommand = exports.de_ListDimensionsCommand = exports.de_GetUserCommand = exports.de_GetReleaseCommand = exports.de_DeleteDimensionCommand = exports.de_CreateReleaseCommand = exports.de_CreatePackageCommand = exports.de_CreateOrganisationCommand = exports.de_CreateFileCommand = exports.de_CreateDimensionCommand = exports.de_CreateApplicationCommand = exports.se_UploadFileCommand = exports.se_UpdateDimensionCommand = exports.se_ServeReleaseV2Command = exports.se_ServeReleaseCommand = exports.se_RequestOrganisationCommand = exports.se_PostLoginCommand = exports.se_ListReleasesCommand = exports.se_ListPackagesCommand = exports.se_ListOrganisationsCommand = exports.se_ListFilesCommand = exports.se_ListDimensionsCommand = exports.se_GetUserCommand = exports.se_GetReleaseCommand = exports.se_DeleteDimensionCommand = exports.se_CreateReleaseCommand = exports.se_CreatePackageCommand = exports.se_CreateOrganisationCommand = exports.se_CreateFileCommand = exports.se_CreateDimensionCommand = exports.se_CreateApplicationCommand = void 0;
4
+ const AirborneServiceException_1 = require("../models/AirborneServiceException");
5
+ const models_0_1 = require("../models/models_0");
6
+ const core_1 = require("@aws-sdk/core");
7
+ const core_2 = require("@smithy/core");
8
+ const smithy_client_1 = require("@smithy/smithy-client");
9
+ const se_CreateApplicationCommand = async (input, context) => {
10
+ const b = (0, core_2.requestBuilder)(input, context);
11
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
12
+ 'content-type': 'application/json',
13
+ [_xo]: input[_o],
14
+ });
15
+ b.bp("/api/organisations/applications/create");
16
+ let body;
17
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
18
+ 'application': [],
19
+ }));
20
+ b.m("POST")
21
+ .h(headers)
22
+ .b(body);
23
+ return b.build();
24
+ };
25
+ exports.se_CreateApplicationCommand = se_CreateApplicationCommand;
26
+ const se_CreateDimensionCommand = async (input, context) => {
27
+ const b = (0, core_2.requestBuilder)(input, context);
28
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
29
+ 'content-type': 'application/json',
30
+ [_xo]: input[_o],
31
+ [_xa]: input[_a],
32
+ });
33
+ b.bp("/api/organisations/applications/dimension/create");
34
+ let body;
35
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
36
+ 'depends_on': [],
37
+ 'description': [],
38
+ 'dimension': [],
39
+ 'dimension_type': [],
40
+ }));
41
+ b.m("POST")
42
+ .h(headers)
43
+ .b(body);
44
+ return b.build();
45
+ };
46
+ exports.se_CreateDimensionCommand = se_CreateDimensionCommand;
47
+ const se_CreateFileCommand = async (input, context) => {
48
+ const b = (0, core_2.requestBuilder)(input, context);
49
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
50
+ 'content-type': 'application/json',
51
+ [_xo]: input[_o],
52
+ [_xa]: input[_a],
53
+ });
54
+ b.bp("/api/file");
55
+ let body;
56
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
57
+ 'file_path': [],
58
+ 'metadata': _ => se_Document(_, context),
59
+ 'tag': [],
60
+ 'url': [],
61
+ }));
62
+ b.m("POST")
63
+ .h(headers)
64
+ .b(body);
65
+ return b.build();
66
+ };
67
+ exports.se_CreateFileCommand = se_CreateFileCommand;
68
+ const se_CreateOrganisationCommand = async (input, context) => {
69
+ const b = (0, core_2.requestBuilder)(input, context);
70
+ const headers = {
71
+ 'content-type': 'application/json',
72
+ };
73
+ b.bp("/api/organisations/create");
74
+ let body;
75
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
76
+ 'name': [],
77
+ }));
78
+ b.m("POST")
79
+ .h(headers)
80
+ .b(body);
81
+ return b.build();
82
+ };
83
+ exports.se_CreateOrganisationCommand = se_CreateOrganisationCommand;
84
+ const se_CreatePackageCommand = async (input, context) => {
85
+ const b = (0, core_2.requestBuilder)(input, context);
86
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
87
+ 'content-type': 'application/json',
88
+ [_xo]: input[_o],
89
+ [_xa]: input[_a],
90
+ });
91
+ b.bp("/api/packages");
92
+ let body;
93
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
94
+ 'files': _ => (0, smithy_client_1._json)(_),
95
+ 'index': [],
96
+ 'tag': [],
97
+ }));
98
+ b.m("POST")
99
+ .h(headers)
100
+ .b(body);
101
+ return b.build();
102
+ };
103
+ exports.se_CreatePackageCommand = se_CreatePackageCommand;
104
+ const se_CreateReleaseCommand = async (input, context) => {
105
+ const b = (0, core_2.requestBuilder)(input, context);
106
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
107
+ 'content-type': 'application/json',
108
+ [_xo]: input[_o],
109
+ [_xa]: input[_a],
110
+ });
111
+ b.bp("/api/releases");
112
+ let body;
113
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
114
+ 'config': _ => se_CreateReleaseRequestConfig(_, context),
115
+ 'dimensions': _ => se_DimensionsMap(_, context),
116
+ 'package': _ => se_CreateReleaseRequestPackage(_, context),
117
+ 'package_id': [],
118
+ 'resources': _ => (0, smithy_client_1._json)(_),
119
+ }));
120
+ b.m("POST")
121
+ .h(headers)
122
+ .b(body);
123
+ return b.build();
124
+ };
125
+ exports.se_CreateReleaseCommand = se_CreateReleaseCommand;
126
+ const se_DeleteDimensionCommand = async (input, context) => {
127
+ const b = (0, core_2.requestBuilder)(input, context);
128
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
129
+ [_xo]: input[_o],
130
+ [_xa]: input[_a],
131
+ });
132
+ b.bp("/api/organisations/applications/dimension/{dimension}");
133
+ b.p('dimension', () => input.dimension, '{dimension}', false);
134
+ let body;
135
+ b.m("DELETE")
136
+ .h(headers)
137
+ .b(body);
138
+ return b.build();
139
+ };
140
+ exports.se_DeleteDimensionCommand = se_DeleteDimensionCommand;
141
+ const se_GetReleaseCommand = async (input, context) => {
142
+ const b = (0, core_2.requestBuilder)(input, context);
143
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
144
+ [_xo]: input[_o],
145
+ [_xa]: input[_a],
146
+ });
147
+ b.bp("/api/releases/{releaseId}");
148
+ b.p('releaseId', () => input.releaseId, '{releaseId}', false);
149
+ let body;
150
+ b.m("GET")
151
+ .h(headers)
152
+ .b(body);
153
+ return b.build();
154
+ };
155
+ exports.se_GetReleaseCommand = se_GetReleaseCommand;
156
+ const se_GetUserCommand = async (input, context) => {
157
+ const b = (0, core_2.requestBuilder)(input, context);
158
+ const headers = {};
159
+ b.bp("/api/users");
160
+ let body;
161
+ b.m("GET")
162
+ .h(headers)
163
+ .b(body);
164
+ return b.build();
165
+ };
166
+ exports.se_GetUserCommand = se_GetUserCommand;
167
+ const se_ListDimensionsCommand = async (input, context) => {
168
+ const b = (0, core_2.requestBuilder)(input, context);
169
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
170
+ [_xo]: input[_o],
171
+ [_xa]: input[_a],
172
+ });
173
+ b.bp("/api/organisations/applications/dimension/list");
174
+ const query = (0, smithy_client_1.map)({
175
+ [_p]: [() => input.page !== void 0, () => (input[_p].toString())],
176
+ [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
177
+ });
178
+ let body;
179
+ b.m("GET")
180
+ .h(headers)
181
+ .q(query)
182
+ .b(body);
183
+ return b.build();
184
+ };
185
+ exports.se_ListDimensionsCommand = se_ListDimensionsCommand;
186
+ const se_ListFilesCommand = async (input, context) => {
187
+ const b = (0, core_2.requestBuilder)(input, context);
188
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
189
+ [_xo]: input[_o],
190
+ [_xa]: input[_a],
191
+ });
192
+ b.bp("/api/file/list");
193
+ const query = (0, smithy_client_1.map)({
194
+ [_p]: [() => input.page !== void 0, () => (input[_p].toString())],
195
+ [_pp]: [() => input.per_page !== void 0, () => (input[_pp].toString())],
196
+ [_s]: [, input[_s]],
197
+ });
198
+ let body;
199
+ b.m("GET")
200
+ .h(headers)
201
+ .q(query)
202
+ .b(body);
203
+ return b.build();
204
+ };
205
+ exports.se_ListFilesCommand = se_ListFilesCommand;
206
+ const se_ListOrganisationsCommand = async (input, context) => {
207
+ const b = (0, core_2.requestBuilder)(input, context);
208
+ const headers = {};
209
+ b.bp("/api/organisations");
210
+ let body;
211
+ b.m("GET")
212
+ .h(headers)
213
+ .b(body);
214
+ return b.build();
215
+ };
216
+ exports.se_ListOrganisationsCommand = se_ListOrganisationsCommand;
217
+ const se_ListPackagesCommand = async (input, context) => {
218
+ const b = (0, core_2.requestBuilder)(input, context);
219
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
220
+ [_xo]: input[_o],
221
+ [_xa]: input[_a],
222
+ });
223
+ b.bp("/api/packages/list");
224
+ const query = (0, smithy_client_1.map)({
225
+ [_of]: [() => input.offset !== void 0, () => (input[_of].toString())],
226
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
227
+ });
228
+ let body;
229
+ b.m("GET")
230
+ .h(headers)
231
+ .q(query)
232
+ .b(body);
233
+ return b.build();
234
+ };
235
+ exports.se_ListPackagesCommand = se_ListPackagesCommand;
236
+ const se_ListReleasesCommand = async (input, context) => {
237
+ const b = (0, core_2.requestBuilder)(input, context);
238
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
239
+ [_xd]: input[_d],
240
+ [_xo]: input[_o],
241
+ [_xa]: input[_a],
242
+ });
243
+ b.bp("/api/releases/list");
244
+ let body;
245
+ b.m("GET")
246
+ .h(headers)
247
+ .b(body);
248
+ return b.build();
249
+ };
250
+ exports.se_ListReleasesCommand = se_ListReleasesCommand;
251
+ const se_PostLoginCommand = async (input, context) => {
252
+ const b = (0, core_2.requestBuilder)(input, context);
253
+ const headers = {
254
+ 'content-type': 'application/json',
255
+ };
256
+ b.bp("/api/token/issue");
257
+ let body;
258
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
259
+ 'client_id': [],
260
+ 'client_secret': [],
261
+ }));
262
+ b.m("POST")
263
+ .h(headers)
264
+ .b(body);
265
+ return b.build();
266
+ };
267
+ exports.se_PostLoginCommand = se_PostLoginCommand;
268
+ const se_RequestOrganisationCommand = async (input, context) => {
269
+ const b = (0, core_2.requestBuilder)(input, context);
270
+ const headers = {
271
+ 'content-type': 'application/json',
272
+ };
273
+ b.bp("/api/organisations/request");
274
+ let body;
275
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
276
+ 'app_store_link': [],
277
+ 'email': [],
278
+ 'name': [],
279
+ 'organisation_name': [],
280
+ 'phone': [],
281
+ 'play_store_link': [],
282
+ }));
283
+ b.m("POST")
284
+ .h(headers)
285
+ .b(body);
286
+ return b.build();
287
+ };
288
+ exports.se_RequestOrganisationCommand = se_RequestOrganisationCommand;
289
+ const se_ServeReleaseCommand = async (input, context) => {
290
+ const b = (0, core_2.requestBuilder)(input, context);
291
+ const headers = {};
292
+ b.bp("/release/{organisation}/{application}");
293
+ b.p('organisation', () => input.organisation, '{organisation}', false);
294
+ b.p('application', () => input.application, '{application}', false);
295
+ let body;
296
+ b.m("GET")
297
+ .h(headers)
298
+ .b(body);
299
+ return b.build();
300
+ };
301
+ exports.se_ServeReleaseCommand = se_ServeReleaseCommand;
302
+ const se_ServeReleaseV2Command = async (input, context) => {
303
+ const b = (0, core_2.requestBuilder)(input, context);
304
+ const headers = {};
305
+ b.bp("/release/v2/{organisation}/{application}");
306
+ b.p('organisation', () => input.organisation, '{organisation}', false);
307
+ b.p('application', () => input.application, '{application}', false);
308
+ let body;
309
+ b.m("GET")
310
+ .h(headers)
311
+ .b(body);
312
+ return b.build();
313
+ };
314
+ exports.se_ServeReleaseV2Command = se_ServeReleaseV2Command;
315
+ const se_UpdateDimensionCommand = async (input, context) => {
316
+ const b = (0, core_2.requestBuilder)(input, context);
317
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
318
+ 'content-type': 'application/json',
319
+ [_xo]: input[_o],
320
+ [_xa]: input[_a],
321
+ });
322
+ b.bp("/api/organisations/applications/dimension/{dimension}");
323
+ b.p('dimension', () => input.dimension, '{dimension}', false);
324
+ let body;
325
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
326
+ 'change_reason': [],
327
+ 'position': [],
328
+ }));
329
+ b.m("PUT")
330
+ .h(headers)
331
+ .b(body);
332
+ return b.build();
333
+ };
334
+ exports.se_UpdateDimensionCommand = se_UpdateDimensionCommand;
335
+ const se_UploadFileCommand = async (input, context) => {
336
+ const b = (0, core_2.requestBuilder)(input, context);
337
+ const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
338
+ 'content-type': 'application/octet-stream',
339
+ [_xc]: input[_ch],
340
+ [_xo]: input[_o],
341
+ [_xa]: input[_a],
342
+ });
343
+ b.bp("/api/file/upload");
344
+ const query = (0, smithy_client_1.map)({
345
+ [_fp]: [, (0, smithy_client_1.expectNonNull)(input[_fp], `file_path`)],
346
+ [_t]: [, input[_t]],
347
+ });
348
+ let body;
349
+ if (input.file !== undefined) {
350
+ body = input.file;
351
+ }
352
+ b.m("POST")
353
+ .h(headers)
354
+ .q(query)
355
+ .b(body);
356
+ return b.build();
357
+ };
358
+ exports.se_UploadFileCommand = se_UploadFileCommand;
359
+ const de_CreateApplicationCommand = async (output, context) => {
360
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
361
+ return de_CommandError(output, context);
362
+ }
363
+ const contents = (0, smithy_client_1.map)({
364
+ $metadata: deserializeMetadata(output),
365
+ });
366
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
367
+ const doc = (0, smithy_client_1.take)(data, {
368
+ 'access': smithy_client_1._json,
369
+ 'application': smithy_client_1.expectString,
370
+ 'organisation': smithy_client_1.expectString,
371
+ });
372
+ Object.assign(contents, doc);
373
+ return contents;
374
+ };
375
+ exports.de_CreateApplicationCommand = de_CreateApplicationCommand;
376
+ const de_CreateDimensionCommand = async (output, context) => {
377
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
378
+ return de_CommandError(output, context);
379
+ }
380
+ const contents = (0, smithy_client_1.map)({
381
+ $metadata: deserializeMetadata(output),
382
+ });
383
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
384
+ const doc = (0, smithy_client_1.take)(data, {
385
+ 'change_reason': smithy_client_1.expectString,
386
+ 'description': _ => de_Document(_, context),
387
+ 'dimension': smithy_client_1.expectString,
388
+ 'position': smithy_client_1.expectInt32,
389
+ 'schema': _ => de_Document(_, context),
390
+ });
391
+ Object.assign(contents, doc);
392
+ return contents;
393
+ };
394
+ exports.de_CreateDimensionCommand = de_CreateDimensionCommand;
395
+ const de_CreateFileCommand = async (output, context) => {
396
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
397
+ return de_CommandError(output, context);
398
+ }
399
+ const contents = (0, smithy_client_1.map)({
400
+ $metadata: deserializeMetadata(output),
401
+ });
402
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
403
+ const doc = (0, smithy_client_1.take)(data, {
404
+ 'checksum': smithy_client_1.expectString,
405
+ 'created_at': smithy_client_1.expectString,
406
+ 'file_path': smithy_client_1.expectString,
407
+ 'id': smithy_client_1.expectString,
408
+ 'metadata': _ => de_Document(_, context),
409
+ 'size': smithy_client_1.expectInt32,
410
+ 'status': smithy_client_1.expectString,
411
+ 'tag': smithy_client_1.expectString,
412
+ 'url': smithy_client_1.expectString,
413
+ 'version': smithy_client_1.expectInt32,
414
+ });
415
+ Object.assign(contents, doc);
416
+ return contents;
417
+ };
418
+ exports.de_CreateFileCommand = de_CreateFileCommand;
419
+ const de_CreateOrganisationCommand = async (output, context) => {
420
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
421
+ return de_CommandError(output, context);
422
+ }
423
+ const contents = (0, smithy_client_1.map)({
424
+ $metadata: deserializeMetadata(output),
425
+ });
426
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
427
+ const doc = (0, smithy_client_1.take)(data, {
428
+ 'access': smithy_client_1._json,
429
+ 'applications': smithy_client_1._json,
430
+ 'name': smithy_client_1.expectString,
431
+ });
432
+ Object.assign(contents, doc);
433
+ return contents;
434
+ };
435
+ exports.de_CreateOrganisationCommand = de_CreateOrganisationCommand;
436
+ const de_CreatePackageCommand = async (output, context) => {
437
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
438
+ return de_CommandError(output, context);
439
+ }
440
+ const contents = (0, smithy_client_1.map)({
441
+ $metadata: deserializeMetadata(output),
442
+ });
443
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
444
+ const doc = (0, smithy_client_1.take)(data, {
445
+ 'files': smithy_client_1._json,
446
+ 'index': smithy_client_1.expectString,
447
+ 'tag': smithy_client_1.expectString,
448
+ 'version': smithy_client_1.expectInt32,
449
+ });
450
+ Object.assign(contents, doc);
451
+ return contents;
452
+ };
453
+ exports.de_CreatePackageCommand = de_CreatePackageCommand;
454
+ const de_CreateReleaseCommand = async (output, context) => {
455
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
456
+ return de_CommandError(output, context);
457
+ }
458
+ const contents = (0, smithy_client_1.map)({
459
+ $metadata: deserializeMetadata(output),
460
+ });
461
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
462
+ const doc = (0, smithy_client_1.take)(data, {
463
+ 'config': _ => de_GetReleaseConfig(_, context),
464
+ 'created_at': smithy_client_1.expectString,
465
+ 'dimensions': _ => de_DimensionsMap(_, context),
466
+ 'experiment': smithy_client_1._json,
467
+ 'id': smithy_client_1.expectString,
468
+ 'package': _ => de_ServePackage(_, context),
469
+ });
470
+ Object.assign(contents, doc);
471
+ return contents;
472
+ };
473
+ exports.de_CreateReleaseCommand = de_CreateReleaseCommand;
474
+ const de_DeleteDimensionCommand = async (output, context) => {
475
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
476
+ return de_CommandError(output, context);
477
+ }
478
+ const contents = (0, smithy_client_1.map)({
479
+ $metadata: deserializeMetadata(output),
480
+ });
481
+ await (0, smithy_client_1.collectBody)(output.body, context);
482
+ return contents;
483
+ };
484
+ exports.de_DeleteDimensionCommand = de_DeleteDimensionCommand;
485
+ const de_GetReleaseCommand = async (output, context) => {
486
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
487
+ return de_CommandError(output, context);
488
+ }
489
+ const contents = (0, smithy_client_1.map)({
490
+ $metadata: deserializeMetadata(output),
491
+ });
492
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
493
+ const doc = (0, smithy_client_1.take)(data, {
494
+ 'config': _ => de_GetReleaseConfig(_, context),
495
+ 'created_at': smithy_client_1.expectString,
496
+ 'dimensions': _ => de_DimensionsMap(_, context),
497
+ 'experiment': smithy_client_1._json,
498
+ 'id': smithy_client_1.expectString,
499
+ 'package': _ => de_ServePackage(_, context),
500
+ 'resources': smithy_client_1._json,
501
+ });
502
+ Object.assign(contents, doc);
503
+ return contents;
504
+ };
505
+ exports.de_GetReleaseCommand = de_GetReleaseCommand;
506
+ const de_GetUserCommand = async (output, context) => {
507
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
508
+ return de_CommandError(output, context);
509
+ }
510
+ const contents = (0, smithy_client_1.map)({
511
+ $metadata: deserializeMetadata(output),
512
+ });
513
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
514
+ const doc = (0, smithy_client_1.take)(data, {
515
+ 'organisations': smithy_client_1._json,
516
+ 'user_id': smithy_client_1.expectString,
517
+ 'user_token': smithy_client_1._json,
518
+ });
519
+ Object.assign(contents, doc);
520
+ return contents;
521
+ };
522
+ exports.de_GetUserCommand = de_GetUserCommand;
523
+ const de_ListDimensionsCommand = async (output, context) => {
524
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
525
+ return de_CommandError(output, context);
526
+ }
527
+ const contents = (0, smithy_client_1.map)({
528
+ $metadata: deserializeMetadata(output),
529
+ });
530
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
531
+ const doc = (0, smithy_client_1.take)(data, {
532
+ 'data': _ => de_DimensionList(_, context),
533
+ 'total_items': smithy_client_1.expectInt32,
534
+ 'total_pages': smithy_client_1.expectInt32,
535
+ });
536
+ Object.assign(contents, doc);
537
+ return contents;
538
+ };
539
+ exports.de_ListDimensionsCommand = de_ListDimensionsCommand;
540
+ const de_ListFilesCommand = async (output, context) => {
541
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
542
+ return de_CommandError(output, context);
543
+ }
544
+ const contents = (0, smithy_client_1.map)({
545
+ $metadata: deserializeMetadata(output),
546
+ });
547
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
548
+ const doc = (0, smithy_client_1.take)(data, {
549
+ 'application': smithy_client_1.expectString,
550
+ 'files': _ => de_FileResponseList(_, context),
551
+ 'organisation': smithy_client_1.expectString,
552
+ 'page': smithy_client_1.expectInt32,
553
+ 'per_page': smithy_client_1.expectInt32,
554
+ 'total': smithy_client_1.expectInt32,
555
+ });
556
+ Object.assign(contents, doc);
557
+ return contents;
558
+ };
559
+ exports.de_ListFilesCommand = de_ListFilesCommand;
560
+ const de_ListOrganisationsCommand = async (output, context) => {
561
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
562
+ return de_CommandError(output, context);
563
+ }
564
+ const contents = (0, smithy_client_1.map)({
565
+ $metadata: deserializeMetadata(output),
566
+ });
567
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
568
+ const doc = (0, smithy_client_1.take)(data, {
569
+ 'organisations': smithy_client_1._json,
570
+ });
571
+ Object.assign(contents, doc);
572
+ return contents;
573
+ };
574
+ exports.de_ListOrganisationsCommand = de_ListOrganisationsCommand;
575
+ const de_ListPackagesCommand = async (output, context) => {
576
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
577
+ return de_CommandError(output, context);
578
+ }
579
+ const contents = (0, smithy_client_1.map)({
580
+ $metadata: deserializeMetadata(output),
581
+ });
582
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
583
+ const doc = (0, smithy_client_1.take)(data, {
584
+ 'next_offset': smithy_client_1.expectInt32,
585
+ 'packages': smithy_client_1._json,
586
+ 'page_number': smithy_client_1.expectInt32,
587
+ 'prev_offset': smithy_client_1.expectInt32,
588
+ 'total_pages': smithy_client_1.expectInt32,
589
+ });
590
+ Object.assign(contents, doc);
591
+ return contents;
592
+ };
593
+ exports.de_ListPackagesCommand = de_ListPackagesCommand;
594
+ const de_ListReleasesCommand = async (output, context) => {
595
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
596
+ return de_CommandError(output, context);
597
+ }
598
+ const contents = (0, smithy_client_1.map)({
599
+ $metadata: deserializeMetadata(output),
600
+ });
601
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
602
+ const doc = (0, smithy_client_1.take)(data, {
603
+ 'releases': _ => de_GetReleaseResponseList(_, context),
604
+ });
605
+ Object.assign(contents, doc);
606
+ return contents;
607
+ };
608
+ exports.de_ListReleasesCommand = de_ListReleasesCommand;
609
+ const de_PostLoginCommand = async (output, context) => {
610
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
611
+ return de_CommandError(output, context);
612
+ }
613
+ const contents = (0, smithy_client_1.map)({
614
+ $metadata: deserializeMetadata(output),
615
+ });
616
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
617
+ const doc = (0, smithy_client_1.take)(data, {
618
+ 'organisations': smithy_client_1._json,
619
+ 'user_id': smithy_client_1.expectString,
620
+ 'user_token': smithy_client_1._json,
621
+ });
622
+ Object.assign(contents, doc);
623
+ return contents;
624
+ };
625
+ exports.de_PostLoginCommand = de_PostLoginCommand;
626
+ const de_RequestOrganisationCommand = async (output, context) => {
627
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
628
+ return de_CommandError(output, context);
629
+ }
630
+ const contents = (0, smithy_client_1.map)({
631
+ $metadata: deserializeMetadata(output),
632
+ });
633
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
634
+ const doc = (0, smithy_client_1.take)(data, {
635
+ 'message': smithy_client_1.expectString,
636
+ 'organisation_name': smithy_client_1.expectString,
637
+ });
638
+ Object.assign(contents, doc);
639
+ return contents;
640
+ };
641
+ exports.de_RequestOrganisationCommand = de_RequestOrganisationCommand;
642
+ const de_ServeReleaseCommand = async (output, context) => {
643
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
644
+ return de_CommandError(output, context);
645
+ }
646
+ const contents = (0, smithy_client_1.map)({
647
+ $metadata: deserializeMetadata(output),
648
+ });
649
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
650
+ const doc = (0, smithy_client_1.take)(data, {
651
+ 'config': _ => de_GetReleaseConfig(_, context),
652
+ 'package': smithy_client_1._json,
653
+ 'resources': _ => de_Document(_, context),
654
+ });
655
+ Object.assign(contents, doc);
656
+ return contents;
657
+ };
658
+ exports.de_ServeReleaseCommand = de_ServeReleaseCommand;
659
+ const de_ServeReleaseV2Command = async (output, context) => {
660
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
661
+ return de_CommandError(output, context);
662
+ }
663
+ const contents = (0, smithy_client_1.map)({
664
+ $metadata: deserializeMetadata(output),
665
+ });
666
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
667
+ const doc = (0, smithy_client_1.take)(data, {
668
+ 'config': _ => de_GetReleaseConfig(_, context),
669
+ 'package': smithy_client_1._json,
670
+ 'resources': _ => de_Document(_, context),
671
+ });
672
+ Object.assign(contents, doc);
673
+ return contents;
674
+ };
675
+ exports.de_ServeReleaseV2Command = de_ServeReleaseV2Command;
676
+ const de_UpdateDimensionCommand = async (output, context) => {
677
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
678
+ return de_CommandError(output, context);
679
+ }
680
+ const contents = (0, smithy_client_1.map)({
681
+ $metadata: deserializeMetadata(output),
682
+ });
683
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
684
+ const doc = (0, smithy_client_1.take)(data, {
685
+ 'change_reason': smithy_client_1.expectString,
686
+ 'description': _ => de_Document(_, context),
687
+ 'dimension': smithy_client_1.expectString,
688
+ 'mandatory': smithy_client_1.expectBoolean,
689
+ 'position': smithy_client_1.expectInt32,
690
+ 'schema': _ => de_Document(_, context),
691
+ });
692
+ Object.assign(contents, doc);
693
+ return contents;
694
+ };
695
+ exports.de_UpdateDimensionCommand = de_UpdateDimensionCommand;
696
+ const de_UploadFileCommand = async (output, context) => {
697
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
698
+ return de_CommandError(output, context);
699
+ }
700
+ const contents = (0, smithy_client_1.map)({
701
+ $metadata: deserializeMetadata(output),
702
+ });
703
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
704
+ const doc = (0, smithy_client_1.take)(data, {
705
+ 'checksum': smithy_client_1.expectString,
706
+ 'created_at': smithy_client_1.expectString,
707
+ 'file_path': smithy_client_1.expectString,
708
+ 'id': smithy_client_1.expectString,
709
+ 'metadata': _ => de_Document(_, context),
710
+ 'size': smithy_client_1.expectInt32,
711
+ 'status': smithy_client_1.expectString,
712
+ 'tag': smithy_client_1.expectString,
713
+ 'url': smithy_client_1.expectString,
714
+ 'version': smithy_client_1.expectInt32,
715
+ });
716
+ Object.assign(contents, doc);
717
+ return contents;
718
+ };
719
+ exports.de_UploadFileCommand = de_UploadFileCommand;
720
+ const de_CommandError = async (output, context) => {
721
+ const parsedOutput = {
722
+ ...output,
723
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context)
724
+ };
725
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
726
+ switch (errorCode) {
727
+ case "BadRequestError":
728
+ case "io.airborne.server#BadRequestError":
729
+ throw await de_BadRequestErrorRes(parsedOutput, context);
730
+ case "ForbiddenError":
731
+ case "io.airborne.server#ForbiddenError":
732
+ throw await de_ForbiddenErrorRes(parsedOutput, context);
733
+ case "InternalServerError":
734
+ case "io.airborne.server#InternalServerError":
735
+ throw await de_InternalServerErrorRes(parsedOutput, context);
736
+ case "NotFoundError":
737
+ case "io.airborne.server#NotFoundError":
738
+ throw await de_NotFoundErrorRes(parsedOutput, context);
739
+ case "Unauthorized":
740
+ case "io.airborne.server#Unauthorized":
741
+ throw await de_UnauthorizedRes(parsedOutput, context);
742
+ default:
743
+ const parsedBody = parsedOutput.body;
744
+ return throwDefaultError({
745
+ output,
746
+ parsedBody,
747
+ errorCode
748
+ });
749
+ }
750
+ };
751
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(AirborneServiceException_1.AirborneServiceException);
752
+ const de_BadRequestErrorRes = async (parsedOutput, context) => {
753
+ const contents = (0, smithy_client_1.map)({});
754
+ const data = parsedOutput.body;
755
+ const doc = (0, smithy_client_1.take)(data, {
756
+ 'message': smithy_client_1.expectString,
757
+ });
758
+ Object.assign(contents, doc);
759
+ const exception = new models_0_1.BadRequestError({
760
+ $metadata: deserializeMetadata(parsedOutput),
761
+ ...contents
762
+ });
763
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
764
+ };
765
+ const de_ForbiddenErrorRes = async (parsedOutput, context) => {
766
+ const contents = (0, smithy_client_1.map)({});
767
+ const data = parsedOutput.body;
768
+ const doc = (0, smithy_client_1.take)(data, {
769
+ 'message': smithy_client_1.expectString,
770
+ });
771
+ Object.assign(contents, doc);
772
+ const exception = new models_0_1.ForbiddenError({
773
+ $metadata: deserializeMetadata(parsedOutput),
774
+ ...contents
775
+ });
776
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
777
+ };
778
+ const de_InternalServerErrorRes = async (parsedOutput, context) => {
779
+ const contents = (0, smithy_client_1.map)({});
780
+ const data = parsedOutput.body;
781
+ const doc = (0, smithy_client_1.take)(data, {
782
+ 'message': smithy_client_1.expectString,
783
+ });
784
+ Object.assign(contents, doc);
785
+ const exception = new models_0_1.InternalServerError({
786
+ $metadata: deserializeMetadata(parsedOutput),
787
+ ...contents
788
+ });
789
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
790
+ };
791
+ const de_NotFoundErrorRes = async (parsedOutput, context) => {
792
+ const contents = (0, smithy_client_1.map)({});
793
+ const data = parsedOutput.body;
794
+ const doc = (0, smithy_client_1.take)(data, {
795
+ 'message': smithy_client_1.expectString,
796
+ });
797
+ Object.assign(contents, doc);
798
+ const exception = new models_0_1.NotFoundError({
799
+ $metadata: deserializeMetadata(parsedOutput),
800
+ ...contents
801
+ });
802
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
803
+ };
804
+ const de_UnauthorizedRes = async (parsedOutput, context) => {
805
+ const contents = (0, smithy_client_1.map)({});
806
+ const data = parsedOutput.body;
807
+ const doc = (0, smithy_client_1.take)(data, {
808
+ 'message': smithy_client_1.expectString,
809
+ });
810
+ Object.assign(contents, doc);
811
+ const exception = new models_0_1.Unauthorized({
812
+ $metadata: deserializeMetadata(parsedOutput),
813
+ ...contents
814
+ });
815
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
816
+ };
817
+ const se_CreateReleaseRequestConfig = (input, context) => {
818
+ return (0, smithy_client_1.take)(input, {
819
+ 'boot_timeout': [],
820
+ 'properties': _ => se_Document(_, context),
821
+ 'release_config_timeout': [],
822
+ });
823
+ };
824
+ const se_CreateReleaseRequestPackage = (input, context) => {
825
+ return (0, smithy_client_1.take)(input, {
826
+ 'important': smithy_client_1._json,
827
+ 'lazy': smithy_client_1._json,
828
+ 'properties': _ => se_Document(_, context),
829
+ });
830
+ };
831
+ const se_DimensionsMap = (input, context) => {
832
+ return Object.entries(input).reduce((acc, [key, value]) => {
833
+ if (value === null) {
834
+ return acc;
835
+ }
836
+ acc[key] = se_Document(value, context);
837
+ return acc;
838
+ }, {});
839
+ };
840
+ const se_Document = (input, context) => {
841
+ return input;
842
+ };
843
+ const de_ConfigProperties = (output, context) => {
844
+ return (0, smithy_client_1.take)(output, {
845
+ 'tenant_info': (_) => de_Document(_, context),
846
+ });
847
+ };
848
+ const de_CreateFileResponse = (output, context) => {
849
+ return (0, smithy_client_1.take)(output, {
850
+ 'checksum': smithy_client_1.expectString,
851
+ 'created_at': smithy_client_1.expectString,
852
+ 'file_path': smithy_client_1.expectString,
853
+ 'id': smithy_client_1.expectString,
854
+ 'metadata': (_) => de_Document(_, context),
855
+ 'size': smithy_client_1.expectInt32,
856
+ 'status': smithy_client_1.expectString,
857
+ 'tag': smithy_client_1.expectString,
858
+ 'url': smithy_client_1.expectString,
859
+ 'version': smithy_client_1.expectInt32,
860
+ });
861
+ };
862
+ const de_DimensionList = (output, context) => {
863
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
864
+ return de_DimensionResponse(entry, context);
865
+ });
866
+ return retVal;
867
+ };
868
+ const de_DimensionResponse = (output, context) => {
869
+ return (0, smithy_client_1.take)(output, {
870
+ 'change_reason': smithy_client_1.expectString,
871
+ 'description': (_) => de_Document(_, context),
872
+ 'dimension': smithy_client_1.expectString,
873
+ 'mandatory': smithy_client_1.expectBoolean,
874
+ 'position': smithy_client_1.expectInt32,
875
+ 'schema': (_) => de_Document(_, context),
876
+ });
877
+ };
878
+ const de_DimensionsMap = (output, context) => {
879
+ return Object.entries(output).reduce((acc, [key, value]) => {
880
+ if (value === null) {
881
+ return acc;
882
+ }
883
+ acc[key] = de_Document(value, context);
884
+ return acc;
885
+ }, {});
886
+ };
887
+ const de_FileResponseList = (output, context) => {
888
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
889
+ return de_CreateFileResponse(entry, context);
890
+ });
891
+ return retVal;
892
+ };
893
+ const de_GetReleaseConfig = (output, context) => {
894
+ return (0, smithy_client_1.take)(output, {
895
+ 'boot_timeout': smithy_client_1.expectInt32,
896
+ 'properties': (_) => de_ConfigProperties(_, context),
897
+ 'release_config_timeout': smithy_client_1.expectInt32,
898
+ 'version': smithy_client_1.expectString,
899
+ });
900
+ };
901
+ const de_GetReleaseResponse = (output, context) => {
902
+ return (0, smithy_client_1.take)(output, {
903
+ 'config': (_) => de_GetReleaseConfig(_, context),
904
+ 'created_at': smithy_client_1.expectString,
905
+ 'dimensions': (_) => de_DimensionsMap(_, context),
906
+ 'experiment': smithy_client_1._json,
907
+ 'id': smithy_client_1.expectString,
908
+ 'package': (_) => de_ServePackage(_, context),
909
+ 'resources': smithy_client_1._json,
910
+ });
911
+ };
912
+ const de_GetReleaseResponseList = (output, context) => {
913
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
914
+ return de_GetReleaseResponse(entry, context);
915
+ });
916
+ return retVal;
917
+ };
918
+ const de_ServePackage = (output, context) => {
919
+ return (0, smithy_client_1.take)(output, {
920
+ 'important': smithy_client_1._json,
921
+ 'index': smithy_client_1._json,
922
+ 'lazy': smithy_client_1._json,
923
+ 'name': smithy_client_1.expectString,
924
+ 'properties': (_) => de_Document(_, context),
925
+ 'version': smithy_client_1.expectString,
926
+ });
927
+ };
928
+ const de_Document = (output, context) => {
929
+ return output;
930
+ };
931
+ const deserializeMetadata = (output) => ({
932
+ httpStatusCode: output.statusCode,
933
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
934
+ extendedRequestId: output.headers["x-amz-id-2"],
935
+ cfId: output.headers["x-amz-cf-id"],
936
+ });
937
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
938
+ const _a = "application";
939
+ const _c = "count";
940
+ const _ch = "checksum";
941
+ const _d = "dimension";
942
+ const _fp = "file_path";
943
+ const _l = "limit";
944
+ const _o = "organisation";
945
+ const _of = "offset";
946
+ const _p = "page";
947
+ const _pp = "per_page";
948
+ const _s = "search";
949
+ const _t = "tag";
950
+ const _xa = "x-application";
951
+ const _xc = "x-checksum";
952
+ const _xd = "x-dimension";
953
+ const _xo = "x-organisation";