@boomi/embedkit 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embedkit-cdn.js +5 -5
- package/dist/embedkit-cdn.umd.cjs +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.js +2 -1
- package/dist/index.umd.cjs +2 -1
- package/package.json +1 -1
- package/dist/index.d.ts +0 -910
package/dist/index.d.ts
DELETED
|
@@ -1,910 +0,0 @@
|
|
|
1
|
-
import { BrowseCandidate, EnvExtMinimal, Environment, EnvironmentExtensions, EnvironmentMapExtension, IntegrationPackInstance, ProcessSchedules, Schedule, TransformationStructuredOutput, UpdateResult } from '@boomi/embedkit-sdk';
|
|
2
|
-
import React$1 from 'react';
|
|
3
|
-
import { InputHTMLAttributes, PropsWithChildren, ReactElement } from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Generates Boomi-compatible transformation functions via OpenAI:
|
|
7
|
-
* 1) Reads AI config (enabled, model, apiKey) from context.
|
|
8
|
-
* 2) Sends a structured prompt to produce name, script, inputs, outputs.
|
|
9
|
-
* 3) Validates the response against `AiTransformation` (zod).
|
|
10
|
-
* 4) Shapes the result into Boomi `MapExtensionsFunction` format.
|
|
11
|
-
*
|
|
12
|
-
* @return {{
|
|
13
|
-
* result: any | null;
|
|
14
|
-
* isLoading: boolean;
|
|
15
|
-
* error: string | null;
|
|
16
|
-
* fetchTransformation: (userPrompt: string, id: string) => Promise<any | void>;
|
|
17
|
-
* }}
|
|
18
|
-
* Hook API with the latest generated result, loading/error state, and an invoker.
|
|
19
|
-
*
|
|
20
|
-
* @throws {Error}
|
|
21
|
-
* When AI is enabled but model or apiKey is missing in context.
|
|
22
|
-
*/
|
|
23
|
-
export declare const useFetchAiTransformations: () => {
|
|
24
|
-
result: any;
|
|
25
|
-
isLoading: boolean;
|
|
26
|
-
error: string | null;
|
|
27
|
-
fetchTransformation: (userPrompt: string, id: string) => Promise<TransformationStructuredOutput | undefined>;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* @file useFetchAccountGroupIntegrationPacks.tsx
|
|
31
|
-
* @function useFetchAccountGroupIntegrationPacks
|
|
32
|
-
* @license BSD-2-Clause
|
|
33
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
34
|
-
*/
|
|
35
|
-
export type Params = {
|
|
36
|
-
filter: string;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* React hook that:
|
|
40
|
-
* 1) Retrieves the current Boomi account group from context,
|
|
41
|
-
* 2) Queries the Boomi API for associated Integration Packs,
|
|
42
|
-
* 3) Filters out packs based on installation type and whether an instance already exists.
|
|
43
|
-
*
|
|
44
|
-
* @return {{
|
|
45
|
-
* integrationPacks: any[];
|
|
46
|
-
* isLoading: boolean;
|
|
47
|
-
* error: string | null;
|
|
48
|
-
* }}
|
|
49
|
-
* Hook result containing the eligible Integration Packs for the account group, loading state, and any error.
|
|
50
|
-
*
|
|
51
|
-
* @throws {Error}
|
|
52
|
-
* If the Boomi SDK or required configuration values are missing.
|
|
53
|
-
*/
|
|
54
|
-
export declare const useFetchAccountGroupIntegrationPacks: (params: Params) => {
|
|
55
|
-
integrationPacks: any[];
|
|
56
|
-
isLoading: boolean;
|
|
57
|
-
error: string | null;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* @file useFetchEnvironments.tsx
|
|
61
|
-
* @function useFetchEnvironments
|
|
62
|
-
* @license BSD-2-Clause
|
|
63
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
64
|
-
*/
|
|
65
|
-
/**
|
|
66
|
-
* Fetches environments from the Boomi API using classification (PROD/TEST/ALL)
|
|
67
|
-
* or a specific environment ID. When available, enriches environments with Atom
|
|
68
|
-
* attachments and computes an `isActive` flag (true if all attached Atoms are ONLINE).
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @return {{ environments: any[]; isLoading: boolean; error: string | null }}
|
|
72
|
-
* An object containing the fetched environments with metadata, loading state, and any error.
|
|
73
|
-
*
|
|
74
|
-
* @throws {Error}
|
|
75
|
-
* If required context (Boomi SDK, apiAccountId) or parameters are missing.
|
|
76
|
-
*/
|
|
77
|
-
export declare const useFetchEnvironments: () => {
|
|
78
|
-
fetchEnvironments: (includeEnvironments?: "PROD" | "TEST" | "ALL", environmentId?: string | null) => Promise<void>;
|
|
79
|
-
environments: any[];
|
|
80
|
-
isLoading: boolean;
|
|
81
|
-
error: string | null;
|
|
82
|
-
};
|
|
83
|
-
type EnvExtMinimal$1 = Pick<EnvironmentExtensions, "id" | "environmentId" | "extensionGroupId" | "connections" | "processProperties">;
|
|
84
|
-
/**
|
|
85
|
-
* Retrieves environment extensions for the given environment(s) and integration pack instance.
|
|
86
|
-
* Identifies and strips sensitive OAuth2 access token fields while separately returning
|
|
87
|
-
* metadata about them.
|
|
88
|
-
*
|
|
89
|
-
* @return {{
|
|
90
|
-
* extensions: EnvironmentExtensions[] | null;
|
|
91
|
-
* fetchEnvironmentExtensions: (
|
|
92
|
-
* environments: Environment[],
|
|
93
|
-
* environmentId: string,
|
|
94
|
-
* integrationPackInstanceId: string
|
|
95
|
-
* ) => Promise<void>;
|
|
96
|
-
* isLoading: boolean;
|
|
97
|
-
* error: string | null;
|
|
98
|
-
* }}
|
|
99
|
-
* Hook API with filtered extensions, matched token field metadata, loading/error state, and a refetch method.
|
|
100
|
-
*
|
|
101
|
-
* @throws {Error}
|
|
102
|
-
* If the Boomi client, integrationPackInstanceId, or required environment inputs are missing.
|
|
103
|
-
*/
|
|
104
|
-
export declare const useFetchEnvironmentExtensions: ({}?: {}) => {
|
|
105
|
-
extensions: EnvExtMinimal$1[] | null;
|
|
106
|
-
rawExtensions: EnvironmentExtensions[] | null;
|
|
107
|
-
fetchEnvironmentExtensions: (environments: Environment[], environmentId: string, integrationPackInstanceId: string, isSingleInstall?: boolean) => Promise<void>;
|
|
108
|
-
isLoading: boolean;
|
|
109
|
-
error: string | null;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Provides an imperative `updateEnvironmentExtensions` function to update a single
|
|
113
|
-
* environment extension record. Sets `partial=true` prior to update to indicate a
|
|
114
|
-
* partial update. Updates plugin config after completion.
|
|
115
|
-
*
|
|
116
|
-
* @return {{
|
|
117
|
-
* updateEnvironmentExtensions: (
|
|
118
|
-
* extension: EnvironmentExtensions,
|
|
119
|
-
* environmentId: string,
|
|
120
|
-
* extensionGroupId: string
|
|
121
|
-
* ) => Promise<void>;
|
|
122
|
-
* isUpdating: boolean;
|
|
123
|
-
* updateError: string | null;
|
|
124
|
-
* updatedExtension: EnvironmentExtensions | null;
|
|
125
|
-
* }}
|
|
126
|
-
* Hook API exposing the update function and request state.
|
|
127
|
-
*
|
|
128
|
-
* @throws {Error}
|
|
129
|
-
* If required inputs are missing or the update call fails.
|
|
130
|
-
*/
|
|
131
|
-
export declare const useUpdateEnvironmentExtensions: () => {
|
|
132
|
-
updateFromCombined: (originals: EnvironmentExtensions[], combinedEdited: EnvExtMinimal[], environmentId: string, integrationPackInstanceId: string, isSingleInstall?: boolean) => Promise<UpdateResult>;
|
|
133
|
-
isUpdating: boolean;
|
|
134
|
-
updateError: string | null;
|
|
135
|
-
editedConnections: EnvExtMinimal[] | null;
|
|
136
|
-
updatedExtension: EnvironmentExtensions | null;
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* Provides an imperative `createInstance` function that:
|
|
140
|
-
* 1) Creates a new Integration Pack Instance.
|
|
141
|
-
* 2) Optionally attaches the provided environments to that instance.
|
|
142
|
-
* 3) Builds a convenient `IntegrationPack` config object for UI consumption.
|
|
143
|
-
*
|
|
144
|
-
* @return {{
|
|
145
|
-
* integrationPackConfig: IntegrationPack | null;
|
|
146
|
-
* environmentsAttached: Environment[];
|
|
147
|
-
* isLoading: boolean;
|
|
148
|
-
* error: string | null;
|
|
149
|
-
* createInstance: (
|
|
150
|
-
* integrationPackId: string,
|
|
151
|
-
* isSingleInstall?: boolean,
|
|
152
|
-
* integrationPackOverrideName?: string,
|
|
153
|
-
* environments?: Environment[]
|
|
154
|
-
* ) => Promise<IntegrationPack | undefined>;
|
|
155
|
-
* }}
|
|
156
|
-
* Hook API including the latest config, attached environments, loading/error state, and the creator function.
|
|
157
|
-
*
|
|
158
|
-
* @throws {Error}
|
|
159
|
-
* When the Boomi client/context is missing, required inputs are invalid,
|
|
160
|
-
* or the create/attach operations fail.
|
|
161
|
-
*/
|
|
162
|
-
export declare const useCreateIntegrationPackInstance: () => {
|
|
163
|
-
integrationPackConfig: IntegrationPackInstance | null;
|
|
164
|
-
isLoading: boolean;
|
|
165
|
-
error: string | null;
|
|
166
|
-
createInstance: (integrationPackId: string, isSingleInstall: boolean | undefined, environmentId: string, integrationPackOverrideName?: string) => Promise<IntegrationPackInstance | undefined>;
|
|
167
|
-
};
|
|
168
|
-
/**
|
|
169
|
-
* @file useDeleteIntegrationPackInstance.tsx
|
|
170
|
-
* @function useDeleteIntegrationPackInstance
|
|
171
|
-
* @license BSD-2-Clause
|
|
172
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
173
|
-
*/
|
|
174
|
-
/**
|
|
175
|
-
* Provides an imperative `deleteIntegrationPackInstance` function that removes
|
|
176
|
-
* an integration pack instance by ID.
|
|
177
|
-
*
|
|
178
|
-
* @return {{
|
|
179
|
-
* deleteIntegrationPackInstance: (integrationPackInstanceId: string) => Promise<boolean>;
|
|
180
|
-
* isLoading: boolean;
|
|
181
|
-
* error: string | null;
|
|
182
|
-
* }}
|
|
183
|
-
* Hook API with the delete function and request state.
|
|
184
|
-
*
|
|
185
|
-
* @throws {Error}
|
|
186
|
-
* If the Boomi client or required context is missing, or if the ID is not provided.
|
|
187
|
-
*/
|
|
188
|
-
export declare const useDeleteIntegrationPackInstance: () => {
|
|
189
|
-
deleteIntegrationPackInstance: (integrationPackInstanceId: string) => Promise<boolean>;
|
|
190
|
-
isLoading: boolean;
|
|
191
|
-
error: string | null;
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* @function fetchIntegrationPackInstances
|
|
195
|
-
*
|
|
196
|
-
* @description
|
|
197
|
-
* Internal async helper that:
|
|
198
|
-
* - Resolves the account group ID.
|
|
199
|
-
* - Retrieves integration packs available to that group.
|
|
200
|
-
* - Queries pack instances, applies search, paginates, and enriches results
|
|
201
|
-
* with installation type, display name/description, and attached env IDs.
|
|
202
|
-
*
|
|
203
|
-
* @returns {Promise<void>} Resolves when state has been updated.
|
|
204
|
-
*/
|
|
205
|
-
export declare const useFetchIntegrationPackInstances: ({ search, renderType }: {
|
|
206
|
-
search?: string;
|
|
207
|
-
renderType: string;
|
|
208
|
-
}) => {
|
|
209
|
-
integrationPackInstances: IntegrationPackInstance[];
|
|
210
|
-
refetch: () => Promise<void>;
|
|
211
|
-
isLoading: boolean;
|
|
212
|
-
error: string | null;
|
|
213
|
-
currentPage: number;
|
|
214
|
-
totalPages: number;
|
|
215
|
-
goToPage: (page: number) => void;
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* @file useRunAllProcesses.tsx
|
|
219
|
-
* @function useRunAllProcesses
|
|
220
|
-
* @license BSD-2-Clause
|
|
221
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
222
|
-
*/
|
|
223
|
-
/**
|
|
224
|
-
* @description
|
|
225
|
-
* Provides a `runAllProcesses` function to:
|
|
226
|
-
* 1. Retrieve all Atoms for the given environment.
|
|
227
|
-
* 2. Retrieve all processes for the given integration pack instance.
|
|
228
|
-
* 3. Trigger execution requests for every process/atom combination.
|
|
229
|
-
* 4. Return the execution record URLs for tracking.
|
|
230
|
-
*
|
|
231
|
-
* @return {{
|
|
232
|
-
* isRunning: boolean;
|
|
233
|
-
* recordUrls: string[];
|
|
234
|
-
* error: string | null;
|
|
235
|
-
* runAllProcesses: (params: UseRunAllProcessesParams) => Promise<string[] | void>;
|
|
236
|
-
* }}
|
|
237
|
-
* Hook API containing loading state, execution URLs, errors, and the execution function.
|
|
238
|
-
*
|
|
239
|
-
* @throws {Error}
|
|
240
|
-
* If Boomi is not initialized or required parameters are missing.
|
|
241
|
-
*/
|
|
242
|
-
export declare const useRunAllProcesses: () => {
|
|
243
|
-
isRunning: boolean;
|
|
244
|
-
recordUrls: string[];
|
|
245
|
-
error: string | null;
|
|
246
|
-
runAllProcesses: (environmentId: string, integrationPackInstanceId: string) => Promise<string[] | undefined>;
|
|
247
|
-
};
|
|
248
|
-
/**
|
|
249
|
-
* @file useFetchExecutionRecords.tsx
|
|
250
|
-
* @function useFetchExecutionRecords
|
|
251
|
-
* @license BSD-2-Clause
|
|
252
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
253
|
-
*/
|
|
254
|
-
/**
|
|
255
|
-
* Fetches execution records for all processes under a given integration pack
|
|
256
|
-
* instance ID (`id`). Optionally filters by a search term (case-insensitive)
|
|
257
|
-
* against the record `message` field. Records are sorted (oldest → newest) when
|
|
258
|
-
* no search term is provided, and paginated with a fixed page size.
|
|
259
|
-
*
|
|
260
|
-
* @return {{
|
|
261
|
-
* records: ExecutionRecord[];
|
|
262
|
-
* isLoading: boolean;
|
|
263
|
-
* error: string | null;
|
|
264
|
-
* currentPage: number;
|
|
265
|
-
* totalPages: number;
|
|
266
|
-
* goToPage: (page: number) => void;
|
|
267
|
-
* refetch: () => void;
|
|
268
|
-
* }}
|
|
269
|
-
* Hook API with current page of records, loading/error state, pagination helpers, and a refetch method.
|
|
270
|
-
*
|
|
271
|
-
* @throws {Error}
|
|
272
|
-
* Sets error state if Boomi client is missing or if required parameters are not provided.
|
|
273
|
-
*/
|
|
274
|
-
export declare const useFetchExecutionRecords: (id: string, searchTerm?: string) => {
|
|
275
|
-
records: any;
|
|
276
|
-
isLoading: boolean;
|
|
277
|
-
error: string | null;
|
|
278
|
-
currentPage: number;
|
|
279
|
-
totalPages: number;
|
|
280
|
-
goToPage: (page: number) => void;
|
|
281
|
-
refetch: () => void;
|
|
282
|
-
};
|
|
283
|
-
/**
|
|
284
|
-
* Fetches map extension summaries (and, unless `breakOnSummary` is true, the full
|
|
285
|
-
* map extensions) for a given Integration Pack Instance ID. Results are de-duplicated
|
|
286
|
-
* across environments and processes.
|
|
287
|
-
*
|
|
288
|
-
* @return {{
|
|
289
|
-
* maps: EnvironmentMapExtension[],
|
|
290
|
-
* hasMaps: boolean,
|
|
291
|
-
* fetchMapExtensions: () => Promise<void>,
|
|
292
|
-
* isLoading: boolean,
|
|
293
|
-
* error: string | null
|
|
294
|
-
* }}
|
|
295
|
-
* Hook API including fetched maps (when not short-circuited), a boolean indicating if any maps exist,
|
|
296
|
-
* a refetch method, and request state flags.
|
|
297
|
-
*
|
|
298
|
-
* @throws {Error}
|
|
299
|
-
* Sets error state if the Boomi client is missing or if required parameters are invalid.
|
|
300
|
-
*/
|
|
301
|
-
export declare const useFetchMapExtensions: () => {
|
|
302
|
-
maps: EnvironmentMapExtension[];
|
|
303
|
-
hasMaps: boolean;
|
|
304
|
-
hasCandidates: boolean;
|
|
305
|
-
mapCandidates: BrowseCandidate[];
|
|
306
|
-
fetchMapExtensions: (integrationPackInstanceId: string, environmentId: string) => Promise<void>;
|
|
307
|
-
isLoading: boolean;
|
|
308
|
-
error: string | null;
|
|
309
|
-
};
|
|
310
|
-
/**
|
|
311
|
-
* Provides an imperative `updateMapExtensions` function that posts a single
|
|
312
|
-
* `EnvironmentMapExtension` update. Accepts JSON payloads and handles either JSON
|
|
313
|
-
* or XML responses from Boomi.
|
|
314
|
-
*
|
|
315
|
-
* @return {{
|
|
316
|
-
* updateMapExtensions: (params: UseUpdateMapExtensionsUpdateParams) => Promise<EnvironmentMapExtension>,
|
|
317
|
-
* isUpdating: boolean,
|
|
318
|
-
* updateError: string | null,
|
|
319
|
-
* updatedExtensions: EnvironmentMapExtension[]
|
|
320
|
-
* }}
|
|
321
|
-
* Hook API exposing the updater function, loading/error state, and last updated extensions.
|
|
322
|
-
*
|
|
323
|
-
* @throws {Error}
|
|
324
|
-
* If required inputs are missing or the update request fails.
|
|
325
|
-
*/
|
|
326
|
-
export declare const useUpdateMapExtensions: () => {
|
|
327
|
-
updateMapExtensions: (envMapExtension: EnvironmentMapExtension) => Promise<EnvironmentMapExtension>;
|
|
328
|
-
isUpdating: boolean;
|
|
329
|
-
updateError: string | null;
|
|
330
|
-
updatedExtensions: EnvironmentMapExtension[];
|
|
331
|
-
};
|
|
332
|
-
/**
|
|
333
|
-
* Provides a method to fetch process schedules for a given environment and
|
|
334
|
-
* integration pack instance. Looks up atom attachments, queries processes, and
|
|
335
|
-
* then queries schedules per (atomId, processId) pair until one is found.
|
|
336
|
-
*
|
|
337
|
-
* @return {{
|
|
338
|
-
* schedule: ProcessSchedules | null;
|
|
339
|
-
* processes: Process[];
|
|
340
|
-
* isLoading: boolean;
|
|
341
|
-
* error: string | null;
|
|
342
|
-
* fetchSchedules: (params: UseFetchProcessSchedulesParams) => Promise<void>;
|
|
343
|
-
* }}
|
|
344
|
-
* Hook state and API.
|
|
345
|
-
*
|
|
346
|
-
* @throws {Error}
|
|
347
|
-
* If required params are missing or queries fail.
|
|
348
|
-
*/
|
|
349
|
-
export declare const useFetchProcessSchedules: () => {
|
|
350
|
-
schedule: ProcessSchedules | null;
|
|
351
|
-
isLoading: boolean;
|
|
352
|
-
error: string | null;
|
|
353
|
-
fetchSchedules: (environmentId: string, integrationPackInstanceId: string) => Promise<void>;
|
|
354
|
-
};
|
|
355
|
-
/**
|
|
356
|
-
* Provides an imperative `updateProcessSchedules` function that:
|
|
357
|
-
* 1) Resolves Atom IDs attached to an environment,
|
|
358
|
-
* 2) Retrieves all processes for an integration pack instance,
|
|
359
|
-
* 3) Constructs a `ProcessSchedules` payload (including a `Retry` policy),
|
|
360
|
-
* 4) Replaces schedules for every (processId × atomId) combination.
|
|
361
|
-
*
|
|
362
|
-
* @return {{
|
|
363
|
-
* updateProcessSchedules: (params: UseUpdateProcessSchedulesParams) => Promise<void>;
|
|
364
|
-
* isUpdating: boolean;
|
|
365
|
-
* updateError: string | null;
|
|
366
|
-
* updatedSchedules: ProcessSchedules[];
|
|
367
|
-
* }}
|
|
368
|
-
* Hook API with the updater function, request state, and the list of updated schedule objects.
|
|
369
|
-
*
|
|
370
|
-
* @throws {Error}
|
|
371
|
-
* If required context or parameters are missing, or if any update call fails.
|
|
372
|
-
*/
|
|
373
|
-
export declare const useUpdateProcessSchedules: () => {
|
|
374
|
-
updateProcessSchedules: (schedules: Schedule[], environmentId: string, integrationPackInstanceId: string) => Promise<void>;
|
|
375
|
-
isUpdating: boolean;
|
|
376
|
-
updateError: string | null;
|
|
377
|
-
updatedSchedules: ProcessSchedules[];
|
|
378
|
-
};
|
|
379
|
-
/**
|
|
380
|
-
* @file theme.d.ts
|
|
381
|
-
* @typedef Ai
|
|
382
|
-
* @license BSD-2-Clause
|
|
383
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
384
|
-
*
|
|
385
|
-
* @description
|
|
386
|
-
* Configuration options for enabling theme support within the plugin.
|
|
387
|
-
*
|
|
388
|
-
* @property {boolean} [allowThemes] - Whether multiple themes are allowed in the UI.
|
|
389
|
-
* @property {string} [defaultTheme] - The default theme name.
|
|
390
|
-
*/
|
|
391
|
-
export type Theme = {
|
|
392
|
-
allowThemes?: boolean;
|
|
393
|
-
defaultTheme?: string | "light" | "dark" | "boomi";
|
|
394
|
-
darkModeTheme?: boolean;
|
|
395
|
-
};
|
|
396
|
-
/**
|
|
397
|
-
* @file component.config.d.ts
|
|
398
|
-
* @typedef ComponentConfig
|
|
399
|
-
* @license Apache 2.0
|
|
400
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
401
|
-
*
|
|
402
|
-
* @description
|
|
403
|
-
* Defines configuration options for controlling the display of titles
|
|
404
|
-
* and descriptions in a plugin component.
|
|
405
|
-
*
|
|
406
|
-
* @property {string} [componentkey] - unique key for the component instance
|
|
407
|
-
* @property {boolean} showTitle - Whether the component title should be displayed.
|
|
408
|
-
* @property {string} [title] - Optional text for the component title.
|
|
409
|
-
* @property {boolean} showDescription - Whether the component description should be displayed.
|
|
410
|
-
* @property {string} [description] - Optional text for the component description.
|
|
411
|
-
*/
|
|
412
|
-
export type ComponentConfig = {
|
|
413
|
-
componentKey: string;
|
|
414
|
-
renderType: "agent" | "integration" | "all";
|
|
415
|
-
showHeader?: boolean;
|
|
416
|
-
showTitle?: boolean;
|
|
417
|
-
title?: string;
|
|
418
|
-
showDescription?: boolean;
|
|
419
|
-
description?: string;
|
|
420
|
-
/** Optional mapping feature flag */
|
|
421
|
-
mapping?: Mapping;
|
|
422
|
-
};
|
|
423
|
-
export type KeyConfig = {
|
|
424
|
-
[componentName: string]: string | ComponentConfig | any;
|
|
425
|
-
};
|
|
426
|
-
/**
|
|
427
|
-
* @file mapping.d.ts
|
|
428
|
-
* @typedef Mapping
|
|
429
|
-
* @license BSD-2-Clause
|
|
430
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
431
|
-
*
|
|
432
|
-
* @description
|
|
433
|
-
* Configuration options for the mapping canvas
|
|
434
|
-
*
|
|
435
|
-
* @property {boolean} [useTreeMode] - Whether the map will render source and target inputs in tree mode or default.
|
|
436
|
-
*/
|
|
437
|
-
export type Mapping = {
|
|
438
|
-
useTreeMode?: boolean;
|
|
439
|
-
};
|
|
440
|
-
export type FormInputConfig = {
|
|
441
|
-
label?: string;
|
|
442
|
-
placeholder?: string;
|
|
443
|
-
validation?: string;
|
|
444
|
-
inputMode?: React$1.InputHTMLAttributes<HTMLInputElement>["inputMode"];
|
|
445
|
-
wrapClass?: string;
|
|
446
|
-
labelClass?: string;
|
|
447
|
-
inputClass?: string;
|
|
448
|
-
helperClass?: string;
|
|
449
|
-
errorClass?: string;
|
|
450
|
-
attrs?: Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "id" | "name" | "type" | "required" | "readOnly" | "value" | "defaultValue" | "onChange" | "onBlur" | "className" | "placeholder" | "pattern" | "inputMode" | "aria-invalid" | "aria-describedby">;
|
|
451
|
-
};
|
|
452
|
-
export type FormConfig = {
|
|
453
|
-
showTitle?: boolean;
|
|
454
|
-
title?: string;
|
|
455
|
-
showDescription?: boolean;
|
|
456
|
-
description?: string;
|
|
457
|
-
} & Record<string, FormInputConfig>;
|
|
458
|
-
export type AgentType = "chat" | "data";
|
|
459
|
-
export type AgentCorner = "bottom-right" | "bottom-left" | "top-right" | "top-left";
|
|
460
|
-
export type UIPosition = {
|
|
461
|
-
corner: AgentCorner;
|
|
462
|
-
offsetX?: number;
|
|
463
|
-
offsetY?: number;
|
|
464
|
-
} | {
|
|
465
|
-
x: number;
|
|
466
|
-
y: number;
|
|
467
|
-
}; // absolute (fixed) positioning
|
|
468
|
-
/** ChatGPT-like UI options */
|
|
469
|
-
export type AgentUiConfig = {
|
|
470
|
-
/** Session scope behavior for chat history */
|
|
471
|
-
sessionScope?: "mount" | "multi";
|
|
472
|
-
/** Optional unique key for the agent instance */
|
|
473
|
-
pageShowHeader?: boolean;
|
|
474
|
-
pageShowTitle?: boolean;
|
|
475
|
-
pageTitle?: string;
|
|
476
|
-
pageShowDescription?: boolean;
|
|
477
|
-
pageDescription?: string;
|
|
478
|
-
/** the welcome screen text */
|
|
479
|
-
welcome: {
|
|
480
|
-
title: string;
|
|
481
|
-
subtitle: string;
|
|
482
|
-
};
|
|
483
|
-
/** 'full' fills parent; 'modal' renders a centered dialog */
|
|
484
|
-
mode: "modal" | "full";
|
|
485
|
-
/** Sidebar options (left column) */
|
|
486
|
-
sidebar?: {
|
|
487
|
-
/** show or hide the sidebar */
|
|
488
|
-
show?: boolean;
|
|
489
|
-
/** Sidebar width in px (default: 300) */
|
|
490
|
-
width?: number;
|
|
491
|
-
};
|
|
492
|
-
/** Modal sizing (only used when mode === 'modal') */
|
|
493
|
-
modal?: {
|
|
494
|
-
/** Width in px (default: 980) */
|
|
495
|
-
width?: number;
|
|
496
|
-
/** Height in px (default: 720) */
|
|
497
|
-
height?: number;
|
|
498
|
-
/** Override default centering and place the modal at a custom position */
|
|
499
|
-
position?: UIPosition;
|
|
500
|
-
};
|
|
501
|
-
/** Allow user to enter free-text prompts */
|
|
502
|
-
allowFreeTextPrompt?: boolean;
|
|
503
|
-
/** Enable file uploads in MainChat */
|
|
504
|
-
fileAttachmentSupported?: boolean;
|
|
505
|
-
/** Require at least one file attached to send */
|
|
506
|
-
fileAttachmentRequired?: boolean;
|
|
507
|
-
/**
|
|
508
|
-
* Allowed file extensions. Examples:
|
|
509
|
-
* ".csv", ".xml", ".json"
|
|
510
|
-
* or "csv,xml,json"
|
|
511
|
-
*/
|
|
512
|
-
allowedFileExtensions?: string | string[];
|
|
513
|
-
/** Soft gaurds on attachments */
|
|
514
|
-
maxFiles?: number;
|
|
515
|
-
maxTotalBytes?: number;
|
|
516
|
-
/** pre configured prompts */
|
|
517
|
-
prompts?: Array<{
|
|
518
|
-
title: string;
|
|
519
|
-
prompt: string;
|
|
520
|
-
}>;
|
|
521
|
-
};
|
|
522
|
-
export type AgentConfig = {
|
|
523
|
-
/** The environment to use for this agent */
|
|
524
|
-
allowFreeTextPrompts?: boolean;
|
|
525
|
-
/** The environment to use for this agent */
|
|
526
|
-
environmentId?: string;
|
|
527
|
-
/** Optional Boomi Agent ID for boomi-direct transport */
|
|
528
|
-
boomiAgentId?: string;
|
|
529
|
-
/** is this a modal driven agent? */
|
|
530
|
-
type?: AgentType;
|
|
531
|
-
/** when set to false this will remove the agent from the integration pack install dropdown */
|
|
532
|
-
allowInstall?: boolean;
|
|
533
|
-
/** What name should this agent be installed as? */
|
|
534
|
-
installAsName?: string;
|
|
535
|
-
/** Floating trigger button placement (only relevant if you still use a launcher button) */
|
|
536
|
-
position?: UIPosition;
|
|
537
|
-
/** Floating trigger button shape */
|
|
538
|
-
shape?: "circle" | "pill";
|
|
539
|
-
/** Optional custom icon (emoji/text) for the launcher pill */
|
|
540
|
-
icon?: string;
|
|
541
|
-
/** Hide the launcher icon entirely */
|
|
542
|
-
hideIcon?: boolean;
|
|
543
|
-
/** Label shown on the pill button */
|
|
544
|
-
label?: string;
|
|
545
|
-
/** Default to multi-part request only. This will send the api requests as multi-part only. */
|
|
546
|
-
sendMultipartData?: boolean;
|
|
547
|
-
/** Route agent messages via Boomi direct session endpoint. */
|
|
548
|
-
transport?: "boomi-proxy" | "boomi-direct";
|
|
549
|
-
/** ChatGPT-style layout configuration */
|
|
550
|
-
ui: AgentUiConfig;
|
|
551
|
-
/** Form configuration for agent configuration */
|
|
552
|
-
form?: {
|
|
553
|
-
configureAgent?: FormConfig;
|
|
554
|
-
};
|
|
555
|
-
};
|
|
556
|
-
export type ModalOffsetConfig = {
|
|
557
|
-
/** Horizontal translation in px/rem/etc (positive pushes right, negative left). */
|
|
558
|
-
offsetX?: number | string;
|
|
559
|
-
/** Vertical translation in px/rem/etc (positive pushes down, negative up). */
|
|
560
|
-
offsetY?: number | string;
|
|
561
|
-
};
|
|
562
|
-
export type PluginUiConfig = {
|
|
563
|
-
/** Theme settings for the plugin UI. */
|
|
564
|
-
theme?: Theme;
|
|
565
|
-
/** Enable ai? Assumes you have passed your apiToken and model in the pre-auth before plugin is enabled. */
|
|
566
|
-
enableAi?: boolean;
|
|
567
|
-
/** Configuration settings for various forms in the plugin UI. */
|
|
568
|
-
form?: Record<string, FormConfig>;
|
|
569
|
-
/** Configuration settings for various agents in the plugin UI. */
|
|
570
|
-
agents?: Record<string, AgentConfig>;
|
|
571
|
-
/** Configuration settings for various components in the plugin UI. */
|
|
572
|
-
components?: Record<string, string | (ComponentConfig & {
|
|
573
|
-
modalOffset?: ModalOffsetConfig;
|
|
574
|
-
})
|
|
575
|
-
// Backwards-compatible: allow nested arbitrary config objects per component key
|
|
576
|
-
| Record<string, any>>;
|
|
577
|
-
};
|
|
578
|
-
export type PluginConfig = {
|
|
579
|
-
/** The tenantId for CORS on the server. This is typically your boomi parent account Id */
|
|
580
|
-
tenantId: string;
|
|
581
|
-
/** Base URL to the embedkit server (e.g., "/api/v1" or "https://boomi.space/embedkit-server/api/v1"). */
|
|
582
|
-
serverBase: string;
|
|
583
|
-
/** One-time nonce the host app obtained from the server login flow. */
|
|
584
|
-
nonce?: string;
|
|
585
|
-
/** Optional access token (public embed flow). */
|
|
586
|
-
accessToken?: string;
|
|
587
|
-
/** Optional UI/UX configuration for the plugin. */
|
|
588
|
-
boomiConfig?: PluginUiConfig;
|
|
589
|
-
};
|
|
590
|
-
export type EmbedKitProviderProps = React$1.PropsWithChildren & {
|
|
591
|
-
config: PluginConfig;
|
|
592
|
-
};
|
|
593
|
-
export function EmbedKitProvider({ config, children }: EmbedKitProviderProps): React$1.ReactElement;
|
|
594
|
-
/** Thin server API surface; services/hooks can build on top of this. */
|
|
595
|
-
export interface ServerApi {
|
|
596
|
-
get: (path: string, init?: RequestInit) => Promise<Response>;
|
|
597
|
-
post: (path: string, body?: unknown, init?: RequestInit) => Promise<Response>;
|
|
598
|
-
put: (path: string, body?: unknown, init?: RequestInit) => Promise<Response>;
|
|
599
|
-
del: (path: string, init?: RequestInit) => Promise<Response>;
|
|
600
|
-
}
|
|
601
|
-
export type UseEmbedKit = {
|
|
602
|
-
hostId?: string;
|
|
603
|
-
componentKey?: string;
|
|
604
|
-
pageIsLoading: boolean;
|
|
605
|
-
isReady: boolean;
|
|
606
|
-
accessToken: string | null;
|
|
607
|
-
serverApi: ServerApi;
|
|
608
|
-
boomiConfig?: PluginUiConfig;
|
|
609
|
-
setPageIsLoading: (v: boolean) => void;
|
|
610
|
-
logout: () => void;
|
|
611
|
-
};
|
|
612
|
-
export declare function useEmbedKit(): UseEmbedKit;
|
|
613
|
-
export declare function createEmbedKit(overrides?: Partial<PluginConfig>): PluginConfig;
|
|
614
|
-
/**
|
|
615
|
-
* @file Integrations.tsx
|
|
616
|
-
* @component Integrations
|
|
617
|
-
* @license BSD-2-Clause
|
|
618
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
619
|
-
*
|
|
620
|
-
* @description
|
|
621
|
-
* The `Integrations` component displays a list of integration packs and allows users to add, edit, run, and delete integrations.
|
|
622
|
-
* It supports both grid and table views, search functionality, execution history viewing, and pagination.
|
|
623
|
-
* Provides UI for adding new integrations via a modal form and integrates with Boomi hooks for fetching, creating,
|
|
624
|
-
* deleting, and running integration packs.
|
|
625
|
-
*
|
|
626
|
-
* @return {JSX.Element} A fully functional integrations component with search, view, edit, delete, run, and history capabilities.
|
|
627
|
-
*/
|
|
628
|
-
/**
|
|
629
|
-
* @interface IntegrationsProps
|
|
630
|
-
*
|
|
631
|
-
* @description Props for the `Integrations` component.
|
|
632
|
-
*
|
|
633
|
-
* @property {boolean} [showUpdateControls] - Flag indicating whether to show update controls.
|
|
634
|
-
* @property {boolean} [componentKey] - Optional unique key for the component instance
|
|
635
|
-
* @property {'on' | 'off'} [defaultView] - Default view mode for displaying integrations, either 'on' or 'off'.
|
|
636
|
-
*/
|
|
637
|
-
export interface IntegrationsProps {
|
|
638
|
-
componentKey: string;
|
|
639
|
-
showUpdateControls?: boolean;
|
|
640
|
-
}
|
|
641
|
-
export interface AgentProps {
|
|
642
|
-
integrationPackId: string;
|
|
643
|
-
}
|
|
644
|
-
/**
|
|
645
|
-
* @interface UpdateSchedulesProps
|
|
646
|
-
*
|
|
647
|
-
* @description
|
|
648
|
-
* Props for the `UpdateSchedules` component.
|
|
649
|
-
*
|
|
650
|
-
* @property {boolean} [componentKey] - Unique key for the component instance
|
|
651
|
-
* @property {IntegrationPack} integration - The integration pack to update schedules for.
|
|
652
|
-
* @property {(val: boolean) => void} [setIsLoading] - Optional callback to set loading state externally.
|
|
653
|
-
* @property {() => void} [onSubmit] - Optional callback invoked after a successful submit.
|
|
654
|
-
* @property {() => void} [onBack] - Optional callback invoked to navigate back in wizard mode.
|
|
655
|
-
* @property {boolean} active - Whether this component is currently active/visible.
|
|
656
|
-
* @property {boolean} wizard - Indicates if the component is used inside a wizard flow.
|
|
657
|
-
*/
|
|
658
|
-
export interface RunAgentProps {
|
|
659
|
-
componentKey: string;
|
|
660
|
-
integration: IntegrationPackInstance;
|
|
661
|
-
setIsLoading?: (val: boolean) => void;
|
|
662
|
-
onSubmit?: () => void;
|
|
663
|
-
onBack?: () => void;
|
|
664
|
-
}
|
|
665
|
-
/**
|
|
666
|
-
* @interface ConfigureIntegrationProps
|
|
667
|
-
*
|
|
668
|
-
* @description
|
|
669
|
-
* Props for the `ConfigureIntegration` component.
|
|
670
|
-
*
|
|
671
|
-
* @property {boolean} [componentKey] - Unique key for the component instance
|
|
672
|
-
* @property {IntegrationPack} integration - The integration pack to configure.
|
|
673
|
-
* @property {number} [indexPage] - Optional initial page index to open in the wizard.
|
|
674
|
-
* @property {() => void} onBack - Callback to navigate back or cancel the flow.
|
|
675
|
-
* @property {(id: string) => void} onDelete - Callback to delete an integration by its ID.
|
|
676
|
-
*/
|
|
677
|
-
export interface ConfigureIntegrationProps {
|
|
678
|
-
componentKey: string;
|
|
679
|
-
integration: IntegrationPackInstance;
|
|
680
|
-
indexPage?: number;
|
|
681
|
-
simple?: boolean;
|
|
682
|
-
onBack: () => void;
|
|
683
|
-
hostId?: string;
|
|
684
|
-
}
|
|
685
|
-
/**
|
|
686
|
-
* @interface ExecutionHistoryProps
|
|
687
|
-
*
|
|
688
|
-
* @description
|
|
689
|
-
* Props for the `ExecutionHistory` component.
|
|
690
|
-
*
|
|
691
|
-
* @property {boolean} [componentKey] - Unique key for the component instance
|
|
692
|
-
* @property {IntegrationPack} integration - The integration pack whose execution history is shown.
|
|
693
|
-
* @property {() => void} onBack - Callback function invoked when navigating back.
|
|
694
|
-
*/
|
|
695
|
-
export interface ExecutionHistoryProps {
|
|
696
|
-
componentKey: string;
|
|
697
|
-
integration: IntegrationPackInstance;
|
|
698
|
-
onBack: () => void;
|
|
699
|
-
}
|
|
700
|
-
/**
|
|
701
|
-
* @typedef UpdateConnectionsRef
|
|
702
|
-
*
|
|
703
|
-
* @description
|
|
704
|
-
* Methods exposed to parent components for controlling the `UpdateConnections` component.
|
|
705
|
-
*
|
|
706
|
-
* @property {boolean} [componentKey] - Unique key for the component instance
|
|
707
|
-
* @property {() => Promise<boolean>} submit - Submits the current connection updates. Returns `true` if successful.
|
|
708
|
-
* @property {() => void} load - Reloads the connection data.
|
|
709
|
-
*/
|
|
710
|
-
export type UpdateConnectionsRef = {
|
|
711
|
-
submit: () => Promise<boolean>;
|
|
712
|
-
};
|
|
713
|
-
/**
|
|
714
|
-
* @interface UpdateConnectionsProps
|
|
715
|
-
*
|
|
716
|
-
* @description
|
|
717
|
-
* Props for the `UpdateConnections` component.
|
|
718
|
-
*
|
|
719
|
-
* @property {IntegrationPack} integration - The integration pack to update connections for.
|
|
720
|
-
* @property {boolean} active - Whether this component is currently active/visible.
|
|
721
|
-
* @property {boolean} wizard - Indicates if the component is used inside a wizard flow.
|
|
722
|
-
* @property {() => void} [onSubmit] - Optional callback invoked after a successful submit.
|
|
723
|
-
* @property {(val: boolean) => void} [setIsLoading] - Optional callback to set loading state externally.
|
|
724
|
-
* @property {() => void} [onBack] - Optional callback invoked when navigating back.
|
|
725
|
-
*/
|
|
726
|
-
export interface UpdateConnectionsProps {
|
|
727
|
-
componentKey: string;
|
|
728
|
-
integration: IntegrationPackInstance;
|
|
729
|
-
active: boolean;
|
|
730
|
-
wizard: boolean;
|
|
731
|
-
simple?: boolean;
|
|
732
|
-
onSubmit?: () => void;
|
|
733
|
-
setIsLoading?: (val: boolean) => void;
|
|
734
|
-
onBack?: () => void;
|
|
735
|
-
}
|
|
736
|
-
/**
|
|
737
|
-
* @interface UpdateMapsProps
|
|
738
|
-
*
|
|
739
|
-
* @description
|
|
740
|
-
* Props for the `UpdateMaps` component.
|
|
741
|
-
*
|
|
742
|
-
* @property {boolean} [componentKey] - Unique key for the component instance
|
|
743
|
-
* @property {boolean} active - Whether this component is currently active/visible.
|
|
744
|
-
* @property {boolean} wizard - Indicates if the component is used inside a wizard flow.
|
|
745
|
-
* @property {IntegrationPack} integration - The integration pack to update maps for.
|
|
746
|
-
* @property {EnvironmentMapExtension[]} maps - The list of environment map extensions to display and edit.
|
|
747
|
-
* @property {(updatedMaps: EnvironmentMapExtension[]) => void} [onMapsChange] - Optional callback invoked when the maps are updated.
|
|
748
|
-
* @property {() => void} [onBack] - Optional callback invoked to navigate back.
|
|
749
|
-
* @property {(val: boolean) => void} [setIsLoading] - Optional callback to set loading state externally.
|
|
750
|
-
*/
|
|
751
|
-
export interface UpdateMapsProps {
|
|
752
|
-
componentKey: string;
|
|
753
|
-
active: boolean;
|
|
754
|
-
wizard: boolean;
|
|
755
|
-
integration: IntegrationPackInstance;
|
|
756
|
-
onBack?: () => void;
|
|
757
|
-
setIsLoading?: (val: boolean) => void;
|
|
758
|
-
}
|
|
759
|
-
/**
|
|
760
|
-
* @typedef UpdateScheduleRef
|
|
761
|
-
*
|
|
762
|
-
* @description
|
|
763
|
-
* Methods exposed via ref to parent components for controlling the `UpdateSchedules` component.
|
|
764
|
-
*
|
|
765
|
-
* @property {() => Promise<boolean>} submit - Submits the updated schedule. Returns `true` if successful.
|
|
766
|
-
*/
|
|
767
|
-
export type UpdateScheduleRef = {
|
|
768
|
-
submit: () => Promise<boolean>;
|
|
769
|
-
};
|
|
770
|
-
/**
|
|
771
|
-
* @interface UpdateSchedulesProps
|
|
772
|
-
*
|
|
773
|
-
* @description
|
|
774
|
-
* Props for the `UpdateSchedules` component.
|
|
775
|
-
*
|
|
776
|
-
* @property {boolean} [componentKey] - Unique key for the component instance
|
|
777
|
-
* @property {IntegrationPack} integration - The integration pack to update schedules for.
|
|
778
|
-
* @property {(val: boolean) => void} [setIsLoading] - Optional callback to set loading state externally.
|
|
779
|
-
* @property {() => void} [onSubmit] - Optional callback invoked after a successful submit.
|
|
780
|
-
* @property {() => void} [onBack] - Optional callback invoked to navigate back in wizard mode.
|
|
781
|
-
* @property {boolean} active - Whether this component is currently active/visible.
|
|
782
|
-
* @property {boolean} wizard - Indicates if the component is used inside a wizard flow.
|
|
783
|
-
*/
|
|
784
|
-
export interface UpdateSchedulesProps {
|
|
785
|
-
componentKey: string;
|
|
786
|
-
integration: IntegrationPackInstance;
|
|
787
|
-
setIsLoading?: (val: boolean) => void;
|
|
788
|
-
onSubmit?: () => void;
|
|
789
|
-
onBack?: () => void;
|
|
790
|
-
active: boolean;
|
|
791
|
-
wizard: boolean;
|
|
792
|
-
}
|
|
793
|
-
/**
|
|
794
|
-
* @file Cors.tsx
|
|
795
|
-
* @component Cors
|
|
796
|
-
* @license BSD-2-Clause
|
|
797
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
798
|
-
*
|
|
799
|
-
* Admin UI for managing tenant-specific CORS origins with the same card/table
|
|
800
|
-
* toggle, search, and pagination patterns used by Integrations.
|
|
801
|
-
*/
|
|
802
|
-
export type CorsProps = {
|
|
803
|
-
componentKey: string;
|
|
804
|
-
/** Explicit primaryAccountId; falls back to any value present on boomiConfig if available. */
|
|
805
|
-
primaryAccountId?: string;
|
|
806
|
-
};
|
|
807
|
-
declare const componentMap: {
|
|
808
|
-
Integrations: React$1.FC<IntegrationsProps>;
|
|
809
|
-
Agent: React$1.FC<AgentProps>;
|
|
810
|
-
RunAgent: React$1.FC<RunAgentProps>;
|
|
811
|
-
ConfigureIntegration: React$1.FC<ConfigureIntegrationProps>;
|
|
812
|
-
ExecutionHistory: React$1.FC<ExecutionHistoryProps>;
|
|
813
|
-
UpdateConnections: React$1.ForwardRefExoticComponent<UpdateConnectionsProps & React$1.RefAttributes<UpdateConnectionsRef>>;
|
|
814
|
-
UpdateMaps: React$1.FC<UpdateMapsProps>;
|
|
815
|
-
UpdateSchedules: React$1.ForwardRefExoticComponent<UpdateSchedulesProps & React$1.RefAttributes<UpdateScheduleRef>>;
|
|
816
|
-
AdminLayout: React$1.FC<{
|
|
817
|
-
componentKey: string;
|
|
818
|
-
primaryAccountId?: string;
|
|
819
|
-
logo?: React$1.ReactNode;
|
|
820
|
-
logoSrc?: string;
|
|
821
|
-
logoText?: string;
|
|
822
|
-
onLogout?: () => void;
|
|
823
|
-
}>;
|
|
824
|
-
Cors: React$1.FC<CorsProps>;
|
|
825
|
-
RedisAdmin: React$1.FC<{
|
|
826
|
-
componentKey: string;
|
|
827
|
-
}>;
|
|
828
|
-
};
|
|
829
|
-
export type ComponentName = keyof typeof componentMap;
|
|
830
|
-
export type MaybeWithKey<P> = P extends {
|
|
831
|
-
componentKey: any;
|
|
832
|
-
} ? Omit<P, "componentKey"> & {
|
|
833
|
-
componentKey: string;
|
|
834
|
-
} : P;
|
|
835
|
-
export type HostId = string;
|
|
836
|
-
/**
|
|
837
|
-
* Destroys the plugin Shadow DOM and React tree, with optional cleanup behaviors.
|
|
838
|
-
*
|
|
839
|
-
* @public
|
|
840
|
-
* @param opts - Optional cleanup options.
|
|
841
|
-
* @param opts.hostId - Host element id to destroy. If omitted, destroys all mounted hosts.
|
|
842
|
-
* @param opts.removeHost - If true, removes the host element from the DOM after reset/unmount.
|
|
843
|
-
* @param opts.clearAuth - If true, dispatches a logout event and calls the server logout endpoint.
|
|
844
|
-
*
|
|
845
|
-
* @example
|
|
846
|
-
* ```ts
|
|
847
|
-
* DestroyPlugin({ removeHost: true, clearTheme: true, clearAuth: true });
|
|
848
|
-
* ```
|
|
849
|
-
*/
|
|
850
|
-
export declare function DestroyPlugin(opts?: {
|
|
851
|
-
hostId?: HostId;
|
|
852
|
-
removeHost?: boolean;
|
|
853
|
-
clearAuth?: boolean;
|
|
854
|
-
}): void;
|
|
855
|
-
/**
|
|
856
|
-
* Stores the initial plugin configuration and (asynchronously) kicks off loading
|
|
857
|
-
* of an external configuration file, if provided. Call this once before
|
|
858
|
-
* {@link RenderComponent}.
|
|
859
|
-
*
|
|
860
|
-
* @public
|
|
861
|
-
* @param config - The base plugin configuration.
|
|
862
|
-
*
|
|
863
|
-
* @example
|
|
864
|
-
* ```ts
|
|
865
|
-
* BoomiPlugin({
|
|
866
|
-
* apiBaseUrl: 'https://api.example.com',
|
|
867
|
-
* accountGroup: 'my-group',
|
|
868
|
-
* theme: { allowThemes: true, defaultTheme: 'boomi' },
|
|
869
|
-
* });
|
|
870
|
-
* ```
|
|
871
|
-
*/
|
|
872
|
-
export declare function BoomiPlugin(config: PluginConfig): void;
|
|
873
|
-
/**
|
|
874
|
-
* Stores the initial plugin configuration and (asynchronously) kicks off loading
|
|
875
|
-
* of an external configuration file, if provided. Call this once before
|
|
876
|
-
* {@link RenderComponent}.
|
|
877
|
-
*
|
|
878
|
-
* @public
|
|
879
|
-
* @param config - The base plugin configuration.
|
|
880
|
-
*
|
|
881
|
-
* @example
|
|
882
|
-
* ```ts
|
|
883
|
-
* BoomiPlugin({
|
|
884
|
-
* apiBaseUrl: 'https://api.example.com',
|
|
885
|
-
* accountGroup: 'my-group',
|
|
886
|
-
* theme: { allowThemes: true, defaultTheme: 'boomi' },
|
|
887
|
-
* configFile: '/boomi.config.js'
|
|
888
|
-
* });
|
|
889
|
-
* ```
|
|
890
|
-
*/
|
|
891
|
-
export declare function RenderComponent<T extends ComponentName>({ component, props, hostId, componentKey, }: {
|
|
892
|
-
component: T;
|
|
893
|
-
props: MaybeWithKey<Parameters<(typeof componentMap)[T]>[0]>;
|
|
894
|
-
hostId?: string;
|
|
895
|
-
componentKey?: string;
|
|
896
|
-
}): void;
|
|
897
|
-
export declare const Components: {
|
|
898
|
-
readonly Integrations: import("react").FC<IntegrationsProps>;
|
|
899
|
-
readonly Agent: import("react").FC<RunAgentProps>;
|
|
900
|
-
};
|
|
901
|
-
export type KnownComponent = keyof typeof Components;
|
|
902
|
-
export type ComponentPropsMap = {
|
|
903
|
-
[K in KnownComponent]: React$1.ComponentProps<typeof Components[K]>;
|
|
904
|
-
};
|
|
905
|
-
|
|
906
|
-
export {
|
|
907
|
-
BoomiPlugin as default,
|
|
908
|
-
};
|
|
909
|
-
|
|
910
|
-
export {};
|