Skip to content

Commit 9ed5b78

Browse files
committed
doc fix
1 parent 9a60d65 commit 9ed5b78

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

website/docs/clients/guides/wait-for-api-key-to-be-valid.mdx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,24 @@ const { key } = await client.addApiKey({
2828
// Poll the task status with defaults values
2929
await client.waitForApiKey({ operation: 'add', key });
3030

31-
// Poll the task status with your options
32-
await client.waitForTask({
33-
operation: 'add',
31+
// The fields to update on your API key
32+
const updatesToPerform: ApiKey = {
33+
acl: ['analytics', 'search'],
34+
indexes: ['products'],
35+
};
36+
37+
// Call for update
38+
await client.updateApiKey({
3439
key,
35-
// Number of maximum retries to do
36-
maxRetries: 100,
37-
// The time to wait between tries
38-
timeout: (retryCount: number): number => Math.min(retryCount * 200, 5000),
40+
apiKey: updatesToPerform,
41+
});
42+
43+
// Wait for update to be done
44+
await client.waitForApiKey({
45+
operation: 'update',
46+
key,
47+
// We provide the updated fields to check if the changes have been applied
48+
apiKey: updatesToPerform,
3949
});
4050
```
4151

website/src/components/TabsLanguage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const languagesTabValues = [
99

1010
export function TabsLanguage(props) {
1111
return (
12-
<Tabs groupId="language" defaultValue="java" values={props.values}>
12+
<Tabs groupId="language" defaultValue="javascript" values={props.values}>
1313
{props.children}
1414
</Tabs>
1515
);

0 commit comments

Comments
 (0)