|
| 1 | +declare class ModelRegistryClient { |
| 2 | + private baseUrl; |
| 3 | + constructor(trackingUri: string); |
| 4 | + /** |
| 5 | + * Creates a new registered model. |
| 6 | + * |
| 7 | + * @param {string} name - The name of the model to register (required) |
| 8 | + * @param {Array<{key: string, value: string}>} [tags] - Optional tags for the model |
| 9 | + * @param {string} [description] - Optional description for the model |
| 10 | + * @returns {Promise<RegisteredModel>} The created registered model object |
| 11 | + * @throws {ApiError} If the API request fails |
| 12 | + */ |
| 13 | + createRegisteredModel(name: string, tags?: Array<{ |
| 14 | + key: string; |
| 15 | + value: string; |
| 16 | + }>, description?: string): Promise<object>; |
| 17 | + /** |
| 18 | + * Retrieves a registered model by name. |
| 19 | + * |
| 20 | + * @param {string} name - The name of the registered model to retrieve (required) |
| 21 | + * @returns {Promise<RegisteredModel>} The registered model object |
| 22 | + * @throws {ApiError} If the API request fails |
| 23 | + */ |
| 24 | + getRegisteredModel(name: string): Promise<object>; |
| 25 | + /** |
| 26 | + * Renames a registered model. |
| 27 | + * |
| 28 | + * @param {string} name - The current name of the registered model (required) |
| 29 | + * @param {string} newName - The new name for the registered model (required) |
| 30 | + * @returns {Promise<RegisteredModel>} The updated registered model object |
| 31 | + * @throws {ApiError} If the API request fails |
| 32 | + */ |
| 33 | + renameRegisteredModel(name: string, newName: string): Promise<object>; |
| 34 | + /** |
| 35 | + * Updates a registered model's description. |
| 36 | + * |
| 37 | + * @param {string} name - The name of the registered model to update (required) |
| 38 | + * @param {string} [description] - The new description for the model |
| 39 | + * @returns {Promise<RegisteredModel>} The updated registered model object |
| 40 | + * @throws {ApiError} If the API request fails |
| 41 | + */ |
| 42 | + updateRegisteredModel(name: string, description?: string): Promise<object>; |
| 43 | + /** |
| 44 | + * Deletes a registered model. |
| 45 | + * |
| 46 | + * @param {string} name - The name of the registered model to delete (required) |
| 47 | + * @returns {Promise<void>} |
| 48 | + * @throws {ApiError} If the API request fails |
| 49 | + */ |
| 50 | + deleteRegisteredModel(name: string): Promise<void>; |
| 51 | + /** |
| 52 | + * Gets the latest versions of a registered model. |
| 53 | + * |
| 54 | + * @param {string} name - The name of the registered model (required) |
| 55 | + * @param {string[]} [stages] - Optional array of stages to filter the versions by |
| 56 | + * @returns {Promise<ModelVersion[]>} An array of the latest model versions |
| 57 | + * @throws {ApiError} If the API request fails |
| 58 | + */ |
| 59 | + getLatestModelVersions(name: string, stages?: string[]): Promise<Array<object>>; |
| 60 | + /** |
| 61 | + * Searches for registered models based on filter criteria. |
| 62 | + * |
| 63 | + * @param {string} [filter] - Optional filter string to apply to the search |
| 64 | + * @param {number} [maxResults] - Optional maximum number of results to return |
| 65 | + * @param {string[]} [orderBy] - Optional array of fields to order the results by |
| 66 | + * @param {string} [pageToken] - Optional token for pagination |
| 67 | + * @returns {Promise<{registered_models: RegisteredModel[], next_page_token: string}>} An object containing the search results and pagination information |
| 68 | + * @throws {ApiError} If the API request fails |
| 69 | + */ |
| 70 | + searchRegisteredModels(filter?: string, maxResults?: number, orderBy?: string[], pageToken?: string): Promise<object>; |
| 71 | + /** |
| 72 | + * Sets a tag on a registered model. |
| 73 | + * |
| 74 | + * @param {string} name - The name of the registered model (required) |
| 75 | + * @param {string} key - The key of the tag (required) |
| 76 | + * @param {string} value - The value of the tag (required) |
| 77 | + * @returns {Promise<void>} |
| 78 | + * @throws {ApiError} If the API request fails |
| 79 | + */ |
| 80 | + setRegisteredModelTag(name: string, key: string, value: string): Promise<void>; |
| 81 | + /** |
| 82 | + * Deletes a tag from a registered model. |
| 83 | + * |
| 84 | + * @param {string} name - The name of the registered model (required) |
| 85 | + * @param {string} key - The key of the tag to delete (required) |
| 86 | + * @returns {Promise<void>} |
| 87 | + * @throws {ApiError} If the API request fails |
| 88 | + */ |
| 89 | + deleteRegisteredModelTag(name: string, key: string): Promise<void>; |
| 90 | + /** |
| 91 | + * Sets an alias for a specific version of a registered model. |
| 92 | + * |
| 93 | + * @param {string} name - The name of the registered model (required) |
| 94 | + * @param {string} alias - The alias to set (required) |
| 95 | + * @param {string} version - The version number to associate with the alias (required) |
| 96 | + * @returns {Promise<void>} |
| 97 | + * @throws {ApiError} If the API request fails |
| 98 | + */ |
| 99 | + setRegisteredModelAlias(name: string, alias: string, version: string): Promise<void>; |
| 100 | + /** |
| 101 | + * Deletes an alias from a registered model. |
| 102 | + * |
| 103 | + * @param {string} name - The name of the registered model (required) |
| 104 | + * @param {string} alias - The alias to delete (required) |
| 105 | + * @returns {Promise<void>} |
| 106 | + * @throws {ApiError} If the API request fails |
| 107 | + */ |
| 108 | + deleteRegisteredModelAlias(name: string, alias: string): Promise<void>; |
| 109 | + /** |
| 110 | + * Retrieves a model version using its alias. |
| 111 | + * |
| 112 | + * @param {string} name - The name of the registered model (required) |
| 113 | + * @param {string} alias - The alias of the model version to retrieve (required) |
| 114 | + * @returns {Promise<ModelVersion>} The model version object |
| 115 | + * @throws {ApiError} If the API request fails |
| 116 | + */ |
| 117 | + getModelVersionByAlias(name: string, alias: string): Promise<object>; |
| 118 | +} |
| 119 | +export default ModelRegistryClient; |
0 commit comments