|
37 | 37 | "default": "await client.WaitForAppTaskAsync(response.TaskID);"
|
38 | 38 | },
|
39 | 39 | "waitForApiKey": {
|
40 |
| - "default": { |
41 |
| - "add": "await client.WaitForApiKeyAsync(ApiKeyOperation.Add, response.Key);", |
42 |
| - "update": "await client.WaitForApiKeyAsync(ApiKeyOperation.Update, response.Key, {\n Acl = new List<Acl> { Enum.Parse<Acl>(\"Search\"), Enum.Parse<Acl>(\"AddObject\") },\n Validity = 300,\n MaxQueriesPerIPPerHour = 100,\n MaxHitsPerQuery = 20,\n });", |
43 |
| - "delete": "await client.WaitForApiKeyAsync(ApiKeyOperation.Delete, response.Key);" |
44 |
| - } |
| 40 | + "add": "await client.WaitForApiKeyAsync(ApiKeyOperation.Add, response.Key);", |
| 41 | + "update": "await client.WaitForApiKeyAsync(ApiKeyOperation.Update, response.Key, {\n Acl = new List<Acl> { Enum.Parse<Acl>(\"Search\"), Enum.Parse<Acl>(\"AddObject\") },\n Validity = 300,\n MaxQueriesPerIPPerHour = 100,\n MaxHitsPerQuery = 20,\n });", |
| 42 | + "delete": "await client.WaitForApiKeyAsync(ApiKeyOperation.Delete, response.Key);" |
45 | 43 | },
|
46 | 44 | "waitForTask": {
|
47 | 45 | "default": "await client.WaitForTaskAsync(\"<<indexName>>\", response.TaskID);"
|
|
52 | 50 | "default": "await client.waitAppTask(response.taskID);"
|
53 | 51 | },
|
54 | 52 | "waitForApiKey": {
|
55 |
| - "default": { |
56 |
| - "add": "", |
57 |
| - "update": "", |
58 |
| - "delete": "" |
59 |
| - } |
| 53 | + "add": "", |
| 54 | + "update": "", |
| 55 | + "delete": "" |
60 | 56 | },
|
61 | 57 | "waitForTask": {
|
62 | 58 | "default": "await client.waitTask('<<indexName>>', response.taskID);"
|
|
97 | 93 | "default": "taskResponse, err := searchClient.WaitForAppTask(response.TaskID, nil, nil, nil)\nif err != nil {\n panic(err)\n}"
|
98 | 94 | },
|
99 | 95 | "waitForApiKey": {
|
100 |
| - "default": { |
101 |
| - "add": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_ADD, response.Key, nil)\nif err != nil {\n panic(err)\n}", |
102 |
| - "update": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_UPDATE, response.Key, search.NewEmptyApiKey().SetAcl([]search.Acl{search.Acl(\"search\"), search.Acl(\"addObject\")}).SetValidity(300).SetMaxQueriesPerIPPerHour(100).SetMaxHitsPerQuery(20))\nif err != nil {\n panic(err)\n}", |
103 |
| - "delete": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_DELETE, response.Key, nil)\nif err != nil {\n panic(err)\n}" |
104 |
| - } |
| 96 | + "add": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_ADD, response.Key, nil)\nif err != nil {\n panic(err)\n}", |
| 97 | + "update": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_UPDATE, response.Key, search.NewEmptyApiKey().SetAcl([]search.Acl{search.Acl(\"search\"), search.Acl(\"addObject\")}).SetValidity(300).SetMaxQueriesPerIPPerHour(100).SetMaxHitsPerQuery(20))\nif err != nil {\n panic(err)\n}", |
| 98 | + "delete": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_DELETE, response.Key, nil)\nif err != nil {\n panic(err)\n}" |
105 | 99 | },
|
106 | 100 | "waitForTask": {
|
107 | 101 | "default": "taskResponse, err := searchClient.WaitForTask(\"<<indexName>>\", response.TaskID, nil, nil, nil)\nif err != nil {\n panic(err)\n}"
|
|
145 | 139 | "default": "client.waitForAppTask(response.getTaskID());"
|
146 | 140 | },
|
147 | 141 | "waitForApiKey": {
|
148 |
| - "default": { |
149 |
| - "add": "client.waitForApiKey(ApiKeyOperation.ADD, response.Key, null)", |
150 |
| - "update": "client.waitForApiKey(ApiKeyOperation.UPDATE, response.Key, new ApiKey()\n .setAcl(List.of(Acl.SEARCH, Acl.ADD_OBJECT))\n .setValidity(300)\n .setMaxQueriesPerIPPerHour(100)\n .setMaxHitsPerQuery(20))", |
151 |
| - "delete": "client.waitForApiKey(ApiKeyOperation.DELETE, response.Key, null)" |
152 |
| - } |
| 142 | + "add": "client.waitForApiKey(ApiKeyOperation.ADD, response.Key, null)", |
| 143 | + "update": "client.waitForApiKey(ApiKeyOperation.UPDATE, response.Key, new ApiKey()\n .setAcl(List.of(Acl.SEARCH, Acl.ADD_OBJECT))\n .setValidity(300)\n .setMaxQueriesPerIPPerHour(100)\n .setMaxHitsPerQuery(20))", |
| 144 | + "delete": "client.waitForApiKey(ApiKeyOperation.DELETE, response.Key, null)" |
153 | 145 | },
|
154 | 146 | "waitForTask": {
|
155 | 147 | "default": "client.waitForTask(\"<<indexName>>\", response.getTaskID());"
|
|
193 | 185 | "default": "await client.waitForAppTask({ taskID: response.taskID });"
|
194 | 186 | },
|
195 | 187 | "waitForApiKey": {
|
196 |
| - "default": { |
197 |
| - "add": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key });", |
198 |
| - "update": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key, apiKey: {\n acl: ['search', 'addObject'],\n validity: 300,\n maxQueriesPerIPPerHour: 100,\n maxHitsPerQuery: 20,\n }});", |
199 |
| - "delete": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key });" |
200 |
| - } |
| 188 | + "add": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key });", |
| 189 | + "update": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key, apiKey: {\n acl: ['search', 'addObject'],\n validity: 300,\n maxQueriesPerIPPerHour: 100,\n maxHitsPerQuery: 20,\n }});", |
| 190 | + "delete": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key });" |
201 | 191 | },
|
202 | 192 | "waitForTask": {
|
203 | 193 | "default": "await client.waitForTask({ indexName: '<<indexName>>', taskID: response.taskID });"
|
|
241 | 231 | "default": "client.waitAppTask(response.taskID)"
|
242 | 232 | },
|
243 | 233 | "waitForApiKey": {
|
244 |
| - "default": { |
245 |
| - "add": "", |
246 |
| - "update": "", |
247 |
| - "delete": "" |
248 |
| - } |
| 234 | + "add": "", |
| 235 | + "update": "", |
| 236 | + "delete": "" |
249 | 237 | },
|
250 | 238 | "waitForTask": {
|
251 | 239 | "default": "client.waitTask(\"<<indexName>>\", response.taskID)"
|
|
289 | 277 | "default": "$client->waitForAppTask($response['taskID']);"
|
290 | 278 | },
|
291 | 279 | "waitForApiKey": {
|
292 |
| - "default": { |
293 |
| - "add": "$client->waitForApiKey('<<operation>>', $response['key']);", |
294 |
| - "update": "$client->waitForApiKey('<<operation>>', $response['key'], [\n 'acl' => [\n 'search',\n 'addObject',\n ],\n 'validity' => 300,\n 'maxQueriesPerIPPerHour' => 100,\n 'maxHitsPerQuery' => 20,\n ]);", |
295 |
| - "delete": "$client->waitForApiKey('<<operation>>', $response['key']);" |
296 |
| - } |
| 280 | + "add": "$client->waitForApiKey('<<operation>>', $response['key']);", |
| 281 | + "update": "$client->waitForApiKey('<<operation>>', $response['key'], [\n 'acl' => [\n 'search',\n 'addObject',\n ],\n 'validity' => 300,\n 'maxQueriesPerIPPerHour' => 100,\n 'maxHitsPerQuery' => 20,\n ]);", |
| 282 | + "delete": "$client->waitForApiKey('<<operation>>', $response['key']);" |
297 | 283 | },
|
298 | 284 | "waitForTask": {
|
299 | 285 | "default": "$client->waitForTask('<<indexName>>', $response['taskID']);"
|
|
337 | 323 | "default": "await client.wait_for_app_task(task_id=response.task_id)"
|
338 | 324 | },
|
339 | 325 | "waitForApiKey": {
|
340 |
| - "default": { |
341 |
| - "add": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)", |
342 |
| - "update": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key, api_key={\n \"acl\": [\n \"search\",\n \"addObject\",\n ],\n \"validity\": 300,\n \"maxQueriesPerIPPerHour\": 100,\n \"maxHitsPerQuery\": 20,\n })", |
343 |
| - "delete": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)" |
344 |
| - } |
| 326 | + "add": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)", |
| 327 | + "update": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key, api_key={\n \"acl\": [\n \"search\",\n \"addObject\",\n ],\n \"validity\": 300,\n \"maxQueriesPerIPPerHour\": 100,\n \"maxHitsPerQuery\": 20,\n })", |
| 328 | + "delete": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)" |
345 | 329 | },
|
346 | 330 | "waitForTask": {
|
347 | 331 | "default": "await client.wait_for_task(index_name=\"<<indexName>>\", task_id=response.task_id)"
|
|
385 | 369 | "default": "client.wait_for_app_task(response.task_id)"
|
386 | 370 | },
|
387 | 371 | "waitForApiKey": {
|
388 |
| - "default": { |
389 |
| - "add": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)", |
390 |
| - "update": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key, api_key=ApiKey.new(\n acl: ['search', 'addObject'],\n validity: 300,\n max_queries_per_ip_per_hour: 100,\n max_hits_per_query: 20\n ))", |
391 |
| - "delete": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)" |
392 |
| - } |
| 372 | + "add": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)", |
| 373 | + "update": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key, api_key=ApiKey.new(\n acl: ['search', 'addObject'],\n validity: 300,\n max_queries_per_ip_per_hour: 100,\n max_hits_per_query: 20\n ))", |
| 374 | + "delete": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)" |
393 | 375 | },
|
394 | 376 | "waitForTask": {
|
395 | 377 | "default": "client.wait_for_task(\"<<indexName>>\", response.task_id)"
|
|
433 | 415 | "default": "client.waitAppTask(response.getTaskID())"
|
434 | 416 | },
|
435 | 417 | "waitForApiKey": {
|
436 |
| - "default": { |
437 |
| - "add": "", |
438 |
| - "update": "", |
439 |
| - "delete": "" |
440 |
| - } |
| 418 | + "add": "", |
| 419 | + "update": "", |
| 420 | + "delete": "" |
441 | 421 | },
|
442 | 422 | "waitForTask": {
|
443 | 423 | "default": "client.waitTask(\"<<indexName>>\", response.getTaskID())"
|
|
481 | 461 | "default": "try await client.waitForAppTask(with: response.taskID)"
|
482 | 462 | },
|
483 | 463 | "waitForApiKey": {
|
484 |
| - "default": { |
485 |
| - "add": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.add)", |
486 |
| - "update": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.update, apiKey: ApiKey(\n acl: [Acl.search, Acl.addObject],\n maxHitsPerQuery: 20,\n maxQueriesPerIPPerHour: 100,\n validity: 300\n ))", |
487 |
| - "delete": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.delete)" |
488 |
| - } |
| 464 | + "add": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.add)", |
| 465 | + "update": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.update, apiKey: ApiKey(\n acl: [Acl.search, Acl.addObject],\n maxHitsPerQuery: 20,\n maxQueriesPerIPPerHour: 100,\n validity: 300\n ))", |
| 466 | + "delete": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.delete)" |
489 | 467 | },
|
490 | 468 | "waitForTask": {
|
491 | 469 | "default": "try await client.waitForTask(with: response.taskID, in: \"<<indexName>>\")"
|
|
0 commit comments