@@ -14,8 +14,10 @@ import type {
14
14
QueryParameters ,
15
15
} from '@algolia/client-common' ;
16
16
17
+ import type { Authentication } from '../model/authentication' ;
17
18
import type { AuthenticationCreate } from '../model/authenticationCreate' ;
18
19
import type { AuthenticationCreateResponse } from '../model/authenticationCreateResponse' ;
20
+ import type { AuthenticationSearch } from '../model/authenticationSearch' ;
19
21
import type { AuthenticationUpdateResponse } from '../model/authenticationUpdateResponse' ;
20
22
import type { AuthenticationWithInput } from '../model/authenticationWithInput' ;
21
23
import type {
@@ -48,6 +50,7 @@ import type { DeleteResponse } from '../model/deleteResponse';
48
50
import type { Destination } from '../model/destination' ;
49
51
import type { DestinationCreate } from '../model/destinationCreate' ;
50
52
import type { DestinationCreateResponse } from '../model/destinationCreateResponse' ;
53
+ import type { DestinationSearch } from '../model/destinationSearch' ;
51
54
import type { DestinationUpdateResponse } from '../model/destinationUpdateResponse' ;
52
55
import type { Event } from '../model/event' ;
53
56
import type { ListAuthenticationsResponse } from '../model/listAuthenticationsResponse' ;
@@ -61,10 +64,12 @@ import type { RunResponse } from '../model/runResponse';
61
64
import type { Source } from '../model/source' ;
62
65
import type { SourceCreate } from '../model/sourceCreate' ;
63
66
import type { SourceCreateResponse } from '../model/sourceCreateResponse' ;
67
+ import type { SourceSearch } from '../model/sourceSearch' ;
64
68
import type { SourceUpdateResponse } from '../model/sourceUpdateResponse' ;
65
69
import type { Task } from '../model/task' ;
66
70
import type { TaskCreate } from '../model/taskCreate' ;
67
71
import type { TaskCreateResponse } from '../model/taskCreateResponse' ;
72
+ import type { TaskSearch } from '../model/taskSearch' ;
68
73
import type { TaskUpdateResponse } from '../model/taskUpdateResponse' ;
69
74
70
75
export const apiClientVersion = '1.0.0-alpha.11' ;
@@ -1071,6 +1076,158 @@ export function createIngestionClient({
1071
1076
return transporter . request ( request , requestOptions ) ;
1072
1077
} ,
1073
1078
1079
+ /**
1080
+ * Search among authentications with a defined set of parameters.
1081
+ *
1082
+ * @summary Search among authentications.
1083
+ * @param authenticationSearch - The authenticationSearch object.
1084
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1085
+ */
1086
+ searchAuthentications (
1087
+ authenticationSearch : AuthenticationSearch ,
1088
+ requestOptions ?: RequestOptions
1089
+ ) : Promise < Authentication [ ] > {
1090
+ if ( ! authenticationSearch ) {
1091
+ throw new Error (
1092
+ 'Parameter `authenticationSearch` is required when calling `searchAuthentications`.'
1093
+ ) ;
1094
+ }
1095
+
1096
+ if ( ! authenticationSearch . authenticationIDs ) {
1097
+ throw new Error (
1098
+ 'Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.'
1099
+ ) ;
1100
+ }
1101
+
1102
+ const requestPath = '/1/authentications/search' ;
1103
+ const headers : Headers = { } ;
1104
+ const queryParameters : QueryParameters = { } ;
1105
+
1106
+ const request : Request = {
1107
+ method : 'POST' ,
1108
+ path : requestPath ,
1109
+ queryParameters,
1110
+ headers,
1111
+ data : authenticationSearch ,
1112
+ } ;
1113
+
1114
+ return transporter . request ( request , requestOptions ) ;
1115
+ } ,
1116
+
1117
+ /**
1118
+ * Search among destinations with a defined set of parameters.
1119
+ *
1120
+ * @summary Search among destinations.
1121
+ * @param destinationSearch - The destinationSearch object.
1122
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1123
+ */
1124
+ searchDestinations (
1125
+ destinationSearch : DestinationSearch ,
1126
+ requestOptions ?: RequestOptions
1127
+ ) : Promise < Destination [ ] > {
1128
+ if ( ! destinationSearch ) {
1129
+ throw new Error (
1130
+ 'Parameter `destinationSearch` is required when calling `searchDestinations`.'
1131
+ ) ;
1132
+ }
1133
+
1134
+ if ( ! destinationSearch . destinationIDs ) {
1135
+ throw new Error (
1136
+ 'Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.'
1137
+ ) ;
1138
+ }
1139
+
1140
+ const requestPath = '/1/destinations/search' ;
1141
+ const headers : Headers = { } ;
1142
+ const queryParameters : QueryParameters = { } ;
1143
+
1144
+ const request : Request = {
1145
+ method : 'POST' ,
1146
+ path : requestPath ,
1147
+ queryParameters,
1148
+ headers,
1149
+ data : destinationSearch ,
1150
+ } ;
1151
+
1152
+ return transporter . request ( request , requestOptions ) ;
1153
+ } ,
1154
+
1155
+ /**
1156
+ * Search among sources with a defined set of parameters.
1157
+ *
1158
+ * @summary Search among sources.
1159
+ * @param sourceSearch - The sourceSearch object.
1160
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1161
+ */
1162
+ searchSources (
1163
+ sourceSearch : SourceSearch ,
1164
+ requestOptions ?: RequestOptions
1165
+ ) : Promise < Source [ ] > {
1166
+ if ( ! sourceSearch ) {
1167
+ throw new Error (
1168
+ 'Parameter `sourceSearch` is required when calling `searchSources`.'
1169
+ ) ;
1170
+ }
1171
+
1172
+ if ( ! sourceSearch . sourceIDs ) {
1173
+ throw new Error (
1174
+ 'Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.'
1175
+ ) ;
1176
+ }
1177
+
1178
+ const requestPath = '/1/sources/search' ;
1179
+ const headers : Headers = { } ;
1180
+ const queryParameters : QueryParameters = { } ;
1181
+
1182
+ const request : Request = {
1183
+ method : 'POST' ,
1184
+ path : requestPath ,
1185
+ queryParameters,
1186
+ headers,
1187
+ data : sourceSearch ,
1188
+ } ;
1189
+
1190
+ return transporter . request ( request , requestOptions ) ;
1191
+ } ,
1192
+
1193
+ /**
1194
+ * Search among tasks with a defined set of parameters.
1195
+ *
1196
+ * @summary Search among tasks.
1197
+ * @param taskSearch - The taskSearch object.
1198
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1199
+ */
1200
+ searchTasks (
1201
+ taskSearch : TaskSearch ,
1202
+ requestOptions ?: RequestOptions
1203
+ ) : Promise < Task [ ] > {
1204
+ if ( ! taskSearch ) {
1205
+ throw new Error (
1206
+ 'Parameter `taskSearch` is required when calling `searchTasks`.'
1207
+ ) ;
1208
+ }
1209
+
1210
+ if ( ! taskSearch . taskIDs ) {
1211
+ throw new Error (
1212
+ 'Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.'
1213
+ ) ;
1214
+ }
1215
+
1216
+ const requestPath = '/1/tasks/search' ;
1217
+ const headers : Headers = { } ;
1218
+ const queryParameters : QueryParameters = { } ;
1219
+
1220
+ const request : Request = {
1221
+ method : 'POST' ,
1222
+ path : requestPath ,
1223
+ queryParameters,
1224
+ headers,
1225
+ data : taskSearch ,
1226
+ } ;
1227
+
1228
+ return transporter . request ( request , requestOptions ) ;
1229
+ } ,
1230
+
1074
1231
/**
1075
1232
* Update a authentication.
1076
1233
*
0 commit comments