Skip to content

Commit

Permalink
docs(caseclassificationconfiguration): add deprecation warnings (#820)
Browse files Browse the repository at this point in the history
Co-authored-by: Louis Bompart <[email protected]>
  • Loading branch information
lprovost-coveo and louis-bompart authored May 13, 2024
1 parent 9bd90db commit d13726c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,35 @@ export default class CaseClassificationConfiguration extends Resource {
static fieldsUrl = `${CaseClassificationConfiguration.baseUrl}/fields`;
static previewUrl = `${CaseClassificationConfiguration.baseUrl}/preview`;

/**
* @deprecated create(configModel: CaseClassificationConfigurationModel) is kept for backward compatibility. You should now use MachineLearning `register(registration: RegistrationModel)` instead.
*/
create(configModel: New<CaseClassificationConfigurationModel, 'modelId'>) {
return this.api.post<CaseClassificationConfigurationModel>(
CaseClassificationConfiguration.modelUrl,
configModel,
);
}

/**
* @deprecated delete(modelId: string) is kept for backward compatibility. You should now use Models `delete(modelId: string)` instead.
*/
delete(modelId: string) {
return this.api.delete(`${CaseClassificationConfiguration.modelUrl}/${modelId}`);
}

/**
* @deprecated get(modelId: string) is kept for backward compatibility. You should now use Models `get(modelId: string)` instead.
*/
get(modelId: string) {
return this.api.get<CaseClassificationConfigurationModel>(
`${CaseClassificationConfiguration.modelUrl}/${modelId}`,
);
}

/**
* @deprecated update(configModel: CaseClassificationConfigurationModel) is kept for backward compatibility. You should now use Models `update(modelId: string, update: RegistrationModel)` instead.
*/
update(configModel: CaseClassificationConfigurationModel) {
return this.api.put<CaseClassificationConfigurationModel>(
`${CaseClassificationConfiguration.modelUrl}/${configModel.modelId}`,
Expand Down

0 comments on commit d13726c

Please sign in to comment.