@@ -70,6 +70,8 @@ import type { DestinationCreateResponse } from '../model/destinationCreateRespon
70
70
import type { DestinationSearch } from '../model/destinationSearch' ;
71
71
import type { DestinationUpdateResponse } from '../model/destinationUpdateResponse' ;
72
72
import type { Event } from '../model/event' ;
73
+ import type { GenerateTransformationCodePayload } from '../model/generateTransformationCodePayload' ;
74
+ import type { GenerateTransformationCodeResponse } from '../model/generateTransformationCodeResponse' ;
73
75
import type { ListAuthenticationsResponse } from '../model/listAuthenticationsResponse' ;
74
76
import type { ListDestinationsResponse } from '../model/listDestinationsResponse' ;
75
77
import type { ListEventsResponse } from '../model/listEventsResponse' ;
@@ -1023,6 +1025,53 @@ export function createIngestionClient({
1023
1025
return transporter . request ( request , requestOptions ) ;
1024
1026
} ,
1025
1027
1028
+ /**
1029
+ * Generates code for the selected model based on the given prompt.
1030
+ *
1031
+ * Required API Key ACLs:
1032
+ * - addObject
1033
+ * - deleteIndex
1034
+ * - editSettings.
1035
+ *
1036
+ * @param generateTransformationCodePayload - The generateTransformationCodePayload object.
1037
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1038
+ */
1039
+ generateTransformationCode (
1040
+ generateTransformationCodePayload : GenerateTransformationCodePayload ,
1041
+ requestOptions ?: RequestOptions
1042
+ ) : Promise < GenerateTransformationCodeResponse > {
1043
+ if ( ! generateTransformationCodePayload ) {
1044
+ throw new Error (
1045
+ 'Parameter `generateTransformationCodePayload` is required when calling `generateTransformationCode`.'
1046
+ ) ;
1047
+ }
1048
+
1049
+ if ( ! generateTransformationCodePayload . id ) {
1050
+ throw new Error (
1051
+ 'Parameter `generateTransformationCodePayload.id` is required when calling `generateTransformationCode`.'
1052
+ ) ;
1053
+ }
1054
+ if ( ! generateTransformationCodePayload . userPrompt ) {
1055
+ throw new Error (
1056
+ 'Parameter `generateTransformationCodePayload.userPrompt` is required when calling `generateTransformationCode`.'
1057
+ ) ;
1058
+ }
1059
+
1060
+ const requestPath = '/1/transformations/models' ;
1061
+ const headers : Headers = { } ;
1062
+ const queryParameters : QueryParameters = { } ;
1063
+
1064
+ const request : Request = {
1065
+ method : 'POST' ,
1066
+ path : requestPath ,
1067
+ queryParameters,
1068
+ headers,
1069
+ data : generateTransformationCodePayload ,
1070
+ } ;
1071
+
1072
+ return transporter . request ( request , requestOptions ) ;
1073
+ } ,
1074
+
1026
1075
/**
1027
1076
* Retrieves an authentication resource by its ID.
1028
1077
*
@@ -1885,7 +1934,7 @@ export function createIngestionClient({
1885
1934
listTransformationModels (
1886
1935
requestOptions ?: RequestOptions
1887
1936
) : Promise < TransformationModels > {
1888
- const requestPath = '/1/transformations/copilot ' ;
1937
+ const requestPath = '/1/transformations/models ' ;
1889
1938
const headers : Headers = { } ;
1890
1939
const queryParameters : QueryParameters = { } ;
1891
1940
0 commit comments