import { Poke } from '../lib/types'; import { S3Update, S3UpdateAccessKeyId, S3UpdateAddBucket, S3UpdateCurrentBucket, S3UpdateEndpoint, S3UpdateRemoveBucket, S3UpdateSecretAccessKey } from './types'; const s3Action = ( data: any ): Poke => ({ app: 's3-store', mark: 's3-action', json: data }); export const setCurrentBucket = ( bucket: string ): Poke => s3Action({ 'set-current-bucket': bucket }); export const addBucket = ( bucket: string ): Poke => s3Action({ 'add-bucket': bucket }); export const removeBucket = ( bucket: string ): Poke => s3Action({ 'remove-bucket': bucket }); export const setEndpoint = ( endpoint: string ): Poke => s3Action({ 'set-endpoint': endpoint }); export const setAccessKeyId = ( accessKeyId: string ): Poke => s3Action({ 'set-access-key-id': accessKeyId }); export const setSecretAccessKey = ( secretAccessKey: string ): Poke => s3Action({ 'set-secret-access-key': secretAccessKey });