@cfwest/api-client
Version:
Unofficial CrossFire West ApiClient implementation.
109 lines (108 loc) • 3.27 kB
TypeScript
import { BaseResponse, CountableResponse } from './base';
export declare type WeaponsFilterType = 'collection' | 'temporary' | 'permanent';
export declare type WeaponCategory = 'assault' | 'sniper' | 'smg' | 'mg' | 'shotgun' | 'pistol' | 'melee' | 'grenade';
export interface UserWeapon {
item_ID: number;
item_OBTAINED: number;
eff_START_DATE: number;
eff_END_DATE: number;
item_CODE: string;
image_URL_1: string;
item_CATEGORY1: string;
item_CATEGORY2: string;
item_CATEGORY3: string;
display_NAME: string;
wdn: string;
row: number;
location: string;
perm_WEAPON: number;
ITEM_ID: number;
ITEM_OBTAINED: number;
EFF_START_DATE: number;
EFF_END_DATE: number;
ITEM_CODE: string;
IMAGE_URL_1: string;
ITEM_CATEGORY1: string;
ITEM_CATEGORY2: string;
ITEM_CATEGORY3: string;
DISPLAY_NAME: string;
WDN: string;
ROW: number;
LOCATION: string;
PERM_WEAPON: number;
PERM: boolean;
TEMP: boolean;
EXPIRED: boolean;
}
export interface UserWeaponsResponse extends CountableResponse {
Weapons: UserWeapon[];
}
export interface CollectionCollectorResponse extends BaseResponse {
Collection_Info: Collections.Info;
User_Info: Collections.UserInfo[];
}
export interface PagingInfo {
pagingInfo: PagingInfo.Data[];
}
export declare namespace PagingInfo {
interface Data {
lastPage: number;
perPage: number;
pageNumber: number;
totalCnt: number;
}
}
export declare type CollectionWithUserInfo = [Collections.Info?, Collections.UserInfo[]?];
export interface UserCollectionsResponse extends CountableResponse {
Completed_Collections: number;
Weapons: Collections.Info[];
nick: string;
}
export declare namespace Collections {
/**
* Contains all user related information of a collection owner.
* A collection owner is a player who has all required weapons to complete the collection.
*/
interface UserInfo {
USN: number;
NICK: string;
item_Name: string;
last_Item_Date: Date;
last_Item_Date_old: Date;
}
/**
* The Info class represents a single collection and holds all related information.
*/
interface Info {
total: number;
completed_users: number;
reward_image: string;
reward_obtained: string;
namecardtext: string;
reward_desc: string;
last_item_date: string;
status: number;
user_cnt: number;
idex: number;
collection_name: string;
collection_Name: string;
collection_id: number;
collection_ID: number;
reward_type: string;
description: string;
collection_Image: string;
namecardimgurl: string;
weapons: Collections.WeaponDetails[];
display_order: number;
}
/**
* Representation of a single Weapon which is included in a collection.
*/
interface WeaponDetails {
obtained: number;
collection_id: number;
item_name: string;
image_url: string;
display_order: number;
}
}