|
6 | 6 | import { AwsAuthResponse } from '@alithya-oss/backstage-plugin-aws-apps-backend'; |
7 | 7 | import { BackendFeature } from '@backstage/backend-plugin-api'; |
8 | 8 | import { CatalogApi } from '@backstage/catalog-client'; |
9 | | -import { Config } from '@backstage/config'; |
10 | | -import { JsonObject } from '@backstage/types'; |
11 | 9 | import { LoggerService } from '@backstage/backend-plugin-api'; |
| 10 | +import { RootConfigService } from '@backstage/backend-plugin-api'; |
12 | 11 | import { ScmIntegrationRegistry } from '@backstage/integration'; |
13 | 12 | import { TemplateAction } from '@backstage/plugin-scaffolder-node'; |
14 | 13 |
|
15 | 14 | // @public (undocumented) |
16 | 15 | export function createRepoAccessTokenAction(options: { |
17 | 16 | integrations: ScmIntegrationRegistry; |
18 | | - envConfig: Config; |
| 17 | + envConfig: RootConfigService; |
19 | 18 | }): TemplateAction< |
20 | 19 | { |
21 | 20 | repoUrl: string; |
22 | | - secretArn: string; |
23 | 21 | projectId: number; |
24 | | - region?: string; |
| 22 | + secretArn: string; |
| 23 | + region?: string | undefined; |
| 24 | + }, |
| 25 | + { |
| 26 | + [x: string]: any; |
25 | 27 | }, |
26 | | - JsonObject, |
27 | | - 'v1' |
| 28 | + 'v2' |
28 | 29 | >; |
29 | 30 |
|
30 | 31 | // @public (undocumented) |
31 | 32 | export function createS3BucketAction(): TemplateAction< |
32 | 33 | { |
33 | 34 | bucketName: string; |
34 | 35 | envProviders: EnvironmentProvider[]; |
35 | | - tags?: { |
36 | | - Key: string; |
37 | | - Value: string | number | boolean; |
38 | | - }[]; |
| 36 | + tags?: |
| 37 | + | { |
| 38 | + Value: string | number | boolean; |
| 39 | + Key: string; |
| 40 | + }[] |
| 41 | + | undefined; |
| 42 | + }, |
| 43 | + { |
| 44 | + awsBucketName: string; |
39 | 45 | }, |
40 | | - JsonObject, |
41 | | - 'v1' |
| 46 | + 'v2' |
42 | 47 | >; |
43 | 48 |
|
44 | 49 | // @public (undocumented) |
45 | 50 | export function createSecretAction(options: { |
46 | | - envConfig: Config; |
| 51 | + envConfig: RootConfigService; |
47 | 52 | }): TemplateAction< |
48 | 53 | { |
49 | 54 | secretName: string; |
50 | | - description?: string; |
51 | | - region?: string; |
52 | | - tags?: { |
53 | | - Key: string; |
54 | | - Value: string | number | boolean; |
55 | | - }[]; |
| 55 | + description?: string | undefined; |
| 56 | + region?: string | undefined; |
| 57 | + tags?: |
| 58 | + | { |
| 59 | + Value: string | number | boolean; |
| 60 | + Key: string; |
| 61 | + }[] |
| 62 | + | undefined; |
| 63 | + }, |
| 64 | + { |
| 65 | + secretARN?: string | undefined; |
56 | 66 | }, |
57 | | - JsonObject, |
58 | | - 'v1' |
| 67 | + 'v2' |
59 | 68 | >; |
60 | 69 |
|
61 | 70 | // @public (undocumented) |
@@ -87,51 +96,85 @@ export function getComponentInfoAction(): TemplateAction< |
87 | 96 | { |
88 | 97 | componentName: string; |
89 | 98 | }, |
90 | | - JsonObject, |
91 | | - 'v1' |
| 99 | + { |
| 100 | + kebabCaseComponentName: string; |
| 101 | + }, |
| 102 | + 'v2' |
92 | 103 | >; |
93 | 104 |
|
94 | 105 | // @public (undocumented) |
95 | 106 | export function getEnvProvidersAction(options: { |
96 | | - config: Config; |
| 107 | + config: RootConfigService; |
97 | 108 | logger: LoggerService; |
98 | 109 | catalogClient: CatalogApi; |
99 | 110 | }): TemplateAction< |
100 | 111 | { |
101 | 112 | environmentRef: string; |
102 | 113 | }, |
103 | | - JsonObject, |
104 | | - 'v1' |
| 114 | + { |
| 115 | + envName: string; |
| 116 | + envShortName: string; |
| 117 | + envRef: string; |
| 118 | + envDeployManualApproval: string | boolean; |
| 119 | + envProviders: { |
| 120 | + region: string; |
| 121 | + envProviderName: string; |
| 122 | + envProviderType: string; |
| 123 | + assumedRoleArn: string; |
| 124 | + account?: string | undefined; |
| 125 | + accountId?: string | undefined; |
| 126 | + clusterArn?: string | undefined; |
| 127 | + kubectlLambdaArn?: string | undefined; |
| 128 | + envProviderPrefix?: string | undefined; |
| 129 | + vpcId?: string | undefined; |
| 130 | + publicSubnets?: string | undefined; |
| 131 | + privateSubnets?: string | undefined; |
| 132 | + kubectlLambdaRoleArn?: string | undefined; |
| 133 | + }[]; |
| 134 | + }, |
| 135 | + 'v2' |
105 | 136 | >; |
106 | 137 |
|
107 | 138 | // @public (undocumented) |
108 | 139 | export function getPlatformMetadataAction(options: { |
109 | | - envConfig: Config; |
110 | | -}): TemplateAction<JsonObject, JsonObject, 'v1'>; |
| 140 | + envConfig: RootConfigService; |
| 141 | +}): TemplateAction< |
| 142 | + { |
| 143 | + [x: string]: any; |
| 144 | + }, |
| 145 | + { |
| 146 | + platformRegion: string; |
| 147 | + }, |
| 148 | + 'v2' |
| 149 | +>; |
111 | 150 |
|
112 | 151 | // @public (undocumented) |
113 | 152 | export function getPlatformParametersAction(options: { |
114 | | - envConfig: Config; |
| 153 | + envConfig: RootConfigService; |
115 | 154 | }): TemplateAction< |
116 | 155 | { |
117 | 156 | paramKeys: string[]; |
118 | | - region?: string; |
| 157 | + region?: string | undefined; |
| 158 | + }, |
| 159 | + { |
| 160 | + params: Record<string, string>; |
119 | 161 | }, |
120 | | - JsonObject, |
121 | | - 'v1' |
| 162 | + 'v2' |
122 | 163 | >; |
123 | 164 |
|
124 | 165 | // @public (undocumented) |
125 | 166 | export function getSsmParametersAction( |
126 | | - config: Config, |
| 167 | + config: RootConfigService, |
127 | 168 | logger: LoggerService, |
128 | 169 | ): TemplateAction< |
129 | 170 | { |
130 | 171 | paramKeys: string[]; |
131 | 172 | envProviders: EnvironmentProvider[]; |
132 | 173 | }, |
133 | | - JsonObject, |
134 | | - 'v1' |
| 174 | + { |
| 175 | + params: Record<string, Record<string, string>>; |
| 176 | + }, |
| 177 | + 'v2' |
135 | 178 | >; |
136 | 179 |
|
137 | 180 | // @public (undocumented) |
|
0 commit comments