{"version":3,"sources":["../src/cli/commands/annotations/delete.ts"],"sourcesContent":["import chalk from \"chalk\";\nimport ora from \"ora\";\nimport { AnnotationsApiService } from \"@/client-sdk/services/annotations/annotations-api.service\";\nimport { checkApiKey } from \"../../utils/apiKey\";\nimport { failSpinner } from \"../../utils/spinnerError\";\n\nexport const deleteAnnotationCommand = async (id: string, options?: { format?: string }): Promise<void> => {\n  checkApiKey();\n\n  const service = new AnnotationsApiService();\n  const spinner = ora(`Deleting annotation \"${id}\"...`).start();\n\n  try {\n    await service.delete(id);\n    spinner.succeed(`Deleted annotation \"${chalk.cyan(id)}\"`);\n\n    if (options?.format === \"json\") {\n      console.log(JSON.stringify({ id, deleted: true }, null, 2));\n    }\n  } catch (error) {\n    failSpinner({ spinner, error, action: \"delete annotation\" });\n    process.exit(1);\n  }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,SAAS;AAKT,IAAM,0BAA0B,OAAO,IAAY,YAAiD;AACzG,cAAY;AAEZ,QAAM,UAAU,IAAI,sBAAsB;AAC1C,QAAM,UAAU,IAAI,wBAAwB,EAAE,MAAM,EAAE,MAAM;AAE5D,MAAI;AACF,UAAM,QAAQ,OAAO,EAAE;AACvB,YAAQ,QAAQ,uBAAuB,MAAM,KAAK,EAAE,CAAC,GAAG;AAExD,SAAI,mCAAS,YAAW,QAAQ;AAC9B,cAAQ,IAAI,KAAK,UAAU,EAAE,IAAI,SAAS,KAAK,GAAG,MAAM,CAAC,CAAC;AAAA,IAC5D;AAAA,EACF,SAAS,OAAO;AACd,gBAAY,EAAE,SAAS,OAAO,QAAQ,oBAAoB,CAAC;AAC3D,YAAQ,KAAK,CAAC;AAAA,EAChB;AACF;","names":[]}