2022-10-20 20:06:25 -04:00
|
|
|
import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
|
|
|
|
|
|
|
|
|
|
export const AGENT_NAME = "s3si.ts";
|
2022-11-21 04:03:08 -05:00
|
|
|
export const S3SI_VERSION = "0.1.22";
|
2022-10-20 09:45:59 -04:00
|
|
|
export const NSOAPP_VERSION = "2.3.1";
|
2022-11-21 03:59:43 -05:00
|
|
|
export const WEB_VIEW_VERSION = "1.0.0-d7b95a79";
|
2022-10-25 08:37:03 -04:00
|
|
|
export const S3SI_LINK = "https://github.com/spacemeowx2/s3si.ts";
|
2022-10-20 23:48:45 -04:00
|
|
|
|
2022-10-24 10:28:23 -04:00
|
|
|
export const USERAGENT = `${AGENT_NAME}/${S3SI_VERSION} (${S3SI_LINK})`;
|
2022-10-20 09:45:59 -04:00
|
|
|
export const DEFAULT_APP_USER_AGENT =
|
|
|
|
|
"Mozilla/5.0 (Linux; Android 11; Pixel 5) " +
|
|
|
|
|
"AppleWebKit/537.36 (KHTML, like Gecko) " +
|
|
|
|
|
"Chrome/94.0.4606.61 Mobile Safari/537.36";
|
|
|
|
|
export const SPLATNET3_URL = "https://api.lp1.av5ja.srv.nintendo.net";
|
|
|
|
|
export const SPLATNET3_ENDPOINT =
|
|
|
|
|
"https://api.lp1.av5ja.srv.nintendo.net/api/graphql";
|
2022-10-27 07:29:05 -04:00
|
|
|
export const S3S_NAMESPACE = "b3a2dbf5-2c09-4792-b78c-00b548b70aeb";
|
2022-10-20 09:45:59 -04:00
|
|
|
export const S3SI_NAMESPACE = "63941e1c-e32e-4b56-9a1d-f6fbe19ef6e1";
|
2022-10-20 20:06:25 -04:00
|
|
|
|
|
|
|
|
export const SPLATNET3_STATINK_MAP: {
|
|
|
|
|
RULE: Record<VsHistoryDetail["vsRule"]["rule"], StatInkPostBody["rule"]>;
|
|
|
|
|
RESULT: Record<VsHistoryDetail["judgement"], StatInkPostBody["result"]>;
|
|
|
|
|
DRAGON: Record<
|
|
|
|
|
NonNullable<VsHistoryDetail["festMatch"]>["dragonMatchType"],
|
|
|
|
|
StatInkPostBody["fest_dragon"]
|
|
|
|
|
>;
|
|
|
|
|
} = {
|
|
|
|
|
RULE: {
|
|
|
|
|
TURF_WAR: "nawabari",
|
|
|
|
|
AREA: "area",
|
|
|
|
|
LOFT: "yagura",
|
|
|
|
|
GOAL: "hoko",
|
|
|
|
|
CLAM: "asari",
|
|
|
|
|
// TODO: support tri-color
|
|
|
|
|
TRI_COLOR: "nawabari",
|
|
|
|
|
},
|
|
|
|
|
RESULT: {
|
|
|
|
|
WIN: "win",
|
|
|
|
|
LOSE: "lose",
|
|
|
|
|
DEEMED_LOSE: "lose",
|
|
|
|
|
EXEMPTED_LOSE: "exempted_lose",
|
2022-10-26 05:05:16 -04:00
|
|
|
DRAW: "draw",
|
2022-10-20 20:06:25 -04:00
|
|
|
},
|
|
|
|
|
DRAGON: {
|
|
|
|
|
NORMAL: undefined,
|
|
|
|
|
DECUPLE: "10x",
|
|
|
|
|
DRAGON: "100x",
|
|
|
|
|
DOUBLE_DRAGON: "333x",
|
|
|
|
|
},
|
|
|
|
|
};
|