Options
All
  • Public
  • Public/Protected
  • All
Menu

azur-lane-api-new

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

HTTPMethods

HTTPMethods: "get" | "head" | "post" | "put" | "delete" | "connect" | "trace" | "patch"

ModelResolverOptions

ModelResolverOptions: { region: ResolverRegion; repo: string; token: string }

Type declaration

MonthData

MonthData: {}

Type declaration

Newable

Newable<T>: {}

Type parameters

  • T

Type declaration

QueriedNextApiHandler

QueriedNextApiHandler<T>: (req: QueriedNextApiRequest<T>, res: NextApiResponse) => void | Promise<void>

Type parameters

  • T

Type declaration

ResolverRegion

ResolverRegion: "en" | "jp" | "cn" | "kr" | "tw"

ShipGroupDescriptionItem

ShipGroupDescriptionItem: [string, [ShipDescriptionAction, any]]

Transformer

Transformer: (o: unknown) => unknown

Type declaration

    • (o: unknown): unknown
    • Parameters

      • o: unknown

      Returns unknown

TreeItem

TreeItem: { mode: string; path: string; sha: string; size: number; type: string; url: string }

Type declaration

  • mode: string
  • path: string
  • sha: string
  • size: number
  • type: string
  • url: string

Variables

Let FileModel

FileModel: Model<IFileSchema>

Const FileSchema

FileSchema: Schema<any> = new mongoose.Schema({name: {type: String,required: true},hash: {type: String,required: true},contents: {type: Buffer,required: true}})

Const MODEL_DEPENDS_KEY

MODEL_DEPENDS_KEY: "nimi-model:depends" = "nimi-model:depends"

Const MODEL_EXCLUDE_KEY

MODEL_EXCLUDE_KEY: "nimi-model:exclude" = "nimi-model:exclude"

Const NAMECODE_REGEX

NAMECODE_REGEX: RegExp = /\{namecode:(\d+)\}/g

Const REGEX_CHECKPOINT

REGEX_CHECKPOINT: RegExp = /(\d+)-(\d+)/

Const REGEX_CONSTRUCT

REGEX_CONSTRUCT: RegExp = /(light|heavy|special)/gi

Const REGEX_EVENT

REGEX_EVENT: RegExp = /Event: (.+)/

Const SCHEMA_POSITION_KEY

SCHEMA_POSITION_KEY: "nimi-schema:position" = "nimi-schema:position"

Const TAG_REGEX

TAG_REGEX: RegExp = /<[^>]*>/g

Const compress

compress: (arg1: T1) => Promise<TResult> = util.promisify(snappy.compress)

Type declaration

    • (arg1: T1): Promise<TResult>
    • Parameters

      • arg1: T1

      Returns Promise<TResult>

Const cors

cors: (Anonymous function) = initMiddleware(Cors())

Const rate

rate: (Anonymous function) = initMiddleware(RateLimit({ windowMs: 60 * 60 * 1000, max: 150 }))

Const uncompress

uncompress: (arg1: T1, arg2: T2) => Promise<TResult> = util.promisify(snappy.uncompress)

Type declaration

    • (arg1: T1, arg2: T2): Promise<TResult>
    • Parameters

      • arg1: T1
      • arg2: T2

      Returns Promise<TResult>

Functions

Const connectDB

  • connectDB(): Promise<"mongoose">
  • Returns Promise<"mongoose">

createFileEntry

  • createFileEntry(name: string, hash: string, contents: Buffer): Promise<void>
  • Creates a new file entry in the database.

    Parameters

    • name: string

      the name of the file

    • hash: string

      the hash identifier of the file, grab this from GitHub.

    • contents: Buffer

      the buffered contents of the file. Recommended to use GZipped buffers here.

    Returns Promise<void>

createModel

  • A factory method that creates a NextApiHandler using the provided model and schema.

    Parameters

    • model: Newable<IModel>

      The model to be used in serialization.

    • Default value schema: Newable<Object> = GetEntryByRegionQuery

      The model's argument as a schema that will be passed during its initialization.

    Returns NextApiHandler<any>

deleteFileEntry

  • deleteFileEntry(name: string): Promise<void>
  • Deletes a file entry in the database. Useful if the file is deprecated on new versions of the file sets.

    Parameters

    • name: string

      the name of the file to remove.

    Returns Promise<void>

dependsOn

  • dependsOn(dependencies: Array<string>): ClassDecorator
  • Denote a ShareCfgModel depends on data that will be resolved and passed to it's load method.

    Parameters

    • dependencies: Array<string>

      An array of dependency names as listed in ShareCfgResolver

    Returns ClassDecorator

exclude

  • exclude(): PropertyDecorator
  • Marks a property as private to be excluded from serialization.

    Returns PropertyDecorator

formatMonth

  • formatMonth(month: any): {}
  • Parameters

    • month: any

    Returns {}

getFileEntry

  • getFileEntry(name: string): Promise<any>
  • Gets a file entry from the DB and returns the entry as a JavaScript object.

    Parameters

    • name: string

      the name of the file.

    Returns Promise<any>

    the JavaScript object. This also contains the document id (_id). This is a instance of IFileModel as object.

handleError

  • handleError(fn: NextApiHandler): NextApiHandler
  • Parameters

    • fn: NextApiHandler

    Returns NextApiHandler

initMiddleware

  • initMiddleware(middleware: any): (Anonymous function)
  • Parameters

    • middleware: any

    Returns (Anonymous function)

mapDialogue

  • mapDialogue(dialogue: any, codes: any): (Anonymous function)
  • Parameters

    • dialogue: any
    • codes: any

    Returns (Anonymous function)

methods

  • methods(handlers: {}): NextApiHandler
  • Parameters

    • handlers: {}

    Returns NextApiHandler

position

  • position(order: number): (Anonymous function)
  • Define what position this property wille be ordered in the schema.

    Parameters

    • order: number

      The position of the property in the schema.

    Returns (Anonymous function)

replaceNameCodes

  • replaceNameCodes(str: string, codes: any): string
  • Parameters

    • str: string
    • codes: any

    Returns string

updateFileEntry

  • updateFileEntry(name: string, hash: string, contents: Buffer): Promise<void>
  • Updates a existing file entry in the database. Usually needed if the files has a new version somewhere.

    Parameters

    • name: string

      the name of the file. This needs to be consistent as this is used as a search term to the DB.

    • hash: string

      the new hash identifier of the file. New versions of the file gets a new hash so you want to update this.

    • contents: Buffer

      the new (GZipped) buffered contents of the files.

    Returns Promise<void>

validate

  • Type parameters

    • T

    Parameters

    Returns NextApiHandler

validateAction

  • Parameters

    Returns NextApiHandler

Object literals

Const ACQUISITION_DEFAULTS

ACQUISITION_DEFAULTS: object

chapter

chapter: null = null

collection

collection: boolean = false

event

event: null = null

exchange

exchange: null = null

stage

stage: null = null

task

task: null = null

construction

construction: object

heavy

heavy: boolean = false

light

light: boolean = false

limited

limited: boolean = false

research

research: boolean = false

special

special: boolean = false

Const ACQUISITION_TASK

ACQUISITION_TASK: object

CBT Reward

CBT Reward: string = "closedBetaParticipant"

Hidden Mission:Im-paws-ible quest

Hidden Mission:Im-paws-ible quest: string = "akashiMissions"

Monthly Sign-in

Monthly Sign-in: string = "monthlySignIn"

Weekly Mission

Weekly Mission: string = "weeklyMission"

Const ACQUISITION_WARP

ACQUISITION_WARP: object

sham

sham: ShipExchangeLocation = ShipExchangeLocation.Core

supplies

supplies: ShipExchangeLocation = ShipExchangeLocation.Munitions

Const SHIP_ATTR_TYPE

SHIP_ATTR_TYPE: object

0

0: string = "health"

1

1: string = "cannon"

10

10: string = "luck"

11

11: string = "antiSub"

2

2: string = "torpedo"

3

3: string = "antiAir"

4

4: string = "aviation"

5

5: string = "reload"

6

6: string = "armor"

7

7: string = "hit"

8

8: string = "evasion"

9

9: string = "speed"

Const SHIP_DIALOGUE_MAP

SHIP_DIALOGUE_MAP: object

battle

battle: string = "startBattle"

detail

detail: string = "details"

drop_descrip

drop_descrip: string = "description"

expedition

expedition: string = "commission"

feeling1

feeling1: string = "affinityDisappointed"

feeling2

feeling2: string = "affinityStranger"

feeling3

feeling3: string = "affinityFriendly"

feeling4

feeling4: string = "affinityLike"

feeling5

feeling5: string = "affinityLove"

headtouch

headtouch: string = "headpat"

home

home: string = "return"

hp_warning

hp_warning: string = "lowHp"

login

login: string = "login"

lose

lose: string = "lose"

mail

mail: string = "mail"

main

main: string = "idle"

mission

mission: string = "task"

mission_complete

mission_complete: string = "taskComplete"

profile

profile: string = "selfIntroduction"

propose

propose: string = "pledge"

skill

skill: string = "skillActivate"

touch

touch: string = "touch"

touch2

touch2: string = "specialTouch"

unlock

unlock: string = "acquisition"

upgrade

upgrade: string = "strengthening"

win_mvp

win_mvp: string = "mvp"

Generated using TypeDoc