@stack-spot/portal-network 0.201.0 → 0.202.1

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.
@@ -1,4 +1,5 @@
1
1
  import { HttpError } from '@oazapfts/runtime'
2
+ import { getApiAddresses } from '../api-addresses'
2
3
  import {
3
4
  addFavoriteV1KnowledgeSourcesSlugFavoritePost,
4
5
  createKsV1KnowledgeSourcesPost,
@@ -14,7 +15,9 @@ import {
14
15
  getUploadFormV1FileUploadFormPost,
15
16
  getUploadFormV2V2FileUploadFormPost,
16
17
  listKosV1KnowledgeSourcesKsSlugObjectsGet,
18
+ listKosV2KnowledgeSourcesKsSlugObjectsGet,
17
19
  listKsV1KnowledgeSourcesGet,
20
+ listKsV2KnowledgeSourcesGet,
18
21
  publishKsV1KnowledgeSourcesSlugPublishPost,
19
22
  resetKosV1KnowledgeSourcesKsSlugObjectsDelete,
20
23
  saveChunkedFilesDeprecatedV1FileUploadFileUploadIdPost,
@@ -32,7 +35,10 @@ import { FileUploadError } from '../error/FileUploadError'
32
35
  import { StackspotAPIError } from '../error/StackspotAPIError'
33
36
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
34
37
  import { removeAuthorizationParam } from '../utils/remove-authorization-param'
35
- import { getApiAddresses } from '../api-addresses'
38
+
39
+ const listKSV2WithoutAuthorization = removeAuthorizationParam(listKsV2KnowledgeSourcesGet)
40
+ const listKOV2WithoutAuthorization = removeAuthorizationParam(listKosV2KnowledgeSourcesKsSlugObjectsGet)
41
+
36
42
 
37
43
  class DataIntegrationClient extends ReactQueryNetworkClient {
38
44
  constructor() {
@@ -90,6 +96,10 @@ class DataIntegrationClient extends ReactQueryNetworkClient {
90
96
  * List of knowledge sources
91
97
  */
92
98
  knowledgeSources = this.query(removeAuthorizationParam(listKsV1KnowledgeSourcesGet))
99
+ /**
100
+ * List of knowledge sources with pagination
101
+ */
102
+ knowledgeSourcesV2 = this.infiniteQuery(listKSV2WithoutAuthorization, { accumulator: 'items' })
93
103
  /**
94
104
  * Adds the resource of type Knowledge Source to the list of favorites.
95
105
  */
@@ -102,6 +112,10 @@ class DataIntegrationClient extends ReactQueryNetworkClient {
102
112
  * List knowledge objects from a knowledge source
103
113
  */
104
114
  listKnowledgeObjects = this.query(removeAuthorizationParam(listKosV1KnowledgeSourcesKsSlugObjectsGet))
115
+ /**
116
+ * List knowledge objects from a knowledge source with pagination
117
+ */
118
+ listKnowledgeObjectsV2 = this.infiniteQuery(listKOV2WithoutAuthorization, { accumulator: 'items' })
105
119
  /**
106
120
  * Get a knowledge object by id
107
121
  */
@@ -1,11 +1,11 @@
1
1
  import { HttpError } from '@oazapfts/runtime'
2
2
 
3
+ import { getApiAddresses } from '../api-addresses'
3
4
  import { createKey, defaults, deleteKey, deleteSecretValue, editKey, encrypt, getAll1, getAvailability, updateSecretValue } from '../api/secrets'
4
5
  import { DefaultAPIError } from '../error/DefaultAPIError'
5
6
  import { secretsDictionary } from '../error/dictionary/secrets'
6
7
  import { StackspotAPIError } from '../error/StackspotAPIError'
7
8
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
8
- import { getApiAddresses } from '../api-addresses'
9
9
 
10
10
  class SecretClient extends ReactQueryNetworkClient {
11
11
  constructor() {