@firmenakte/api-client 2.9.0 → 2.11.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/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  export type ClientConfig = {
2
2
  apiKey: string;
3
3
  baseUrl?: string;
4
+ timeoutMs?: number;
4
5
  };
5
- /**
6
- * SOTA Factory: Creates a fresh, isolated instance of the API client.
7
- */
8
- export declare const createApiClient: ({ apiKey, baseUrl }: ClientConfig) => {
6
+ export declare const DEFAULT_BACKEND_TIMEOUT_MS = 10000;
7
+ export declare const createApiClient: ({ apiKey, baseUrl, timeoutMs, }: ClientConfig) => {
9
8
  v1QueriesList: (params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").QueryResponse[], import("./client").ApiError | import("./client").ProblemDetails>>;
10
9
  v1QueriesCreate: (data: import("./client").SaveQueryRequest, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").QueryResponse, import("./client").ApiError | import("./client").ProblemDetails>>;
11
10
  v1QueriesDetail: (id: string, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").QueryResponse, import("./client").ApiError | import("./client").ProblemDetails>>;
@@ -94,6 +93,14 @@ export declare const createApiClient: ({ apiKey, baseUrl }: ClientConfig) => {
94
93
  maxResultsPerType?: number;
95
94
  }, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").AggregatedChangesResponse, import("./client").ApiError | import("./client").ProblemDetails>>;
96
95
  v1GlobalchangesDetail: (id: number, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").ChangeDetailResponse, import("./client").ApiError | import("./client").ProblemDetails>>;
96
+ v1FoerderungenChangesDetail: (id: number, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").FoerderungChange, import("./client").ApiError | import("./client").ProblemDetails>>;
97
+ v1FoerderungenChangesList: (query?: {
98
+ fnr?: string;
99
+ since?: string;
100
+ sinceId?: number;
101
+ page?: number;
102
+ pageSize?: number;
103
+ }, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").PagedResponseOfFoerderungChange, import("./client").ApiError | import("./client").ProblemDetails>>;
97
104
  v1EdikteChangesDetail: (id: number, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").EdiktChange, import("./client").ApiError | import("./client").ProblemDetails>>;
98
105
  v1EdikteChangesList: (query?: {
99
106
  fnr?: string;
@@ -126,6 +133,7 @@ export declare const createApiClient: ({ apiKey, baseUrl }: ClientConfig) => {
126
133
  legalFormCode?: string[];
127
134
  zipCode?: string[];
128
135
  state?: string[];
136
+ gemeinde?: string[];
129
137
  hasEdikt?: boolean;
130
138
  active?: boolean;
131
139
  isScheinunternehmen?: boolean;
@@ -254,6 +262,7 @@ export declare const createApiClient: ({ apiKey, baseUrl }: ClientConfig) => {
254
262
  legalFormCode?: string[];
255
263
  zipCode?: string[];
256
264
  state?: string[];
265
+ gemeinde?: string[];
257
266
  hasEdikt?: boolean;
258
267
  active?: boolean;
259
268
  isScheinunternehmen?: boolean;
@@ -379,6 +388,7 @@ export declare const createApiClient: ({ apiKey, baseUrl }: ClientConfig) => {
379
388
  legalFormCode?: string[];
380
389
  zipCode?: string[];
381
390
  state?: string[];
391
+ gemeinde?: string[];
382
392
  hasEdikt?: boolean;
383
393
  active?: boolean;
384
394
  isScheinunternehmen?: boolean;
@@ -504,6 +514,7 @@ export declare const createApiClient: ({ apiKey, baseUrl }: ClientConfig) => {
504
514
  legalFormCode?: string[];
505
515
  zipCode?: string[];
506
516
  state?: string[];
517
+ gemeinde?: string[];
507
518
  hasEdikt?: boolean;
508
519
  active?: boolean;
509
520
  isScheinunternehmen?: boolean;
@@ -621,6 +632,7 @@ export declare const createApiClient: ({ apiKey, baseUrl }: ClientConfig) => {
621
632
  v1BusinessesSimilarList: (fnr: string, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").BusinessListResponse[], import("./client").ApiError | import("./client").ProblemDetails>>;
622
633
  v1BusinessesDetail: (fnr: string, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").BusinessDetailResponse, import("./client").ApiError | import("./client").ProblemDetails>>;
623
634
  v1BusinessesJahresabschluesseList: (fnr: string, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").ParsedJahresabschlussDto[], import("./client").ApiError | import("./client").ProblemDetails>>;
635
+ v1BusinessesFoerderungenList: (fnr: string, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").BusinessFoerderungenResponse, import("./client").ApiError | import("./client").ProblemDetails>>;
624
636
  v1BusinessesChangesDetail: (id: number, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").BusinessChange, import("./client").ApiError | import("./client").ProblemDetails>>;
625
637
  v1BusinessesChangesList: (query?: {
626
638
  fnr?: string;
@@ -649,6 +661,7 @@ export declare const createApiClient: ({ apiKey, baseUrl }: ClientConfig) => {
649
661
  page?: number;
650
662
  pageSize?: number;
651
663
  }, params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").PagedResponseOfZipCodeResponse, import("./client").ApiError | import("./client").ProblemDetails>>;
664
+ v1AddressesGemeindenList: (params?: import("./client").RequestParams) => Promise<import("./client").HttpResponse<import("./client").GemeindeResponse[], import("./client").ApiError | import("./client").ProblemDetails>>;
652
665
  };
653
666
  export * from "./client";
654
667
  export * from "./keyfigures";
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,qBAAqB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B,cAAc,oBAAoB,CAAC;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,KAAK,YAAY,GAAG,OAAO,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,YAAY,CAAC;AACzE,KAAK,wBAAwB,GAAG,OAAO,CACrC,MAAM,YAAY,EAClB,GAAG,kBAAkB,MAAM,GAAG,GAAG,kBAAkB,MAAM,CAC1D,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,YAAY,EAAE,wBAAwB,CAAC,GAAG;IACnF,gBAAgB,CAAC,EAAE,OAAO,CACxB,MAAM,CAAC,kBAAkB,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CACzE,CAAC;CACH,CAAC"}
package/index.js CHANGED
@@ -14,19 +14,24 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.createApiClient = void 0;
17
+ exports.createApiClient = exports.DEFAULT_BACKEND_TIMEOUT_MS = void 0;
18
18
  // packages/api-client/src/index.ts
19
19
  const client_1 = require("./client");
20
- /**
21
- * SOTA Factory: Creates a fresh, isolated instance of the API client.
22
- */
23
- const createApiClient = ({ apiKey, baseUrl }) => {
20
+ exports.DEFAULT_BACKEND_TIMEOUT_MS = 10000;
21
+ const createApiClient = ({ apiKey, baseUrl, timeoutMs = exports.DEFAULT_BACKEND_TIMEOUT_MS, }) => {
22
+ const customFetch = ((...args) => {
23
+ const [input, init] = args;
24
+ const deadline = AbortSignal.timeout(timeoutMs);
25
+ const signal = init?.signal ? AbortSignal.any([init.signal, deadline]) : deadline;
26
+ return fetch(input, { ...init, signal });
27
+ });
24
28
  const config = {
25
29
  baseApiParams: {
26
30
  headers: {
27
31
  "x-api-key": apiKey,
28
32
  },
29
33
  },
34
+ customFetch,
30
35
  };
31
36
  if (baseUrl) {
32
37
  config.baseUrl = baseUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firmenakte/api-client",
3
- "version": "2.9.0",
3
+ "version": "2.11.9",
4
4
  "description": "TypeScript/JavaScript client for the Firmenakte API",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",