Skip to content

Commit

Permalink
fix(specs): consequence is required when saving rules (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4146

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Nov 26, 2024
1 parent 43a024e commit 2f644d2
Show file tree
Hide file tree
Showing 15 changed files with 92 additions and 266 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"packages/*"
],
"scripts": {
"build": "lerna run build --scope '@algolia/requester-testing' --scope '@algolia/logger-console' --scope 'algoliasearch' --scope '@algolia/client-composition' --include-dependencies",
"build": "lerna run build --skip-nx-cache --scope '@algolia/requester-testing' --scope '@algolia/logger-console' --scope 'algoliasearch' --scope '@algolia/client-composition' --include-dependencies",
"clean": "lerna run clean",
"release:publish": "tsc --project scripts/tsconfig.json && node scripts/dist/publish.js",
"test": "lerna run test $*",
Expand Down
1 change: 1 addition & 0 deletions packages/algoliasearch/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/lite/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/lite/builds/browser.umd.js',
Expand Down
1 change: 1 addition & 0 deletions packages/client-abtesting/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
1 change: 1 addition & 0 deletions packages/client-analytics/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
1 change: 1 addition & 0 deletions packages/client-composition/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
1 change: 1 addition & 0 deletions packages/client-insights/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
1 change: 1 addition & 0 deletions packages/client-personalization/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
1 change: 1 addition & 0 deletions packages/client-query-suggestions/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
2 changes: 1 addition & 1 deletion packages/client-search/model/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type Rule = {
*/
conditions?: Array<Condition>;

consequence?: Consequence;
consequence: Consequence;

/**
* Description of the rule\'s purpose to help you distinguish between different rules.
Expand Down
1 change: 1 addition & 0 deletions packages/client-search/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
3 changes: 3 additions & 0 deletions packages/client-search/src/searchClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2346,6 +2346,9 @@ export function createSearchClient({
if (!rule.objectID) {
throw new Error('Parameter `rule.objectID` is required when calling `saveRule`.');
}
if (!rule.consequence) {
throw new Error('Parameter `rule.consequence` is required when calling `saveRule`.');
}

const requestPath = '/1/indexes/{indexName}/rules/{objectID}'
.replace('{indexName}', encodeURIComponent(indexName))
Expand Down
1 change: 1 addition & 0 deletions packages/ingestion/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
1 change: 1 addition & 0 deletions packages/monitoring/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
1 change: 1 addition & 0 deletions packages/recommend/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default [
{
input: 'dist/builds/browser.min.js',
external: ['dom'],
cache: false,
output: {
esModule: false,
file: 'dist/builds/browser.umd.js',
Expand Down
Loading

0 comments on commit 2f644d2

Please sign in to comment.