@stack-spot/portal-network 0.86.1 → 0.87.1
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 +14 -0
- package/dist/api/content.d.ts +117 -10
- package/dist/api/content.d.ts.map +1 -1
- package/dist/api/content.js +82 -1
- package/dist/api/content.js.map +1 -1
- package/dist/api/workspaceManager.d.ts +29 -100
- package/dist/api/workspaceManager.d.ts.map +1 -1
- package/dist/api/workspaceManager.js +0 -14
- package/dist/api/workspaceManager.js.map +1 -1
- package/dist/client/content.d.ts +21 -1
- package/dist/client/content.d.ts.map +1 -1
- package/dist/client/content.js +28 -1
- package/dist/client/content.js.map +1 -1
- package/package.json +1 -1
- package/src/api/content.ts +307 -10
- package/src/api/workspaceManager.ts +29 -118
- package/src/client/content.ts +15 -6
|
@@ -525,36 +525,47 @@ export type ManagerRunResponse = {
|
|
|
525
525
|
environmentName?: string;
|
|
526
526
|
runId: string;
|
|
527
527
|
};
|
|
528
|
-
export type
|
|
528
|
+
export type ConnectionInterfaceAttributeResponse = {
|
|
529
|
+
id?: string;
|
|
530
|
+
key: string;
|
|
531
|
+
value: object;
|
|
532
|
+
sensitive: boolean;
|
|
533
|
+
schema?: object;
|
|
534
|
+
};
|
|
535
|
+
export type AppliedPluginResponseConnectionInterfacesIdResponse = {
|
|
536
|
+
id: string;
|
|
537
|
+
slug: string;
|
|
529
538
|
connectionInterfaceId: string;
|
|
530
539
|
typeId: string;
|
|
531
540
|
alias?: string;
|
|
532
541
|
typeName: string;
|
|
542
|
+
attributes: ConnectionInterfaceAttributeResponse[];
|
|
533
543
|
};
|
|
534
|
-
export type
|
|
544
|
+
export type AppliedPluginResponseActionsResponseConnectionInterfaceResponse = {
|
|
535
545
|
typeId?: string;
|
|
536
546
|
typeName: string;
|
|
537
547
|
alias: string;
|
|
538
548
|
optional?: boolean;
|
|
539
549
|
source?: string;
|
|
540
550
|
};
|
|
541
|
-
export type
|
|
542
|
-
connectionInterfaces:
|
|
551
|
+
export type AppliedPluginResponseActionsResponseRequires = {
|
|
552
|
+
connectionInterfaces: AppliedPluginResponseActionsResponseConnectionInterfaceResponse[];
|
|
543
553
|
};
|
|
544
|
-
export type
|
|
554
|
+
export type AppliedPluginResponseActionsResponse = {
|
|
545
555
|
versionId: string;
|
|
546
556
|
qualifier: string;
|
|
547
557
|
description: string;
|
|
548
558
|
slug: string;
|
|
549
559
|
displayName: string;
|
|
550
|
-
requires:
|
|
560
|
+
requires: AppliedPluginResponseActionsResponseRequires;
|
|
551
561
|
};
|
|
552
|
-
export type
|
|
562
|
+
export type AppliedPluginResponseLink = {
|
|
553
563
|
name: string;
|
|
554
564
|
url: string;
|
|
555
565
|
imageUrl?: string;
|
|
556
566
|
};
|
|
557
|
-
export type
|
|
567
|
+
export type AppliedPluginResponse = {
|
|
568
|
+
alias: string;
|
|
558
569
|
versionId: string;
|
|
559
570
|
qualifier: string;
|
|
560
571
|
slug: string;
|
|
@@ -570,13 +581,13 @@ export type SharedInfraAppliedPluginsV2ResponsePluginsResponse = {
|
|
|
570
581
|
attributes?: {
|
|
571
582
|
[key: string]: object;
|
|
572
583
|
};
|
|
573
|
-
connectionInterfaces?:
|
|
574
|
-
actions?:
|
|
575
|
-
links?:
|
|
584
|
+
connectionInterfaces?: AppliedPluginResponseConnectionInterfacesIdResponse[];
|
|
585
|
+
actions?: AppliedPluginResponseActionsResponse[];
|
|
586
|
+
links?: AppliedPluginResponseLink[];
|
|
576
587
|
resourcesProvided?: string[];
|
|
577
588
|
};
|
|
578
589
|
export type SharedInfraAppliedPluginsV2Response = {
|
|
579
|
-
plugins:
|
|
590
|
+
plugins: AppliedPluginResponse[];
|
|
580
591
|
};
|
|
581
592
|
export type ActivityResponse = {
|
|
582
593
|
title: string;
|
|
@@ -599,58 +610,8 @@ export type PaginatedActivityResponse = {
|
|
|
599
610
|
totalItems: number;
|
|
600
611
|
totalPages: number;
|
|
601
612
|
};
|
|
602
|
-
export type ApplicationAppliedPluginsV2ResponsePluginsResponseConnectionInterfacesIdResponse = {
|
|
603
|
-
connectionInterfaceId: string;
|
|
604
|
-
typeId: string;
|
|
605
|
-
alias?: string;
|
|
606
|
-
typeName: string;
|
|
607
|
-
};
|
|
608
|
-
export type ApplicationAppliedPluginsV2ResponsePluginsResponseActionsResponseConnectionInterfaceResponse = {
|
|
609
|
-
typeId?: string;
|
|
610
|
-
typeName: string;
|
|
611
|
-
alias: string;
|
|
612
|
-
optional?: boolean;
|
|
613
|
-
source?: string;
|
|
614
|
-
};
|
|
615
|
-
export type ApplicationAppliedPluginsV2ResponsePluginsResponseActionsResponseRequires = {
|
|
616
|
-
connectionInterfaces: ApplicationAppliedPluginsV2ResponsePluginsResponseActionsResponseConnectionInterfaceResponse[];
|
|
617
|
-
};
|
|
618
|
-
export type ApplicationAppliedPluginsV2ResponsePluginsResponseActionsResponse = {
|
|
619
|
-
versionId: string;
|
|
620
|
-
qualifier: string;
|
|
621
|
-
description: string;
|
|
622
|
-
slug: string;
|
|
623
|
-
displayName: string;
|
|
624
|
-
requires: ApplicationAppliedPluginsV2ResponsePluginsResponseActionsResponseRequires;
|
|
625
|
-
};
|
|
626
|
-
export type ApplicationAppliedPluginsV2ResponsePluginsResponseLink = {
|
|
627
|
-
name: string;
|
|
628
|
-
url: string;
|
|
629
|
-
imageUrl?: string;
|
|
630
|
-
};
|
|
631
|
-
export type ApplicationAppliedPluginsV2ResponsePluginsResponse = {
|
|
632
|
-
versionId: string;
|
|
633
|
-
qualifier: string;
|
|
634
|
-
slug: string;
|
|
635
|
-
description: string;
|
|
636
|
-
displayName: string;
|
|
637
|
-
"type": string;
|
|
638
|
-
status: string;
|
|
639
|
-
deployStatus: string;
|
|
640
|
-
inCloud?: boolean;
|
|
641
|
-
fork?: boolean;
|
|
642
|
-
iacPath?: string;
|
|
643
|
-
singleUse?: boolean;
|
|
644
|
-
attributes?: {
|
|
645
|
-
[key: string]: object;
|
|
646
|
-
};
|
|
647
|
-
connectionInterfaces?: ApplicationAppliedPluginsV2ResponsePluginsResponseConnectionInterfacesIdResponse[];
|
|
648
|
-
actions?: ApplicationAppliedPluginsV2ResponsePluginsResponseActionsResponse[];
|
|
649
|
-
links?: ApplicationAppliedPluginsV2ResponsePluginsResponseLink[];
|
|
650
|
-
resourcesProvided?: string[];
|
|
651
|
-
};
|
|
652
613
|
export type ApplicationAppliedPluginsV2Response = {
|
|
653
|
-
plugins:
|
|
614
|
+
plugins: AppliedPluginResponse[];
|
|
654
615
|
};
|
|
655
616
|
export type WorkspaceContextV2ResponseWorkspacePluginAttributeContext = {
|
|
656
617
|
/** Key identifier of an input */
|
|
@@ -968,19 +929,6 @@ export type SharedInfraResponse = {
|
|
|
968
929
|
/** Shared-infra updateAt. */
|
|
969
930
|
updatedAt: string;
|
|
970
931
|
};
|
|
971
|
-
export type WorkspaceActivitiesResponse = {
|
|
972
|
-
title: string;
|
|
973
|
-
owner?: string;
|
|
974
|
-
status: "SUCCESS" | "FAILED" | "RUNNING" | "PENDING" | "SKIPPED" | "CANCELLED" | "NONE" | "DRIFT" | "SUCCEEDED" | "RUNTIME_ERROR" | "USER_ERROR" | "INTERNAL_ERROR" | "ABORTED" | "ABORTING" | "EXTERNAL_ERROR" | "READY_TO_RUN" | "TIMEOUT";
|
|
975
|
-
"type"?: "DEPLOY" | "CUSTOMER_WORKFLOW" | "ACTION" | "WORKFLOW" | "DESTROY" | "ROLLBACK" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED" | "ROLLBACK_SELF_HOSTED" | "CREATE";
|
|
976
|
-
action?: "CREATE" | "UPDATE" | "DELETE" | "RUN";
|
|
977
|
-
requestedBy?: string;
|
|
978
|
-
time: number;
|
|
979
|
-
version: string;
|
|
980
|
-
detail: {
|
|
981
|
-
[key: string]: object;
|
|
982
|
-
};
|
|
983
|
-
};
|
|
984
932
|
export type StackFilterItemResponse = {
|
|
985
933
|
stackId: string;
|
|
986
934
|
displayName: string;
|
|
@@ -1015,21 +963,14 @@ export type WorkspacePluginResponse = {
|
|
|
1015
963
|
requiredConnectionInterfacesByType?: WorkspacePluginConnectionsResponse[];
|
|
1016
964
|
generatesConnectionInterfacesByType: WorkspacePluginConnectionsResponse[];
|
|
1017
965
|
};
|
|
1018
|
-
export type
|
|
966
|
+
export type ConnectionInterfaceVisibilityResponse = {
|
|
1019
967
|
"type": string;
|
|
1020
968
|
ids: string[];
|
|
1021
969
|
};
|
|
1022
|
-
export type
|
|
1023
|
-
id?: string;
|
|
1024
|
-
key: string;
|
|
1025
|
-
value: object;
|
|
1026
|
-
sensitive: boolean;
|
|
1027
|
-
schema?: object;
|
|
1028
|
-
};
|
|
1029
|
-
export type ConnectionInterfaceDetailsResponseConnectionInterfaceAttributesByEnv = {
|
|
970
|
+
export type ConnectionInterfaceAttributesByEnvResponse = {
|
|
1030
971
|
environmentId: string;
|
|
1031
972
|
envName: string;
|
|
1032
|
-
attributes:
|
|
973
|
+
attributes: ConnectionInterfaceAttributeResponse[];
|
|
1033
974
|
};
|
|
1034
975
|
export type ConnectionInterfaceDetailsResponse = {
|
|
1035
976
|
/** Connection Interface Details id. */
|
|
@@ -1038,13 +979,13 @@ export type ConnectionInterfaceDetailsResponse = {
|
|
|
1038
979
|
typeId: string;
|
|
1039
980
|
/** Connection Interface id. */
|
|
1040
981
|
connectionInterfaceId: string;
|
|
1041
|
-
visibility?:
|
|
982
|
+
visibility?: ConnectionInterfaceVisibilityResponse;
|
|
1042
983
|
/** Source Plugin Version id. */
|
|
1043
984
|
sourcePluginVersionId?: string;
|
|
1044
985
|
/** Was this Connection Interface automatically generated?. */
|
|
1045
986
|
automaticallyGenerated: boolean;
|
|
1046
987
|
/** Connection interface attribute's by environment. */
|
|
1047
|
-
attributesByEnv:
|
|
988
|
+
attributesByEnv: ConnectionInterfaceAttributesByEnvResponse[];
|
|
1048
989
|
};
|
|
1049
990
|
export type AvailableConnectionInterfaceResponse = {
|
|
1050
991
|
slug: string;
|
|
@@ -2018,21 +1959,6 @@ export function sharedInfraControllergetSharedInfraAppliedPlugins({ workspaceId,
|
|
|
2018
1959
|
...opts
|
|
2019
1960
|
}));
|
|
2020
1961
|
}
|
|
2021
|
-
export function sharedInfraControllergetSharedInfraActivities({ workspaceId, sharedInfraId, envName, $type }: {
|
|
2022
|
-
workspaceId: string;
|
|
2023
|
-
sharedInfraId: string;
|
|
2024
|
-
envName: string;
|
|
2025
|
-
$type?: "DEPLOY" | "CUSTOMER_WORKFLOW" | "ACTION" | "WORKFLOW" | "DESTROY" | "ROLLBACK" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED" | "ROLLBACK_SELF_HOSTED" | "CREATE";
|
|
2026
|
-
}, opts?: Oazapfts.RequestOpts) {
|
|
2027
|
-
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2028
|
-
status: 200;
|
|
2029
|
-
data: WorkspaceActivitiesResponse[];
|
|
2030
|
-
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/environments/${encodeURIComponent(envName)}/activities${QS.query(QS.explode({
|
|
2031
|
-
"type": $type
|
|
2032
|
-
}))}`, {
|
|
2033
|
-
...opts
|
|
2034
|
-
}));
|
|
2035
|
-
}
|
|
2036
1962
|
export function updateInfrastructureControllergetSharedInfraBranches({ workspaceId, sharedInfraId }: {
|
|
2037
1963
|
workspaceId: string;
|
|
2038
1964
|
sharedInfraId: string;
|
|
@@ -2156,21 +2082,6 @@ export function applicationControllergetApplicationDetails({ workspaceId, applic
|
|
|
2156
2082
|
...opts
|
|
2157
2083
|
}));
|
|
2158
2084
|
}
|
|
2159
|
-
export function applicationControllergetApplicationActivities({ workspaceId, applicationId, envName, $type }: {
|
|
2160
|
-
workspaceId: string;
|
|
2161
|
-
applicationId: string;
|
|
2162
|
-
envName: string;
|
|
2163
|
-
$type?: "DEPLOY" | "CUSTOMER_WORKFLOW" | "ACTION" | "WORKFLOW" | "DESTROY" | "ROLLBACK" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED" | "ROLLBACK_SELF_HOSTED" | "CREATE";
|
|
2164
|
-
}, opts?: Oazapfts.RequestOpts) {
|
|
2165
|
-
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2166
|
-
status: 200;
|
|
2167
|
-
data: WorkspaceActivitiesResponse[];
|
|
2168
|
-
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(envName)}/activities${QS.query(QS.explode({
|
|
2169
|
-
"type": $type
|
|
2170
|
-
}))}`, {
|
|
2171
|
-
...opts
|
|
2172
|
-
}));
|
|
2173
|
-
}
|
|
2174
2085
|
export function updateInfrastructureControllergetApplicationBranches({ workspaceId, applicationId }: {
|
|
2175
2086
|
workspaceId: string;
|
|
2176
2087
|
applicationId: string;
|
package/src/client/content.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
deprecateActionVersion,
|
|
19
19
|
deprecatePluginVersion,
|
|
20
20
|
deprecateStackVersionBy,
|
|
21
|
+
deprecateWorkflowVersion,
|
|
21
22
|
downloadAction,
|
|
22
23
|
getActionBySlug,
|
|
23
24
|
getActionsVersions,
|
|
@@ -53,6 +54,7 @@ import {
|
|
|
53
54
|
getWorkflow,
|
|
54
55
|
getWorkflowByStudioSlug,
|
|
55
56
|
getWorkflowDoc,
|
|
57
|
+
getWorkflowUsageSummary,
|
|
56
58
|
listAccountWorkflow,
|
|
57
59
|
listActions,
|
|
58
60
|
listActions1,
|
|
@@ -78,6 +80,7 @@ import {
|
|
|
78
80
|
removeStackWorkflow,
|
|
79
81
|
stackModalViewSummary,
|
|
80
82
|
stackVersionUsageSummary,
|
|
83
|
+
unpublishWorkflowVersion,
|
|
81
84
|
updateStudio,
|
|
82
85
|
updateStudioTabs,
|
|
83
86
|
} from '../api/content'
|
|
@@ -408,32 +411,38 @@ class ContentClient extends ReactQueryNetworkClient {
|
|
|
408
411
|
* Gets a stack from a stack version id
|
|
409
412
|
*/
|
|
410
413
|
getStackByVersionId = this.query(getStackVersionById)
|
|
411
|
-
|
|
412
414
|
/**
|
|
413
415
|
* View all stacks V3 by account
|
|
414
416
|
*/
|
|
415
417
|
getAllStacksV3 = this.query(listStacks)
|
|
416
|
-
|
|
417
418
|
/**
|
|
418
419
|
* View all stacks by account
|
|
419
420
|
*/
|
|
420
421
|
getAllStacks = this.query(listStacks1)
|
|
421
|
-
|
|
422
422
|
/**
|
|
423
423
|
* List most used stack versions
|
|
424
424
|
*/
|
|
425
|
-
|
|
426
425
|
listMostUsedStackVersions = this.query(listMostUsedStackVersions)
|
|
427
|
-
|
|
428
426
|
/**
|
|
429
427
|
* List plugins v2
|
|
430
428
|
*/
|
|
431
429
|
pluginsV2 = this.infiniteQuery(listPlugins, { accumulator: 'content', initialPageParam: 0 })
|
|
432
|
-
|
|
433
430
|
/**
|
|
434
431
|
* Get plugin
|
|
435
432
|
*/
|
|
436
433
|
plugin = this.query(getPlugin)
|
|
434
|
+
/**
|
|
435
|
+
* Deprecate workflow version
|
|
436
|
+
*/
|
|
437
|
+
deprecateWorkflowVersion = this.mutation(deprecateWorkflowVersion)
|
|
438
|
+
/**
|
|
439
|
+
* Unpublish workflow version
|
|
440
|
+
*/
|
|
441
|
+
unpublishWorkflowVersion = this.mutation(unpublishWorkflowVersion)
|
|
442
|
+
/**
|
|
443
|
+
* Get usage summary of workflow
|
|
444
|
+
*/
|
|
445
|
+
workflowUsageSummary = this.query(getWorkflowUsageSummary)
|
|
437
446
|
}
|
|
438
447
|
|
|
439
448
|
export const contentClient = new ContentClient()
|