@fnlb-project/shared 1.5.107 → 1.5.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/index.d.ts +48 -33
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -40,7 +40,8 @@ export declare enum CategoryConfigTriggerType {
|
|
|
40
40
|
Command = 1
|
|
41
41
|
}
|
|
42
42
|
export declare enum CategoryConfigTriggerActionType {
|
|
43
|
-
RunCommand = 0
|
|
43
|
+
RunCommand = 0,
|
|
44
|
+
RunFunction = 1
|
|
44
45
|
}
|
|
45
46
|
export declare enum CategoryConfigTriggerEventType {
|
|
46
47
|
Ready = 0,
|
|
@@ -88,6 +89,47 @@ export interface IClientAccount {
|
|
|
88
89
|
bots?: IDBBot[];
|
|
89
90
|
categories?: IDBCategory[];
|
|
90
91
|
}
|
|
92
|
+
export declare enum CommandParamType {
|
|
93
|
+
RequiredParam = 0,
|
|
94
|
+
OptionalParam = 1,
|
|
95
|
+
RequiredSelect = 2,
|
|
96
|
+
OptionalSelect = 3,
|
|
97
|
+
RequiredNumericParam = 4,
|
|
98
|
+
OptionalNumericParam = 5
|
|
99
|
+
}
|
|
100
|
+
export interface ICommandBaseParam {
|
|
101
|
+
id: string;
|
|
102
|
+
type: CommandParamType;
|
|
103
|
+
name: string;
|
|
104
|
+
description: string;
|
|
105
|
+
examples?: string[];
|
|
106
|
+
}
|
|
107
|
+
export interface ICommandNormalParam extends ICommandBaseParam {
|
|
108
|
+
type: CommandParamType.RequiredParam | CommandParamType.OptionalParam;
|
|
109
|
+
extended: boolean;
|
|
110
|
+
}
|
|
111
|
+
export interface ICommandSelectParam extends ICommandBaseParam {
|
|
112
|
+
type: CommandParamType.RequiredSelect | CommandParamType.OptionalSelect;
|
|
113
|
+
options: ICommandSelectParamOptions[];
|
|
114
|
+
}
|
|
115
|
+
export interface ICommandSelectParamOptions {
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
alias?: string[];
|
|
119
|
+
}
|
|
120
|
+
export interface ICommandNumericParam extends ICommandBaseParam {
|
|
121
|
+
type: CommandParamType.RequiredNumericParam | CommandParamType.OptionalNumericParam;
|
|
122
|
+
}
|
|
123
|
+
export type CommandParam = ICommandNormalParam | ICommandSelectParam | ICommandNumericParam;
|
|
124
|
+
export interface ISerializedActionFunction {
|
|
125
|
+
id: string;
|
|
126
|
+
config: {
|
|
127
|
+
name: string;
|
|
128
|
+
alias: string[];
|
|
129
|
+
description: string;
|
|
130
|
+
usage: CommandParam[];
|
|
131
|
+
};
|
|
132
|
+
}
|
|
91
133
|
export interface IDBBot {
|
|
92
134
|
id: string;
|
|
93
135
|
owner: string;
|
|
@@ -179,6 +221,11 @@ export type ICategoryConfigTriggerActionNode = {
|
|
|
179
221
|
command: string;
|
|
180
222
|
args?: string[];
|
|
181
223
|
condition?: string;
|
|
224
|
+
} | {
|
|
225
|
+
type: CategoryConfigTriggerActionType.RunFunction;
|
|
226
|
+
function: string;
|
|
227
|
+
args?: string[];
|
|
228
|
+
condition?: string;
|
|
182
229
|
};
|
|
183
230
|
export type ICategoryConfigTrigger = {
|
|
184
231
|
name: string;
|
|
@@ -264,38 +311,6 @@ export interface IDBCategory {
|
|
|
264
311
|
}
|
|
265
312
|
export interface ICategory extends IDBCategory {
|
|
266
313
|
}
|
|
267
|
-
export declare enum CommandParamType {
|
|
268
|
-
RequiredParam = 0,
|
|
269
|
-
OptionalParam = 1,
|
|
270
|
-
RequiredSelect = 2,
|
|
271
|
-
OptionalSelect = 3,
|
|
272
|
-
RequiredNumericParam = 4,
|
|
273
|
-
OptionalNumericParam = 5
|
|
274
|
-
}
|
|
275
|
-
export interface ICommandBaseParam {
|
|
276
|
-
id: string;
|
|
277
|
-
type: CommandParamType;
|
|
278
|
-
name: string;
|
|
279
|
-
description: string;
|
|
280
|
-
examples?: string[];
|
|
281
|
-
}
|
|
282
|
-
export interface ICommandNormalParam extends ICommandBaseParam {
|
|
283
|
-
type: CommandParamType.RequiredParam | CommandParamType.OptionalParam;
|
|
284
|
-
extended: boolean;
|
|
285
|
-
}
|
|
286
|
-
export interface ICommandSelectParam extends ICommandBaseParam {
|
|
287
|
-
type: CommandParamType.RequiredSelect | CommandParamType.OptionalSelect;
|
|
288
|
-
options: ICommandSelectParamOptions[];
|
|
289
|
-
}
|
|
290
|
-
export interface ICommandSelectParamOptions {
|
|
291
|
-
id: string;
|
|
292
|
-
name: string;
|
|
293
|
-
alias?: string[];
|
|
294
|
-
}
|
|
295
|
-
export interface ICommandNumericParam extends ICommandBaseParam {
|
|
296
|
-
type: CommandParamType.RequiredNumericParam | CommandParamType.OptionalNumericParam;
|
|
297
|
-
}
|
|
298
|
-
export type CommandParam = ICommandNormalParam | ICommandSelectParam | ICommandNumericParam;
|
|
299
314
|
export interface ISerializedCommand {
|
|
300
315
|
id: string;
|
|
301
316
|
config: {
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var l;((e)=>{e[e.Offline=0]="Offline";e[e.Booting=1]="Booting";e[e.Available=2]="Available";e[e.Busy=3]="Busy";e[e.Disconnected=4]="Disconnected"})(l||={});var I;((e)=>{e[e.Neutral=0]="Neutral";e[e.Success=1]="Success";e[e.Info=2]="Info";e[e.Warn=3]="Warn";e[e.Error=4]="Error"})(I||={});var w;((
|
|
1
|
+
var l;((e)=>{e[e.Offline=0]="Offline";e[e.Booting=1]="Booting";e[e.Available=2]="Available";e[e.Busy=3]="Busy";e[e.Disconnected=4]="Disconnected"})(l||={});var I;((e)=>{e[e.Neutral=0]="Neutral";e[e.Success=1]="Success";e[e.Info=2]="Info";e[e.Warn=3]="Warn";e[e.Error=4]="Error"})(I||={});var w;((x)=>{x.Win="WIN";x.Mac="MAC";x.Psn="PSN";x.Xbl="XBL";x.Swt="SWT";x.Swt2="SWT2";x.Ios="IOS";x.And="AND";x.Ps5="PS5";x.Xsx="XSX"})(w||={});var B;((b)=>{b[b.Public=0]="Public";b[b.Private=1]="Private"})(B||={});var M;((d)=>{d[d.Auto=0]="Auto";d[d.Online=1]="Online";d[d.Away=2]="Away"})(M||={});var W;((b)=>{b[b.Event=0]="Event";b[b.Command=1]="Command"})(W||={});var q;((b)=>{b[b.RunCommand=0]="RunCommand";b[b.RunFunction=1]="RunFunction"})(q||={});var J;((n)=>{n[n.Ready=0]="Ready";n[n.Disconnected=1]="Disconnected";n[n.PartyInvite=2]="PartyInvite";n[n.PartyJoinRequest=3]="PartyJoinRequest";n[n.PartyMemberJoined=4]="PartyMemberJoined";n[n.PartyMemberLeft=5]="PartyMemberLeft";n[n.PartyMemberKicked=6]="PartyMemberKicked";n[n.PartyMemberMessage=7]="PartyMemberMessage";n[n.PartyMemberPromoted=8]="PartyMemberPromoted";n[n.PartyMemberReady=9]="PartyMemberReady";n[n.PartyMemberSitOut=10]="PartyMemberSitOut";n[n.PartyMemberUnready=11]="PartyMemberUnready";n[n.PartyMemberMatch=12]="PartyMemberMatch";n[n.PartyMemberCosmeticUpdated=13]="PartyMemberCosmeticUpdated";n[n.FriendAdded=14]="FriendAdded";n[n.FriendRemoved=15]="FriendRemoved";n[n.FriendRequest=16]="FriendRequest";n[n.FriendMessage=17]="FriendMessage";n[n.FriendOnline=18]="FriendOnline";n[n.FriendOffline=19]="FriendOffline";n[n.UserBlocked=20]="UserBlocked";n[n.UserUnblocked=21]="UserUnblocked";n[n.PartyMemberInParty=22]="PartyMemberInParty"})(J||={});var H;((u)=>{u.Default="en";u.EnUS="en-US";u.Es="es";u.Es419="es-419";u.Ar="ar";u.De="de";u.Fr="fr";u.He="he";u.Id="id";u.It="it";u.Ja="ja";u.Ko="ko";u.Pl="pl";u.Pt="pt";u.PtBR="pt-BR";u.Ru="ru";u.Th="th";u.Tr="tr";u.Vi="vi";u.Zh="zh";u.ZhHant="zh-Hant"})(H||={});var f;((h)=>{h.Default="en";h.Ar="ar";h.De="de";h.Es="es";h.Es419="es-419";h.Fr="fr";h.Id="id";h.It="it";h.Ja="ja";h.Ko="ko";h.Pl="pl";h.PtBR="pt-BR";h.Ru="ru";h.Th="th";h.Tr="tr";h.Vi="vi";h.ZhHans="zh-Hans";h.ZhHant="zh-Hant"})(f||={});var a={searchLangs:["en"],platform:["AND"],privacy:1,prefixes:["!",".","/"],statusType:0,statusText:[],statusInterval:2,level:[-999999999],bpLevel:[999999999],extraOwners:[],admins:[],whitelistUsers:[],blacklistUsers:[],excludedAutoAddFriends:[],otherBots:[],inviteTimeout:60,maxBotsPerLobby:8,maxBotsPerLobbyWithOwner:16,maxBotsPerLobbyWithAdmin:16,maxBotsPerLobbyWithWhitelistUser:16,allowMatchmaking:!0,leaveAfterMatchmaking:!1,disableMatchmakingChecks:!0,disablePlaylistChecks:!1,disableJoinMessages:!1,disableAutomaticMessages:!1,acceptFriendRequests:!0,sendFriendRequestOnJoinParty:!0,sendFriendRequestOnMemberJoinParty:!0,runCommandsWithoutPrefix:!0,setCosmeticsWithoutCommands:!0,setCosmeticsWithPrefix:!0,acceptInvites:!0,startBannedBots:!0,triggers:[],onlyOwnerCommands:["send_number","send_all","send_category","remove_all_friends","decline_all_friends","accept_all_friends","unblock_all_users","restart_bot","restart_category","restart_shard"],onlyAdminCommands:["add_friend","remove_friend","block_user","unblock_user"],onlyWhitelistUsersCommands:["send_party","send_shard","kick","kick_all","hide_all","message","whisper","accept_friend","decline_friend","set_status","say"],onlyFriendsCommands:[],onlyPartyMembersCommands:[],onlyWhisperCommands:[],startOutfit:[{id:"CID_030_Athena_Commando_M_Halloween",variants:[1,0]},{id:"CID_029_Athena_Commando_F_Halloween",variants:[2]},{id:"CID_434_Athena_Commando_F_StealthHonor",variants:[]},{id:"CID_175_Athena_Commando_M_Celestial",variants:[]}],startBackpack:[{id:"BID_138_Celestial",variants:[]},{id:"BID_004_BlackKnight",variants:[]}],startPickaxe:[{id:"Pickaxe_ID_116_Celestial",variants:[]},{id:"Pickaxe_ID_013_Teslacoil",variants:[]}],startShoes:[],startBanner:[{id:"BRSeason01"}],startBannerColor:[{id:"DefaultColor17"},{id:"DefaultColor14"}],joinOutfit:[],joinBackpack:[],joinPickaxe:[],joinEmote:[{id:"EID_KPopDance03"}],joinShoes:[],joinBanner:[],joinBannerColor:[],memberJoinOutfit:[],memberJoinBackpack:[],memberJoinPickaxe:[],memberJoinEmote:[{id:"EID_KPopDance03"}],memberJoinShoes:[],memberJoinBanner:[],memberJoinBannerColor:[]};var j;((m)=>{m[m.RequiredParam=0]="RequiredParam";m[m.OptionalParam=1]="OptionalParam";m[m.RequiredSelect=2]="RequiredSelect";m[m.OptionalSelect=3]="OptionalSelect";m[m.RequiredNumericParam=4]="RequiredNumericParam";m[m.OptionalNumericParam=5]="OptionalNumericParam"})(j||={});var k;((i)=>{i.GenericUnknown="net.fnlb.errors.generic.unknown";i.GenericInternalError="net.fnlb.errors.generic.internal_error";i.GenericValidationFailed="net.fnlb.errors.generic.validation_failed";i.GenericParseFailed="net.fnlb.errors.generic.parse_failed";i.GenericNotFound="net.fnlb.errors.generic.not_found";i.GenericAlreadyExists="net.fnlb.errors.generic.already_exists";i.CommonInvalidRequest="net.fnlb.errors.common.invalid_request";i.CommonUnableToProcessRequest="net.fnlb.errors.common.unable_to_process_request";i.CommonInvalidFieldsLength="net.fnlb.errors.common.invalid_body_fields_length";i.CommonRateLimitExceeded="net.fnlb.errors.common.rate_limit_exceeded";i.CommonLimitExceeded="net.fnlb.errors.common.limit_exceeded";i.CommonUnableToSaveToDatabase="net.fnlb.errors.common.unable_to_save_to_database";i.CommonUpdateRequired="net.fnlb.errors.common.update_required";i.CommonMaintenanceMode="net.fnlb.errors.common.maintenance_mode";i.AuthInvalidToken="net.fnlb.errors.auth.invalid_token";i.AuthInvalidAPIToken="net.fnlb.errors.auth.invalid_api_token";i.AuthInvalidCaptchaToken="net.fnlb.errors.auth.invalid_captcha_token";i.AuthUnauthorized="net.fnlb.errors.auth.unauthorized";i.AuthForbidden="net.fnlb.errors.auth.forbidden";i.AuthUserBanned="net.fnlb.errors.auth.user_banned";i.Oauth2InvalidCode="net.fnlb.errors.oauth2.invalid_code";i.Oauth2InvalidScope="net.fnlb.errors.oauth2.invalid_scope";i.Oauth2TokenInvalid="net.fnlb.errors.oauth2.token_invalid";i.Oauth2UnableToFetchUser="net.fnlb.errors.oauth2.unable_to_fetch_user";i.Oauth2UnableToFetchConnections="net.fnlb.errors.oauth2.unable_to_fetch_connections";i.Oauth2UserWithoutConnection="net.fnlb.errors.oauth2.user_without_connection";i.Oauth2ConnectionNotVerified="net.fnlb.errors.oauth2.connection_not_verified";i.ReleaseNotFound="net.fnlb.errors.release.no_release_found";i.ReleaseVersionAlreadyExists="net.fnlb.errors.release.version_already_exists"})(k||={});var D;((c)=>{c.LoginInvalidCredentials="net.fnlb.errors.login.invalid_credentials";c.LoginInvalidEmail="net.fnlb.errors.login.invalid_email";c.LoginInvalidOrUsedEmail="net.fnlb.errors.login.invalid_or_used_email";c.AuthPasswordConfirmationInvalid="net.fnlb.errors.auth.invalid_password_confirmation"})(D||={});var G={...k,...D};var R;((c)=>{c.Username="username";c.Email="email";c.Password="password";c.Shared="shared"})(R||={});var V;((b)=>{b.General="general";b.Input="input"})(V||={});var N;((d)=>{d[d.Disabled=1]="Disabled";d[d.Verified=2]="Verified";d[d.VerificationPending=4]="VerificationPending"})(N||={});var z;((d)=>{d[d.Disabled=1]="Disabled";d[d.Public=2]="Public";d[d.InvalidAuth=4]="InvalidAuth"})(z||={});var K;((b)=>{b[b.Disabled=1]="Disabled";b[b.Managed=2]="Managed"})(K||={});var O;((s)=>s[s.NotWearable=1]="NotWearable")(O||={});var Z;((d)=>{d[d.identify=1]="identify";d[d.email=2]="email";d[d.connections=4]="connections";d[d["bots.read"]=8]="bots.read";d[d["bots.write"]=16]="bots.write";d[d["bots.run"]=32]="bots.run";d[d["categories.read"]=64]="categories.read";d[d["categories.write"]=128]="categories.write";d[d["commands.run"]=256]="commands.run"})(Z||={});var v;((t)=>{t[t.Disabled=1]="Disabled";t[t.IgnoreSelf=2]="IgnoreSelf";t[t.IgnoreBots=4]="IgnoreBots";t[t.IgnoreLeader=8]="IgnoreLeader";t[t.IgnoreOwners=16]="IgnoreOwners";t[t.IgnoreAdmins=32]="IgnoreAdmins";t[t.IgnoreWhitelistUsers=64]="IgnoreWhitelistUsers";t[t.IgnoreBlacklistUsers=128]="IgnoreBlacklistUsers";t[t.IgnoreExcludedAutoAddFriends=256]="IgnoreExcludedAutoAddFriends";t[t.IgnoreFriends=512]="IgnoreFriends";t[t.IgnoreOtherBots=1024]="IgnoreOtherBots";t[t.IgnorePartyMembers=2048]="IgnorePartyMembers"})(v||={});var Q;((_)=>{_[_.Staff=1]="Staff";_[_.Admin=2]="Admin";_[_.Vip=4]="Vip";_[_.Verified=8]="Verified";_[_.Banned=16]="Banned";_[_.Tester=32]="Tester";_[_.Developer=64]="Developer";_[_.Partner=128]="Partner";_[_.Management=256]="Management";_[_.Moderation=512]="Moderation";_[_.Support=1024]="Support";_[_.IncreasedLimits=2048]="IncreasedLimits";_[_.Disabled=4096]="Disabled"})(Q||={});export{a as defaultCategoryConfig,Q as UserFlags,v as TriggerFlags,Z as OAuth2ScopeFlags,H as Locales,D as InputErrorCodes,k as GeneralErrorCodes,V as ErrorTypes,R as ErrorInputTypes,G as ErrorCodes,O as CosmeticFlags,I as CommandReplyFormat,j as CommandParamType,K as CategoryFlags,W as CategoryConfigTriggerType,J as CategoryConfigTriggerEventType,q as CategoryConfigTriggerActionType,w as CategoryConfigSupportedPlatforms,M as CategoryConfigStatusType,B as CategoryConfigPartyPrivacy,l as BotStatus,z as BotFlags,N as ApplicationFlags,f as APILocales};
|