Skip to content

Commit

Permalink
refactor: simplify types and descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
pawel-id committed Jan 6, 2024
1 parent f12aab4 commit 6a37e76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
5 changes: 2 additions & 3 deletions src/bir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ export default class Bir {
}

/**
* Parse provided `result` xml string into native object. Skip some top level
* unnecessary properties and check for errors. Return javascript object
* reflecting provided xml.
* Parse provided `result` xml string into native javascript object. Check for
* errors and throws when neede. Return plain object reflecting provided xml.
* @param result xml string
* @returns parsed object
*/
Expand Down
15 changes: 4 additions & 11 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export const KomunikatKodErrorCodes = {
'7': 'Brak sesji. Sesja wygasła lub przekazano nieprawidłową wartość nagłówka sid.',
}

export type DanePobierzPelnyRaportBir1Options =
/**
* Reports for method `DanePobierzPelnyRaport`.
*/
export type DanePobierzPelnyRaportOptions =
| 'PublDaneRaportFizycznaOsoba'
| 'PublDaneRaportDzialalnoscFizycznejCeidg'
| 'PublDaneRaportDzialalnoscFizycznejRolnicza'
Expand All @@ -39,8 +42,6 @@ export type DanePobierzPelnyRaportBir1Options =
| 'PublDaneRaportDzialalnosciLokalnejPrawnej'
| 'PublDaneRaportWspolnicyPrawnej'
| 'PublDaneRaportTypJednostki'

export type DanePobierzPelnyRaportBir11Options =
| 'BIR11OsFizycznaDaneOgolne'
| 'BIR11OsFizycznaDzialalnoscCeidg'
| 'BIR11OsFizycznaDzialalnoscRolnicza'
Expand All @@ -58,14 +59,6 @@ export type DanePobierzPelnyRaportBir11Options =
| 'BIR11OsPrawnaSpCywilnaWspolnicy'
| 'BIR11TypPodmiotu'

/**
* Reports for method `DanePobierzPelnyRaport`.
*
*/
export type DanePobierzPelnyRaportOptions =
| DanePobierzPelnyRaportBir1Options
| DanePobierzPelnyRaportBir11Options

/**
* Reports for method `DanePobierzRaportZbiorczy`.
*/
Expand Down

0 comments on commit 6a37e76

Please sign in to comment.