@stack-spot/portal-network 0.184.0 → 0.185.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.
Files changed (136) hide show
  1. package/CHANGELOG.md +2419 -2412
  2. package/dist/api/account.js +1 -1
  3. package/dist/api/agent-tools.js +1 -1
  4. package/dist/api/agent.js +1 -1
  5. package/dist/api/ai.js +1 -1
  6. package/dist/api/apiManagement.js +1 -1
  7. package/dist/api/apiRuntime.js +1 -1
  8. package/dist/api/cloudAccount.js +1 -1
  9. package/dist/api/cloudPlatform.js +1 -1
  10. package/dist/api/cloudPlatformHorizon.js +1 -1
  11. package/dist/api/cloudRuntimes.js +1 -1
  12. package/dist/api/cloudServices.js +1 -1
  13. package/dist/api/codeShift.d.ts +63 -4
  14. package/dist/api/codeShift.d.ts.map +1 -1
  15. package/dist/api/codeShift.js +14 -1
  16. package/dist/api/codeShift.js.map +1 -1
  17. package/dist/api/content.js +1 -1
  18. package/dist/api/dataIntegration.js +1 -1
  19. package/dist/api/discover.js +1 -1
  20. package/dist/api/genAiInference.js +1 -1
  21. package/dist/api/insights.js +1 -1
  22. package/dist/api/notification.js +1 -1
  23. package/dist/api/secrets.js +1 -1
  24. package/dist/api/serviceCatalog.js +1 -1
  25. package/dist/api/workspace-ai.js +1 -1
  26. package/dist/api/workspace.js +1 -1
  27. package/dist/api/workspaceManager.js +1 -1
  28. package/dist/api/workspaceSearchEngine.js +1 -1
  29. package/dist/client/code-shift.d.ts +22 -0
  30. package/dist/client/code-shift.d.ts.map +1 -1
  31. package/dist/client/code-shift.js +28 -1
  32. package/dist/client/code-shift.js.map +1 -1
  33. package/package.json +6 -6
  34. package/scripts/generate-apis.ts +134 -134
  35. package/src/api/account.ts +8367 -8367
  36. package/src/api/agent-tools.ts +2169 -2169
  37. package/src/api/agent.ts +1083 -1083
  38. package/src/api/ai.ts +3388 -3388
  39. package/src/api/apiManagement.ts +570 -570
  40. package/src/api/apiRuntime.ts +2103 -2103
  41. package/src/api/cloudAccount.ts +1239 -1239
  42. package/src/api/cloudPlatform.ts +927 -927
  43. package/src/api/cloudPlatformHorizon.ts +2655 -2655
  44. package/src/api/cloudRuntimes.ts +2043 -2043
  45. package/src/api/cloudServices.ts +1445 -1445
  46. package/src/api/codeShift.ts +3567 -3481
  47. package/src/api/content.ts +9785 -9785
  48. package/src/api/dataIntegration.ts +1657 -1657
  49. package/src/api/discover.ts +435 -435
  50. package/src/api/eventBus.ts +171 -171
  51. package/src/api/genAiInference.ts +603 -603
  52. package/src/api/insights.ts +310 -310
  53. package/src/api/notification.ts +334 -334
  54. package/src/api/secrets.ts +342 -342
  55. package/src/api/serviceCatalog.ts +2908 -2908
  56. package/src/api/workflows.ts +1669 -1669
  57. package/src/api/workspace-ai.ts +677 -677
  58. package/src/api/workspace.ts +5889 -5889
  59. package/src/api/workspaceManager.ts +2951 -2951
  60. package/src/api/workspaceSearchEngine.ts +153 -153
  61. package/src/api-addresses.ts +120 -120
  62. package/src/apis-itau.json +225 -225
  63. package/src/apis.json +225 -225
  64. package/src/client/account.ts +902 -902
  65. package/src/client/agent-tools.ts +210 -210
  66. package/src/client/agent.ts +81 -81
  67. package/src/client/ai.ts +395 -395
  68. package/src/client/api-management.ts +40 -40
  69. package/src/client/cloud-account.ts +70 -70
  70. package/src/client/cloud-platform-horizon.ts +113 -113
  71. package/src/client/cloud-platform.ts +163 -163
  72. package/src/client/cloud-runtimes.ts +129 -129
  73. package/src/client/cloud-services.ts +94 -94
  74. package/src/client/code-shift.ts +364 -349
  75. package/src/client/content.ts +538 -538
  76. package/src/client/data-integration.ts +191 -191
  77. package/src/client/discover.ts +89 -89
  78. package/src/client/event-bus.ts +84 -84
  79. package/src/client/gen-ai-inference.ts +65 -65
  80. package/src/client/insights.ts +28 -28
  81. package/src/client/notification.ts +32 -32
  82. package/src/client/runtime-manager.ts +76 -76
  83. package/src/client/secrets.ts +60 -60
  84. package/src/client/types.ts +377 -377
  85. package/src/client/workflow.ts +83 -83
  86. package/src/client/workspace-ai.ts +191 -191
  87. package/src/client/workspace-manager.ts +564 -564
  88. package/src/client/workspace-search.ts +39 -39
  89. package/src/client/workspace.ts +480 -480
  90. package/src/error/DefaultAPIError.ts +151 -151
  91. package/src/error/FileUploadError.ts +18 -18
  92. package/src/error/IgnoredErrorCodes.ts +3 -3
  93. package/src/error/StackspotAPIError.ts +101 -101
  94. package/src/error/StreamCanceledError.ts +10 -10
  95. package/src/error/StreamError.ts +7 -7
  96. package/src/error/StreamJsonError.ts +10 -10
  97. package/src/error/dictionary/account.ts +58 -58
  98. package/src/error/dictionary/action-details.ts +20 -20
  99. package/src/error/dictionary/action.ts +211 -211
  100. package/src/error/dictionary/agent-tools.ts +75 -75
  101. package/src/error/dictionary/ai-inference.ts +28 -28
  102. package/src/error/dictionary/base.ts +22 -22
  103. package/src/error/dictionary/cloud-platform.ts +82 -82
  104. package/src/error/dictionary/cnt-fields.ts +14 -14
  105. package/src/error/dictionary/cnt.ts +103 -103
  106. package/src/error/dictionary/code-shift.ts +12 -12
  107. package/src/error/dictionary/rte.ts +24 -24
  108. package/src/error/dictionary/rtm.ts +10 -10
  109. package/src/error/dictionary/secrets.ts +14 -14
  110. package/src/error/dictionary/workspace-ai.ts +10 -10
  111. package/src/error/dictionary/workspace-details.ts +15 -15
  112. package/src/error/dictionary/workspace-fields.ts +10 -10
  113. package/src/error/dictionary/workspace.ts +209 -209
  114. package/src/error/types.ts +21 -21
  115. package/src/index.ts +43 -43
  116. package/src/network/AutoInfiniteQuery.ts +115 -115
  117. package/src/network/AutoMutation.ts +27 -27
  118. package/src/network/AutoOperation.ts +73 -73
  119. package/src/network/AutoQuery.ts +75 -75
  120. package/src/network/ManualInfiniteQuery.ts +95 -95
  121. package/src/network/ManualMutation.ts +40 -40
  122. package/src/network/ManualOperation.ts +52 -52
  123. package/src/network/ManualQuery.ts +82 -82
  124. package/src/network/NetworkClient.ts +167 -167
  125. package/src/network/ReactQueryNetworkClient.ts +312 -312
  126. package/src/network/react-query-client.ts +14 -14
  127. package/src/network/types.ts +294 -294
  128. package/src/types.ts +1 -1
  129. package/src/utils/StreamedArray.tsx +146 -146
  130. package/src/utils/StreamedJson.tsx +166 -166
  131. package/src/utils/remove-authorization-param.ts +6 -6
  132. package/src/utils/string.ts +19 -19
  133. package/src/utils/use-extended-list.ts +80 -80
  134. package/src/utils/use-streamed-array.ts +17 -17
  135. package/tsconfig.build.json +4 -4
  136. package/tsconfig.json +10 -10
@@ -1,342 +1,342 @@
1
- /**
2
- * Workspace Secrets API
3
- * v1.0.0
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
- import * as QS from "@oazapfts/runtime/query";
9
- export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
- headers: {},
11
- baseUrl: "https://workspace-workspace-secrets-api.dev.stackspot.com",
12
- };
13
- const oazapfts = Oazapfts.runtime(defaults);
14
- export const servers = {
15
- generatedServerUrl: "https://workspace-workspace-secrets-api.dev.stackspot.com"
16
- };
17
- export type SecretValueResponse = {
18
- key: string;
19
- description: string;
20
- value: string;
21
- };
22
- export type ValidationDetails = {
23
- code: string;
24
- field?: string;
25
- details?: string;
26
- values?: string[];
27
- };
28
- export type ErrorResponse = {
29
- code: string;
30
- status: number;
31
- details: string;
32
- validationDetails?: ValidationDetails[];
33
- };
34
- export type UpdateSecretValueRequest = {
35
- value: string;
36
- };
37
- export type EditKeyRequest = {
38
- description: string;
39
- };
40
- export type SecretKeyResponse = {
41
- key: string;
42
- description: string;
43
- };
44
- export type CreateKeyRequest = {
45
- key: string;
46
- description: string;
47
- };
48
- export type EncryptRequest = {
49
- value: string;
50
- };
51
- export type EncryptResponse = {
52
- value: string;
53
- };
54
- export type DecryptRequest = {
55
- value: string;
56
- };
57
- export type DecryptResponse = {
58
- value: string;
59
- };
60
- export type SecretAvailabilityResponse = {
61
- definedKeys: string[];
62
- undefinedKeys: string[];
63
- };
64
- /**
65
- * Get a Secret Key value.
66
- */
67
- export function getSecretValue({ key, executionId }: {
68
- key: string;
69
- executionId?: string;
70
- }, opts?: Oazapfts.RequestOpts) {
71
- return oazapfts.ok(oazapfts.fetchJson<{
72
- status: 200;
73
- data: SecretValueResponse;
74
- } | {
75
- status: 400;
76
- data: ErrorResponse;
77
- } | {
78
- status: 403;
79
- data: ErrorResponse;
80
- } | {
81
- status: 422;
82
- data: ErrorResponse;
83
- } | {
84
- status: 500;
85
- data: ErrorResponse;
86
- }>(`/v1/secrets/values/${encodeURIComponent(key)}${QS.query(QS.explode({
87
- executionId
88
- }))}`, {
89
- ...opts
90
- }));
91
- }
92
- /**
93
- * Edit a Secret Key value.
94
- */
95
- export function updateSecretValue({ key, updateSecretValueRequest }: {
96
- key: string;
97
- updateSecretValueRequest: UpdateSecretValueRequest;
98
- }, opts?: Oazapfts.RequestOpts) {
99
- return oazapfts.ok(oazapfts.fetchJson<{
100
- status: 204;
101
- } | {
102
- status: 400;
103
- data: ErrorResponse;
104
- } | {
105
- status: 403;
106
- data: ErrorResponse;
107
- } | {
108
- status: 422;
109
- data: ErrorResponse;
110
- } | {
111
- status: 500;
112
- data: ErrorResponse;
113
- }>(`/v1/secrets/values/${encodeURIComponent(key)}`, oazapfts.json({
114
- ...opts,
115
- method: "PUT",
116
- body: updateSecretValueRequest
117
- })));
118
- }
119
- /**
120
- * Delete a Secret Key value.
121
- */
122
- export function deleteSecretValue({ key }: {
123
- key: string;
124
- }, opts?: Oazapfts.RequestOpts) {
125
- return oazapfts.ok(oazapfts.fetchJson<{
126
- status: 204;
127
- } | {
128
- status: 400;
129
- data: ErrorResponse;
130
- } | {
131
- status: 403;
132
- data: ErrorResponse;
133
- } | {
134
- status: 422;
135
- data: ErrorResponse;
136
- } | {
137
- status: 500;
138
- data: ErrorResponse;
139
- }>(`/v1/secrets/values/${encodeURIComponent(key)}`, {
140
- ...opts,
141
- method: "DELETE"
142
- }));
143
- }
144
- /**
145
- * Edit a Secret Key.
146
- */
147
- export function editKey({ key, editKeyRequest }: {
148
- key: string;
149
- editKeyRequest: EditKeyRequest;
150
- }, opts?: Oazapfts.RequestOpts) {
151
- return oazapfts.ok(oazapfts.fetchJson<{
152
- status: 200;
153
- } | {
154
- status: 400;
155
- data: ErrorResponse;
156
- } | {
157
- status: 403;
158
- data: ErrorResponse;
159
- } | {
160
- status: 422;
161
- data: ErrorResponse;
162
- } | {
163
- status: 500;
164
- data: ErrorResponse;
165
- }>(`/v1/secrets/keys/${encodeURIComponent(key)}`, oazapfts.json({
166
- ...opts,
167
- method: "PUT",
168
- body: editKeyRequest
169
- })));
170
- }
171
- /**
172
- * Delete a Secret Key.
173
- */
174
- export function deleteKey({ key }: {
175
- key: string;
176
- }, opts?: Oazapfts.RequestOpts) {
177
- return oazapfts.ok(oazapfts.fetchJson<{
178
- status: 204;
179
- } | {
180
- status: 400;
181
- data: ErrorResponse;
182
- } | {
183
- status: 403;
184
- data: ErrorResponse;
185
- } | {
186
- status: 422;
187
- data: ErrorResponse;
188
- } | {
189
- status: 500;
190
- data: ErrorResponse;
191
- }>(`/v1/secrets/keys/${encodeURIComponent(key)}`, {
192
- ...opts,
193
- method: "DELETE"
194
- }));
195
- }
196
- /**
197
- * List all Secret Keys.
198
- */
199
- export function getAll1(opts?: Oazapfts.RequestOpts) {
200
- return oazapfts.ok(oazapfts.fetchJson<{
201
- status: 200;
202
- data: SecretKeyResponse[];
203
- } | {
204
- status: 400;
205
- data: ErrorResponse;
206
- } | {
207
- status: 403;
208
- data: ErrorResponse;
209
- } | {
210
- status: 422;
211
- data: ErrorResponse;
212
- } | {
213
- status: 500;
214
- data: ErrorResponse;
215
- }>("/v1/secrets/keys", {
216
- ...opts
217
- }));
218
- }
219
- /**
220
- * Create a new Secret Key.
221
- */
222
- export function createKey({ createKeyRequest }: {
223
- createKeyRequest: CreateKeyRequest;
224
- }, opts?: Oazapfts.RequestOpts) {
225
- return oazapfts.ok(oazapfts.fetchJson<{
226
- status: 201;
227
- } | {
228
- status: 400;
229
- data: ErrorResponse;
230
- } | {
231
- status: 403;
232
- data: ErrorResponse;
233
- } | {
234
- status: 422;
235
- data: ErrorResponse;
236
- } | {
237
- status: 500;
238
- data: ErrorResponse;
239
- }>("/v1/secrets/keys", oazapfts.json({
240
- ...opts,
241
- method: "POST",
242
- body: createKeyRequest
243
- })));
244
- }
245
- /**
246
- * Encrypt a value.
247
- */
248
- export function encrypt({ encryptRequest }: {
249
- encryptRequest: EncryptRequest;
250
- }, opts?: Oazapfts.RequestOpts) {
251
- return oazapfts.ok(oazapfts.fetchJson<{
252
- status: 201;
253
- data: EncryptResponse;
254
- } | {
255
- status: 400;
256
- data: ErrorResponse;
257
- } | {
258
- status: 403;
259
- data: ErrorResponse;
260
- } | {
261
- status: 500;
262
- data: ErrorResponse;
263
- }>("/v1/secrets/encryption/encrypt", oazapfts.json({
264
- ...opts,
265
- method: "POST",
266
- body: encryptRequest
267
- })));
268
- }
269
- /**
270
- * Decrypt a value.
271
- */
272
- export function decrypt({ executionId, decryptRequest }: {
273
- executionId?: string;
274
- decryptRequest: DecryptRequest;
275
- }, opts?: Oazapfts.RequestOpts) {
276
- return oazapfts.ok(oazapfts.fetchJson<{
277
- status: 201;
278
- data: DecryptResponse;
279
- } | {
280
- status: 400;
281
- data: ErrorResponse;
282
- } | {
283
- status: 403;
284
- data: ErrorResponse;
285
- } | {
286
- status: 500;
287
- data: ErrorResponse;
288
- }>(`/v1/secrets/encryption/decrypt${QS.query(QS.explode({
289
- executionId
290
- }))}`, oazapfts.json({
291
- ...opts,
292
- method: "POST",
293
- body: decryptRequest
294
- })));
295
- }
296
- /**
297
- * List all configured Secret Keys values.
298
- */
299
- export function getAll({ executionId }: {
300
- executionId?: string;
301
- }, opts?: Oazapfts.RequestOpts) {
302
- return oazapfts.ok(oazapfts.fetchJson<{
303
- status: 200;
304
- data: SecretValueResponse[];
305
- } | {
306
- status: 400;
307
- data: ErrorResponse;
308
- } | {
309
- status: 403;
310
- data: ErrorResponse;
311
- } | {
312
- status: 422;
313
- data: ErrorResponse;
314
- } | {
315
- status: 500;
316
- data: ErrorResponse;
317
- }>(`/v1/secrets/values${QS.query(QS.explode({
318
- executionId
319
- }))}`, {
320
- ...opts
321
- }));
322
- }
323
- /**
324
- * List all defined and not defined secret keys by the user.
325
- */
326
- export function getAvailability(opts?: Oazapfts.RequestOpts) {
327
- return oazapfts.ok(oazapfts.fetchJson<{
328
- status: 200;
329
- data: SecretAvailabilityResponse;
330
- } | {
331
- status: 400;
332
- data: ErrorResponse;
333
- } | {
334
- status: 403;
335
- data: ErrorResponse;
336
- } | {
337
- status: 500;
338
- data: ErrorResponse;
339
- }>("/v1/secrets/availability", {
340
- ...opts
341
- }));
342
- }
1
+ /**
2
+ * Workspace Secrets API
3
+ * v1.0.0
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
+ import * as QS from "@oazapfts/runtime/query";
9
+ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
+ headers: {},
11
+ baseUrl: "https://workspace-workspace-secrets-api.dev.stackspot.com",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {
15
+ generatedServerUrl: "https://workspace-workspace-secrets-api.dev.stackspot.com"
16
+ };
17
+ export type SecretValueResponse = {
18
+ key: string;
19
+ description: string;
20
+ value: string;
21
+ };
22
+ export type ValidationDetails = {
23
+ code: string;
24
+ field?: string;
25
+ details?: string;
26
+ values?: string[];
27
+ };
28
+ export type ErrorResponse = {
29
+ code: string;
30
+ status: number;
31
+ details: string;
32
+ validationDetails?: ValidationDetails[];
33
+ };
34
+ export type UpdateSecretValueRequest = {
35
+ value: string;
36
+ };
37
+ export type EditKeyRequest = {
38
+ description: string;
39
+ };
40
+ export type SecretKeyResponse = {
41
+ key: string;
42
+ description: string;
43
+ };
44
+ export type CreateKeyRequest = {
45
+ key: string;
46
+ description: string;
47
+ };
48
+ export type EncryptRequest = {
49
+ value: string;
50
+ };
51
+ export type EncryptResponse = {
52
+ value: string;
53
+ };
54
+ export type DecryptRequest = {
55
+ value: string;
56
+ };
57
+ export type DecryptResponse = {
58
+ value: string;
59
+ };
60
+ export type SecretAvailabilityResponse = {
61
+ definedKeys: string[];
62
+ undefinedKeys: string[];
63
+ };
64
+ /**
65
+ * Get a Secret Key value.
66
+ */
67
+ export function getSecretValue({ key, executionId }: {
68
+ key: string;
69
+ executionId?: string;
70
+ }, opts?: Oazapfts.RequestOpts) {
71
+ return oazapfts.ok(oazapfts.fetchJson<{
72
+ status: 200;
73
+ data: SecretValueResponse;
74
+ } | {
75
+ status: 400;
76
+ data: ErrorResponse;
77
+ } | {
78
+ status: 403;
79
+ data: ErrorResponse;
80
+ } | {
81
+ status: 422;
82
+ data: ErrorResponse;
83
+ } | {
84
+ status: 500;
85
+ data: ErrorResponse;
86
+ }>(`/v1/secrets/values/${encodeURIComponent(key)}${QS.query(QS.explode({
87
+ executionId
88
+ }))}`, {
89
+ ...opts
90
+ }));
91
+ }
92
+ /**
93
+ * Edit a Secret Key value.
94
+ */
95
+ export function updateSecretValue({ key, updateSecretValueRequest }: {
96
+ key: string;
97
+ updateSecretValueRequest: UpdateSecretValueRequest;
98
+ }, opts?: Oazapfts.RequestOpts) {
99
+ return oazapfts.ok(oazapfts.fetchJson<{
100
+ status: 204;
101
+ } | {
102
+ status: 400;
103
+ data: ErrorResponse;
104
+ } | {
105
+ status: 403;
106
+ data: ErrorResponse;
107
+ } | {
108
+ status: 422;
109
+ data: ErrorResponse;
110
+ } | {
111
+ status: 500;
112
+ data: ErrorResponse;
113
+ }>(`/v1/secrets/values/${encodeURIComponent(key)}`, oazapfts.json({
114
+ ...opts,
115
+ method: "PUT",
116
+ body: updateSecretValueRequest
117
+ })));
118
+ }
119
+ /**
120
+ * Delete a Secret Key value.
121
+ */
122
+ export function deleteSecretValue({ key }: {
123
+ key: string;
124
+ }, opts?: Oazapfts.RequestOpts) {
125
+ return oazapfts.ok(oazapfts.fetchJson<{
126
+ status: 204;
127
+ } | {
128
+ status: 400;
129
+ data: ErrorResponse;
130
+ } | {
131
+ status: 403;
132
+ data: ErrorResponse;
133
+ } | {
134
+ status: 422;
135
+ data: ErrorResponse;
136
+ } | {
137
+ status: 500;
138
+ data: ErrorResponse;
139
+ }>(`/v1/secrets/values/${encodeURIComponent(key)}`, {
140
+ ...opts,
141
+ method: "DELETE"
142
+ }));
143
+ }
144
+ /**
145
+ * Edit a Secret Key.
146
+ */
147
+ export function editKey({ key, editKeyRequest }: {
148
+ key: string;
149
+ editKeyRequest: EditKeyRequest;
150
+ }, opts?: Oazapfts.RequestOpts) {
151
+ return oazapfts.ok(oazapfts.fetchJson<{
152
+ status: 200;
153
+ } | {
154
+ status: 400;
155
+ data: ErrorResponse;
156
+ } | {
157
+ status: 403;
158
+ data: ErrorResponse;
159
+ } | {
160
+ status: 422;
161
+ data: ErrorResponse;
162
+ } | {
163
+ status: 500;
164
+ data: ErrorResponse;
165
+ }>(`/v1/secrets/keys/${encodeURIComponent(key)}`, oazapfts.json({
166
+ ...opts,
167
+ method: "PUT",
168
+ body: editKeyRequest
169
+ })));
170
+ }
171
+ /**
172
+ * Delete a Secret Key.
173
+ */
174
+ export function deleteKey({ key }: {
175
+ key: string;
176
+ }, opts?: Oazapfts.RequestOpts) {
177
+ return oazapfts.ok(oazapfts.fetchJson<{
178
+ status: 204;
179
+ } | {
180
+ status: 400;
181
+ data: ErrorResponse;
182
+ } | {
183
+ status: 403;
184
+ data: ErrorResponse;
185
+ } | {
186
+ status: 422;
187
+ data: ErrorResponse;
188
+ } | {
189
+ status: 500;
190
+ data: ErrorResponse;
191
+ }>(`/v1/secrets/keys/${encodeURIComponent(key)}`, {
192
+ ...opts,
193
+ method: "DELETE"
194
+ }));
195
+ }
196
+ /**
197
+ * List all Secret Keys.
198
+ */
199
+ export function getAll1(opts?: Oazapfts.RequestOpts) {
200
+ return oazapfts.ok(oazapfts.fetchJson<{
201
+ status: 200;
202
+ data: SecretKeyResponse[];
203
+ } | {
204
+ status: 400;
205
+ data: ErrorResponse;
206
+ } | {
207
+ status: 403;
208
+ data: ErrorResponse;
209
+ } | {
210
+ status: 422;
211
+ data: ErrorResponse;
212
+ } | {
213
+ status: 500;
214
+ data: ErrorResponse;
215
+ }>("/v1/secrets/keys", {
216
+ ...opts
217
+ }));
218
+ }
219
+ /**
220
+ * Create a new Secret Key.
221
+ */
222
+ export function createKey({ createKeyRequest }: {
223
+ createKeyRequest: CreateKeyRequest;
224
+ }, opts?: Oazapfts.RequestOpts) {
225
+ return oazapfts.ok(oazapfts.fetchJson<{
226
+ status: 201;
227
+ } | {
228
+ status: 400;
229
+ data: ErrorResponse;
230
+ } | {
231
+ status: 403;
232
+ data: ErrorResponse;
233
+ } | {
234
+ status: 422;
235
+ data: ErrorResponse;
236
+ } | {
237
+ status: 500;
238
+ data: ErrorResponse;
239
+ }>("/v1/secrets/keys", oazapfts.json({
240
+ ...opts,
241
+ method: "POST",
242
+ body: createKeyRequest
243
+ })));
244
+ }
245
+ /**
246
+ * Encrypt a value.
247
+ */
248
+ export function encrypt({ encryptRequest }: {
249
+ encryptRequest: EncryptRequest;
250
+ }, opts?: Oazapfts.RequestOpts) {
251
+ return oazapfts.ok(oazapfts.fetchJson<{
252
+ status: 201;
253
+ data: EncryptResponse;
254
+ } | {
255
+ status: 400;
256
+ data: ErrorResponse;
257
+ } | {
258
+ status: 403;
259
+ data: ErrorResponse;
260
+ } | {
261
+ status: 500;
262
+ data: ErrorResponse;
263
+ }>("/v1/secrets/encryption/encrypt", oazapfts.json({
264
+ ...opts,
265
+ method: "POST",
266
+ body: encryptRequest
267
+ })));
268
+ }
269
+ /**
270
+ * Decrypt a value.
271
+ */
272
+ export function decrypt({ executionId, decryptRequest }: {
273
+ executionId?: string;
274
+ decryptRequest: DecryptRequest;
275
+ }, opts?: Oazapfts.RequestOpts) {
276
+ return oazapfts.ok(oazapfts.fetchJson<{
277
+ status: 201;
278
+ data: DecryptResponse;
279
+ } | {
280
+ status: 400;
281
+ data: ErrorResponse;
282
+ } | {
283
+ status: 403;
284
+ data: ErrorResponse;
285
+ } | {
286
+ status: 500;
287
+ data: ErrorResponse;
288
+ }>(`/v1/secrets/encryption/decrypt${QS.query(QS.explode({
289
+ executionId
290
+ }))}`, oazapfts.json({
291
+ ...opts,
292
+ method: "POST",
293
+ body: decryptRequest
294
+ })));
295
+ }
296
+ /**
297
+ * List all configured Secret Keys values.
298
+ */
299
+ export function getAll({ executionId }: {
300
+ executionId?: string;
301
+ }, opts?: Oazapfts.RequestOpts) {
302
+ return oazapfts.ok(oazapfts.fetchJson<{
303
+ status: 200;
304
+ data: SecretValueResponse[];
305
+ } | {
306
+ status: 400;
307
+ data: ErrorResponse;
308
+ } | {
309
+ status: 403;
310
+ data: ErrorResponse;
311
+ } | {
312
+ status: 422;
313
+ data: ErrorResponse;
314
+ } | {
315
+ status: 500;
316
+ data: ErrorResponse;
317
+ }>(`/v1/secrets/values${QS.query(QS.explode({
318
+ executionId
319
+ }))}`, {
320
+ ...opts
321
+ }));
322
+ }
323
+ /**
324
+ * List all defined and not defined secret keys by the user.
325
+ */
326
+ export function getAvailability(opts?: Oazapfts.RequestOpts) {
327
+ return oazapfts.ok(oazapfts.fetchJson<{
328
+ status: 200;
329
+ data: SecretAvailabilityResponse;
330
+ } | {
331
+ status: 400;
332
+ data: ErrorResponse;
333
+ } | {
334
+ status: 403;
335
+ data: ErrorResponse;
336
+ } | {
337
+ status: 500;
338
+ data: ErrorResponse;
339
+ }>("/v1/secrets/availability", {
340
+ ...opts
341
+ }));
342
+ }