File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,20 @@ export default class XentralApiClient {
17
17
this . userAgent = options . userAgent ;
18
18
}
19
19
20
+ //#region Basics
21
+ /**
22
+ * Get the bookkeeping system version. Sevdesk 2.0 introduces some breaking API changes so you'll
23
+ * have to use this and change the API payloads accordingly, depending on the version of the target instance.
24
+ * @see https://tech.sevdesk.com/api_news/posts/2024_04_04-system-update-breaking-changes/
25
+ * @returns The bookkeeping system version
26
+ */
27
+ getBookkeepingSystemVersion ( ) : Promise < { version : '1.0' | '2.0' } > {
28
+ return this . apiRequest ( '/Tools/bookkeepingSystemVersion' )
29
+ . then ( ( res ) => res . json ( ) )
30
+ . then ( ( { objects } ) => objects ) ;
31
+ }
32
+ //#endregion
33
+
20
34
/**
21
35
*
22
36
* @param route Route with leading slash (eg. /version)
You can’t perform that action at this time.
0 commit comments