implement profile interaction registration through plugins (mute and vpn detection implementation)
This commit is contained in:
25
SharedLibraryCore/Interfaces/IInteractionData.cs
Normal file
25
SharedLibraryCore/Interfaces/IInteractionData.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Data.Models.Client;
|
||||
using InteractionCallback = System.Func<int?, Data.Models.Reference.Game?, System.Threading.CancellationToken, System.Threading.Tasks.Task<string>>;
|
||||
using ScriptInteractionCallback = System.Func<int?, Data.Models.Reference.Game?, System.Threading.CancellationToken, System.Threading.Tasks.Task<string>>;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces;
|
||||
|
||||
public interface IInteractionData
|
||||
{
|
||||
int? EntityId { get; }
|
||||
bool Enabled { get; }
|
||||
string Name { get; }
|
||||
string Description { get; }
|
||||
string DisplayMeta { get; }
|
||||
string ActionPath { get; }
|
||||
Dictionary<string, string> ActionMeta { get; }
|
||||
string ActionUri { get; }
|
||||
EFClient.Permission? MinimumPermission { get; }
|
||||
string PermissionEntity { get; }
|
||||
string PermissionAccess { get; }
|
||||
string Source { get; }
|
||||
InteractionCallback Action { get; }
|
||||
Delegate ScriptAction { get; }
|
||||
}
|
17
SharedLibraryCore/Interfaces/IInteractionRegistration.cs
Normal file
17
SharedLibraryCore/Interfaces/IInteractionRegistration.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces;
|
||||
|
||||
public interface IInteractionRegistration
|
||||
{
|
||||
void RegisterScriptInteraction(string interactionName, string source, Delegate interactionRegistration);
|
||||
void RegisterInteraction(string interactionName, Func<int?, Reference.Game?, CancellationToken, Task<IInteractionData>> interactionRegistration);
|
||||
void UnregisterInteraction(string interactionName);
|
||||
Task<IEnumerable<IInteractionData>> GetInteractions(int? clientId = null,
|
||||
Reference.Game? game = null, CancellationToken token = default);
|
||||
Task<string> ProcessInteraction(string interactionId, int? clientId = null, Reference.Game? game = null, CancellationToken token = default);
|
||||
}
|
Reference in New Issue
Block a user