Skip to content

Commit ac11dd4

Browse files
committed
add array shape for response
1 parent 5398621 commit ac11dd4

1 file changed

Lines changed: 90 additions & 1 deletion

File tree

src/Keboola/StorageApi/Components.php

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,98 @@ public function getComponent($componentId)
131131
return $this->client->apiGet($this->branchPrefix . "components/{$componentId}");
132132
}
133133

134+
/**
135+
* Get public component detail
136+
* @return array{
137+
* id: string,
138+
* type: string,
139+
* name: string,
140+
* description: string,
141+
* longDescription: string,
142+
* hasUI: bool,
143+
* hasRun: bool,
144+
* ico32: string,
145+
* ico64: string,
146+
* ico128: string,
147+
* data: array{
148+
* definition: array{
149+
* type: string,
150+
* uri: string,
151+
* tag: string,
152+
* repository: array{
153+
* region: string
154+
* }
155+
* },
156+
* cpu_shares: int,
157+
* memory: string,
158+
* configuration_format: string,
159+
* process_timeout: int
160+
* },
161+
* flags: array<string>,
162+
* configurationSchema: array{
163+
* title: string,
164+
* type: string,
165+
* properties: array<string, array{
166+
* type: string,
167+
* title: string,
168+
* description: string,
169+
* default?: string
170+
* }>,
171+
* required: array<string>
172+
* },
173+
* emptyConfiguration: array<mixed>,
174+
* uiOptions: array<mixed>,
175+
* configurationDescription: string,
176+
* uri: string
177+
* }
178+
*/
134179
public function getPublicComponentDetail(string $componentId): array
135180
{
136-
return $this->client->apiGet('components/'.$componentId);
181+
/** @var array{
182+
* id: string,
183+
* type: string,
184+
* name: string,
185+
* description: string,
186+
* longDescription: string,
187+
* hasUI: bool,
188+
* hasRun: bool,
189+
* ico32: string,
190+
* ico64: string,
191+
* ico128: string,
192+
* data: array{
193+
* definition: array{
194+
* type: string,
195+
* uri: string,
196+
* tag: string,
197+
* repository: array{
198+
* region: string
199+
* }
200+
* },
201+
* cpu_shares: int,
202+
* memory: string,
203+
* configuration_format: string,
204+
* process_timeout: int
205+
* },
206+
* flags: array<string>,
207+
* configurationSchema: array{
208+
* title: string,
209+
* type: string,
210+
* properties: array<string, array{
211+
* type: string,
212+
* title: string,
213+
* description: string,
214+
* default?: string
215+
* }>,
216+
* required: array<string>
217+
* },
218+
* emptyConfiguration: array<mixed>,
219+
* uiOptions: array<mixed>,
220+
* configurationDescription: string,
221+
* uri: string
222+
* } $result
223+
*/
224+
$result = $this->client->apiGet('components/'.$componentId);
225+
return $result;
137226
}
138227

139228
public function listComponentConfigurations(ListComponentConfigurationsOptions $options)

0 commit comments

Comments
 (0)