import {
  createPiece,
} from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/pieces-framework';
import { readFile } from './lib/actions/read-file';
import { amazons3UploadFile } from './lib/actions/upload-file';
import { newFile } from './lib/triggers/new-file';
import { generateSignedUrl } from './lib/actions/generate-signed-url';
import { generateSignedUploadUrl } from './lib/actions/generate-signed-upload-url';
import { moveFile } from './lib/actions/move-file';
import { deleteFile } from './lib/actions/delete-file';
import { listFiles } from './lib/actions/list-files';
import { decryptPgpFile } from './lib/actions/decrypt-pgp-file';
import { amazonS3CombinedAuth } from './lib/auth';

export const amazonS3 = createPiece({
  displayName: 'Amazon S3',
  description: 'Scalable storage in the cloud',

  logoUrl: 'https://cdn.activepieces.com/pieces/amazon-s3.png',
  minimumSupportedRelease: '0.30.0',
  authors: ["Willianwg", "kishanprmr", "MoShizzle", "AbdulTheActivePiecer", "khaledmashaly", "abuaboud", "Kevinyu-alan", "hugh-codes"],
  categories: [PieceCategory.DEVELOPER_TOOLS],
  auth: amazonS3CombinedAuth,
  actions: [amazons3UploadFile, readFile, generateSignedUrl, generateSignedUploadUrl, moveFile, deleteFile, listFiles, decryptPgpFile],
  triggers: [newFile],
});
