Skip to content

Commit 9bcad78

Browse files
algolia-botmillotp
andcommitted
snippets: remove snippets for non-existing helpers (#5368) (generated) [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent 8ce3aad commit 9bcad78

File tree

9 files changed

+213
-673
lines changed

9 files changed

+213
-673
lines changed

docs/bundled/search-snippets.json

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,6 @@
667667
"deleteObject": {
668668
"default": "final response = await client.deleteObject(\n indexName: \"<YOUR_INDEX_NAME>\",\n objectID: \"uniqueID\",\n);"
669669
},
670-
"deleteObjects": {
671-
"default": "final response = await client.deleteObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objectIDs: [\n \"1\",\n \"2\",\n ],\n);"
672-
},
673670
"deleteRule": {
674671
"delete rule simple case": "final response = await client.deleteRule(\n indexName: \"<YOUR_INDEX_NAME>\",\n objectID: \"id1\",\n);",
675672
"delete rule with simple characters to encode in objectID": "final response = await client.deleteRule(\n indexName: \"<YOUR_INDEX_NAME>\",\n objectID: \"test/with/slash\",\n);"
@@ -680,15 +677,6 @@
680677
"deleteSynonym": {
681678
"default": "final response = await client.deleteSynonym(\n indexName: \"<YOUR_INDEX_NAME>\",\n objectID: \"id1\",\n);"
682679
},
683-
"generateSecuredApiKey": {
684-
"api key basic": "final response = client.generateSecuredApiKey(\n parentApiKey: \"2640659426d5107b6e47d75db9cbaef8\",\n restrictions: SecuredApiKeyRestrictions(\n validUntil: 2524604400,\n restrictIndices: [\n \"Movies\",\n ],\n ),\n);",
685-
"with searchParams": "final response = client.generateSecuredApiKey(\n parentApiKey: \"2640659426d5107b6e47d75db9cbaef8\",\n restrictions: SecuredApiKeyRestrictions(\n validUntil: 2524604400,\n restrictIndices: [\n \"Movies\",\n \"cts_e2e_settings\",\n ],\n restrictSources: \"192.168.1.0/24\",\n filters: \"category:Book OR category:Ebook AND _tags:published\",\n userToken: \"user123\",\n searchParams: SearchParamsObject(\n query: \"batman\",\n typoTolerance: TypoToleranceEnum.fromJson(\"strict\"),\n aroundRadius: AroundRadiusAll.fromJson(\"all\"),\n mode: Mode.fromJson(\"neuralSearch\"),\n hitsPerPage: 10,\n optionalWords: [\n \"one\",\n \"two\",\n ],\n ),\n ),\n);",
686-
"with filters": "final response = client.generateSecuredApiKey(\n parentApiKey: \"2640659426d5107b6e47d75db9cbaef8\",\n restrictions: SecuredApiKeyRestrictions(\n filters:\n \"user:user42 AND user:public AND (visible_by:John OR visible_by:group/Finance)\",\n ),\n);",
687-
"with visible_by filter": "final response = client.generateSecuredApiKey(\n parentApiKey: \"2640659426d5107b6e47d75db9cbaef8\",\n restrictions: SecuredApiKeyRestrictions(\n filters: \"visible_by:group/Finance\",\n ),\n);",
688-
"with userID": "final response = client.generateSecuredApiKey(\n parentApiKey: \"2640659426d5107b6e47d75db9cbaef8\",\n restrictions: SecuredApiKeyRestrictions(\n userToken: \"user42\",\n ),\n);",
689-
"mcm with filters": "final response = client.generateSecuredApiKey(\n parentApiKey: \"YourSearchOnlyApiKey\",\n restrictions: SecuredApiKeyRestrictions(\n filters: \"user:user42 AND user:public\",\n ),\n);",
690-
"mcm with user token": "final response = client.generateSecuredApiKey(\n parentApiKey: \"YourSearchOnlyApiKey\",\n restrictions: SecuredApiKeyRestrictions(\n userToken: \"user42\",\n ),\n);"
691-
},
692680
"getApiKey": {
693681
"default": "final response = await client.getApiKey(\n key: \"myTestApiKey\",\n);"
694682
},
@@ -739,11 +727,6 @@
739727
"hasPendingMappings with minimal parameters": "final response = await client.hasPendingMappings();",
740728
"hasPendingMappings with parameters": "final response = await client.hasPendingMappings(\n getClusters: true,\n);"
741729
},
742-
"indexExists": {
743-
"indexExists": "final response = await client.indexExists(\n indexName: \"<YOUR_INDEX_NAME>\",\n);",
744-
"indexNotExists": "final response = await client.indexExists(\n indexName: \"<YOUR_INDEX_NAME>\",\n);",
745-
"indexExistsWithError": "final response = await client.indexExists(\n indexName: \"<YOUR_INDEX_NAME>\",\n);"
746-
},
747730
"listApiKeys": {
748731
"default": "final response = await client.listApiKeys();"
749732
},
@@ -776,18 +759,9 @@
776759
"add men pant": "final response = await client.partialUpdateObject(\n indexName: \"<YOUR_INDEX_NAME>\",\n objectID: \"productId\",\n attributesToUpdate: {\n 'categoryPageId': {\n '_operation': \"Add\",\n 'value': \"men-clothing-pants\",\n },\n },\n);",
777760
"remove men pant": "final response = await client.partialUpdateObject(\n indexName: \"<YOUR_INDEX_NAME>\",\n objectID: \"productId\",\n attributesToUpdate: {\n 'categoryPageId': {\n '_operation': \"Remove\",\n 'value': \"men-clothing-pants\",\n },\n },\n);"
778761
},
779-
"partialUpdateObjects": {
780-
"call partialUpdateObjects with createIfNotExists=true": "final response = await client.partialUpdateObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objects: [\n {\n 'objectID': \"1\",\n 'name': \"Adam\",\n },\n {\n 'objectID': \"2\",\n 'name': \"Benoit\",\n },\n ],\n createIfNotExists: true,\n);",
781-
"call partialUpdateObjects with createIfNotExists=false": "final response = await client.partialUpdateObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objects: [\n {\n 'objectID': \"3\",\n 'name': \"Cyril\",\n },\n {\n 'objectID': \"4\",\n 'name': \"David\",\n },\n ],\n createIfNotExists: false,\n);"
782-
},
783762
"removeUserId": {
784763
"default": "final response = await client.removeUserId(\n userID: \"uniqueID\",\n);"
785764
},
786-
"replaceAllObjects": {
787-
"call replaceAllObjects without error": "final response = await client.replaceAllObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objects: [\n {\n 'objectID': \"1\",\n 'name': \"Adam\",\n },\n {\n 'objectID': \"2\",\n 'name': \"Benoit\",\n },\n {\n 'objectID': \"3\",\n 'name': \"Cyril\",\n },\n {\n 'objectID': \"4\",\n 'name': \"David\",\n },\n {\n 'objectID': \"5\",\n 'name': \"Eva\",\n },\n {\n 'objectID': \"6\",\n 'name': \"Fiona\",\n },\n {\n 'objectID': \"7\",\n 'name': \"Gael\",\n },\n {\n 'objectID': \"8\",\n 'name': \"Hugo\",\n },\n {\n 'objectID': \"9\",\n 'name': \"Igor\",\n },\n {\n 'objectID': \"10\",\n 'name': \"Julia\",\n },\n ],\n batchSize: 3,\n);",
788-
"call replaceAllObjects with partial scopes": "final response = await client.replaceAllObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objects: [\n {\n 'objectID': \"1\",\n 'name': \"Adam\",\n },\n {\n 'objectID': \"2\",\n 'name': \"Benoit\",\n },\n ],\n batchSize: 77,\n scopes: [\n ScopeType.fromJson(\"settings\"),\n ScopeType.fromJson(\"synonyms\"),\n ],\n);",
789-
"replaceAllObjects should cleanup on failure": "final response = await client.replaceAllObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objects: [\n {\n 'objectID': \"fine\",\n 'body': \"small obj\",\n },\n {\n 'objectID': \"toolarge\",\n 'body': \"something bigger than 10KB\",\n },\n ],\n);"
790-
},
791765
"replaceSources": {
792766
"default": "final response = await client.replaceSources(\n source: [\n Source(\n source: \"theSource\",\n description: \"theDescription\",\n ),\n ],\n);"
793767
},
@@ -797,12 +771,6 @@
797771
"saveObject": {
798772
"default": "final response = await client.saveObject(\n indexName: \"<YOUR_INDEX_NAME>\",\n body: {\n 'name': \"Black T-shirt\",\n 'color': \"#000000||black\",\n 'availableIn': \"https://source.unsplash.com/100x100/?paris||Paris\",\n 'objectID': \"myID\",\n },\n);"
799773
},
800-
"saveObjects": {
801-
"call saveObjects without error": "final response = await client.saveObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objects: [\n {\n 'objectID': \"1\",\n 'name': \"Adam\",\n },\n {\n 'objectID': \"2\",\n 'name': \"Benoit\",\n },\n ],\n);",
802-
"saveObjects should report errors": "final response = await client.saveObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objects: [\n {\n 'objectID': \"1\",\n 'name': \"Adam\",\n },\n {\n 'objectID': \"2\",\n 'name': \"Benoit\",\n },\n ],\n);",
803-
"saveObjectsPlaylist": "final response = await client.saveObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objects: [\n {\n 'objectID': \"1\",\n 'visibility': \"public\",\n 'name': \"Hot 100 Billboard Charts\",\n 'playlistId': \"d3e8e8f3-0a4f-4b7d-9b6b-7e8f4e8e3a0f\",\n 'createdAt': \"1500240452\",\n },\n ],\n);",
804-
"saveObjectsPublicUser": "final response = await client.saveObjects(\n indexName: \"<YOUR_INDEX_NAME>\",\n objects: [\n {\n 'objectID': \"1\",\n 'visibility': \"public\",\n 'name': \"Hot 100 Billboard Charts\",\n 'playlistId': \"d3e8e8f3-0a4f-4b7d-9b6b-7e8f4e8e3a0f\",\n 'createdAt': \"1500240452\",\n },\n ],\n waitForTasks: false,\n batchSize: 1000,\n requestOptions: RequestOptions(\n headers: {\n 'X-Algolia-User-ID': '*',\n },\n ),\n);"
805-
},
806774
"saveRule": {
807775
"saveRule with minimal parameters": "final response = await client.saveRule(\n indexName: \"<YOUR_INDEX_NAME>\",\n objectID: \"id1\",\n rule: Rule(\n objectID: \"id1\",\n conditions: [\n Condition(\n pattern: \"apple\",\n anchoring: Anchoring.fromJson(\"contains\"),\n ),\n ],\n consequence: Consequence(\n params: ConsequenceParams(\n filters: \"brand:xiaomi\",\n ),\n ),\n ),\n);",
808776
"saveRule with all parameters": "final response = await client.saveRule(\n indexName: \"<YOUR_INDEX_NAME>\",\n objectID: \"id1\",\n rule: Rule(\n objectID: \"id1\",\n conditions: [\n Condition(\n pattern: \"apple\",\n anchoring: Anchoring.fromJson(\"contains\"),\n alternatives: false,\n context: \"search\",\n ),\n ],\n consequence: Consequence(\n params: ConsequenceParams(\n filters: \"brand:apple\",\n query: ConsequenceQueryObject(\n remove: [\n \"algolia\",\n ],\n edits: [\n Edit(\n type: EditType.fromJson(\"remove\"),\n delete: \"abc\",\n insert: \"cde\",\n ),\n Edit(\n type: EditType.fromJson(\"replace\"),\n delete: \"abc\",\n insert: \"cde\",\n ),\n ],\n ),\n ),\n hide: [\n ConsequenceHide(\n objectID: \"321\",\n ),\n ],\n filterPromotes: false,\n userData: {\n 'algolia': \"aloglia\",\n },\n promote: [\n PromoteObjectID(\n objectID: \"abc\",\n position: 3,\n ),\n PromoteObjectIDs(\n objectIDs: [\n \"abc\",\n \"def\",\n ],\n position: 1,\n ),\n ],\n ),\n description: \"test\",\n enabled: true,\n validity: [\n TimeRange(\n from: 1656670273,\n until: 1656670277,\n ),\n ],\n ),\n forwardToReplicas: true,\n);",
@@ -1146,17 +1114,6 @@
11461114
"updateApiKey": {
11471115
"default": "final response = await client.updateApiKey(\n key: \"ALGOLIA_API_KEY\",\n apiKey: ApiKey(\n acl: [\n Acl.fromJson(\"search\"),\n Acl.fromJson(\"addObject\"),\n ],\n validity: 300,\n maxQueriesPerIPPerHour: 100,\n maxHitsPerQuery: 20,\n ),\n);"
11481116
},
1149-
"waitForApiKey": {
1150-
"wait for api key helper - add": "final response = await client.waitForApiKey(\n key: \"api-key-add-operation-test-dart\",\n operation: ApiKeyOperation.fromJson(\"add\"),\n);",
1151-
"wait for api key - update": "final response = await client.waitForApiKey(\n key: \"api-key-update-operation-test-dart\",\n operation: ApiKeyOperation.fromJson(\"update\"),\n apiKey: ApiKey(\n description: \"my updated api key\",\n acl: [\n Acl.fromJson(\"search\"),\n Acl.fromJson(\"addObject\"),\n Acl.fromJson(\"deleteObject\"),\n ],\n indexes: [\n \"Movies\",\n \"Books\",\n ],\n referers: [\n \"*google.com\",\n \"*algolia.com\",\n ],\n validity: 305,\n maxQueriesPerIPPerHour: 95,\n maxHitsPerQuery: 20,\n ),\n);",
1152-
"wait for api key - delete": "final response = await client.waitForApiKey(\n key: \"api-key-delete-operation-test-dart\",\n operation: ApiKeyOperation.fromJson(\"delete\"),\n);"
1153-
},
1154-
"waitForAppTask": {
1155-
"default": "final response = await client.waitForAppTask(\n taskID: 123,\n);"
1156-
},
1157-
"waitForTask": {
1158-
"default": "final response = await client.waitForTask(\n indexName: \"<YOUR_INDEX_NAME>\",\n taskID: 123,\n);"
1159-
},
11601117
"init": {
11611118
"default": "final client =\n SearchClient(appId: 'ALGOLIA_APPLICATION_ID', apiKey: 'ALGOLIA_API_KEY');"
11621119
}

docs/bundled/search.json

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3819,6 +3819,18 @@
38193819
"tags": [
38203820
"Api Keys"
38213821
],
3822+
"x-available-languages": [
3823+
"csharp",
3824+
"go",
3825+
"java",
3826+
"javascript",
3827+
"kotlin",
3828+
"php",
3829+
"python",
3830+
"ruby",
3831+
"scala",
3832+
"swift"
3833+
],
38223834
"operationId": "waitForApiKey",
38233835
"summary": "Wait for an API key operation",
38243836
"description": "Waits for an API key to be added, updated, or deleted.",
@@ -3874,6 +3886,18 @@
38743886
"tags": [
38753887
"Records"
38763888
],
3889+
"x-available-languages": [
3890+
"csharp",
3891+
"go",
3892+
"java",
3893+
"javascript",
3894+
"kotlin",
3895+
"php",
3896+
"python",
3897+
"ruby",
3898+
"scala",
3899+
"swift"
3900+
],
38773901
"operationId": "waitForTask",
38783902
"summary": "Wait for operation to complete",
38793903
"description": "Wait for a task to complete to ensure synchronized index updates.\n\nAll Algolia write operations are asynchronous. When you make a request for a write operation, for example, to add or update records in your index, Algolia creates a task on a queue and returns a taskID. The task itself runs separately, depending on the server load.\n",
@@ -3918,6 +3942,18 @@
39183942
"/waitForAppTask": {
39193943
"get": {
39203944
"x-helper": true,
3945+
"x-available-languages": [
3946+
"csharp",
3947+
"go",
3948+
"java",
3949+
"javascript",
3950+
"kotlin",
3951+
"php",
3952+
"python",
3953+
"ruby",
3954+
"scala",
3955+
"swift"
3956+
],
39213957
"operationId": "waitForAppTask",
39223958
"summary": "Wait for application-level operation to complete",
39233959
"description": "Wait for a application-level task to complete.",
@@ -3996,6 +4032,18 @@
39964032
"tags": [
39974033
"Api Keys"
39984034
],
4035+
"x-available-languages": [
4036+
"csharp",
4037+
"go",
4038+
"java",
4039+
"javascript",
4040+
"kotlin",
4041+
"php",
4042+
"python",
4043+
"ruby",
4044+
"scala",
4045+
"swift"
4046+
],
39994047
"operationId": "generateSecuredApiKey",
40004048
"summary": "Create secured API keys",
40014049
"description": "Generates a secured API key without any requests to Algolia's servers.\n\nSecured API keys are API keys that you generate on your server without any API request to Algolia.\nSecured API keys help in environments where you can't easily update the client-side code, such as mobile apps,\nor when you need to restrict access to a part of your index for every user.\n\nWhen your users start searching, instead of using the Search API key, they request a short-lived secured API key from your server.\nOn your server, you use this method to create a secured API key, with any restrictions you'd like, such as filters, index access restrictions,\nor expiration times. The API key gets longer the more restrictions you add.\nYour users then use the secured API key to search with Algolia.\n\nYou can't create secured API keys from other secured API keys or from your Admin API key.\nThe generated API key can have the same restrictions as the parent API key, or be more restrictive.\n",
@@ -4122,6 +4170,18 @@
41224170
"tags": [
41234171
"Records"
41244172
],
4173+
"x-available-languages": [
4174+
"csharp",
4175+
"go",
4176+
"java",
4177+
"javascript",
4178+
"kotlin",
4179+
"php",
4180+
"python",
4181+
"ruby",
4182+
"scala",
4183+
"swift"
4184+
],
41254185
"operationId": "replaceAllObjects",
41264186
"summary": "Replace all records in an index",
41274187
"description": "Replace all records from your index with a new set of records.\n\nThis method lets you replace all records in your index without downtime. It performs these operations:\n 1. Copy settings, synonyms, and rules from your original index to a temporary index.\n 2. Add your new records to the temporary index.\n 3. Replace your original index with the temporary index.\n\nUse the safe parameter to ensure that these (asynchronous) operations are performed in sequence.\nIf there's an error duing one of these steps, the temporary index won't be deleted.\nThis operation is rate-limited.\nThis method creates a temporary index: your record count is temporarily doubled. Algolia doesn't count the three days with the highest number of records towards your monthly usage.\nIf you're on a legacy plan (before July 2020), this method counts two operations towards your usage (in addition to the number of records): copySettings and moveIndex.\nThe API key you use for this operation must have access to the index YourIndex and the temporary index YourIndex_tmp.\n",
@@ -4350,6 +4410,18 @@
43504410
"tags": [
43514411
"Records"
43524412
],
4413+
"x-available-languages": [
4414+
"csharp",
4415+
"go",
4416+
"java",
4417+
"javascript",
4418+
"kotlin",
4419+
"php",
4420+
"python",
4421+
"ruby",
4422+
"scala",
4423+
"swift"
4424+
],
43534425
"operationId": "saveObjects",
43544426
"summary": "Saves the given array of objects in the given index",
43554427
"description": "Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n",
@@ -4519,6 +4591,18 @@
45194591
"tags": [
45204592
"Records"
45214593
],
4594+
"x-available-languages": [
4595+
"csharp",
4596+
"go",
4597+
"java",
4598+
"javascript",
4599+
"kotlin",
4600+
"php",
4601+
"python",
4602+
"ruby",
4603+
"scala",
4604+
"swift"
4605+
],
45224606
"operationId": "deleteObjects",
45234607
"summary": "Deletes every records for the given objectIDs",
45244608
"description": "Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.\n",
@@ -4598,6 +4682,18 @@
45984682
"tags": [
45994683
"Records"
46004684
],
4685+
"x-available-languages": [
4686+
"csharp",
4687+
"go",
4688+
"java",
4689+
"javascript",
4690+
"kotlin",
4691+
"php",
4692+
"python",
4693+
"ruby",
4694+
"scala",
4695+
"swift"
4696+
],
46014697
"operationId": "partialUpdateObjects",
46024698
"summary": "Replaces object content of all the given objects according to their respective `objectID` field",
46034699
"description": "Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n",
@@ -4787,6 +4883,18 @@
47874883
"tags": [
47884884
"Index"
47894885
],
4886+
"x-available-languages": [
4887+
"csharp",
4888+
"go",
4889+
"java",
4890+
"javascript",
4891+
"kotlin",
4892+
"php",
4893+
"python",
4894+
"ruby",
4895+
"scala",
4896+
"swift"
4897+
],
47904898
"operationId": "indexExists",
47914899
"summary": "Check if an index exists or not",
47924900
"description": "You can initialize an index with any name. The index is created on Algolia's servers when you add objects or set settings. To prevent accidentally creating new indices, or changing existing indices, you can use the exists method. The exists method returns a boolean that indicates whether an initialized index has been created.\n",

0 commit comments

Comments
 (0)