0.1.1 • Published 1 year ago

@simrail-sdk/core-setup-pl v0.1.1

Weekly downloads
-
License
See LICENSE.md
Repository
github
Last release
1 year ago

SimRail Core SDK Setup - Poland

This is the Core SDK Setup for the Polish map in SimRail.

This module is meant to be used with the Core SDK (@simrail-sdk/core).

You only need to install this if you:

  • Use TypeScript and want strict typing for:
    • Line numbers.
    • Server codes.
    • Station codes.
    • Train numbers.
  • Use JavaScript and want to obtain:
    • Server codes.
    • Station codes.

If you are looking for the SDK Setup for Poland, check out wait for the module @simrail-sdk/sdk-setup-pl.

Content index

Usage details

Installation

Using NPM:

$ npm i @simrail-sdk/core-setup-pl

or

$ npm i github:simrail-sdk/core-setup-pl#VERSION

Where VERSION specifies the version to install.

Examples

Usage with the Core SDK

import { Sdk } from "@simrail-sdk/core";
import { Server, Station, Types } from "@simrail-sdk/core-setup-pl";

// Inject `Types` into the `Sdk` instance to enable strict type checking.
const sdk = new Sdk<Types>(...);

const en1 = sdk.server(Server.Code.EN1);
const en2 = sdk.server("en2");

const będzin     = sdk.station("en1", Station.Code.B);
const düsseldorf = sdk.station("en1", "Dü"); // <-- Fails because Düsseldorf doesn't exist.
const katowice   = sdk.station("en1", "KO");

const train4144 = sdk.train("en1", "4144");
const train4145 = sdk.train("en1", "4145"); // <-- Fails because 4145 doesn't exist.

// Obtaining a list of server/station codes:
const serverCodes  = Object.values(Server.Code);
const stationCodes = Object.values(Station.Code);

API reference

NOTE: The API reference section doesn't account for namespaces, this unfortunately means the documentation below is not entirely complete. Please investigate the TypeScript definition files for the full API.

api-reference-@simrail-sdk/core-setup-pl: @simrail-sdk/core-setup-pl "View module \"@simrail-sdk/core-setup-pl\"" api-reference-index: index "View module \"index\"" api-reference-index.d.ts: index.d.ts "View module \"index.d.ts\"" api-reference-index.ts: index.ts "View module \"index.ts\""

enum Code   

Specifies the code of a dispatch station.

Since: 0.1.0

Definition:  index.ts:56

member Code.B   

Będzin

Type:  "B"

Since: 0.1.0

Definition:  index.ts:58

member Code.BR   

Biała Rawska

Type:  "BR"

Since: 0.1.0

Definition:  index.ts:60

member Code.Bo   

Bukowno

Type:  "Bo"

Since: 0.1.0

Definition:  index.ts:62

member Code.DG   

Dąbrowa Górnicza

Type:  "DG"

Since: 0.1.0

Definition:  index.ts:64

member Code.DGHK   

Dąbrowa Górnicza Huta Katowice

Type:  "DGHK"

Since: 0.1.0

Definition:  index.ts:66

member Code.DW   

Dąbrowa Górnicza Wschodnia

Type:  "DW"

Since: 0.1.0

Definition:  index.ts:68

member Code.DZ   

Dąbrowa Górnicza Ząbkowice

Type:  "DZ"

Since: 0.1.0

Definition:  index.ts:70

member Code.Dra   

Dorota

Type:  "Dra"

Since: 0.1.0

Definition:  index.ts:72

member Code.GW   

Góra Włodowska

Type:  "GW"

Since: 0.1.0

Definition:  index.ts:74

member Code.Gr   

Grodzisk Mazowiecki

Type:  "Gr"

Since: 0.1.0

Definition:  index.ts:76

member Code.Id   

Idzikowice

Type:  "Id"

Since: 0.1.0

Definition:  index.ts:78

member Code.Ju   

Juliusz

Type:  "Ju"

Since: 0.1.0

Definition:  index.ts:80

member Code.KO   

Katowice

Type:  "KO"

Since: 0.1.0

Definition:  index.ts:82

member Code.KZ   

Katowice Zawodzie

Type:  "KZ"

Since: 0.1.0

Definition:  index.ts:84

member Code.Kn   

Knapówka

Type:  "Kn"

Since: 0.1.0

Definition:  index.ts:86

member Code.Kr   

Korytów

Type:  "Kr"

Since: 0.1.0

Definition:  index.ts:88

member Code.Kz   

Kozłów

Type:  "Kz"

Since: 0.1.0

Definition:  index.ts:90

member Code.LA   

Łazy Ła

Type:  "LA"

Since: 0.1.0

Definition:  index.ts:92

member Code.LB   

Łazy

Type:  "LB"

Since: 0.1.0

Definition:  index.ts:94

member Code.LC   

Łazy Łc

Type:  "LC"

Since: 0.1.0

Definition:  index.ts:96

member Code.Ol   

Olszamowice

Type:  "Ol"

Since: 0.1.0

Definition:  index.ts:98

member Code.Op   

Opoczno Południe

Type:  "Op"

Since: 0.1.0

Definition:  index.ts:100

member Code.Pi   

Pilichowice

Type:  "Pi"

Since: 0.1.0

Definition:  index.ts:102

member Code.Pr   

Pruszków

Type:  "Pr"

Since: 0.1.0

Definition:  index.ts:104

member Code.Ps   

Psary

Type:  "Ps"

Since: 0.1.0

Definition:  index.ts:106

member Code.SG   

Sosnowiec Główny

Type:  "SG"

Since: 0.1.0

Definition:  index.ts:108

member Code.SKz   

Sosnowiec Kazimierz

Type:  "SKz"

Since: 0.1.0

Definition:  index.ts:110

member Code.Se   

Szeligi

Type:  "Se"

Since: 0.1.0

Definition:  index.ts:112

member Code.Sl   

Sławków

Type:  "Sl"

Since: 0.1.0

Definition:  index.ts:114

member Code.Spl1   

Sosnowiec Południowy

Type:  "Spl1"

Since: 0.1.0

Definition:  index.ts:116

member Code.St   

Strzałki

Type:  "St"

Since: 0.1.0

Definition:  index.ts:118

member Code.Tl   

Tunel

Type:  "Tl"

Since: 0.1.0

Definition:  index.ts:120

member Code.WP   

Włoszczowa Północ

Type:  "WP"

Since: 0.1.0

Definition:  index.ts:122

member Code.Zw   

Zawiercie

Type:  "Zw"

Since: 0.1.0

Definition:  index.ts:124

enum Number   

Specifies a line number.

Since: 0.1.0

Definition:  index.ts:131

member Number.L1   

Type:  1

Since: 0.1.0

Definition:  index.ts:132

member Number.L12   

Type:  12

Since: 0.1.0

Definition:  index.ts:139

member Number.L130   

Type:  130

Since: 0.1.0

Definition:  index.ts:154

member Number.L131   

Type:  131

Since: 0.1.0

Definition:  index.ts:155

member Number.L132   

Type:  132

Since: 0.1.0

Definition:  index.ts:156

member Number.L133   

Type:  133

Since: 0.1.0

Definition:  index.ts:157

member Number.L134   

Type:  134

Since: 0.1.0

Definition:  index.ts:158

member Number.L137   

Type:  137

Since: 0.1.0

Definition:  index.ts:159

member Number.L138   

Type:  138

Since: 0.1.0

Definition:  index.ts:160

member Number.L139   

Type:  139

Since: 0.1.0

Definition:  index.ts:161

member Number.L140   

Type:  140

Since: 0.1.0

Definition:  index.ts:162

member Number.L141   

Type:  141

Since: 0.1.0

Definition:  index.ts:163

member Number.L142   

Type:  142

Since: 0.1.0

Definition:  index.ts:164

member Number.L143   

Type:  143

Since: 0.1.0

Definition:  index.ts:165

member Number.L144   

Type:  144

Since: 0.1.0

Definition:  index.ts:166

member Number.L149   

Type:  149

Since: 0.1.0

Definition:  index.ts:167

member Number.L15   

Type:  15

Since: 0.1.0

Definition:  index.ts:140

member Number.L151   

Type:  151

Since: 0.1.0

Definition:  index.ts:168

member Number.L154   

Type:  154

Since: 0.1.0

Definition:  index.ts:169

member Number.L155   

Type:  155

Since: 0.1.0

Definition:  index.ts:170

member Number.L158   

Type:  158

Since: 0.1.0

Definition:  index.ts:171

member Number.L16   

Type:  16

Since: 0.1.0

Definition:  index.ts:141

member Number.L160   

Type:  160

Since: 0.1.0

Definition:  index.ts:172

member Number.L162   

Type:  162

Since: 0.1.0

Definition:  index.ts:173

member Number.L163   

Type:  163

Since: 0.1.0

Definition:  index.ts:174

member Number.L164   

Type:  164

Since: 0.1.0

Definition:  index.ts:175

member Number.L17   

Type:  17

Since: 0.1.0

Definition:  index.ts:142

member Number.L171   

Type:  171

Since: 0.1.0

Definition:  index.ts:176

member Number.L179   

Type:  179

Since: 0.1.0

Definition:  index.ts:177

member Number.L18   

Type:  18

Since: 0.1.0

Definition:  index.ts:143

member Number.L186   

Type:  186

Since: 0.1.0

Definition:  index.ts:178

member Number.L19   

Type:  19

Since: 0.1.0

Definition:  index.ts:144

member Number.L2   

Type:  2

Since: 0.1.0

Definition:  index.ts:133

member Number.L20   

Type:  20

Since: 0.1.0

Definition:  index.ts:145

member Number.L22   

Type:  22

Since: 0.1.0

Definition:  index.ts:146

member Number.L25   

Type:  25

Since: 0.1.0

Definition:  index.ts:147

member Number.L272   

Type:  272

Since: 0.1.0

Definition:  index.ts:179

member Number.L276   

Type:  276

Since: 0.1.0

Definition:  index.ts:180

member Number.L280   

Type:  280

Since: 0.1.0

Definition:  index.ts:181

member Number.L3   

Type:  3

Since: 0.1.0

Definition:  index.ts:134

member Number.L301   

Type:  301

Since: 0.1.0

Definition:  index.ts:182

member Number.L4   

Type:  4

Since: 0.1.0

Definition:  index.ts:135

member Number.L447   

Type:  447

Since: 0.1.0

Definition:  index.ts:183

member Number.L45   

Type:  45

Since: 0.1.0

Definition:  index.ts:148

member Number.L479   

Type:  479

Since: 0.1.0

Definition:  index.ts:184

member Number.L501   

Type:  501

Since: 0.1.0

Definition:  index.ts:185

member Number.L509   

Type:  509

Since: 0.1.0

Definition:  index.ts:186

member Number.L529   

Type:  529

Since: 0.1.0

Definition:  index.ts:187

member Number.L540   

Type:  540

Since: 0.1.0

Definition:  index.ts:188

member Number.L546   

Type:  546

Since: 0.1.0

Definition:  index.ts:189

member Number.L570   

Type:  570

Since: 0.1.0

Definition:  index.ts:190

member Number.L571   

Type:  571

Since: 0.1.0

Definition:  index.ts:191

member Number.L572   

Type:  572

Since: 0.1.0

Definition:  index.ts:192

member Number.L573   

Type:  573

Since: 0.1.0

Definition:  index.ts:193

member Number.L574   

Type:  574

Since: 0.1.0

Definition:  index.ts:194

member Number.L6   

Type:  6

Since: 0.1.0

Definition:  index.ts:136

member Number.L607   

Type:  607

Since: 0.1.0

Definition:  index.ts:195

member Number.L61   

Type:  61

Since: 0.1.0

Definition:  index.ts:149

member Number.L62   

Type:  62

Since: 0.1.0

Definition:  index.ts:150

member Number.L64   

Type:  64

Since: 0.1.0

Definition:  index.ts:151

member Number.L651   

Type:  651

Since: 0.1.0

Definition:  index.ts:196

member Number.L652   

Type:  652

Since: 0.1.0

Definition:  index.ts:197

member Number.L657   

Type:  657

Since: 0.1.0

Definition:  index.ts:198

member Number.L660   

Type:  660

Since: 0.1.0

Definition:  index.ts:199

member Number.L661   

Type:  661

Since: 0.1.0

Definition:  index.ts:200

member Number.L663   

Type:  663

Since: 0.1.0

Definition:  index.ts:201

member Number.L668   

Type:  668

Since: 0.1.0

Definition:  index.ts:202

member Number.L687   

Type:  687

Since: 0.1.0

Definition:  index.ts:203

member Number.L696   

Type:  696

Since: 0.1.0

Definition:  index.ts:204

member Number.L703   

Type:  703

Since: 0.1.0

Definition:  index.ts:205

member Number.L713   

Type:  713

Since: 0.1.0

Definition:  index.ts:206

member Number.L717   

Type:  717

Since: 0.1.0

Definition:  index.ts:207

member Number.L73   

Type:  73

Since: 0.1.0

Definition:  index.ts:152

member Number.L8   

Type:  8

Since: 0.1.0

Definition:  index.ts:137

member Number.L836   

Type:  836

Since: 0.1.0

Definition:  index.ts:208

member Number.L839   

Type:  839

Since: 0.1.0

Definition:  index.ts:209

member Number.L898   

Type:  898

Since: 0.1.0

Definition:  index.ts:210

member Number.L9   

Type:  9

Since: 0.1.0

Definition:  index.ts:138

member Number.L95   

Type:  95

Since: 0.1.0

Definition:  index.ts:153

interface Types   

Specifies a type definition for a Setup.

Since: 0.1.0

Definition:  index.ts:355

property Types.lineNumbers   

Type:  Number

Since: 0.1.0

Definition:  index.ts:356

property Types.serverCodes   

Type:  Code | "cn1" | "cz1" | "de1" | "de3" | "de4" | "en1" | "en2" | "en3" | "es1" | "eu3" | "fr1" | "pl2" | "pl3" | "pl4" | "pl8" | "ua1"

Since: 0.1.0

Definition:  index.ts:357

property Types.stationCodes   

Type:  Code | "B" | "BR" | "Bo" | "DG" | "DGHK" | "DW" | "DZ" | "Dra" | "GW" | "Gr" | "Id" | "Ju" | "KO" | "KZ" | "Kn" | "Kr" | "Kz" | "LA" | "LB" | "LC" | "Ol" | "Op" | "Pi" | "Pr" | "Ps" | "SG" | "SKz" | "Se" | "Sl" | "Spl1" | "St" | "Tl" | "WP" | "Zw"

Since: 0.1.0

Definition:  index.ts:358

property Types.trainNumbers   

Type:  Number

Since: 0.1.0

Definition:  index.ts:359

type Number   

Specifies a train number.

Type:  "1309" | "1311" | "1313" | "1315" | "1317" | "1319" | "1321" | "1323" | "1325" | "1327" | "1329" | "1331" | "1333" | "1335" | "1337" | "1339" | "1341" | "1343" | "1345" | "1409" | "1411" | "1413" | "1415" | "1417" | "1419" | "1421" | "1423" | "1425" | "1427" | "1429" | "1431" | "1433" | "1435" | "1437" | "1439" | "1441" | "1443" | "1445" | "1609" | "1611" | "1613" | "1615" | "1617" | "1619" | "1621" | "1623" | "1625" | "1627" | "1629" | "1631" | "1633" | "1635" | "1637" | "1639" | "1641" | "1643" | "1645" | "1909" | "1911" | "1913" | "1915" | "1917" | "1919" | "1921" | "1923" | "1925" | "1927" | "1929" | "1931" | "1933" | "1935" | "1937" | "1939" | "1941" | "1943" | "1945" | "1947" | "3106" | "3108" | "3110" | "3112" | "3114" | "3116" | "3118" | "3120" | "3122" | "3124" | "3126" | "3128" | "3130" | "3132" | "3134" | "3136" | "3138" | "3140" | "3142" | "3144" | "3146" | "4108" | "4110" | "4112" | "4114" | "4116" | "4118" | "4120" | "4122" | "4124" | "4126" | "4128" | "4130" | "4132" | "4134" | "4136" | "4138" | "4140" | "4142" | "4144" | "6102" | "6104" | "6106" | "6108" | "6110" | "6112" | "6114" | "6116" | "6118" | "6120" | "6122" | "6124" | "6126" | "6128" | "6130" | "6132" | "6134" | "6136" | "6138" | "6140" | "6142" | "6144" | "9106" | "9108" | "9110" | "9112" | "9114" | "9116" | "9118" | "9120" | "9122" | "9124" | "9126" | "9128" | "9130" | "9132" | "9134" | "9136" | "9138" | "9140" | "9142" | "9144" | "9146" | "13109" | "13111" | "13113" | "13115" | "13117" | "13119" | "13121" | "13123" | "13125" | "13127" | "13129" | "13131" | "13133" | "13135" | "13137" | "13139" | "13141" | "13143" | "13145" | "13251" | "13253" | "13255" | "13257" | "14109" | "14111" | "14113" | "14115" | "14117" | "14119" | "14121" | "14123" | "14125" | "14127" | "14129" | "14131" | "14133" | "14135" | "14137" | "14139" | "14141" | "14143" | "14145" | "14147" | "16109" | "16111" | "16113" | "16115" | "16117" | "16119" | "16121" | "16123" | "16125" | "16127" | "16129" | "16131" | "16133" | "16135" | "16137" | "16139" | "16141" | "16143" | "16145" | "16147" | "19301" | "19317" | "19319" | "19321" | "19323" | "19325" | "19327" | "19329" | "19331" | "19333" | "19335" | "19337" | "19339" | "19341" | "19343" | "19345" | "19347" | "19349" | "19351" | "19353" | "19355" | "19357" | "19359" | "19361" | "19363" | "19365" | "19367" | "19369" | "19371" | "19373" | "19375" | "19377" | "19379" | "19381" | "19383" | "19385" | "19387" | "19389" | "19391" | "19393" | "19395" | "19903" | "19917" | "19919" | "19921" | "19923" | "19925" | "19927" | "19929" | "19931" | "19933" | "19935" | "19937" | "19939" | "19941" | "19943" | "19945" | "19947" | "19949" | "19951" | "19953" | "19955" | "19957" | "19959" | "19961" | "19963" | "19965" | "19967" | "19969" | "19971" | "19973" | "19975" | "19977" | "19979" | "19981" | "19983" | "19985" | "19987" | "19989" | "19991" | "19993" | "19995" | "19997" | "24107" | "24109" | "24111" | "24113" | "24115" | "24117" | "24119" | "24121" | "24123" | "24125" | "24127" | "24129" | "24131" | "24133" | "24135" | "24137" | "24139" | "24141" | "24143" | "24145" | "24147" | "24157" | "24159" | "24161" | "24163" | "24165" | "24167" | "24169" | "24171" | "24173" | "24175" | "24177" | "24179" | "24181" | "24183" | "24185" | "24187" | "24189" | "24191" | "24193" | "24927" | "24929" | "24931" | "24933" | "24935" | "24937" | "24939" | "24941" | "24943" | "24945" | "24947" | "24949" | "24951" | "24953" | "24955" | "24957" | "24959" | "24961" | "24963" | "24965" | "31108" | "31110" | "31112" | "31114" | "31116" | "31118" | "31120" | "31122" | "31124" | "31126" | "31128" | "31130" | "31132" | "31134" | "31136" | "31138" | "31140" | "31142" | "31144" | "31250" | "31252" | "31254" | "31256" | "37106" | "37108" | "37110" | "37112" | "37114" | "37116" | "37118" | "37120" | "37122" | "37124" | "37126" | "37128" | "37130" | "37132" | "37134" | "37136" | "37138" | "37140" | "37142" | "37144" | "37146" | "40101" | "40107" | "40109" | "40111" | "40113" | "40115" | "40117" | "40119" | "40121" | "40123" | "40125" | "40127" | "40129" | "40131" | "40133" | "40135" | "40137" | "40139" | "40141" | "40143" | "40145" | "40147" | "40156" | "40158" | "40160" | "40162" | "40164" | "40166" | "40168" | "40170" | "40172" | "40174" | "40176" | "40178" | "40180" | "40182" | "40184" | "40186" | "40188" | "40190" | "40192" | "40194" | "40196" | "40601" | "40609" | "40611" | "40613" | "40615" | "40617" | "40619" | "40621" | "40623" | "40625" | "40627" | "40629" | "40631" | "40633" | "40635" | "40637" | "40639" | "40641" | "40643" | "40645" | "40647" | "40658" | "40660" | "40662" | "40664" | "40666" | "40668" | "40670" | "40672" | "40674" | "40676" | "40678" | "40680" | "40682" | "40684" | "40686" | "40688" | "40690" | "40692" | "40694" | "40696" | "41104" | "41106" | "41108" | "41110" | "41112" | "41114" | "41116" | "41118" | "41120" | "41122" | "41124" | "41126" | "41128" | "41130" | "41132" | "41134" | "41136" | "41138" | "41140" | "41142" | "42108" | "42110" | "42112" | "42114" | "42116" | "42118" | "42120" | "42122" | "42124" | "42126" | "42128" | "42130" | "42132" | "42134" | "42136" | "42138" | "42140" | "42142" | "42144" | "42158" | "42160" | "42162" | "42164" | "42166" | "42168" | "42170" | "42172" | "42174" | "42176" | "42178" | "42180" | "42182" | "42184" | "42186" | "42188" | "42190" | "42192" | "42194" | "42928" | "42930" | "42932" | "42934" | "42936" | "42938" | "42940" | "42942" | "42944" | "42946" | "42948" | "42950" | "42952" | "42954" | "42956" | "42958" | "42960" | "42962" | "42964" | "43328" | "43330" | "43332" | "43334" | "43336" | "43338" | "43340" | "43342" | "43344" | "43346" | "43348" | "43350" | "43352" | "43354" | "43356" | "43358" | "43360" | "43362" | "43364" | "43366" | "44321" | "44329" | "44331" | "44333" | "44335" | "44337" | "44339" | "44341" | "44343" | "44345" | "44347" | "44349" | "44351" | "44353" | "44355" | "44357" | "44359" | "44361" | "44363" | "44365" | "44367" | "45270" | "45272" | "45274" | "45276" | "54273" | "54275" | "54277" | "54279" | "61102" | "61104" | "61106" | "61108" | "61110" | "61112" | "61114" | "61116" | "61118" | "61120" | "61122" | "61124" | "61126" | "61128" | "61130" | "61132" | "61134" | "61136" | "61138" | "61140" | "61142" | "61144" | "73101" | "73103" | "73105" | "73107" | "73109" | "73111" | "73113" | "73115" | "73117" | "73119" | "73121" | "73123" | "73125" | "73127" | "73129" | "73131" | "73133" | "73135" | `"73137"

0.1.1

1 year ago

0.1.0

1 year ago