@orvello/sdk 0.7.8 → 0.7.9

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/dist/openapi.json CHANGED
@@ -26647,11 +26647,82 @@
26647
26647
  },
26648
26648
  "kleinunternehmerMaxAmount": {
26649
26649
  "type": "number"
26650
+ },
26651
+ "kleinunternehmerRule": {
26652
+ "type": "object",
26653
+ "properties": {
26654
+ "id": {
26655
+ "type": "string"
26656
+ },
26657
+ "validFrom": {
26658
+ "type": "string"
26659
+ },
26660
+ "validTo": {
26661
+ "anyOf": [
26662
+ {
26663
+ "type": "string"
26664
+ },
26665
+ {
26666
+ "type": "null"
26667
+ }
26668
+ ]
26669
+ },
26670
+ "currentYearBasis": {
26671
+ "type": "string",
26672
+ "enum": [
26673
+ "actual",
26674
+ "forecast"
26675
+ ]
26676
+ },
26677
+ "sources": {
26678
+ "type": "array",
26679
+ "items": {
26680
+ "type": "object",
26681
+ "properties": {
26682
+ "norm": {
26683
+ "type": "string"
26684
+ },
26685
+ "url": {
26686
+ "type": "string"
26687
+ },
26688
+ "retrievedAt": {
26689
+ "type": "string"
26690
+ },
26691
+ "covers": {
26692
+ "type": "string"
26693
+ }
26694
+ },
26695
+ "required": [
26696
+ "norm",
26697
+ "url",
26698
+ "retrievedAt",
26699
+ "covers"
26700
+ ],
26701
+ "additionalProperties": false
26702
+ }
26703
+ },
26704
+ "openPoints": {
26705
+ "type": "array",
26706
+ "items": {
26707
+ "type": "string"
26708
+ }
26709
+ }
26710
+ },
26711
+ "required": [
26712
+ "id",
26713
+ "validFrom",
26714
+ "validTo",
26715
+ "currentYearBasis",
26716
+ "sources",
26717
+ "openPoints"
26718
+ ],
26719
+ "additionalProperties": false
26650
26720
  }
26651
26721
  },
26652
26722
  "required": [
26653
26723
  "kleinunternehmerGraceAmount",
26654
- "kleinunternehmerMaxAmount"
26724
+ "kleinunternehmerMaxAmount",
26725
+ "kleinunternehmerRule"
26655
26726
  ],
26656
26727
  "additionalProperties": false
26657
26728
  },
@@ -32590,7 +32661,7 @@
32590
32661
  "payments"
32591
32662
  ],
32592
32663
  "summary": "Gebuehren-Steuerbehandlung der Provider-Verbindung setzen",
32593
- "description": "Legt fest wie Provider-Gebuehren steuerlich behandelt werden: EXEMPT (steuerfrei, §4 Nr. 8 UStG), INCLUSIVE_STANDARD (19% inklusive, deutsche Entity), REVERSE_CHARGE_13B (§13b, EU-Entity). Gilt pro Verbindung, nicht global.",
32664
+ "description": "Legt fest wie Provider-Gebuehren steuerlich behandelt werden: EXEMPT (steuerfrei, §4 Nr. 8 UStG), INCLUSIVE_STANDARD (19% inklusive, deutsche Entity), REVERSE_CHARGE_13B (§13b, EU-Entity). Gilt je Konto und Anbieter ab heute (Historie mit Gueltig-ab, TSK-000382); hat der Bereich noch keinen Eintrag, ab der aeltesten wartenden Gebuehr. Wartende Gebuehren werden gebucht. Fuer ein Datum in der Vergangenheit: POST /fee-treatments/preview und POST /fee-treatments.",
32594
32665
  "responses": {
32595
32666
  "200": {
32596
32667
  "description": "JSON response",
@@ -32701,6 +32772,434 @@
32701
32772
  ]
32702
32773
  }
32703
32774
  },
32775
+ "/bookkeeping/payments/fee-treatments": {
32776
+ "get": {
32777
+ "operationId": "payments_list_fee_treatments",
32778
+ "tags": [
32779
+ "bookkeeping",
32780
+ "payments"
32781
+ ],
32782
+ "summary": "Gebuehrenbehandlung je Konto und Anbieter: Historie, heute geltend, Empfehlungen",
32783
+ "description": "Je Zahlungskonto die Bereiche (eigener Anbieter; bei Bank/Kasse jeder Anbieter plus Kontogebuehren) mit geltenden und ersetzten Eintraegen, der heute geltenden Behandlung samt wirksamem Satz und Herkunft, wartenden Gebuehren. Dazu die Firmenvorgabe Kontogebuehren, die Plattformvorgabe, das Regime heute und die Anbieter-Empfehlungen mit Quelle und Stand.",
32784
+ "responses": {
32785
+ "200": {
32786
+ "description": "JSON response",
32787
+ "content": {
32788
+ "application/json": {
32789
+ "schema": {
32790
+ "type": "object",
32791
+ "properties": {
32792
+ "success": {
32793
+ "type": "boolean"
32794
+ },
32795
+ "message": {
32796
+ "anyOf": [
32797
+ {
32798
+ "type": "string"
32799
+ },
32800
+ {
32801
+ "type": "null"
32802
+ }
32803
+ ]
32804
+ },
32805
+ "code": {
32806
+ "anyOf": [
32807
+ {
32808
+ "type": "string"
32809
+ },
32810
+ {
32811
+ "type": "null"
32812
+ }
32813
+ ]
32814
+ },
32815
+ "data": {
32816
+ "anyOf": [
32817
+ {},
32818
+ {
32819
+ "type": "null"
32820
+ }
32821
+ ]
32822
+ }
32823
+ },
32824
+ "required": [
32825
+ "success",
32826
+ "data"
32827
+ ],
32828
+ "additionalProperties": false
32829
+ }
32830
+ }
32831
+ }
32832
+ }
32833
+ },
32834
+ "security": [
32835
+ {
32836
+ "frontendBearer": []
32837
+ }
32838
+ ],
32839
+ "x-transport": "http",
32840
+ "x-permissions": [
32841
+ "bookkeeping_access"
32842
+ ]
32843
+ },
32844
+ "post": {
32845
+ "operationId": "payments_apply_fee_treatment",
32846
+ "tags": [
32847
+ "bookkeeping",
32848
+ "payments"
32849
+ ],
32850
+ "summary": "Gebuehrenbehandlung mit Gueltig-ab eintragen und Belege neu bewerten",
32851
+ "description": "Traegt die Behandlung ab validFrom ein (gleicher Tag ersetzt den alten Eintrag) und bewertet die betroffenen Belege in offenen Perioden neu, jeden unter Audit. Festgeschriebene Perioden bleiben unberuehrt und kommen als correctionNeeded zurueck. 409, wenn sich seit der Vorschau etwas geaendert hat. Wiederholung ist ohne Wirkung (status already_applied).",
32852
+ "responses": {
32853
+ "200": {
32854
+ "description": "JSON response",
32855
+ "content": {
32856
+ "application/json": {
32857
+ "schema": {
32858
+ "type": "object",
32859
+ "properties": {
32860
+ "success": {
32861
+ "type": "boolean"
32862
+ },
32863
+ "message": {
32864
+ "anyOf": [
32865
+ {
32866
+ "type": "string"
32867
+ },
32868
+ {
32869
+ "type": "null"
32870
+ }
32871
+ ]
32872
+ },
32873
+ "code": {
32874
+ "anyOf": [
32875
+ {
32876
+ "type": "string"
32877
+ },
32878
+ {
32879
+ "type": "null"
32880
+ }
32881
+ ]
32882
+ },
32883
+ "data": {
32884
+ "anyOf": [
32885
+ {},
32886
+ {
32887
+ "type": "null"
32888
+ }
32889
+ ]
32890
+ }
32891
+ },
32892
+ "required": [
32893
+ "success",
32894
+ "data"
32895
+ ],
32896
+ "additionalProperties": false
32897
+ }
32898
+ }
32899
+ }
32900
+ }
32901
+ },
32902
+ "requestBody": {
32903
+ "required": true,
32904
+ "content": {
32905
+ "application/json": {
32906
+ "schema": {
32907
+ "type": "object",
32908
+ "properties": {
32909
+ "target": {
32910
+ "anyOf": [
32911
+ {
32912
+ "type": "object",
32913
+ "properties": {
32914
+ "kind": {
32915
+ "const": "provider"
32916
+ },
32917
+ "paymentAccountId": {
32918
+ "type": "integer",
32919
+ "exclusiveMinimum": 0
32920
+ },
32921
+ "provider": {
32922
+ "type": "string",
32923
+ "enum": [
32924
+ "sumup",
32925
+ "paypal",
32926
+ "stripe",
32927
+ "klarna"
32928
+ ]
32929
+ }
32930
+ },
32931
+ "required": [
32932
+ "kind",
32933
+ "paymentAccountId",
32934
+ "provider"
32935
+ ],
32936
+ "additionalProperties": false
32937
+ },
32938
+ {
32939
+ "type": "object",
32940
+ "properties": {
32941
+ "kind": {
32942
+ "const": "account_fee"
32943
+ },
32944
+ "paymentAccountId": {
32945
+ "anyOf": [
32946
+ {
32947
+ "type": "integer",
32948
+ "exclusiveMinimum": 0
32949
+ },
32950
+ {
32951
+ "type": "null"
32952
+ }
32953
+ ]
32954
+ }
32955
+ },
32956
+ "required": [
32957
+ "kind",
32958
+ "paymentAccountId"
32959
+ ],
32960
+ "additionalProperties": false
32961
+ }
32962
+ ]
32963
+ },
32964
+ "validFrom": {
32965
+ "type": "string",
32966
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
32967
+ },
32968
+ "feeVatTreatment": {
32969
+ "type": "string",
32970
+ "enum": [
32971
+ "EXEMPT",
32972
+ "INCLUSIVE_STANDARD",
32973
+ "REVERSE_CHARGE_13B"
32974
+ ]
32975
+ },
32976
+ "feeVatRate": {
32977
+ "anyOf": [
32978
+ {
32979
+ "type": "string",
32980
+ "pattern": "^\\d+(\\.\\d{1,4})?$"
32981
+ },
32982
+ {
32983
+ "type": "null"
32984
+ }
32985
+ ]
32986
+ },
32987
+ "note": {
32988
+ "anyOf": [
32989
+ {
32990
+ "type": "string",
32991
+ "maxLength": 1000
32992
+ },
32993
+ {
32994
+ "type": "null"
32995
+ }
32996
+ ]
32997
+ },
32998
+ "previewHash": {
32999
+ "type": "string",
33000
+ "minLength": 8,
33001
+ "maxLength": 128
33002
+ }
33003
+ },
33004
+ "required": [
33005
+ "target",
33006
+ "validFrom",
33007
+ "feeVatTreatment",
33008
+ "previewHash"
33009
+ ],
33010
+ "additionalProperties": false
33011
+ }
33012
+ }
33013
+ }
33014
+ },
33015
+ "security": [
33016
+ {
33017
+ "frontendBearer": []
33018
+ }
33019
+ ],
33020
+ "x-transport": "http",
33021
+ "x-permissions": [
33022
+ "bookkeeping_access"
33023
+ ]
33024
+ }
33025
+ },
33026
+ "/bookkeeping/payments/fee-treatments/preview": {
33027
+ "post": {
33028
+ "operationId": "payments_preview_fee_treatment",
33029
+ "tags": [
33030
+ "bookkeeping",
33031
+ "payments"
33032
+ ],
33033
+ "summary": "Gebuehrenbehandlung mit Gueltig-ab: Vorschau",
33034
+ "description": "Zeigt, was ein Eintrag ab validFrom bewirkt, ohne etwas zu schreiben: betroffene Gebuehrenbelege (vorher/nachher), Steuerwirkung je Monat und UStVA-Kennzahl (46/47/66/67, Zahllast), Belege in festgeschriebenen Perioden (werden nicht umgebucht), wartende Gebuehren. previewHash beim Anwenden mitsenden.",
33035
+ "responses": {
33036
+ "200": {
33037
+ "description": "JSON response",
33038
+ "content": {
33039
+ "application/json": {
33040
+ "schema": {
33041
+ "type": "object",
33042
+ "properties": {
33043
+ "success": {
33044
+ "type": "boolean"
33045
+ },
33046
+ "message": {
33047
+ "anyOf": [
33048
+ {
33049
+ "type": "string"
33050
+ },
33051
+ {
33052
+ "type": "null"
33053
+ }
33054
+ ]
33055
+ },
33056
+ "code": {
33057
+ "anyOf": [
33058
+ {
33059
+ "type": "string"
33060
+ },
33061
+ {
33062
+ "type": "null"
33063
+ }
33064
+ ]
33065
+ },
33066
+ "data": {
33067
+ "anyOf": [
33068
+ {},
33069
+ {
33070
+ "type": "null"
33071
+ }
33072
+ ]
33073
+ }
33074
+ },
33075
+ "required": [
33076
+ "success",
33077
+ "data"
33078
+ ],
33079
+ "additionalProperties": false
33080
+ }
33081
+ }
33082
+ }
33083
+ }
33084
+ },
33085
+ "requestBody": {
33086
+ "required": true,
33087
+ "content": {
33088
+ "application/json": {
33089
+ "schema": {
33090
+ "type": "object",
33091
+ "properties": {
33092
+ "target": {
33093
+ "anyOf": [
33094
+ {
33095
+ "type": "object",
33096
+ "properties": {
33097
+ "kind": {
33098
+ "const": "provider"
33099
+ },
33100
+ "paymentAccountId": {
33101
+ "type": "integer",
33102
+ "exclusiveMinimum": 0
33103
+ },
33104
+ "provider": {
33105
+ "type": "string",
33106
+ "enum": [
33107
+ "sumup",
33108
+ "paypal",
33109
+ "stripe",
33110
+ "klarna"
33111
+ ]
33112
+ }
33113
+ },
33114
+ "required": [
33115
+ "kind",
33116
+ "paymentAccountId",
33117
+ "provider"
33118
+ ],
33119
+ "additionalProperties": false
33120
+ },
33121
+ {
33122
+ "type": "object",
33123
+ "properties": {
33124
+ "kind": {
33125
+ "const": "account_fee"
33126
+ },
33127
+ "paymentAccountId": {
33128
+ "anyOf": [
33129
+ {
33130
+ "type": "integer",
33131
+ "exclusiveMinimum": 0
33132
+ },
33133
+ {
33134
+ "type": "null"
33135
+ }
33136
+ ]
33137
+ }
33138
+ },
33139
+ "required": [
33140
+ "kind",
33141
+ "paymentAccountId"
33142
+ ],
33143
+ "additionalProperties": false
33144
+ }
33145
+ ]
33146
+ },
33147
+ "validFrom": {
33148
+ "type": "string",
33149
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
33150
+ },
33151
+ "feeVatTreatment": {
33152
+ "type": "string",
33153
+ "enum": [
33154
+ "EXEMPT",
33155
+ "INCLUSIVE_STANDARD",
33156
+ "REVERSE_CHARGE_13B"
33157
+ ]
33158
+ },
33159
+ "feeVatRate": {
33160
+ "anyOf": [
33161
+ {
33162
+ "type": "string",
33163
+ "pattern": "^\\d+(\\.\\d{1,4})?$"
33164
+ },
33165
+ {
33166
+ "type": "null"
33167
+ }
33168
+ ]
33169
+ },
33170
+ "note": {
33171
+ "anyOf": [
33172
+ {
33173
+ "type": "string",
33174
+ "maxLength": 1000
33175
+ },
33176
+ {
33177
+ "type": "null"
33178
+ }
33179
+ ]
33180
+ }
33181
+ },
33182
+ "required": [
33183
+ "target",
33184
+ "validFrom",
33185
+ "feeVatTreatment"
33186
+ ],
33187
+ "additionalProperties": false
33188
+ }
33189
+ }
33190
+ }
33191
+ },
33192
+ "security": [
33193
+ {
33194
+ "frontendBearer": []
33195
+ }
33196
+ ],
33197
+ "x-transport": "http",
33198
+ "x-permissions": [
33199
+ "bookkeeping_access"
33200
+ ]
33201
+ }
33202
+ },
32704
33203
  "/bookkeeping/payments/fee-proposals": {
32705
33204
  "get": {
32706
33205
  "operationId": "payments_list_fee_proposals",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orvello/sdk",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "description": "Typed, zero-dependency SDK for integrating Node and Next.js applications with orvello - the accounting & invoicing platform. Sends the credential each route demands, and can prove a call would work without making it.",
5
5
  "keywords": [
6
6
  "orvello",
@@ -68,8 +68,9 @@
68
68
  "build:route-index": "node scripts/build-route-index.mjs",
69
69
  "build:route-index:check": "node scripts/build-route-index.mjs --check",
70
70
  "dev": "tsup --watch",
71
- "typecheck": "tsc --noEmit",
71
+ "typecheck": "tsc -p tsconfig.test.json",
72
72
  "test": "vitest run",
73
+ "test:portable": "vitest run",
73
74
  "coverage": "vitest run --coverage",
74
75
  "check": "npm run build:route-index:check && npm run typecheck && npm run test && npm run build && npm run pack:check",
75
76
  "sync:contract": "node scripts/sync-contract.mjs",