@stack-spot/portal-network 0.87.0 → 0.88.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.
@@ -525,36 +525,47 @@ export type ManagerRunResponse = {
525
525
  environmentName?: string;
526
526
  runId: string;
527
527
  };
528
- export type SharedInfraAppliedPluginsV2ResponsePluginsResponseConnectionInterfacesIdResponse = {
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 SharedInfraAppliedPluginsV2ResponsePluginsResponseActionsResponseRequiresConnectionInterfaceResponse = {
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 SharedInfraAppliedPluginsV2ResponsePluginsResponseActionsResponseRequires = {
542
- connectionInterfaces: SharedInfraAppliedPluginsV2ResponsePluginsResponseActionsResponseRequiresConnectionInterfaceResponse[];
551
+ export type AppliedPluginResponseActionsResponseRequires = {
552
+ connectionInterfaces: AppliedPluginResponseActionsResponseConnectionInterfaceResponse[];
543
553
  };
544
- export type SharedInfraAppliedPluginsV2ResponsePluginsResponseActionsResponse = {
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: SharedInfraAppliedPluginsV2ResponsePluginsResponseActionsResponseRequires;
560
+ requires: AppliedPluginResponseActionsResponseRequires;
551
561
  };
552
- export type SharedInfraAppliedPluginsV2ResponsePluginsResponseLink = {
562
+ export type AppliedPluginResponseLink = {
553
563
  name: string;
554
564
  url: string;
555
565
  imageUrl?: string;
556
566
  };
557
- export type SharedInfraAppliedPluginsV2ResponsePluginsResponse = {
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?: SharedInfraAppliedPluginsV2ResponsePluginsResponseConnectionInterfacesIdResponse[];
574
- actions?: SharedInfraAppliedPluginsV2ResponsePluginsResponseActionsResponse[];
575
- links?: SharedInfraAppliedPluginsV2ResponsePluginsResponseLink[];
584
+ connectionInterfaces?: AppliedPluginResponseConnectionInterfacesIdResponse[];
585
+ actions?: AppliedPluginResponseActionsResponse[];
586
+ links?: AppliedPluginResponseLink[];
576
587
  resourcesProvided?: string[];
577
588
  };
578
589
  export type SharedInfraAppliedPluginsV2Response = {
579
- plugins: SharedInfraAppliedPluginsV2ResponsePluginsResponse[];
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: ApplicationAppliedPluginsV2ResponsePluginsResponse[];
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 ConnectionInterfaceDetailsResponseVisibility = {
966
+ export type ConnectionInterfaceVisibilityResponse = {
1019
967
  "type": string;
1020
968
  ids: string[];
1021
969
  };
1022
- export type ConnectionInterfaceDetailsResponseConnectionInterfaceAttribute = {
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: ConnectionInterfaceDetailsResponseConnectionInterfaceAttribute[];
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?: ConnectionInterfaceDetailsResponseVisibility;
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: ConnectionInterfaceDetailsResponseConnectionInterfaceAttributesByEnv[];
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;
@@ -4,6 +4,7 @@ import {
4
4
  addLink,
5
5
  addWorkflow,
6
6
  addWorkspace,
7
+ archiveStackVersion,
7
8
  associateActionToPlugin,
8
9
  changeVisibility,
9
10
  createStudio,
@@ -38,6 +39,7 @@ import {
38
39
  getPluginVersions,
39
40
  getPluginVersionsNotInUse,
40
41
  getPluginVersionUsageSummary,
42
+ getStackBySlugV2,
41
43
  getStackUsesPlugin,
42
44
  getStackVersionById,
43
45
  getStackVersionListByIds,
@@ -70,6 +72,8 @@ import {
70
72
  listStacks,
71
73
  listStacks1,
72
74
  listStacksByFilters,
75
+ listStacksByFiltersV2,
76
+ listStackVersions,
73
77
  listStarters,
74
78
  listWorkflows,
75
79
  listWorkflowVersion,
@@ -173,9 +177,22 @@ class ContentClient extends ReactQueryNetworkClient {
173
177
  */
174
178
  deprecationReasons = this.query(listReasons)
175
179
  /**
180
+ * @deprecated use stacksFromStudio instead
176
181
  * Gets stacks from a given studio
177
182
  */
178
183
  stacksFromStudios = this.query(listStacksByFilters)
184
+ /**
185
+ * Gets stacks from a given studio
186
+ */
187
+ stacksFromStudio = this.query(listStacksByFiltersV2)
188
+ /**
189
+ * Retrieves a specific stack (by slug) from a studio.
190
+ */
191
+ stackFromStudio = this.query(getStackBySlugV2)
192
+ /**
193
+ * Lists all versions of a Stack
194
+ */
195
+ versionsOfStack = this.query(listStackVersions)
179
196
 
180
197
  //Workflow
181
198
  /**
@@ -298,6 +315,10 @@ class ContentClient extends ReactQueryNetworkClient {
298
315
  * Deprecate a stack version
299
316
  */
300
317
  deprecateStackVersion = this.mutation(removeAuthorizationParam(deprecateStackVersionBy))
318
+ /**
319
+ * Archive a stack version
320
+ */
321
+ archiveStackVersion = this.mutation(archiveStackVersion)
301
322
  /**
302
323
  * Delete a stack version of type draft or unpublish
303
324
  */