Skip to content

Commit 5bd1502

Browse files
feat(specs): add new ingestion property for push (generated)
algolia/api-clients-automation#5007 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
1 parent e6aeacc commit 5bd1502

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Sources/Ingestion/IngestionClient.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,18 +2554,23 @@ open class IngestionClient {
25542554
/// - parameter pushTaskPayload: (body)
25552555
/// - parameter watch: (query) When provided, the push operation will be synchronous and the API will wait for the
25562556
/// ingestion to be finished before responding. (optional)
2557+
/// - parameter referenceIndexName: (query) This is required when targeting an index that does not have a push
2558+
/// connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source
2559+
/// index name). (optional)
25572560
/// - returns: IngestionWatchResponse
25582561
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
25592562
open func push(
25602563
indexName: String,
25612564
pushTaskPayload: PushTaskPayload,
25622565
watch: Bool? = nil,
2566+
referenceIndexName: String? = nil,
25632567
requestOptions: RequestOptions? = nil
25642568
) async throws -> IngestionWatchResponse {
25652569
let response: Response<IngestionWatchResponse> = try await pushWithHTTPInfo(
25662570
indexName: indexName,
25672571
pushTaskPayload: pushTaskPayload,
25682572
watch: watch,
2573+
referenceIndexName: referenceIndexName,
25692574
requestOptions: requestOptions
25702575
)
25712576

@@ -2592,12 +2597,17 @@ open class IngestionClient {
25922597
//
25932598
// - parameter watch: (query) When provided, the push operation will be synchronous and the API will wait for the
25942599
// ingestion to be finished before responding. (optional)
2600+
//
2601+
// - parameter referenceIndexName: (query) This is required when targeting an index that does not have a push
2602+
// connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source
2603+
// index name). (optional)
25952604
// - returns: RequestBuilder<IngestionWatchResponse>
25962605

25972606
open func pushWithHTTPInfo(
25982607
indexName: String,
25992608
pushTaskPayload: PushTaskPayload,
26002609
watch: Bool? = nil,
2610+
referenceIndexName: String? = nil,
26012611
requestOptions userRequestOptions: RequestOptions? = nil
26022612
) async throws -> Response<IngestionWatchResponse> {
26032613
guard !indexName.isEmpty else {
@@ -2617,6 +2627,7 @@ open class IngestionClient {
26172627
let body = pushTaskPayload
26182628
let queryParameters: [String: Any?] = [
26192629
"watch": watch?.encodeToJSON(),
2630+
"referenceIndexName": referenceIndexName?.encodeToJSON(),
26202631
]
26212632

26222633
let nillableHeaders: [String: Any?]? = nil

0 commit comments

Comments
 (0)