@bpinternal/integration-hub 0.4.0 → 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
CHANGED
|
@@ -447,3 +447,5 @@ pnpm --filter @bpinternal/integration-hub exec npm publish --access public
|
|
|
447
447
|
```
|
|
448
448
|
|
|
449
449
|
`prepack` runs `clean && build` automatically before publish.
|
|
450
|
+
|
|
451
|
+
**Note:** Depending on options passed to the botpress client (x-multiple-integrations = true), the integrations from Botpress Cloud are keyed by their ALIAS, not their ID. For edits that intend to use the integration ID, make sure to explicitly use the .id parameter.
|
|
@@ -9,14 +9,15 @@ export type IntegrationSummary = PublicIntegrationSummary | PrivateIntegrationSu
|
|
|
9
9
|
export type BotIntegrationsMap = NonNullable<ClientOutputs['getBot']['bot']['integrations']>;
|
|
10
10
|
export type BotIntegrationEntry = BotIntegrationsMap[string];
|
|
11
11
|
export type IntegrationPatch = NonNullable<ClientInputs['updateBot']['integrations']>[string] | null;
|
|
12
|
-
export type IntegrationPatchTransformers = Partial<Record<'install' | 'uninstall' | 'upgrade' | 'enable' | 'disable', (patch: Record<string, IntegrationPatch>) => Record<string, IntegrationPatch> | Promise<Record<string, IntegrationPatch>>>>;
|
|
12
|
+
export type IntegrationPatchTransformers = Partial<Record<'install' | 'uninstall' | 'upgrade' | 'enable' | 'disable' | 'configure', (patch: Record<string, IntegrationPatch>) => Record<string, IntegrationPatch> | Promise<Record<string, IntegrationPatch>>>>;
|
|
13
13
|
export interface BotpressInstalledIntegration extends BotIntegrationEntry {
|
|
14
14
|
id: string;
|
|
15
15
|
name: string;
|
|
16
|
-
|
|
16
|
+
integrationAlias: string;
|
|
17
17
|
}
|
|
18
18
|
export interface BotpressIntegrationHubItem {
|
|
19
19
|
id: string;
|
|
20
|
+
installedId?: string;
|
|
20
21
|
name: string;
|
|
21
22
|
title?: string | null;
|
|
22
23
|
description?: string | null;
|
|
@@ -73,6 +74,7 @@ export interface UseIntegrationDetailsOptions {
|
|
|
73
74
|
botId: string;
|
|
74
75
|
integrationId: string | null;
|
|
75
76
|
enabled?: boolean;
|
|
77
|
+
transformIntegrationPatch?: IntegrationPatchTransformers;
|
|
76
78
|
}
|
|
77
79
|
export interface UseIntegrationDetailsResult {
|
|
78
80
|
definition: Integration | null;
|