@aws-sdk/client-swf 3.926.0 → 3.928.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 (60) hide show
  1. package/dist-cjs/index.js +1744 -1400
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/SWFClient.js +2 -0
  4. package/dist-es/commands/CountClosedWorkflowExecutionsCommand.js +3 -9
  5. package/dist-es/commands/CountOpenWorkflowExecutionsCommand.js +3 -9
  6. package/dist-es/commands/CountPendingActivityTasksCommand.js +3 -9
  7. package/dist-es/commands/CountPendingDecisionTasksCommand.js +3 -9
  8. package/dist-es/commands/DeleteActivityTypeCommand.js +3 -9
  9. package/dist-es/commands/DeleteWorkflowTypeCommand.js +3 -9
  10. package/dist-es/commands/DeprecateActivityTypeCommand.js +3 -9
  11. package/dist-es/commands/DeprecateDomainCommand.js +3 -9
  12. package/dist-es/commands/DeprecateWorkflowTypeCommand.js +3 -9
  13. package/dist-es/commands/DescribeActivityTypeCommand.js +3 -9
  14. package/dist-es/commands/DescribeDomainCommand.js +3 -9
  15. package/dist-es/commands/DescribeWorkflowExecutionCommand.js +3 -9
  16. package/dist-es/commands/DescribeWorkflowTypeCommand.js +3 -9
  17. package/dist-es/commands/GetWorkflowExecutionHistoryCommand.js +3 -9
  18. package/dist-es/commands/ListActivityTypesCommand.js +3 -9
  19. package/dist-es/commands/ListClosedWorkflowExecutionsCommand.js +3 -9
  20. package/dist-es/commands/ListDomainsCommand.js +3 -9
  21. package/dist-es/commands/ListOpenWorkflowExecutionsCommand.js +3 -9
  22. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  23. package/dist-es/commands/ListWorkflowTypesCommand.js +3 -9
  24. package/dist-es/commands/PollForActivityTaskCommand.js +3 -9
  25. package/dist-es/commands/PollForDecisionTaskCommand.js +3 -9
  26. package/dist-es/commands/RecordActivityTaskHeartbeatCommand.js +3 -9
  27. package/dist-es/commands/RegisterActivityTypeCommand.js +3 -9
  28. package/dist-es/commands/RegisterDomainCommand.js +3 -9
  29. package/dist-es/commands/RegisterWorkflowTypeCommand.js +3 -9
  30. package/dist-es/commands/RequestCancelWorkflowExecutionCommand.js +3 -9
  31. package/dist-es/commands/RespondActivityTaskCanceledCommand.js +3 -9
  32. package/dist-es/commands/RespondActivityTaskCompletedCommand.js +3 -9
  33. package/dist-es/commands/RespondActivityTaskFailedCommand.js +3 -9
  34. package/dist-es/commands/RespondDecisionTaskCompletedCommand.js +3 -9
  35. package/dist-es/commands/SignalWorkflowExecutionCommand.js +3 -9
  36. package/dist-es/commands/StartWorkflowExecutionCommand.js +3 -9
  37. package/dist-es/commands/TagResourceCommand.js +3 -9
  38. package/dist-es/commands/TerminateWorkflowExecutionCommand.js +3 -9
  39. package/dist-es/commands/UndeprecateActivityTypeCommand.js +3 -9
  40. package/dist-es/commands/UndeprecateDomainCommand.js +3 -9
  41. package/dist-es/commands/UndeprecateWorkflowTypeCommand.js +3 -9
  42. package/dist-es/commands/UntagResourceCommand.js +3 -9
  43. package/dist-es/runtimeConfig.shared.js +7 -0
  44. package/dist-es/schemas/schemas_0.js +1633 -0
  45. package/dist-types/SWFClient.d.ts +10 -1
  46. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  47. package/dist-types/runtimeConfig.d.ts +1 -0
  48. package/dist-types/runtimeConfig.native.d.ts +1 -0
  49. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  50. package/dist-types/schemas/schemas_0.d.ts +205 -0
  51. package/dist-types/ts3.4/SWFClient.d.ts +4 -0
  52. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  53. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  54. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  55. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  56. package/dist-types/ts3.4/schemas/schemas_0.d.ts +210 -0
  57. package/package.json +5 -5
  58. package/dist-es/protocols/Aws_json1_0.js +0 -1098
  59. package/dist-types/protocols/Aws_json1_0.d.ts +0 -353
  60. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +0 -473
@@ -1,1098 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { DefaultUndefinedFault, DomainAlreadyExistsFault, DomainDeprecatedFault, LimitExceededFault, OperationNotPermittedFault, TooManyTagsFault, TypeAlreadyExistsFault, TypeDeprecatedFault, TypeNotDeprecatedFault, UnknownResourceFault, WorkflowExecutionAlreadyStartedFault, } from "../models/models_0";
5
- import { SWFServiceException as __BaseException } from "../models/SWFServiceException";
6
- export const se_CountClosedWorkflowExecutionsCommand = async (input, context) => {
7
- const headers = sharedHeaders("CountClosedWorkflowExecutions");
8
- let body;
9
- body = JSON.stringify(se_CountClosedWorkflowExecutionsInput(input, context));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_CountOpenWorkflowExecutionsCommand = async (input, context) => {
13
- const headers = sharedHeaders("CountOpenWorkflowExecutions");
14
- let body;
15
- body = JSON.stringify(se_CountOpenWorkflowExecutionsInput(input, context));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_CountPendingActivityTasksCommand = async (input, context) => {
19
- const headers = sharedHeaders("CountPendingActivityTasks");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_CountPendingDecisionTasksCommand = async (input, context) => {
25
- const headers = sharedHeaders("CountPendingDecisionTasks");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_DeleteActivityTypeCommand = async (input, context) => {
31
- const headers = sharedHeaders("DeleteActivityType");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_DeleteWorkflowTypeCommand = async (input, context) => {
37
- const headers = sharedHeaders("DeleteWorkflowType");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_DeprecateActivityTypeCommand = async (input, context) => {
43
- const headers = sharedHeaders("DeprecateActivityType");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_DeprecateDomainCommand = async (input, context) => {
49
- const headers = sharedHeaders("DeprecateDomain");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_DeprecateWorkflowTypeCommand = async (input, context) => {
55
- const headers = sharedHeaders("DeprecateWorkflowType");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_DescribeActivityTypeCommand = async (input, context) => {
61
- const headers = sharedHeaders("DescribeActivityType");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_DescribeDomainCommand = async (input, context) => {
67
- const headers = sharedHeaders("DescribeDomain");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_DescribeWorkflowExecutionCommand = async (input, context) => {
73
- const headers = sharedHeaders("DescribeWorkflowExecution");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_DescribeWorkflowTypeCommand = async (input, context) => {
79
- const headers = sharedHeaders("DescribeWorkflowType");
80
- let body;
81
- body = JSON.stringify(_json(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_GetWorkflowExecutionHistoryCommand = async (input, context) => {
85
- const headers = sharedHeaders("GetWorkflowExecutionHistory");
86
- let body;
87
- body = JSON.stringify(_json(input));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_ListActivityTypesCommand = async (input, context) => {
91
- const headers = sharedHeaders("ListActivityTypes");
92
- let body;
93
- body = JSON.stringify(_json(input));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_ListClosedWorkflowExecutionsCommand = async (input, context) => {
97
- const headers = sharedHeaders("ListClosedWorkflowExecutions");
98
- let body;
99
- body = JSON.stringify(se_ListClosedWorkflowExecutionsInput(input, context));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_ListDomainsCommand = async (input, context) => {
103
- const headers = sharedHeaders("ListDomains");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_ListOpenWorkflowExecutionsCommand = async (input, context) => {
109
- const headers = sharedHeaders("ListOpenWorkflowExecutions");
110
- let body;
111
- body = JSON.stringify(se_ListOpenWorkflowExecutionsInput(input, context));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_ListTagsForResourceCommand = async (input, context) => {
115
- const headers = sharedHeaders("ListTagsForResource");
116
- let body;
117
- body = JSON.stringify(_json(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_ListWorkflowTypesCommand = async (input, context) => {
121
- const headers = sharedHeaders("ListWorkflowTypes");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_PollForActivityTaskCommand = async (input, context) => {
127
- const headers = sharedHeaders("PollForActivityTask");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_PollForDecisionTaskCommand = async (input, context) => {
133
- const headers = sharedHeaders("PollForDecisionTask");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_RecordActivityTaskHeartbeatCommand = async (input, context) => {
139
- const headers = sharedHeaders("RecordActivityTaskHeartbeat");
140
- let body;
141
- body = JSON.stringify(_json(input));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const se_RegisterActivityTypeCommand = async (input, context) => {
145
- const headers = sharedHeaders("RegisterActivityType");
146
- let body;
147
- body = JSON.stringify(_json(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const se_RegisterDomainCommand = async (input, context) => {
151
- const headers = sharedHeaders("RegisterDomain");
152
- let body;
153
- body = JSON.stringify(_json(input));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- export const se_RegisterWorkflowTypeCommand = async (input, context) => {
157
- const headers = sharedHeaders("RegisterWorkflowType");
158
- let body;
159
- body = JSON.stringify(_json(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- export const se_RequestCancelWorkflowExecutionCommand = async (input, context) => {
163
- const headers = sharedHeaders("RequestCancelWorkflowExecution");
164
- let body;
165
- body = JSON.stringify(_json(input));
166
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
- };
168
- export const se_RespondActivityTaskCanceledCommand = async (input, context) => {
169
- const headers = sharedHeaders("RespondActivityTaskCanceled");
170
- let body;
171
- body = JSON.stringify(_json(input));
172
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
173
- };
174
- export const se_RespondActivityTaskCompletedCommand = async (input, context) => {
175
- const headers = sharedHeaders("RespondActivityTaskCompleted");
176
- let body;
177
- body = JSON.stringify(_json(input));
178
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
179
- };
180
- export const se_RespondActivityTaskFailedCommand = async (input, context) => {
181
- const headers = sharedHeaders("RespondActivityTaskFailed");
182
- let body;
183
- body = JSON.stringify(_json(input));
184
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
- };
186
- export const se_RespondDecisionTaskCompletedCommand = async (input, context) => {
187
- const headers = sharedHeaders("RespondDecisionTaskCompleted");
188
- let body;
189
- body = JSON.stringify(_json(input));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
- export const se_SignalWorkflowExecutionCommand = async (input, context) => {
193
- const headers = sharedHeaders("SignalWorkflowExecution");
194
- let body;
195
- body = JSON.stringify(_json(input));
196
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
- };
198
- export const se_StartWorkflowExecutionCommand = async (input, context) => {
199
- const headers = sharedHeaders("StartWorkflowExecution");
200
- let body;
201
- body = JSON.stringify(_json(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- export const se_TagResourceCommand = async (input, context) => {
205
- const headers = sharedHeaders("TagResource");
206
- let body;
207
- body = JSON.stringify(_json(input));
208
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
- };
210
- export const se_TerminateWorkflowExecutionCommand = async (input, context) => {
211
- const headers = sharedHeaders("TerminateWorkflowExecution");
212
- let body;
213
- body = JSON.stringify(_json(input));
214
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
215
- };
216
- export const se_UndeprecateActivityTypeCommand = async (input, context) => {
217
- const headers = sharedHeaders("UndeprecateActivityType");
218
- let body;
219
- body = JSON.stringify(_json(input));
220
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
- };
222
- export const se_UndeprecateDomainCommand = async (input, context) => {
223
- const headers = sharedHeaders("UndeprecateDomain");
224
- let body;
225
- body = JSON.stringify(_json(input));
226
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
227
- };
228
- export const se_UndeprecateWorkflowTypeCommand = async (input, context) => {
229
- const headers = sharedHeaders("UndeprecateWorkflowType");
230
- let body;
231
- body = JSON.stringify(_json(input));
232
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
233
- };
234
- export const se_UntagResourceCommand = async (input, context) => {
235
- const headers = sharedHeaders("UntagResource");
236
- let body;
237
- body = JSON.stringify(_json(input));
238
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
- };
240
- export const de_CountClosedWorkflowExecutionsCommand = async (output, context) => {
241
- if (output.statusCode >= 300) {
242
- return de_CommandError(output, context);
243
- }
244
- const data = await parseBody(output.body, context);
245
- let contents = {};
246
- contents = _json(data);
247
- const response = {
248
- $metadata: deserializeMetadata(output),
249
- ...contents,
250
- };
251
- return response;
252
- };
253
- export const de_CountOpenWorkflowExecutionsCommand = async (output, context) => {
254
- if (output.statusCode >= 300) {
255
- return de_CommandError(output, context);
256
- }
257
- const data = await parseBody(output.body, context);
258
- let contents = {};
259
- contents = _json(data);
260
- const response = {
261
- $metadata: deserializeMetadata(output),
262
- ...contents,
263
- };
264
- return response;
265
- };
266
- export const de_CountPendingActivityTasksCommand = async (output, context) => {
267
- if (output.statusCode >= 300) {
268
- return de_CommandError(output, context);
269
- }
270
- const data = await parseBody(output.body, context);
271
- let contents = {};
272
- contents = _json(data);
273
- const response = {
274
- $metadata: deserializeMetadata(output),
275
- ...contents,
276
- };
277
- return response;
278
- };
279
- export const de_CountPendingDecisionTasksCommand = async (output, context) => {
280
- if (output.statusCode >= 300) {
281
- return de_CommandError(output, context);
282
- }
283
- const data = await parseBody(output.body, context);
284
- let contents = {};
285
- contents = _json(data);
286
- const response = {
287
- $metadata: deserializeMetadata(output),
288
- ...contents,
289
- };
290
- return response;
291
- };
292
- export const de_DeleteActivityTypeCommand = async (output, context) => {
293
- if (output.statusCode >= 300) {
294
- return de_CommandError(output, context);
295
- }
296
- await collectBody(output.body, context);
297
- const response = {
298
- $metadata: deserializeMetadata(output),
299
- };
300
- return response;
301
- };
302
- export const de_DeleteWorkflowTypeCommand = async (output, context) => {
303
- if (output.statusCode >= 300) {
304
- return de_CommandError(output, context);
305
- }
306
- await collectBody(output.body, context);
307
- const response = {
308
- $metadata: deserializeMetadata(output),
309
- };
310
- return response;
311
- };
312
- export const de_DeprecateActivityTypeCommand = async (output, context) => {
313
- if (output.statusCode >= 300) {
314
- return de_CommandError(output, context);
315
- }
316
- await collectBody(output.body, context);
317
- const response = {
318
- $metadata: deserializeMetadata(output),
319
- };
320
- return response;
321
- };
322
- export const de_DeprecateDomainCommand = async (output, context) => {
323
- if (output.statusCode >= 300) {
324
- return de_CommandError(output, context);
325
- }
326
- await collectBody(output.body, context);
327
- const response = {
328
- $metadata: deserializeMetadata(output),
329
- };
330
- return response;
331
- };
332
- export const de_DeprecateWorkflowTypeCommand = async (output, context) => {
333
- if (output.statusCode >= 300) {
334
- return de_CommandError(output, context);
335
- }
336
- await collectBody(output.body, context);
337
- const response = {
338
- $metadata: deserializeMetadata(output),
339
- };
340
- return response;
341
- };
342
- export const de_DescribeActivityTypeCommand = async (output, context) => {
343
- if (output.statusCode >= 300) {
344
- return de_CommandError(output, context);
345
- }
346
- const data = await parseBody(output.body, context);
347
- let contents = {};
348
- contents = de_ActivityTypeDetail(data, context);
349
- const response = {
350
- $metadata: deserializeMetadata(output),
351
- ...contents,
352
- };
353
- return response;
354
- };
355
- export const de_DescribeDomainCommand = async (output, context) => {
356
- if (output.statusCode >= 300) {
357
- return de_CommandError(output, context);
358
- }
359
- const data = await parseBody(output.body, context);
360
- let contents = {};
361
- contents = _json(data);
362
- const response = {
363
- $metadata: deserializeMetadata(output),
364
- ...contents,
365
- };
366
- return response;
367
- };
368
- export const de_DescribeWorkflowExecutionCommand = async (output, context) => {
369
- if (output.statusCode >= 300) {
370
- return de_CommandError(output, context);
371
- }
372
- const data = await parseBody(output.body, context);
373
- let contents = {};
374
- contents = de_WorkflowExecutionDetail(data, context);
375
- const response = {
376
- $metadata: deserializeMetadata(output),
377
- ...contents,
378
- };
379
- return response;
380
- };
381
- export const de_DescribeWorkflowTypeCommand = async (output, context) => {
382
- if (output.statusCode >= 300) {
383
- return de_CommandError(output, context);
384
- }
385
- const data = await parseBody(output.body, context);
386
- let contents = {};
387
- contents = de_WorkflowTypeDetail(data, context);
388
- const response = {
389
- $metadata: deserializeMetadata(output),
390
- ...contents,
391
- };
392
- return response;
393
- };
394
- export const de_GetWorkflowExecutionHistoryCommand = async (output, context) => {
395
- if (output.statusCode >= 300) {
396
- return de_CommandError(output, context);
397
- }
398
- const data = await parseBody(output.body, context);
399
- let contents = {};
400
- contents = de_History(data, context);
401
- const response = {
402
- $metadata: deserializeMetadata(output),
403
- ...contents,
404
- };
405
- return response;
406
- };
407
- export const de_ListActivityTypesCommand = async (output, context) => {
408
- if (output.statusCode >= 300) {
409
- return de_CommandError(output, context);
410
- }
411
- const data = await parseBody(output.body, context);
412
- let contents = {};
413
- contents = de_ActivityTypeInfos(data, context);
414
- const response = {
415
- $metadata: deserializeMetadata(output),
416
- ...contents,
417
- };
418
- return response;
419
- };
420
- export const de_ListClosedWorkflowExecutionsCommand = async (output, context) => {
421
- if (output.statusCode >= 300) {
422
- return de_CommandError(output, context);
423
- }
424
- const data = await parseBody(output.body, context);
425
- let contents = {};
426
- contents = de_WorkflowExecutionInfos(data, context);
427
- const response = {
428
- $metadata: deserializeMetadata(output),
429
- ...contents,
430
- };
431
- return response;
432
- };
433
- export const de_ListDomainsCommand = async (output, context) => {
434
- if (output.statusCode >= 300) {
435
- return de_CommandError(output, context);
436
- }
437
- const data = await parseBody(output.body, context);
438
- let contents = {};
439
- contents = _json(data);
440
- const response = {
441
- $metadata: deserializeMetadata(output),
442
- ...contents,
443
- };
444
- return response;
445
- };
446
- export const de_ListOpenWorkflowExecutionsCommand = async (output, context) => {
447
- if (output.statusCode >= 300) {
448
- return de_CommandError(output, context);
449
- }
450
- const data = await parseBody(output.body, context);
451
- let contents = {};
452
- contents = de_WorkflowExecutionInfos(data, context);
453
- const response = {
454
- $metadata: deserializeMetadata(output),
455
- ...contents,
456
- };
457
- return response;
458
- };
459
- export const de_ListTagsForResourceCommand = async (output, context) => {
460
- if (output.statusCode >= 300) {
461
- return de_CommandError(output, context);
462
- }
463
- const data = await parseBody(output.body, context);
464
- let contents = {};
465
- contents = _json(data);
466
- const response = {
467
- $metadata: deserializeMetadata(output),
468
- ...contents,
469
- };
470
- return response;
471
- };
472
- export const de_ListWorkflowTypesCommand = async (output, context) => {
473
- if (output.statusCode >= 300) {
474
- return de_CommandError(output, context);
475
- }
476
- const data = await parseBody(output.body, context);
477
- let contents = {};
478
- contents = de_WorkflowTypeInfos(data, context);
479
- const response = {
480
- $metadata: deserializeMetadata(output),
481
- ...contents,
482
- };
483
- return response;
484
- };
485
- export const de_PollForActivityTaskCommand = async (output, context) => {
486
- if (output.statusCode >= 300) {
487
- return de_CommandError(output, context);
488
- }
489
- const data = await parseBody(output.body, context);
490
- let contents = {};
491
- contents = _json(data);
492
- const response = {
493
- $metadata: deserializeMetadata(output),
494
- ...contents,
495
- };
496
- return response;
497
- };
498
- export const de_PollForDecisionTaskCommand = async (output, context) => {
499
- if (output.statusCode >= 300) {
500
- return de_CommandError(output, context);
501
- }
502
- const data = await parseBody(output.body, context);
503
- let contents = {};
504
- contents = de_DecisionTask(data, context);
505
- const response = {
506
- $metadata: deserializeMetadata(output),
507
- ...contents,
508
- };
509
- return response;
510
- };
511
- export const de_RecordActivityTaskHeartbeatCommand = async (output, context) => {
512
- if (output.statusCode >= 300) {
513
- return de_CommandError(output, context);
514
- }
515
- const data = await parseBody(output.body, context);
516
- let contents = {};
517
- contents = _json(data);
518
- const response = {
519
- $metadata: deserializeMetadata(output),
520
- ...contents,
521
- };
522
- return response;
523
- };
524
- export const de_RegisterActivityTypeCommand = async (output, context) => {
525
- if (output.statusCode >= 300) {
526
- return de_CommandError(output, context);
527
- }
528
- await collectBody(output.body, context);
529
- const response = {
530
- $metadata: deserializeMetadata(output),
531
- };
532
- return response;
533
- };
534
- export const de_RegisterDomainCommand = async (output, context) => {
535
- if (output.statusCode >= 300) {
536
- return de_CommandError(output, context);
537
- }
538
- await collectBody(output.body, context);
539
- const response = {
540
- $metadata: deserializeMetadata(output),
541
- };
542
- return response;
543
- };
544
- export const de_RegisterWorkflowTypeCommand = async (output, context) => {
545
- if (output.statusCode >= 300) {
546
- return de_CommandError(output, context);
547
- }
548
- await collectBody(output.body, context);
549
- const response = {
550
- $metadata: deserializeMetadata(output),
551
- };
552
- return response;
553
- };
554
- export const de_RequestCancelWorkflowExecutionCommand = async (output, context) => {
555
- if (output.statusCode >= 300) {
556
- return de_CommandError(output, context);
557
- }
558
- await collectBody(output.body, context);
559
- const response = {
560
- $metadata: deserializeMetadata(output),
561
- };
562
- return response;
563
- };
564
- export const de_RespondActivityTaskCanceledCommand = async (output, context) => {
565
- if (output.statusCode >= 300) {
566
- return de_CommandError(output, context);
567
- }
568
- await collectBody(output.body, context);
569
- const response = {
570
- $metadata: deserializeMetadata(output),
571
- };
572
- return response;
573
- };
574
- export const de_RespondActivityTaskCompletedCommand = async (output, context) => {
575
- if (output.statusCode >= 300) {
576
- return de_CommandError(output, context);
577
- }
578
- await collectBody(output.body, context);
579
- const response = {
580
- $metadata: deserializeMetadata(output),
581
- };
582
- return response;
583
- };
584
- export const de_RespondActivityTaskFailedCommand = async (output, context) => {
585
- if (output.statusCode >= 300) {
586
- return de_CommandError(output, context);
587
- }
588
- await collectBody(output.body, context);
589
- const response = {
590
- $metadata: deserializeMetadata(output),
591
- };
592
- return response;
593
- };
594
- export const de_RespondDecisionTaskCompletedCommand = async (output, context) => {
595
- if (output.statusCode >= 300) {
596
- return de_CommandError(output, context);
597
- }
598
- await collectBody(output.body, context);
599
- const response = {
600
- $metadata: deserializeMetadata(output),
601
- };
602
- return response;
603
- };
604
- export const de_SignalWorkflowExecutionCommand = async (output, context) => {
605
- if (output.statusCode >= 300) {
606
- return de_CommandError(output, context);
607
- }
608
- await collectBody(output.body, context);
609
- const response = {
610
- $metadata: deserializeMetadata(output),
611
- };
612
- return response;
613
- };
614
- export const de_StartWorkflowExecutionCommand = async (output, context) => {
615
- if (output.statusCode >= 300) {
616
- return de_CommandError(output, context);
617
- }
618
- const data = await parseBody(output.body, context);
619
- let contents = {};
620
- contents = _json(data);
621
- const response = {
622
- $metadata: deserializeMetadata(output),
623
- ...contents,
624
- };
625
- return response;
626
- };
627
- export const de_TagResourceCommand = async (output, context) => {
628
- if (output.statusCode >= 300) {
629
- return de_CommandError(output, context);
630
- }
631
- await collectBody(output.body, context);
632
- const response = {
633
- $metadata: deserializeMetadata(output),
634
- };
635
- return response;
636
- };
637
- export const de_TerminateWorkflowExecutionCommand = async (output, context) => {
638
- if (output.statusCode >= 300) {
639
- return de_CommandError(output, context);
640
- }
641
- await collectBody(output.body, context);
642
- const response = {
643
- $metadata: deserializeMetadata(output),
644
- };
645
- return response;
646
- };
647
- export const de_UndeprecateActivityTypeCommand = async (output, context) => {
648
- if (output.statusCode >= 300) {
649
- return de_CommandError(output, context);
650
- }
651
- await collectBody(output.body, context);
652
- const response = {
653
- $metadata: deserializeMetadata(output),
654
- };
655
- return response;
656
- };
657
- export const de_UndeprecateDomainCommand = async (output, context) => {
658
- if (output.statusCode >= 300) {
659
- return de_CommandError(output, context);
660
- }
661
- await collectBody(output.body, context);
662
- const response = {
663
- $metadata: deserializeMetadata(output),
664
- };
665
- return response;
666
- };
667
- export const de_UndeprecateWorkflowTypeCommand = async (output, context) => {
668
- if (output.statusCode >= 300) {
669
- return de_CommandError(output, context);
670
- }
671
- await collectBody(output.body, context);
672
- const response = {
673
- $metadata: deserializeMetadata(output),
674
- };
675
- return response;
676
- };
677
- export const de_UntagResourceCommand = async (output, context) => {
678
- if (output.statusCode >= 300) {
679
- return de_CommandError(output, context);
680
- }
681
- await collectBody(output.body, context);
682
- const response = {
683
- $metadata: deserializeMetadata(output),
684
- };
685
- return response;
686
- };
687
- const de_CommandError = async (output, context) => {
688
- const parsedOutput = {
689
- ...output,
690
- body: await parseErrorBody(output.body, context),
691
- };
692
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
693
- switch (errorCode) {
694
- case "OperationNotPermittedFault":
695
- case "com.amazonaws.swf#OperationNotPermittedFault":
696
- throw await de_OperationNotPermittedFaultRes(parsedOutput, context);
697
- case "UnknownResourceFault":
698
- case "com.amazonaws.swf#UnknownResourceFault":
699
- throw await de_UnknownResourceFaultRes(parsedOutput, context);
700
- case "TypeNotDeprecatedFault":
701
- case "com.amazonaws.swf#TypeNotDeprecatedFault":
702
- throw await de_TypeNotDeprecatedFaultRes(parsedOutput, context);
703
- case "TypeDeprecatedFault":
704
- case "com.amazonaws.swf#TypeDeprecatedFault":
705
- throw await de_TypeDeprecatedFaultRes(parsedOutput, context);
706
- case "DomainDeprecatedFault":
707
- case "com.amazonaws.swf#DomainDeprecatedFault":
708
- throw await de_DomainDeprecatedFaultRes(parsedOutput, context);
709
- case "LimitExceededFault":
710
- case "com.amazonaws.swf#LimitExceededFault":
711
- throw await de_LimitExceededFaultRes(parsedOutput, context);
712
- case "TypeAlreadyExistsFault":
713
- case "com.amazonaws.swf#TypeAlreadyExistsFault":
714
- throw await de_TypeAlreadyExistsFaultRes(parsedOutput, context);
715
- case "DomainAlreadyExistsFault":
716
- case "com.amazonaws.swf#DomainAlreadyExistsFault":
717
- throw await de_DomainAlreadyExistsFaultRes(parsedOutput, context);
718
- case "TooManyTagsFault":
719
- case "com.amazonaws.swf#TooManyTagsFault":
720
- throw await de_TooManyTagsFaultRes(parsedOutput, context);
721
- case "DefaultUndefinedFault":
722
- case "com.amazonaws.swf#DefaultUndefinedFault":
723
- throw await de_DefaultUndefinedFaultRes(parsedOutput, context);
724
- case "WorkflowExecutionAlreadyStartedFault":
725
- case "com.amazonaws.swf#WorkflowExecutionAlreadyStartedFault":
726
- throw await de_WorkflowExecutionAlreadyStartedFaultRes(parsedOutput, context);
727
- default:
728
- const parsedBody = parsedOutput.body;
729
- return throwDefaultError({
730
- output,
731
- parsedBody,
732
- errorCode,
733
- });
734
- }
735
- };
736
- const de_DefaultUndefinedFaultRes = async (parsedOutput, context) => {
737
- const body = parsedOutput.body;
738
- const deserialized = _json(body);
739
- const exception = new DefaultUndefinedFault({
740
- $metadata: deserializeMetadata(parsedOutput),
741
- ...deserialized,
742
- });
743
- return __decorateServiceException(exception, body);
744
- };
745
- const de_DomainAlreadyExistsFaultRes = async (parsedOutput, context) => {
746
- const body = parsedOutput.body;
747
- const deserialized = _json(body);
748
- const exception = new DomainAlreadyExistsFault({
749
- $metadata: deserializeMetadata(parsedOutput),
750
- ...deserialized,
751
- });
752
- return __decorateServiceException(exception, body);
753
- };
754
- const de_DomainDeprecatedFaultRes = async (parsedOutput, context) => {
755
- const body = parsedOutput.body;
756
- const deserialized = _json(body);
757
- const exception = new DomainDeprecatedFault({
758
- $metadata: deserializeMetadata(parsedOutput),
759
- ...deserialized,
760
- });
761
- return __decorateServiceException(exception, body);
762
- };
763
- const de_LimitExceededFaultRes = async (parsedOutput, context) => {
764
- const body = parsedOutput.body;
765
- const deserialized = _json(body);
766
- const exception = new LimitExceededFault({
767
- $metadata: deserializeMetadata(parsedOutput),
768
- ...deserialized,
769
- });
770
- return __decorateServiceException(exception, body);
771
- };
772
- const de_OperationNotPermittedFaultRes = async (parsedOutput, context) => {
773
- const body = parsedOutput.body;
774
- const deserialized = _json(body);
775
- const exception = new OperationNotPermittedFault({
776
- $metadata: deserializeMetadata(parsedOutput),
777
- ...deserialized,
778
- });
779
- return __decorateServiceException(exception, body);
780
- };
781
- const de_TooManyTagsFaultRes = async (parsedOutput, context) => {
782
- const body = parsedOutput.body;
783
- const deserialized = _json(body);
784
- const exception = new TooManyTagsFault({
785
- $metadata: deserializeMetadata(parsedOutput),
786
- ...deserialized,
787
- });
788
- return __decorateServiceException(exception, body);
789
- };
790
- const de_TypeAlreadyExistsFaultRes = async (parsedOutput, context) => {
791
- const body = parsedOutput.body;
792
- const deserialized = _json(body);
793
- const exception = new TypeAlreadyExistsFault({
794
- $metadata: deserializeMetadata(parsedOutput),
795
- ...deserialized,
796
- });
797
- return __decorateServiceException(exception, body);
798
- };
799
- const de_TypeDeprecatedFaultRes = async (parsedOutput, context) => {
800
- const body = parsedOutput.body;
801
- const deserialized = _json(body);
802
- const exception = new TypeDeprecatedFault({
803
- $metadata: deserializeMetadata(parsedOutput),
804
- ...deserialized,
805
- });
806
- return __decorateServiceException(exception, body);
807
- };
808
- const de_TypeNotDeprecatedFaultRes = async (parsedOutput, context) => {
809
- const body = parsedOutput.body;
810
- const deserialized = _json(body);
811
- const exception = new TypeNotDeprecatedFault({
812
- $metadata: deserializeMetadata(parsedOutput),
813
- ...deserialized,
814
- });
815
- return __decorateServiceException(exception, body);
816
- };
817
- const de_UnknownResourceFaultRes = async (parsedOutput, context) => {
818
- const body = parsedOutput.body;
819
- const deserialized = _json(body);
820
- const exception = new UnknownResourceFault({
821
- $metadata: deserializeMetadata(parsedOutput),
822
- ...deserialized,
823
- });
824
- return __decorateServiceException(exception, body);
825
- };
826
- const de_WorkflowExecutionAlreadyStartedFaultRes = async (parsedOutput, context) => {
827
- const body = parsedOutput.body;
828
- const deserialized = _json(body);
829
- const exception = new WorkflowExecutionAlreadyStartedFault({
830
- $metadata: deserializeMetadata(parsedOutput),
831
- ...deserialized,
832
- });
833
- return __decorateServiceException(exception, body);
834
- };
835
- const se_CountClosedWorkflowExecutionsInput = (input, context) => {
836
- return take(input, {
837
- closeStatusFilter: _json,
838
- closeTimeFilter: (_) => se_ExecutionTimeFilter(_, context),
839
- domain: [],
840
- executionFilter: _json,
841
- startTimeFilter: (_) => se_ExecutionTimeFilter(_, context),
842
- tagFilter: _json,
843
- typeFilter: _json,
844
- });
845
- };
846
- const se_CountOpenWorkflowExecutionsInput = (input, context) => {
847
- return take(input, {
848
- domain: [],
849
- executionFilter: _json,
850
- startTimeFilter: (_) => se_ExecutionTimeFilter(_, context),
851
- tagFilter: _json,
852
- typeFilter: _json,
853
- });
854
- };
855
- const se_ExecutionTimeFilter = (input, context) => {
856
- return take(input, {
857
- latestDate: (_) => _.getTime() / 1_000,
858
- oldestDate: (_) => _.getTime() / 1_000,
859
- });
860
- };
861
- const se_ListClosedWorkflowExecutionsInput = (input, context) => {
862
- return take(input, {
863
- closeStatusFilter: _json,
864
- closeTimeFilter: (_) => se_ExecutionTimeFilter(_, context),
865
- domain: [],
866
- executionFilter: _json,
867
- maximumPageSize: [],
868
- nextPageToken: [],
869
- reverseOrder: [],
870
- startTimeFilter: (_) => se_ExecutionTimeFilter(_, context),
871
- tagFilter: _json,
872
- typeFilter: _json,
873
- });
874
- };
875
- const se_ListOpenWorkflowExecutionsInput = (input, context) => {
876
- return take(input, {
877
- domain: [],
878
- executionFilter: _json,
879
- maximumPageSize: [],
880
- nextPageToken: [],
881
- reverseOrder: [],
882
- startTimeFilter: (_) => se_ExecutionTimeFilter(_, context),
883
- tagFilter: _json,
884
- typeFilter: _json,
885
- });
886
- };
887
- const de_ActivityTypeDetail = (output, context) => {
888
- return take(output, {
889
- configuration: _json,
890
- typeInfo: (_) => de_ActivityTypeInfo(_, context),
891
- });
892
- };
893
- const de_ActivityTypeInfo = (output, context) => {
894
- return take(output, {
895
- activityType: _json,
896
- creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
897
- deprecationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
898
- description: __expectString,
899
- status: __expectString,
900
- });
901
- };
902
- const de_ActivityTypeInfoList = (output, context) => {
903
- const retVal = (output || [])
904
- .filter((e) => e != null)
905
- .map((entry) => {
906
- return de_ActivityTypeInfo(entry, context);
907
- });
908
- return retVal;
909
- };
910
- const de_ActivityTypeInfos = (output, context) => {
911
- return take(output, {
912
- nextPageToken: __expectString,
913
- typeInfos: (_) => de_ActivityTypeInfoList(_, context),
914
- });
915
- };
916
- const de_DecisionTask = (output, context) => {
917
- return take(output, {
918
- events: (_) => de_HistoryEventList(_, context),
919
- nextPageToken: __expectString,
920
- previousStartedEventId: __expectLong,
921
- startedEventId: __expectLong,
922
- taskToken: __expectString,
923
- workflowExecution: _json,
924
- workflowType: _json,
925
- });
926
- };
927
- const de_History = (output, context) => {
928
- return take(output, {
929
- events: (_) => de_HistoryEventList(_, context),
930
- nextPageToken: __expectString,
931
- });
932
- };
933
- const de_HistoryEvent = (output, context) => {
934
- return take(output, {
935
- activityTaskCancelRequestedEventAttributes: _json,
936
- activityTaskCanceledEventAttributes: _json,
937
- activityTaskCompletedEventAttributes: _json,
938
- activityTaskFailedEventAttributes: _json,
939
- activityTaskScheduledEventAttributes: _json,
940
- activityTaskStartedEventAttributes: _json,
941
- activityTaskTimedOutEventAttributes: _json,
942
- cancelTimerFailedEventAttributes: _json,
943
- cancelWorkflowExecutionFailedEventAttributes: _json,
944
- childWorkflowExecutionCanceledEventAttributes: _json,
945
- childWorkflowExecutionCompletedEventAttributes: _json,
946
- childWorkflowExecutionFailedEventAttributes: _json,
947
- childWorkflowExecutionStartedEventAttributes: _json,
948
- childWorkflowExecutionTerminatedEventAttributes: _json,
949
- childWorkflowExecutionTimedOutEventAttributes: _json,
950
- completeWorkflowExecutionFailedEventAttributes: _json,
951
- continueAsNewWorkflowExecutionFailedEventAttributes: _json,
952
- decisionTaskCompletedEventAttributes: _json,
953
- decisionTaskScheduledEventAttributes: _json,
954
- decisionTaskStartedEventAttributes: _json,
955
- decisionTaskTimedOutEventAttributes: _json,
956
- eventId: __expectLong,
957
- eventTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
958
- eventType: __expectString,
959
- externalWorkflowExecutionCancelRequestedEventAttributes: _json,
960
- externalWorkflowExecutionSignaledEventAttributes: _json,
961
- failWorkflowExecutionFailedEventAttributes: _json,
962
- lambdaFunctionCompletedEventAttributes: _json,
963
- lambdaFunctionFailedEventAttributes: _json,
964
- lambdaFunctionScheduledEventAttributes: _json,
965
- lambdaFunctionStartedEventAttributes: _json,
966
- lambdaFunctionTimedOutEventAttributes: _json,
967
- markerRecordedEventAttributes: _json,
968
- recordMarkerFailedEventAttributes: _json,
969
- requestCancelActivityTaskFailedEventAttributes: _json,
970
- requestCancelExternalWorkflowExecutionFailedEventAttributes: _json,
971
- requestCancelExternalWorkflowExecutionInitiatedEventAttributes: _json,
972
- scheduleActivityTaskFailedEventAttributes: _json,
973
- scheduleLambdaFunctionFailedEventAttributes: _json,
974
- signalExternalWorkflowExecutionFailedEventAttributes: _json,
975
- signalExternalWorkflowExecutionInitiatedEventAttributes: _json,
976
- startChildWorkflowExecutionFailedEventAttributes: _json,
977
- startChildWorkflowExecutionInitiatedEventAttributes: _json,
978
- startLambdaFunctionFailedEventAttributes: _json,
979
- startTimerFailedEventAttributes: _json,
980
- timerCanceledEventAttributes: _json,
981
- timerFiredEventAttributes: _json,
982
- timerStartedEventAttributes: _json,
983
- workflowExecutionCancelRequestedEventAttributes: _json,
984
- workflowExecutionCanceledEventAttributes: _json,
985
- workflowExecutionCompletedEventAttributes: _json,
986
- workflowExecutionContinuedAsNewEventAttributes: _json,
987
- workflowExecutionFailedEventAttributes: _json,
988
- workflowExecutionSignaledEventAttributes: _json,
989
- workflowExecutionStartedEventAttributes: _json,
990
- workflowExecutionTerminatedEventAttributes: _json,
991
- workflowExecutionTimedOutEventAttributes: _json,
992
- });
993
- };
994
- const de_HistoryEventList = (output, context) => {
995
- const retVal = (output || [])
996
- .filter((e) => e != null)
997
- .map((entry) => {
998
- return de_HistoryEvent(entry, context);
999
- });
1000
- return retVal;
1001
- };
1002
- const de_WorkflowExecutionDetail = (output, context) => {
1003
- return take(output, {
1004
- executionConfiguration: _json,
1005
- executionInfo: (_) => de_WorkflowExecutionInfo(_, context),
1006
- latestActivityTaskTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1007
- latestExecutionContext: __expectString,
1008
- openCounts: _json,
1009
- });
1010
- };
1011
- const de_WorkflowExecutionInfo = (output, context) => {
1012
- return take(output, {
1013
- cancelRequested: __expectBoolean,
1014
- closeStatus: __expectString,
1015
- closeTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1016
- execution: _json,
1017
- executionStatus: __expectString,
1018
- parent: _json,
1019
- startTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1020
- tagList: _json,
1021
- workflowType: _json,
1022
- });
1023
- };
1024
- const de_WorkflowExecutionInfoList = (output, context) => {
1025
- const retVal = (output || [])
1026
- .filter((e) => e != null)
1027
- .map((entry) => {
1028
- return de_WorkflowExecutionInfo(entry, context);
1029
- });
1030
- return retVal;
1031
- };
1032
- const de_WorkflowExecutionInfos = (output, context) => {
1033
- return take(output, {
1034
- executionInfos: (_) => de_WorkflowExecutionInfoList(_, context),
1035
- nextPageToken: __expectString,
1036
- });
1037
- };
1038
- const de_WorkflowTypeDetail = (output, context) => {
1039
- return take(output, {
1040
- configuration: _json,
1041
- typeInfo: (_) => de_WorkflowTypeInfo(_, context),
1042
- });
1043
- };
1044
- const de_WorkflowTypeInfo = (output, context) => {
1045
- return take(output, {
1046
- creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1047
- deprecationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1048
- description: __expectString,
1049
- status: __expectString,
1050
- workflowType: _json,
1051
- });
1052
- };
1053
- const de_WorkflowTypeInfoList = (output, context) => {
1054
- const retVal = (output || [])
1055
- .filter((e) => e != null)
1056
- .map((entry) => {
1057
- return de_WorkflowTypeInfo(entry, context);
1058
- });
1059
- return retVal;
1060
- };
1061
- const de_WorkflowTypeInfos = (output, context) => {
1062
- return take(output, {
1063
- nextPageToken: __expectString,
1064
- typeInfos: (_) => de_WorkflowTypeInfoList(_, context),
1065
- });
1066
- };
1067
- const deserializeMetadata = (output) => ({
1068
- httpStatusCode: output.statusCode,
1069
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1070
- extendedRequestId: output.headers["x-amz-id-2"],
1071
- cfId: output.headers["x-amz-cf-id"],
1072
- });
1073
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1074
- const throwDefaultError = withBaseException(__BaseException);
1075
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1076
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1077
- const contents = {
1078
- protocol,
1079
- hostname,
1080
- port,
1081
- method: "POST",
1082
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1083
- headers,
1084
- };
1085
- if (resolvedHostname !== undefined) {
1086
- contents.hostname = resolvedHostname;
1087
- }
1088
- if (body !== undefined) {
1089
- contents.body = body;
1090
- }
1091
- return new __HttpRequest(contents);
1092
- };
1093
- function sharedHeaders(operation) {
1094
- return {
1095
- "content-type": "application/x-amz-json-1.0",
1096
- "x-amz-target": `SimpleWorkflowService.${operation}`,
1097
- };
1098
- }