eve-esi-types 2.1.2 → 2.2.0
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/README.md +1 -1
- package/package.json +3 -1
- package/rq-util.d.mts +84 -0
- package/rq-util.mjs +107 -0
- package/v2/get_alliances_alliance_id_contacts_labels_ok.d.ts +1 -1
- package/v2/get_alliances_alliance_id_contacts_ok.d.ts +1 -1
- package/v2/get_alliances_alliance_id_corporations_ok.d.ts +1 -1
- package/v2/get_alliances_alliance_id_icons_ok.d.ts +1 -1
- package/v2/get_alliances_alliance_id_ok.d.ts +1 -1
- package/v2/get_alliances_ok.d.ts +1 -1
- package/v2/get_characters_character_id_agents_research_ok.d.ts +1 -1
- package/v2/get_characters_character_id_assets_ok.d.ts +1 -1
- package/v2/get_characters_character_id_attributes_ok.d.ts +1 -1
- package/v2/get_characters_character_id_blueprints_ok.d.ts +1 -1
- package/v2/get_characters_character_id_bookmarks_folders_ok.d.ts +1 -1
- package/v2/get_characters_character_id_bookmarks_ok.d.ts +1 -1
- package/v2/get_characters_character_id_calendar_event_id_attendees_ok.d.ts +1 -1
- package/v2/get_characters_character_id_calendar_event_id_ok.d.ts +1 -1
- package/v2/get_characters_character_id_calendar_ok.d.ts +1 -1
- package/v2/get_characters_character_id_clones_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contacts_labels_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contacts_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contracts_contract_id_bids_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contracts_contract_id_items_ok.d.ts +1 -1
- package/v2/get_characters_character_id_contracts_ok.d.ts +1 -1
- package/v2/get_characters_character_id_corporationhistory_ok.d.ts +1 -1
- package/v2/get_characters_character_id_fatigue_ok.d.ts +1 -1
- package/v2/get_characters_character_id_fittings_ok.d.ts +1 -1
- package/v2/get_characters_character_id_fleet_ok.d.ts +1 -1
- package/v2/get_characters_character_id_fw_stats_ok.d.ts +1 -1
- package/v2/get_characters_character_id_implants_ok.d.ts +1 -1
- package/v2/get_characters_character_id_industry_jobs_ok.d.ts +1 -1
- package/v2/get_characters_character_id_killmails_recent_ok.d.ts +1 -1
- package/v2/get_characters_character_id_location_ok.d.ts +1 -1
- package/v2/get_characters_character_id_loyalty_points_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mail_labels_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mail_lists_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mail_mail_id_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mail_ok.d.ts +1 -1
- package/v2/get_characters_character_id_medals_ok.d.ts +1 -1
- package/v2/get_characters_character_id_mining_ok.d.ts +1 -1
- package/v2/get_characters_character_id_notifications_contacts_ok.d.ts +1 -1
- package/v2/get_characters_character_id_notifications_ok.d.ts +1 -1
- package/v2/get_characters_character_id_ok.d.ts +1 -1
- package/v2/get_characters_character_id_online_ok.d.ts +1 -1
- package/v2/get_characters_character_id_opportunities_ok.d.ts +1 -1
- package/v2/get_characters_character_id_orders_history_ok.d.ts +1 -1
- package/v2/get_characters_character_id_orders_ok.d.ts +1 -1
- package/v2/get_characters_character_id_planets_ok.d.ts +1 -1
- package/v2/get_characters_character_id_planets_planet_id_ok.d.ts +1 -1
- package/v2/get_characters_character_id_portrait_ok.d.ts +1 -1
- package/v2/get_characters_character_id_roles_ok.d.ts +1 -1
- package/v2/get_characters_character_id_search_ok.d.ts +1 -1
- package/v2/get_characters_character_id_ship_ok.d.ts +1 -1
- package/v2/get_characters_character_id_skillqueue_ok.d.ts +1 -1
- package/v2/get_characters_character_id_skills_ok.d.ts +1 -1
- package/v2/get_characters_character_id_standings_ok.d.ts +1 -1
- package/v2/get_characters_character_id_titles_ok.d.ts +1 -1
- package/v2/get_characters_character_id_wallet_journal_ok.d.ts +1 -1
- package/v2/get_characters_character_id_wallet_ok.d.ts +1 -1
- package/v2/get_characters_character_id_wallet_transactions_ok.d.ts +1 -1
- package/v2/get_contracts_public_bids_contract_id_ok.d.ts +1 -1
- package/v2/get_contracts_public_items_contract_id_ok.d.ts +1 -1
- package/v2/get_contracts_public_region_id_ok.d.ts +1 -1
- package/v2/get_corporation_corporation_id_mining_extractions_ok.d.ts +1 -1
- package/v2/get_corporation_corporation_id_mining_observers_observer_id_ok.d.ts +1 -1
- package/v2/get_corporation_corporation_id_mining_observers_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_alliancehistory_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_assets_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_blueprints_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_bookmarks_folders_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_bookmarks_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contacts_labels_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contacts_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_containers_logs_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contracts_contract_id_bids_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contracts_contract_id_items_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_contracts_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_customs_offices_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_divisions_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_facilities_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_fw_stats_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_icons_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_industry_jobs_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_killmails_recent_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_medals_issued_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_medals_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_members_limit_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_members_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_members_titles_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_membertracking_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_orders_history_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_orders_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_roles_history_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_roles_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_shareholders_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_standings_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_starbases_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_starbases_starbase_id_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_structures_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_titles_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_wallets_division_journal_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_wallets_division_transactions_ok.d.ts +1 -1
- package/v2/get_corporations_corporation_id_wallets_ok.d.ts +1 -1
- package/v2/get_corporations_npccorps_ok.d.ts +1 -1
- package/v2/get_dogma_attributes_attribute_id_ok.d.ts +1 -1
- package/v2/get_dogma_attributes_ok.d.ts +1 -1
- package/v2/get_dogma_dynamic_items_type_id_item_id_ok.d.ts +1 -1
- package/v2/get_dogma_effects_effect_id_ok.d.ts +1 -1
- package/v2/get_dogma_effects_ok.d.ts +1 -1
- package/v2/get_fleets_fleet_id_members_ok.d.ts +1 -1
- package/v2/get_fleets_fleet_id_ok.d.ts +1 -1
- package/v2/get_fleets_fleet_id_wings_ok.d.ts +1 -1
- package/v2/get_fw_leaderboards_characters_ok.d.ts +1 -1
- package/v2/get_fw_leaderboards_corporations_ok.d.ts +1 -1
- package/v2/get_fw_leaderboards_ok.d.ts +1 -1
- package/v2/get_fw_stats_ok.d.ts +1 -1
- package/v2/get_fw_systems_ok.d.ts +1 -1
- package/v2/get_fw_wars_ok.d.ts +1 -1
- package/v2/get_incursions_ok.d.ts +1 -1
- package/v2/get_industry_facilities_ok.d.ts +1 -1
- package/v2/get_industry_systems_ok.d.ts +1 -1
- package/v2/get_insurance_prices_ok.d.ts +1 -1
- package/v2/get_killmails_killmail_id_killmail_hash_ok.d.ts +1 -1
- package/v2/get_loyalty_stores_corporation_id_offers_ok.d.ts +1 -1
- package/v2/get_markets_groups_market_group_id_ok.d.ts +1 -1
- package/v2/get_markets_groups_ok.d.ts +1 -1
- package/v2/get_markets_prices_ok.d.ts +1 -1
- package/v2/get_markets_region_id_history_ok.d.ts +1 -1
- package/v2/get_markets_region_id_orders_ok.d.ts +1 -1
- package/v2/get_markets_region_id_types_ok.d.ts +1 -1
- package/v2/get_markets_structures_structure_id_ok.d.ts +1 -1
- package/v2/get_opportunities_groups_group_id_ok.d.ts +1 -1
- package/v2/get_opportunities_groups_ok.d.ts +1 -1
- package/v2/get_opportunities_tasks_ok.d.ts +1 -1
- package/v2/get_opportunities_tasks_task_id_ok.d.ts +1 -1
- package/v2/get_route_origin_destination_ok.d.ts +1 -1
- package/v2/get_sovereignty_campaigns_ok.d.ts +1 -1
- package/v2/get_sovereignty_map_ok.d.ts +1 -1
- package/v2/get_sovereignty_structures_ok.d.ts +1 -1
- package/v2/get_status_ok.d.ts +1 -1
- package/v2/get_universe_ancestries_ok.d.ts +1 -1
- package/v2/get_universe_asteroid_belts_asteroid_belt_id_ok.d.ts +1 -1
- package/v2/get_universe_bloodlines_ok.d.ts +1 -1
- package/v2/get_universe_categories_category_id_ok.d.ts +1 -1
- package/v2/get_universe_categories_ok.d.ts +1 -1
- package/v2/get_universe_constellations_constellation_id_ok.d.ts +1 -1
- package/v2/get_universe_constellations_ok.d.ts +1 -1
- package/v2/get_universe_factions_ok.d.ts +1 -1
- package/v2/get_universe_graphics_graphic_id_ok.d.ts +1 -1
- package/v2/get_universe_graphics_ok.d.ts +1 -1
- package/v2/get_universe_groups_group_id_ok.d.ts +1 -1
- package/v2/get_universe_groups_ok.d.ts +1 -1
- package/v2/get_universe_moons_moon_id_ok.d.ts +1 -1
- package/v2/get_universe_planets_planet_id_ok.d.ts +1 -1
- package/v2/get_universe_races_ok.d.ts +1 -1
- package/v2/get_universe_regions_ok.d.ts +1 -1
- package/v2/get_universe_regions_region_id_ok.d.ts +1 -1
- package/v2/get_universe_schematics_schematic_id_ok.d.ts +1 -1
- package/v2/get_universe_stargates_stargate_id_ok.d.ts +1 -1
- package/v2/get_universe_stars_star_id_ok.d.ts +1 -1
- package/v2/get_universe_stations_station_id_ok.d.ts +1 -1
- package/v2/get_universe_structures_ok.d.ts +1 -1
- package/v2/get_universe_structures_structure_id_ok.d.ts +1 -1
- package/v2/get_universe_system_jumps_ok.d.ts +1 -1
- package/v2/get_universe_system_kills_ok.d.ts +1 -1
- package/v2/get_universe_systems_ok.d.ts +1 -1
- package/v2/get_universe_systems_system_id_ok.d.ts +1 -1
- package/v2/get_universe_types_ok.d.ts +1 -1
- package/v2/get_universe_types_type_id_ok.d.ts +1 -1
- package/v2/get_wars_ok.d.ts +1 -1
- package/v2/get_wars_war_id_killmails_ok.d.ts +1 -1
- package/v2/get_wars_war_id_ok.d.ts +1 -1
- package/v2/index.d.ts +166 -36
- package/v2/post_characters_affiliation_ok.d.ts +1 -1
- package/v2/post_characters_character_id_assets_locations_ok.d.ts +1 -1
- package/v2/post_characters_character_id_assets_names_ok.d.ts +1 -1
- package/v2/post_characters_character_id_contacts_created.d.ts +1 -1
- package/v2/post_characters_character_id_cspa_created.d.ts +1 -1
- package/v2/post_characters_character_id_fittings_created.d.ts +1 -1
- package/v2/post_characters_character_id_mail_created.d.ts +1 -1
- package/v2/post_characters_character_id_mail_labels_created.d.ts +1 -1
- package/v2/post_corporations_corporation_id_assets_locations_ok.d.ts +1 -1
- package/v2/post_corporations_corporation_id_assets_names_ok.d.ts +1 -1
- package/v2/post_fleets_fleet_id_wings_created.d.ts +1 -1
- package/v2/post_fleets_fleet_id_wings_wing_id_squads_created.d.ts +1 -1
- package/v2/post_universe_ids_ok.d.ts +1 -1
- package/v2/post_universe_names_ok.d.ts +1 -1
- package/v2.d.mts +1 -27
- package/v2.mjs +4 -88
- package/v2/post_fleets_fleet_id_members_invitation.d.ts +0 -27
- package/v2/post_ui_openwindow_newmail_new_mail.d.ts +0 -40
- package/v2/put_characters_character_id_calendar_event_id_response.d.ts +0 -15
- package/v2/put_characters_character_id_contacts_contact_ids.d.ts +0 -16
- package/v2/put_characters_character_id_mail_mail_id_contents.d.ts +0 -20
- package/v2/put_fleets_fleet_id_members_member_id_movement.d.ts +0 -27
- package/v2/put_fleets_fleet_id_new_settings.d.ts +0 -18
- package/v2/put_fleets_fleet_id_squads_squad_id_naming.d.ts +0 -14
- package/v2/put_fleets_fleet_id_wings_wing_id_naming.d.ts +0 -14
package/v2.d.mts
CHANGED
|
@@ -6,33 +6,7 @@
|
|
|
6
6
|
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
7
7
|
*/
|
|
8
8
|
import type { TESIResponseOKMap } from "./v2";
|
|
9
|
-
|
|
10
|
-
* __{Header}.{Payload}.{Signature}__
|
|
11
|
-
*/
|
|
12
|
-
type TAcccessToken = `${string}.${string}.${string}`;
|
|
13
|
-
type ESIRequestOptions = {
|
|
14
|
-
/**
|
|
15
|
-
* query params for ESI request.
|
|
16
|
-
*/
|
|
17
|
-
query?: Record<string, any>;
|
|
18
|
-
/**
|
|
19
|
-
* will need it for `POST` request etc.
|
|
20
|
-
*/
|
|
21
|
-
body?: any;
|
|
22
|
-
/**
|
|
23
|
-
* if want response data with ignore error then can be set to `true`.
|
|
24
|
-
*/
|
|
25
|
-
ignoreError?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* cancel request immediately
|
|
28
|
-
*/
|
|
29
|
-
cancelable?: AbortController;
|
|
30
|
-
/**
|
|
31
|
-
* Can be an empty object if no authentication is required.description
|
|
32
|
-
*/
|
|
33
|
-
token?: TAcccessToken;
|
|
34
|
-
auth?: true;
|
|
35
|
-
};
|
|
9
|
+
import { type ESIRequestOptions } from "./rq-util.mjs";
|
|
36
10
|
/**
|
|
37
11
|
* fire ESI request
|
|
38
12
|
* @template {TESIEntryMethod} M
|
package/v2.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// import type { TESIResponseOKMap } from "eve-esi-types";
|
|
2
|
+
import { curl, replaceCbt, fetchP, ESIRequesError, ESIErrorLimitReachedError } from "./rq-util.mjs";
|
|
2
3
|
// - - - - - - - - - - - - - - - - - - - -
|
|
3
4
|
// constants, types
|
|
4
5
|
// - - - - - - - - - - - - - - - - - - - -
|
|
@@ -9,10 +10,6 @@ const isArray = Array.isArray;
|
|
|
9
10
|
* enable/disable console.log
|
|
10
11
|
*/
|
|
11
12
|
let LOG = false;
|
|
12
|
-
/**
|
|
13
|
-
* this always `https://esi.evetech.net`
|
|
14
|
-
*/
|
|
15
|
-
const BASE = "https://esi.evetech.net";
|
|
16
13
|
/**
|
|
17
14
|
* @typedef {import("./v2").TESIResponseOKMap} TESIResponseOKMap
|
|
18
15
|
*/
|
|
@@ -22,7 +19,7 @@ const BASE = "https://esi.evetech.net";
|
|
|
22
19
|
* @prop {Record<string, any>} [query] query params for ESI request.
|
|
23
20
|
* @prop {any} [body] will need it for `POST` request etc.
|
|
24
21
|
* @prop {true=} [auth] Can be an empty object if no authentication is required.description
|
|
25
|
-
* @prop {
|
|
22
|
+
* @prop {TAcccessToken} [token] Can be an empty object if no authentication is required.description
|
|
26
23
|
* @prop {boolean} [ignoreError] if want response data with ignore error then can be set to `true`.
|
|
27
24
|
* @prop {AbortController} [cancelable] cancel request immediately
|
|
28
25
|
*/
|
|
@@ -33,88 +30,7 @@ const BASE = "https://esi.evetech.net";
|
|
|
33
30
|
* Get the number of currently executing ESI requests
|
|
34
31
|
*/
|
|
35
32
|
let ax = 0;
|
|
36
|
-
|
|
37
|
-
* simple named error class.
|
|
38
|
-
*/
|
|
39
|
-
class ESIRequesError extends Error {
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* throws when x-esi-error-limit-remain header value is "0". (http status: 420)
|
|
43
|
-
*/
|
|
44
|
-
class ESIErrorLimitReachedError extends Error {
|
|
45
|
-
constructor() {
|
|
46
|
-
super("Cannot continue ESI request because 'x-esi-error-limit-remain' is zero!");
|
|
47
|
-
}
|
|
48
|
-
valueOf() {
|
|
49
|
-
return 420;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* fetch the extra pages
|
|
54
|
-
*
|
|
55
|
-
* + if the `x-pages` header property ware more than 1
|
|
56
|
-
*
|
|
57
|
-
* @param {string} endpointUrl
|
|
58
|
-
* @param {RequestInit} rqopt request options
|
|
59
|
-
* @param {Record<string, any>} qs queries
|
|
60
|
-
* @param {number} pc pageCount
|
|
61
|
-
*/
|
|
62
|
-
const fetchP = async (endpointUrl, rqopt, qs, pc) => {
|
|
63
|
-
const rqs = [];
|
|
64
|
-
const rqp = new URLSearchParams(qs);
|
|
65
|
-
for (let i = 2; i <= pc;) {
|
|
66
|
-
rqp.set("page", (i++) + "");
|
|
67
|
-
ax++;
|
|
68
|
-
rqs.push(fetch(`${endpointUrl}?${rqp + ""}`, rqopt).then(res => res.json()).catch(reason => {
|
|
69
|
-
console.warn(reason);
|
|
70
|
-
return [];
|
|
71
|
-
}).finally(() => {
|
|
72
|
-
ax--;
|
|
73
|
-
}));
|
|
74
|
-
}
|
|
75
|
-
return Promise.all(rqs).then(jsons => {
|
|
76
|
-
// DEVNOTE: let check the page 2, type is array?
|
|
77
|
-
if (isArray(jsons[0])) {
|
|
78
|
-
let combined = [];
|
|
79
|
-
for (let i = 0, end = jsons.length; i < end;) {
|
|
80
|
-
combined = combined.concat(jsons[i++]);
|
|
81
|
-
}
|
|
82
|
-
return combined;
|
|
83
|
-
}
|
|
84
|
-
LOG && log("> > > pages result are object < < < --", jsons);
|
|
85
|
-
return null;
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
/** ### replace (C)urly (B)races (T)oken
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* "/characters/{character_id}/skills"
|
|
92
|
-
* // ->
|
|
93
|
-
* "/characters/<char.character_id>/skills"
|
|
94
|
-
*
|
|
95
|
-
* @param {string} endpoint e.g - "/characters/{character_id}/"
|
|
96
|
-
* @param {number[]} ids
|
|
97
|
-
* @returns fragment of qualified endpoint uri or null.
|
|
98
|
-
*/
|
|
99
|
-
const replaceCbt = (endpoint, ids) => {
|
|
100
|
-
const re = /{([\w]+)}/g;
|
|
101
|
-
/** @type {RegExpExecArray?} */
|
|
102
|
-
let m;
|
|
103
|
-
let idx = 0;
|
|
104
|
-
while (m = re.exec(endpoint)) {
|
|
105
|
-
endpoint = endpoint.replace(m[0], ids[idx++] + "");
|
|
106
|
-
}
|
|
107
|
-
return endpoint;
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
*
|
|
111
|
-
* @param {string} endp this means endpoint url fragment like `/characters/{character_id}/` or `/characters/{character_id}/agents_research/`
|
|
112
|
-
* + The version parameter can be omitted by using `<version>/<endpoint>`
|
|
113
|
-
*/
|
|
114
|
-
const curl = (endp) => {
|
|
115
|
-
endp = endp.replace(/^\/+|\/+$/g, "");
|
|
116
|
-
return `${BASE}/latest/${endp}/`;
|
|
117
|
-
};
|
|
33
|
+
const incrementAx = (minus) => minus ? ax-- : ax++;
|
|
118
34
|
// - - - - - - - - - - - - - - - - - - - -
|
|
119
35
|
// main functions
|
|
120
36
|
// - - - - - - - - - - - - - - - - - - - -
|
|
@@ -250,7 +166,7 @@ export async function fire(mthd, endp, pathParams, opt) {
|
|
|
250
166
|
// has remaining pages? NaN > 1 === false !isNaN(pageCount)
|
|
251
167
|
if (pc > 1) {
|
|
252
168
|
LOG && log('found "x-pages" header, pages: %d', pc);
|
|
253
|
-
const remData = await fetchP(endpointUrl, rqopt, qss, pc);
|
|
169
|
+
const remData = await fetchP(endpointUrl, rqopt, qss, pc, incrementAx);
|
|
254
170
|
// finally, decide product data.
|
|
255
171
|
if (isArray(data) && isArray(remData)) {
|
|
256
172
|
// DEVNOTE: 2019/7/23 15:01:48 - types
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ESI endpoint: /fleets/{fleet_id}/members/
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* If a character is invited with the `fleet_commander` role, neither `wing_id` or `squad_id` should be specified. If a character is invited with the `wing_commander` role, only `wing_id` should be specified. If a character is invited with the `squad_commander` role, both `wing_id` and `squad_id` should be specified. If a character is invited with the `squad_member` role, `wing_id` and `squad_id` should either both be specified or not specified at all. If they aren’t specified, the invited character will join any squad with available positions.
|
|
6
|
-
*/
|
|
7
|
-
type PostFleetsFleetIdMembersRole = "fleet_commander" | "wing_commander" | "squad_commander" | "squad_member";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* invitation object
|
|
11
|
-
*/
|
|
12
|
-
interface PostFleetsFleetIdMembersInvitation {
|
|
13
|
-
/**
|
|
14
|
-
* The character you want to invite
|
|
15
|
-
*/
|
|
16
|
-
character_id: number;
|
|
17
|
-
role: PostFleetsFleetIdMembersRole;
|
|
18
|
-
/**
|
|
19
|
-
* squad_id integer
|
|
20
|
-
*/
|
|
21
|
-
squad_id?: number;
|
|
22
|
-
/**
|
|
23
|
-
* wing_id integer
|
|
24
|
-
*/
|
|
25
|
-
wing_id?: number;
|
|
26
|
-
[k: string]: unknown | undefined;
|
|
27
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ESI endpoint: /ui/openwindow/newmail/
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* recipients array
|
|
6
|
-
*
|
|
7
|
-
* @minItems 1
|
|
8
|
-
* @maxItems 50
|
|
9
|
-
*/
|
|
10
|
-
type PostUiOpenwindowNewmailRecipients = [
|
|
11
|
-
/**
|
|
12
|
-
* recipient integer
|
|
13
|
-
*/
|
|
14
|
-
number,
|
|
15
|
-
...number[]
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* new_mail object
|
|
20
|
-
*/
|
|
21
|
-
interface PostUiOpenwindowNewmailNewMail {
|
|
22
|
-
/**
|
|
23
|
-
* body string
|
|
24
|
-
*/
|
|
25
|
-
body: string;
|
|
26
|
-
recipients: PostUiOpenwindowNewmailRecipients;
|
|
27
|
-
/**
|
|
28
|
-
* subject string
|
|
29
|
-
*/
|
|
30
|
-
subject: string;
|
|
31
|
-
/**
|
|
32
|
-
* to_corp_or_alliance_id integer
|
|
33
|
-
*/
|
|
34
|
-
to_corp_or_alliance_id?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Corporations, alliances and mailing lists are all types of mailing groups. You may only send to one mailing group, at a time, so you may fill out either this field or the to_corp_or_alliance_ids field
|
|
37
|
-
*/
|
|
38
|
-
to_mailing_list_id?: number;
|
|
39
|
-
[k: string]: unknown | undefined;
|
|
40
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ESI endpoint: /characters/{character_id}/calendar/{event_id}/
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* response string
|
|
6
|
-
*/
|
|
7
|
-
type PutCharactersCharacterIdCalendarEventIdResponseResponse = "accepted" | "declined" | "tentative";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* response object
|
|
11
|
-
*/
|
|
12
|
-
interface PutCharactersCharacterIdCalendarEventIdResponse {
|
|
13
|
-
response: PutCharactersCharacterIdCalendarEventIdResponseResponse;
|
|
14
|
-
[k: string]: unknown | undefined;
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ESI endpoint: /characters/{character_id}/contacts/
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* contact_ids array
|
|
6
|
-
*
|
|
7
|
-
* @minItems 1
|
|
8
|
-
* @maxItems 100
|
|
9
|
-
*/
|
|
10
|
-
type PutCharactersCharacterIdContactsContactIds = [
|
|
11
|
-
/**
|
|
12
|
-
* ID of the contact to edit
|
|
13
|
-
*/
|
|
14
|
-
number,
|
|
15
|
-
...number[]
|
|
16
|
-
];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ESI endpoint: /characters/{character_id}/mail/{mail_id}/
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* contents object
|
|
7
|
-
*/
|
|
8
|
-
interface PutCharactersCharacterIdMailMailIdContents {
|
|
9
|
-
/**
|
|
10
|
-
* Labels to assign to the mail. Pre-existing labels are unassigned.
|
|
11
|
-
*
|
|
12
|
-
* @maxItems 25
|
|
13
|
-
*/
|
|
14
|
-
labels?: number[];
|
|
15
|
-
/**
|
|
16
|
-
* Whether the mail is flagged as read
|
|
17
|
-
*/
|
|
18
|
-
read?: boolean;
|
|
19
|
-
[k: string]: unknown | undefined;
|
|
20
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ESI endpoint: /fleets/{fleet_id}/members/{member_id}/
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* If a character is moved to the `fleet_commander` role, neither `wing_id` or `squad_id` should be specified. If a character is moved to the `wing_commander` role, only `wing_id` should be specified. If a character is moved to the `squad_commander` role, both `wing_id` and `squad_id` should be specified. If a character is moved to the `squad_member` role, both `wing_id` and `squad_id` should be specified.
|
|
6
|
-
*/
|
|
7
|
-
type PutFleetsFleetIdMembersMemberIdRole =
|
|
8
|
-
| "fleet_commander"
|
|
9
|
-
| "wing_commander"
|
|
10
|
-
| "squad_commander"
|
|
11
|
-
| "squad_member";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* movement object
|
|
15
|
-
*/
|
|
16
|
-
interface PutFleetsFleetIdMembersMemberIdMovement {
|
|
17
|
-
role: PutFleetsFleetIdMembersMemberIdRole;
|
|
18
|
-
/**
|
|
19
|
-
* squad_id integer
|
|
20
|
-
*/
|
|
21
|
-
squad_id?: number;
|
|
22
|
-
/**
|
|
23
|
-
* wing_id integer
|
|
24
|
-
*/
|
|
25
|
-
wing_id?: number;
|
|
26
|
-
[k: string]: unknown | undefined;
|
|
27
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ESI endpoint: /fleets/{fleet_id}/
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* new_settings object
|
|
7
|
-
*/
|
|
8
|
-
interface PutFleetsFleetIdNewSettings {
|
|
9
|
-
/**
|
|
10
|
-
* Should free-move be enabled in the fleet
|
|
11
|
-
*/
|
|
12
|
-
is_free_move?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* New fleet MOTD in CCP flavoured HTML
|
|
15
|
-
*/
|
|
16
|
-
motd?: string;
|
|
17
|
-
[k: string]: unknown | undefined;
|
|
18
|
-
}
|