@botpress/adk 1.3.8 → 1.3.9
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/assets/manager.d.ts +1 -1
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/auth/service.d.ts.map +1 -1
- package/dist/bot-generator/dev-id-manager.d.ts.map +1 -1
- package/dist/bot-generator/generator.d.ts.map +1 -1
- package/dist/generators/tests.d.ts.map +1 -1
- package/dist/index.js +60 -19
- package/dist/index.js.map +13 -13
- package/dist/integrations/checker.d.ts.map +1 -1
- package/dist/integrations/hub-cache.d.ts.map +1 -1
- package/dist/integrations/manager.d.ts.map +1 -1
- package/dist/integrations/operations.d.ts.map +1 -1
- package/dist/interfaces/manager.d.ts.map +1 -1
- package/dist/tables/manager.d.ts.map +1 -1
- package/dist/workspace/workspace-cache.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/assets/manager.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssetFile, LocalAssetFile, AssetSyncPlan, AssetSyncResult, AssetSyncOptions, AssetsIndex } from
|
|
1
|
+
import { AssetFile, LocalAssetFile, AssetSyncPlan, AssetSyncResult, AssetSyncOptions, AssetsIndex } from "./types.js";
|
|
2
2
|
export interface AssetManagerOptions {
|
|
3
3
|
projectPath: string;
|
|
4
4
|
botId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/assets/manager.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,SAAS,EACT,cAAc,EACd,aAAa,EACb,eAAe,EAGf,gBAAgB,EAChB,WAAW,EACZ,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,YAAY,CAAqB;gBAE7B,OAAO,EAAE,mBAAmB;YAQ1B,SAAS;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/assets/manager.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,SAAS,EACT,cAAc,EACd,aAAa,EACb,eAAe,EAGf,gBAAgB,EAChB,WAAW,EACZ,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,YAAY,CAAqB;gBAE7B,OAAO,EAAE,mBAAmB;YAQ1B,SAAS;IAgCvB,OAAO,CAAC,WAAW;IASnB;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC;IAS5C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;IAuCjD;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IA8B7C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,aAAa,CAAC;IA6E9C;;OAEG;IACG,WAAW,CACf,IAAI,EAAE,aAAa,EACnB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC;IAyE3B;;OAEG;YACW,WAAW;IAsBzB;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAqCtC;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,WAAW,CAAC;IAW/C;;;OAGG;IACG,sBAAsB,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;YAgEtC,aAAa;IAoB3B,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,WAAW;CA4BpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/auth/service.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,CAAC,EAAE,MAAM;IAIrB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/auth/service.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,CAAC,EAAE,MAAM;IAIrB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IA0DjD,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAQtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-id-manager.d.ts","sourceRoot":"","sources":["../../src/bot-generator/dev-id-manager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;YAUzC,SAAS;
|
|
1
|
+
{"version":3,"file":"dev-id-manager.d.ts","sourceRoot":"","sources":["../../src/bot-generator/dev-id-manager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;YAUzC,SAAS;IA2BjB,UAAU,IAAI,OAAO,CAAC,YAAY,CAAC;IAInC,gBAAgB,IAAI,OAAO,CAAC,YAAY,CAAC;IAYzC,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAWpD,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB9B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB7B,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;CAoB5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;CACrD;AAMD,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,EAAE,mBAAmB;YAO1B,kBAAkB;YAuBlB,sBAAsB;IAsB9B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YA6BjB,yBAAyB;
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;CACrD;AAMD,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,EAAE,mBAAmB;YAO1B,kBAAkB;YAuBlB,sBAAsB;IAsB9B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YA6BjB,yBAAyB;YAgFzB,kBAAkB;YAKlB,oBAAoB;YAKpB,kBAAkB;YAKlB,kBAAkB;YAKlB,qBAAqB;YAKrB,yBAAyB;YAKzB,mBAAmB;YAQnB,8BAA8B;YAQ9B,oBAAoB;YAgFpB,uBAAuB;YAmHvB,8BAA8B;YAgC9B,4BAA4B;YAgC5B,qBAAqB;YAoUrB,gBAAgB;YAoDhB,mBAAmB;YAwBnB,gBAAgB;YA0ChB,mBAAmB;YA4BnB,UAAU;YAWV,aAAa;IAgBrB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAocnC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAczC;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA0Cf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tests.d.ts","sourceRoot":"","sources":["../../src/generators/tests.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,EAAE,SAAS,MAAM,oDAiBrE,CAAC;AAEL,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM;;;;;;;;
|
|
1
|
+
{"version":3,"file":"tests.d.ts","sourceRoot":"","sources":["../../src/generators/tests.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,EAAE,SAAS,MAAM,oDAiBrE,CAAC;AAEL,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM;;;;;;;;iBAkBoji5B,CAAC;uBAA0H,CAAC;;;;;;;;iBAAuU,CAAC;uBAAyH,CAAC;;;;sBAAsM,CAAC;;;;;;;iBAA6S,CAAC;uBAA0H,CAAC;oBAAkC,CAAC;qBAAoC,CAAC;;;;;;;;;;;sBAA2Y,CAAC;;;;;;;iBAA8O,CAAC;uBAA2H,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAj73M,CAAC;uBAA0H,CAAC;;;;;;;;iBAAuU,CAAC;uBAAyH,CAAC;;;;sBAAsM,CAAC;;;;;;;iBAA6S,CAAC;uBAA0H,CAAC;oBAAkC,CAAC;qBAAoC,CAAC;;;;;;;;;;;sBAA2Y,CAAC;;;;;;;iBAA8O,CAAC;uBAA2H,CAAC;;;;;;;;;;;;;;;;;;;;;;EADxpysB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -367,7 +367,10 @@ class AuthService {
|
|
|
367
367
|
try {
|
|
368
368
|
const client = new Client({
|
|
369
369
|
apiUrl: this.apiUrl,
|
|
370
|
-
token
|
|
370
|
+
token,
|
|
371
|
+
headers: {
|
|
372
|
+
"x-multiple-integrations": "true"
|
|
373
|
+
}
|
|
371
374
|
});
|
|
372
375
|
const accountResponse = await client.getAccount({});
|
|
373
376
|
const { account } = accountResponse;
|
|
@@ -1344,7 +1347,10 @@ class WorkspaceCache {
|
|
|
1344
1347
|
const credentials = await auth.getActiveCredentials();
|
|
1345
1348
|
const client = new Client2({
|
|
1346
1349
|
apiUrl: credentials.apiUrl,
|
|
1347
|
-
token: credentials.token
|
|
1350
|
+
token: credentials.token,
|
|
1351
|
+
headers: {
|
|
1352
|
+
"x-multiple-integrations": "true"
|
|
1353
|
+
}
|
|
1348
1354
|
});
|
|
1349
1355
|
const { workspaces } = await client.listWorkspaces({});
|
|
1350
1356
|
const workspace = workspaces.find((ws) => ws.id === workspaceId);
|
|
@@ -1566,7 +1572,10 @@ class AssetsManager {
|
|
|
1566
1572
|
token: credentials.token,
|
|
1567
1573
|
apiUrl: credentials.apiUrl,
|
|
1568
1574
|
workspaceId,
|
|
1569
|
-
botId: this.botId
|
|
1575
|
+
botId: this.botId,
|
|
1576
|
+
headers: {
|
|
1577
|
+
"x-multiple-integrations": "true"
|
|
1578
|
+
}
|
|
1570
1579
|
});
|
|
1571
1580
|
}
|
|
1572
1581
|
return this.client;
|
|
@@ -2434,10 +2443,14 @@ class IntegrationManager {
|
|
|
2434
2443
|
if (!this.options.workspaceId && !credentials.workspaceId) {
|
|
2435
2444
|
throw new Error('No workspace ID found in current profile. Please login again with "adk login"');
|
|
2436
2445
|
}
|
|
2446
|
+
const workspaceId = this.options.workspaceId || credentials.workspaceId;
|
|
2437
2447
|
this.client = new Client4({
|
|
2438
2448
|
token: credentials.token,
|
|
2439
2449
|
apiUrl: credentials.apiUrl,
|
|
2440
|
-
workspaceId
|
|
2450
|
+
workspaceId,
|
|
2451
|
+
headers: {
|
|
2452
|
+
"x-multiple-integrations": "true"
|
|
2453
|
+
}
|
|
2441
2454
|
});
|
|
2442
2455
|
}
|
|
2443
2456
|
return this.client;
|
|
@@ -2497,7 +2510,7 @@ class IntegrationManager {
|
|
|
2497
2510
|
name: ref.fullName,
|
|
2498
2511
|
version: ref.version
|
|
2499
2512
|
});
|
|
2500
|
-
} catch (
|
|
2513
|
+
} catch (privateError) {
|
|
2501
2514
|
try {
|
|
2502
2515
|
integrationResponse = await client.getPublicIntegration({
|
|
2503
2516
|
name: ref.name,
|
|
@@ -2684,7 +2697,10 @@ class HubCache {
|
|
|
2684
2697
|
this.client = new Client5({
|
|
2685
2698
|
token: credentials.token,
|
|
2686
2699
|
apiUrl: credentials.apiUrl,
|
|
2687
|
-
workspaceId: credentials.workspaceId
|
|
2700
|
+
workspaceId: credentials.workspaceId,
|
|
2701
|
+
headers: {
|
|
2702
|
+
"x-multiple-integrations": "true"
|
|
2703
|
+
}
|
|
2688
2704
|
});
|
|
2689
2705
|
}
|
|
2690
2706
|
return this.client;
|
|
@@ -2837,7 +2853,10 @@ class IntegrationOperations {
|
|
|
2837
2853
|
this.client = new Client6({
|
|
2838
2854
|
token: credentials.token,
|
|
2839
2855
|
apiUrl: credentials.apiUrl,
|
|
2840
|
-
workspaceId
|
|
2856
|
+
workspaceId,
|
|
2857
|
+
headers: {
|
|
2858
|
+
"x-multiple-integrations": "true"
|
|
2859
|
+
}
|
|
2841
2860
|
});
|
|
2842
2861
|
}
|
|
2843
2862
|
return this.client;
|
|
@@ -2923,7 +2942,9 @@ class IntegrationOperations {
|
|
|
2923
2942
|
}
|
|
2924
2943
|
let integrationDefinition;
|
|
2925
2944
|
try {
|
|
2926
|
-
const tempManager = new IntegrationManager
|
|
2945
|
+
const tempManager = new IntegrationManager({
|
|
2946
|
+
workspaceId: project.agentInfo?.workspaceId
|
|
2947
|
+
});
|
|
2927
2948
|
const loadResult = await tempManager.loadIntegrations({
|
|
2928
2949
|
integrations: {
|
|
2929
2950
|
[alias]: {
|
|
@@ -3105,7 +3126,10 @@ class IntegrationChecker {
|
|
|
3105
3126
|
this.client = new Client7({
|
|
3106
3127
|
token: credentials.token,
|
|
3107
3128
|
apiUrl: credentials.apiUrl,
|
|
3108
|
-
workspaceId
|
|
3129
|
+
workspaceId,
|
|
3130
|
+
headers: {
|
|
3131
|
+
"x-multiple-integrations": "true"
|
|
3132
|
+
}
|
|
3109
3133
|
});
|
|
3110
3134
|
}
|
|
3111
3135
|
return this.client;
|
|
@@ -3127,7 +3151,9 @@ class IntegrationChecker {
|
|
|
3127
3151
|
async checkIntegrations(botId) {
|
|
3128
3152
|
const client = await this.getClient();
|
|
3129
3153
|
const project = await AgentProject.load(this.projectPath);
|
|
3130
|
-
const integrationManager = new IntegrationManager
|
|
3154
|
+
const integrationManager = new IntegrationManager({
|
|
3155
|
+
workspaceId: project.agentInfo?.workspaceId
|
|
3156
|
+
});
|
|
3131
3157
|
const loadResult = await integrationManager.loadIntegrations(project.dependencies || { integrations: {} });
|
|
3132
3158
|
if (loadResult.errors.length > 0) {
|
|
3133
3159
|
throw new Error(`Failed to load integrations: ${loadResult.errors.map((e) => e.message).join(", ")}`);
|
|
@@ -3433,7 +3459,10 @@ class InterfaceManager {
|
|
|
3433
3459
|
this.client = new Client8({
|
|
3434
3460
|
token: credentials.token,
|
|
3435
3461
|
apiUrl: credentials.apiUrl,
|
|
3436
|
-
workspaceId: this.options.workspaceId || credentials.workspaceId
|
|
3462
|
+
workspaceId: this.options.workspaceId || credentials.workspaceId,
|
|
3463
|
+
headers: {
|
|
3464
|
+
"x-multiple-integrations": "true"
|
|
3465
|
+
}
|
|
3437
3466
|
});
|
|
3438
3467
|
}
|
|
3439
3468
|
return this.client;
|
|
@@ -4465,7 +4494,7 @@ class AgentProjectGenerator {
|
|
|
4465
4494
|
deploy: "adk deploy"
|
|
4466
4495
|
},
|
|
4467
4496
|
dependencies: {
|
|
4468
|
-
"@botpress/runtime": `^${"1.3.
|
|
4497
|
+
"@botpress/runtime": `^${"1.3.9"}`
|
|
4469
4498
|
},
|
|
4470
4499
|
devDependencies: {
|
|
4471
4500
|
typescript: "^5.0.0"
|
|
@@ -5498,7 +5527,10 @@ class DevIdManager {
|
|
|
5498
5527
|
this.client = new Client9({
|
|
5499
5528
|
token: credentials.token,
|
|
5500
5529
|
apiUrl: credentials.apiUrl,
|
|
5501
|
-
workspaceId
|
|
5530
|
+
workspaceId,
|
|
5531
|
+
headers: {
|
|
5532
|
+
"x-multiple-integrations": "true"
|
|
5533
|
+
}
|
|
5502
5534
|
});
|
|
5503
5535
|
}
|
|
5504
5536
|
return this.client;
|
|
@@ -5924,7 +5956,9 @@ class BotGenerator {
|
|
|
5924
5956
|
}
|
|
5925
5957
|
async generateIntegrationsTypes() {
|
|
5926
5958
|
const project = await AgentProject.load(this.projectPath);
|
|
5927
|
-
const manager2 = new IntegrationManager
|
|
5959
|
+
const manager2 = new IntegrationManager({
|
|
5960
|
+
workspaceId: project.agentInfo?.workspaceId
|
|
5961
|
+
});
|
|
5928
5962
|
const integrations = await manager2.loadIntegrations(project.dependencies || {});
|
|
5929
5963
|
const integrationsDir = path29.join(this.projectPath, ".adk", "integrations");
|
|
5930
5964
|
const existingIntegrationFiles = await this.listFilesRecursive(integrationsDir);
|
|
@@ -6005,7 +6039,9 @@ class BotGenerator {
|
|
|
6005
6039
|
}
|
|
6006
6040
|
async generateRuntimeTypes() {
|
|
6007
6041
|
const project = await AgentProject.load(this.projectPath);
|
|
6008
|
-
const manager2 = new IntegrationManager
|
|
6042
|
+
const manager2 = new IntegrationManager({
|
|
6043
|
+
workspaceId: project.agentInfo?.workspaceId
|
|
6044
|
+
});
|
|
6009
6045
|
const integrations = await manager2.loadIntegrations(project.dependencies || {});
|
|
6010
6046
|
const channels = [];
|
|
6011
6047
|
for (const integration of integrations.integrations) {
|
|
@@ -6060,7 +6096,9 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
6060
6096
|
}
|
|
6061
6097
|
async generateInterfacesTypes() {
|
|
6062
6098
|
const project = await AgentProject.load(this.projectPath);
|
|
6063
|
-
const integrationManager = new IntegrationManager
|
|
6099
|
+
const integrationManager = new IntegrationManager({
|
|
6100
|
+
workspaceId: project.agentInfo?.workspaceId
|
|
6101
|
+
});
|
|
6064
6102
|
const manager2 = new InterfaceManager;
|
|
6065
6103
|
const interfacesDir = path29.join(this.projectPath, ".adk", "interfaces");
|
|
6066
6104
|
const existingInterfaceFiles = await this.listFilesRecursive(interfacesDir);
|
|
@@ -6179,7 +6217,7 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
6179
6217
|
for (const { alias } of integrations.filter((i) => i.enabled)) {
|
|
6180
6218
|
const importName = `integration_${getIntegrationAlias(alias)}`;
|
|
6181
6219
|
imports.push(`import ${importName} from "./bp_modules/${importName}";`);
|
|
6182
|
-
addIntegrations.push(`bot.addIntegration(${importName});`);
|
|
6220
|
+
addIntegrations.push(`bot.addIntegration(${importName}, { alias: "${alias}" });`);
|
|
6183
6221
|
}
|
|
6184
6222
|
const conversationTags = {};
|
|
6185
6223
|
const workflowTags = {};
|
|
@@ -6909,7 +6947,10 @@ class TableManager {
|
|
|
6909
6947
|
this.client = new Client10({
|
|
6910
6948
|
token: credentials.token,
|
|
6911
6949
|
apiUrl: credentials.apiUrl,
|
|
6912
|
-
botId: this.botId
|
|
6950
|
+
botId: this.botId,
|
|
6951
|
+
headers: {
|
|
6952
|
+
"x-multiple-integrations": "true"
|
|
6953
|
+
}
|
|
6913
6954
|
});
|
|
6914
6955
|
}
|
|
6915
6956
|
return this.client;
|
|
@@ -7277,5 +7318,5 @@ export {
|
|
|
7277
7318
|
AgentProject
|
|
7278
7319
|
};
|
|
7279
7320
|
|
|
7280
|
-
//# debugId=
|
|
7321
|
+
//# debugId=3936F251FC5E490F64756E2164756E21
|
|
7281
7322
|
//# sourceMappingURL=index.js.map
|