@stack-spot/portal-network 0.131.0 → 0.132.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.132.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.131.0...portal-network@v0.132.0) (2025-05-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * add create document query ([#1025](https://github.com/stack-spot/portal-commons/issues/1025)) ([1b670bf](https://github.com/stack-spot/portal-commons/commit/1b670bf7febd1c10e7780ae0b97f8bbbf128067e))
9
+
3
10
  ## [0.131.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.130.0...portal-network@v0.131.0) (2025-05-28)
4
11
 
5
12
 
@@ -68,6 +68,14 @@ declare class DiscoveryClient extends ReactQueryNetworkClient {
68
68
  authorization: string;
69
69
  hypothesisCreateRequest: import("../api/discovery.js").HypothesisCreateRequest;
70
70
  }, "authorization" | "jwtToken" | "authorizationHeader"> & {}, import("../api/discovery.js").HypothesisResponse>;
71
+ /**
72
+ * Create an document
73
+ */
74
+ createDocument: import("../network/types.js").MutationObject<Omit<{
75
+ hypothesisId: string;
76
+ authorization: string;
77
+ documentUploadRequest?: import("../api/discovery.js").DocumentUploadRequest | undefined;
78
+ }, "authorization" | "jwtToken" | "authorizationHeader"> & {}, never>;
71
79
  /**
72
80
  * Attach a existing document in an hypothesis
73
81
  */
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/client/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAK7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAG5E,cAAM,eAAgB,SAAQ,uBAAuB;;IAMnD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAGlE;;OAEG;IACH,cAAc;;;;;;kEAA6B;IAC3C;;OAEG;IACH,iBAAiB;;sDAAiC;IAClD;;OAEG;IACH,yBAAyB;;;;;;;uEAAoB;IAC7C;;OAEG;IACH,gBAAgB;;;;;;8EAA6C;IAC7D;;OAEG;IACH,eAAe;;0DAAsB;IACrC;;OAEG;IACH,iBAAiB;;;;;;mEAAmB;IACpC;;OAEG;IACH,iBAAiB,kGAAqB;IACtC;;OAEG;IACH,gBAAgB;;;kHAA4D;IAC5E;;OAEG;IACH,sBAAsB;;;;0EAAkD;CACzE;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAA"}
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/client/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAK7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAG5E,cAAM,eAAgB,SAAQ,uBAAuB;;IAMnD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAGlE;;OAEG;IACH,cAAc;;;;;;kEAA6B;IAC3C;;OAEG;IACH,iBAAiB;;sDAAiC;IAClD;;OAEG;IACH,yBAAyB;;;;;;;uEAAoB;IAC7C;;OAEG;IACH,gBAAgB;;;;;;8EAA6C;IAC7D;;OAEG;IACH,eAAe;;0DAAsB;IACrC;;OAEG;IACH,iBAAiB;;;;;;mEAAmB;IACpC;;OAEG;IACH,iBAAiB,kGAAqB;IACtC;;OAEG;IACH,gBAAgB;;;kHAA4D;IAC5E;;OAEG;IACH,cAAc;;;;0EAAkD;IAChE;;OAEG;IACH,sBAAsB;;;;0EAAkD;CACzE;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { attach, createHypothesis, defaults, findHypothesisById, getAll, getById, list, list1, listAllDocumentsWithHypotheses, listHypothesis } from '../api/discovery.js';
1
+ import { attach, createHypothesis, defaults, findHypothesisById, getAll, getById, list, list1, listAllDocumentsWithHypotheses, listHypothesis, upload } from '../api/discovery.js';
2
2
  import apis from '../apis.json';
3
3
  import { DefaultAPIError } from '../error/DefaultAPIError.js';
4
4
  import { baseDictionary } from '../error/dictionary/base.js';
@@ -79,6 +79,15 @@ class DiscoveryClient extends ReactQueryNetworkClient {
79
79
  writable: true,
80
80
  value: this.mutation(removeAuthorizationParam(createHypothesis))
81
81
  });
82
+ /**
83
+ * Create an document
84
+ */
85
+ Object.defineProperty(this, "createDocument", {
86
+ enumerable: true,
87
+ configurable: true,
88
+ writable: true,
89
+ value: this.mutation(removeAuthorizationParam(upload))
90
+ });
82
91
  /**
83
92
  * Attach a existing document in an hypothesis
84
93
  */
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/client/discovery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,8BAA8B,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACvK,OAAO,IAAI,MAAM,cAAc,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AAE9E,MAAM,eAAgB,SAAQ,uBAAuB;IAEnD;QACE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAMrC;;WAEG;QACH;;;;mBAAiB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;WAAA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CAyCF;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-network",
3
- "version": "0.131.0",
3
+ "version": "0.132.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,5 +1,5 @@
1
1
  import { HttpError } from '@oazapfts/runtime'
2
- import { attach, createHypothesis, defaults, findHypothesisById, getAll, getById, list, list1, listAllDocumentsWithHypotheses, listHypothesis } from '../api/discovery'
2
+ import { attach, createHypothesis, defaults, findHypothesisById, getAll, getById, list, list1, listAllDocumentsWithHypotheses, listHypothesis, upload } from '../api/discovery'
3
3
  import apis from '../apis.json'
4
4
  import { DefaultAPIError } from '../error/DefaultAPIError'
5
5
  import { baseDictionary } from '../error/dictionary/base'
@@ -48,6 +48,10 @@ class DiscoveryClient extends ReactQueryNetworkClient {
48
48
  * Create an hypothesis
49
49
  */
50
50
  createHypothesis = this.mutation(removeAuthorizationParam(createHypothesis))
51
+ /**
52
+ * Create an document
53
+ */
54
+ createDocument = this.mutation(removeAuthorizationParam(upload))
51
55
  /**
52
56
  * Attach a existing document in an hypothesis
53
57
  */