@alvera-ai/platform-sdk 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/package.json +10 -11
- package/src/cli.ts +1386 -0
- package/src/client.ts +930 -0
- package/src/config.ts +205 -0
- package/src/environments.generated.ts +16 -0
- package/src/generated/client/client.gen.ts +298 -0
- package/src/generated/client/index.ts +25 -0
- package/src/generated/client/types.gen.ts +214 -0
- package/src/generated/client/utils.gen.ts +316 -0
- package/{dist/generated/client.gen.d.ts → src/generated/client.gen.ts} +6 -3
- package/src/generated/core/auth.gen.ts +41 -0
- package/src/generated/core/bodySerializer.gen.ts +82 -0
- package/src/generated/core/params.gen.ts +169 -0
- package/src/generated/core/pathSerializer.gen.ts +171 -0
- package/src/generated/core/queryKeySerializer.gen.ts +117 -0
- package/src/generated/core/serverSentEvents.gen.ts +242 -0
- package/src/generated/core/types.gen.ts +104 -0
- package/src/generated/core/utils.gen.ts +140 -0
- package/src/generated/index.ts +4 -0
- package/src/generated/sdk.gen.ts +1756 -0
- package/{dist/generated/types.gen.d.ts → src/generated/types.gen.ts} +2243 -131
- package/{dist/generated/valibot.gen.js → src/generated/valibot.gen.ts} +1362 -53
- package/src/index.ts +69 -0
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -1008
- package/dist/cli.js.map +0 -1
- package/dist/client.d.ts +0 -529
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -421
- package/dist/client.js.map +0 -1
- package/dist/config.d.ts +0 -34
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -146
- package/dist/config.js.map +0 -1
- package/dist/environments.generated.d.ts +0 -21
- package/dist/environments.generated.d.ts.map +0 -1
- package/dist/environments.generated.js +0 -8
- package/dist/environments.generated.js.map +0 -1
- package/dist/generated/client/client.gen.d.ts +0 -3
- package/dist/generated/client/client.gen.d.ts.map +0 -1
- package/dist/generated/client/client.gen.js +0 -236
- package/dist/generated/client/client.gen.js.map +0 -1
- package/dist/generated/client/index.d.ts +0 -9
- package/dist/generated/client/index.d.ts.map +0 -1
- package/dist/generated/client/index.js +0 -7
- package/dist/generated/client/index.js.map +0 -1
- package/dist/generated/client/types.gen.d.ts +0 -118
- package/dist/generated/client/types.gen.d.ts.map +0 -1
- package/dist/generated/client/types.gen.js +0 -3
- package/dist/generated/client/types.gen.js.map +0 -1
- package/dist/generated/client/utils.gen.d.ts +0 -34
- package/dist/generated/client/utils.gen.d.ts.map +0 -1
- package/dist/generated/client/utils.gen.js +0 -229
- package/dist/generated/client/utils.gen.js.map +0 -1
- package/dist/generated/client.gen.d.ts.map +0 -1
- package/dist/generated/client.gen.js +0 -4
- package/dist/generated/client.gen.js.map +0 -1
- package/dist/generated/core/auth.gen.d.ts +0 -19
- package/dist/generated/core/auth.gen.d.ts.map +0 -1
- package/dist/generated/core/auth.gen.js +0 -15
- package/dist/generated/core/auth.gen.js.map +0 -1
- package/dist/generated/core/bodySerializer.gen.d.ts +0 -26
- package/dist/generated/core/bodySerializer.gen.d.ts.map +0 -1
- package/dist/generated/core/bodySerializer.gen.js +0 -58
- package/dist/generated/core/bodySerializer.gen.js.map +0 -1
- package/dist/generated/core/params.gen.d.ts +0 -44
- package/dist/generated/core/params.gen.d.ts.map +0 -1
- package/dist/generated/core/params.gen.js +0 -101
- package/dist/generated/core/params.gen.js.map +0 -1
- package/dist/generated/core/pathSerializer.gen.d.ts +0 -34
- package/dist/generated/core/pathSerializer.gen.d.ts.map +0 -1
- package/dist/generated/core/pathSerializer.gen.js +0 -107
- package/dist/generated/core/pathSerializer.gen.js.map +0 -1
- package/dist/generated/core/queryKeySerializer.gen.d.ts +0 -19
- package/dist/generated/core/queryKeySerializer.gen.d.ts.map +0 -1
- package/dist/generated/core/queryKeySerializer.gen.js +0 -93
- package/dist/generated/core/queryKeySerializer.gen.js.map +0 -1
- package/dist/generated/core/serverSentEvents.gen.d.ts +0 -72
- package/dist/generated/core/serverSentEvents.gen.d.ts.map +0 -1
- package/dist/generated/core/serverSentEvents.gen.js +0 -133
- package/dist/generated/core/serverSentEvents.gen.js.map +0 -1
- package/dist/generated/core/types.gen.d.ts +0 -79
- package/dist/generated/core/types.gen.d.ts.map +0 -1
- package/dist/generated/core/types.gen.js +0 -3
- package/dist/generated/core/types.gen.js.map +0 -1
- package/dist/generated/core/utils.gen.d.ts +0 -20
- package/dist/generated/core/utils.gen.d.ts.map +0 -1
- package/dist/generated/core/utils.gen.js +0 -88
- package/dist/generated/core/utils.gen.js.map +0 -1
- package/dist/generated/index.d.ts +0 -3
- package/dist/generated/index.d.ts.map +0 -1
- package/dist/generated/index.js +0 -3
- package/dist/generated/index.js.map +0 -1
- package/dist/generated/sdk.gen.d.ts +0 -519
- package/dist/generated/sdk.gen.d.ts.map +0 -1
- package/dist/generated/sdk.gen.js +0 -1382
- package/dist/generated/sdk.gen.js.map +0 -1
- package/dist/generated/types.gen.d.ts.map +0 -1
- package/dist/generated/types.gen.js +0 -3
- package/dist/generated/types.gen.js.map +0 -1
- package/dist/generated/valibot.gen.d.ts +0 -35016
- package/dist/generated/valibot.gen.d.ts.map +0 -1
- package/dist/generated/valibot.gen.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
package/src/client.ts
ADDED
|
@@ -0,0 +1,930 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alvera Platform SDK — typed client.
|
|
3
|
+
*
|
|
4
|
+
* Architecture:
|
|
5
|
+
* generated/ auto-generated by @hey-api/openapi-ts (do not edit)
|
|
6
|
+
* sdk.gen.ts type-safe endpoint methods
|
|
7
|
+
* types.gen.ts request/response types from OpenAPI spec
|
|
8
|
+
* client.gen.ts HTTP client instance
|
|
9
|
+
*
|
|
10
|
+
* client.ts (this file) override layer
|
|
11
|
+
* - configures the hey-api client with auth
|
|
12
|
+
* - exposes a curated, ergonomic resource surface
|
|
13
|
+
* - provides corrected types for fields the OpenAPI spec leaves as `object`
|
|
14
|
+
*
|
|
15
|
+
* Regenerate generated/ with: pnpm regen
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { client } from './generated/client.gen.js';
|
|
19
|
+
import { type Client, createClient } from './generated/client/index.js';
|
|
20
|
+
import {
|
|
21
|
+
platformApiActionStatusUpdaterControllerCreate,
|
|
22
|
+
platformApiAdminControllerConfirmUser,
|
|
23
|
+
platformApiAuthControllerSignUp,
|
|
24
|
+
platformApiDatasetControllerCreateUserSearch,
|
|
25
|
+
platformApiInvitationControllerAccept,
|
|
26
|
+
platformApiInvitationControllerCreate,
|
|
27
|
+
platformApiInvitationControllerIndex,
|
|
28
|
+
platformApiTenantControllerCreate,
|
|
29
|
+
platformApiActionStatusUpdaterControllerIndex,
|
|
30
|
+
platformApiActionStatusUpdaterControllerUpdate,
|
|
31
|
+
platformApiAgenticWorkflowControllerCreate,
|
|
32
|
+
platformApiAgenticWorkflowControllerDelete,
|
|
33
|
+
platformApiAgenticWorkflowControllerIndex,
|
|
34
|
+
platformApiAgenticWorkflowControllerMetadata,
|
|
35
|
+
platformApiAgenticWorkflowControllerShow,
|
|
36
|
+
platformApiAgenticWorkflowControllerUpdate,
|
|
37
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogRefresh,
|
|
38
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogShow,
|
|
39
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogStart,
|
|
40
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogStop,
|
|
41
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogsIndex,
|
|
42
|
+
platformApiAgenticWorkflowOperationsControllerExecute,
|
|
43
|
+
platformApiAgenticWorkflowOperationsControllerRunWorkflow,
|
|
44
|
+
platformApiAgenticWorkflowOperationsControllerWorkflowLogDownload,
|
|
45
|
+
platformApiAgenticWorkflowOperationsControllerWorkflowLogShow,
|
|
46
|
+
platformApiAgenticWorkflowOperationsControllerWorkflowLogsIndex,
|
|
47
|
+
platformApiAiAgentControllerCreate,
|
|
48
|
+
platformApiAiAgentControllerDelete,
|
|
49
|
+
platformApiAiAgentControllerIndex,
|
|
50
|
+
platformApiAiAgentControllerShow,
|
|
51
|
+
platformApiAiAgentControllerUpdate,
|
|
52
|
+
platformApiConnectedAppControllerResolvePage,
|
|
53
|
+
platformApiConnectedAppControllerUpdateMessageTracking,
|
|
54
|
+
platformApiConnectedAppMgmtControllerCreate,
|
|
55
|
+
platformApiConnectedAppMgmtControllerIndex,
|
|
56
|
+
platformApiConnectedAppMgmtControllerShow,
|
|
57
|
+
platformApiConnectedAppMgmtControllerSyncRoutes,
|
|
58
|
+
platformApiConnectedAppMgmtControllerUpdate,
|
|
59
|
+
platformApiDataActivationClientControllerCreate,
|
|
60
|
+
platformApiDataActivationClientControllerDelete,
|
|
61
|
+
platformApiDataActivationClientControllerIndex,
|
|
62
|
+
platformApiDataActivationClientControllerIngest,
|
|
63
|
+
platformApiDataActivationClientControllerIngestFile,
|
|
64
|
+
platformApiDataActivationClientControllerLogShow,
|
|
65
|
+
platformApiDataActivationClientControllerLogsIndex,
|
|
66
|
+
platformApiDataActivationClientControllerMetadata,
|
|
67
|
+
platformApiDataActivationClientControllerRunManually,
|
|
68
|
+
platformApiDataActivationClientControllerShow,
|
|
69
|
+
platformApiDataActivationClientControllerUpdate,
|
|
70
|
+
platformApiDatalakeControllerCreate,
|
|
71
|
+
platformApiDatalakeControllerCreateDownloadLink,
|
|
72
|
+
platformApiDatalakeControllerCreateUploadLink,
|
|
73
|
+
platformApiDatalakeControllerIndex,
|
|
74
|
+
platformApiDatalakeControllerMetadata,
|
|
75
|
+
platformApiDatalakeControllerMigrate,
|
|
76
|
+
platformApiDatalakeControllerShow,
|
|
77
|
+
platformApiDatasetControllerDatasetMetadata,
|
|
78
|
+
platformApiDatasetControllerSearch,
|
|
79
|
+
platformApiDataSourceControllerCreate,
|
|
80
|
+
platformApiDataSourceControllerIndex,
|
|
81
|
+
platformApiDataSourceControllerUpdate,
|
|
82
|
+
platformApiGenericTableControllerCreate,
|
|
83
|
+
platformApiGenericTableControllerIndex,
|
|
84
|
+
platformApiInteroperabilityContractControllerCreate,
|
|
85
|
+
platformApiInteroperabilityContractControllerDelete,
|
|
86
|
+
platformApiInteroperabilityContractControllerIndex,
|
|
87
|
+
platformApiInteroperabilityContractControllerMetadata,
|
|
88
|
+
platformApiInteroperabilityContractControllerRun,
|
|
89
|
+
platformApiInteroperabilityContractControllerShow,
|
|
90
|
+
platformApiInteroperabilityContractControllerUpdate,
|
|
91
|
+
platformApiMdmControllerVerify,
|
|
92
|
+
platformApiPingControllerPing,
|
|
93
|
+
platformApiSessionControllerCreate,
|
|
94
|
+
platformApiSessionControllerDelete,
|
|
95
|
+
platformApiSessionControllerVerify,
|
|
96
|
+
platformApiTenantControllerIndex,
|
|
97
|
+
platformApiToolControllerCreate,
|
|
98
|
+
platformApiToolControllerDelete,
|
|
99
|
+
platformApiToolControllerIndex,
|
|
100
|
+
platformApiToolControllerShow,
|
|
101
|
+
platformApiToolControllerTestInvocation,
|
|
102
|
+
platformApiToolControllerUpdate,
|
|
103
|
+
} from './generated/sdk.gen.js';
|
|
104
|
+
|
|
105
|
+
// Re-export generated types that are correct as-is
|
|
106
|
+
export type {
|
|
107
|
+
ActionStatusUpdaterResponse,
|
|
108
|
+
AgenticWorkflowListResponse,
|
|
109
|
+
AgenticWorkflowRequestWritable,
|
|
110
|
+
AgenticWorkflowResponse,
|
|
111
|
+
AiAgentResponse,
|
|
112
|
+
BatchLogListResponse,
|
|
113
|
+
BatchLogResponse,
|
|
114
|
+
ConnectedAppListResponse,
|
|
115
|
+
ConnectedAppRequestWritable,
|
|
116
|
+
ConnectedAppResponse,
|
|
117
|
+
DataActivationClientListResponse,
|
|
118
|
+
DataActivationClientLogListResponse,
|
|
119
|
+
DataActivationClientLogResponse,
|
|
120
|
+
DataActivationClientRequestWritable,
|
|
121
|
+
DataActivationClientResponse,
|
|
122
|
+
DatalakeRequestWritable,
|
|
123
|
+
DatalakeResponse,
|
|
124
|
+
DatasetSearchResponse,
|
|
125
|
+
DataSourceRequest,
|
|
126
|
+
DataSourceResponse,
|
|
127
|
+
DownloadUrlResponse,
|
|
128
|
+
ExecuteActionRequest,
|
|
129
|
+
ExecuteActionResponse,
|
|
130
|
+
GenericTableResponse,
|
|
131
|
+
IngestFileRequest,
|
|
132
|
+
IngestRequest,
|
|
133
|
+
InteroperabilityContractListResponse,
|
|
134
|
+
InteroperabilityContractRequestWritable,
|
|
135
|
+
InteroperabilityContractResponse,
|
|
136
|
+
InteroperabilityRunRequest,
|
|
137
|
+
InteroperabilityRunResponse,
|
|
138
|
+
MdmVerifyRequest,
|
|
139
|
+
MdmVerifyResponse,
|
|
140
|
+
PaginationMeta,
|
|
141
|
+
ResolvePageRequest,
|
|
142
|
+
RunManuallyRequestWritable,
|
|
143
|
+
RunManuallyResponse,
|
|
144
|
+
RunWorkflowRequest,
|
|
145
|
+
RunWorkflowResponse,
|
|
146
|
+
SessionResponse,
|
|
147
|
+
SyncRoutesResponse,
|
|
148
|
+
TenantListResponse,
|
|
149
|
+
TenantResponse,
|
|
150
|
+
ToolRequest,
|
|
151
|
+
ToolResponse,
|
|
152
|
+
UpdatePageRequest,
|
|
153
|
+
UploadLinkRequest,
|
|
154
|
+
UploadLinkResponse,
|
|
155
|
+
WorkflowLogListResponse,
|
|
156
|
+
WorkflowLogResponse,
|
|
157
|
+
} from './generated/types.gen.js';
|
|
158
|
+
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
// Manual type overrides — spec has untyped `object` fields for these
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
|
|
163
|
+
export interface GenericTableColumn {
|
|
164
|
+
name: string;
|
|
165
|
+
title?: string;
|
|
166
|
+
type?: 'string' | 'integer' | 'float' | 'boolean' | 'date' | 'datetime' | 'time';
|
|
167
|
+
description: string;
|
|
168
|
+
privacy_requirement?: 'none' | 'tokenize' | 'redact_only';
|
|
169
|
+
is_required?: boolean;
|
|
170
|
+
is_unique?: boolean;
|
|
171
|
+
is_array?: boolean;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface CreateGenericTableRequest {
|
|
175
|
+
title: string;
|
|
176
|
+
description?: string;
|
|
177
|
+
data_domain?:
|
|
178
|
+
| 'healthcare'
|
|
179
|
+
| 'core_banking'
|
|
180
|
+
| 'payment_risk'
|
|
181
|
+
| 'accounts_receivable'
|
|
182
|
+
| 'service_commerce'
|
|
183
|
+
| 'trading'
|
|
184
|
+
| null;
|
|
185
|
+
columns: GenericTableColumn[];
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface CloudWatchUpdaterBody {
|
|
189
|
+
__type__: 'cloud_watch_request';
|
|
190
|
+
log_group_name: string;
|
|
191
|
+
start_time: string;
|
|
192
|
+
end_time: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface RestApiUpdaterBody {
|
|
196
|
+
__type__: 'restapi_request';
|
|
197
|
+
[key: string]: unknown;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface TemplateConfig {
|
|
201
|
+
type: 'system' | 'custom';
|
|
202
|
+
path?: string;
|
|
203
|
+
body?: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface CreateActionStatusUpdaterRequest {
|
|
207
|
+
name: string;
|
|
208
|
+
cron_expression: string;
|
|
209
|
+
updater_type: 'cloud_watch' | 'restapi';
|
|
210
|
+
updater_tool_id: string;
|
|
211
|
+
datalake_id: string;
|
|
212
|
+
sender_tool_ids?: string[] | null;
|
|
213
|
+
message_config?: TemplateConfig;
|
|
214
|
+
action_log_config?: TemplateConfig | null;
|
|
215
|
+
updater_body?: CloudWatchUpdaterBody | RestApiUpdaterBody;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface CreateAiAgentRequest {
|
|
219
|
+
name: string;
|
|
220
|
+
model: string;
|
|
221
|
+
tool_id: string;
|
|
222
|
+
data_access: 'regulated' | 'unregulated';
|
|
223
|
+
temperature: number;
|
|
224
|
+
max_tokens: number;
|
|
225
|
+
enabled: boolean;
|
|
226
|
+
slug?: string;
|
|
227
|
+
description?: string | null;
|
|
228
|
+
input_schema?: Record<string, unknown> | null;
|
|
229
|
+
llm_response_schema?: Record<string, unknown> | null;
|
|
230
|
+
prompt_config?: Record<string, unknown> | null;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// ---------------------------------------------------------------------------
|
|
234
|
+
// Auth — session-based (Bearer token)
|
|
235
|
+
// ---------------------------------------------------------------------------
|
|
236
|
+
|
|
237
|
+
export interface CreateSessionParams {
|
|
238
|
+
baseUrl: string;
|
|
239
|
+
email: string;
|
|
240
|
+
password: string;
|
|
241
|
+
/**
|
|
242
|
+
* Tenant slug to scope the session to. Omit to mint a tenantless Bearer
|
|
243
|
+
* for admin operations or the pre-tenant phase of the self-bootstrap
|
|
244
|
+
* flow (sign-up → confirm → tenants.create). When omitted, the returned
|
|
245
|
+
* `tenant` and `role` fields are null.
|
|
246
|
+
*/
|
|
247
|
+
tenantSlug?: string;
|
|
248
|
+
/** Session duration in seconds. Default 86400 (24h). Max 2592000 (30d). */
|
|
249
|
+
expiresIn?: number;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface SessionResult {
|
|
253
|
+
/** Bearer token to pass into createPlatformApi. */
|
|
254
|
+
sessionToken: string;
|
|
255
|
+
/** ISO-8601 expiration timestamp, or null for non-expiring sessions. */
|
|
256
|
+
expiresAt: string | null;
|
|
257
|
+
/** Null for tenantless sessions (admin / pre-tenant bootstrap). */
|
|
258
|
+
tenant: { id: string; slug: string; name: string } | null;
|
|
259
|
+
/** Null for tenantless sessions. */
|
|
260
|
+
role: { id: string; name: string } | null;
|
|
261
|
+
user: { id: string; firstName: string | null; lastName: string | null } | null;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Exchange user credentials for a Bearer session token. Pass `tenantSlug`
|
|
266
|
+
* for a tenant-scoped session (the common case); omit it for a tenantless
|
|
267
|
+
* Bearer used by admin endpoints (`PUT /admin/users/:id/confirm`) or the
|
|
268
|
+
* pre-tenant bootstrap phase.
|
|
269
|
+
*
|
|
270
|
+
* Throws on any non-2xx response (e.g. 401 invalid credentials).
|
|
271
|
+
*/
|
|
272
|
+
export async function createSession(
|
|
273
|
+
params: CreateSessionParams,
|
|
274
|
+
): Promise<SessionResult> {
|
|
275
|
+
client.setConfig({ baseUrl: params.baseUrl.replace(/\/$/, '') });
|
|
276
|
+
|
|
277
|
+
const { data } = await platformApiSessionControllerCreate({
|
|
278
|
+
body: {
|
|
279
|
+
email: params.email,
|
|
280
|
+
password: params.password,
|
|
281
|
+
...(params.tenantSlug !== undefined ? { tenant_slug: params.tenantSlug } : {}),
|
|
282
|
+
...(params.expiresIn !== undefined ? { expires_in: params.expiresIn } : {}),
|
|
283
|
+
},
|
|
284
|
+
throwOnError: true,
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
if (!data.session_token) {
|
|
288
|
+
throw new Error('Session created but no session_token was returned.');
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return {
|
|
292
|
+
sessionToken: data.session_token,
|
|
293
|
+
expiresAt: data.expires_at ?? null,
|
|
294
|
+
tenant: data.tenant
|
|
295
|
+
? { id: data.tenant.id, slug: data.tenant.slug, name: data.tenant.name }
|
|
296
|
+
: null,
|
|
297
|
+
role: data.role ? { id: data.role.id, name: data.role.name } : null,
|
|
298
|
+
user: data.user
|
|
299
|
+
? {
|
|
300
|
+
id: data.user.id,
|
|
301
|
+
firstName: data.user.first_name ?? null,
|
|
302
|
+
lastName: data.user.last_name ?? null,
|
|
303
|
+
}
|
|
304
|
+
: null,
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Revoke the currently-configured session token. After calling this,
|
|
310
|
+
* the api instance will reject every subsequent request with 401.
|
|
311
|
+
*/
|
|
312
|
+
export async function revokeSession(): Promise<void> {
|
|
313
|
+
await platformApiSessionControllerDelete({ throwOnError: true });
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// ---------------------------------------------------------------------------
|
|
317
|
+
// Config
|
|
318
|
+
// ---------------------------------------------------------------------------
|
|
319
|
+
|
|
320
|
+
export interface ApiConfig {
|
|
321
|
+
baseUrl: string;
|
|
322
|
+
sessionToken: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// ---------------------------------------------------------------------------
|
|
326
|
+
// Factories — two named entry points
|
|
327
|
+
//
|
|
328
|
+
// createPlatformApi(config) singleton mode (default)
|
|
329
|
+
// Mutates the shared, generated client. Cheap, single-bearer-at-a-time.
|
|
330
|
+
// Right for CLIs and single-user web apps where one logged-in user holds
|
|
331
|
+
// exactly one bearer at any moment.
|
|
332
|
+
//
|
|
333
|
+
// createIsolatedPlatformApi(config) private-client mode
|
|
334
|
+
// Builds its own Client via createClient() and threads it on every call.
|
|
335
|
+
// Right for code that needs MULTIPLE concurrent APIs bound to DIFFERENT
|
|
336
|
+
// bearers in the same process — integration tests holding a root session
|
|
337
|
+
// and a tenant-scoped session at once, or multi-tenant background jobs.
|
|
338
|
+
//
|
|
339
|
+
// Both factories return the same PlatformApi shape, built by _buildApi().
|
|
340
|
+
// ---------------------------------------------------------------------------
|
|
341
|
+
|
|
342
|
+
export type PlatformApi = ReturnType<typeof _buildApi>;
|
|
343
|
+
|
|
344
|
+
export interface DatasetSearchOptions {
|
|
345
|
+
datalakeId?: string;
|
|
346
|
+
userSearchId?: string;
|
|
347
|
+
/**
|
|
348
|
+
* Optional override for the data access mode used by this read.
|
|
349
|
+
* Defaults to the session's `data_access_mode`. The session's capability
|
|
350
|
+
* ceiling still applies — escalating beyond it returns 403.
|
|
351
|
+
*/
|
|
352
|
+
dataAccessMode?: 'regulated' | 'unregulated';
|
|
353
|
+
page?: number;
|
|
354
|
+
pageSize?: number;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface DatasetMetadataOptions {
|
|
358
|
+
datalakeId?: string;
|
|
359
|
+
genericTableId?: string;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export function createPlatformApi(config: ApiConfig): PlatformApi {
|
|
363
|
+
const baseUrl = config.baseUrl.replace(/\/$/, '');
|
|
364
|
+
const headers = { Authorization: `Bearer ${config.sessionToken}` };
|
|
365
|
+
client.setConfig({ baseUrl, headers });
|
|
366
|
+
return _buildApi(client);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export function createIsolatedPlatformApi(config: ApiConfig): PlatformApi {
|
|
370
|
+
const baseUrl = config.baseUrl.replace(/\/$/, '');
|
|
371
|
+
const headers = { Authorization: `Bearer ${config.sessionToken}` };
|
|
372
|
+
return _buildApi(createClient({ baseUrl, headers }));
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
function _buildApi(myClient: Client) {
|
|
376
|
+
return {
|
|
377
|
+
ping: () =>
|
|
378
|
+
platformApiPingControllerPing({ client: myClient, throwOnError: true }),
|
|
379
|
+
|
|
380
|
+
sessions: {
|
|
381
|
+
verify: () =>
|
|
382
|
+
platformApiSessionControllerVerify({ client: myClient, throwOnError: true }),
|
|
383
|
+
},
|
|
384
|
+
|
|
385
|
+
auth: {
|
|
386
|
+
signUp: (body: Record<string, unknown>) =>
|
|
387
|
+
platformApiAuthControllerSignUp({ body: body as never, client: myClient, throwOnError: true }),
|
|
388
|
+
},
|
|
389
|
+
|
|
390
|
+
admin: {
|
|
391
|
+
confirmUser: (id: string) =>
|
|
392
|
+
platformApiAdminControllerConfirmUser({ path: { id }, client: myClient, throwOnError: true }),
|
|
393
|
+
},
|
|
394
|
+
|
|
395
|
+
tenants: {
|
|
396
|
+
list: () =>
|
|
397
|
+
platformApiTenantControllerIndex({ client: myClient, throwOnError: true }),
|
|
398
|
+
create: (body: Record<string, unknown>) =>
|
|
399
|
+
platformApiTenantControllerCreate({ body: body as never, client: myClient, throwOnError: true }),
|
|
400
|
+
},
|
|
401
|
+
|
|
402
|
+
invitations: {
|
|
403
|
+
list: () =>
|
|
404
|
+
platformApiInvitationControllerIndex({ client: myClient, throwOnError: true }),
|
|
405
|
+
create: (tenantSlug: string, body: Record<string, unknown>) =>
|
|
406
|
+
platformApiInvitationControllerCreate({
|
|
407
|
+
path: { tenant_slug: tenantSlug },
|
|
408
|
+
body: body as never,
|
|
409
|
+
client: myClient, throwOnError: true,
|
|
410
|
+
}),
|
|
411
|
+
accept: (id: string) =>
|
|
412
|
+
platformApiInvitationControllerAccept({ path: { id }, client: myClient, throwOnError: true }),
|
|
413
|
+
},
|
|
414
|
+
|
|
415
|
+
datasets: {
|
|
416
|
+
search: (dataset: string, options: DatasetSearchOptions = {}) =>
|
|
417
|
+
platformApiDatasetControllerSearch({
|
|
418
|
+
path: { dataset },
|
|
419
|
+
query: {
|
|
420
|
+
...(options.datalakeId !== undefined ? { datalake_id: options.datalakeId } : {}),
|
|
421
|
+
...(options.userSearchId !== undefined ? { user_search_id: options.userSearchId } : {}),
|
|
422
|
+
...(options.dataAccessMode !== undefined
|
|
423
|
+
? { data_access_mode: options.dataAccessMode }
|
|
424
|
+
: {}),
|
|
425
|
+
...(options.page !== undefined ? { page: options.page } : {}),
|
|
426
|
+
...(options.pageSize !== undefined ? { page_size: options.pageSize } : {}),
|
|
427
|
+
},
|
|
428
|
+
client: myClient, throwOnError: true,
|
|
429
|
+
}),
|
|
430
|
+
metadata: (datasetType: string, options: DatasetMetadataOptions = {}) =>
|
|
431
|
+
platformApiDatasetControllerDatasetMetadata({
|
|
432
|
+
path: { dataset_type: datasetType },
|
|
433
|
+
query: {
|
|
434
|
+
...(options.datalakeId !== undefined ? { datalake_id: options.datalakeId } : {}),
|
|
435
|
+
...(options.genericTableId !== undefined
|
|
436
|
+
? { generic_table_id: options.genericTableId }
|
|
437
|
+
: {}),
|
|
438
|
+
},
|
|
439
|
+
client: myClient, throwOnError: true,
|
|
440
|
+
}),
|
|
441
|
+
createUserSearch: (
|
|
442
|
+
dataset: string,
|
|
443
|
+
body: Record<string, unknown>,
|
|
444
|
+
options: { datalakeId?: string } = {},
|
|
445
|
+
) =>
|
|
446
|
+
platformApiDatasetControllerCreateUserSearch({
|
|
447
|
+
path: { dataset },
|
|
448
|
+
query: options.datalakeId !== undefined ? { datalake_id: options.datalakeId } : {},
|
|
449
|
+
body: body as never,
|
|
450
|
+
client: myClient, throwOnError: true,
|
|
451
|
+
}),
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
datalakes: {
|
|
455
|
+
list: (tenantSlug: string) =>
|
|
456
|
+
platformApiDatalakeControllerIndex({
|
|
457
|
+
path: { tenant_slug: tenantSlug },
|
|
458
|
+
client: myClient, throwOnError: true,
|
|
459
|
+
}),
|
|
460
|
+
get: (tenantSlug: string, id: string) =>
|
|
461
|
+
platformApiDatalakeControllerShow({
|
|
462
|
+
path: { tenant_slug: tenantSlug, id },
|
|
463
|
+
client: myClient, throwOnError: true,
|
|
464
|
+
}),
|
|
465
|
+
create: (tenantSlug: string, body: Record<string, unknown>) =>
|
|
466
|
+
platformApiDatalakeControllerCreate({
|
|
467
|
+
path: { tenant_slug: tenantSlug },
|
|
468
|
+
body: body as never,
|
|
469
|
+
client: myClient, throwOnError: true,
|
|
470
|
+
}),
|
|
471
|
+
metadata: (tenantSlug: string, datalakeSlug: string) =>
|
|
472
|
+
platformApiDatalakeControllerMetadata({
|
|
473
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
474
|
+
client: myClient, throwOnError: true,
|
|
475
|
+
}),
|
|
476
|
+
migrate: (tenantSlug: string, datalakeSlug: string) =>
|
|
477
|
+
platformApiDatalakeControllerMigrate({
|
|
478
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
479
|
+
client: myClient, throwOnError: true,
|
|
480
|
+
}),
|
|
481
|
+
createUploadLink: (
|
|
482
|
+
tenantSlug: string,
|
|
483
|
+
datalakeSlug: string,
|
|
484
|
+
body: { content_type: 'application/x-ndjson' | 'text/csv'; filename: string },
|
|
485
|
+
) =>
|
|
486
|
+
platformApiDatalakeControllerCreateUploadLink({
|
|
487
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
488
|
+
body,
|
|
489
|
+
client: myClient, throwOnError: true,
|
|
490
|
+
}),
|
|
491
|
+
createDownloadLink: (
|
|
492
|
+
tenantSlug: string,
|
|
493
|
+
datalakeSlug: string,
|
|
494
|
+
body: { bucket: string; key: string },
|
|
495
|
+
) =>
|
|
496
|
+
platformApiDatalakeControllerCreateDownloadLink({
|
|
497
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
498
|
+
body,
|
|
499
|
+
client: myClient, throwOnError: true,
|
|
500
|
+
}),
|
|
501
|
+
},
|
|
502
|
+
|
|
503
|
+
dataSources: {
|
|
504
|
+
list: (tenantSlug: string, datalakeSlug: string) =>
|
|
505
|
+
platformApiDataSourceControllerIndex({
|
|
506
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
507
|
+
client: myClient, throwOnError: true,
|
|
508
|
+
}),
|
|
509
|
+
create: (tenantSlug: string, datalakeSlug: string, body: Record<string, unknown>) =>
|
|
510
|
+
platformApiDataSourceControllerCreate({
|
|
511
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
512
|
+
body: body as never,
|
|
513
|
+
client: myClient, throwOnError: true,
|
|
514
|
+
}),
|
|
515
|
+
update: (
|
|
516
|
+
tenantSlug: string,
|
|
517
|
+
datalakeSlug: string,
|
|
518
|
+
id: string,
|
|
519
|
+
body: Record<string, unknown>,
|
|
520
|
+
) =>
|
|
521
|
+
platformApiDataSourceControllerUpdate({
|
|
522
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
523
|
+
body: body as never,
|
|
524
|
+
client: myClient, throwOnError: true,
|
|
525
|
+
}),
|
|
526
|
+
},
|
|
527
|
+
|
|
528
|
+
tools: {
|
|
529
|
+
list: (tenantSlug: string) =>
|
|
530
|
+
platformApiToolControllerIndex({
|
|
531
|
+
path: { tenant_slug: tenantSlug },
|
|
532
|
+
client: myClient, throwOnError: true,
|
|
533
|
+
}),
|
|
534
|
+
get: (tenantSlug: string, id: string) =>
|
|
535
|
+
platformApiToolControllerShow({
|
|
536
|
+
path: { tenant_slug: tenantSlug, id },
|
|
537
|
+
client: myClient, throwOnError: true,
|
|
538
|
+
}),
|
|
539
|
+
create: (tenantSlug: string, body: Record<string, unknown>) =>
|
|
540
|
+
platformApiToolControllerCreate({
|
|
541
|
+
path: { tenant_slug: tenantSlug },
|
|
542
|
+
body: body as never,
|
|
543
|
+
client: myClient, throwOnError: true,
|
|
544
|
+
}),
|
|
545
|
+
update: (tenantSlug: string, id: string, body: Record<string, unknown>) =>
|
|
546
|
+
platformApiToolControllerUpdate({
|
|
547
|
+
path: { tenant_slug: tenantSlug, id },
|
|
548
|
+
body: body as never,
|
|
549
|
+
client: myClient, throwOnError: true,
|
|
550
|
+
}),
|
|
551
|
+
delete: (tenantSlug: string, id: string) =>
|
|
552
|
+
platformApiToolControllerDelete({
|
|
553
|
+
path: { tenant_slug: tenantSlug, id },
|
|
554
|
+
client: myClient, throwOnError: true,
|
|
555
|
+
}),
|
|
556
|
+
testInvocation: (tenantSlug: string, id: string, body: Record<string, unknown>) =>
|
|
557
|
+
platformApiToolControllerTestInvocation({
|
|
558
|
+
path: { tenant_slug: tenantSlug, id },
|
|
559
|
+
body: body as never,
|
|
560
|
+
client: myClient, throwOnError: true,
|
|
561
|
+
}),
|
|
562
|
+
},
|
|
563
|
+
|
|
564
|
+
genericTables: {
|
|
565
|
+
list: (tenantSlug: string, datalakeSlug: string) =>
|
|
566
|
+
platformApiGenericTableControllerIndex({
|
|
567
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
568
|
+
client: myClient, throwOnError: true,
|
|
569
|
+
}),
|
|
570
|
+
create: (tenantSlug: string, datalakeSlug: string, body: CreateGenericTableRequest) =>
|
|
571
|
+
platformApiGenericTableControllerCreate({
|
|
572
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
573
|
+
body: body as never,
|
|
574
|
+
client: myClient, throwOnError: true,
|
|
575
|
+
}),
|
|
576
|
+
},
|
|
577
|
+
|
|
578
|
+
actionStatusUpdaters: {
|
|
579
|
+
list: (tenantSlug: string) =>
|
|
580
|
+
platformApiActionStatusUpdaterControllerIndex({
|
|
581
|
+
path: { tenant_slug: tenantSlug },
|
|
582
|
+
client: myClient, throwOnError: true,
|
|
583
|
+
}),
|
|
584
|
+
create: (tenantSlug: string, body: CreateActionStatusUpdaterRequest) =>
|
|
585
|
+
platformApiActionStatusUpdaterControllerCreate({
|
|
586
|
+
path: { tenant_slug: tenantSlug },
|
|
587
|
+
body: body as never,
|
|
588
|
+
client: myClient, throwOnError: true,
|
|
589
|
+
}),
|
|
590
|
+
update: (tenantSlug: string, id: string, body: CreateActionStatusUpdaterRequest) =>
|
|
591
|
+
platformApiActionStatusUpdaterControllerUpdate({
|
|
592
|
+
path: { tenant_slug: tenantSlug, id },
|
|
593
|
+
body: body as never,
|
|
594
|
+
client: myClient, throwOnError: true,
|
|
595
|
+
}),
|
|
596
|
+
},
|
|
597
|
+
|
|
598
|
+
aiAgents: {
|
|
599
|
+
list: (tenantSlug: string, datalakeSlug: string) =>
|
|
600
|
+
platformApiAiAgentControllerIndex({
|
|
601
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
602
|
+
client: myClient, throwOnError: true,
|
|
603
|
+
}),
|
|
604
|
+
get: (tenantSlug: string, datalakeSlug: string, id: string) =>
|
|
605
|
+
platformApiAiAgentControllerShow({
|
|
606
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
607
|
+
client: myClient, throwOnError: true,
|
|
608
|
+
}),
|
|
609
|
+
create: (tenantSlug: string, datalakeSlug: string, body: CreateAiAgentRequest) =>
|
|
610
|
+
platformApiAiAgentControllerCreate({
|
|
611
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
612
|
+
body: body as never,
|
|
613
|
+
client: myClient, throwOnError: true,
|
|
614
|
+
}),
|
|
615
|
+
update: (tenantSlug: string, datalakeSlug: string, id: string, body: CreateAiAgentRequest) =>
|
|
616
|
+
platformApiAiAgentControllerUpdate({
|
|
617
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
618
|
+
body: body as never,
|
|
619
|
+
client: myClient, throwOnError: true,
|
|
620
|
+
}),
|
|
621
|
+
delete: (tenantSlug: string, datalakeSlug: string, id: string) =>
|
|
622
|
+
platformApiAiAgentControllerDelete({
|
|
623
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
624
|
+
client: myClient, throwOnError: true,
|
|
625
|
+
}),
|
|
626
|
+
},
|
|
627
|
+
|
|
628
|
+
connectedApps: {
|
|
629
|
+
// datalake-scoped management
|
|
630
|
+
list: (tenantSlug: string, datalakeSlug: string) =>
|
|
631
|
+
platformApiConnectedAppMgmtControllerIndex({
|
|
632
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
633
|
+
client: myClient, throwOnError: true,
|
|
634
|
+
}),
|
|
635
|
+
get: (tenantSlug: string, datalakeSlug: string, id: string) =>
|
|
636
|
+
platformApiConnectedAppMgmtControllerShow({
|
|
637
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
638
|
+
client: myClient, throwOnError: true,
|
|
639
|
+
}),
|
|
640
|
+
create: (tenantSlug: string, datalakeSlug: string, body: Record<string, unknown>) =>
|
|
641
|
+
platformApiConnectedAppMgmtControllerCreate({
|
|
642
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
643
|
+
body: body as never,
|
|
644
|
+
client: myClient, throwOnError: true,
|
|
645
|
+
}),
|
|
646
|
+
update: (tenantSlug: string, datalakeSlug: string, id: string, body: Record<string, unknown>) =>
|
|
647
|
+
platformApiConnectedAppMgmtControllerUpdate({
|
|
648
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
649
|
+
body: body as never,
|
|
650
|
+
client: myClient, throwOnError: true,
|
|
651
|
+
}),
|
|
652
|
+
syncRoutes: (tenantSlug: string, datalakeSlug: string, id: string) =>
|
|
653
|
+
platformApiConnectedAppMgmtControllerSyncRoutes({
|
|
654
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
655
|
+
client: myClient, throwOnError: true,
|
|
656
|
+
}),
|
|
657
|
+
// tenant-scoped runtime actions (by slug)
|
|
658
|
+
resolvePage: (tenantSlug: string, slug: string, body: Record<string, unknown>) =>
|
|
659
|
+
platformApiConnectedAppControllerResolvePage({
|
|
660
|
+
path: { tenant_slug: tenantSlug, slug },
|
|
661
|
+
body: body as never,
|
|
662
|
+
client: myClient, throwOnError: true,
|
|
663
|
+
}),
|
|
664
|
+
updateMessageTracking: (
|
|
665
|
+
tenantSlug: string,
|
|
666
|
+
slug: string,
|
|
667
|
+
body: Record<string, unknown>,
|
|
668
|
+
) =>
|
|
669
|
+
platformApiConnectedAppControllerUpdateMessageTracking({
|
|
670
|
+
path: { tenant_slug: tenantSlug, slug },
|
|
671
|
+
body: body as never,
|
|
672
|
+
client: myClient, throwOnError: true,
|
|
673
|
+
}),
|
|
674
|
+
},
|
|
675
|
+
|
|
676
|
+
dataActivationClients: {
|
|
677
|
+
list: (tenantSlug: string, datalakeSlug: string) =>
|
|
678
|
+
platformApiDataActivationClientControllerIndex({
|
|
679
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
680
|
+
client: myClient, throwOnError: true,
|
|
681
|
+
}),
|
|
682
|
+
get: (tenantSlug: string, datalakeSlug: string, slug: string) =>
|
|
683
|
+
platformApiDataActivationClientControllerShow({
|
|
684
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
685
|
+
client: myClient, throwOnError: true,
|
|
686
|
+
}),
|
|
687
|
+
create: (tenantSlug: string, datalakeSlug: string, body: Record<string, unknown>) =>
|
|
688
|
+
platformApiDataActivationClientControllerCreate({
|
|
689
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
690
|
+
body: body as never,
|
|
691
|
+
client: myClient, throwOnError: true,
|
|
692
|
+
}),
|
|
693
|
+
update: (
|
|
694
|
+
tenantSlug: string,
|
|
695
|
+
datalakeSlug: string,
|
|
696
|
+
slug: string,
|
|
697
|
+
body: Record<string, unknown>,
|
|
698
|
+
) =>
|
|
699
|
+
platformApiDataActivationClientControllerUpdate({
|
|
700
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
701
|
+
body: body as never,
|
|
702
|
+
client: myClient, throwOnError: true,
|
|
703
|
+
}),
|
|
704
|
+
delete: (tenantSlug: string, datalakeSlug: string, slug: string) =>
|
|
705
|
+
platformApiDataActivationClientControllerDelete({
|
|
706
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
707
|
+
client: myClient, throwOnError: true,
|
|
708
|
+
}),
|
|
709
|
+
metadata: (tenantSlug: string, datalakeSlug: string, slug: string) =>
|
|
710
|
+
platformApiDataActivationClientControllerMetadata({
|
|
711
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
712
|
+
client: myClient, throwOnError: true,
|
|
713
|
+
}),
|
|
714
|
+
runManually: (
|
|
715
|
+
tenantSlug: string,
|
|
716
|
+
datalakeSlug: string,
|
|
717
|
+
slug: string,
|
|
718
|
+
body?: Record<string, unknown>,
|
|
719
|
+
) =>
|
|
720
|
+
platformApiDataActivationClientControllerRunManually({
|
|
721
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
722
|
+
body: (body ?? {}) as never,
|
|
723
|
+
client: myClient, throwOnError: true,
|
|
724
|
+
}),
|
|
725
|
+
ingest: (
|
|
726
|
+
tenantSlug: string,
|
|
727
|
+
datalakeSlug: string,
|
|
728
|
+
slug: string,
|
|
729
|
+
body: Record<string, unknown>,
|
|
730
|
+
) =>
|
|
731
|
+
platformApiDataActivationClientControllerIngest({
|
|
732
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
733
|
+
body: body as never,
|
|
734
|
+
client: myClient, throwOnError: true,
|
|
735
|
+
}),
|
|
736
|
+
ingestFile: (
|
|
737
|
+
tenantSlug: string,
|
|
738
|
+
datalakeSlug: string,
|
|
739
|
+
slug: string,
|
|
740
|
+
body: { key: string },
|
|
741
|
+
) =>
|
|
742
|
+
platformApiDataActivationClientControllerIngestFile({
|
|
743
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
744
|
+
body,
|
|
745
|
+
client: myClient, throwOnError: true,
|
|
746
|
+
}),
|
|
747
|
+
logs: {
|
|
748
|
+
list: (tenantSlug: string, datalakeSlug: string, slug: string) =>
|
|
749
|
+
platformApiDataActivationClientControllerLogsIndex({
|
|
750
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
751
|
+
client: myClient, throwOnError: true,
|
|
752
|
+
}),
|
|
753
|
+
get: (tenantSlug: string, datalakeSlug: string, slug: string, id: string) =>
|
|
754
|
+
platformApiDataActivationClientControllerLogShow({
|
|
755
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug, id },
|
|
756
|
+
client: myClient, throwOnError: true,
|
|
757
|
+
}),
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
|
|
761
|
+
interoperabilityContracts: {
|
|
762
|
+
list: (tenantSlug: string, datalakeSlug: string) =>
|
|
763
|
+
platformApiInteroperabilityContractControllerIndex({
|
|
764
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
765
|
+
client: myClient, throwOnError: true,
|
|
766
|
+
}),
|
|
767
|
+
get: (tenantSlug: string, datalakeSlug: string, slug: string) =>
|
|
768
|
+
platformApiInteroperabilityContractControllerShow({
|
|
769
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
770
|
+
client: myClient, throwOnError: true,
|
|
771
|
+
}),
|
|
772
|
+
create: (tenantSlug: string, datalakeSlug: string, body: Record<string, unknown>) =>
|
|
773
|
+
platformApiInteroperabilityContractControllerCreate({
|
|
774
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
775
|
+
body: body as never,
|
|
776
|
+
client: myClient, throwOnError: true,
|
|
777
|
+
}),
|
|
778
|
+
update: (
|
|
779
|
+
tenantSlug: string,
|
|
780
|
+
datalakeSlug: string,
|
|
781
|
+
slug: string,
|
|
782
|
+
body: Record<string, unknown>,
|
|
783
|
+
) =>
|
|
784
|
+
platformApiInteroperabilityContractControllerUpdate({
|
|
785
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
786
|
+
body: body as never,
|
|
787
|
+
client: myClient, throwOnError: true,
|
|
788
|
+
}),
|
|
789
|
+
delete: (tenantSlug: string, datalakeSlug: string, slug: string) =>
|
|
790
|
+
platformApiInteroperabilityContractControllerDelete({
|
|
791
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
792
|
+
client: myClient, throwOnError: true,
|
|
793
|
+
}),
|
|
794
|
+
metadata: (tenantSlug: string, datalakeSlug: string, slug: string) =>
|
|
795
|
+
platformApiInteroperabilityContractControllerMetadata({
|
|
796
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
797
|
+
client: myClient, throwOnError: true,
|
|
798
|
+
}),
|
|
799
|
+
run: (
|
|
800
|
+
tenantSlug: string,
|
|
801
|
+
datalakeSlug: string,
|
|
802
|
+
slug: string,
|
|
803
|
+
body: Record<string, unknown>,
|
|
804
|
+
) =>
|
|
805
|
+
platformApiInteroperabilityContractControllerRun({
|
|
806
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, slug },
|
|
807
|
+
body: body as never,
|
|
808
|
+
client: myClient, throwOnError: true,
|
|
809
|
+
}),
|
|
810
|
+
},
|
|
811
|
+
|
|
812
|
+
mdm: {
|
|
813
|
+
verify: (tenantSlug: string, datalakeSlug: string, body: Record<string, unknown>) =>
|
|
814
|
+
platformApiMdmControllerVerify({
|
|
815
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
816
|
+
body: body as never,
|
|
817
|
+
client: myClient, throwOnError: true,
|
|
818
|
+
}),
|
|
819
|
+
},
|
|
820
|
+
|
|
821
|
+
workflows: {
|
|
822
|
+
// CRUD — datalake-scoped, addressed by workflow id
|
|
823
|
+
list: (tenantSlug: string, datalakeSlug: string) =>
|
|
824
|
+
platformApiAgenticWorkflowControllerIndex({
|
|
825
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
826
|
+
client: myClient, throwOnError: true,
|
|
827
|
+
}),
|
|
828
|
+
get: (tenantSlug: string, datalakeSlug: string, id: string) =>
|
|
829
|
+
platformApiAgenticWorkflowControllerShow({
|
|
830
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
831
|
+
client: myClient, throwOnError: true,
|
|
832
|
+
}),
|
|
833
|
+
create: (tenantSlug: string, datalakeSlug: string, body: Record<string, unknown>) =>
|
|
834
|
+
platformApiAgenticWorkflowControllerCreate({
|
|
835
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug },
|
|
836
|
+
body: body as never,
|
|
837
|
+
client: myClient, throwOnError: true,
|
|
838
|
+
}),
|
|
839
|
+
update: (
|
|
840
|
+
tenantSlug: string,
|
|
841
|
+
datalakeSlug: string,
|
|
842
|
+
id: string,
|
|
843
|
+
body: Record<string, unknown>,
|
|
844
|
+
) =>
|
|
845
|
+
platformApiAgenticWorkflowControllerUpdate({
|
|
846
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
847
|
+
body: body as never,
|
|
848
|
+
client: myClient, throwOnError: true,
|
|
849
|
+
}),
|
|
850
|
+
delete: (tenantSlug: string, datalakeSlug: string, id: string) =>
|
|
851
|
+
platformApiAgenticWorkflowControllerDelete({
|
|
852
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
853
|
+
client: myClient, throwOnError: true,
|
|
854
|
+
}),
|
|
855
|
+
metadata: (tenantSlug: string, datalakeSlug: string, id: string) =>
|
|
856
|
+
platformApiAgenticWorkflowControllerMetadata({
|
|
857
|
+
path: { tenant_slug: tenantSlug, datalake_slug: datalakeSlug, id },
|
|
858
|
+
client: myClient, throwOnError: true,
|
|
859
|
+
}),
|
|
860
|
+
|
|
861
|
+
// Operations — tenant-scoped, addressed by workflow slug
|
|
862
|
+
execute: (tenantSlug: string, workflowSlug: string, body: Record<string, unknown>) =>
|
|
863
|
+
platformApiAgenticWorkflowOperationsControllerExecute({
|
|
864
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug },
|
|
865
|
+
body: body as never,
|
|
866
|
+
client: myClient, throwOnError: true,
|
|
867
|
+
}),
|
|
868
|
+
run: (tenantSlug: string, workflowSlug: string, body: Record<string, unknown>) =>
|
|
869
|
+
platformApiAgenticWorkflowOperationsControllerRunWorkflow({
|
|
870
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug },
|
|
871
|
+
body: body as never,
|
|
872
|
+
client: myClient, throwOnError: true,
|
|
873
|
+
}),
|
|
874
|
+
|
|
875
|
+
batchLogs: {
|
|
876
|
+
list: (tenantSlug: string, workflowSlug: string) =>
|
|
877
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogsIndex({
|
|
878
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug },
|
|
879
|
+
client: myClient, throwOnError: true,
|
|
880
|
+
}),
|
|
881
|
+
get: (tenantSlug: string, workflowSlug: string, id: string) =>
|
|
882
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogShow({
|
|
883
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug, id },
|
|
884
|
+
client: myClient, throwOnError: true,
|
|
885
|
+
}),
|
|
886
|
+
start: (tenantSlug: string, workflowSlug: string, id: string) =>
|
|
887
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogStart({
|
|
888
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug, id },
|
|
889
|
+
client: myClient, throwOnError: true,
|
|
890
|
+
}),
|
|
891
|
+
stop: (tenantSlug: string, workflowSlug: string, id: string) =>
|
|
892
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogStop({
|
|
893
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug, id },
|
|
894
|
+
client: myClient, throwOnError: true,
|
|
895
|
+
}),
|
|
896
|
+
refresh: (tenantSlug: string, workflowSlug: string, id: string) =>
|
|
897
|
+
platformApiAgenticWorkflowOperationsControllerBatchLogRefresh({
|
|
898
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug, id },
|
|
899
|
+
client: myClient, throwOnError: true,
|
|
900
|
+
}),
|
|
901
|
+
},
|
|
902
|
+
|
|
903
|
+
workflowLogs: {
|
|
904
|
+
list: (tenantSlug: string, workflowSlug: string) =>
|
|
905
|
+
platformApiAgenticWorkflowOperationsControllerWorkflowLogsIndex({
|
|
906
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug },
|
|
907
|
+
client: myClient, throwOnError: true,
|
|
908
|
+
}),
|
|
909
|
+
get: (
|
|
910
|
+
tenantSlug: string,
|
|
911
|
+
workflowSlug: string,
|
|
912
|
+
id: string,
|
|
913
|
+
opts?: { dataAccessMode?: 'regulated' | 'unregulated' },
|
|
914
|
+
) =>
|
|
915
|
+
platformApiAgenticWorkflowOperationsControllerWorkflowLogShow({
|
|
916
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug, id },
|
|
917
|
+
...(opts?.dataAccessMode
|
|
918
|
+
? { query: { data_access_mode: opts.dataAccessMode } }
|
|
919
|
+
: {}),
|
|
920
|
+
client: myClient, throwOnError: true,
|
|
921
|
+
}),
|
|
922
|
+
download: (tenantSlug: string, workflowSlug: string, id: string) =>
|
|
923
|
+
platformApiAgenticWorkflowOperationsControllerWorkflowLogDownload({
|
|
924
|
+
path: { tenant_slug: tenantSlug, workflow_slug: workflowSlug, id },
|
|
925
|
+
client: myClient, throwOnError: true,
|
|
926
|
+
}),
|
|
927
|
+
},
|
|
928
|
+
},
|
|
929
|
+
};
|
|
930
|
+
}
|