@stack-spot/portal-network 0.225.0 → 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 +12 -0
- 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/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/ai.ts +88 -5
- 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/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/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
|
})),
|