@stack-spot/portal-network 0.224.1 → 0.226.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/CHANGELOG.md +19 -0
- package/dist/api/account.d.ts +56 -42
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +32 -12
- package/dist/api/account.js.map +1 -1
- package/dist/api/ai.d.ts +60 -4
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +25 -2
- package/dist/api/ai.js.map +1 -1
- package/dist/client/account.d.ts +17 -1
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +11 -2
- package/dist/client/account.js.map +1 -1
- package/dist/client/ai.js +1 -1
- package/dist/client/ai.js.map +1 -1
- package/dist/client/discover.d.ts.map +1 -1
- package/dist/client/discover.js +4 -2
- package/dist/client/discover.js.map +1 -1
- package/dist/client/gen-ai-inference.d.ts.map +1 -1
- package/dist/client/gen-ai-inference.js +4 -2
- package/dist/client/gen-ai-inference.js.map +1 -1
- package/dist/client/types.d.ts +1 -1
- package/dist/client/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +103 -61
- package/src/api/ai.ts +88 -5
- package/src/client/account.ts +6 -1
- package/src/client/ai.ts +1 -1
- package/src/client/discover.ts +4 -2
- package/src/client/gen-ai-inference.ts +4 -2
- package/src/client/types.ts +1 -1
package/src/api/account.ts
CHANGED
|
@@ -672,22 +672,20 @@ export type PageResponseServiceCredentialResponseV3 = {
|
|
|
672
672
|
export type Permissions = {
|
|
673
673
|
/** Resource ID */
|
|
674
674
|
resourceId: string;
|
|
675
|
-
/** Action ID */
|
|
676
675
|
actions: string[];
|
|
677
676
|
};
|
|
678
677
|
export type ServiceCredentialCreateRequestV3 = {
|
|
679
678
|
/** Service credential name */
|
|
680
679
|
name: string;
|
|
681
|
-
/** Service credential
|
|
682
|
-
description
|
|
680
|
+
/** Service credential description */
|
|
681
|
+
description?: string;
|
|
683
682
|
/** Service credential expiration days */
|
|
684
683
|
expirationDays?: number;
|
|
685
684
|
/** Service credential token expiration minutes */
|
|
686
685
|
tokenExpirationMinutes?: number;
|
|
687
|
-
|
|
688
|
-
groups: string[];
|
|
686
|
+
groups?: string[];
|
|
689
687
|
/** List of permissions */
|
|
690
|
-
permissions
|
|
688
|
+
permissions?: Permissions[];
|
|
691
689
|
};
|
|
692
690
|
export type ServiceCredentialIdResponseV3 = {
|
|
693
691
|
/** Service Credential Id */
|
|
@@ -2146,6 +2144,35 @@ export type AccountPartnerAdminDataUpdateRequest = {
|
|
|
2146
2144
|
/** Admin email */
|
|
2147
2145
|
email: string;
|
|
2148
2146
|
};
|
|
2147
|
+
export type ResourceTypeIdentifierRequest = {
|
|
2148
|
+
/** Slug of the resource type. */
|
|
2149
|
+
slug?: string;
|
|
2150
|
+
/** ID of the resource type. */
|
|
2151
|
+
id?: string;
|
|
2152
|
+
};
|
|
2153
|
+
export type DeleteResourceRequestV3 = {
|
|
2154
|
+
"type": ResourceTypeIdentifierRequest;
|
|
2155
|
+
/** Slug of the resource to be deleted */
|
|
2156
|
+
slug: string;
|
|
2157
|
+
};
|
|
2158
|
+
export type DeleteResourceResponseV3 = {
|
|
2159
|
+
/** Unique identifier of the resource. */
|
|
2160
|
+
id: string;
|
|
2161
|
+
/** Name of the resource. */
|
|
2162
|
+
name: string;
|
|
2163
|
+
/** Slug version of the resource name. */
|
|
2164
|
+
slug: string;
|
|
2165
|
+
/** Optional description of the resource. */
|
|
2166
|
+
description?: string;
|
|
2167
|
+
"type"?: ResourceTypeResponse;
|
|
2168
|
+
};
|
|
2169
|
+
export type PageDtoDeleteResourceResponseV3 = {
|
|
2170
|
+
items: DeleteResourceResponseV3[];
|
|
2171
|
+
size: number;
|
|
2172
|
+
totalElements: number;
|
|
2173
|
+
page: number;
|
|
2174
|
+
totalPages: number;
|
|
2175
|
+
};
|
|
2149
2176
|
export type ResourceTypeActionResponse = {
|
|
2150
2177
|
/** Unique identifier of the action. */
|
|
2151
2178
|
id: string;
|
|
@@ -2588,35 +2615,6 @@ export type AccountPartnerResponse = {
|
|
|
2588
2615
|
/** Account current status */
|
|
2589
2616
|
isActive: boolean;
|
|
2590
2617
|
};
|
|
2591
|
-
export type ResourceTypeIdentifierRequest = {
|
|
2592
|
-
/** Slug of the resource type. */
|
|
2593
|
-
slug?: string;
|
|
2594
|
-
/** ID of the resource type. */
|
|
2595
|
-
id?: string;
|
|
2596
|
-
};
|
|
2597
|
-
export type DeleteResourceRequestV3 = {
|
|
2598
|
-
"type": ResourceTypeIdentifierRequest;
|
|
2599
|
-
/** Slug of the resource to be deleted */
|
|
2600
|
-
slug: string;
|
|
2601
|
-
};
|
|
2602
|
-
export type DeleteResourceResponseV3 = {
|
|
2603
|
-
/** Unique identifier of the resource. */
|
|
2604
|
-
id: string;
|
|
2605
|
-
/** Name of the resource. */
|
|
2606
|
-
name: string;
|
|
2607
|
-
/** Slug version of the resource name. */
|
|
2608
|
-
slug: string;
|
|
2609
|
-
/** Optional description of the resource. */
|
|
2610
|
-
description?: string;
|
|
2611
|
-
"type"?: ResourceTypeResponse;
|
|
2612
|
-
};
|
|
2613
|
-
export type PageDtoDeleteResourceResponseV3 = {
|
|
2614
|
-
items: DeleteResourceResponseV3[];
|
|
2615
|
-
size: number;
|
|
2616
|
-
totalElements: number;
|
|
2617
|
-
page: number;
|
|
2618
|
-
totalPages: number;
|
|
2619
|
-
};
|
|
2620
2618
|
/**
|
|
2621
2619
|
* Get service credential permissions
|
|
2622
2620
|
*/
|
|
@@ -7475,6 +7473,72 @@ export function updatePartnerAccountAdminData({ id, accountPartnerAdminDataUpdat
|
|
|
7475
7473
|
body: accountPartnerAdminDataUpdateRequest
|
|
7476
7474
|
})));
|
|
7477
7475
|
}
|
|
7476
|
+
/**
|
|
7477
|
+
* Retrieve AI Resources
|
|
7478
|
+
*/
|
|
7479
|
+
export function getAiResources({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }: {
|
|
7480
|
+
size?: any;
|
|
7481
|
+
page?: any;
|
|
7482
|
+
sort?: string;
|
|
7483
|
+
direction?: "ASC" | "DESC";
|
|
7484
|
+
search?: string;
|
|
7485
|
+
filterMode?: "MATCH" | "CONTAINS" | "IN";
|
|
7486
|
+
filterBy?: string;
|
|
7487
|
+
filterValue?: string;
|
|
7488
|
+
multiFilterMode?: string;
|
|
7489
|
+
filterIn?: any;
|
|
7490
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
7491
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
7492
|
+
status: 200;
|
|
7493
|
+
data: PageResponseResourceResponse;
|
|
7494
|
+
} | {
|
|
7495
|
+
status: 403;
|
|
7496
|
+
data: ErrorResponse;
|
|
7497
|
+
} | {
|
|
7498
|
+
status: 422;
|
|
7499
|
+
data: ErrorResponse;
|
|
7500
|
+
} | {
|
|
7501
|
+
status: 500;
|
|
7502
|
+
data: ErrorResponse;
|
|
7503
|
+
}>(`/v3/resources${QS.query(QS.explode({
|
|
7504
|
+
size,
|
|
7505
|
+
page,
|
|
7506
|
+
sort,
|
|
7507
|
+
direction,
|
|
7508
|
+
search,
|
|
7509
|
+
filterMode,
|
|
7510
|
+
filterBy,
|
|
7511
|
+
filterValue,
|
|
7512
|
+
multiFilterMode,
|
|
7513
|
+
filterIn
|
|
7514
|
+
}))}`, {
|
|
7515
|
+
...opts
|
|
7516
|
+
}));
|
|
7517
|
+
}
|
|
7518
|
+
/**
|
|
7519
|
+
* Deletes a resource from the account by resource type and resource slug.
|
|
7520
|
+
*/
|
|
7521
|
+
export function deleteResource({ deleteResourceRequestV3 }: {
|
|
7522
|
+
deleteResourceRequestV3: DeleteResourceRequestV3;
|
|
7523
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
7524
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
7525
|
+
status: 200;
|
|
7526
|
+
data: PageDtoDeleteResourceResponseV3;
|
|
7527
|
+
} | {
|
|
7528
|
+
status: 403;
|
|
7529
|
+
data: ErrorResponse;
|
|
7530
|
+
} | {
|
|
7531
|
+
status: 422;
|
|
7532
|
+
data: ErrorResponse;
|
|
7533
|
+
} | {
|
|
7534
|
+
status: 500;
|
|
7535
|
+
data: ErrorResponse;
|
|
7536
|
+
}>("/v3/resources", oazapfts.json({
|
|
7537
|
+
...opts,
|
|
7538
|
+
method: "DELETE",
|
|
7539
|
+
body: deleteResourceRequestV3
|
|
7540
|
+
})));
|
|
7541
|
+
}
|
|
7478
7542
|
/**
|
|
7479
7543
|
* Get Resource Types
|
|
7480
7544
|
*/
|
|
@@ -8541,7 +8605,7 @@ export function getResourceGroups1({ resourceId, size, page, sort, direction, se
|
|
|
8541
8605
|
/**
|
|
8542
8606
|
* Get Resource Types
|
|
8543
8607
|
*/
|
|
8544
|
-
export function getResourceTypes2({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }: {
|
|
8608
|
+
export function getResourceTypes2({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn, aiResources }: {
|
|
8545
8609
|
size?: any;
|
|
8546
8610
|
page?: any;
|
|
8547
8611
|
sort?: string;
|
|
@@ -8552,6 +8616,7 @@ export function getResourceTypes2({ size, page, sort, direction, search, filterM
|
|
|
8552
8616
|
filterValue?: string;
|
|
8553
8617
|
multiFilterMode?: string;
|
|
8554
8618
|
filterIn?: any;
|
|
8619
|
+
aiResources?: boolean;
|
|
8555
8620
|
}, opts?: Oazapfts.RequestOpts) {
|
|
8556
8621
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
8557
8622
|
status: 200;
|
|
@@ -8572,7 +8637,8 @@ export function getResourceTypes2({ size, page, sort, direction, search, filterM
|
|
|
8572
8637
|
filterBy,
|
|
8573
8638
|
filterValue,
|
|
8574
8639
|
multiFilterMode,
|
|
8575
|
-
filterIn
|
|
8640
|
+
filterIn,
|
|
8641
|
+
aiResources
|
|
8576
8642
|
}))}`, {
|
|
8577
8643
|
...opts
|
|
8578
8644
|
}));
|
|
@@ -8988,30 +9054,6 @@ export function validatePartnerAssociationLimit(opts?: Oazapfts.RequestOpts) {
|
|
|
8988
9054
|
...opts
|
|
8989
9055
|
}));
|
|
8990
9056
|
}
|
|
8991
|
-
/**
|
|
8992
|
-
* Deletes a resource from the account by resource type and resource slug.
|
|
8993
|
-
*/
|
|
8994
|
-
export function deleteResource({ deleteResourceRequestV3 }: {
|
|
8995
|
-
deleteResourceRequestV3: DeleteResourceRequestV3;
|
|
8996
|
-
}, opts?: Oazapfts.RequestOpts) {
|
|
8997
|
-
return oazapfts.ok(oazapfts.fetchJson<{
|
|
8998
|
-
status: 200;
|
|
8999
|
-
data: PageDtoDeleteResourceResponseV3;
|
|
9000
|
-
} | {
|
|
9001
|
-
status: 403;
|
|
9002
|
-
data: ErrorResponse;
|
|
9003
|
-
} | {
|
|
9004
|
-
status: 422;
|
|
9005
|
-
data: ErrorResponse;
|
|
9006
|
-
} | {
|
|
9007
|
-
status: 500;
|
|
9008
|
-
data: ErrorResponse;
|
|
9009
|
-
}>("/v3/resources", oazapfts.json({
|
|
9010
|
-
...opts,
|
|
9011
|
-
method: "DELETE",
|
|
9012
|
-
body: deleteResourceRequestV3
|
|
9013
|
-
})));
|
|
9014
|
-
}
|
|
9015
9057
|
/**
|
|
9016
9058
|
* Disassociate Group to Service Credential
|
|
9017
9059
|
*/
|
package/src/api/ai.ts
CHANGED
|
@@ -368,6 +368,7 @@ export type QuickCommandListResponse = {
|
|
|
368
368
|
export type Method = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
369
369
|
export type QuickCommandsStepFetchRequest = {
|
|
370
370
|
slug: string;
|
|
371
|
+
"type"?: "FETCH";
|
|
371
372
|
url: string;
|
|
372
373
|
method: Method;
|
|
373
374
|
headers?: {
|
|
@@ -378,6 +379,7 @@ export type QuickCommandsStepFetchRequest = {
|
|
|
378
379
|
};
|
|
379
380
|
export type QuickCommandsStepPromptRequest = {
|
|
380
381
|
slug: string;
|
|
382
|
+
"type"?: "LLM";
|
|
381
383
|
prompt: string;
|
|
382
384
|
use_stack?: boolean;
|
|
383
385
|
use_project_files?: boolean;
|
|
@@ -390,6 +392,16 @@ export type QuickCommandsStepPromptRequest = {
|
|
|
390
392
|
next_step_slug?: string | null;
|
|
391
393
|
next_failure_step_slug?: string | null;
|
|
392
394
|
};
|
|
395
|
+
export type QuickCommandsStepParallelEndRequest = {
|
|
396
|
+
slug: string;
|
|
397
|
+
"type"?: "PARALLEL_END";
|
|
398
|
+
next_step_slug: string;
|
|
399
|
+
};
|
|
400
|
+
export type QuickCommandsStepParallelStartRequest = {
|
|
401
|
+
slug: string;
|
|
402
|
+
"type"?: "PARALLEL_START";
|
|
403
|
+
next_steps_slugs: string[];
|
|
404
|
+
};
|
|
393
405
|
export type OperatorType = "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greater" | "smaller" | "greaterEqual" | "smallerEqual" | "isEmpty" | "isNotEmpty" | "isDefined" | "isUndefined";
|
|
394
406
|
export type SimpleExpr = {
|
|
395
407
|
left?: any | null;
|
|
@@ -414,11 +426,13 @@ export type RouterStepRoute = {
|
|
|
414
426
|
};
|
|
415
427
|
export type QuickCommandsStepRouterRequest = {
|
|
416
428
|
slug: string;
|
|
429
|
+
"type"?: "ROUTER";
|
|
417
430
|
routes: RouterStepRoute[];
|
|
418
431
|
max_executions: number;
|
|
419
432
|
};
|
|
420
433
|
export type QuickCommandsStepScriptRequest = {
|
|
421
434
|
slug: string;
|
|
435
|
+
"type"?: "SCRIPT";
|
|
422
436
|
script: string;
|
|
423
437
|
use_uploaded_files: boolean;
|
|
424
438
|
next_step_slug?: string | null;
|
|
@@ -434,7 +448,19 @@ export type QuickCommandsCreateRequest = {
|
|
|
434
448
|
"type"?: QuickCommandTypeRequest;
|
|
435
449
|
description: string;
|
|
436
450
|
final_result: string;
|
|
437
|
-
steps: (
|
|
451
|
+
steps: (({
|
|
452
|
+
"type": "FETCH";
|
|
453
|
+
} & QuickCommandsStepFetchRequest) | ({
|
|
454
|
+
"type": "LLM";
|
|
455
|
+
} & QuickCommandsStepPromptRequest) | ({
|
|
456
|
+
"type": "PARALLEL_END";
|
|
457
|
+
} & QuickCommandsStepParallelEndRequest) | ({
|
|
458
|
+
"type": "PARALLEL_START";
|
|
459
|
+
} & QuickCommandsStepParallelStartRequest) | ({
|
|
460
|
+
"type": "ROUTER";
|
|
461
|
+
} & QuickCommandsStepRouterRequest) | ({
|
|
462
|
+
"type": "SCRIPT";
|
|
463
|
+
} & QuickCommandsStepScriptRequest))[];
|
|
438
464
|
return_type?: QuickCommandsReturnType | null;
|
|
439
465
|
preserve_conversation?: boolean;
|
|
440
466
|
custom_inputs?: CustomInputRequest[] | null;
|
|
@@ -443,6 +469,20 @@ export type QuickCommandsCreateRequest = {
|
|
|
443
469
|
} | null;
|
|
444
470
|
share_context_between_steps?: boolean | null;
|
|
445
471
|
};
|
|
472
|
+
export type QuickCommandAccountListResponseV1 = {
|
|
473
|
+
name: string;
|
|
474
|
+
username: string;
|
|
475
|
+
"type": QuickCommandTypeRequest;
|
|
476
|
+
creator: string | null;
|
|
477
|
+
created_at?: string | null;
|
|
478
|
+
visibility_level: string;
|
|
479
|
+
id: string;
|
|
480
|
+
slug: string;
|
|
481
|
+
};
|
|
482
|
+
export type PaginatedResponseQuickCommandAccountListResponseV1 = {
|
|
483
|
+
total_pages: number;
|
|
484
|
+
items: QuickCommandAccountListResponseV1[];
|
|
485
|
+
};
|
|
446
486
|
export type QuickCommandsUpdateRequest = {
|
|
447
487
|
name?: string | null;
|
|
448
488
|
description?: string | null;
|
|
@@ -459,7 +499,7 @@ export type QuickCommandsUpdateRequest = {
|
|
|
459
499
|
use_only?: boolean | null;
|
|
460
500
|
use_uploaded_files?: boolean | null;
|
|
461
501
|
};
|
|
462
|
-
export type QuickCommandStepType = "LLM" | "FETCH" | "ROUTER" | "SCRIPT";
|
|
502
|
+
export type QuickCommandStepType = "LLM" | "FETCH" | "ROUTER" | "SCRIPT" | "PARALLEL_START" | "PARALLEL_END";
|
|
463
503
|
export type Method2 = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
464
504
|
export type QuickCommandStepFetchResponse = {
|
|
465
505
|
slug: string;
|
|
@@ -600,7 +640,7 @@ export type QuickCommandFetchResponseResult = {
|
|
|
600
640
|
[key: string]: string;
|
|
601
641
|
} | null;
|
|
602
642
|
data?: string | null;
|
|
603
|
-
|
|
643
|
+
status_code?: number | null;
|
|
604
644
|
};
|
|
605
645
|
export type QuickCommandStepScriptStatus = "queued" | "running" | "success" | "failure";
|
|
606
646
|
export type QuickCommandScriptExecutionResponse = {
|
|
@@ -2643,6 +2683,46 @@ export function listAllV1QuickCommandsAllGet({ visibility, order, types, authori
|
|
|
2643
2683
|
})
|
|
2644
2684
|
}));
|
|
2645
2685
|
}
|
|
2686
|
+
/**
|
|
2687
|
+
* List All
|
|
2688
|
+
*/
|
|
2689
|
+
export function listAllV1QuickCommandsAccountGet({ name, size, page, username, order, types, authorization, xAccountId, xMemberId, xUsername }: {
|
|
2690
|
+
name?: string | null;
|
|
2691
|
+
size?: number;
|
|
2692
|
+
page?: number;
|
|
2693
|
+
username?: string | null;
|
|
2694
|
+
order?: OrderEnum | null;
|
|
2695
|
+
types?: QuickCommandTypeRequest[] | null;
|
|
2696
|
+
authorization: string;
|
|
2697
|
+
xAccountId?: string | null;
|
|
2698
|
+
xMemberId?: string | null;
|
|
2699
|
+
xUsername?: string | null;
|
|
2700
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2701
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2702
|
+
status: 200;
|
|
2703
|
+
data: PaginatedResponseQuickCommandAccountListResponseV1;
|
|
2704
|
+
} | {
|
|
2705
|
+
status: 404;
|
|
2706
|
+
} | {
|
|
2707
|
+
status: 422;
|
|
2708
|
+
data: HttpValidationError;
|
|
2709
|
+
}>(`/v1/quick-commands/account${QS.query(QS.explode({
|
|
2710
|
+
name,
|
|
2711
|
+
size,
|
|
2712
|
+
page,
|
|
2713
|
+
username,
|
|
2714
|
+
order,
|
|
2715
|
+
types
|
|
2716
|
+
}))}`, {
|
|
2717
|
+
...opts,
|
|
2718
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2719
|
+
authorization,
|
|
2720
|
+
"x-account-id": xAccountId,
|
|
2721
|
+
"x-member-id": xMemberId,
|
|
2722
|
+
"x-username": xUsername
|
|
2723
|
+
})
|
|
2724
|
+
}));
|
|
2725
|
+
}
|
|
2646
2726
|
/**
|
|
2647
2727
|
* Update Quick Command
|
|
2648
2728
|
*/
|
|
@@ -2791,8 +2871,9 @@ export function deleteFavoriteV1QuickCommandsSlugFavoriteDelete({ slug, authoriz
|
|
|
2791
2871
|
/**
|
|
2792
2872
|
* Share
|
|
2793
2873
|
*/
|
|
2794
|
-
export function shareV1QuickCommandsSlugSharePost({ slug, authorization, xAccountId, xMemberId, xUsername }: {
|
|
2874
|
+
export function shareV1QuickCommandsSlugSharePost({ slug, isResourceAccessManager, authorization, xAccountId, xMemberId, xUsername }: {
|
|
2795
2875
|
slug: string;
|
|
2876
|
+
isResourceAccessManager?: boolean | null;
|
|
2796
2877
|
authorization: string;
|
|
2797
2878
|
xAccountId?: string | null;
|
|
2798
2879
|
xMemberId?: string | null;
|
|
@@ -2805,7 +2886,9 @@ export function shareV1QuickCommandsSlugSharePost({ slug, authorization, xAccoun
|
|
|
2805
2886
|
} | {
|
|
2806
2887
|
status: 422;
|
|
2807
2888
|
data: HttpValidationError;
|
|
2808
|
-
}>(`/v1/quick-commands/${encodeURIComponent(slug)}/share
|
|
2889
|
+
}>(`/v1/quick-commands/${encodeURIComponent(slug)}/share${QS.query(QS.explode({
|
|
2890
|
+
is_resource_access_manager: isResourceAccessManager
|
|
2891
|
+
}))}`, {
|
|
2809
2892
|
...opts,
|
|
2810
2893
|
method: "POST",
|
|
2811
2894
|
headers: oazapfts.mergeHeaders(opts?.headers, {
|
package/src/client/account.ts
CHANGED
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
getAccounts,
|
|
53
53
|
getAccountSso,
|
|
54
54
|
getActiveExtensionVersion,
|
|
55
|
+
getAiResources,
|
|
55
56
|
getAll,
|
|
56
57
|
getAllAccountSso,
|
|
57
58
|
getAllGroupMapping,
|
|
@@ -946,7 +947,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
946
947
|
/**
|
|
947
948
|
* Get all service credentials paginated
|
|
948
949
|
*/
|
|
949
|
-
|
|
950
|
+
getServicesCredentials = this.infiniteQuery(getAll, { accumulator: 'items' })
|
|
950
951
|
/**
|
|
951
952
|
* Get Service Credential V3
|
|
952
953
|
*/
|
|
@@ -983,6 +984,10 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
983
984
|
* Revoke Service Credential V3
|
|
984
985
|
*/
|
|
985
986
|
revokeServiceCredentialV3 = this.mutation(revoke)
|
|
987
|
+
/**
|
|
988
|
+
* Get list of resources
|
|
989
|
+
*/
|
|
990
|
+
getResources = this.infiniteQuery(getAiResources, { accumulator: 'items' })
|
|
986
991
|
}
|
|
987
992
|
|
|
988
993
|
export const accountClient = new AccountClient()
|
package/src/client/ai.ts
CHANGED
|
@@ -503,7 +503,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
503
503
|
progress?.onStepChange?.({ step: step.slug, ...resultMap, answer: responseData, statusResult: 'END' })
|
|
504
504
|
|
|
505
505
|
resultMap[step.slug] = {
|
|
506
|
-
|
|
506
|
+
status_code: response.status,
|
|
507
507
|
data: responseData,
|
|
508
508
|
headers: Object.fromEntries(response.headers.entries()),
|
|
509
509
|
}
|
package/src/client/discover.ts
CHANGED
|
@@ -174,7 +174,8 @@ class DiscoverClient extends ReactQueryNetworkClient {
|
|
|
174
174
|
input: s.goal,
|
|
175
175
|
attempts: [{
|
|
176
176
|
tools: s.tools?.map(t => ({
|
|
177
|
-
|
|
177
|
+
//For some reason the api is returning id in name attribute, and it is this data that has the the value we should use
|
|
178
|
+
...(tools.find(({ id }) => id === t.name) ?? { id: t.name, name: t.name }),
|
|
178
179
|
executionId: t.tool_execution_id,
|
|
179
180
|
goal: t.goal,
|
|
180
181
|
})),
|
|
@@ -200,7 +201,8 @@ class DiscoverClient extends ReactQueryNetworkClient {
|
|
|
200
201
|
input: s.goal,
|
|
201
202
|
attempts: [{
|
|
202
203
|
tools: s.tools?.map(t => ({
|
|
203
|
-
|
|
204
|
+
//For some reason the api is returning id in name attribute, and it is this data that has the the value we should use
|
|
205
|
+
...(tools.find(({ id }) => id === t.name) ?? { id: t.name, name: t.name }),
|
|
204
206
|
executionId: t.tool_execution_id,
|
|
205
207
|
goal: t.goal,
|
|
206
208
|
})),
|
|
@@ -140,7 +140,8 @@ class GenAiInference extends ReactQueryNetworkClient {
|
|
|
140
140
|
input: s.goal,
|
|
141
141
|
attempts: [{
|
|
142
142
|
tools: s.tools?.map(t => ({
|
|
143
|
-
|
|
143
|
+
//For some reason the api is returning id in name attribute, and it is this data that has the the value we should use
|
|
144
|
+
...(tools.find(({ id }) => id === t.name) ?? { id: t.name, name: t.name }),
|
|
144
145
|
executionId: t.tool_execution_id,
|
|
145
146
|
goal: t.goal,
|
|
146
147
|
})),
|
|
@@ -166,7 +167,8 @@ class GenAiInference extends ReactQueryNetworkClient {
|
|
|
166
167
|
input: s.goal,
|
|
167
168
|
attempts: [{
|
|
168
169
|
tools: s.tools?.map(t => ({
|
|
169
|
-
|
|
170
|
+
//For some reason the api is returning id in name attribute, and it is this data that has the the value we should use
|
|
171
|
+
...(tools.find(({ id }) => id === t.name) ?? { id: t.name, name: t.name }),
|
|
170
172
|
executionId: t.tool_execution_id,
|
|
171
173
|
goal: t.goal,
|
|
172
174
|
})),
|