@bratislava/ginis-sdk 1.1.2 → 1.2.0

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { ReadStream } from 'fs';
2
+ import { Readable } from 'stream';
3
3
  import { AxiosError } from 'axios';
4
4
 
5
5
  declare const detailFunkcnihoMistaRequestProperties: readonly ["Id-funkce"];
@@ -1959,7 +1959,7 @@ declare const pridatSouborRequestProperties: readonly ["Id-dokumentu", "Id-soubo
1959
1959
  type SslPridatSouborRequest = {
1960
1960
  [K in (typeof pridatSouborRequestProperties)[number] as K]?: string;
1961
1961
  } & {
1962
- Obsah?: ReadStream;
1962
+ Obsah?: Readable;
1963
1963
  };
1964
1964
  declare const pridatSouborSchema: z.ZodObject<{
1965
1965
  'Datum-zmeny': z.ZodString;
package/dist/index.js CHANGED
@@ -617,7 +617,7 @@ async function detailDokumentu(bodyObj) {
617
617
  }
618
618
 
619
619
  // src/api/ssl/Pridat-soubor.ts
620
- var import_fs = require("fs");
620
+ var import_stream2 = require("stream");
621
621
  var import_uuid = require("uuid");
622
622
  var import_zod6 = require("zod");
623
623
  var pridatSouborRequestProperties = [
@@ -664,7 +664,11 @@ async function pridatSoubor(bodyObj) {
664
664
  }
665
665
  async function pridatSouborMtom(bodyObj) {
666
666
  if (!bodyObj.Obsah) {
667
- bodyObj.Obsah = new import_fs.ReadStream();
667
+ bodyObj.Obsah = new import_stream2.Readable({
668
+ read() {
669
+ this.push(null);
670
+ }
671
+ });
668
672
  }
669
673
  const url = this.config.urls.ssl_mtom;
670
674
  if (!url) throw new GinisError("GINIS SDK Error: Missing SSL url in GINIS config");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bratislava/ginis-sdk",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "A small wrapper for most commonly used requests towards the Bratislava GINIS system",
5
5
  "main": "dist/index.js",
6
6
  "files": [