@boomi/embedkit-sdk 1.2.15 → 1.2.16
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 +12 -5
- 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 +12 -5
- 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",
|
|
@@ -7100,16 +7101,21 @@ var IntegrationPackInstanceService = class {
|
|
|
7100
7101
|
const clampedPage = Math.min(Math.max(1, page), totalPages);
|
|
7101
7102
|
const start = (clampedPage - 1) * pageSize;
|
|
7102
7103
|
const slice = filtered.slice(start, start + pageSize);
|
|
7103
|
-
const
|
|
7104
|
+
const enrichedRaw = await Promise.all(
|
|
7104
7105
|
slice.map(async (instance) => {
|
|
7105
7106
|
const inst = { ...instance };
|
|
7106
|
-
inst.installed = true;
|
|
7107
7107
|
const ipId = inst.integrationPackId;
|
|
7108
|
+
inst.integrationPackDescription = packDescById.get(ipId);
|
|
7109
|
+
inst.isAgent = hasAgentTag(inst.integrationPackDescription);
|
|
7110
|
+
if (renderTypeFilter === "agent" && !inst.isAgent) {
|
|
7111
|
+
return null;
|
|
7112
|
+
} else if (renderTypeFilter === "integration" && inst.isAgent) {
|
|
7113
|
+
return null;
|
|
7114
|
+
}
|
|
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,
|