Skip to content

Commit 738cda3

Browse files
author
awstools
committed
feat(client-amplifyuibuilder): Support for generating code that is compatible with future versions of amplify project dependencies.
1 parent 0ce9353 commit 738cda3

File tree

7 files changed

+179
-101
lines changed

7 files changed

+179
-101
lines changed

clients/client-amplifyuibuilder/src/commands/ExchangeCodeForTokenCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ export interface ExchangeCodeForTokenCommandOutput extends ExchangeCodeForTokenR
4242

4343
/**
4444
* @public
45-
* <p>Exchanges an access code for a token.</p>
45+
* <note>
46+
* <p>This is for internal use.</p>
47+
* </note>
48+
* <p>Amplify uses this action to exchange an access code for a token.</p>
4649
* @example
4750
* Use a bare-bones client and the command you need to make an API call.
4851
* ```javascript

clients/client-amplifyuibuilder/src/commands/GetCodegenJobCommand.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ export interface GetCodegenJobCommandOutput extends GetCodegenJobResponse, __Met
7474
* // dataStoreConfig: {},
7575
* // noApiConfig: {},
7676
* // },
77+
* // dependencies: { // ReactCodegenDependencies
78+
* // "<keys>": "STRING_VALUE",
79+
* // },
7780
* // },
7881
* // },
7982
* // genericDataSchema: { // CodegenJobGenericDataSchema
@@ -161,6 +164,14 @@ export interface GetCodegenJobCommandOutput extends GetCodegenJobResponse, __Met
161164
* // },
162165
* // createdAt: new Date("TIMESTAMP"),
163166
* // modifiedAt: new Date("TIMESTAMP"),
167+
* // dependencies: [ // CodegenDependencies
168+
* // { // CodegenDependency
169+
* // name: "STRING_VALUE",
170+
* // supportedVersion: "STRING_VALUE",
171+
* // isSemVer: true || false,
172+
* // reason: "STRING_VALUE",
173+
* // },
174+
* // ],
164175
* // },
165176
* // };
166177
*

clients/client-amplifyuibuilder/src/commands/RefreshTokenCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ export interface RefreshTokenCommandOutput extends RefreshTokenResponse, __Metad
4242

4343
/**
4444
* @public
45-
* <p>Refreshes a previously issued access token that might have expired.</p>
45+
* <note>
46+
* <p>This is for internal use.</p>
47+
* </note>
48+
* <p>Amplify uses this action to refresh a previously issued access token that might have expired.</p>
4649
* @example
4750
* Use a bare-bones client and the command you need to make an API call.
4851
* ```javascript

clients/client-amplifyuibuilder/src/commands/StartCodegenJobCommand.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ export interface StartCodegenJobCommandOutput extends StartCodegenJobResponse, _
6767
* dataStoreConfig: {},
6868
* noApiConfig: {},
6969
* },
70+
* dependencies: { // ReactCodegenDependencies
71+
* "<keys>": "STRING_VALUE",
72+
* },
7073
* },
7174
* },
7275
* genericDataSchema: { // CodegenJobGenericDataSchema
@@ -174,6 +177,9 @@ export interface StartCodegenJobCommandOutput extends StartCodegenJobResponse, _
174177
* // dataStoreConfig: {},
175178
* // noApiConfig: {},
176179
* // },
180+
* // dependencies: { // ReactCodegenDependencies
181+
* // "<keys>": "STRING_VALUE",
182+
* // },
177183
* // },
178184
* // },
179185
* // genericDataSchema: { // CodegenJobGenericDataSchema
@@ -261,6 +267,14 @@ export interface StartCodegenJobCommandOutput extends StartCodegenJobResponse, _
261267
* // },
262268
* // createdAt: new Date("TIMESTAMP"),
263269
* // modifiedAt: new Date("TIMESTAMP"),
270+
* // dependencies: [ // CodegenDependencies
271+
* // { // CodegenDependency
272+
* // name: "STRING_VALUE",
273+
* // supportedVersion: "STRING_VALUE",
274+
* // isSemVer: true || false,
275+
* // reason: "STRING_VALUE",
276+
* // },
277+
* // ],
264278
* // },
265279
* // };
266280
*

clients/client-amplifyuibuilder/src/models/models_0.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,36 @@ export interface CodegenJobAsset {
7575
downloadUrl?: string;
7676
}
7777

78+
/**
79+
* @public
80+
* <p>Dependency package that may be required for the project code to run.</p>
81+
*/
82+
export interface CodegenDependency {
83+
/**
84+
* @public
85+
* <p>Name of the dependency package.</p>
86+
*/
87+
name?: string;
88+
89+
/**
90+
* @public
91+
* <p>Indicates the version of the supported dependency package.</p>
92+
*/
93+
supportedVersion?: string;
94+
95+
/**
96+
* @public
97+
* <p>Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the dependency package uses Semantic versioning.</p>
98+
*/
99+
isSemVer?: boolean;
100+
101+
/**
102+
* @public
103+
* <p>Indicates the reason to include the dependency package in your project code.</p>
104+
*/
105+
reason?: string;
106+
}
107+
78108
/**
79109
* @public
80110
* <p>Describes the feature flags that you can specify for a code generation job.</p>
@@ -536,6 +566,12 @@ export interface ReactStartCodegenJobData {
536566
* <p>The API configuration for the code generation job.</p>
537567
*/
538568
apiConfiguration?: ApiConfiguration;
569+
570+
/**
571+
* @public
572+
* <p>Lists the dependency packages that may be required for the project code to run.</p>
573+
*/
574+
dependencies?: Record<string, string>;
539575
}
540576

541577
/**
@@ -673,6 +709,12 @@ export interface CodegenJob {
673709
* <p>The time that the code generation job was modified.</p>
674710
*/
675711
modifiedAt?: Date;
712+
713+
/**
714+
* @public
715+
* <p>Lists the dependency packages that may be required for the project code to run.</p>
716+
*/
717+
dependencies?: CodegenDependency[];
676718
}
677719

678720
/**

clients/client-amplifyuibuilder/src/protocols/Aws_restJson1.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,6 +2941,8 @@ const se_PredicateList = (input: Predicate[], context: __SerdeContext): any => {
29412941

29422942
// se_PutMetadataFlagBody omitted.
29432943

2944+
// se_ReactCodegenDependencies omitted.
2945+
29442946
// se_ReactStartCodegenJobData omitted.
29452947

29462948
// se_RefreshTokenRequestBody omitted.
@@ -3095,6 +3097,10 @@ const de_ActionParameters = (output: any, context: __SerdeContext): ActionParame
30953097

30963098
// de_AssociatedFieldsList omitted.
30973099

3100+
// de_CodegenDependencies omitted.
3101+
3102+
// de_CodegenDependency omitted.
3103+
30983104
// de_CodegenFeatureFlags omitted.
30993105

31003106
// de_CodegenGenericDataEnum omitted.
@@ -3128,6 +3134,7 @@ const de_CodegenJob = (output: any, context: __SerdeContext): CodegenJob => {
31283134
asset: _json,
31293135
autoGenerateForms: __expectBoolean,
31303136
createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3137+
dependencies: _json,
31313138
environmentName: __expectString,
31323139
features: _json,
31333140
genericDataSchema: _json,
@@ -3606,6 +3613,8 @@ const de_PredicateList = (output: any, context: __SerdeContext): Predicate[] =>
36063613
return retVal;
36073614
};
36083615

3616+
// de_ReactCodegenDependencies omitted.
3617+
36093618
// de_ReactStartCodegenJobData omitted.
36103619

36113620
// de_RelatedModelFieldsList omitted.

0 commit comments

Comments
 (0)