@stack-spot/portal-network 0.173.1 → 0.174.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 +7 -0
- package/dist/api/discover.d.ts +294 -0
- package/dist/api/discover.d.ts.map +1 -0
- package/dist/api/discover.js +180 -0
- package/dist/api/discover.js.map +1 -0
- package/dist/apis.json +2 -2
- package/dist/client/discover.d.ts +64 -0
- package/dist/client/discover.d.ts.map +1 -0
- package/dist/client/discover.js +124 -0
- package/dist/client/discover.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/discover.ts +435 -0
- package/src/apis.json +2 -2
- package/src/client/discover.ts +89 -0
- package/src/index.ts +2 -1
- package/dist/api/discovery.d.ts +0 -494
- package/dist/api/discovery.d.ts.map +0 -1
- package/dist/api/discovery.js +0 -205
- package/dist/api/discovery.js.map +0 -1
- package/dist/client/discovery.d.ts +0 -110
- package/dist/client/discovery.d.ts.map +0 -1
- package/dist/client/discovery.js +0 -133
- package/dist/client/discovery.js.map +0 -1
- package/src/api/discovery.ts +0 -729
- package/src/client/discovery.ts +0 -73
package/src/client/discovery.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import { attach, createHypothesis, defaults, deleteV1DocumentsByDocumentIdHypothesesAndHypothesisNumber, download, findHypothesisByNumber, getAll, getById, list1, list2, listAllDocumentsWithHypotheses, listHypothesis, listVersions, upload } from '../api/discovery'
|
|
3
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
4
|
-
import { baseDictionary } from '../error/dictionary/base'
|
|
5
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
6
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
7
|
-
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
8
|
-
import { getApiAddresses } from '../api-addresses'
|
|
9
|
-
|
|
10
|
-
class DiscoveryClient extends ReactQueryNetworkClient {
|
|
11
|
-
|
|
12
|
-
constructor() {
|
|
13
|
-
super(getApiAddresses().discovery.url, defaults)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
17
|
-
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get list of hypotheses
|
|
21
|
-
*/
|
|
22
|
-
listHypotheses = this.query(listHypothesis)
|
|
23
|
-
/**
|
|
24
|
-
* Get details of an hypothesis by id
|
|
25
|
-
*/
|
|
26
|
-
getHypothesisById = this.query(findHypothesisByNumber)
|
|
27
|
-
/**
|
|
28
|
-
* Get list of hypothesis documents
|
|
29
|
-
*/
|
|
30
|
-
listDocumentsByHypothesis = this.query(list2)
|
|
31
|
-
/**
|
|
32
|
-
* Get list of all documents
|
|
33
|
-
*/
|
|
34
|
-
listAllDocuments = this.query(listAllDocumentsWithHypotheses)
|
|
35
|
-
/**
|
|
36
|
-
* Get document details by id
|
|
37
|
-
*/
|
|
38
|
-
getDocumentById = this.query(getById)
|
|
39
|
-
/**
|
|
40
|
-
* Get list of opportunities
|
|
41
|
-
*/
|
|
42
|
-
listOpportunities = this.query(list1)
|
|
43
|
-
/**
|
|
44
|
-
* Get list of document types
|
|
45
|
-
*/
|
|
46
|
-
listDocumentTypes = this.query(getAll)
|
|
47
|
-
/**
|
|
48
|
-
* Create an hypothesis
|
|
49
|
-
*/
|
|
50
|
-
createHypothesis = this.mutation(removeAuthorizationParam(createHypothesis))
|
|
51
|
-
/**
|
|
52
|
-
* Create an document
|
|
53
|
-
*/
|
|
54
|
-
createDocument = this.mutation(removeAuthorizationParam(upload))
|
|
55
|
-
/**
|
|
56
|
-
* Attach a existing document in an hypothesis
|
|
57
|
-
*/
|
|
58
|
-
attachExistingDocument = this.mutation(removeAuthorizationParam(attach))
|
|
59
|
-
/**
|
|
60
|
-
* Delete an document
|
|
61
|
-
*/
|
|
62
|
-
deleteDocument = this.mutation(removeAuthorizationParam(deleteV1DocumentsByDocumentIdHypothesesAndHypothesisNumber))
|
|
63
|
-
/**
|
|
64
|
-
* Download an document
|
|
65
|
-
*/
|
|
66
|
-
downloadDocument = this.query(removeAuthorizationParam(download))
|
|
67
|
-
/**
|
|
68
|
-
* List versions of a document
|
|
69
|
-
*/
|
|
70
|
-
listDocumentVersions = this.query(removeAuthorizationParam(listVersions))
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export const discoveryClient = new DiscoveryClient()
|