create or replace package pck_26ai_apis
as
/*

  Criado por: fernando.leal@oracle.com
  Data: Oct/2025
  Objetivo: demonstrar casos de uso do Oracle AI Database 26ai

  v1 - package de chamada a APIs - leal

*/
  procedure api_text2speech (p_text in varchar2, 
                             p_filename in varchar2, 
                             p_bucket in varchar2 , 
                             p_comp_id in varchar2, 
                             p_credential in varchar2 default 'OCI_CRED',
                             p_speaker in varchar2 default 'Felix',
                             p_language_code in varchar2 default 'pt-BR');
   /*
     https://docs.oracle.com/en-us/iaas/api/#/en/speech/20220101/SynthesizeSpeech/SynthesizeSpeech
   */

  function api_visio( p_id in number, p_feature_type in varchar2 , p_comp_id in varchar2) return clob; 
   /*
    p_feature_type:  https://docs.oracle.com/en-us/iaas/api/#/en/vision/20220125/datatypes/ImageFeature
    
        IMAGE_CLASSIFICATION: Label the image.
        OBJECT_DETECTION: Identify objects in the image with bounding boxes.
        TEXT_DETECTION: Recognize text at the word and line level.
        FACE_DETECTION: Identify faces in the image with bounding boxes and face landmarks.
    */

  function api_doc_understanding(p_id in number, p_feature_type in varchar2 , p_comp_id in varchar2) return clob; 
   /*
    p_feature_type:   https://docs.oracle.com/en-us/iaas/api/#/en/document-understanding/20221109/datatypes/DocumentClassificationFeature
    
       DOCUMENT_CLASSIFICATION
       TABLE_EXTRACTION
       TEXT_EXTRACTION
       LANGUAGE_CLASSIFICATION    
    */

  function api_translate(p_data_text in clob,p_source_code in varchar2 default 'en', p_target_code in varchar2 default 'pt-BR'  , p_comp_id in varchar2) return clob;
    /*
      https://docs.oracle.com/en-us/iaas/api/#/en/language/20221001/BatchLanguageTranslation/BatchLanguageTranslation
    */

end;
/