Skip to content

Commit 1647f38

Browse files
feat(specs): add authentications to ingestion transformations (generated)
algolia/api-clients-automation#3494 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 6dad050 commit 1647f38

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

client/src/commonMain/kotlin/com/algolia/client/api/IngestionClient.kt

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ public class IngestionClient(
11951195
}
11961196

11971197
/**
1198-
* Try a transformation.
1198+
* Try a transformation before creating it.
11991199
*
12001200
* Required API Key ACLs:
12011201
* - addObject
@@ -1216,6 +1216,30 @@ public class IngestionClient(
12161216
)
12171217
}
12181218

1219+
/**
1220+
* Try a transformation before updating it.
1221+
*
1222+
* Required API Key ACLs:
1223+
* - addObject
1224+
* - deleteIndex
1225+
* - editSettings
1226+
* @param transformationID Unique identifier of a transformation.
1227+
* @param transformationTry
1228+
* @param requestOptions additional request configuration.
1229+
*/
1230+
public suspend fun tryTransformationBeforeUpdate(transformationID: String, transformationTry: TransformationTry, requestOptions: RequestOptions? = null): TransformationTryResponse {
1231+
require(transformationID.isNotBlank()) { "Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`." }
1232+
val requestConfig = RequestConfig(
1233+
method = RequestMethod.POST,
1234+
path = listOf("1", "transformations", "$transformationID", "try"),
1235+
body = transformationTry,
1236+
)
1237+
return requester.execute(
1238+
requestConfig = requestConfig,
1239+
requestOptions = requestOptions,
1240+
)
1241+
}
1242+
12191243
/**
12201244
* Updates an authentication resource.
12211245
*

client/src/commonMain/kotlin/com/algolia/client/model/ingestion/Transformation.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import kotlinx.serialization.json.*
1111
* @param code The source code of the transformation.
1212
* @param name The uniquely identified name of your transformation.
1313
* @param createdAt Date of creation in RFC 3339 format.
14+
* @param authenticationIDs The authentications associated for the current transformation.
1415
* @param description A descriptive name for your transformation of what it does.
1516
* @param updatedAt Date of last update in RFC 3339 format.
1617
*/
@@ -29,6 +30,9 @@ public data class Transformation(
2930
/** Date of creation in RFC 3339 format. */
3031
@SerialName(value = "createdAt") val createdAt: String,
3132

33+
/** The authentications associated for the current transformation. */
34+
@SerialName(value = "authenticationIDs") val authenticationIDs: List<String>? = null,
35+
3236
/** A descriptive name for your transformation of what it does. */
3337
@SerialName(value = "description") val description: String? = null,
3438

client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationCreate.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import kotlinx.serialization.json.*
1010
* @param code The source code of the transformation.
1111
* @param name The uniquely identified name of your transformation.
1212
* @param description A descriptive name for your transformation of what it does.
13+
* @param authenticationIDs The authentications associated for the current transformation.
1314
*/
1415
@Serializable
1516
public data class TransformationCreate(
@@ -22,4 +23,7 @@ public data class TransformationCreate(
2223

2324
/** A descriptive name for your transformation of what it does. */
2425
@SerialName(value = "description") val description: String? = null,
26+
27+
/** The authentications associated for the current transformation. */
28+
@SerialName(value = "authenticationIDs") val authenticationIDs: List<String>? = null,
2529
)

client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TransformationTry.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import kotlinx.serialization.json.*
99
*
1010
* @param code The source code of the transformation.
1111
* @param sampleRecord The record to apply the given code to.
12+
* @param authentications
1213
*/
1314
@Serializable
1415
public data class TransformationTry(
@@ -18,4 +19,6 @@ public data class TransformationTry(
1819

1920
/** The record to apply the given code to. */
2021
@SerialName(value = "sampleRecord") val sampleRecord: JsonObject,
22+
23+
@SerialName(value = "authentications") val authentications: List<AuthenticationCreate>? = null,
2124
)

0 commit comments

Comments
 (0)