Skip to content

Commit d6ee0f0

Browse files
feat(specs): update try transformation specs for no-code (generated)
algolia/api-clients-automation#4974 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
1 parent 50137c6 commit d6ee0f0

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

packages/ingestion/model/transformationCreate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export type TransformationCreate = {
1717
*/
1818
name: string;
1919

20-
type: TransformationType;
20+
type?: TransformationType | undefined;
2121

22-
input: TransformationInput;
22+
input?: TransformationInput | undefined;
2323

2424
/**
2525
* A descriptive name for your transformation of what it does.

packages/ingestion/model/transformationTry.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

33
import type { AuthenticationCreate } from './authenticationCreate';
4+
import type { TransformationInput } from './transformationInput';
5+
import type { TransformationType } from './transformationType';
46

57
export type TransformationTry = {
68
/**
79
* It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code.
810
*/
9-
code: string;
11+
code?: string | undefined;
12+
13+
type?: TransformationType | undefined;
14+
15+
input?: TransformationInput | undefined;
1016

1117
/**
1218
* The record to apply the given code to.

packages/ingestion/src/ingestionClient.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,6 @@ export function createIngestionClient({
454454
if (!transformationCreate.name) {
455455
throw new Error('Parameter `transformationCreate.name` is required when calling `createTransformation`.');
456456
}
457-
if (!transformationCreate.type) {
458-
throw new Error('Parameter `transformationCreate.type` is required when calling `createTransformation`.');
459-
}
460-
if (!transformationCreate.input) {
461-
throw new Error('Parameter `transformationCreate.input` is required when calling `createTransformation`.');
462-
}
463457

464458
const requestPath = '/1/transformations';
465459
const headers: Headers = {};
@@ -2202,9 +2196,6 @@ export function createIngestionClient({
22022196
throw new Error('Parameter `transformationTry` is required when calling `tryTransformation`.');
22032197
}
22042198

2205-
if (!transformationTry.code) {
2206-
throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformation`.');
2207-
}
22082199
if (!transformationTry.sampleRecord) {
22092200
throw new Error('Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.');
22102201
}
@@ -2248,9 +2239,6 @@ export function createIngestionClient({
22482239
throw new Error('Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.');
22492240
}
22502241

2251-
if (!transformationTry.code) {
2252-
throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformationBeforeUpdate`.');
2253-
}
22542242
if (!transformationTry.sampleRecord) {
22552243
throw new Error(
22562244
'Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.',
@@ -2487,12 +2475,6 @@ export function createIngestionClient({
24872475
if (!transformationCreate.name) {
24882476
throw new Error('Parameter `transformationCreate.name` is required when calling `updateTransformation`.');
24892477
}
2490-
if (!transformationCreate.type) {
2491-
throw new Error('Parameter `transformationCreate.type` is required when calling `updateTransformation`.');
2492-
}
2493-
if (!transformationCreate.input) {
2494-
throw new Error('Parameter `transformationCreate.input` is required when calling `updateTransformation`.');
2495-
}
24962478

24972479
const requestPath = '/1/transformations/{transformationID}'.replace(
24982480
'{transformationID}',

0 commit comments

Comments
 (0)