@stack-spot/portal-network 0.1.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 (186) hide show
  1. package/.generate-api.failed.json +1 -0
  2. package/dist/api/account.d.ts +2368 -0
  3. package/dist/api/account.d.ts.map +1 -0
  4. package/dist/api/account.js +1521 -0
  5. package/dist/api/account.js.map +1 -0
  6. package/dist/api/ai.d.ts +1432 -0
  7. package/dist/api/ai.d.ts.map +1 -0
  8. package/dist/api/ai.js +1342 -0
  9. package/dist/api/ai.js.map +1 -0
  10. package/dist/api/apiRuntime.d.ts +922 -0
  11. package/dist/api/apiRuntime.d.ts.map +1 -0
  12. package/dist/api/apiRuntime.js +599 -0
  13. package/dist/api/apiRuntime.js.map +1 -0
  14. package/dist/api/cloudAccount.d.ts +473 -0
  15. package/dist/api/cloudAccount.d.ts.map +1 -0
  16. package/dist/api/cloudAccount.js +300 -0
  17. package/dist/api/cloudAccount.js.map +1 -0
  18. package/dist/api/cloudServices.d.ts +1233 -0
  19. package/dist/api/cloudServices.d.ts.map +1 -0
  20. package/dist/api/cloudServices.js +715 -0
  21. package/dist/api/cloudServices.js.map +1 -0
  22. package/dist/api/insights.d.ts +123 -0
  23. package/dist/api/insights.d.ts.map +1 -0
  24. package/dist/api/insights.js +112 -0
  25. package/dist/api/insights.js.map +1 -0
  26. package/dist/api/plugin.d.ts +368 -0
  27. package/dist/api/plugin.d.ts.map +1 -0
  28. package/dist/api/plugin.js +218 -0
  29. package/dist/api/plugin.js.map +1 -0
  30. package/dist/api/serviceCatalog.d.ts +737 -0
  31. package/dist/api/serviceCatalog.d.ts.map +1 -0
  32. package/dist/api/serviceCatalog.js +611 -0
  33. package/dist/api/serviceCatalog.js.map +1 -0
  34. package/dist/api/workflows.d.ts +366 -0
  35. package/dist/api/workflows.d.ts.map +1 -0
  36. package/dist/api/workflows.js +175 -0
  37. package/dist/api/workflows.js.map +1 -0
  38. package/dist/api/workspace.js +1476 -0
  39. package/dist/api/workspace.js.map +1 -0
  40. package/dist/api/workspaceManager.d.ts +1121 -0
  41. package/dist/api/workspaceManager.d.ts.map +1 -0
  42. package/dist/api/workspaceManager.js +357 -0
  43. package/dist/api/workspaceManager.js.map +1 -0
  44. package/dist/api/workspaceSearchEngine.d.ts +93 -0
  45. package/dist/api/workspaceSearchEngine.d.ts.map +1 -0
  46. package/dist/api/workspaceSearchEngine.js +55 -0
  47. package/dist/api/workspaceSearchEngine.js.map +1 -0
  48. package/dist/apis.json +129 -0
  49. package/dist/client/account.d.ts +46 -0
  50. package/dist/client/account.d.ts.map +1 -0
  51. package/dist/client/account.js +104 -0
  52. package/dist/client/account.js.map +1 -0
  53. package/dist/error/CanceledError.d.ts +5 -0
  54. package/dist/error/CanceledError.d.ts.map +1 -0
  55. package/dist/error/CanceledError.js +7 -0
  56. package/dist/error/CanceledError.js.map +1 -0
  57. package/dist/error/DefaultAPIError.d.ts +9 -0
  58. package/dist/error/DefaultAPIError.d.ts.map +1 -0
  59. package/dist/error/DefaultAPIError.js +58 -0
  60. package/dist/error/DefaultAPIError.js.map +1 -0
  61. package/dist/error/StackspotAPIError.d.ts +19 -0
  62. package/dist/error/StackspotAPIError.d.ts.map +1 -0
  63. package/dist/error/StackspotAPIError.js +39 -0
  64. package/dist/error/StackspotAPIError.js.map +1 -0
  65. package/dist/error/dictionary/account.d.ts +55 -0
  66. package/dist/error/dictionary/account.d.ts.map +1 -0
  67. package/dist/error/dictionary/account.js +55 -0
  68. package/dist/error/dictionary/account.js.map +1 -0
  69. package/dist/error/dictionary/action.d.ts +163 -0
  70. package/dist/error/dictionary/action.d.ts.map +1 -0
  71. package/dist/error/dictionary/action.js +163 -0
  72. package/dist/error/dictionary/action.js.map +1 -0
  73. package/dist/error/dictionary/base.d.ts +21 -0
  74. package/dist/error/dictionary/base.d.ts.map +1 -0
  75. package/dist/error/dictionary/base.js +21 -0
  76. package/dist/error/dictionary/base.js.map +1 -0
  77. package/dist/error/dictionary/cnt-fields.d.ts +13 -0
  78. package/dist/error/dictionary/cnt-fields.d.ts.map +1 -0
  79. package/dist/error/dictionary/cnt-fields.js +13 -0
  80. package/dist/error/dictionary/cnt-fields.js.map +1 -0
  81. package/dist/error/dictionary/cnt.d.ts +79 -0
  82. package/dist/error/dictionary/cnt.d.ts.map +1 -0
  83. package/dist/error/dictionary/cnt.js +79 -0
  84. package/dist/error/dictionary/cnt.js.map +1 -0
  85. package/dist/error/dictionary/rte.d.ts +23 -0
  86. package/dist/error/dictionary/rte.d.ts.map +1 -0
  87. package/dist/error/dictionary/rte.js +23 -0
  88. package/dist/error/dictionary/rte.js.map +1 -0
  89. package/dist/error/dictionary/rtm.d.ts +9 -0
  90. package/dist/error/dictionary/rtm.d.ts.map +1 -0
  91. package/dist/error/dictionary/rtm.js +9 -0
  92. package/dist/error/dictionary/rtm.js.map +1 -0
  93. package/dist/error/dictionary/workspace-fields.d.ts +9 -0
  94. package/dist/error/dictionary/workspace-fields.d.ts.map +1 -0
  95. package/dist/error/dictionary/workspace-fields.js +9 -0
  96. package/dist/error/dictionary/workspace-fields.js.map +1 -0
  97. package/dist/error/dictionary/workspace.d.ts +99 -0
  98. package/dist/error/dictionary/workspace.d.ts.map +1 -0
  99. package/dist/error/dictionary/workspace.js +99 -0
  100. package/dist/error/dictionary/workspace.js.map +1 -0
  101. package/dist/index.d.ts +6 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +6 -0
  104. package/dist/index.js.map +1 -0
  105. package/dist/network/AutoMutation.d.ts +10 -0
  106. package/dist/network/AutoMutation.d.ts.map +1 -0
  107. package/dist/network/AutoMutation.js +20 -0
  108. package/dist/network/AutoMutation.js.map +1 -0
  109. package/dist/network/AutoOperation.d.ts +19 -0
  110. package/dist/network/AutoOperation.d.ts.map +1 -0
  111. package/dist/network/AutoOperation.js +99 -0
  112. package/dist/network/AutoOperation.js.map +1 -0
  113. package/dist/network/AutoQuery.d.ts +19 -0
  114. package/dist/network/AutoQuery.d.ts.map +1 -0
  115. package/dist/network/AutoQuery.js +70 -0
  116. package/dist/network/AutoQuery.js.map +1 -0
  117. package/dist/network/ManualMutation.d.ts +11 -0
  118. package/dist/network/ManualMutation.d.ts.map +1 -0
  119. package/dist/network/ManualMutation.js +32 -0
  120. package/dist/network/ManualMutation.js.map +1 -0
  121. package/dist/network/ManualOperation.d.ts +13 -0
  122. package/dist/network/ManualOperation.d.ts.map +1 -0
  123. package/dist/network/ManualOperation.js +53 -0
  124. package/dist/network/ManualOperation.js.map +1 -0
  125. package/dist/network/ManualQuery.d.ts +20 -0
  126. package/dist/network/ManualQuery.d.ts.map +1 -0
  127. package/dist/network/ManualQuery.js +77 -0
  128. package/dist/network/ManualQuery.js.map +1 -0
  129. package/dist/network/NetworkClient.d.ts +20 -0
  130. package/dist/network/NetworkClient.d.ts.map +1 -0
  131. package/dist/network/NetworkClient.js +85 -0
  132. package/dist/network/NetworkClient.js.map +1 -0
  133. package/dist/network/ReactQueryNetworkClient.d.ts +16 -0
  134. package/dist/network/ReactQueryNetworkClient.d.ts.map +1 -0
  135. package/dist/network/ReactQueryNetworkClient.js +125 -0
  136. package/dist/network/ReactQueryNetworkClient.js.map +1 -0
  137. package/dist/network/react-query-client.d.ts +3 -0
  138. package/dist/network/react-query-client.d.ts.map +1 -0
  139. package/dist/network/react-query-client.js +3 -0
  140. package/dist/network/react-query-client.js.map +1 -0
  141. package/dist/network/types.d.ts +55 -0
  142. package/dist/network/types.d.ts.map +1 -0
  143. package/dist/network/types.js +2 -0
  144. package/dist/network/types.js.map +1 -0
  145. package/package.json +56 -0
  146. package/readme.md +1 -0
  147. package/scripts/generate-apis.ts +134 -0
  148. package/src/api/account.ts +4793 -0
  149. package/src/api/ai.ts +3121 -0
  150. package/src/api/apiRuntime.ts +2029 -0
  151. package/src/api/cloudAccount.ts +1133 -0
  152. package/src/api/cloudServices.ts +2872 -0
  153. package/src/api/insights.ts +264 -0
  154. package/src/api/plugin.ts +685 -0
  155. package/src/api/serviceCatalog.ts +2908 -0
  156. package/src/api/workflows.ts +709 -0
  157. package/src/api/workspace.ts +5178 -0
  158. package/src/api/workspaceManager.ts +1516 -0
  159. package/src/api/workspaceSearchEngine.ts +153 -0
  160. package/src/apis.json +129 -0
  161. package/src/client/account.ts +52 -0
  162. package/src/error/CanceledError.ts +7 -0
  163. package/src/error/DefaultAPIError.ts +51 -0
  164. package/src/error/StackspotAPIError.ts +31 -0
  165. package/src/error/dictionary/account.ts +56 -0
  166. package/src/error/dictionary/action.ts +206 -0
  167. package/src/error/dictionary/base.ts +22 -0
  168. package/src/error/dictionary/cnt-fields.ts +14 -0
  169. package/src/error/dictionary/cnt.ts +80 -0
  170. package/src/error/dictionary/rte.ts +24 -0
  171. package/src/error/dictionary/rtm.ts +10 -0
  172. package/src/error/dictionary/workspace-fields.ts +10 -0
  173. package/src/error/dictionary/workspace.ts +100 -0
  174. package/src/index.ts +5 -0
  175. package/src/network/AutoMutation.ts +25 -0
  176. package/src/network/AutoOperation.ts +88 -0
  177. package/src/network/AutoQuery.ts +80 -0
  178. package/src/network/ManualMutation.ts +41 -0
  179. package/src/network/ManualOperation.ts +55 -0
  180. package/src/network/ManualQuery.ts +93 -0
  181. package/src/network/NetworkClient.ts +93 -0
  182. package/src/network/ReactQueryNetworkClient.ts +154 -0
  183. package/src/network/react-query-client.ts +3 -0
  184. package/src/network/types.ts +82 -0
  185. package/tsconfig.build.json +4 -0
  186. package/tsconfig.json +10 -0
@@ -0,0 +1,2908 @@
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
+ import * as QS from "@oazapfts/runtime/query";
9
+ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
+ headers: {},
11
+ baseUrl: "https://catalog-tech-products-catalog-api.dev.stackspot.com",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {
15
+ generatedServerUrl: "https://catalog-tech-products-catalog-api.dev.stackspot.com"
16
+ };
17
+ export type ProductResponse = {
18
+ id: string;
19
+ accountId?: string;
20
+ name: string;
21
+ description: string;
22
+ updatedAt: string;
23
+ createdAt: string;
24
+ workspaceId: string;
25
+ status: string;
26
+ imageUrl?: string;
27
+ };
28
+ export type StatusType = number;
29
+ export type ProductRequest = {
30
+ name?: string;
31
+ description?: string;
32
+ imageBase64?: string;
33
+ };
34
+ export type ClientApplicationResponse = {
35
+ id?: string;
36
+ name?: string;
37
+ displayName?: string;
38
+ description?: string;
39
+ };
40
+ export type ClientApplicationRequest = {
41
+ name: string;
42
+ displayName: string;
43
+ description: string;
44
+ };
45
+ export type ProductWithApiAndEnvironmentRequest = {
46
+ name: string;
47
+ description: string;
48
+ environments?: string[];
49
+ apis?: string[];
50
+ imageBase64?: string;
51
+ };
52
+ export type CatalogApiByEnvResponse = {
53
+ updatedAt: string;
54
+ createdAt: string;
55
+ environmentId: string;
56
+ status: string;
57
+ version: string;
58
+ gatewayUrl?: string;
59
+ hasOpenApiContent: boolean;
60
+ };
61
+ export type CatalogApiResponse = {
62
+ id: string;
63
+ name: string;
64
+ description: string;
65
+ workspaceId: string;
66
+ connectionInterfaceSlug?: string;
67
+ byEnvironment: CatalogApiByEnvResponse[];
68
+ };
69
+ export type CatalogApiDefinitionRequest = {
70
+ environmentId: string;
71
+ gatewayUrl: string;
72
+ openApiContent: string;
73
+ };
74
+ export type CatalogApiRequest = {
75
+ name: string;
76
+ description: string;
77
+ connectionInterfaceSlug?: string;
78
+ definitions?: CatalogApiDefinitionRequest[];
79
+ };
80
+ export type CatalogApiDefinitionResponse = {
81
+ apiId: string;
82
+ updatedAt: string;
83
+ createdAt: string;
84
+ environmentId: string;
85
+ status: string;
86
+ version: string;
87
+ basicInfo?: CatalogApiResponse;
88
+ };
89
+ export type AccessRequestRequest = {
90
+ status: "GRANTED" | "DENIED";
91
+ oauthClientId?: string;
92
+ };
93
+ export type AccessRequestRequestWrite = {
94
+ status: "GRANTED" | "DENIED";
95
+ oAuthClientId?: string;
96
+ oauthClientId?: string;
97
+ };
98
+ export type AccessRequestBatchRequest = {
99
+ status: "GRANTED" | "DENIED";
100
+ accessRequests: string[];
101
+ oauthClientId?: string;
102
+ };
103
+ export type AccessRequestBatchRequestWrite = {
104
+ status: "GRANTED" | "DENIED";
105
+ oAuthClientId?: string;
106
+ accessRequests: string[];
107
+ oauthClientId?: string;
108
+ };
109
+ export type CatalogApiDetailsDto = {
110
+ id: string;
111
+ updatedAt: string;
112
+ createdAt: string;
113
+ environmentId: string;
114
+ status: string;
115
+ version: string;
116
+ name: string;
117
+ description: string;
118
+ workspaceId: string;
119
+ connectionInterfaceSlug?: string;
120
+ };
121
+ export type EndpointParameterResponse = {
122
+ name: string;
123
+ "type"?: string;
124
+ description?: string;
125
+ required?: boolean;
126
+ "in"?: string;
127
+ format?: string;
128
+ };
129
+ export type BodySchema = {
130
+ name?: string;
131
+ "type"?: string;
132
+ description?: string;
133
+ format?: string;
134
+ };
135
+ export type EndpointResponseResponse = {
136
+ code?: string;
137
+ description?: string;
138
+ responseExample?: {
139
+ [key: string]: object;
140
+ };
141
+ schema?: BodySchema[];
142
+ };
143
+ export type CatalogApiMethodResponse = {
144
+ "type": string;
145
+ endpointName: string;
146
+ endpointUrl: string;
147
+ name: string;
148
+ description: string;
149
+ endpointParameters: EndpointParameterResponse[];
150
+ curlExample: string;
151
+ bodyExample?: object;
152
+ responses: EndpointResponseResponse[];
153
+ produces?: string[];
154
+ consumes?: string[];
155
+ };
156
+ export type CatalogApiMethodsResponse = CatalogApiMethodResponse[];
157
+ export type SimpleProductResponse = {
158
+ id: string;
159
+ accountId?: string;
160
+ name: string;
161
+ description: string;
162
+ workspaceId: string;
163
+ status: string;
164
+ imageUrl?: string;
165
+ environments: string[];
166
+ };
167
+ export type CatalogApiDetailsResponse = {
168
+ id: string;
169
+ updatedAt: string;
170
+ createdAt: string;
171
+ environmentId: string;
172
+ status: string;
173
+ version: string;
174
+ name: string;
175
+ description: string;
176
+ workspaceId: string;
177
+ };
178
+ export type SimpleApiResponse = {
179
+ id: string;
180
+ name: string;
181
+ description: string;
182
+ workspaceId: string;
183
+ accountId?: string;
184
+ environments: string[];
185
+ };
186
+ export type CatalogApiAccessRequestResponse = {
187
+ id: string;
188
+ environmentId: string;
189
+ authType: string;
190
+ status: string;
191
+ updatedAt: string;
192
+ createdAt: string;
193
+ grantedAt?: string;
194
+ grantedBy?: string;
195
+ updatedBy?: string;
196
+ clientApplication: {
197
+ [key: string]: object;
198
+ };
199
+ api: {
200
+ [key: string]: object;
201
+ };
202
+ oauthClientId: string;
203
+ };
204
+ export type CatalogApiAccessRequestResponseWrite = {
205
+ id: string;
206
+ environmentId: string;
207
+ oAuthClientId?: string;
208
+ authType: string;
209
+ status: string;
210
+ updatedAt: string;
211
+ createdAt: string;
212
+ grantedAt?: string;
213
+ grantedBy?: string;
214
+ updatedBy?: string;
215
+ clientApplication: {
216
+ [key: string]: object;
217
+ };
218
+ api: {
219
+ [key: string]: object;
220
+ };
221
+ oauthClientId: string;
222
+ };
223
+ export type PartnerProductResponse = {
224
+ id: string;
225
+ accountId?: string;
226
+ name: string;
227
+ description: string;
228
+ workspaceId: string;
229
+ status?: string;
230
+ imageUrl?: string;
231
+ environments: string[];
232
+ };
233
+ export type PartnerApiResponse = {
234
+ id: string;
235
+ accountId?: string;
236
+ name: string;
237
+ description: string;
238
+ workspaceId: string;
239
+ environments: string[];
240
+ };
241
+ export type ClientApplicationWithStatusResponse = {
242
+ id?: string;
243
+ name?: string;
244
+ displayName?: string;
245
+ description?: string;
246
+ lastAccessRequestStatus?: "DENIED" | "GRANTED" | "REQUESTED";
247
+ };
248
+ export type ClientApplicationWithGrantedAccessResponse = {
249
+ id?: string;
250
+ name?: string;
251
+ displayName?: string;
252
+ description?: string;
253
+ clientId: string;
254
+ };
255
+ export type EnvironmentResponse = {
256
+ id: string;
257
+ name: string;
258
+ };
259
+ export type HealthzResponse = {
260
+ status: "UP" | "DOWN";
261
+ groups: ("liveness" | "readiness")[];
262
+ };
263
+ /**
264
+ * Get one product by product_id
265
+ */
266
+ export function getOne({ workspaceId, productId }: {
267
+ workspaceId: string;
268
+ productId: string;
269
+ }, opts?: Oazapfts.RequestOpts) {
270
+ return oazapfts.ok(oazapfts.fetchJson<{
271
+ status: 200;
272
+ data: ProductResponse;
273
+ } | {
274
+ status: 422;
275
+ data: {
276
+ title?: string;
277
+ detail?: string;
278
+ status?: StatusType;
279
+ instance?: string;
280
+ "type"?: string;
281
+ parameters?: {
282
+ [key: string]: object;
283
+ };
284
+ };
285
+ } | {
286
+ status: 500;
287
+ data: {
288
+ title?: string;
289
+ detail?: string;
290
+ status?: StatusType;
291
+ instance?: string;
292
+ "type"?: string;
293
+ parameters?: {
294
+ [key: string]: object;
295
+ };
296
+ };
297
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/products/${encodeURIComponent(productId)}`, {
298
+ ...opts
299
+ }));
300
+ }
301
+ /**
302
+ * Update product's name and/or description
303
+ */
304
+ export function updateProduct({ workspaceId, productId, productRequest }: {
305
+ workspaceId: string;
306
+ productId: string;
307
+ productRequest: ProductRequest;
308
+ }, opts?: Oazapfts.RequestOpts) {
309
+ return oazapfts.ok(oazapfts.fetchJson<{
310
+ status: 200;
311
+ data: ProductResponse;
312
+ } | {
313
+ status: 422;
314
+ data: {
315
+ title?: string;
316
+ detail?: string;
317
+ status?: StatusType;
318
+ instance?: string;
319
+ "type"?: string;
320
+ parameters?: {
321
+ [key: string]: object;
322
+ };
323
+ };
324
+ } | {
325
+ status: 500;
326
+ data: {
327
+ title?: string;
328
+ detail?: string;
329
+ status?: StatusType;
330
+ instance?: string;
331
+ "type"?: string;
332
+ parameters?: {
333
+ [key: string]: object;
334
+ };
335
+ };
336
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/products/${encodeURIComponent(productId)}`, oazapfts.json({
337
+ ...opts,
338
+ method: "PUT",
339
+ body: productRequest
340
+ })));
341
+ }
342
+ /**
343
+ * Get one product by product_id
344
+ */
345
+ export function deleteProduct({ workspaceId, productId }: {
346
+ workspaceId: string;
347
+ productId: string;
348
+ }, opts?: Oazapfts.RequestOpts) {
349
+ return oazapfts.ok(oazapfts.fetchJson<{
350
+ status: 200;
351
+ } | {
352
+ status: 422;
353
+ data: {
354
+ title?: string;
355
+ detail?: string;
356
+ status?: StatusType;
357
+ instance?: string;
358
+ "type"?: string;
359
+ parameters?: {
360
+ [key: string]: object;
361
+ };
362
+ };
363
+ } | {
364
+ status: 500;
365
+ data: {
366
+ title?: string;
367
+ detail?: string;
368
+ status?: StatusType;
369
+ instance?: string;
370
+ "type"?: string;
371
+ parameters?: {
372
+ [key: string]: object;
373
+ };
374
+ };
375
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/products/${encodeURIComponent(productId)}`, {
376
+ ...opts,
377
+ method: "DELETE"
378
+ }));
379
+ }
380
+ /**
381
+ * Change product status
382
+ */
383
+ export function changeProductStatus({ workspaceId, productId, action }: {
384
+ workspaceId: string;
385
+ productId: string;
386
+ action: "publish" | "unpublish";
387
+ }, opts?: Oazapfts.RequestOpts) {
388
+ return oazapfts.ok(oazapfts.fetchJson<{
389
+ status: 200;
390
+ data: boolean;
391
+ } | {
392
+ status: 422;
393
+ data: {
394
+ title?: string;
395
+ detail?: string;
396
+ status?: StatusType;
397
+ instance?: string;
398
+ "type"?: string;
399
+ parameters?: {
400
+ [key: string]: object;
401
+ };
402
+ };
403
+ } | {
404
+ status: 500;
405
+ data: {
406
+ title?: string;
407
+ detail?: string;
408
+ status?: StatusType;
409
+ instance?: string;
410
+ "type"?: string;
411
+ parameters?: {
412
+ [key: string]: object;
413
+ };
414
+ };
415
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/products/${encodeURIComponent(productId)}${QS.query(QS.explode({
416
+ action
417
+ }))}`, {
418
+ ...opts,
419
+ method: "PATCH"
420
+ }));
421
+ }
422
+ /**
423
+ * Get Client Application by ID
424
+ */
425
+ export function getOneClientApplication({ clientApplicationId }: {
426
+ clientApplicationId: string;
427
+ }, opts?: Oazapfts.RequestOpts) {
428
+ return oazapfts.ok(oazapfts.fetchJson<{
429
+ status: 200;
430
+ data: ClientApplicationResponse;
431
+ } | {
432
+ status: 422;
433
+ data: {
434
+ title?: string;
435
+ detail?: string;
436
+ status?: StatusType;
437
+ instance?: string;
438
+ "type"?: string;
439
+ parameters?: {
440
+ [key: string]: object;
441
+ };
442
+ };
443
+ } | {
444
+ status: 500;
445
+ data: {
446
+ title?: string;
447
+ detail?: string;
448
+ status?: StatusType;
449
+ instance?: string;
450
+ "type"?: string;
451
+ parameters?: {
452
+ [key: string]: object;
453
+ };
454
+ };
455
+ }>(`/v1/partner/client-applications/${encodeURIComponent(clientApplicationId)}`, {
456
+ ...opts
457
+ }));
458
+ }
459
+ /**
460
+ * Update a Client Application
461
+ */
462
+ export function updateClientApplication({ clientApplicationId, clientApplicationRequest }: {
463
+ clientApplicationId: string;
464
+ clientApplicationRequest: ClientApplicationRequest;
465
+ }, opts?: Oazapfts.RequestOpts) {
466
+ return oazapfts.ok(oazapfts.fetchJson<{
467
+ status: 200;
468
+ data: string;
469
+ } | {
470
+ status: 422;
471
+ data: {
472
+ title?: string;
473
+ detail?: string;
474
+ status?: StatusType;
475
+ instance?: string;
476
+ "type"?: string;
477
+ parameters?: {
478
+ [key: string]: object;
479
+ };
480
+ };
481
+ } | {
482
+ status: 500;
483
+ data: {
484
+ title?: string;
485
+ detail?: string;
486
+ status?: StatusType;
487
+ instance?: string;
488
+ "type"?: string;
489
+ parameters?: {
490
+ [key: string]: object;
491
+ };
492
+ };
493
+ }>(`/v1/partner/client-applications/${encodeURIComponent(clientApplicationId)}`, oazapfts.json({
494
+ ...opts,
495
+ method: "PUT",
496
+ body: clientApplicationRequest
497
+ })));
498
+ }
499
+ /**
500
+ * Delete a Client Application by ID
501
+ */
502
+ export function deleteClientApplication({ clientApplicationId }: {
503
+ clientApplicationId: string;
504
+ }, opts?: Oazapfts.RequestOpts) {
505
+ return oazapfts.ok(oazapfts.fetchJson<{
506
+ status: 200;
507
+ } | {
508
+ status: 422;
509
+ data: {
510
+ title?: string;
511
+ detail?: string;
512
+ status?: StatusType;
513
+ instance?: string;
514
+ "type"?: string;
515
+ parameters?: {
516
+ [key: string]: object;
517
+ };
518
+ };
519
+ } | {
520
+ status: 500;
521
+ data: {
522
+ title?: string;
523
+ detail?: string;
524
+ status?: StatusType;
525
+ instance?: string;
526
+ "type"?: string;
527
+ parameters?: {
528
+ [key: string]: object;
529
+ };
530
+ };
531
+ }>(`/v1/partner/client-applications/${encodeURIComponent(clientApplicationId)}`, {
532
+ ...opts,
533
+ method: "DELETE"
534
+ }));
535
+ }
536
+ /**
537
+ * Get all products by workspace Id
538
+ */
539
+ export function getAll({ workspaceId }: {
540
+ workspaceId: string;
541
+ }, opts?: Oazapfts.RequestOpts) {
542
+ return oazapfts.ok(oazapfts.fetchJson<{
543
+ status: 200;
544
+ data: ProductResponse[];
545
+ } | {
546
+ status: 422;
547
+ data: {
548
+ title?: string;
549
+ detail?: string;
550
+ status?: StatusType;
551
+ instance?: string;
552
+ "type"?: string;
553
+ parameters?: {
554
+ [key: string]: object;
555
+ };
556
+ };
557
+ } | {
558
+ status: 500;
559
+ data: {
560
+ title?: string;
561
+ detail?: string;
562
+ status?: StatusType;
563
+ instance?: string;
564
+ "type"?: string;
565
+ parameters?: {
566
+ [key: string]: object;
567
+ };
568
+ };
569
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/products`, {
570
+ ...opts
571
+ }));
572
+ }
573
+ /**
574
+ * save product in a workspace Id
575
+ */
576
+ export function saveProduct({ workspaceId, productWithApiAndEnvironmentRequest }: {
577
+ workspaceId: string;
578
+ productWithApiAndEnvironmentRequest: ProductWithApiAndEnvironmentRequest;
579
+ }, opts?: Oazapfts.RequestOpts) {
580
+ return oazapfts.ok(oazapfts.fetchJson<{
581
+ status: 200;
582
+ data: ProductResponse;
583
+ } | {
584
+ status: 422;
585
+ data: {
586
+ title?: string;
587
+ detail?: string;
588
+ status?: StatusType;
589
+ instance?: string;
590
+ "type"?: string;
591
+ parameters?: {
592
+ [key: string]: object;
593
+ };
594
+ };
595
+ } | {
596
+ status: 500;
597
+ data: {
598
+ title?: string;
599
+ detail?: string;
600
+ status?: StatusType;
601
+ instance?: string;
602
+ "type"?: string;
603
+ parameters?: {
604
+ [key: string]: object;
605
+ };
606
+ };
607
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/products`, oazapfts.json({
608
+ ...opts,
609
+ method: "POST",
610
+ body: productWithApiAndEnvironmentRequest
611
+ })));
612
+ }
613
+ export function linkProductApi({ workspaceId, productId, apiId }: {
614
+ workspaceId: string;
615
+ productId: string;
616
+ apiId: string;
617
+ }, opts?: Oazapfts.RequestOpts) {
618
+ return oazapfts.ok(oazapfts.fetchJson<{
619
+ status: 200;
620
+ data: boolean;
621
+ } | {
622
+ status: 422;
623
+ data: {
624
+ title?: string;
625
+ detail?: string;
626
+ status?: StatusType;
627
+ instance?: string;
628
+ "type"?: string;
629
+ parameters?: {
630
+ [key: string]: object;
631
+ };
632
+ };
633
+ } | {
634
+ status: 500;
635
+ data: {
636
+ title?: string;
637
+ detail?: string;
638
+ status?: StatusType;
639
+ instance?: string;
640
+ "type"?: string;
641
+ parameters?: {
642
+ [key: string]: object;
643
+ };
644
+ };
645
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/products/${encodeURIComponent(productId)}/apis/${encodeURIComponent(apiId)}`, {
646
+ ...opts,
647
+ method: "POST"
648
+ }));
649
+ }
650
+ export function unlinkProductApi({ workspaceId, productId, apiId }: {
651
+ workspaceId: string;
652
+ productId: string;
653
+ apiId: string;
654
+ }, opts?: Oazapfts.RequestOpts) {
655
+ return oazapfts.ok(oazapfts.fetchJson<{
656
+ status: 200;
657
+ data: boolean;
658
+ } | {
659
+ status: 422;
660
+ data: {
661
+ title?: string;
662
+ detail?: string;
663
+ status?: StatusType;
664
+ instance?: string;
665
+ "type"?: string;
666
+ parameters?: {
667
+ [key: string]: object;
668
+ };
669
+ };
670
+ } | {
671
+ status: 500;
672
+ data: {
673
+ title?: string;
674
+ detail?: string;
675
+ status?: StatusType;
676
+ instance?: string;
677
+ "type"?: string;
678
+ parameters?: {
679
+ [key: string]: object;
680
+ };
681
+ };
682
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/products/${encodeURIComponent(productId)}/apis/${encodeURIComponent(apiId)}`, {
683
+ ...opts,
684
+ method: "DELETE"
685
+ }));
686
+ }
687
+ /**
688
+ * Get one API by application id
689
+ */
690
+ export function getOne1({ workspaceId, applicationId }: {
691
+ workspaceId: string;
692
+ applicationId: string;
693
+ }, opts?: Oazapfts.RequestOpts) {
694
+ return oazapfts.ok(oazapfts.fetchJson<{
695
+ status: 200;
696
+ data: CatalogApiResponse;
697
+ } | {
698
+ status: 422;
699
+ data: {
700
+ title?: string;
701
+ detail?: string;
702
+ status?: StatusType;
703
+ instance?: string;
704
+ "type"?: string;
705
+ parameters?: {
706
+ [key: string]: object;
707
+ };
708
+ };
709
+ } | {
710
+ status: 500;
711
+ data: {
712
+ title?: string;
713
+ detail?: string;
714
+ status?: StatusType;
715
+ instance?: string;
716
+ "type"?: string;
717
+ parameters?: {
718
+ [key: string]: object;
719
+ };
720
+ };
721
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/api`, {
722
+ ...opts
723
+ }));
724
+ }
725
+ /**
726
+ * save API in a workspace Id
727
+ */
728
+ export function saveApi({ workspaceId, applicationId, catalogApiRequest }: {
729
+ workspaceId: string;
730
+ applicationId: string;
731
+ catalogApiRequest: CatalogApiRequest;
732
+ }, opts?: Oazapfts.RequestOpts) {
733
+ return oazapfts.ok(oazapfts.fetchJson<{
734
+ status: 200;
735
+ data: CatalogApiResponse;
736
+ } | {
737
+ status: 422;
738
+ data: {
739
+ title?: string;
740
+ detail?: string;
741
+ status?: StatusType;
742
+ instance?: string;
743
+ "type"?: string;
744
+ parameters?: {
745
+ [key: string]: object;
746
+ };
747
+ };
748
+ } | {
749
+ status: 500;
750
+ data: {
751
+ title?: string;
752
+ detail?: string;
753
+ status?: StatusType;
754
+ instance?: string;
755
+ "type"?: string;
756
+ parameters?: {
757
+ [key: string]: object;
758
+ };
759
+ };
760
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/api`, oazapfts.json({
761
+ ...opts,
762
+ method: "POST",
763
+ body: catalogApiRequest
764
+ })));
765
+ }
766
+ /**
767
+ * delete one API by application id
768
+ */
769
+ export function deleteApi({ workspaceId, applicationId }: {
770
+ workspaceId: string;
771
+ applicationId: string;
772
+ }, opts?: Oazapfts.RequestOpts) {
773
+ return oazapfts.ok(oazapfts.fetchJson<{
774
+ status: 200;
775
+ } | {
776
+ status: 422;
777
+ data: {
778
+ title?: string;
779
+ detail?: string;
780
+ status?: StatusType;
781
+ instance?: string;
782
+ "type"?: string;
783
+ parameters?: {
784
+ [key: string]: object;
785
+ };
786
+ };
787
+ } | {
788
+ status: 500;
789
+ data: {
790
+ title?: string;
791
+ detail?: string;
792
+ status?: StatusType;
793
+ instance?: string;
794
+ "type"?: string;
795
+ parameters?: {
796
+ [key: string]: object;
797
+ };
798
+ };
799
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/api`, {
800
+ ...opts,
801
+ method: "DELETE"
802
+ }));
803
+ }
804
+ /**
805
+ * get API definition
806
+ */
807
+ export function getApiDefinition({ workspaceId, applicationId, environmentId }: {
808
+ workspaceId: string;
809
+ applicationId: string;
810
+ environmentId: string;
811
+ }, opts?: Oazapfts.RequestOpts) {
812
+ return oazapfts.ok(oazapfts.fetchJson<{
813
+ status: 200;
814
+ data: CatalogApiDefinitionResponse;
815
+ } | {
816
+ status: 422;
817
+ data: {
818
+ title?: string;
819
+ detail?: string;
820
+ status?: StatusType;
821
+ instance?: string;
822
+ "type"?: string;
823
+ parameters?: {
824
+ [key: string]: object;
825
+ };
826
+ };
827
+ } | {
828
+ status: 500;
829
+ data: {
830
+ title?: string;
831
+ detail?: string;
832
+ status?: StatusType;
833
+ instance?: string;
834
+ "type"?: string;
835
+ parameters?: {
836
+ [key: string]: object;
837
+ };
838
+ };
839
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/api/environments/${encodeURIComponent(environmentId)}/definition`, {
840
+ ...opts
841
+ }));
842
+ }
843
+ /**
844
+ * save API definition in a workspace Id
845
+ */
846
+ export function saveApiDefinition({ workspaceId, applicationId, environmentId, gatewayUrl, body }: {
847
+ workspaceId: string;
848
+ applicationId: string;
849
+ environmentId: string;
850
+ gatewayUrl?: string;
851
+ body: string;
852
+ }, opts?: Oazapfts.RequestOpts) {
853
+ return oazapfts.ok(oazapfts.fetchJson<{
854
+ status: 200;
855
+ data: boolean;
856
+ } | {
857
+ status: 422;
858
+ data: {
859
+ title?: string;
860
+ detail?: string;
861
+ status?: StatusType;
862
+ instance?: string;
863
+ "type"?: string;
864
+ parameters?: {
865
+ [key: string]: object;
866
+ };
867
+ };
868
+ } | {
869
+ status: 500;
870
+ data: {
871
+ title?: string;
872
+ detail?: string;
873
+ status?: StatusType;
874
+ instance?: string;
875
+ "type"?: string;
876
+ parameters?: {
877
+ [key: string]: object;
878
+ };
879
+ };
880
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/api/environments/${encodeURIComponent(environmentId)}/definition${QS.query(QS.explode({
881
+ gatewayUrl
882
+ }))}`, oazapfts.json({
883
+ ...opts,
884
+ method: "POST",
885
+ body
886
+ })));
887
+ }
888
+ /**
889
+ * update API definition in a workspace Id
890
+ */
891
+ export function updateApiDefinition({ workspaceId, applicationId, environmentId, gatewayUrl, connectionInterfaceSlug, body }: {
892
+ workspaceId: string;
893
+ applicationId: string;
894
+ environmentId: string;
895
+ gatewayUrl?: string;
896
+ connectionInterfaceSlug?: string;
897
+ body?: string;
898
+ }, opts?: Oazapfts.RequestOpts) {
899
+ return oazapfts.ok(oazapfts.fetchJson<{
900
+ status: 200;
901
+ data: boolean;
902
+ } | {
903
+ status: 422;
904
+ data: {
905
+ title?: string;
906
+ detail?: string;
907
+ status?: StatusType;
908
+ instance?: string;
909
+ "type"?: string;
910
+ parameters?: {
911
+ [key: string]: object;
912
+ };
913
+ };
914
+ } | {
915
+ status: 500;
916
+ data: {
917
+ title?: string;
918
+ detail?: string;
919
+ status?: StatusType;
920
+ instance?: string;
921
+ "type"?: string;
922
+ parameters?: {
923
+ [key: string]: object;
924
+ };
925
+ };
926
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/api/environments/${encodeURIComponent(environmentId)}/definition${QS.query(QS.explode({
927
+ gatewayUrl,
928
+ connectionInterfaceSlug
929
+ }))}`, oazapfts.json({
930
+ ...opts,
931
+ method: "PATCH",
932
+ body
933
+ })));
934
+ }
935
+ /**
936
+ * Get all apis by workspace Id
937
+ */
938
+ export function getAll1({ workspaceId, offset, limit, status }: {
939
+ workspaceId: string;
940
+ offset?: number;
941
+ limit?: number;
942
+ status?: "DRAFT" | "PUBLISHED" | "UNPUBLISHED" | "DELETED";
943
+ }, opts?: Oazapfts.RequestOpts) {
944
+ return oazapfts.ok(oazapfts.fetchJson<{
945
+ status: 200;
946
+ data: CatalogApiResponse[];
947
+ } | {
948
+ status: 422;
949
+ data: {
950
+ title?: string;
951
+ detail?: string;
952
+ status?: StatusType;
953
+ instance?: string;
954
+ "type"?: string;
955
+ parameters?: {
956
+ [key: string]: object;
957
+ };
958
+ };
959
+ } | {
960
+ status: 500;
961
+ data: {
962
+ title?: string;
963
+ detail?: string;
964
+ status?: StatusType;
965
+ instance?: string;
966
+ "type"?: string;
967
+ parameters?: {
968
+ [key: string]: object;
969
+ };
970
+ };
971
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis${QS.query(QS.explode({
972
+ offset,
973
+ limit,
974
+ status
975
+ }))}`, {
976
+ ...opts
977
+ }));
978
+ }
979
+ /**
980
+ * save API in a workspace Id
981
+ */
982
+ export function saveApi1({ workspaceId, catalogApiRequest }: {
983
+ workspaceId: string;
984
+ catalogApiRequest: CatalogApiRequest;
985
+ }, opts?: Oazapfts.RequestOpts) {
986
+ return oazapfts.ok(oazapfts.fetchJson<{
987
+ status: 200;
988
+ data: CatalogApiResponse;
989
+ } | {
990
+ status: 422;
991
+ data: {
992
+ title?: string;
993
+ detail?: string;
994
+ status?: StatusType;
995
+ instance?: string;
996
+ "type"?: string;
997
+ parameters?: {
998
+ [key: string]: object;
999
+ };
1000
+ };
1001
+ } | {
1002
+ status: 500;
1003
+ data: {
1004
+ title?: string;
1005
+ detail?: string;
1006
+ status?: StatusType;
1007
+ instance?: string;
1008
+ "type"?: string;
1009
+ parameters?: {
1010
+ [key: string]: object;
1011
+ };
1012
+ };
1013
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis`, oazapfts.json({
1014
+ ...opts,
1015
+ method: "POST",
1016
+ body: catalogApiRequest
1017
+ })));
1018
+ }
1019
+ /**
1020
+ * get API definition
1021
+ */
1022
+ export function getApiDefinition1({ workspaceId, apiId, environmentId }: {
1023
+ workspaceId: string;
1024
+ apiId: string;
1025
+ environmentId: string;
1026
+ }, opts?: Oazapfts.RequestOpts) {
1027
+ return oazapfts.ok(oazapfts.fetchJson<{
1028
+ status: 200;
1029
+ data: CatalogApiDefinitionResponse;
1030
+ } | {
1031
+ status: 422;
1032
+ data: {
1033
+ title?: string;
1034
+ detail?: string;
1035
+ status?: StatusType;
1036
+ instance?: string;
1037
+ "type"?: string;
1038
+ parameters?: {
1039
+ [key: string]: object;
1040
+ };
1041
+ };
1042
+ } | {
1043
+ status: 500;
1044
+ data: {
1045
+ title?: string;
1046
+ detail?: string;
1047
+ status?: StatusType;
1048
+ instance?: string;
1049
+ "type"?: string;
1050
+ parameters?: {
1051
+ [key: string]: object;
1052
+ };
1053
+ };
1054
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis/${encodeURIComponent(apiId)}/environments/${encodeURIComponent(environmentId)}/definition`, {
1055
+ ...opts
1056
+ }));
1057
+ }
1058
+ /**
1059
+ * save API definition in a workspace Id
1060
+ */
1061
+ export function saveNewApiDefinition({ workspaceId, apiId, environmentId, gatewayUrl, body }: {
1062
+ workspaceId: string;
1063
+ apiId: string;
1064
+ environmentId: string;
1065
+ gatewayUrl?: string;
1066
+ body: string;
1067
+ }, opts?: Oazapfts.RequestOpts) {
1068
+ return oazapfts.ok(oazapfts.fetchJson<{
1069
+ status: 200;
1070
+ data: boolean;
1071
+ } | {
1072
+ status: 422;
1073
+ data: {
1074
+ title?: string;
1075
+ detail?: string;
1076
+ status?: StatusType;
1077
+ instance?: string;
1078
+ "type"?: string;
1079
+ parameters?: {
1080
+ [key: string]: object;
1081
+ };
1082
+ };
1083
+ } | {
1084
+ status: 500;
1085
+ data: {
1086
+ title?: string;
1087
+ detail?: string;
1088
+ status?: StatusType;
1089
+ instance?: string;
1090
+ "type"?: string;
1091
+ parameters?: {
1092
+ [key: string]: object;
1093
+ };
1094
+ };
1095
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis/${encodeURIComponent(apiId)}/environments/${encodeURIComponent(environmentId)}/definition${QS.query(QS.explode({
1096
+ gatewayUrl
1097
+ }))}`, oazapfts.json({
1098
+ ...opts,
1099
+ method: "POST",
1100
+ body
1101
+ })));
1102
+ }
1103
+ /**
1104
+ * update API definition in a workspace Id
1105
+ */
1106
+ export function updateApiDefinition1({ workspaceId, apiId, environmentId, gatewayUrl, connectionInterfaceSlug, body }: {
1107
+ workspaceId: string;
1108
+ apiId: string;
1109
+ environmentId: string;
1110
+ gatewayUrl?: string;
1111
+ connectionInterfaceSlug?: string;
1112
+ body?: string;
1113
+ }, opts?: Oazapfts.RequestOpts) {
1114
+ return oazapfts.ok(oazapfts.fetchJson<{
1115
+ status: 200;
1116
+ data: boolean;
1117
+ } | {
1118
+ status: 422;
1119
+ data: {
1120
+ title?: string;
1121
+ detail?: string;
1122
+ status?: StatusType;
1123
+ instance?: string;
1124
+ "type"?: string;
1125
+ parameters?: {
1126
+ [key: string]: object;
1127
+ };
1128
+ };
1129
+ } | {
1130
+ status: 500;
1131
+ data: {
1132
+ title?: string;
1133
+ detail?: string;
1134
+ status?: StatusType;
1135
+ instance?: string;
1136
+ "type"?: string;
1137
+ parameters?: {
1138
+ [key: string]: object;
1139
+ };
1140
+ };
1141
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis/${encodeURIComponent(apiId)}/environments/${encodeURIComponent(environmentId)}/definition${QS.query(QS.explode({
1142
+ gatewayUrl,
1143
+ connectionInterfaceSlug
1144
+ }))}`, oazapfts.json({
1145
+ ...opts,
1146
+ method: "PATCH",
1147
+ body
1148
+ })));
1149
+ }
1150
+ /**
1151
+ * Grant partner access permission to access the product
1152
+ */
1153
+ export function givePermission({ partnerAccountId, environmentId, productId }: {
1154
+ partnerAccountId: string;
1155
+ environmentId: string;
1156
+ productId: string;
1157
+ }, opts?: Oazapfts.RequestOpts) {
1158
+ return oazapfts.ok(oazapfts.fetchJson<{
1159
+ status: 200;
1160
+ } | {
1161
+ status: 422;
1162
+ data: {
1163
+ title?: string;
1164
+ detail?: string;
1165
+ status?: StatusType;
1166
+ instance?: string;
1167
+ "type"?: string;
1168
+ parameters?: {
1169
+ [key: string]: object;
1170
+ };
1171
+ };
1172
+ } | {
1173
+ status: 500;
1174
+ data: {
1175
+ title?: string;
1176
+ detail?: string;
1177
+ status?: StatusType;
1178
+ instance?: string;
1179
+ "type"?: string;
1180
+ parameters?: {
1181
+ [key: string]: object;
1182
+ };
1183
+ };
1184
+ }>(`/v1/partner/${encodeURIComponent(partnerAccountId)}/environments/${encodeURIComponent(environmentId)}/products/${encodeURIComponent(productId)}`, {
1185
+ ...opts,
1186
+ method: "POST"
1187
+ }));
1188
+ }
1189
+ /**
1190
+ * Remove partner access permission from the product
1191
+ */
1192
+ export function removePermission({ partnerAccountId, environmentId, productId }: {
1193
+ partnerAccountId: string;
1194
+ environmentId: string;
1195
+ productId: string;
1196
+ }, opts?: Oazapfts.RequestOpts) {
1197
+ return oazapfts.ok(oazapfts.fetchJson<{
1198
+ status: 200;
1199
+ } | {
1200
+ status: 422;
1201
+ data: {
1202
+ title?: string;
1203
+ detail?: string;
1204
+ status?: StatusType;
1205
+ instance?: string;
1206
+ "type"?: string;
1207
+ parameters?: {
1208
+ [key: string]: object;
1209
+ };
1210
+ };
1211
+ } | {
1212
+ status: 500;
1213
+ data: {
1214
+ title?: string;
1215
+ detail?: string;
1216
+ status?: StatusType;
1217
+ instance?: string;
1218
+ "type"?: string;
1219
+ parameters?: {
1220
+ [key: string]: object;
1221
+ };
1222
+ };
1223
+ }>(`/v1/partner/${encodeURIComponent(partnerAccountId)}/environments/${encodeURIComponent(environmentId)}/products/${encodeURIComponent(productId)}`, {
1224
+ ...opts,
1225
+ method: "DELETE"
1226
+ }));
1227
+ }
1228
+ /**
1229
+ * Grant partner access permission to access the API
1230
+ */
1231
+ export function givePermission1({ partnerAccountId, environmentId, apiId }: {
1232
+ partnerAccountId: string;
1233
+ environmentId: string;
1234
+ apiId: string;
1235
+ }, opts?: Oazapfts.RequestOpts) {
1236
+ return oazapfts.ok(oazapfts.fetchJson<{
1237
+ status: 200;
1238
+ } | {
1239
+ status: 422;
1240
+ data: {
1241
+ title?: string;
1242
+ detail?: string;
1243
+ status?: StatusType;
1244
+ instance?: string;
1245
+ "type"?: string;
1246
+ parameters?: {
1247
+ [key: string]: object;
1248
+ };
1249
+ };
1250
+ } | {
1251
+ status: 500;
1252
+ data: {
1253
+ title?: string;
1254
+ detail?: string;
1255
+ status?: StatusType;
1256
+ instance?: string;
1257
+ "type"?: string;
1258
+ parameters?: {
1259
+ [key: string]: object;
1260
+ };
1261
+ };
1262
+ }>(`/v1/partner/${encodeURIComponent(partnerAccountId)}/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}`, {
1263
+ ...opts,
1264
+ method: "POST"
1265
+ }));
1266
+ }
1267
+ /**
1268
+ * Remove partner access permission from the API
1269
+ */
1270
+ export function removePermission1({ partnerAccountId, environmentId, apiId }: {
1271
+ partnerAccountId: string;
1272
+ environmentId: string;
1273
+ apiId: string;
1274
+ }, opts?: Oazapfts.RequestOpts) {
1275
+ return oazapfts.ok(oazapfts.fetchJson<{
1276
+ status: 200;
1277
+ } | {
1278
+ status: 422;
1279
+ data: {
1280
+ title?: string;
1281
+ detail?: string;
1282
+ status?: StatusType;
1283
+ instance?: string;
1284
+ "type"?: string;
1285
+ parameters?: {
1286
+ [key: string]: object;
1287
+ };
1288
+ };
1289
+ } | {
1290
+ status: 500;
1291
+ data: {
1292
+ title?: string;
1293
+ detail?: string;
1294
+ status?: StatusType;
1295
+ instance?: string;
1296
+ "type"?: string;
1297
+ parameters?: {
1298
+ [key: string]: object;
1299
+ };
1300
+ };
1301
+ }>(`/v1/partner/${encodeURIComponent(partnerAccountId)}/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}`, {
1302
+ ...opts,
1303
+ method: "DELETE"
1304
+ }));
1305
+ }
1306
+ /**
1307
+ * Request access to many client application by Product
1308
+ */
1309
+ export function createAccessRequestByProduct({ environmentId, productId, body }: {
1310
+ environmentId: string;
1311
+ productId: string;
1312
+ body: string[];
1313
+ }, opts?: Oazapfts.RequestOpts) {
1314
+ return oazapfts.ok(oazapfts.fetchJson<{
1315
+ status: 200;
1316
+ } | {
1317
+ status: 422;
1318
+ data: {
1319
+ title?: string;
1320
+ detail?: string;
1321
+ status?: StatusType;
1322
+ instance?: string;
1323
+ "type"?: string;
1324
+ parameters?: {
1325
+ [key: string]: object;
1326
+ };
1327
+ };
1328
+ } | {
1329
+ status: 500;
1330
+ data: {
1331
+ title?: string;
1332
+ detail?: string;
1333
+ status?: StatusType;
1334
+ instance?: string;
1335
+ "type"?: string;
1336
+ parameters?: {
1337
+ [key: string]: object;
1338
+ };
1339
+ };
1340
+ }>(`/v1/partner/environments/${encodeURIComponent(environmentId)}/products/${encodeURIComponent(productId)}/access-requests`, oazapfts.json({
1341
+ ...opts,
1342
+ method: "POST",
1343
+ body
1344
+ })));
1345
+ }
1346
+ /**
1347
+ * Request access to many client application by Api
1348
+ */
1349
+ export function createAccessRequestByApi({ environmentId, apiId, body }: {
1350
+ environmentId: string;
1351
+ apiId: string;
1352
+ body: string[];
1353
+ }, opts?: Oazapfts.RequestOpts) {
1354
+ return oazapfts.ok(oazapfts.fetchJson<{
1355
+ status: 200;
1356
+ } | {
1357
+ status: 422;
1358
+ data: {
1359
+ title?: string;
1360
+ detail?: string;
1361
+ status?: StatusType;
1362
+ instance?: string;
1363
+ "type"?: string;
1364
+ parameters?: {
1365
+ [key: string]: object;
1366
+ };
1367
+ };
1368
+ } | {
1369
+ status: 500;
1370
+ data: {
1371
+ title?: string;
1372
+ detail?: string;
1373
+ status?: StatusType;
1374
+ instance?: string;
1375
+ "type"?: string;
1376
+ parameters?: {
1377
+ [key: string]: object;
1378
+ };
1379
+ };
1380
+ }>(`/v1/partner/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}/access-requests`, oazapfts.json({
1381
+ ...opts,
1382
+ method: "POST",
1383
+ body
1384
+ })));
1385
+ }
1386
+ /**
1387
+ * Update access request by status and clientID
1388
+ */
1389
+ export function updateAccessRequest({ environmentId, accessRequestId, accessRequestRequest }: {
1390
+ environmentId: string;
1391
+ accessRequestId: string;
1392
+ accessRequestRequest: AccessRequestRequestWrite;
1393
+ }, opts?: Oazapfts.RequestOpts) {
1394
+ return oazapfts.ok(oazapfts.fetchJson<{
1395
+ status: 200;
1396
+ } | {
1397
+ status: 422;
1398
+ data: {
1399
+ title?: string;
1400
+ detail?: string;
1401
+ status?: StatusType;
1402
+ instance?: string;
1403
+ "type"?: string;
1404
+ parameters?: {
1405
+ [key: string]: object;
1406
+ };
1407
+ };
1408
+ } | {
1409
+ status: 500;
1410
+ data: {
1411
+ title?: string;
1412
+ detail?: string;
1413
+ status?: StatusType;
1414
+ instance?: string;
1415
+ "type"?: string;
1416
+ parameters?: {
1417
+ [key: string]: object;
1418
+ };
1419
+ };
1420
+ }>(`/v1/partner/environments/${encodeURIComponent(environmentId)}/access-requests/${encodeURIComponent(accessRequestId)}`, oazapfts.json({
1421
+ ...opts,
1422
+ method: "POST",
1423
+ body: accessRequestRequest
1424
+ })));
1425
+ }
1426
+ /**
1427
+ * Get all Client Applications from Account
1428
+ */
1429
+ export function getClientApplication(opts?: Oazapfts.RequestOpts) {
1430
+ return oazapfts.ok(oazapfts.fetchJson<{
1431
+ status: 200;
1432
+ data: ClientApplicationResponse[];
1433
+ } | {
1434
+ status: 422;
1435
+ data: {
1436
+ title?: string;
1437
+ detail?: string;
1438
+ status?: StatusType;
1439
+ instance?: string;
1440
+ "type"?: string;
1441
+ parameters?: {
1442
+ [key: string]: object;
1443
+ };
1444
+ };
1445
+ } | {
1446
+ status: 500;
1447
+ data: {
1448
+ title?: string;
1449
+ detail?: string;
1450
+ status?: StatusType;
1451
+ instance?: string;
1452
+ "type"?: string;
1453
+ parameters?: {
1454
+ [key: string]: object;
1455
+ };
1456
+ };
1457
+ }>("/v1/partner/client-applications", {
1458
+ ...opts
1459
+ }));
1460
+ }
1461
+ /**
1462
+ * Save a new Client Application for Account
1463
+ */
1464
+ export function createClientApplication({ clientApplicationRequest }: {
1465
+ clientApplicationRequest: ClientApplicationRequest;
1466
+ }, opts?: Oazapfts.RequestOpts) {
1467
+ return oazapfts.ok(oazapfts.fetchJson<{
1468
+ status: 201;
1469
+ data: string;
1470
+ } | {
1471
+ status: 422;
1472
+ data: {
1473
+ title?: string;
1474
+ detail?: string;
1475
+ status?: StatusType;
1476
+ instance?: string;
1477
+ "type"?: string;
1478
+ parameters?: {
1479
+ [key: string]: object;
1480
+ };
1481
+ };
1482
+ } | {
1483
+ status: 500;
1484
+ data: {
1485
+ title?: string;
1486
+ detail?: string;
1487
+ status?: StatusType;
1488
+ instance?: string;
1489
+ "type"?: string;
1490
+ parameters?: {
1491
+ [key: string]: object;
1492
+ };
1493
+ };
1494
+ }>("/v1/partner/client-applications", oazapfts.json({
1495
+ ...opts,
1496
+ method: "POST",
1497
+ body: clientApplicationRequest
1498
+ })));
1499
+ }
1500
+ /**
1501
+ * Update batch access request by status and clientID
1502
+ */
1503
+ export function updateAccessRequestBatch({ accessRequestBatchRequest }: {
1504
+ accessRequestBatchRequest: AccessRequestBatchRequestWrite;
1505
+ }, opts?: Oazapfts.RequestOpts) {
1506
+ return oazapfts.ok(oazapfts.fetchJson<{
1507
+ status: 200;
1508
+ } | {
1509
+ status: 422;
1510
+ data: {
1511
+ title?: string;
1512
+ detail?: string;
1513
+ status?: StatusType;
1514
+ instance?: string;
1515
+ "type"?: string;
1516
+ parameters?: {
1517
+ [key: string]: object;
1518
+ };
1519
+ };
1520
+ } | {
1521
+ status: 500;
1522
+ data: {
1523
+ title?: string;
1524
+ detail?: string;
1525
+ status?: StatusType;
1526
+ instance?: string;
1527
+ "type"?: string;
1528
+ parameters?: {
1529
+ [key: string]: object;
1530
+ };
1531
+ };
1532
+ }>("/v1/partner/access-requests", oazapfts.json({
1533
+ ...opts,
1534
+ method: "POST",
1535
+ body: accessRequestBatchRequest
1536
+ })));
1537
+ }
1538
+ /**
1539
+ * Update API status by application id
1540
+ */
1541
+ export function updateApiStatusByWorkspaceAndApplicationId({ workspaceId, applicationId, environmentId, action }: {
1542
+ workspaceId: string;
1543
+ applicationId: string;
1544
+ environmentId: string;
1545
+ action: "PUBLISHED" | "UNPUBLISHED" | "DRAFT";
1546
+ }, opts?: Oazapfts.RequestOpts) {
1547
+ return oazapfts.ok(oazapfts.fetchJson<{
1548
+ status: 204;
1549
+ } | {
1550
+ status: 400;
1551
+ } | {
1552
+ status: 422;
1553
+ data: {
1554
+ title?: string;
1555
+ detail?: string;
1556
+ status?: StatusType;
1557
+ instance?: string;
1558
+ "type"?: string;
1559
+ parameters?: {
1560
+ [key: string]: object;
1561
+ };
1562
+ };
1563
+ } | {
1564
+ status: 500;
1565
+ data: {
1566
+ title?: string;
1567
+ detail?: string;
1568
+ status?: StatusType;
1569
+ instance?: string;
1570
+ "type"?: string;
1571
+ parameters?: {
1572
+ [key: string]: object;
1573
+ };
1574
+ };
1575
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/api/environments/${encodeURIComponent(environmentId)}${QS.query(QS.explode({
1576
+ action
1577
+ }))}`, {
1578
+ ...opts,
1579
+ method: "PATCH"
1580
+ }));
1581
+ }
1582
+ /**
1583
+ * Update API status
1584
+ */
1585
+ export function updateApiStatusByWorkspaceAndApiId({ workspaceId, apiId, envId, action }: {
1586
+ workspaceId: string;
1587
+ apiId: string;
1588
+ envId: string;
1589
+ action: "PUBLISHED" | "UNPUBLISHED" | "DRAFT";
1590
+ }, opts?: Oazapfts.RequestOpts) {
1591
+ return oazapfts.ok(oazapfts.fetchJson<{
1592
+ status: 204;
1593
+ } | {
1594
+ status: 400;
1595
+ } | {
1596
+ status: 422;
1597
+ data: {
1598
+ title?: string;
1599
+ detail?: string;
1600
+ status?: StatusType;
1601
+ instance?: string;
1602
+ "type"?: string;
1603
+ parameters?: {
1604
+ [key: string]: object;
1605
+ };
1606
+ };
1607
+ } | {
1608
+ status: 500;
1609
+ data: {
1610
+ title?: string;
1611
+ detail?: string;
1612
+ status?: StatusType;
1613
+ instance?: string;
1614
+ "type"?: string;
1615
+ parameters?: {
1616
+ [key: string]: object;
1617
+ };
1618
+ };
1619
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis/${encodeURIComponent(apiId)}/environments/${encodeURIComponent(envId)}${QS.query(QS.explode({
1620
+ action
1621
+ }))}`, {
1622
+ ...opts,
1623
+ method: "PATCH"
1624
+ }));
1625
+ }
1626
+ export function getApisByProductId({ workspaceId, productId }: {
1627
+ workspaceId: string;
1628
+ productId: string;
1629
+ }, opts?: Oazapfts.RequestOpts) {
1630
+ return oazapfts.ok(oazapfts.fetchJson<{
1631
+ status: 200;
1632
+ data: CatalogApiResponse[];
1633
+ } | {
1634
+ status: 422;
1635
+ data: {
1636
+ title?: string;
1637
+ detail?: string;
1638
+ status?: StatusType;
1639
+ instance?: string;
1640
+ "type"?: string;
1641
+ parameters?: {
1642
+ [key: string]: object;
1643
+ };
1644
+ };
1645
+ } | {
1646
+ status: 500;
1647
+ data: {
1648
+ title?: string;
1649
+ detail?: string;
1650
+ status?: StatusType;
1651
+ instance?: string;
1652
+ "type"?: string;
1653
+ parameters?: {
1654
+ [key: string]: object;
1655
+ };
1656
+ };
1657
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/products/${encodeURIComponent(productId)}/apis`, {
1658
+ ...opts
1659
+ }));
1660
+ }
1661
+ /**
1662
+ * Get one API by api_id
1663
+ */
1664
+ export function getOne2({ workspaceId, apiId }: {
1665
+ workspaceId: string;
1666
+ apiId: string;
1667
+ }, opts?: Oazapfts.RequestOpts) {
1668
+ return oazapfts.ok(oazapfts.fetchJson<{
1669
+ status: 200;
1670
+ data: CatalogApiResponse;
1671
+ } | {
1672
+ status: 422;
1673
+ data: {
1674
+ title?: string;
1675
+ detail?: string;
1676
+ status?: StatusType;
1677
+ instance?: string;
1678
+ "type"?: string;
1679
+ parameters?: {
1680
+ [key: string]: object;
1681
+ };
1682
+ };
1683
+ } | {
1684
+ status: 500;
1685
+ data: {
1686
+ title?: string;
1687
+ detail?: string;
1688
+ status?: StatusType;
1689
+ instance?: string;
1690
+ "type"?: string;
1691
+ parameters?: {
1692
+ [key: string]: object;
1693
+ };
1694
+ };
1695
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis/${encodeURIComponent(apiId)}`, {
1696
+ ...opts
1697
+ }));
1698
+ }
1699
+ /**
1700
+ * Get all products of an API
1701
+ */
1702
+ export function getProductsByApiId({ workspaceId, apiId }: {
1703
+ workspaceId: string;
1704
+ apiId: string;
1705
+ }, opts?: Oazapfts.RequestOpts) {
1706
+ return oazapfts.ok(oazapfts.fetchJson<{
1707
+ status: 200;
1708
+ data: ProductResponse[];
1709
+ } | {
1710
+ status: 422;
1711
+ data: {
1712
+ title?: string;
1713
+ detail?: string;
1714
+ status?: StatusType;
1715
+ instance?: string;
1716
+ "type"?: string;
1717
+ parameters?: {
1718
+ [key: string]: object;
1719
+ };
1720
+ };
1721
+ } | {
1722
+ status: 500;
1723
+ data: {
1724
+ title?: string;
1725
+ detail?: string;
1726
+ status?: StatusType;
1727
+ instance?: string;
1728
+ "type"?: string;
1729
+ parameters?: {
1730
+ [key: string]: object;
1731
+ };
1732
+ };
1733
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis/${encodeURIComponent(apiId)}/products`, {
1734
+ ...opts
1735
+ }));
1736
+ }
1737
+ /**
1738
+ * get API Details
1739
+ */
1740
+ export function apiDetails({ workspaceId, apiId, environmentId }: {
1741
+ workspaceId: string;
1742
+ apiId: string;
1743
+ environmentId: string;
1744
+ }, opts?: Oazapfts.RequestOpts) {
1745
+ return oazapfts.ok(oazapfts.fetchJson<{
1746
+ status: 200;
1747
+ data: CatalogApiDetailsDto;
1748
+ } | {
1749
+ status: 422;
1750
+ data: {
1751
+ title?: string;
1752
+ detail?: string;
1753
+ status?: StatusType;
1754
+ instance?: string;
1755
+ "type"?: string;
1756
+ parameters?: {
1757
+ [key: string]: object;
1758
+ };
1759
+ };
1760
+ } | {
1761
+ status: 500;
1762
+ data: {
1763
+ title?: string;
1764
+ detail?: string;
1765
+ status?: StatusType;
1766
+ instance?: string;
1767
+ "type"?: string;
1768
+ parameters?: {
1769
+ [key: string]: object;
1770
+ };
1771
+ };
1772
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis/${encodeURIComponent(apiId)}/environments/${encodeURIComponent(environmentId)}`, {
1773
+ ...opts
1774
+ }));
1775
+ }
1776
+ /**
1777
+ * get API Definition
1778
+ */
1779
+ export function getApiWorkspaceMethods({ workspaceId, apiId, environmentId }: {
1780
+ workspaceId: string;
1781
+ apiId: string;
1782
+ environmentId: string;
1783
+ }, opts?: Oazapfts.RequestOpts) {
1784
+ return oazapfts.ok(oazapfts.fetchJson<{
1785
+ status: 200;
1786
+ data: CatalogApiMethodsResponse;
1787
+ } | {
1788
+ status: 422;
1789
+ data: {
1790
+ title?: string;
1791
+ detail?: string;
1792
+ status?: StatusType;
1793
+ instance?: string;
1794
+ "type"?: string;
1795
+ parameters?: {
1796
+ [key: string]: object;
1797
+ };
1798
+ };
1799
+ } | {
1800
+ status: 500;
1801
+ data: {
1802
+ title?: string;
1803
+ detail?: string;
1804
+ status?: StatusType;
1805
+ instance?: string;
1806
+ "type"?: string;
1807
+ parameters?: {
1808
+ [key: string]: object;
1809
+ };
1810
+ };
1811
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/apis/${encodeURIComponent(apiId)}/environments/${encodeURIComponent(environmentId)}/methods`, {
1812
+ ...opts
1813
+ }));
1814
+ }
1815
+ /**
1816
+ * List all the Account's Products
1817
+ */
1818
+ export function getProducts(opts?: Oazapfts.RequestOpts) {
1819
+ return oazapfts.ok(oazapfts.fetchJson<{
1820
+ status: 200;
1821
+ data: SimpleProductResponse[];
1822
+ } | {
1823
+ status: 422;
1824
+ data: {
1825
+ title?: string;
1826
+ detail?: string;
1827
+ status?: StatusType;
1828
+ instance?: string;
1829
+ "type"?: string;
1830
+ parameters?: {
1831
+ [key: string]: object;
1832
+ };
1833
+ };
1834
+ } | {
1835
+ status: 500;
1836
+ data: {
1837
+ title?: string;
1838
+ detail?: string;
1839
+ status?: StatusType;
1840
+ instance?: string;
1841
+ "type"?: string;
1842
+ parameters?: {
1843
+ [key: string]: object;
1844
+ };
1845
+ };
1846
+ }>("/v1/service-catalog/products", {
1847
+ ...opts
1848
+ }));
1849
+ }
1850
+ export function getApisByProductId1({ productId, environmentId }: {
1851
+ productId: string;
1852
+ environmentId: string;
1853
+ }, opts?: Oazapfts.RequestOpts) {
1854
+ return oazapfts.ok(oazapfts.fetchJson<{
1855
+ status: 200;
1856
+ data: CatalogApiResponse[];
1857
+ } | {
1858
+ status: 422;
1859
+ data: {
1860
+ title?: string;
1861
+ detail?: string;
1862
+ status?: StatusType;
1863
+ instance?: string;
1864
+ "type"?: string;
1865
+ parameters?: {
1866
+ [key: string]: object;
1867
+ };
1868
+ };
1869
+ } | {
1870
+ status: 500;
1871
+ data: {
1872
+ title?: string;
1873
+ detail?: string;
1874
+ status?: StatusType;
1875
+ instance?: string;
1876
+ "type"?: string;
1877
+ parameters?: {
1878
+ [key: string]: object;
1879
+ };
1880
+ };
1881
+ }>(`/v1/service-catalog/environments/${encodeURIComponent(environmentId)}/products/${encodeURIComponent(productId)}/apis`, {
1882
+ ...opts
1883
+ }));
1884
+ }
1885
+ export function getApisByProductId2({ productId, environmentId, accountId }: {
1886
+ productId: string;
1887
+ environmentId: string;
1888
+ accountId: string;
1889
+ }, opts?: Oazapfts.RequestOpts) {
1890
+ return oazapfts.ok(oazapfts.fetchJson<{
1891
+ status: 200;
1892
+ data: CatalogApiResponse[];
1893
+ } | {
1894
+ status: 422;
1895
+ data: {
1896
+ title?: string;
1897
+ detail?: string;
1898
+ status?: StatusType;
1899
+ instance?: string;
1900
+ "type"?: string;
1901
+ parameters?: {
1902
+ [key: string]: object;
1903
+ };
1904
+ };
1905
+ } | {
1906
+ status: 500;
1907
+ data: {
1908
+ title?: string;
1909
+ detail?: string;
1910
+ status?: StatusType;
1911
+ instance?: string;
1912
+ "type"?: string;
1913
+ parameters?: {
1914
+ [key: string]: object;
1915
+ };
1916
+ };
1917
+ }>(`/v1/accounts/${encodeURIComponent(accountId)}/service-catalog/environments/${encodeURIComponent(environmentId)}/products/${encodeURIComponent(productId)}/apis`, {
1918
+ ...opts
1919
+ }));
1920
+ }
1921
+ /**
1922
+ * Get one product by product_id
1923
+ */
1924
+ export function getOneProduct({ accountId, productId, environmentId }: {
1925
+ accountId: string;
1926
+ productId: string;
1927
+ environmentId: string;
1928
+ }, opts?: Oazapfts.RequestOpts) {
1929
+ return oazapfts.ok(oazapfts.fetchJson<{
1930
+ status: 200;
1931
+ data: ProductResponse;
1932
+ } | {
1933
+ status: 422;
1934
+ data: {
1935
+ title?: string;
1936
+ detail?: string;
1937
+ status?: StatusType;
1938
+ instance?: string;
1939
+ "type"?: string;
1940
+ parameters?: {
1941
+ [key: string]: object;
1942
+ };
1943
+ };
1944
+ } | {
1945
+ status: 500;
1946
+ data: {
1947
+ title?: string;
1948
+ detail?: string;
1949
+ status?: StatusType;
1950
+ instance?: string;
1951
+ "type"?: string;
1952
+ parameters?: {
1953
+ [key: string]: object;
1954
+ };
1955
+ };
1956
+ }>(`/v1/accounts/${encodeURIComponent(accountId)}/service-catalog/environments/${encodeURIComponent(environmentId)}/products/${encodeURIComponent(productId)}`, {
1957
+ ...opts
1958
+ }));
1959
+ }
1960
+ /**
1961
+ * Get one product by product_id
1962
+ */
1963
+ export function getOneProduct1({ productId, environmentId }: {
1964
+ productId: string;
1965
+ environmentId: string;
1966
+ }, opts?: Oazapfts.RequestOpts) {
1967
+ return oazapfts.ok(oazapfts.fetchJson<{
1968
+ status: 200;
1969
+ data: ProductResponse;
1970
+ } | {
1971
+ status: 422;
1972
+ data: {
1973
+ title?: string;
1974
+ detail?: string;
1975
+ status?: StatusType;
1976
+ instance?: string;
1977
+ "type"?: string;
1978
+ parameters?: {
1979
+ [key: string]: object;
1980
+ };
1981
+ };
1982
+ } | {
1983
+ status: 500;
1984
+ data: {
1985
+ title?: string;
1986
+ detail?: string;
1987
+ status?: StatusType;
1988
+ instance?: string;
1989
+ "type"?: string;
1990
+ parameters?: {
1991
+ [key: string]: object;
1992
+ };
1993
+ };
1994
+ }>(`/v1/service-catalog/environments/${encodeURIComponent(environmentId)}/products/${encodeURIComponent(productId)}`, {
1995
+ ...opts
1996
+ }));
1997
+ }
1998
+ /**
1999
+ * Get all products
2000
+ */
2001
+ export function getAllProducts({ accountId, environmentId, limit }: {
2002
+ accountId: string;
2003
+ environmentId: string;
2004
+ limit?: number;
2005
+ }, opts?: Oazapfts.RequestOpts) {
2006
+ return oazapfts.ok(oazapfts.fetchJson<{
2007
+ status: 200;
2008
+ data: ProductResponse[];
2009
+ } | {
2010
+ status: 422;
2011
+ data: {
2012
+ title?: string;
2013
+ detail?: string;
2014
+ status?: StatusType;
2015
+ instance?: string;
2016
+ "type"?: string;
2017
+ parameters?: {
2018
+ [key: string]: object;
2019
+ };
2020
+ };
2021
+ } | {
2022
+ status: 500;
2023
+ data: {
2024
+ title?: string;
2025
+ detail?: string;
2026
+ status?: StatusType;
2027
+ instance?: string;
2028
+ "type"?: string;
2029
+ parameters?: {
2030
+ [key: string]: object;
2031
+ };
2032
+ };
2033
+ }>(`/v1/accounts/${encodeURIComponent(accountId)}/service-catalog/environments/${encodeURIComponent(environmentId)}/products${QS.query(QS.explode({
2034
+ limit
2035
+ }))}`, {
2036
+ ...opts
2037
+ }));
2038
+ }
2039
+ /**
2040
+ * Get all products
2041
+ */
2042
+ export function getAllProducts1({ environmentId, limit }: {
2043
+ environmentId: string;
2044
+ limit?: number;
2045
+ }, opts?: Oazapfts.RequestOpts) {
2046
+ return oazapfts.ok(oazapfts.fetchJson<{
2047
+ status: 200;
2048
+ data: ProductResponse[];
2049
+ } | {
2050
+ status: 422;
2051
+ data: {
2052
+ title?: string;
2053
+ detail?: string;
2054
+ status?: StatusType;
2055
+ instance?: string;
2056
+ "type"?: string;
2057
+ parameters?: {
2058
+ [key: string]: object;
2059
+ };
2060
+ };
2061
+ } | {
2062
+ status: 500;
2063
+ data: {
2064
+ title?: string;
2065
+ detail?: string;
2066
+ status?: StatusType;
2067
+ instance?: string;
2068
+ "type"?: string;
2069
+ parameters?: {
2070
+ [key: string]: object;
2071
+ };
2072
+ };
2073
+ }>(`/v1/service-catalog/environments/${encodeURIComponent(environmentId)}/products${QS.query(QS.explode({
2074
+ limit
2075
+ }))}`, {
2076
+ ...opts
2077
+ }));
2078
+ }
2079
+ /**
2080
+ * Get all products of an API
2081
+ */
2082
+ export function getProductsByApiId1({ apiId, environmentId, accountId }: {
2083
+ apiId: string;
2084
+ environmentId: string;
2085
+ accountId: string;
2086
+ }, opts?: Oazapfts.RequestOpts) {
2087
+ return oazapfts.ok(oazapfts.fetchJson<{
2088
+ status: 200;
2089
+ data: ProductResponse[];
2090
+ } | {
2091
+ status: 422;
2092
+ data: {
2093
+ title?: string;
2094
+ detail?: string;
2095
+ status?: StatusType;
2096
+ instance?: string;
2097
+ "type"?: string;
2098
+ parameters?: {
2099
+ [key: string]: object;
2100
+ };
2101
+ };
2102
+ } | {
2103
+ status: 500;
2104
+ data: {
2105
+ title?: string;
2106
+ detail?: string;
2107
+ status?: StatusType;
2108
+ instance?: string;
2109
+ "type"?: string;
2110
+ parameters?: {
2111
+ [key: string]: object;
2112
+ };
2113
+ };
2114
+ }>(`/v1/accounts/${encodeURIComponent(accountId)}/service-catalog/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}/products`, {
2115
+ ...opts
2116
+ }));
2117
+ }
2118
+ /**
2119
+ * Get all products of an API
2120
+ */
2121
+ export function getProductsByApiId2({ apiId, environmentId }: {
2122
+ apiId: string;
2123
+ environmentId: string;
2124
+ }, opts?: Oazapfts.RequestOpts) {
2125
+ return oazapfts.ok(oazapfts.fetchJson<{
2126
+ status: 200;
2127
+ data: ProductResponse[];
2128
+ } | {
2129
+ status: 422;
2130
+ data: {
2131
+ title?: string;
2132
+ detail?: string;
2133
+ status?: StatusType;
2134
+ instance?: string;
2135
+ "type"?: string;
2136
+ parameters?: {
2137
+ [key: string]: object;
2138
+ };
2139
+ };
2140
+ } | {
2141
+ status: 500;
2142
+ data: {
2143
+ title?: string;
2144
+ detail?: string;
2145
+ status?: StatusType;
2146
+ instance?: string;
2147
+ "type"?: string;
2148
+ parameters?: {
2149
+ [key: string]: object;
2150
+ };
2151
+ };
2152
+ }>(`/v1/service-catalog/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}/products`, {
2153
+ ...opts
2154
+ }));
2155
+ }
2156
+ /**
2157
+ * get API definition
2158
+ */
2159
+ export function getApiMethods({ accountId, apiId, environmentId }: {
2160
+ accountId: string;
2161
+ apiId: string;
2162
+ environmentId: string;
2163
+ }, opts?: Oazapfts.RequestOpts) {
2164
+ return oazapfts.ok(oazapfts.fetchJson<{
2165
+ status: 200;
2166
+ data: CatalogApiMethodsResponse;
2167
+ } | {
2168
+ status: 422;
2169
+ data: {
2170
+ title?: string;
2171
+ detail?: string;
2172
+ status?: StatusType;
2173
+ instance?: string;
2174
+ "type"?: string;
2175
+ parameters?: {
2176
+ [key: string]: object;
2177
+ };
2178
+ };
2179
+ } | {
2180
+ status: 500;
2181
+ data: {
2182
+ title?: string;
2183
+ detail?: string;
2184
+ status?: StatusType;
2185
+ instance?: string;
2186
+ "type"?: string;
2187
+ parameters?: {
2188
+ [key: string]: object;
2189
+ };
2190
+ };
2191
+ }>(`/v1/accounts/${encodeURIComponent(accountId)}/service-catalog/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}/methods`, {
2192
+ ...opts
2193
+ }));
2194
+ }
2195
+ /**
2196
+ * get API definition
2197
+ */
2198
+ export function getApiMethods1({ apiId, environmentId }: {
2199
+ apiId: string;
2200
+ environmentId: string;
2201
+ }, opts?: Oazapfts.RequestOpts) {
2202
+ return oazapfts.ok(oazapfts.fetchJson<{
2203
+ status: 200;
2204
+ data: CatalogApiMethodsResponse;
2205
+ } | {
2206
+ status: 422;
2207
+ data: {
2208
+ title?: string;
2209
+ detail?: string;
2210
+ status?: StatusType;
2211
+ instance?: string;
2212
+ "type"?: string;
2213
+ parameters?: {
2214
+ [key: string]: object;
2215
+ };
2216
+ };
2217
+ } | {
2218
+ status: 500;
2219
+ data: {
2220
+ title?: string;
2221
+ detail?: string;
2222
+ status?: StatusType;
2223
+ instance?: string;
2224
+ "type"?: string;
2225
+ parameters?: {
2226
+ [key: string]: object;
2227
+ };
2228
+ };
2229
+ }>(`/v1/service-catalog/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}/methods`, {
2230
+ ...opts
2231
+ }));
2232
+ }
2233
+ /**
2234
+ * get API definition
2235
+ */
2236
+ export function getApiDefinition2({ apiId, environmentId, accountId }: {
2237
+ apiId: string;
2238
+ environmentId: string;
2239
+ accountId: string;
2240
+ }, opts?: Oazapfts.RequestOpts) {
2241
+ return oazapfts.ok(oazapfts.fetchJson<{
2242
+ status: 200;
2243
+ data: CatalogApiDetailsResponse;
2244
+ } | {
2245
+ status: 422;
2246
+ data: {
2247
+ title?: string;
2248
+ detail?: string;
2249
+ status?: StatusType;
2250
+ instance?: string;
2251
+ "type"?: string;
2252
+ parameters?: {
2253
+ [key: string]: object;
2254
+ };
2255
+ };
2256
+ } | {
2257
+ status: 500;
2258
+ data: {
2259
+ title?: string;
2260
+ detail?: string;
2261
+ status?: StatusType;
2262
+ instance?: string;
2263
+ "type"?: string;
2264
+ parameters?: {
2265
+ [key: string]: object;
2266
+ };
2267
+ };
2268
+ }>(`/v1/accounts/${encodeURIComponent(accountId)}/service-catalog/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}/details`, {
2269
+ ...opts
2270
+ }));
2271
+ }
2272
+ /**
2273
+ * get API definition
2274
+ */
2275
+ export function getApiDefinition3({ apiId, environmentId }: {
2276
+ apiId: string;
2277
+ environmentId: string;
2278
+ }, opts?: Oazapfts.RequestOpts) {
2279
+ return oazapfts.ok(oazapfts.fetchJson<{
2280
+ status: 200;
2281
+ data: CatalogApiDetailsResponse;
2282
+ } | {
2283
+ status: 422;
2284
+ data: {
2285
+ title?: string;
2286
+ detail?: string;
2287
+ status?: StatusType;
2288
+ instance?: string;
2289
+ "type"?: string;
2290
+ parameters?: {
2291
+ [key: string]: object;
2292
+ };
2293
+ };
2294
+ } | {
2295
+ status: 500;
2296
+ data: {
2297
+ title?: string;
2298
+ detail?: string;
2299
+ status?: StatusType;
2300
+ instance?: string;
2301
+ "type"?: string;
2302
+ parameters?: {
2303
+ [key: string]: object;
2304
+ };
2305
+ };
2306
+ }>(`/v1/service-catalog/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}/details`, {
2307
+ ...opts
2308
+ }));
2309
+ }
2310
+ /**
2311
+ * Get one API by api_id
2312
+ */
2313
+ export function getOneApi({ apiId, environmentId }: {
2314
+ apiId: string;
2315
+ environmentId: string;
2316
+ }, opts?: Oazapfts.RequestOpts) {
2317
+ return oazapfts.ok(oazapfts.fetchJson<{
2318
+ status: 200;
2319
+ data: CatalogApiResponse;
2320
+ } | {
2321
+ status: 422;
2322
+ data: {
2323
+ title?: string;
2324
+ detail?: string;
2325
+ status?: StatusType;
2326
+ instance?: string;
2327
+ "type"?: string;
2328
+ parameters?: {
2329
+ [key: string]: object;
2330
+ };
2331
+ };
2332
+ } | {
2333
+ status: 500;
2334
+ data: {
2335
+ title?: string;
2336
+ detail?: string;
2337
+ status?: StatusType;
2338
+ instance?: string;
2339
+ "type"?: string;
2340
+ parameters?: {
2341
+ [key: string]: object;
2342
+ };
2343
+ };
2344
+ }>(`/v1/service-catalog/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}`, {
2345
+ ...opts
2346
+ }));
2347
+ }
2348
+ /**
2349
+ * Get one API by api_id
2350
+ */
2351
+ export function getOneApi1({ apiId, environmentId, accountId }: {
2352
+ apiId: string;
2353
+ environmentId: string;
2354
+ accountId: string;
2355
+ }, opts?: Oazapfts.RequestOpts) {
2356
+ return oazapfts.ok(oazapfts.fetchJson<{
2357
+ status: 200;
2358
+ data: CatalogApiResponse;
2359
+ } | {
2360
+ status: 422;
2361
+ data: {
2362
+ title?: string;
2363
+ detail?: string;
2364
+ status?: StatusType;
2365
+ instance?: string;
2366
+ "type"?: string;
2367
+ parameters?: {
2368
+ [key: string]: object;
2369
+ };
2370
+ };
2371
+ } | {
2372
+ status: 500;
2373
+ data: {
2374
+ title?: string;
2375
+ detail?: string;
2376
+ status?: StatusType;
2377
+ instance?: string;
2378
+ "type"?: string;
2379
+ parameters?: {
2380
+ [key: string]: object;
2381
+ };
2382
+ };
2383
+ }>(`/v1/accounts/${encodeURIComponent(accountId)}/service-catalog/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}`, {
2384
+ ...opts
2385
+ }));
2386
+ }
2387
+ /**
2388
+ * Get all apis
2389
+ */
2390
+ export function getAllApis({ environmentId, limit }: {
2391
+ environmentId: string;
2392
+ limit?: number;
2393
+ }, opts?: Oazapfts.RequestOpts) {
2394
+ return oazapfts.ok(oazapfts.fetchJson<{
2395
+ status: 200;
2396
+ data: CatalogApiResponse[];
2397
+ } | {
2398
+ status: 422;
2399
+ data: {
2400
+ title?: string;
2401
+ detail?: string;
2402
+ status?: StatusType;
2403
+ instance?: string;
2404
+ "type"?: string;
2405
+ parameters?: {
2406
+ [key: string]: object;
2407
+ };
2408
+ };
2409
+ } | {
2410
+ status: 500;
2411
+ data: {
2412
+ title?: string;
2413
+ detail?: string;
2414
+ status?: StatusType;
2415
+ instance?: string;
2416
+ "type"?: string;
2417
+ parameters?: {
2418
+ [key: string]: object;
2419
+ };
2420
+ };
2421
+ }>(`/v1/service-catalog/environments/${encodeURIComponent(environmentId)}/apis${QS.query(QS.explode({
2422
+ limit
2423
+ }))}`, {
2424
+ ...opts
2425
+ }));
2426
+ }
2427
+ /**
2428
+ * Get all apis
2429
+ */
2430
+ export function getAllApis1({ accountId, environmentId, limit }: {
2431
+ accountId: string;
2432
+ environmentId: string;
2433
+ limit?: number;
2434
+ }, opts?: Oazapfts.RequestOpts) {
2435
+ return oazapfts.ok(oazapfts.fetchJson<{
2436
+ status: 200;
2437
+ data: CatalogApiResponse[];
2438
+ } | {
2439
+ status: 422;
2440
+ data: {
2441
+ title?: string;
2442
+ detail?: string;
2443
+ status?: StatusType;
2444
+ instance?: string;
2445
+ "type"?: string;
2446
+ parameters?: {
2447
+ [key: string]: object;
2448
+ };
2449
+ };
2450
+ } | {
2451
+ status: 500;
2452
+ data: {
2453
+ title?: string;
2454
+ detail?: string;
2455
+ status?: StatusType;
2456
+ instance?: string;
2457
+ "type"?: string;
2458
+ parameters?: {
2459
+ [key: string]: object;
2460
+ };
2461
+ };
2462
+ }>(`/v1/accounts/${encodeURIComponent(accountId)}/service-catalog/environments/${encodeURIComponent(environmentId)}/apis${QS.query(QS.explode({
2463
+ limit
2464
+ }))}`, {
2465
+ ...opts
2466
+ }));
2467
+ }
2468
+ /**
2469
+ * List all the Account's Apis
2470
+ */
2471
+ export function getApis(opts?: Oazapfts.RequestOpts) {
2472
+ return oazapfts.ok(oazapfts.fetchJson<{
2473
+ status: 200;
2474
+ data: SimpleApiResponse[];
2475
+ } | {
2476
+ status: 422;
2477
+ data: {
2478
+ title?: string;
2479
+ detail?: string;
2480
+ status?: StatusType;
2481
+ instance?: string;
2482
+ "type"?: string;
2483
+ parameters?: {
2484
+ [key: string]: object;
2485
+ };
2486
+ };
2487
+ } | {
2488
+ status: 500;
2489
+ data: {
2490
+ title?: string;
2491
+ detail?: string;
2492
+ status?: StatusType;
2493
+ instance?: string;
2494
+ "type"?: string;
2495
+ parameters?: {
2496
+ [key: string]: object;
2497
+ };
2498
+ };
2499
+ }>("/v1/service-catalog/apis", {
2500
+ ...opts
2501
+ }));
2502
+ }
2503
+ /**
2504
+ * Get all partner APIs whose status is requested or granted
2505
+ */
2506
+ export function getRequestedOrGrantedAccessApis({ partnerAccountId }: {
2507
+ partnerAccountId: string;
2508
+ }, opts?: Oazapfts.RequestOpts) {
2509
+ return oazapfts.ok(oazapfts.fetchJson<{
2510
+ status: 200;
2511
+ data: CatalogApiAccessRequestResponse[];
2512
+ } | {
2513
+ status: 422;
2514
+ data: {
2515
+ title?: string;
2516
+ detail?: string;
2517
+ status?: StatusType;
2518
+ instance?: string;
2519
+ "type"?: string;
2520
+ parameters?: {
2521
+ [key: string]: object;
2522
+ };
2523
+ };
2524
+ } | {
2525
+ status: 500;
2526
+ data: {
2527
+ title?: string;
2528
+ detail?: string;
2529
+ status?: StatusType;
2530
+ instance?: string;
2531
+ "type"?: string;
2532
+ parameters?: {
2533
+ [key: string]: object;
2534
+ };
2535
+ };
2536
+ }>(`/v1/partner/${encodeURIComponent(partnerAccountId)}/requested-or-granted-access-apis`, {
2537
+ ...opts
2538
+ }));
2539
+ }
2540
+ /**
2541
+ * Get all Partner's products
2542
+ */
2543
+ export function getProducts1({ partnerAccountId }: {
2544
+ partnerAccountId: string;
2545
+ }, opts?: Oazapfts.RequestOpts) {
2546
+ return oazapfts.ok(oazapfts.fetchJson<{
2547
+ status: 200;
2548
+ data: PartnerProductResponse[];
2549
+ } | {
2550
+ status: 422;
2551
+ data: {
2552
+ title?: string;
2553
+ detail?: string;
2554
+ status?: StatusType;
2555
+ instance?: string;
2556
+ "type"?: string;
2557
+ parameters?: {
2558
+ [key: string]: object;
2559
+ };
2560
+ };
2561
+ } | {
2562
+ status: 500;
2563
+ data: {
2564
+ title?: string;
2565
+ detail?: string;
2566
+ status?: StatusType;
2567
+ instance?: string;
2568
+ "type"?: string;
2569
+ parameters?: {
2570
+ [key: string]: object;
2571
+ };
2572
+ };
2573
+ }>(`/v1/partner/${encodeURIComponent(partnerAccountId)}/products`, {
2574
+ ...opts
2575
+ }));
2576
+ }
2577
+ /**
2578
+ * Get all Partner's products by environment
2579
+ */
2580
+ export function getProductsByEnv({ partnerAccountId, environmentId }: {
2581
+ partnerAccountId: string;
2582
+ environmentId: string;
2583
+ }, opts?: Oazapfts.RequestOpts) {
2584
+ return oazapfts.ok(oazapfts.fetchJson<{
2585
+ status: 200;
2586
+ data: PartnerProductResponse[];
2587
+ } | {
2588
+ status: 422;
2589
+ data: {
2590
+ title?: string;
2591
+ detail?: string;
2592
+ status?: StatusType;
2593
+ instance?: string;
2594
+ "type"?: string;
2595
+ parameters?: {
2596
+ [key: string]: object;
2597
+ };
2598
+ };
2599
+ } | {
2600
+ status: 500;
2601
+ data: {
2602
+ title?: string;
2603
+ detail?: string;
2604
+ status?: StatusType;
2605
+ instance?: string;
2606
+ "type"?: string;
2607
+ parameters?: {
2608
+ [key: string]: object;
2609
+ };
2610
+ };
2611
+ }>(`/v1/partner/${encodeURIComponent(partnerAccountId)}/environments/${encodeURIComponent(environmentId)}/products`, {
2612
+ ...opts
2613
+ }));
2614
+ }
2615
+ /**
2616
+ * Get all Partner's apis by environment
2617
+ */
2618
+ export function getApisByEnv({ partnerAccountId, environmentId }: {
2619
+ partnerAccountId: string;
2620
+ environmentId: string;
2621
+ }, opts?: Oazapfts.RequestOpts) {
2622
+ return oazapfts.ok(oazapfts.fetchJson<{
2623
+ status: 200;
2624
+ data: PartnerApiResponse[];
2625
+ } | {
2626
+ status: 422;
2627
+ data: {
2628
+ title?: string;
2629
+ detail?: string;
2630
+ status?: StatusType;
2631
+ instance?: string;
2632
+ "type"?: string;
2633
+ parameters?: {
2634
+ [key: string]: object;
2635
+ };
2636
+ };
2637
+ } | {
2638
+ status: 500;
2639
+ data: {
2640
+ title?: string;
2641
+ detail?: string;
2642
+ status?: StatusType;
2643
+ instance?: string;
2644
+ "type"?: string;
2645
+ parameters?: {
2646
+ [key: string]: object;
2647
+ };
2648
+ };
2649
+ }>(`/v1/partner/${encodeURIComponent(partnerAccountId)}/environments/${encodeURIComponent(environmentId)}/apis`, {
2650
+ ...opts
2651
+ }));
2652
+ }
2653
+ /**
2654
+ * Get all Partner's apis
2655
+ */
2656
+ export function getApis1({ partnerAccountId }: {
2657
+ partnerAccountId: string;
2658
+ }, opts?: Oazapfts.RequestOpts) {
2659
+ return oazapfts.ok(oazapfts.fetchJson<{
2660
+ status: 200;
2661
+ data: PartnerApiResponse[];
2662
+ } | {
2663
+ status: 422;
2664
+ data: {
2665
+ title?: string;
2666
+ detail?: string;
2667
+ status?: StatusType;
2668
+ instance?: string;
2669
+ "type"?: string;
2670
+ parameters?: {
2671
+ [key: string]: object;
2672
+ };
2673
+ };
2674
+ } | {
2675
+ status: 500;
2676
+ data: {
2677
+ title?: string;
2678
+ detail?: string;
2679
+ status?: StatusType;
2680
+ instance?: string;
2681
+ "type"?: string;
2682
+ parameters?: {
2683
+ [key: string]: object;
2684
+ };
2685
+ };
2686
+ }>(`/v1/partner/${encodeURIComponent(partnerAccountId)}/apis`, {
2687
+ ...opts
2688
+ }));
2689
+ }
2690
+ /**
2691
+ * Get all Client Applications that are eligible to request access to API
2692
+ */
2693
+ export function getEligibleClientApplications({ environmentId, apiId }: {
2694
+ environmentId: string;
2695
+ apiId: string;
2696
+ }, opts?: Oazapfts.RequestOpts) {
2697
+ return oazapfts.ok(oazapfts.fetchJson<{
2698
+ status: 200;
2699
+ data: ClientApplicationWithStatusResponse[];
2700
+ } | {
2701
+ status: 422;
2702
+ data: {
2703
+ title?: string;
2704
+ detail?: string;
2705
+ status?: StatusType;
2706
+ instance?: string;
2707
+ "type"?: string;
2708
+ parameters?: {
2709
+ [key: string]: object;
2710
+ };
2711
+ };
2712
+ } | {
2713
+ status: 500;
2714
+ data: {
2715
+ title?: string;
2716
+ detail?: string;
2717
+ status?: StatusType;
2718
+ instance?: string;
2719
+ "type"?: string;
2720
+ parameters?: {
2721
+ [key: string]: object;
2722
+ };
2723
+ };
2724
+ }>(`/v1/partner/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}/client-applications`, {
2725
+ ...opts
2726
+ }));
2727
+ }
2728
+ export function getAllApplications({ environmentId, apiId }: {
2729
+ environmentId: string;
2730
+ apiId: string;
2731
+ }, opts?: Oazapfts.RequestOpts) {
2732
+ return oazapfts.ok(oazapfts.fetchJson<{
2733
+ status: 200;
2734
+ data: ClientApplicationWithGrantedAccessResponse[];
2735
+ } | {
2736
+ status: 422;
2737
+ data: {
2738
+ title?: string;
2739
+ detail?: string;
2740
+ status?: StatusType;
2741
+ instance?: string;
2742
+ "type"?: string;
2743
+ parameters?: {
2744
+ [key: string]: object;
2745
+ };
2746
+ };
2747
+ } | {
2748
+ status: 500;
2749
+ data: {
2750
+ title?: string;
2751
+ detail?: string;
2752
+ status?: StatusType;
2753
+ instance?: string;
2754
+ "type"?: string;
2755
+ parameters?: {
2756
+ [key: string]: object;
2757
+ };
2758
+ };
2759
+ }>(`/v1/partner/environments/${encodeURIComponent(environmentId)}/apis/${encodeURIComponent(apiId)}/approved-client-applications`, {
2760
+ ...opts
2761
+ }));
2762
+ }
2763
+ /**
2764
+ * access request list requested
2765
+ */
2766
+ export function findAccessRequestRequestedStatus({ environmentId }: {
2767
+ environmentId: string;
2768
+ }, opts?: Oazapfts.RequestOpts) {
2769
+ return oazapfts.ok(oazapfts.fetchJson<{
2770
+ status: 200;
2771
+ data: CatalogApiAccessRequestResponse[];
2772
+ } | {
2773
+ status: 422;
2774
+ data: {
2775
+ title?: string;
2776
+ detail?: string;
2777
+ status?: StatusType;
2778
+ instance?: string;
2779
+ "type"?: string;
2780
+ parameters?: {
2781
+ [key: string]: object;
2782
+ };
2783
+ };
2784
+ } | {
2785
+ status: 500;
2786
+ data: {
2787
+ title?: string;
2788
+ detail?: string;
2789
+ status?: StatusType;
2790
+ instance?: string;
2791
+ "type"?: string;
2792
+ parameters?: {
2793
+ [key: string]: object;
2794
+ };
2795
+ };
2796
+ }>(`/v1/partner/environments/${encodeURIComponent(environmentId)}/access-requests`, {
2797
+ ...opts
2798
+ }));
2799
+ }
2800
+ /**
2801
+ * Access request list history
2802
+ */
2803
+ export function findAccessRequestRequestedHistory({ environmentId }: {
2804
+ environmentId: string;
2805
+ }, opts?: Oazapfts.RequestOpts) {
2806
+ return oazapfts.ok(oazapfts.fetchJson<{
2807
+ status: 200;
2808
+ data: CatalogApiAccessRequestResponse[];
2809
+ } | {
2810
+ status: 422;
2811
+ data: {
2812
+ title?: string;
2813
+ detail?: string;
2814
+ status?: StatusType;
2815
+ instance?: string;
2816
+ "type"?: string;
2817
+ parameters?: {
2818
+ [key: string]: object;
2819
+ };
2820
+ };
2821
+ } | {
2822
+ status: 500;
2823
+ data: {
2824
+ title?: string;
2825
+ detail?: string;
2826
+ status?: StatusType;
2827
+ instance?: string;
2828
+ "type"?: string;
2829
+ parameters?: {
2830
+ [key: string]: object;
2831
+ };
2832
+ };
2833
+ }>(`/v1/partner/environments/${encodeURIComponent(environmentId)}/access-requests/history`, {
2834
+ ...opts
2835
+ }));
2836
+ }
2837
+ /**
2838
+ * Get allowed environments
2839
+ */
2840
+ export function getEnvironmentsByAccountId({ accountId }: {
2841
+ accountId: string;
2842
+ }, opts?: Oazapfts.RequestOpts) {
2843
+ return oazapfts.ok(oazapfts.fetchJson<{
2844
+ status: 200;
2845
+ data: EnvironmentResponse[];
2846
+ } | {
2847
+ status: 422;
2848
+ data: {
2849
+ title?: string;
2850
+ detail?: string;
2851
+ status?: StatusType;
2852
+ instance?: string;
2853
+ "type"?: string;
2854
+ parameters?: {
2855
+ [key: string]: object;
2856
+ };
2857
+ };
2858
+ } | {
2859
+ status: 500;
2860
+ data: {
2861
+ title?: string;
2862
+ detail?: string;
2863
+ status?: StatusType;
2864
+ instance?: string;
2865
+ "type"?: string;
2866
+ parameters?: {
2867
+ [key: string]: object;
2868
+ };
2869
+ };
2870
+ }>(`/v1/accounts/${encodeURIComponent(accountId)}/environments`, {
2871
+ ...opts
2872
+ }));
2873
+ }
2874
+ /**
2875
+ * Get health status
2876
+ */
2877
+ export function healthz(opts?: Oazapfts.RequestOpts) {
2878
+ return oazapfts.ok(oazapfts.fetchJson<{
2879
+ status: 200;
2880
+ data: HealthzResponse;
2881
+ } | {
2882
+ status: 422;
2883
+ data: {
2884
+ title?: string;
2885
+ detail?: string;
2886
+ status?: StatusType;
2887
+ instance?: string;
2888
+ "type"?: string;
2889
+ parameters?: {
2890
+ [key: string]: object;
2891
+ };
2892
+ };
2893
+ } | {
2894
+ status: 500;
2895
+ data: {
2896
+ title?: string;
2897
+ detail?: string;
2898
+ status?: StatusType;
2899
+ instance?: string;
2900
+ "type"?: string;
2901
+ parameters?: {
2902
+ [key: string]: object;
2903
+ };
2904
+ };
2905
+ }>("/healthz", {
2906
+ ...opts
2907
+ }));
2908
+ }