import { CreateTenantLinkParams , DeleteTenantLinkParams , GetTenantLinkByIdentityParams , ListTenantLinksByIdentityParams , ListTenantLinksByTypeParams , ListTenantLinksParams , SecurityConfig , TenantLink , UpdateTenantLinkParams } from "~/types" ; export const createTenantLinksMethods = ( { storageOperations } ) => { return { async createTenantLinks ( params ) { await storageOperations . createTenantLinks ( params . map ( item => ( { ... item , createdOn : new Date ( ) . toISOString ( ) , webinyVersion : process . env . WEBINY_VERSION } ) ) ) ; } , async updateTenantLinks ( params ) { await storageOperations . updateTenantLinks ( params ) ; } , async deleteTenantLinks ( params ) { await storageOperations . deleteTenantLinks ( params ) ; } , async listTenantLinksByType < TLink extends TenantLink = TenantLink > ( params ) { return storageOperations . listTenantLinksByType ( params ) ; } , listTenantLinksByTenant ( params ) { return storageOperations . listTenantLinksByTenant ( params ) ; } , listTenantLinksByIdentity ( params ) { return storageOperations . listTenantLinksByIdentity ( params ) ; } , async getTenantLinkByIdentity < TLink extends TenantLink = TenantLink > ( params ) { return storageOperations . getTenantLinkByIdentity ( params ) ; } } ; } ;