From d13726c8f7a3329761172ca48fd58ce19e6bb475 Mon Sep 17 00:00:00 2001 From: lprovost-coveo <96265015+lprovost-coveo@users.noreply.github.com> Date: Mon, 13 May 2024 09:58:32 -0400 Subject: [PATCH] docs(caseclassificationconfiguration): add deprecation warnings (#820) Co-authored-by: Louis Bompart --- .../CaseClassificationConfiguration.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/resources/MachineLearning/CaseClassificationConfiguration/CaseClassificationConfiguration.ts b/src/resources/MachineLearning/CaseClassificationConfiguration/CaseClassificationConfiguration.ts index 26bb66103..dff8906d5 100644 --- a/src/resources/MachineLearning/CaseClassificationConfiguration/CaseClassificationConfiguration.ts +++ b/src/resources/MachineLearning/CaseClassificationConfiguration/CaseClassificationConfiguration.ts @@ -15,6 +15,9 @@ 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) { return this.api.post( CaseClassificationConfiguration.modelUrl, @@ -22,16 +25,25 @@ export default class CaseClassificationConfiguration extends Resource { ); } + /** + * @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( `${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( `${CaseClassificationConfiguration.modelUrl}/${configModel.modelId}`,