@boomi/embedkit-sdk 1.2.15 → 1.2.17
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/index.cjs +14 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -14349,6 +14349,7 @@ declare class IntegrationPackInstanceService {
|
|
|
14349
14349
|
* @throws ApiError
|
|
14350
14350
|
*/
|
|
14351
14351
|
fetchIntegrationPackInstances(params: {
|
|
14352
|
+
renderType?: string;
|
|
14352
14353
|
accountGroup: string;
|
|
14353
14354
|
search?: string;
|
|
14354
14355
|
page?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -14349,6 +14349,7 @@ declare class IntegrationPackInstanceService {
|
|
|
14349
14349
|
* @throws ApiError
|
|
14350
14350
|
*/
|
|
14351
14351
|
fetchIntegrationPackInstances(params: {
|
|
14352
|
+
renderType?: string;
|
|
14352
14353
|
accountGroup: string;
|
|
14353
14354
|
search?: string;
|
|
14354
14355
|
page?: number;
|
package/dist/index.js
CHANGED
|
@@ -7038,8 +7038,9 @@ var IntegrationPackInstanceService = class {
|
|
|
7038
7038
|
* @throws ApiError
|
|
7039
7039
|
*/
|
|
7040
7040
|
async fetchIntegrationPackInstances(params) {
|
|
7041
|
-
const { accountGroup, search, page = 1, pageSize = 12 } = params;
|
|
7041
|
+
const { renderType, accountGroup, search, page = 1, pageSize = 12 } = params;
|
|
7042
7042
|
const hasAgentTag = (s) => typeof s === "string" && /{{\s*AGENT\s*}}/i.test(s);
|
|
7043
|
+
const renderTypeFilter = renderType === "agent" || renderType === "integration" ? renderType : "all";
|
|
7043
7044
|
const agResp = await this.httpRequest.request({
|
|
7044
7045
|
method: "POST",
|
|
7045
7046
|
url: "/AccountGroup/query",
|
|
@@ -7092,24 +7093,29 @@ var IntegrationPackInstanceService = class {
|
|
|
7092
7093
|
});
|
|
7093
7094
|
const allInstances = instResp?.result ?? [];
|
|
7094
7095
|
const searchLc = search?.toLowerCase();
|
|
7095
|
-
const filtered = searchLc ? allInstances.filter(
|
|
7096
|
+
const filtered = (searchLc ? allInstances.filter(
|
|
7096
7097
|
(inst) => (inst?.integrationPackInstancName?.toLowerCase?.().includes(searchLc) ?? false) || (inst?.integrationPackOverrideName?.toLowerCase?.().includes(searchLc) ?? false)
|
|
7097
|
-
) : allInstances
|
|
7098
|
+
) : allInstances).filter((inst) => {
|
|
7099
|
+
const isAgentInstance = hasAgentTag(inst?.integrationPackDescription);
|
|
7100
|
+
if (renderTypeFilter === "agent" && !isAgentInstance) return false;
|
|
7101
|
+
if (renderTypeFilter === "integration" && isAgentInstance) return false;
|
|
7102
|
+
return true;
|
|
7103
|
+
});
|
|
7098
7104
|
const total = filtered.length;
|
|
7099
7105
|
const totalPages = Math.max(1, Math.ceil(total / pageSize));
|
|
7100
7106
|
const clampedPage = Math.min(Math.max(1, page), totalPages);
|
|
7101
7107
|
const start = (clampedPage - 1) * pageSize;
|
|
7102
7108
|
const slice = filtered.slice(start, start + pageSize);
|
|
7103
|
-
const
|
|
7109
|
+
const enrichedRaw = await Promise.all(
|
|
7104
7110
|
slice.map(async (instance) => {
|
|
7105
7111
|
const inst = { ...instance };
|
|
7106
|
-
inst.installed = true;
|
|
7107
7112
|
const ipId = inst.integrationPackId;
|
|
7113
|
+
inst.integrationPackDescription = packDescById.get(ipId);
|
|
7114
|
+
inst.isAgent = hasAgentTag(inst.integrationPackDescription);
|
|
7115
|
+
inst.installed = true;
|
|
7108
7116
|
const rawType = installationTypeById.get(ipId);
|
|
7109
7117
|
inst.installationType = rawType === "SINGLE" || rawType === "MULTI" ? rawType : "SINGLE";
|
|
7110
7118
|
inst.integrationPackName = packNameById.get(ipId);
|
|
7111
|
-
inst.integrationPackDescription = packDescById.get(ipId);
|
|
7112
|
-
inst.isAgent = hasAgentTag(inst.integrationPackDescription);
|
|
7113
7119
|
if (inst.integrationPackDescription && hasAgentTag(inst.integrationPackDescription)) {
|
|
7114
7120
|
inst.integrationPackDescription = inst.integrationPackDescription.replace(/{{\s*AGENT\s*}}/gi, "").trim();
|
|
7115
7121
|
}
|
|
@@ -7126,6 +7132,7 @@ var IntegrationPackInstanceService = class {
|
|
|
7126
7132
|
return inst;
|
|
7127
7133
|
})
|
|
7128
7134
|
);
|
|
7135
|
+
const enriched = enrichedRaw.filter((inst) => Boolean(inst));
|
|
7129
7136
|
return {
|
|
7130
7137
|
numberOfResults: total,
|
|
7131
7138
|
result: enriched,
|