/
AmplifyUIBuilder.ts
382 lines (357 loc) · 14.3 KB
/
AmplifyUIBuilder.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
// smithy-typescript generated code
import { createAggregatedClient } from "@aws-sdk/smithy-client";
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
import { AmplifyUIBuilderClient, AmplifyUIBuilderClientConfig } from "./AmplifyUIBuilderClient";
import {
CreateComponentCommand,
CreateComponentCommandInput,
CreateComponentCommandOutput,
} from "./commands/CreateComponentCommand";
import { CreateFormCommand, CreateFormCommandInput, CreateFormCommandOutput } from "./commands/CreateFormCommand";
import { CreateThemeCommand, CreateThemeCommandInput, CreateThemeCommandOutput } from "./commands/CreateThemeCommand";
import {
DeleteComponentCommand,
DeleteComponentCommandInput,
DeleteComponentCommandOutput,
} from "./commands/DeleteComponentCommand";
import { DeleteFormCommand, DeleteFormCommandInput, DeleteFormCommandOutput } from "./commands/DeleteFormCommand";
import { DeleteThemeCommand, DeleteThemeCommandInput, DeleteThemeCommandOutput } from "./commands/DeleteThemeCommand";
import {
ExchangeCodeForTokenCommand,
ExchangeCodeForTokenCommandInput,
ExchangeCodeForTokenCommandOutput,
} from "./commands/ExchangeCodeForTokenCommand";
import {
ExportComponentsCommand,
ExportComponentsCommandInput,
ExportComponentsCommandOutput,
} from "./commands/ExportComponentsCommand";
import { ExportFormsCommand, ExportFormsCommandInput, ExportFormsCommandOutput } from "./commands/ExportFormsCommand";
import {
ExportThemesCommand,
ExportThemesCommandInput,
ExportThemesCommandOutput,
} from "./commands/ExportThemesCommand";
import {
GetComponentCommand,
GetComponentCommandInput,
GetComponentCommandOutput,
} from "./commands/GetComponentCommand";
import { GetFormCommand, GetFormCommandInput, GetFormCommandOutput } from "./commands/GetFormCommand";
import { GetMetadataCommand, GetMetadataCommandInput, GetMetadataCommandOutput } from "./commands/GetMetadataCommand";
import { GetThemeCommand, GetThemeCommandInput, GetThemeCommandOutput } from "./commands/GetThemeCommand";
import {
ListComponentsCommand,
ListComponentsCommandInput,
ListComponentsCommandOutput,
} from "./commands/ListComponentsCommand";
import { ListFormsCommand, ListFormsCommandInput, ListFormsCommandOutput } from "./commands/ListFormsCommand";
import { ListThemesCommand, ListThemesCommandInput, ListThemesCommandOutput } from "./commands/ListThemesCommand";
import {
PutMetadataFlagCommand,
PutMetadataFlagCommandInput,
PutMetadataFlagCommandOutput,
} from "./commands/PutMetadataFlagCommand";
import {
RefreshTokenCommand,
RefreshTokenCommandInput,
RefreshTokenCommandOutput,
} from "./commands/RefreshTokenCommand";
import {
UpdateComponentCommand,
UpdateComponentCommandInput,
UpdateComponentCommandOutput,
} from "./commands/UpdateComponentCommand";
import { UpdateFormCommand, UpdateFormCommandInput, UpdateFormCommandOutput } from "./commands/UpdateFormCommand";
import { UpdateThemeCommand, UpdateThemeCommandInput, UpdateThemeCommandOutput } from "./commands/UpdateThemeCommand";
const commands = {
CreateComponentCommand,
CreateFormCommand,
CreateThemeCommand,
DeleteComponentCommand,
DeleteFormCommand,
DeleteThemeCommand,
ExchangeCodeForTokenCommand,
ExportComponentsCommand,
ExportFormsCommand,
ExportThemesCommand,
GetComponentCommand,
GetFormCommand,
GetMetadataCommand,
GetThemeCommand,
ListComponentsCommand,
ListFormsCommand,
ListThemesCommand,
PutMetadataFlagCommand,
RefreshTokenCommand,
UpdateComponentCommand,
UpdateFormCommand,
UpdateThemeCommand,
};
export interface AmplifyUIBuilder {
/**
* @see {@link CreateComponentCommand}
*/
createComponent(
args: CreateComponentCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateComponentCommandOutput>;
createComponent(args: CreateComponentCommandInput, cb: (err: any, data?: CreateComponentCommandOutput) => void): void;
createComponent(
args: CreateComponentCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateComponentCommandOutput) => void
): void;
/**
* @see {@link CreateFormCommand}
*/
createForm(args: CreateFormCommandInput, options?: __HttpHandlerOptions): Promise<CreateFormCommandOutput>;
createForm(args: CreateFormCommandInput, cb: (err: any, data?: CreateFormCommandOutput) => void): void;
createForm(
args: CreateFormCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateFormCommandOutput) => void
): void;
/**
* @see {@link CreateThemeCommand}
*/
createTheme(args: CreateThemeCommandInput, options?: __HttpHandlerOptions): Promise<CreateThemeCommandOutput>;
createTheme(args: CreateThemeCommandInput, cb: (err: any, data?: CreateThemeCommandOutput) => void): void;
createTheme(
args: CreateThemeCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateThemeCommandOutput) => void
): void;
/**
* @see {@link DeleteComponentCommand}
*/
deleteComponent(
args: DeleteComponentCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteComponentCommandOutput>;
deleteComponent(args: DeleteComponentCommandInput, cb: (err: any, data?: DeleteComponentCommandOutput) => void): void;
deleteComponent(
args: DeleteComponentCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteComponentCommandOutput) => void
): void;
/**
* @see {@link DeleteFormCommand}
*/
deleteForm(args: DeleteFormCommandInput, options?: __HttpHandlerOptions): Promise<DeleteFormCommandOutput>;
deleteForm(args: DeleteFormCommandInput, cb: (err: any, data?: DeleteFormCommandOutput) => void): void;
deleteForm(
args: DeleteFormCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteFormCommandOutput) => void
): void;
/**
* @see {@link DeleteThemeCommand}
*/
deleteTheme(args: DeleteThemeCommandInput, options?: __HttpHandlerOptions): Promise<DeleteThemeCommandOutput>;
deleteTheme(args: DeleteThemeCommandInput, cb: (err: any, data?: DeleteThemeCommandOutput) => void): void;
deleteTheme(
args: DeleteThemeCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteThemeCommandOutput) => void
): void;
/**
* @see {@link ExchangeCodeForTokenCommand}
*/
exchangeCodeForToken(
args: ExchangeCodeForTokenCommandInput,
options?: __HttpHandlerOptions
): Promise<ExchangeCodeForTokenCommandOutput>;
exchangeCodeForToken(
args: ExchangeCodeForTokenCommandInput,
cb: (err: any, data?: ExchangeCodeForTokenCommandOutput) => void
): void;
exchangeCodeForToken(
args: ExchangeCodeForTokenCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ExchangeCodeForTokenCommandOutput) => void
): void;
/**
* @see {@link ExportComponentsCommand}
*/
exportComponents(
args: ExportComponentsCommandInput,
options?: __HttpHandlerOptions
): Promise<ExportComponentsCommandOutput>;
exportComponents(
args: ExportComponentsCommandInput,
cb: (err: any, data?: ExportComponentsCommandOutput) => void
): void;
exportComponents(
args: ExportComponentsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ExportComponentsCommandOutput) => void
): void;
/**
* @see {@link ExportFormsCommand}
*/
exportForms(args: ExportFormsCommandInput, options?: __HttpHandlerOptions): Promise<ExportFormsCommandOutput>;
exportForms(args: ExportFormsCommandInput, cb: (err: any, data?: ExportFormsCommandOutput) => void): void;
exportForms(
args: ExportFormsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ExportFormsCommandOutput) => void
): void;
/**
* @see {@link ExportThemesCommand}
*/
exportThemes(args: ExportThemesCommandInput, options?: __HttpHandlerOptions): Promise<ExportThemesCommandOutput>;
exportThemes(args: ExportThemesCommandInput, cb: (err: any, data?: ExportThemesCommandOutput) => void): void;
exportThemes(
args: ExportThemesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ExportThemesCommandOutput) => void
): void;
/**
* @see {@link GetComponentCommand}
*/
getComponent(args: GetComponentCommandInput, options?: __HttpHandlerOptions): Promise<GetComponentCommandOutput>;
getComponent(args: GetComponentCommandInput, cb: (err: any, data?: GetComponentCommandOutput) => void): void;
getComponent(
args: GetComponentCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetComponentCommandOutput) => void
): void;
/**
* @see {@link GetFormCommand}
*/
getForm(args: GetFormCommandInput, options?: __HttpHandlerOptions): Promise<GetFormCommandOutput>;
getForm(args: GetFormCommandInput, cb: (err: any, data?: GetFormCommandOutput) => void): void;
getForm(
args: GetFormCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetFormCommandOutput) => void
): void;
/**
* @see {@link GetMetadataCommand}
*/
getMetadata(args: GetMetadataCommandInput, options?: __HttpHandlerOptions): Promise<GetMetadataCommandOutput>;
getMetadata(args: GetMetadataCommandInput, cb: (err: any, data?: GetMetadataCommandOutput) => void): void;
getMetadata(
args: GetMetadataCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetMetadataCommandOutput) => void
): void;
/**
* @see {@link GetThemeCommand}
*/
getTheme(args: GetThemeCommandInput, options?: __HttpHandlerOptions): Promise<GetThemeCommandOutput>;
getTheme(args: GetThemeCommandInput, cb: (err: any, data?: GetThemeCommandOutput) => void): void;
getTheme(
args: GetThemeCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetThemeCommandOutput) => void
): void;
/**
* @see {@link ListComponentsCommand}
*/
listComponents(
args: ListComponentsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListComponentsCommandOutput>;
listComponents(args: ListComponentsCommandInput, cb: (err: any, data?: ListComponentsCommandOutput) => void): void;
listComponents(
args: ListComponentsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListComponentsCommandOutput) => void
): void;
/**
* @see {@link ListFormsCommand}
*/
listForms(args: ListFormsCommandInput, options?: __HttpHandlerOptions): Promise<ListFormsCommandOutput>;
listForms(args: ListFormsCommandInput, cb: (err: any, data?: ListFormsCommandOutput) => void): void;
listForms(
args: ListFormsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListFormsCommandOutput) => void
): void;
/**
* @see {@link ListThemesCommand}
*/
listThemes(args: ListThemesCommandInput, options?: __HttpHandlerOptions): Promise<ListThemesCommandOutput>;
listThemes(args: ListThemesCommandInput, cb: (err: any, data?: ListThemesCommandOutput) => void): void;
listThemes(
args: ListThemesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListThemesCommandOutput) => void
): void;
/**
* @see {@link PutMetadataFlagCommand}
*/
putMetadataFlag(
args: PutMetadataFlagCommandInput,
options?: __HttpHandlerOptions
): Promise<PutMetadataFlagCommandOutput>;
putMetadataFlag(args: PutMetadataFlagCommandInput, cb: (err: any, data?: PutMetadataFlagCommandOutput) => void): void;
putMetadataFlag(
args: PutMetadataFlagCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PutMetadataFlagCommandOutput) => void
): void;
/**
* @see {@link RefreshTokenCommand}
*/
refreshToken(args: RefreshTokenCommandInput, options?: __HttpHandlerOptions): Promise<RefreshTokenCommandOutput>;
refreshToken(args: RefreshTokenCommandInput, cb: (err: any, data?: RefreshTokenCommandOutput) => void): void;
refreshToken(
args: RefreshTokenCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: RefreshTokenCommandOutput) => void
): void;
/**
* @see {@link UpdateComponentCommand}
*/
updateComponent(
args: UpdateComponentCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateComponentCommandOutput>;
updateComponent(args: UpdateComponentCommandInput, cb: (err: any, data?: UpdateComponentCommandOutput) => void): void;
updateComponent(
args: UpdateComponentCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateComponentCommandOutput) => void
): void;
/**
* @see {@link UpdateFormCommand}
*/
updateForm(args: UpdateFormCommandInput, options?: __HttpHandlerOptions): Promise<UpdateFormCommandOutput>;
updateForm(args: UpdateFormCommandInput, cb: (err: any, data?: UpdateFormCommandOutput) => void): void;
updateForm(
args: UpdateFormCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateFormCommandOutput) => void
): void;
/**
* @see {@link UpdateThemeCommand}
*/
updateTheme(args: UpdateThemeCommandInput, options?: __HttpHandlerOptions): Promise<UpdateThemeCommandOutput>;
updateTheme(args: UpdateThemeCommandInput, cb: (err: any, data?: UpdateThemeCommandOutput) => void): void;
updateTheme(
args: UpdateThemeCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateThemeCommandOutput) => void
): void;
}
/**
* @public
* <p>The Amplify UI Builder API provides a programmatic interface for creating
* and configuring user interface (UI) component libraries and themes for use in your Amplify applications. You can then connect these UI components to an application's
* backend Amazon Web Services resources.</p>
* <p>You can also use the Amplify Studio visual designer to create UI components
* and model data for an app. For more information, see <a href="https://docs.amplify.aws/console/adminui/intro">Introduction</a> in the
* <i>Amplify Docs</i>.</p>
* <p>The Amplify Framework is a comprehensive set of SDKs, libraries, tools, and
* documentation for client app development. For more information, see the <a href="https://docs.amplify.aws/">Amplify Framework</a>. For more information about
* deploying an Amplify application to Amazon Web Services, see the <a href="https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html">Amplify User Guide</a>.</p>
*/
export class AmplifyUIBuilder extends AmplifyUIBuilderClient implements AmplifyUIBuilder {
public constructor(config: AmplifyUIBuilderClientConfig) {
super(config);
createAggregatedClient(commands, this);
}
}