Skip to content

Commit f9ac3a7

Browse files
authored
feat(specs): introduce multifeed composition behavior for beta release (#5828)
1 parent 3572843 commit f9ac3a7

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

clients/algoliasearch-client-javascript/packages/composition/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.22.4",
2+
"version": "1.22.4-beta.0",
33
"repository": {
44
"type": "git",
55
"url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
compositionBehavior:
22
type: object
33
additionalProperties: false
4+
description: An object containing either an `injection` or `multifeed` behavior schema, but not both.
45
properties:
56
injection:
67
$ref: './injection/Behaviour.yml#/injection'
7-
required:
8-
- injection
8+
multifeed:
9+
$ref: './multifeed/Behaviour.yml#/multifeed'
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
multifeed:
2+
title: multifeed
3+
type: object
4+
additionalProperties: false
5+
properties:
6+
feeds:
7+
type: object
8+
description: A key-value store of Feed ID to Feed. Currently, the only supported Feed type is an Injection.
9+
additionalProperties:
10+
$ref: '../injection/Behaviour.yml#/injection'
11+
feedsOrder:
12+
type: array
13+
description: A list of Feed IDs that specifies the order in which to order the results in the response. The IDs should be a subset of those in the Feeds object, and only those specified will be processed. When this field is not set, all Feeds are processed and returned with a default ordering.
14+
items:
15+
type: string
16+
required:
17+
- feeds
18+
example:
19+
feeds:
20+
products-feed:
21+
main:
22+
source:
23+
search:
24+
index: products
25+
injectedItems:
26+
- key: sponsored
27+
position: 0
28+
length: 4
29+
source:
30+
search:
31+
index: products
32+
params:
33+
filters: 'sponsored:true'
34+
articles-feed:
35+
main:
36+
source:
37+
search:
38+
index: articles
39+
feedsOrder:
40+
- products-feed
41+
- articles-feed

0 commit comments

Comments
 (0)