Skip to content

Commit 6ad9e61

Browse files
feat(php): add bridge to transformation on search (#4940) (generated) [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 46a6045 commit 6ad9e61

File tree

24 files changed

+310
-20
lines changed

24 files changed

+310
-20
lines changed

clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/SearchClient.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ public class SearchClient extends ApiClient {
4242

4343
private IngestionClient ingestionTransporter;
4444

45+
/**
46+
* Sets the region of the current algolia application to the configuration, this is required to be
47+
* called if you wish to leverage the transformation pipeline (via the *WithTransformation
48+
* methods).
49+
*
50+
* @param region (required)
51+
*/
4552
public void setTransformationRegion(String region) {
4653
this.ingestionTransporter = new IngestionClient(
4754
this.authInterceptor.getApplicationId(),

clients/algoliasearch-client-php/lib/Api/AbtestingClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ class AbtestingClient
3434
*/
3535
protected $api;
3636

37+
/**
38+
* @var IngestionClient
39+
*/
40+
protected $ingestionTransporter;
41+
3742
/**
3843
* @var AbtestingConfig
3944
*/
@@ -74,7 +79,9 @@ public static function createWithConfig(AbtestingConfig $config)
7479
self::getClusterHosts($config)
7580
);
7681

77-
return new static($apiWrapper, $config);
82+
$client = new static($apiWrapper, $config);
83+
84+
return $client;
7885
}
7986

8087
/**

clients/algoliasearch-client-php/lib/Api/AnalyticsClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ class AnalyticsClient
4646
*/
4747
protected $api;
4848

49+
/**
50+
* @var IngestionClient
51+
*/
52+
protected $ingestionTransporter;
53+
4954
/**
5055
* @var AnalyticsConfig
5156
*/
@@ -86,7 +91,9 @@ public static function createWithConfig(AnalyticsConfig $config)
8691
self::getClusterHosts($config)
8792
);
8893

89-
return new static($apiWrapper, $config);
94+
$client = new static($apiWrapper, $config);
95+
96+
return $client;
9097
}
9198

9299
/**

clients/algoliasearch-client-php/lib/Api/CompositionClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ class CompositionClient
3030
*/
3131
protected $api;
3232

33+
/**
34+
* @var IngestionClient
35+
*/
36+
protected $ingestionTransporter;
37+
3338
/**
3439
* @var CompositionConfig
3540
*/
@@ -67,7 +72,9 @@ public static function createWithConfig(CompositionConfig $config)
6772
self::getClusterHosts($config)
6873
);
6974

70-
return new static($apiWrapper, $config);
75+
$client = new static($apiWrapper, $config);
76+
77+
return $client;
7178
}
7279

7380
/**

clients/algoliasearch-client-php/lib/Api/IngestionClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ class IngestionClient
7676
*/
7777
protected $api;
7878

79+
/**
80+
* @var IngestionClient
81+
*/
82+
protected $ingestionTransporter;
83+
7984
/**
8085
* @var IngestionConfig
8186
*/
@@ -116,7 +121,9 @@ public static function createWithConfig(IngestionConfig $config)
116121
self::getClusterHosts($config)
117122
);
118123

119-
return new static($apiWrapper, $config);
124+
$client = new static($apiWrapper, $config);
125+
126+
return $client;
120127
}
121128

122129
/**

clients/algoliasearch-client-php/lib/Api/InsightsClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ class InsightsClient
2828
*/
2929
protected $api;
3030

31+
/**
32+
* @var IngestionClient
33+
*/
34+
protected $ingestionTransporter;
35+
3136
/**
3237
* @var InsightsConfig
3338
*/
@@ -68,7 +73,9 @@ public static function createWithConfig(InsightsConfig $config)
6873
self::getClusterHosts($config)
6974
);
7075

71-
return new static($apiWrapper, $config);
76+
$client = new static($apiWrapper, $config);
77+
78+
return $client;
7279
}
7380

7481
/**

clients/algoliasearch-client-php/lib/Api/MonitoringClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class MonitoringClient
3232
*/
3333
protected $api;
3434

35+
/**
36+
* @var IngestionClient
37+
*/
38+
protected $ingestionTransporter;
39+
3540
/**
3641
* @var MonitoringConfig
3742
*/
@@ -69,7 +74,9 @@ public static function createWithConfig(MonitoringConfig $config)
6974
self::getClusterHosts($config)
7075
);
7176

72-
return new static($apiWrapper, $config);
77+
$client = new static($apiWrapper, $config);
78+
79+
return $client;
7380
}
7481

7582
/**

clients/algoliasearch-client-php/lib/Api/PersonalizationClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ class PersonalizationClient
3030
*/
3131
protected $api;
3232

33+
/**
34+
* @var IngestionClient
35+
*/
36+
protected $ingestionTransporter;
37+
3338
/**
3439
* @var PersonalizationConfig
3540
*/
@@ -70,7 +75,9 @@ public static function createWithConfig(PersonalizationConfig $config)
7075
self::getClusterHosts($config)
7176
);
7277

73-
return new static($apiWrapper, $config);
78+
$client = new static($apiWrapper, $config);
79+
80+
return $client;
7481
}
7582

7683
/**

clients/algoliasearch-client-php/lib/Api/QuerySuggestionsClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class QuerySuggestionsClient
3232
*/
3333
protected $api;
3434

35+
/**
36+
* @var IngestionClient
37+
*/
38+
protected $ingestionTransporter;
39+
3540
/**
3641
* @var QuerySuggestionsConfig
3742
*/
@@ -72,7 +77,9 @@ public static function createWithConfig(QuerySuggestionsConfig $config)
7277
self::getClusterHosts($config)
7378
);
7479

75-
return new static($apiWrapper, $config);
80+
$client = new static($apiWrapper, $config);
81+
82+
return $client;
7683
}
7784

7885
/**

clients/algoliasearch-client-php/lib/Api/RecommendClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ class RecommendClient
3434
*/
3535
protected $api;
3636

37+
/**
38+
* @var IngestionClient
39+
*/
40+
protected $ingestionTransporter;
41+
3742
/**
3843
* @var RecommendConfig
3944
*/
@@ -71,7 +76,9 @@ public static function createWithConfig(RecommendConfig $config)
7176
self::getClusterHosts($config)
7277
);
7378

74-
return new static($apiWrapper, $config);
79+
$client = new static($apiWrapper, $config);
80+
81+
return $client;
7582
}
7683

7784
/**

0 commit comments

Comments
 (0)