@stack-spot/portal-network 0.173.0 → 0.174.0-beta.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +239 -0
  2. package/dist/api/agent-tools.d.ts +1 -0
  3. package/dist/api/agent-tools.d.ts.map +1 -1
  4. package/dist/api/agent-tools.js.map +1 -1
  5. package/dist/api/ai.d.ts +4 -1
  6. package/dist/api/ai.d.ts.map +1 -1
  7. package/dist/api/ai.js.map +1 -1
  8. package/dist/api/codeShift.d.ts +504 -23
  9. package/dist/api/codeShift.d.ts.map +1 -1
  10. package/dist/api/codeShift.js +217 -0
  11. package/dist/api/codeShift.js.map +1 -1
  12. package/dist/api/discover.d.ts +294 -0
  13. package/dist/api/discover.d.ts.map +1 -0
  14. package/dist/api/discover.js +180 -0
  15. package/dist/api/discover.js.map +1 -0
  16. package/dist/api-addresses.d.ts +11 -3
  17. package/dist/api-addresses.d.ts.map +1 -1
  18. package/dist/api-addresses.js +22 -2
  19. package/dist/api-addresses.js.map +1 -1
  20. package/dist/apis-itau.json +225 -0
  21. package/dist/apis.json +2 -2
  22. package/dist/client/agent-tools.d.ts.map +1 -1
  23. package/dist/client/agent-tools.js +3 -8
  24. package/dist/client/agent-tools.js.map +1 -1
  25. package/dist/client/ai.js +3 -3
  26. package/dist/client/ai.js.map +1 -1
  27. package/dist/client/code-shift.d.ts +183 -28
  28. package/dist/client/code-shift.d.ts.map +1 -1
  29. package/dist/client/code-shift.js +106 -7
  30. package/dist/client/code-shift.js.map +1 -1
  31. package/dist/client/data-integration.d.ts +9 -0
  32. package/dist/client/data-integration.d.ts.map +1 -1
  33. package/dist/client/data-integration.js +10 -1
  34. package/dist/client/data-integration.js.map +1 -1
  35. package/dist/client/discover.d.ts +64 -0
  36. package/dist/client/discover.d.ts.map +1 -0
  37. package/dist/client/discover.js +124 -0
  38. package/dist/client/discover.js.map +1 -0
  39. package/dist/client/workspace-manager.d.ts +9 -0
  40. package/dist/client/workspace-manager.d.ts.map +1 -1
  41. package/dist/client/workspace-manager.js +11 -2
  42. package/dist/client/workspace-manager.js.map +1 -1
  43. package/dist/error/dictionary/agent-tools.d.ts +75 -0
  44. package/dist/error/dictionary/agent-tools.d.ts.map +1 -0
  45. package/dist/error/dictionary/agent-tools.js +75 -0
  46. package/dist/error/dictionary/agent-tools.js.map +1 -0
  47. package/dist/error/dictionary/cloud-platform.d.ts +70 -8
  48. package/dist/error/dictionary/cloud-platform.d.ts.map +1 -1
  49. package/dist/error/dictionary/cloud-platform.js +74 -12
  50. package/dist/error/dictionary/cloud-platform.js.map +1 -1
  51. package/dist/index.d.ts +4 -3
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +3 -2
  54. package/dist/index.js.map +1 -1
  55. package/dist/network/NetworkClient.d.ts +4 -2
  56. package/dist/network/NetworkClient.d.ts.map +1 -1
  57. package/dist/network/NetworkClient.js +5 -3
  58. package/dist/network/NetworkClient.js.map +1 -1
  59. package/dist/network/types.d.ts +1 -0
  60. package/dist/network/types.d.ts.map +1 -1
  61. package/package.json +2 -2
  62. package/readme.md +1 -1
  63. package/src/api/account.ts +1 -0
  64. package/src/api/agent-tools.ts +4 -0
  65. package/src/api/agent.ts +2 -0
  66. package/src/api/ai.ts +4 -1
  67. package/src/api/codeShift.ts +898 -33
  68. package/src/api/discover.ts +435 -0
  69. package/src/api/notification.ts +2 -0
  70. package/src/api-addresses.ts +26 -3
  71. package/src/apis-itau.json +225 -0
  72. package/src/apis.json +2 -2
  73. package/src/client/agent-tools.ts +4 -8
  74. package/src/client/ai.ts +4 -3
  75. package/src/client/code-shift.ts +73 -7
  76. package/src/client/data-integration.ts +6 -0
  77. package/src/client/discover.ts +89 -0
  78. package/src/client/workspace-manager.ts +8 -1
  79. package/src/error/dictionary/agent-tools.ts +76 -0
  80. package/src/error/dictionary/cloud-platform.ts +74 -12
  81. package/src/index.ts +5 -3
  82. package/src/network/NetworkClient.ts +7 -4
  83. package/src/network/types.ts +2 -0
  84. package/dist/api/discovery.d.ts +0 -494
  85. package/dist/api/discovery.d.ts.map +0 -1
  86. package/dist/api/discovery.js +0 -205
  87. package/dist/api/discovery.js.map +0 -1
  88. package/dist/client/discovery.d.ts +0 -110
  89. package/dist/client/discovery.d.ts.map +0 -1
  90. package/dist/client/discovery.js +0 -133
  91. package/dist/client/discovery.js.map +0 -1
  92. package/src/api/discovery.ts +0 -729
  93. package/src/client/discovery.ts +0 -73
@@ -2,19 +2,81 @@ import { Dictionary } from '@stack-spot/portal-translate'
2
2
 
3
3
  export const scfDictionary = {
4
4
  en: {
5
- SCF_CIDR_CREATION_ERROR: 'Error creating CIDR.',
6
- SCF_CIDR_RANGE_CONFLICT: 'The specified CIDR conflicts with an existing CIDR. {1}',
7
- SCF_FOLDER_CREATION_ERROR: 'Error creating folder.',
8
- SCF_FOLDER_ALREADY_EXISTS_ERROR: 'There is already a folder {1} within that foundation.',
9
- SCF_CIDR_FOUNDATION_RESERVED: 'The CIDR block {1} has been reserved for Foundation use.',
10
- SCF_CIDR_NOTATION_INVALID: 'The CIDR block {1} is not a valid CIDR notation. Expected format: {2}.',
5
+ SCF_CERTIFICATE_ERROR: 'Certificate operation failed.',
6
+ SCF_CERTIFICATE_NOT_FOUND_ERROR: 'Certificate with ID {1} not found.',
7
+ SCF_CIDR_ERROR: 'CIDR operation failed.',
8
+ SCF_CIDR_RANGE_CONFLICT: 'CIDR range {1} conflicts with an existing range.',
9
+ SCF_CIDR_FOUNDATION_RESERVED: 'CIDR range {1} conflicts with the Foundation\'s reserved range.',
10
+ SCF_CIDR_NOT_FOUND_ERROR: 'CIDR with ID {1} not found.',
11
+ SCF_CONTROL_TOWER_BUSY_ERROR: 'Foundations Control Tower is currently busy. Please try again later.',
12
+ SCF_DNS_RECORD_ERROR: 'DNS Record operation failed.',
13
+ SCF_DNS_RECORD_NOT_FOUND_ERROR: 'DNS Record with ID {1} not found.',
14
+ SCF_DNS_ZONE_ERROR: 'DNS Zone operation failed.',
15
+ SCF_DNS_ZONE_NOT_FOUND_ERROR: 'DNS Zone with ID {1} not found.',
16
+ SCF_DNS_ZONE_NOT_READY_ERROR: 'DNS Zone with ID {1} not ready.',
17
+ SCF_FOLDER_ALREADY_EXISTS_ERROR: 'A folder named {1} already exists.',
18
+ SCF_FOLDER_ERROR: 'Folder operation failed.',
19
+ SCF_FOLDER_NOT_FOUND_ERROR: 'Folder with ID {1} not found.',
20
+ SCF_FOLDER_NOT_READY_ERROR: 'Folder with ID {1} not ready.',
21
+ SCF_FOUNDATION_ERROR: 'Foundation operation failed.',
22
+ SCF_FOUNDATION_NOT_FOUND_ERROR: 'Foundation with ID {1} not found.',
23
+ SCF_FOUNDATION_NOT_READY_ERROR: 'Foundation with ID {1} not ready.',
24
+ SCF_INBOUND_ERROR: 'Inbound operation failed.',
25
+ SCF_INVALID_REGEX_ERROR: 'The value {1} is invalid.',
26
+ SCF_MASTER_ACCOUNT_ERROR: 'Master Account operation failed.',
27
+ SCF_MASTER_ACCOUNT_NOT_FOUND_ERROR: 'No Master Account available for Foundation creation.',
28
+ SCF_NAMESPACE_CREATION_ERROR: 'An error occurred while creating the Kubernetes namespace.',
29
+ SCF_NETWORK_CONNECTION_ERROR: 'Network Connection operation failed.',
30
+ SCF_NETWORK_ERROR: 'Network operation failed.',
31
+ SCF_NETWORK_NOT_FOUND_ERROR: 'Network with ID {1} not found.',
32
+ SCF_NETWORK_NOT_READY_ERROR: 'Network with ID {1} not ready.',
33
+ SCF_PARENT_FOLDER_NOT_READY_ERROR: 'Parent Folder with ID {1} not ready.',
34
+ SCF_PROJECT_ERROR: 'Project operation failed.',
35
+ SCF_PROJECT_NOT_FOUND_ERROR: 'Project with ID {1} not found.',
36
+ SCF_PROJECT_NOT_READY_ERROR: 'Project with ID {1} not ready.',
37
+ SCF_UNKNOWN_ERROR: 'An unexpected error has occurred.',
38
+ SCF_VPN_CONFIGURATION_NOT_FOUND_ERROR: 'Configuration for VPN with ID {1} not found.',
39
+ SCF_VPN_ERROR: 'VPN operation failed.',
40
+ SCF_VPN_NOT_FOUND_ERROR: 'VPN with ID {1} not found.',
41
+ SCF_VPN_NOT_READY_ERROR: 'VPN with ID {1} not ready.',
11
42
  },
12
43
  pt: {
13
- SCF_CIDR_CREATION_ERROR: 'Erro ao criar CIDR.',
14
- SCF_CIDR_RANGE_CONFLICT: 'O CIDR especificado conflita com um CIDR já existente: {1}.',
15
- SCF_FOLDER_CREATION_ERROR: 'Erro ao criar pasta.',
16
- SCF_FOLDER_ALREADY_EXISTS_ERROR: ' existe uma pasta {1} dentro dessa fundação.',
17
- SCF_CIDR_FOUNDATION_RESERVED: 'O bloco CIDR {1} foi reservado para uso da Fundação.',
18
- SCF_CIDR_NOTATION_INVALID: 'O bloco CIDR {1} não é uma notação CIDR válida. Formato esperado: {2}.',
44
+ SCF_CERTIFICATE_ERROR: 'Falha na operação de Certificado.',
45
+ SCF_CERTIFICATE_NOT_FOUND_ERROR: 'Certificado com ID {1} não encontrado.',
46
+ SCF_CIDR_ERROR: 'Falha na operação de CIDR.',
47
+ SCF_CIDR_RANGE_CONFLICT: 'O intervalo CIDR {1} conflita com um intervalo existente.',
48
+ SCF_CIDR_FOUNDATION_RESERVED: 'O intervalo CIDR {1} conflita com o intervalo reservado da Fundação.',
49
+ SCF_CIDR_NOT_FOUND_ERROR: 'CIDR com ID {1} não encontrado.',
50
+ SCF_CONTROL_TOWER_BUSY_ERROR: 'Control Tower da Fundação está ocupada no momento. Por favor, tente novamente mais tarde.',
51
+ SCF_DNS_RECORD_ERROR: 'Falha na operação de DNS Record.',
52
+ SCF_DNS_RECORD_NOT_FOUND_ERROR: 'DNS Record com ID {1} não encontrado.',
53
+ SCF_DNS_ZONE_ERROR: 'Falha na operação de DNS Zone.',
54
+ SCF_DNS_ZONE_NOT_FOUND_ERROR: 'DNS Zone com ID {1} não encontrada.',
55
+ SCF_DNS_ZONE_NOT_READY_ERROR: 'DNS Zone com ID {1} não está pronta.',
56
+ SCF_FOLDER_ALREADY_EXISTS_ERROR: 'Uma Pasta com o nome {1} já existe.',
57
+ SCF_FOLDER_ERROR: 'Falha na operação de Pasta.',
58
+ SCF_FOLDER_NOT_FOUND_ERROR: 'Pasta com ID {1} não encontrada.',
59
+ SCF_FOLDER_NOT_READY_ERROR: 'Pasta com ID {1} não está pronta.',
60
+ SCF_FOUNDATION_ERROR: 'Falha na operação da Fundação.',
61
+ SCF_FOUNDATION_NOT_FOUND_ERROR: 'Fundação com ID {1} não encontrada.',
62
+ SCF_FOUNDATION_NOT_READY_ERROR: 'Fundação com ID {1} não está pronta.',
63
+ SCF_INBOUND_ERROR: 'Falha na operação de Inbound.',
64
+ SCF_INVALID_REGEX_ERROR: 'O valor {1} é inválido.',
65
+ SCF_MASTER_ACCOUNT_ERROR: 'Falha na operação da Master Account.',
66
+ SCF_MASTER_ACCOUNT_NOT_FOUND_ERROR: 'Nenhuma Master Account disponível para criação da Fundação.',
67
+ SCF_NAMESPACE_CREATION_ERROR: 'Ocorreu um erro ao criar o namespace no Kubernetes.',
68
+ SCF_NETWORK_CONNECTION_ERROR: 'Falha na operação de Network Connection.',
69
+ SCF_NETWORK_ERROR: 'Falha na operação de Network.',
70
+ SCF_NETWORK_NOT_FOUND_ERROR: 'Network com ID {1} não encontrada.',
71
+ SCF_NETWORK_NOT_READY_ERROR: 'Network com ID {1} não está pronta.',
72
+ SCF_PARENT_FOLDER_NOT_READY_ERROR: 'Pasta pai com ID {1} não está pronta.',
73
+ SCF_PROJECT_ERROR: 'Falha na operação do Projeto.',
74
+ SCF_PROJECT_NOT_FOUND_ERROR: 'Projeto com ID {1} não encontrado.',
75
+ SCF_PROJECT_NOT_READY_ERROR: 'Projeto com ID {1} não está pronto.',
76
+ SCF_UNKNOWN_ERROR: 'Ocorreu um erro inesperado.',
77
+ SCF_VPN_CONFIGURATION_NOT_FOUND_ERROR: 'Configuração para VPN com ID {1} não encontrada.',
78
+ SCF_VPN_ERROR: 'Falha na operação de VPN.',
79
+ SCF_VPN_NOT_FOUND_ERROR: 'VPN com ID {1} não encontrada.',
80
+ SCF_VPN_NOT_READY_ERROR: 'VPN com ID {1} não está pronta.',
19
81
  },
20
82
  } satisfies Dictionary
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { CancelledError } from '@tanstack/react-query'
2
- export { apiAddresses, getApiAddresses, getBaseUrlWithOverride, setApisOverride } from './api-addresses'
2
+ export { apiAddresses, getApiAddresses, getApisByTenant, getBaseUrlWithOverride, setApisOverride } from './api-addresses'
3
3
  export { accountClient } from './client/account'
4
4
  export { agentClient } from './client/agent'
5
5
  export { agentToolsClient } from './client/agent-tools'
@@ -13,7 +13,8 @@ export { cloudServicesClient } from './client/cloud-services'
13
13
  export { codeShiftClient } from './client/code-shift'
14
14
  export { contentClient } from './client/content'
15
15
  export { dataIntegrationClient } from './client/data-integration'
16
- export { discoveryClient } from './client/discovery'
16
+ export * from './client/discover'
17
+ export { discoverClient } from './client/discover'
17
18
  export { eventBusClient } from './client/event-bus'
18
19
  export { genAiInferenceClient } from './client/gen-ai-inference'
19
20
  export { insightsClient } from './client/insights'
@@ -34,9 +35,10 @@ export { StreamError } from './error/StreamError'
34
35
  export { StreamJsonError } from './error/StreamJsonError'
35
36
  export { NetworkClient } from './network/NetworkClient'
36
37
  export { queryClient } from './network/react-query-client'
37
- export { OperationResult, OperationVariables, UseQueryObjectOptions } from './network/types'
38
+ export { Env, OperationResult, OperationVariables, Tenant, UseQueryObjectOptions } from './network/types'
38
39
  export { StreamingStatus } from './types'
39
40
  export { StreamedArray } from './utils/StreamedArray'
40
41
  export { StreamedJson } from './utils/StreamedJson'
41
42
  export { useExtendedList } from './utils/use-extended-list'
42
43
  export { useStreamedArray } from './utils/use-streamed-array'
44
+
@@ -1,9 +1,9 @@
1
1
  import { AuthenticationError, SessionExpiredError } from '@stack-spot/auth'
2
2
  import { requestPermission } from '@stack-spot/opa'
3
3
  import { events } from 'fetch-event-stream'
4
- import { StackspotAPIError } from '../error/StackspotAPIError'
5
- import { Env, FetchEventStream, HTTPMethod, SessionManager } from './types'
6
4
  import { getBaseUrlWithOverride } from '../api-addresses'
5
+ import { StackspotAPIError } from '../error/StackspotAPIError'
6
+ import { Env, FetchEventStream, HTTPMethod, SessionManager, Tenant } from './types'
7
7
 
8
8
  /**
9
9
  * A set of methods for performing network requests to an API.
@@ -21,6 +21,7 @@ export abstract class NetworkClient {
21
21
  private baseURL: Record<Env, string>
22
22
  static readonly sessionManager?: SessionManager
23
23
  private static env?: Env
24
+ private static tenant?: Tenant
24
25
 
25
26
  /**
26
27
  * @param baseURL An object with the keys "dev", "stg" and "prd". The values must be the url for each of these environments.
@@ -33,11 +34,13 @@ export abstract class NetworkClient {
33
34
  * Sets up all network clients. Must be called before attempting to make any request.
34
35
  * @param sessionManager An object with functions capable of checking, retrieving and ending the current session.
35
36
  * @param env The environment to send the requests to.
37
+ * @param tenant - {@link Tenant} tenant identifier used to scope requests.
36
38
  */
37
- static setup(sessionManager: SessionManager, env: Env) {
39
+ static setup(sessionManager: SessionManager, env: Env, tenant: Tenant) {
38
40
  //@ts-ignore This is the only place we would link session manager to be set.
39
41
  NetworkClient.sessionManager = sessionManager
40
42
  NetworkClient.env = env
43
+ NetworkClient.tenant = tenant
41
44
  }
42
45
 
43
46
  /**
@@ -62,7 +65,7 @@ export abstract class NetworkClient {
62
65
  * @returns the final baseURL for the current environment, considering overrides if available.
63
66
  */
64
67
  protected getBaseURL(): string {
65
- return getBaseUrlWithOverride(this.baseURL, NetworkClient.env);
68
+ return getBaseUrlWithOverride(this.baseURL, NetworkClient.env, NetworkClient.tenant ?? 'stackspot');
66
69
  }
67
70
 
68
71
  /**
@@ -10,6 +10,8 @@ export interface SessionManager {
10
10
  getSession(): Session,
11
11
  }
12
12
 
13
+ export type Tenant = 'stackspot' | 'itau'
14
+
13
15
  export type Env = 'dev' | 'stg' | 'prd'
14
16
 
15
17
  export type HTTPMethod = 'post' | 'patch' | 'delete' | 'put' | 'get'
@@ -1,494 +0,0 @@
1
- /**
2
- * OpenAPI definition
3
- * v0
4
- * DO NOT MODIFY - This file has been generated using oazapfts.
5
- * See https://www.npmjs.com/package/oazapfts
6
- */
7
- import * as Oazapfts from "@oazapfts/runtime";
8
- export declare const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders>;
9
- export declare const servers: {
10
- generatedServerUrl: string;
11
- };
12
- export type OpportunityResponse = {
13
- id?: string;
14
- name?: string;
15
- "number": string;
16
- createdAt?: string;
17
- createdBy?: string;
18
- metadata?: {
19
- [key: string]: string;
20
- };
21
- };
22
- export type HypothesisResponse = {
23
- id?: string;
24
- opportunity: OpportunityResponse;
25
- name: string;
26
- description?: string;
27
- "number": string;
28
- status: "TO_DO" | "PRIORITIZED" | "IN_EXPERIMENTATION" | "VALIDATED" | "DISCARDED" | "CANCELED";
29
- createdAt?: string;
30
- createdBy: string;
31
- updatedAt?: string;
32
- updatedBy?: string;
33
- };
34
- export type HypothesisUpdateRequest = {
35
- name?: string;
36
- description?: string;
37
- opportunityNumber?: string;
38
- status?: string;
39
- };
40
- export type StateResponse = {
41
- value: string;
42
- description: string;
43
- };
44
- export type GetHypothesisResponseHypothesisData = {
45
- id: string;
46
- "number": string;
47
- name: string;
48
- description: string;
49
- state: StateResponse;
50
- community: string;
51
- releaseTrain: string;
52
- squad: string;
53
- agileProduct?: string;
54
- businessPortfolio: string;
55
- technologicalFront: string;
56
- frontChallenge: string;
57
- towerClassification: string;
58
- agileSprint?: string;
59
- priority?: string;
60
- impediment: boolean;
61
- openedAt: string;
62
- openedBy: string;
63
- closedAt?: string;
64
- assignedTo: string;
65
- opportunity: string;
66
- };
67
- export type GetHypothesisResponse = {
68
- data: GetHypothesisResponseHypothesisData;
69
- };
70
- export type UpdateHypothesisRequestStateRequest = {
71
- value: string;
72
- };
73
- export type UpdateHypothesisRequest = {
74
- name: string;
75
- description: string;
76
- state: UpdateHypothesisRequestStateRequest;
77
- };
78
- export type UpdateHypothesisResponseHypothesisData = {
79
- id: string;
80
- "number": string;
81
- name: string;
82
- description: string;
83
- state: StateResponse;
84
- community: string;
85
- releaseTrain: string;
86
- squad: string;
87
- agileProduct?: string;
88
- businessPortfolio: string;
89
- technologicalFront: string;
90
- frontChallenge: string;
91
- towerClassification: string;
92
- agileSprint?: string;
93
- priority?: string;
94
- impediment: boolean;
95
- openedAt: string;
96
- openedBy: string;
97
- closedAt?: string;
98
- assignedTo: string;
99
- opportunity: string;
100
- };
101
- export type UpdateHypothesisResponse = {
102
- data: UpdateHypothesisResponseHypothesisData;
103
- };
104
- export type SortResponse = {
105
- direction: string;
106
- nullHandling: string;
107
- ascending: boolean;
108
- property: string;
109
- ignoreCase: boolean;
110
- };
111
- export type PageableResponse = {
112
- offset: number;
113
- sort: SortResponse[];
114
- paged: boolean;
115
- pageSize: number;
116
- pageNumber: number;
117
- unpaged: boolean;
118
- };
119
- export type PageResponseHypothesisResponse = {
120
- totalElements: number;
121
- totalPages: number;
122
- first: boolean;
123
- last: boolean;
124
- size: number;
125
- content: HypothesisResponse[];
126
- "number": number;
127
- sort: SortResponse[];
128
- numberOfElements: number;
129
- pageable: PageableResponse;
130
- empty: boolean;
131
- };
132
- export type CreateHypothesisRequest = {
133
- opportunity: string;
134
- name: string;
135
- description: string;
136
- };
137
- export type DocumentUploadRequest = {
138
- file: Blob;
139
- description: string;
140
- name: string;
141
- typeId: string;
142
- origin: "AI" | "UPLOAD";
143
- };
144
- export type AgentResponse = {
145
- id: string;
146
- label: string;
147
- image?: string;
148
- builtIn: boolean;
149
- slug: string;
150
- createdAt?: string;
151
- };
152
- export type DocumentTypeResponse = {
153
- id: string;
154
- typeName: "PRESS_RELEASE" | "PRODUCT_VISION" | "PRODUCT_REQUIREMENTS" | "MARKET_COMPARISON";
155
- agent?: AgentResponse;
156
- description: string;
157
- createdAt?: string;
158
- };
159
- export type DocumentVersionSummaryResponse = {
160
- id: string;
161
- name: string;
162
- createdAt?: string;
163
- createdBy?: string;
164
- };
165
- export type DocumentUploadResponse = {
166
- id: string;
167
- name: string;
168
- description: string;
169
- "type": DocumentTypeResponse;
170
- origin: "AI" | "UPLOAD";
171
- createdAt?: string;
172
- createdBy: string;
173
- version: DocumentVersionSummaryResponse;
174
- };
175
- export type DocumentAttachRequest = {
176
- documentIds: string[];
177
- };
178
- export type OrchestratorCredentialsResponse = {
179
- id: number;
180
- clientId: string;
181
- hasCertificate: boolean;
182
- hasPrivateKey: boolean;
183
- createdAt?: string;
184
- createdBy?: string;
185
- updatedAt?: string;
186
- updatedBy?: string;
187
- };
188
- export type ListHypothesisResponseOpportunityData = {
189
- id: string;
190
- "number": string;
191
- };
192
- export type ListHypothesisResponseHypothesisData = {
193
- id: string;
194
- "number": string;
195
- name: string;
196
- description: string;
197
- state: StateResponse;
198
- openedAt: string;
199
- openedBy: string;
200
- opportunity: ListHypothesisResponseOpportunityData;
201
- };
202
- export type ListHypothesisResponse = {
203
- total: number;
204
- data: ListHypothesisResponseHypothesisData[];
205
- };
206
- export type CreateHypothesisResponseHypothesisData = {
207
- id: string;
208
- "number": string;
209
- name: string;
210
- description: string;
211
- state: StateResponse;
212
- community: string;
213
- releaseTrain: string;
214
- squad: string;
215
- agileProduct?: string;
216
- businessPortfolio: string;
217
- technologicalFront: string;
218
- frontChallenge: string;
219
- towerClassification: string;
220
- agileSprint?: string;
221
- priority?: string;
222
- impediment: boolean;
223
- openedAt: string;
224
- openedBy: string;
225
- closedAt?: string;
226
- assignedTo: string;
227
- };
228
- export type CreateHypothesisResponse = {
229
- data: CreateHypothesisResponseHypothesisData;
230
- };
231
- export type DocumentDetailContent = {
232
- hasPreview: boolean;
233
- content?: string;
234
- };
235
- export type DocumentVersion = {
236
- id: string;
237
- name: string;
238
- createdAt?: string;
239
- createdBy?: string;
240
- };
241
- export type DocumentDetailResponse = {
242
- id: string;
243
- name: string;
244
- description: string;
245
- "type": DocumentTypeResponse;
246
- origin: "AI" | "UPLOAD";
247
- createdAt?: string;
248
- createdBy: string;
249
- details: DocumentDetailContent;
250
- version: DocumentVersion;
251
- };
252
- export type DocumentPatchRequest = {
253
- file: Blob;
254
- description?: string;
255
- name?: string;
256
- };
257
- export type PageResponseOpportunityResponse = {
258
- totalElements: number;
259
- totalPages: number;
260
- first: boolean;
261
- last: boolean;
262
- size: number;
263
- content: OpportunityResponse[];
264
- "number": number;
265
- sort: SortResponse[];
266
- numberOfElements: number;
267
- pageable: PageableResponse;
268
- empty: boolean;
269
- };
270
- export type HypothesisSummaryResponse = {
271
- "number": string;
272
- };
273
- export type DocumentWithHypothesesResponse = {
274
- id: string;
275
- name: string;
276
- description?: string;
277
- origin: "AI" | "UPLOAD";
278
- hypotheses: HypothesisSummaryResponse[];
279
- createdAt?: string;
280
- createdBy: string;
281
- };
282
- export type PageResponseDocumentWithHypothesesResponse = {
283
- totalElements: number;
284
- totalPages: number;
285
- first: boolean;
286
- last: boolean;
287
- size: number;
288
- content: DocumentWithHypothesesResponse[];
289
- "number": number;
290
- sort: SortResponse[];
291
- numberOfElements: number;
292
- pageable: PageableResponse;
293
- empty: boolean;
294
- };
295
- export type DocumentVersionResponse = {
296
- id: string;
297
- documentId: string;
298
- versionName: string;
299
- s3VersionId: string;
300
- createdAt?: string;
301
- createdBy?: string;
302
- };
303
- export type PageResponseDocumentVersionResponse = {
304
- totalElements: number;
305
- totalPages: number;
306
- first: boolean;
307
- last: boolean;
308
- size: number;
309
- content: DocumentVersionResponse[];
310
- "number": number;
311
- sort: SortResponse[];
312
- numberOfElements: number;
313
- pageable: PageableResponse;
314
- empty: boolean;
315
- };
316
- export type DocumentSummaryResponse = {
317
- id: string;
318
- name: string;
319
- description: string;
320
- origin: "AI" | "UPLOAD";
321
- hasMultipleHypotheses: boolean;
322
- createdAt?: string;
323
- createdBy: string;
324
- };
325
- export type PageResponseDocumentSummaryResponse = {
326
- totalElements: number;
327
- totalPages: number;
328
- first: boolean;
329
- last: boolean;
330
- size: number;
331
- content: DocumentSummaryResponse[];
332
- "number": number;
333
- sort: SortResponse[];
334
- numberOfElements: number;
335
- pageable: PageableResponse;
336
- empty: boolean;
337
- };
338
- export type ListOpportunityResponseOpportunityData = {
339
- id: string;
340
- "number": string;
341
- name: string;
342
- description: string;
343
- state: StateResponse;
344
- community: string;
345
- releaseTrain: string;
346
- squad: string;
347
- };
348
- export type ListOpportunityResponse = {
349
- data: ListOpportunityResponseOpportunityData[];
350
- };
351
- export type GetOpportunityResponseOpportunityData = {
352
- id: string;
353
- "number": string;
354
- name: string;
355
- description: string;
356
- state: StateResponse;
357
- community: string;
358
- releaseTrain: string;
359
- squad: string;
360
- agileProduct: string;
361
- businessPortfolio: string;
362
- technologicalFront: string;
363
- frontChallenge: string;
364
- towerClassification: string;
365
- agileSprint: string;
366
- priority: string;
367
- impediment: boolean;
368
- openedAt: string;
369
- openedBy: string;
370
- closedAt: string;
371
- assignedTo: string;
372
- };
373
- export type GetOpportunityResponse = {
374
- data: GetOpportunityResponseOpportunityData[];
375
- };
376
- export type ListStateResponseStateData = {
377
- value: string;
378
- description: string;
379
- };
380
- export type ListStateResponse = {
381
- data: ListStateResponseStateData[];
382
- };
383
- export declare function findHypothesisByNumber({ $number }: {
384
- $number: string;
385
- }, opts?: Oazapfts.RequestOpts): Promise<HypothesisResponse>;
386
- export declare function updateHypothesis({ $number, hypothesisUpdateRequest }: {
387
- $number: string;
388
- hypothesisUpdateRequest: HypothesisUpdateRequest;
389
- }, opts?: Oazapfts.RequestOpts): Promise<never>;
390
- export declare function getByNumber({ $number }: {
391
- $number: string;
392
- }, opts?: Oazapfts.RequestOpts): Promise<GetHypothesisResponse>;
393
- export declare function update({ $number, updateHypothesisRequest }: {
394
- $number: string;
395
- updateHypothesisRequest: UpdateHypothesisRequest;
396
- }, opts?: Oazapfts.RequestOpts): Promise<UpdateHypothesisResponse>;
397
- export declare function listHypothesis({ filter, page, size, sort, direction, status }: {
398
- filter?: string;
399
- page?: number;
400
- size?: number;
401
- sort?: string;
402
- direction?: string;
403
- status?: "TO_DO" | "PRIORITIZED" | "IN_EXPERIMENTATION" | "VALIDATED" | "DISCARDED" | "CANCELED";
404
- }, opts?: Oazapfts.RequestOpts): Promise<PageResponseHypothesisResponse>;
405
- export declare function createHypothesis({ createHypothesisRequest }: {
406
- createHypothesisRequest: CreateHypothesisRequest;
407
- }, opts?: Oazapfts.RequestOpts): Promise<HypothesisResponse>;
408
- export declare function upload({ hypothesisNumber, documentUploadRequest }: {
409
- hypothesisNumber: string;
410
- documentUploadRequest?: DocumentUploadRequest;
411
- }, opts?: Oazapfts.RequestOpts): Promise<DocumentUploadResponse>;
412
- export declare function attach({ hypothesisNumber, documentAttachRequest }: {
413
- hypothesisNumber: string;
414
- documentAttachRequest: DocumentAttachRequest;
415
- }, opts?: Oazapfts.RequestOpts): Promise<never>;
416
- /**
417
- * Save orchestrator credentials with file upload
418
- */
419
- export declare function saveOrchestratorCredentials({ body }: {
420
- body?: {
421
- clientId: string;
422
- clientSecret: string;
423
- certificateFile: Blob;
424
- privateKeyFile: Blob;
425
- };
426
- }, opts?: Oazapfts.RequestOpts): Promise<OrchestratorCredentialsResponse>;
427
- export declare function list({ page, size, squad }: {
428
- page?: number;
429
- size?: number;
430
- squad?: string;
431
- }, opts?: Oazapfts.RequestOpts): Promise<ListHypothesisResponse>;
432
- export declare function create({ createHypothesisRequest }: {
433
- createHypothesisRequest: CreateHypothesisRequest;
434
- }, opts?: Oazapfts.RequestOpts): Promise<CreateHypothesisResponse>;
435
- export declare function getById({ documentId, versionId }: {
436
- documentId: string;
437
- versionId?: string;
438
- }, opts?: Oazapfts.RequestOpts): Promise<DocumentDetailResponse>;
439
- export declare function update1({ documentId, documentPatchRequest }: {
440
- documentId: string;
441
- documentPatchRequest?: DocumentPatchRequest;
442
- }, opts?: Oazapfts.RequestOpts): Promise<never>;
443
- export declare function list1({ filter, page, size, sort, direction }: {
444
- filter?: string;
445
- page?: number;
446
- size?: number;
447
- sort?: string;
448
- direction?: string;
449
- }, opts?: Oazapfts.RequestOpts): Promise<PageResponseOpportunityResponse>;
450
- export declare function listAllDocumentsWithHypotheses({ filter, page, size, sort, direction }: {
451
- filter?: string;
452
- page?: number;
453
- size?: number;
454
- sort?: string;
455
- direction?: string;
456
- }, opts?: Oazapfts.RequestOpts): Promise<PageResponseDocumentWithHypothesesResponse>;
457
- export declare function listVersions({ documentId, page, size }: {
458
- documentId: string;
459
- page?: number;
460
- size?: number;
461
- }, opts?: Oazapfts.RequestOpts): Promise<PageResponseDocumentVersionResponse>;
462
- export declare function download({ documentId }: {
463
- documentId: string;
464
- }, opts?: Oazapfts.RequestOpts): Promise<Blob>;
465
- export declare function list2({ filter, page, size, sort, direction, hypothesisNumber }: {
466
- filter?: string;
467
- page?: number;
468
- size?: number;
469
- sort?: string;
470
- direction?: string;
471
- hypothesisNumber: string;
472
- }, opts?: Oazapfts.RequestOpts): Promise<PageResponseDocumentSummaryResponse>;
473
- export declare function getAll(opts?: Oazapfts.RequestOpts): Promise<DocumentTypeResponse[]>;
474
- export declare function getHypothesis({ $number }: {
475
- $number: string;
476
- }, opts?: Oazapfts.RequestOpts): Promise<object>;
477
- export declare function systemHealth(opts?: Oazapfts.RequestOpts): Promise<{
478
- [key: string]: object;
479
- }>;
480
- export declare function health(opts?: Oazapfts.RequestOpts): Promise<{
481
- [key: string]: string;
482
- }>;
483
- export declare function list3({ squad }: {
484
- squad?: string;
485
- }, opts?: Oazapfts.RequestOpts): Promise<ListOpportunityResponse>;
486
- export declare function getOpportunityByNumber({ $number }: {
487
- $number: string;
488
- }, opts?: Oazapfts.RequestOpts): Promise<GetOpportunityResponse>;
489
- export declare function listHypothesisStates(opts?: Oazapfts.RequestOpts): Promise<ListStateResponse>;
490
- export declare function deleteV1DocumentsByDocumentIdHypothesesAndHypothesisNumber({ hypothesisNumber, documentId }: {
491
- hypothesisNumber: string;
492
- documentId: string;
493
- }, opts?: Oazapfts.RequestOpts): Promise<never>;
494
- //# sourceMappingURL=discovery.d.ts.map