|
| 1 | +// Copyright (c) Microsoft Corporation. |
| 2 | +// Licensed under the MIT License. |
| 3 | + |
| 4 | +import type { |
| 5 | + ConnectionsGetParameters, |
| 6 | + ConnectionsGetWithCredentialsParameters, |
| 7 | + ConnectionsListParameters, |
| 8 | + ConnectionsListWithCredentialsParameters, |
| 9 | + EvaluationsGetParameters, |
| 10 | + EvaluationsListParameters, |
| 11 | + EvaluationsCreateRunParameters, |
| 12 | + EvaluationsCreateAgentEvaluationParameters, |
| 13 | + DatasetsListVersionsParameters, |
| 14 | + DatasetsListLatestParameters, |
| 15 | + DatasetsGetVersionParameters, |
| 16 | + DatasetsDeleteVersionParameters, |
| 17 | + DatasetsCreateOrUpdateVersionParameters, |
| 18 | + DatasetsStartPendingUploadVersionParameters, |
| 19 | + DatasetsGetCredentialsParameters, |
| 20 | + IndexesListVersionsParameters, |
| 21 | + IndexesListLatestParameters, |
| 22 | + IndexesGetVersionParameters, |
| 23 | + IndexesDeleteVersionParameters, |
| 24 | + IndexesCreateOrUpdateVersionParameters, |
| 25 | + DeploymentsGetParameters, |
| 26 | + DeploymentsListParameters, |
| 27 | + RedTeamsGetParameters, |
| 28 | + RedTeamsListParameters, |
| 29 | + RedTeamsCreateRunParameters, |
| 30 | +} from "./parameters.js"; |
| 31 | +import type { |
| 32 | + ConnectionsGet200Response, |
| 33 | + ConnectionsGetDefaultResponse, |
| 34 | + ConnectionsGetWithCredentials200Response, |
| 35 | + ConnectionsGetWithCredentialsDefaultResponse, |
| 36 | + ConnectionsList200Response, |
| 37 | + ConnectionsListDefaultResponse, |
| 38 | + ConnectionsListWithCredentials200Response, |
| 39 | + ConnectionsListWithCredentialsDefaultResponse, |
| 40 | + EvaluationsGet200Response, |
| 41 | + EvaluationsGetDefaultResponse, |
| 42 | + EvaluationsList200Response, |
| 43 | + EvaluationsListDefaultResponse, |
| 44 | + EvaluationsCreateRun201Response, |
| 45 | + EvaluationsCreateRunDefaultResponse, |
| 46 | + EvaluationsCreateAgentEvaluation201Response, |
| 47 | + EvaluationsCreateAgentEvaluationDefaultResponse, |
| 48 | + DatasetsListVersions200Response, |
| 49 | + DatasetsListVersionsDefaultResponse, |
| 50 | + DatasetsListLatest200Response, |
| 51 | + DatasetsListLatestDefaultResponse, |
| 52 | + DatasetsGetVersion200Response, |
| 53 | + DatasetsGetVersionDefaultResponse, |
| 54 | + DatasetsDeleteVersion204Response, |
| 55 | + DatasetsDeleteVersionDefaultResponse, |
| 56 | + DatasetsCreateOrUpdateVersion200Response, |
| 57 | + DatasetsCreateOrUpdateVersion201Response, |
| 58 | + DatasetsCreateOrUpdateVersionDefaultResponse, |
| 59 | + DatasetsStartPendingUploadVersion200Response, |
| 60 | + DatasetsStartPendingUploadVersionDefaultResponse, |
| 61 | + DatasetsGetCredentials200Response, |
| 62 | + DatasetsGetCredentialsDefaultResponse, |
| 63 | + IndexesListVersions200Response, |
| 64 | + IndexesListVersionsDefaultResponse, |
| 65 | + IndexesListLatest200Response, |
| 66 | + IndexesListLatestDefaultResponse, |
| 67 | + IndexesGetVersion200Response, |
| 68 | + IndexesGetVersionDefaultResponse, |
| 69 | + IndexesDeleteVersion204Response, |
| 70 | + IndexesDeleteVersionDefaultResponse, |
| 71 | + IndexesCreateOrUpdateVersion200Response, |
| 72 | + IndexesCreateOrUpdateVersion201Response, |
| 73 | + IndexesCreateOrUpdateVersionDefaultResponse, |
| 74 | + DeploymentsGet200Response, |
| 75 | + DeploymentsGetDefaultResponse, |
| 76 | + DeploymentsList200Response, |
| 77 | + DeploymentsListDefaultResponse, |
| 78 | + RedTeamsGet200Response, |
| 79 | + RedTeamsGetDefaultResponse, |
| 80 | + RedTeamsList200Response, |
| 81 | + RedTeamsListDefaultResponse, |
| 82 | + RedTeamsCreateRun201Response, |
| 83 | + RedTeamsCreateRunDefaultResponse, |
| 84 | +} from "./responses.js"; |
| 85 | +import type { Client, StreamableMethod } from "@azure-rest/core-client"; |
| 86 | + |
| 87 | +export interface ConnectionsGet { |
| 88 | + /** Get a connection by name, without populating connection credentials */ |
| 89 | + get( |
| 90 | + options?: ConnectionsGetParameters, |
| 91 | + ): StreamableMethod< |
| 92 | + ConnectionsGet200Response | ConnectionsGetDefaultResponse |
| 93 | + >; |
| 94 | +} |
| 95 | + |
| 96 | +export interface ConnectionsGetWithCredentials { |
| 97 | + /** Get a connection by name, with its connection credentials */ |
| 98 | + post( |
| 99 | + options?: ConnectionsGetWithCredentialsParameters, |
| 100 | + ): StreamableMethod< |
| 101 | + | ConnectionsGetWithCredentials200Response |
| 102 | + | ConnectionsGetWithCredentialsDefaultResponse |
| 103 | + >; |
| 104 | +} |
| 105 | + |
| 106 | +export interface ConnectionsList { |
| 107 | + /** List all connections in the project, without populating connection credentials */ |
| 108 | + get( |
| 109 | + options?: ConnectionsListParameters, |
| 110 | + ): StreamableMethod< |
| 111 | + ConnectionsList200Response | ConnectionsListDefaultResponse |
| 112 | + >; |
| 113 | +} |
| 114 | + |
| 115 | +export interface ConnectionsListWithCredentials { |
| 116 | + /** List all connections in the project, with their connection credentials */ |
| 117 | + post( |
| 118 | + options?: ConnectionsListWithCredentialsParameters, |
| 119 | + ): StreamableMethod< |
| 120 | + | ConnectionsListWithCredentials200Response |
| 121 | + | ConnectionsListWithCredentialsDefaultResponse |
| 122 | + >; |
| 123 | +} |
| 124 | + |
| 125 | +export interface EvaluationsGet { |
| 126 | + /** Get an evaluation run by name. */ |
| 127 | + get( |
| 128 | + options?: EvaluationsGetParameters, |
| 129 | + ): StreamableMethod< |
| 130 | + EvaluationsGet200Response | EvaluationsGetDefaultResponse |
| 131 | + >; |
| 132 | +} |
| 133 | + |
| 134 | +export interface EvaluationsList { |
| 135 | + /** List evaluation runs */ |
| 136 | + get( |
| 137 | + options?: EvaluationsListParameters, |
| 138 | + ): StreamableMethod< |
| 139 | + EvaluationsList200Response | EvaluationsListDefaultResponse |
| 140 | + >; |
| 141 | +} |
| 142 | + |
| 143 | +export interface EvaluationsCreateRun { |
| 144 | + /** Creates an evaluation run. */ |
| 145 | + post( |
| 146 | + options: EvaluationsCreateRunParameters, |
| 147 | + ): StreamableMethod< |
| 148 | + EvaluationsCreateRun201Response | EvaluationsCreateRunDefaultResponse |
| 149 | + >; |
| 150 | +} |
| 151 | + |
| 152 | +export interface EvaluationsCreateAgentEvaluation { |
| 153 | + /** Creates an agent evaluation run. */ |
| 154 | + post( |
| 155 | + options: EvaluationsCreateAgentEvaluationParameters, |
| 156 | + ): StreamableMethod< |
| 157 | + | EvaluationsCreateAgentEvaluation201Response |
| 158 | + | EvaluationsCreateAgentEvaluationDefaultResponse |
| 159 | + >; |
| 160 | +} |
| 161 | + |
| 162 | +export interface DatasetsListVersions { |
| 163 | + /** List all versions of the given DatasetVersion */ |
| 164 | + get( |
| 165 | + options?: DatasetsListVersionsParameters, |
| 166 | + ): StreamableMethod< |
| 167 | + DatasetsListVersions200Response | DatasetsListVersionsDefaultResponse |
| 168 | + >; |
| 169 | +} |
| 170 | + |
| 171 | +export interface DatasetsListLatest { |
| 172 | + /** List the latest version of each DatasetVersion */ |
| 173 | + get( |
| 174 | + options?: DatasetsListLatestParameters, |
| 175 | + ): StreamableMethod< |
| 176 | + DatasetsListLatest200Response | DatasetsListLatestDefaultResponse |
| 177 | + >; |
| 178 | +} |
| 179 | + |
| 180 | +export interface DatasetsGetVersion { |
| 181 | + /** Get the specific version of the DatasetVersion */ |
| 182 | + get( |
| 183 | + options?: DatasetsGetVersionParameters, |
| 184 | + ): StreamableMethod< |
| 185 | + DatasetsGetVersion200Response | DatasetsGetVersionDefaultResponse |
| 186 | + >; |
| 187 | + /** Delete the specific version of the DatasetVersion */ |
| 188 | + delete( |
| 189 | + options?: DatasetsDeleteVersionParameters, |
| 190 | + ): StreamableMethod< |
| 191 | + DatasetsDeleteVersion204Response | DatasetsDeleteVersionDefaultResponse |
| 192 | + >; |
| 193 | + /** Create a new or update an existing DatasetVersion with the given version id */ |
| 194 | + patch( |
| 195 | + options: DatasetsCreateOrUpdateVersionParameters, |
| 196 | + ): StreamableMethod< |
| 197 | + | DatasetsCreateOrUpdateVersion200Response |
| 198 | + | DatasetsCreateOrUpdateVersion201Response |
| 199 | + | DatasetsCreateOrUpdateVersionDefaultResponse |
| 200 | + >; |
| 201 | +} |
| 202 | + |
| 203 | +export interface DatasetsStartPendingUploadVersion { |
| 204 | + /** Start a new or get an existing pending upload of a dataset for a specific version. */ |
| 205 | + post( |
| 206 | + options: DatasetsStartPendingUploadVersionParameters, |
| 207 | + ): StreamableMethod< |
| 208 | + | DatasetsStartPendingUploadVersion200Response |
| 209 | + | DatasetsStartPendingUploadVersionDefaultResponse |
| 210 | + >; |
| 211 | +} |
| 212 | + |
| 213 | +export interface DatasetsGetCredentials { |
| 214 | + /** Get download sas for dataset version. */ |
| 215 | + post( |
| 216 | + options: DatasetsGetCredentialsParameters, |
| 217 | + ): StreamableMethod< |
| 218 | + DatasetsGetCredentials200Response | DatasetsGetCredentialsDefaultResponse |
| 219 | + >; |
| 220 | +} |
| 221 | + |
| 222 | +export interface IndexesListVersions { |
| 223 | + /** List all versions of the given Index */ |
| 224 | + get( |
| 225 | + options?: IndexesListVersionsParameters, |
| 226 | + ): StreamableMethod< |
| 227 | + IndexesListVersions200Response | IndexesListVersionsDefaultResponse |
| 228 | + >; |
| 229 | +} |
| 230 | + |
| 231 | +export interface IndexesListLatest { |
| 232 | + /** List the latest version of each Index */ |
| 233 | + get( |
| 234 | + options?: IndexesListLatestParameters, |
| 235 | + ): StreamableMethod< |
| 236 | + IndexesListLatest200Response | IndexesListLatestDefaultResponse |
| 237 | + >; |
| 238 | +} |
| 239 | + |
| 240 | +export interface IndexesGetVersion { |
| 241 | + /** Get the specific version of the Index */ |
| 242 | + get( |
| 243 | + options?: IndexesGetVersionParameters, |
| 244 | + ): StreamableMethod< |
| 245 | + IndexesGetVersion200Response | IndexesGetVersionDefaultResponse |
| 246 | + >; |
| 247 | + /** Delete the specific version of the Index */ |
| 248 | + delete( |
| 249 | + options?: IndexesDeleteVersionParameters, |
| 250 | + ): StreamableMethod< |
| 251 | + IndexesDeleteVersion204Response | IndexesDeleteVersionDefaultResponse |
| 252 | + >; |
| 253 | + /** Create a new or update an existing Index with the given version id */ |
| 254 | + patch( |
| 255 | + options: IndexesCreateOrUpdateVersionParameters, |
| 256 | + ): StreamableMethod< |
| 257 | + | IndexesCreateOrUpdateVersion200Response |
| 258 | + | IndexesCreateOrUpdateVersion201Response |
| 259 | + | IndexesCreateOrUpdateVersionDefaultResponse |
| 260 | + >; |
| 261 | +} |
| 262 | + |
| 263 | +export interface DeploymentsGet { |
| 264 | + /** Get a deployed model. */ |
| 265 | + get( |
| 266 | + options?: DeploymentsGetParameters, |
| 267 | + ): StreamableMethod< |
| 268 | + DeploymentsGet200Response | DeploymentsGetDefaultResponse |
| 269 | + >; |
| 270 | +} |
| 271 | + |
| 272 | +export interface DeploymentsList { |
| 273 | + /** List all deployed models in the project */ |
| 274 | + get( |
| 275 | + options?: DeploymentsListParameters, |
| 276 | + ): StreamableMethod< |
| 277 | + DeploymentsList200Response | DeploymentsListDefaultResponse |
| 278 | + >; |
| 279 | +} |
| 280 | + |
| 281 | +export interface RedTeamsGet { |
| 282 | + /** Get a redteam by name. */ |
| 283 | + get( |
| 284 | + options?: RedTeamsGetParameters, |
| 285 | + ): StreamableMethod<RedTeamsGet200Response | RedTeamsGetDefaultResponse>; |
| 286 | +} |
| 287 | + |
| 288 | +export interface RedTeamsList { |
| 289 | + /** List a redteam by name. */ |
| 290 | + get( |
| 291 | + options?: RedTeamsListParameters, |
| 292 | + ): StreamableMethod<RedTeamsList200Response | RedTeamsListDefaultResponse>; |
| 293 | +} |
| 294 | + |
| 295 | +export interface RedTeamsCreateRun { |
| 296 | + /** Creates a redteam run. */ |
| 297 | + post( |
| 298 | + options: RedTeamsCreateRunParameters, |
| 299 | + ): StreamableMethod< |
| 300 | + RedTeamsCreateRun201Response | RedTeamsCreateRunDefaultResponse |
| 301 | + >; |
| 302 | +} |
| 303 | + |
| 304 | +export interface Routes { |
| 305 | + /** Resource for '/connections/\{name\}' has methods for the following verbs: get */ |
| 306 | + (path: "/connections/{name}", name: string): ConnectionsGet; |
| 307 | + /** Resource for '/connections/\{name\}/withCredentials' has methods for the following verbs: post */ |
| 308 | + ( |
| 309 | + path: "/connections/{name}/withCredentials", |
| 310 | + name: string, |
| 311 | + ): ConnectionsGetWithCredentials; |
| 312 | + /** Resource for '/connections' has methods for the following verbs: get */ |
| 313 | + (path: "/connections"): ConnectionsList; |
| 314 | + /** Resource for '/connections/withCredentials' has methods for the following verbs: post */ |
| 315 | + (path: "/connections/withCredentials"): ConnectionsListWithCredentials; |
| 316 | + /** Resource for '/evaluations/runs/\{name\}' has methods for the following verbs: get */ |
| 317 | + (path: "/evaluations/runs/{name}", name: string): EvaluationsGet; |
| 318 | + /** Resource for '/evaluations/runs' has methods for the following verbs: get */ |
| 319 | + (path: "/evaluations/runs"): EvaluationsList; |
| 320 | + /** Resource for '/evaluations/runs:run' has methods for the following verbs: post */ |
| 321 | + (path: "/evaluations/runs:run"): EvaluationsCreateRun; |
| 322 | + /** Resource for '/evaluations/runs:runAgent' has methods for the following verbs: post */ |
| 323 | + (path: "/evaluations/runs:runAgent"): EvaluationsCreateAgentEvaluation; |
| 324 | + /** Resource for '/datasets/\{name\}/versions' has methods for the following verbs: get */ |
| 325 | + (path: "/datasets/{name}/versions", name: string): DatasetsListVersions; |
| 326 | + /** Resource for '/datasets' has methods for the following verbs: get */ |
| 327 | + (path: "/datasets"): DatasetsListLatest; |
| 328 | + /** Resource for '/datasets/\{name\}/versions/\{version\}' has methods for the following verbs: get, delete, patch */ |
| 329 | + ( |
| 330 | + path: "/datasets/{name}/versions/{version}", |
| 331 | + name: string, |
| 332 | + version: string, |
| 333 | + ): DatasetsGetVersion; |
| 334 | + /** Resource for '/datasets/\{name\}/versions/\{version\}/startPendingUpload' has methods for the following verbs: post */ |
| 335 | + ( |
| 336 | + path: "/datasets/{name}/versions/{version}/startPendingUpload", |
| 337 | + name: string, |
| 338 | + version: string, |
| 339 | + ): DatasetsStartPendingUploadVersion; |
| 340 | + /** Resource for '/datasets/\{name\}/versions/\{version\}/credentials' has methods for the following verbs: post */ |
| 341 | + ( |
| 342 | + path: "/datasets/{name}/versions/{version}/credentials", |
| 343 | + name: string, |
| 344 | + version: string, |
| 345 | + ): DatasetsGetCredentials; |
| 346 | + /** Resource for '/indexes/\{name\}/versions' has methods for the following verbs: get */ |
| 347 | + (path: "/indexes/{name}/versions", name: string): IndexesListVersions; |
| 348 | + /** Resource for '/indexes' has methods for the following verbs: get */ |
| 349 | + (path: "/indexes"): IndexesListLatest; |
| 350 | + /** Resource for '/indexes/\{name\}/versions/\{version\}' has methods for the following verbs: get, delete, patch */ |
| 351 | + ( |
| 352 | + path: "/indexes/{name}/versions/{version}", |
| 353 | + name: string, |
| 354 | + version: string, |
| 355 | + ): IndexesGetVersion; |
| 356 | + /** Resource for '/deployments/\{name\}' has methods for the following verbs: get */ |
| 357 | + (path: "/deployments/{name}", name: string): DeploymentsGet; |
| 358 | + /** Resource for '/deployments' has methods for the following verbs: get */ |
| 359 | + (path: "/deployments"): DeploymentsList; |
| 360 | + /** Resource for '/redTeams/runs/\{name\}' has methods for the following verbs: get */ |
| 361 | + (path: "/redTeams/runs/{name}", name: string): RedTeamsGet; |
| 362 | + /** Resource for '/redTeams/runs' has methods for the following verbs: get */ |
| 363 | + (path: "/redTeams/runs"): RedTeamsList; |
| 364 | + /** Resource for '/redTeams/runs:run' has methods for the following verbs: post */ |
| 365 | + (path: "/redTeams/runs:run"): RedTeamsCreateRun; |
| 366 | +} |
| 367 | + |
| 368 | +export type ProjectsClient = Client & { |
| 369 | + path: Routes; |
| 370 | +}; |
0 commit comments