备份CatanBuilding瘦身独立工程
This commit is contained in:
39
LocalPackages/aihelp-5.3/Runtime/AIHelp/Config/ApiConfig.cs
Normal file
39
LocalPackages/aihelp-5.3/Runtime/AIHelp/Config/ApiConfig.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
using System;
|
||||
namespace AIHelp
|
||||
{
|
||||
public class ApiConfig
|
||||
{
|
||||
public string EntranceId { get; }
|
||||
public string WelcomeMessage { get; }
|
||||
|
||||
private ApiConfig(Builder builder)
|
||||
{
|
||||
EntranceId = builder.EntranceId;
|
||||
WelcomeMessage = builder.WelcomeMessage;
|
||||
}
|
||||
|
||||
public class Builder
|
||||
{
|
||||
public string EntranceId { get; private set; }
|
||||
public string WelcomeMessage { get; private set; }
|
||||
|
||||
public Builder SetEntranceId(string entranceId)
|
||||
{
|
||||
EntranceId = entranceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder SetWelcomeMessage(string welcomeMessage)
|
||||
{
|
||||
WelcomeMessage = welcomeMessage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ApiConfig Build()
|
||||
{
|
||||
return new ApiConfig(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af06fba061d114dee8bab53d2386c967
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace AIHelp
|
||||
{
|
||||
public class AIHelpDelegate
|
||||
{
|
||||
public delegate void AsyncEventListener(String jsonEventData, Action<string> acknowledge);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 667f6671ba9b540dba0f6c7aedc71883
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
70
LocalPackages/aihelp-5.3/Runtime/AIHelp/Config/Enum.cs
Normal file
70
LocalPackages/aihelp-5.3/Runtime/AIHelp/Config/Enum.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
using System;
|
||||
namespace AIHelp
|
||||
{
|
||||
|
||||
public enum PushPlatform
|
||||
{
|
||||
APNS = 1, FIREBASE = 2, JIGUANG = 3, GETUI = 4, HUAWEI = 6, ONE_SIGNAL = 7
|
||||
}
|
||||
|
||||
public enum ConversationMoment
|
||||
{
|
||||
NEVER = 1, ALWAYS = 2, ONLY_IN_ANSWER_PAGE = 3, AFTER_MARKING_UNHELPFUL = 4
|
||||
}
|
||||
|
||||
public enum PublishCountryOrRegion
|
||||
{
|
||||
CN = 1, IN = 2
|
||||
};
|
||||
|
||||
public enum EventType
|
||||
{
|
||||
/**
|
||||
* Event for SDK initialization
|
||||
*/
|
||||
Initialization,
|
||||
|
||||
/**
|
||||
* Event for user login
|
||||
*/
|
||||
UserLogin,
|
||||
|
||||
/**
|
||||
* Event for enterprise authentication
|
||||
*/
|
||||
EnterpriseAuth,
|
||||
|
||||
/**
|
||||
* Event for opening or closing a session (window)
|
||||
*/
|
||||
SessionOpen,
|
||||
SessionClose,
|
||||
|
||||
/**
|
||||
* Event for message arrival
|
||||
*/
|
||||
MessageArrival,
|
||||
|
||||
/**
|
||||
* Event for log upload
|
||||
*/
|
||||
LogUpload,
|
||||
|
||||
/**
|
||||
* Event for URL click
|
||||
*/
|
||||
UrlClick,
|
||||
|
||||
/**
|
||||
* Event for unread task count
|
||||
*/
|
||||
UnreadTaskCount,
|
||||
|
||||
/**
|
||||
* Event for conversation start, along with the user's first message
|
||||
*/
|
||||
ConversationStart,
|
||||
}
|
||||
|
||||
}
|
||||
11
LocalPackages/aihelp-5.3/Runtime/AIHelp/Config/Enum.cs.meta
Normal file
11
LocalPackages/aihelp-5.3/Runtime/AIHelp/Config/Enum.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fbae61ea0fb14752bcd772995401549
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
using System;
|
||||
namespace AIHelp
|
||||
{
|
||||
public class LoginConfig
|
||||
{
|
||||
public string UserId { get; }
|
||||
public UserConfig UserConfig { get; }
|
||||
public bool EnterpriseAuth { get; }
|
||||
|
||||
private LoginConfig(Builder builder)
|
||||
{
|
||||
UserId = builder.UserId;
|
||||
UserConfig = builder.UserConfig;
|
||||
EnterpriseAuth = builder.EnterpriseAuth;
|
||||
}
|
||||
|
||||
public class Builder
|
||||
{
|
||||
public string UserId { get; private set; }
|
||||
public UserConfig UserConfig { get; private set; }
|
||||
public bool EnterpriseAuth { get; private set; }
|
||||
|
||||
public Builder SetUserId(string userId)
|
||||
{
|
||||
UserId = userId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder SetUserConfig(UserConfig userConfig)
|
||||
{
|
||||
UserConfig = userConfig;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder SetEnterpriseAuth(bool enterpriseAuth)
|
||||
{
|
||||
EnterpriseAuth = enterpriseAuth;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LoginConfig Build()
|
||||
{
|
||||
return new LoginConfig(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53e798a014f114fdf8e104f67b645563
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
57
LocalPackages/aihelp-5.3/Runtime/AIHelp/Config/UserConfig.cs
Normal file
57
LocalPackages/aihelp-5.3/Runtime/AIHelp/Config/UserConfig.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
using System;
|
||||
namespace AIHelp
|
||||
{
|
||||
public class UserConfig
|
||||
{
|
||||
public string UserName { get; }
|
||||
public string ServerId { get; }
|
||||
public string UserTags { get; }
|
||||
public string CustomData { get; }
|
||||
|
||||
private UserConfig(Builder builder)
|
||||
{
|
||||
UserName = builder.UserName;
|
||||
ServerId = builder.ServerId;
|
||||
UserTags = builder.UserTags;
|
||||
CustomData = builder.CustomData;
|
||||
}
|
||||
|
||||
public class Builder
|
||||
{
|
||||
public string UserName { get; private set; } = "anonymous";
|
||||
public string ServerId { get; private set; } = "-1";
|
||||
public string UserTags { get; private set; } = string.Empty;
|
||||
public string CustomData { get; private set; } = string.Empty;
|
||||
|
||||
public Builder SetUserName(string userName)
|
||||
{
|
||||
UserName = userName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder SetServerId(string serverId)
|
||||
{
|
||||
ServerId = serverId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder SetUserTags(string userTags)
|
||||
{
|
||||
UserTags = userTags;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder SetCustomData(string customDataJsonstring)
|
||||
{
|
||||
CustomData = customDataJsonstring;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UserConfig Build()
|
||||
{
|
||||
return new UserConfig(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8a896a44c3dd450a881ddd9cc5ba37e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user