Skip to content

Commit

Permalink
feat(specs): add watch to pushTask ingestion (#4224)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Dec 10, 2024
1 parent de3180e commit baf16c6
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 77 deletions.
6 changes: 6 additions & 0 deletions specs/ingestion/paths/tasks/v2/pushTask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ post:
- editSettings
parameters:
- $ref: '../../../common/parameters.yml#/pathTaskID'
- name: watch
in: query
description: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
required: false
schema:
type: boolean
requestBody:
description: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
content:
Expand Down
44 changes: 44 additions & 0 deletions tests/CTS/requests/ingestion/pushTask.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,49 @@
]
}
}
},
{
"testName": "allows for watch query parameter",
"parameters": {
"taskID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f",
"pushTaskPayload": {
"action": "addObject",
"records": [
{
"key": "bar",
"foo": "1",
"objectID": "o"
},
{
"key": "baz",
"foo": "2",
"objectID": "k"
}
]
},
"watch": true
},
"request": {
"path": "/2/tasks/6c02aeb1-775e-418e-870b-1faccd4b2c0f/push",
"method": "POST",
"queryParameters": {
"watch": "true"
},
"body": {
"action": "addObject",
"records": [
{
"key": "bar",
"foo": "1",
"objectID": "o"
},
{
"key": "baz",
"foo": "2",
"objectID": "k"
}
]
}
}
}
]
145 changes: 68 additions & 77 deletions tests/output/javascript/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -361,32 +361,32 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:22.9.3":
version: 22.9.3
resolution: "@types/node@npm:22.9.3"
"@types/node@npm:22.10.1":
version: 22.10.1
resolution: "@types/node@npm:22.10.1"
dependencies:
undici-types: "npm:~6.19.8"
checksum: 10/c32a03ff998b8c6cf7d653216508a92b1e6569dd5031ea6cfc2aaa8c75ebbf4172bf1602f0e1f673086e210787dc96667b99ba4d919bc151f9a1f88aeac42822
undici-types: "npm:~6.20.0"
checksum: 10/c802a526da2f3fa3ccefd00a71244e7cb825329951719e79e8fec62b1dbc2855388c830489770611584665ce10be23c05ed585982038b24924e1ba2c2cce03fd
languageName: node
linkType: hard

"@vitest/expect@npm:2.1.5":
version: 2.1.5
resolution: "@vitest/expect@npm:2.1.5"
"@vitest/expect@npm:2.1.8":
version: 2.1.8
resolution: "@vitest/expect@npm:2.1.8"
dependencies:
"@vitest/spy": "npm:2.1.5"
"@vitest/utils": "npm:2.1.5"
"@vitest/spy": "npm:2.1.8"
"@vitest/utils": "npm:2.1.8"
chai: "npm:^5.1.2"
tinyrainbow: "npm:^1.2.0"
checksum: 10/bc10f719c32f29e951754287d774a773535363d26a0425e85d0752fbf3cda3e168447522ef755ee5ac211f1916474feaac0d43f9e9e67c4260e202e532268429
checksum: 10/3594149dd67dfac884a90f8b6a35687cdddd2f5f764562819bf7b66ae2eacfd4aa5e8914155deb4082fbe5a3792dced2fd7e59a948ffafe67acba4d2229dfe5f
languageName: node
linkType: hard

"@vitest/mocker@npm:2.1.5":
version: 2.1.5
resolution: "@vitest/mocker@npm:2.1.5"
"@vitest/mocker@npm:2.1.8":
version: 2.1.8
resolution: "@vitest/mocker@npm:2.1.8"
dependencies:
"@vitest/spy": "npm:2.1.5"
"@vitest/spy": "npm:2.1.8"
estree-walker: "npm:^3.0.3"
magic-string: "npm:^0.30.12"
peerDependencies:
Expand All @@ -397,66 +397,57 @@ __metadata:
optional: true
vite:
optional: true
checksum: 10/2557f2f77f4c7ac0cce79fcd62a99aa8d50979dca14fad1d0578e6f3b3d1855cdab1c7bbfa72a0468bf5f6f172b34b01116cc12758f4181d3819cd1e36a6751e
checksum: 10/f04060f42102caa4cca72059e63c1ecae8b8e091aaa61a2d4a914b129fc711ada4ad117eb0184e49e363757784ed1117fdbf9f4a81a45fe575fd92769740a970
languageName: node
linkType: hard

"@vitest/pretty-format@npm:2.1.5":
version: 2.1.5
resolution: "@vitest/pretty-format@npm:2.1.5"
"@vitest/pretty-format@npm:2.1.8, @vitest/pretty-format@npm:^2.1.8":
version: 2.1.8
resolution: "@vitest/pretty-format@npm:2.1.8"
dependencies:
tinyrainbow: "npm:^1.2.0"
checksum: 10/98bf4e20c0efb893ffb2fe7713f84ccafd362d5022222ce097aab2368c2b0eccf3578d7ef4c26ea2f3d52e3c95f5fc7185ba36d7475d95537aab31ec4ac55d3a
checksum: 10/f0f60c007424194887ad398d202867d58d850154de327993925041e2972357544eea95a22e0bb3a62a470b006ff8de5f691d2078708dcd7f625e24f8a06b26e7
languageName: node
linkType: hard

"@vitest/pretty-format@npm:^2.1.5":
version: 2.1.6
resolution: "@vitest/pretty-format@npm:2.1.6"
"@vitest/runner@npm:2.1.8":
version: 2.1.8
resolution: "@vitest/runner@npm:2.1.8"
dependencies:
tinyrainbow: "npm:^1.2.0"
checksum: 10/be0dea81e14b2e32f9843d96d5c72915acbabe7f06155d396b97f2fc4bef8f88866221ae215820f69674aec58a18ddd43d85aedf6db7d6aa3024ff2813ae1c08
languageName: node
linkType: hard

"@vitest/runner@npm:2.1.5":
version: 2.1.5
resolution: "@vitest/runner@npm:2.1.5"
dependencies:
"@vitest/utils": "npm:2.1.5"
"@vitest/utils": "npm:2.1.8"
pathe: "npm:^1.1.2"
checksum: 10/7b47b089f52db06dee526030435ba3897e8dd7006c0c2d5498070fe10300ae76e46cdaa46562191c7be34544e6d447b0c861996de16659c97e5f7b92c82e5b8a
checksum: 10/27f265a3ab1e20297b948b06232bfa4dc9fda44d1f9bb6206baa9e6fa643b71143ebfd2d1771570296b7ee74a12d684e529a830f545ad61235cefb454e94a8e9
languageName: node
linkType: hard

"@vitest/snapshot@npm:2.1.5":
version: 2.1.5
resolution: "@vitest/snapshot@npm:2.1.5"
"@vitest/snapshot@npm:2.1.8":
version: 2.1.8
resolution: "@vitest/snapshot@npm:2.1.8"
dependencies:
"@vitest/pretty-format": "npm:2.1.5"
"@vitest/pretty-format": "npm:2.1.8"
magic-string: "npm:^0.30.12"
pathe: "npm:^1.1.2"
checksum: 10/a650483fd76db5639ecbb168d599fcb45b020cb89a5ed8e3a74f3419852362a1b9ed443496e320cf3b8054e7b44f6537d67e280d2dfac99a53a2823321fdbf81
checksum: 10/71edf4f574d317579c605ed0a7ecab7ee96fddcebc777bd130774a770ddc692c538f9f5b3dfde89af83ecb36f7338fe880943c83cede58f55e3556768a1a0749
languageName: node
linkType: hard

"@vitest/spy@npm:2.1.5":
version: 2.1.5
resolution: "@vitest/spy@npm:2.1.5"
"@vitest/spy@npm:2.1.8":
version: 2.1.8
resolution: "@vitest/spy@npm:2.1.8"
dependencies:
tinyspy: "npm:^3.0.2"
checksum: 10/8985357bd571feec03c7b3f9941322ba88adbd30f1490485106e5fb6cf12655ae218776e2616b51439bf783db5bacbe4ecc26e674f053a0a9d6cd2f61213eac6
checksum: 10/9a1cb9cf6b23c122681469b5890d91ca26fc8d74953b3d46d293a5d2a4944490106891f6a178cd732ab7a8abbda339f43681c81d1594565ecc3bf3e7f9b7735f
languageName: node
linkType: hard

"@vitest/utils@npm:2.1.5":
version: 2.1.5
resolution: "@vitest/utils@npm:2.1.5"
"@vitest/utils@npm:2.1.8":
version: 2.1.8
resolution: "@vitest/utils@npm:2.1.8"
dependencies:
"@vitest/pretty-format": "npm:2.1.5"
"@vitest/pretty-format": "npm:2.1.8"
loupe: "npm:^3.1.2"
tinyrainbow: "npm:^1.2.0"
checksum: 10/c40c6784d26d0ae8f0125e01a4fe204bc6f6dc5179efaae194042040c4f52b974f3400dde3604f9ed963dba385464690c0c8177623236511e296f5e802cd8533
checksum: 10/be1f4254347199fb5c1d9de8e4537dad4af3f434c033e7cd023165bd4b7e9de16fa0f86664256ab331120585df95ed6be8eea58b209b510651b49f6482051733
languageName: node
linkType: hard

Expand Down Expand Up @@ -652,10 +643,10 @@ __metadata:
languageName: node
linkType: hard

"dotenv@npm:16.4.5":
version: 16.4.5
resolution: "dotenv@npm:16.4.5"
checksum: 10/55a3134601115194ae0f924e54473459ed0d9fc340ae610b676e248cca45aa7c680d86365318ea964e6da4e2ea80c4514c1adab5adb43d6867fb57ff068f95c8
"dotenv@npm:16.4.7":
version: 16.4.7
resolution: "dotenv@npm:16.4.7"
checksum: 10/f13bfe97db88f0df4ec505eeffb8925ec51f2d56a3d0b6d916964d8b4af494e6fb1633ba5d09089b552e77ab2a25de58d70259b2c5ed45ec148221835fc99a0c
languageName: node
linkType: hard

Expand Down Expand Up @@ -990,11 +981,11 @@ __metadata:
dependencies:
"@algolia/client-composition": "link:../../../clients/algoliasearch-client-javascript/packages/client-composition"
"@algolia/requester-testing": "link:../../../clients/algoliasearch-client-javascript/packages/requester-testing"
"@types/node": "npm:22.9.3"
"@types/node": "npm:22.10.1"
algoliasearch: "link:../../../clients/algoliasearch-client-javascript/packages/algoliasearch"
dotenv: "npm:16.4.5"
dotenv: "npm:16.4.7"
typescript: "npm:5.7.2"
vitest: "npm:2.1.5"
vitest: "npm:2.1.8"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -1582,10 +1573,10 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.19.8":
version: 6.19.8
resolution: "undici-types@npm:6.19.8"
checksum: 10/cf0b48ed4fc99baf56584afa91aaffa5010c268b8842f62e02f752df209e3dea138b372a60a963b3b2576ed932f32329ce7ddb9cb5f27a6c83040d8cd74b7a70
"undici-types@npm:~6.20.0":
version: 6.20.0
resolution: "undici-types@npm:6.20.0"
checksum: 10/583ac7bbf4ff69931d3985f4762cde2690bb607844c16a5e2fbb92ed312fe4fa1b365e953032d469fa28ba8b224e88a595f0b10a449332f83fa77c695e567dbe
languageName: node
linkType: hard

Expand All @@ -1607,9 +1598,9 @@ __metadata:
languageName: node
linkType: hard

"vite-node@npm:2.1.5":
version: 2.1.5
resolution: "vite-node@npm:2.1.5"
"vite-node@npm:2.1.8":
version: 2.1.8
resolution: "vite-node@npm:2.1.8"
dependencies:
cac: "npm:^6.7.14"
debug: "npm:^4.3.7"
Expand All @@ -1618,7 +1609,7 @@ __metadata:
vite: "npm:^5.0.0"
bin:
vite-node: vite-node.mjs
checksum: 10/53d90523bf114dce26d5f66aa01aa05c33d33c7b87e8129b8a7f1c0d5014a9922f61feb9df01b54c1f851214604f7e8d2ff58ca257d3bf28539eafa8e8d72b81
checksum: 10/0ff0ed7a6fb234d3ddc4946e4c1150229980cac9f34fb4bd7f443aab0aae2da5b73ac20ff68af1df476545807dc23189247194e8cea0dcdfa394311c73f04429
languageName: node
linkType: hard

Expand Down Expand Up @@ -1665,17 +1656,17 @@ __metadata:
languageName: node
linkType: hard

"vitest@npm:2.1.5":
version: 2.1.5
resolution: "vitest@npm:2.1.5"
"vitest@npm:2.1.8":
version: 2.1.8
resolution: "vitest@npm:2.1.8"
dependencies:
"@vitest/expect": "npm:2.1.5"
"@vitest/mocker": "npm:2.1.5"
"@vitest/pretty-format": "npm:^2.1.5"
"@vitest/runner": "npm:2.1.5"
"@vitest/snapshot": "npm:2.1.5"
"@vitest/spy": "npm:2.1.5"
"@vitest/utils": "npm:2.1.5"
"@vitest/expect": "npm:2.1.8"
"@vitest/mocker": "npm:2.1.8"
"@vitest/pretty-format": "npm:^2.1.8"
"@vitest/runner": "npm:2.1.8"
"@vitest/snapshot": "npm:2.1.8"
"@vitest/spy": "npm:2.1.8"
"@vitest/utils": "npm:2.1.8"
chai: "npm:^5.1.2"
debug: "npm:^4.3.7"
expect-type: "npm:^1.1.0"
Expand All @@ -1687,13 +1678,13 @@ __metadata:
tinypool: "npm:^1.0.1"
tinyrainbow: "npm:^1.2.0"
vite: "npm:^5.0.0"
vite-node: "npm:2.1.5"
vite-node: "npm:2.1.8"
why-is-node-running: "npm:^2.3.0"
peerDependencies:
"@edge-runtime/vm": "*"
"@types/node": ^18.0.0 || >=20.0.0
"@vitest/browser": 2.1.5
"@vitest/ui": 2.1.5
"@vitest/browser": 2.1.8
"@vitest/ui": 2.1.8
happy-dom: "*"
jsdom: "*"
peerDependenciesMeta:
Expand All @@ -1711,7 +1702,7 @@ __metadata:
optional: true
bin:
vitest: vitest.mjs
checksum: 10/83e8f446bd882ccf2911c387ca89055f4565d7fb201dca9c88fae1bca2c2ea2337d7abd1e505f69b86049e396f44eaac121a88270e36bca59f9e66646fff6990
checksum: 10/c2552c068f6faac82eb4e6debb9ed505c0e8016fd6e0a0f0e0dbb5b5417922fbcde80c54af0d3b5a5503a5d6ad6862b6e95b9b59b8b7e98bb553217b9c6fc227
languageName: node
linkType: hard

Expand Down

0 comments on commit baf16c6

Please sign in to comment.