@stack-spot/portal-network 0.199.0 → 0.201.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.
@@ -35,6 +35,18 @@ export type MetadataV1 = {
35
35
  [key: string]: string;
36
36
  };
37
37
  };
38
+ export type DeploymentContextManifestV1Spec = {
39
+ runtimeId: string;
40
+ deployTemplateId: string;
41
+ workspaceId: string;
42
+ applications: string[];
43
+ environment: string;
44
+ isDefault: boolean;
45
+ };
46
+ export type DeploymentContextManifestV1 = {
47
+ metadata: MetadataV1;
48
+ spec: DeploymentContextManifestV1Spec;
49
+ };
38
50
  export type TenantManifestV1SpecCloudAccountConfigurationFromRef = {
39
51
  id: string;
40
52
  };
@@ -411,6 +423,7 @@ export type RuntimeManifestV1Alpha1SpecCloudAccountConfigurationIamRoles = {
411
423
  clusterNodeGroup?: string;
412
424
  clusterAdminRoles: string[];
413
425
  karpenter?: string;
426
+ crossAccountRoleArn?: string;
414
427
  };
415
428
  export type RuntimeManifestV1Alpha1SpecCloudAccountConfiguration = {
416
429
  fromRef?: RuntimeManifestV1Alpha1SpecCloudAccountConfigurationFromRef;
@@ -637,6 +650,7 @@ export type RuntimeManifestV1Alpha1StatusControlPlane = {
637
650
  kubeVersion: string;
638
651
  conditions: RuntimeManifestV1Alpha1StatusControlPlaneCondition[];
639
652
  };
653
+ export type ManifestStatus = object;
640
654
  export type ManifestMetadata = {
641
655
  propagableLabels?: {
642
656
  [key: string]: string;
@@ -648,31 +662,33 @@ export type ManifestMetadata = {
648
662
  [key: string]: string;
649
663
  };
650
664
  };
651
- export type ManifestStatus = object;
652
665
  export type ManifestSpec = object;
653
666
  export type ApplicationDeploymentManifestBase = {
654
- metadata: ManifestMetadata;
655
667
  status?: ManifestStatus;
668
+ metadata: ManifestMetadata;
656
669
  spec: ManifestSpec;
657
670
  apiVersion: string;
658
671
  };
659
672
  export type ApplicationDeploymentManifestV1Spec = {
660
- runtimeId: string;
673
+ runtimeId?: string;
661
674
  destinationNamespace?: string;
662
675
  applicationId: string;
663
- deployTemplate: string;
676
+ environment?: string;
677
+ workspaceId?: string;
678
+ deployTemplate?: string;
664
679
  deployTemplateValues: {
665
680
  [key: string]: object;
666
681
  };
667
682
  };
668
683
  export type ApplicationDeploymentManifestV1Status = {
669
684
  revisionNumber?: number;
685
+ runtimeId?: string;
670
686
  };
671
687
  export type ApplicationDeploymentManifestV1 = {
672
688
  apiVersion: "ApplicationDeploymentManifestV1";
673
689
  } & ApplicationDeploymentManifestBase & {
674
- metadata?: MetadataV1;
675
- spec?: ApplicationDeploymentManifestV1Spec;
690
+ metadata: MetadataV1;
691
+ spec: ApplicationDeploymentManifestV1Spec;
676
692
  status?: ApplicationDeploymentManifestV1Status;
677
693
  };
678
694
  export type Metadata = {
@@ -697,8 +713,8 @@ export type Spec = {
697
713
  export type ApplicationDeploymentManifestV1Alpha1 = {
698
714
  apiVersion: "ApplicationDeploymentManifestV1Alpha1";
699
715
  } & ApplicationDeploymentManifestBase & {
700
- metadata?: Metadata;
701
- spec?: Spec;
716
+ metadata: Metadata;
717
+ spec: Spec;
702
718
  };
703
719
  export type RuntimeManifestV1Alpha1Status = {
704
720
  created: boolean;
@@ -799,6 +815,106 @@ export type Association = {
799
815
  export type ListRuntimeWorkspaceEnvironmentAssociationsResponse = {
800
816
  associations: Association[];
801
817
  };
818
+ export type RolloutManifestV1Metadata = {
819
+ id?: string;
820
+ name: string;
821
+ version: string;
822
+ labels?: {
823
+ [key: string]: string;
824
+ };
825
+ propagableLabels?: {
826
+ [key: string]: string;
827
+ };
828
+ revision: string;
829
+ "namespace": string;
830
+ creationTimestamp?: string;
831
+ };
832
+ export type RolloutManifestV1Spec = {
833
+ resourceId: string;
834
+ replicas?: number;
835
+ strategy?: {
836
+ [key: string]: object;
837
+ };
838
+ template?: {
839
+ [key: string]: object;
840
+ };
841
+ "type": string;
842
+ };
843
+ export type RolloutManifestV1Status = {
844
+ availableReplicas?: number;
845
+ blueGreen?: {
846
+ [key: string]: object;
847
+ };
848
+ canary?: {
849
+ [key: string]: object;
850
+ };
851
+ conditions?: {
852
+ [key: string]: object;
853
+ }[];
854
+ currentPodHash?: string;
855
+ currentStepHash?: string;
856
+ currentStepIndex?: number;
857
+ observedGeneration?: string;
858
+ phase?: string;
859
+ readyReplicas?: number;
860
+ replicas?: number;
861
+ restartedAt?: string;
862
+ selector?: string;
863
+ stableRS?: string;
864
+ updatedReplicas?: number;
865
+ controllerPause?: boolean;
866
+ message?: string;
867
+ pauseConditions?: {
868
+ [key: string]: object;
869
+ }[];
870
+ abort?: boolean;
871
+ abortedAt?: string;
872
+ promoteFull?: boolean;
873
+ hpareplicas?: number;
874
+ };
875
+ export type RolloutManifestV1StatusWrite = {
876
+ HPAReplicas?: number;
877
+ availableReplicas?: number;
878
+ blueGreen?: {
879
+ [key: string]: object;
880
+ };
881
+ canary?: {
882
+ [key: string]: object;
883
+ };
884
+ conditions?: {
885
+ [key: string]: object;
886
+ }[];
887
+ currentPodHash?: string;
888
+ currentStepHash?: string;
889
+ currentStepIndex?: number;
890
+ observedGeneration?: string;
891
+ phase?: string;
892
+ readyReplicas?: number;
893
+ replicas?: number;
894
+ restartedAt?: string;
895
+ selector?: string;
896
+ stableRS?: string;
897
+ updatedReplicas?: number;
898
+ controllerPause?: boolean;
899
+ message?: string;
900
+ pauseConditions?: {
901
+ [key: string]: object;
902
+ }[];
903
+ abort?: boolean;
904
+ abortedAt?: string;
905
+ promoteFull?: boolean;
906
+ hpareplicas?: number;
907
+ };
908
+ export type RolloutManifestV1 = {
909
+ metadata: RolloutManifestV1Metadata;
910
+ spec: RolloutManifestV1Spec;
911
+ status?: RolloutManifestV1Status;
912
+ };
913
+ export type RolloutManifestV1Write = {
914
+ metadata: RolloutManifestV1Metadata;
915
+ spec: RolloutManifestV1Spec;
916
+ status?: RolloutManifestV1StatusWrite;
917
+ };
802
918
  export type LogManifestV1Spec = {
803
919
  resourceId: string;
804
920
  controlPlaneId?: string;
@@ -972,6 +1088,133 @@ export function createOrganizationIcon({ organizationId, body }: {
972
1088
  body
973
1089
  })));
974
1090
  }
1091
+ /**
1092
+ * List deployment contexts
1093
+ */
1094
+ export function list({ environment, runtimeId, deployTemplateId, workspaceId, isDefault }: {
1095
+ environment?: string;
1096
+ runtimeId?: string;
1097
+ deployTemplateId?: string;
1098
+ workspaceId?: string;
1099
+ isDefault?: boolean;
1100
+ }, opts?: Oazapfts.RequestOpts) {
1101
+ return oazapfts.ok(oazapfts.fetchJson<{
1102
+ status: 200;
1103
+ data: DeploymentContextManifestV1[];
1104
+ } | {
1105
+ status: 400;
1106
+ data: ErrorBody;
1107
+ } | {
1108
+ status: 401;
1109
+ data: ErrorBody;
1110
+ } | {
1111
+ status: 404;
1112
+ data: ErrorBody;
1113
+ } | {
1114
+ status: 422;
1115
+ data: {
1116
+ code?: string;
1117
+ details?: string;
1118
+ status?: string;
1119
+ validationDetails?: ValidationDetail[];
1120
+ };
1121
+ } | {
1122
+ status: 500;
1123
+ data: {
1124
+ code?: string;
1125
+ details?: string;
1126
+ status?: string;
1127
+ validationDetails?: ValidationDetail[];
1128
+ };
1129
+ }>(`/v1/deployment-contexts${QS.query(QS.explode({
1130
+ environment,
1131
+ runtimeId,
1132
+ deployTemplateId,
1133
+ workspaceId,
1134
+ isDefault
1135
+ }))}`, {
1136
+ ...opts
1137
+ }));
1138
+ }
1139
+ /**
1140
+ * Updates a deployment context
1141
+ */
1142
+ export function update({ deploymentContextManifestV1 }: {
1143
+ deploymentContextManifestV1: DeploymentContextManifestV1;
1144
+ }, opts?: Oazapfts.RequestOpts) {
1145
+ return oazapfts.ok(oazapfts.fetchJson<{
1146
+ status: 200;
1147
+ } | {
1148
+ status: 400;
1149
+ data: ErrorBody;
1150
+ } | {
1151
+ status: 401;
1152
+ data: ErrorBody;
1153
+ } | {
1154
+ status: 404;
1155
+ data: ErrorBody;
1156
+ } | {
1157
+ status: 422;
1158
+ data: {
1159
+ code?: string;
1160
+ details?: string;
1161
+ status?: string;
1162
+ validationDetails?: ValidationDetail[];
1163
+ };
1164
+ } | {
1165
+ status: 500;
1166
+ data: {
1167
+ code?: string;
1168
+ details?: string;
1169
+ status?: string;
1170
+ validationDetails?: ValidationDetail[];
1171
+ };
1172
+ }>("/v1/deployment-contexts", oazapfts.json({
1173
+ ...opts,
1174
+ method: "PUT",
1175
+ body: deploymentContextManifestV1
1176
+ })));
1177
+ }
1178
+ /**
1179
+ * Create a Deployment Context
1180
+ */
1181
+ export function create({ deploymentContextManifestV1 }: {
1182
+ deploymentContextManifestV1: DeploymentContextManifestV1;
1183
+ }, opts?: Oazapfts.RequestOpts) {
1184
+ return oazapfts.ok(oazapfts.fetchJson<{
1185
+ status: 201;
1186
+ data: DeploymentContextManifestV1;
1187
+ } | {
1188
+ status: 400;
1189
+ data: ErrorBody;
1190
+ } | {
1191
+ status: 401;
1192
+ data: ErrorBody;
1193
+ } | {
1194
+ status: 404;
1195
+ data: ErrorBody;
1196
+ } | {
1197
+ status: 422;
1198
+ data: {
1199
+ code?: string;
1200
+ details?: string;
1201
+ status?: string;
1202
+ validationDetails?: ValidationDetail[];
1203
+ };
1204
+ } | {
1205
+ status: 500;
1206
+ data: {
1207
+ code?: string;
1208
+ details?: string;
1209
+ status?: string;
1210
+ validationDetails?: ValidationDetail[];
1211
+ };
1212
+ }>("/v1/deployment-contexts", oazapfts.json({
1213
+ ...opts,
1214
+ method: "POST",
1215
+ body: deploymentContextManifestV1
1216
+ })));
1217
+ }
975
1218
  /**
976
1219
  * List all tenants in the stackspot account
977
1220
  */
@@ -1518,6 +1761,49 @@ export function deploy({ organizationId, tenantId, runtimeId, applicationDeploym
1518
1761
  body: applicationDeploymentManifestV1
1519
1762
  })));
1520
1763
  }
1764
+ /**
1765
+ * Execute a rollout action on an application deployment.
1766
+ */
1767
+ export function postApplicationDeploymentRolloutAction({ organizationId, tenantId, runtimeId, deploymentId, action }: {
1768
+ organizationId: string;
1769
+ tenantId: string;
1770
+ runtimeId: string;
1771
+ deploymentId: string;
1772
+ action: string;
1773
+ }, opts?: Oazapfts.RequestOpts) {
1774
+ return oazapfts.ok(oazapfts.fetchJson<{
1775
+ status: 200;
1776
+ data: string;
1777
+ } | {
1778
+ status: 400;
1779
+ data: ErrorBody;
1780
+ } | {
1781
+ status: 401;
1782
+ data: ErrorBody;
1783
+ } | {
1784
+ status: 404;
1785
+ data: ErrorBody;
1786
+ } | {
1787
+ status: 422;
1788
+ data: {
1789
+ code?: string;
1790
+ details?: string;
1791
+ status?: string;
1792
+ validationDetails?: ValidationDetail[];
1793
+ };
1794
+ } | {
1795
+ status: 500;
1796
+ data: {
1797
+ code?: string;
1798
+ details?: string;
1799
+ status?: string;
1800
+ validationDetails?: ValidationDetail[];
1801
+ };
1802
+ }>(`/v1/organizations/${encodeURIComponent(organizationId)}/tenants/${encodeURIComponent(tenantId)}/runtimes/${encodeURIComponent(runtimeId)}/applications/deployments/${encodeURIComponent(deploymentId)}/rollout/action/${encodeURIComponent(action)}`, {
1803
+ ...opts,
1804
+ method: "POST"
1805
+ }));
1806
+ }
1521
1807
  /**
1522
1808
  * Associate a runtime with a workspace's environment
1523
1809
  */
@@ -1650,7 +1936,7 @@ export function createDeployTemplate({ organizationId, deployTemplateManifestV1
1650
1936
  })));
1651
1937
  }
1652
1938
  /**
1653
- * List Addon's
1939
+ * List Addons
1654
1940
  */
1655
1941
  export function listAddon({ organizationId }: {
1656
1942
  organizationId: string;
@@ -2065,6 +2351,47 @@ export function deleteApplicationDeployment({ organizationId, tenantId, runtimeI
2065
2351
  method: "DELETE"
2066
2352
  }));
2067
2353
  }
2354
+ /**
2355
+ * Get application deployment rollout.
2356
+ */
2357
+ export function listApplicationDeploymentRollouts({ organizationId, tenantId, runtimeId, deploymentId }: {
2358
+ organizationId: string;
2359
+ tenantId: string;
2360
+ runtimeId: string;
2361
+ deploymentId: string;
2362
+ }, opts?: Oazapfts.RequestOpts) {
2363
+ return oazapfts.ok(oazapfts.fetchJson<{
2364
+ status: 200;
2365
+ data: RolloutManifestV1[];
2366
+ } | {
2367
+ status: 400;
2368
+ data: ErrorBody;
2369
+ } | {
2370
+ status: 401;
2371
+ data: ErrorBody;
2372
+ } | {
2373
+ status: 404;
2374
+ data: ErrorBody;
2375
+ } | {
2376
+ status: 422;
2377
+ data: {
2378
+ code?: string;
2379
+ details?: string;
2380
+ status?: string;
2381
+ validationDetails?: ValidationDetail[];
2382
+ };
2383
+ } | {
2384
+ status: 500;
2385
+ data: {
2386
+ code?: string;
2387
+ details?: string;
2388
+ status?: string;
2389
+ validationDetails?: ValidationDetail[];
2390
+ };
2391
+ }>(`/v1/organizations/${encodeURIComponent(organizationId)}/tenants/${encodeURIComponent(tenantId)}/runtimes/${encodeURIComponent(runtimeId)}/applications/deployments/${encodeURIComponent(deploymentId)}/rollouts`, {
2392
+ ...opts
2393
+ }));
2394
+ }
2068
2395
  /**
2069
2396
  * Get application deployment logs.
2070
2397
  */
@@ -2536,6 +2863,82 @@ export function getApplicationDeploymentExample(opts?: Oazapfts.RequestOpts) {
2536
2863
  ...opts
2537
2864
  }));
2538
2865
  }
2866
+ /**
2867
+ * Get deployment context by ID
2868
+ */
2869
+ export function getV1DeploymentContextsById({ id }: {
2870
+ id: string;
2871
+ }, opts?: Oazapfts.RequestOpts) {
2872
+ return oazapfts.ok(oazapfts.fetchJson<{
2873
+ status: 200;
2874
+ data: DeploymentContextManifestV1;
2875
+ } | {
2876
+ status: 400;
2877
+ data: ErrorBody;
2878
+ } | {
2879
+ status: 401;
2880
+ data: ErrorBody;
2881
+ } | {
2882
+ status: 404;
2883
+ data: ErrorBody;
2884
+ } | {
2885
+ status: 422;
2886
+ data: {
2887
+ code?: string;
2888
+ details?: string;
2889
+ status?: string;
2890
+ validationDetails?: ValidationDetail[];
2891
+ };
2892
+ } | {
2893
+ status: 500;
2894
+ data: {
2895
+ code?: string;
2896
+ details?: string;
2897
+ status?: string;
2898
+ validationDetails?: ValidationDetail[];
2899
+ };
2900
+ }>(`/v1/deployment-contexts/${encodeURIComponent(id)}`, {
2901
+ ...opts
2902
+ }));
2903
+ }
2904
+ /**
2905
+ * Delete deployment context by ID
2906
+ */
2907
+ export function deleteV1DeploymentContextsById({ id }: {
2908
+ id: string;
2909
+ }, opts?: Oazapfts.RequestOpts) {
2910
+ return oazapfts.ok(oazapfts.fetchJson<{
2911
+ status: 204;
2912
+ } | {
2913
+ status: 400;
2914
+ data: ErrorBody;
2915
+ } | {
2916
+ status: 401;
2917
+ data: ErrorBody;
2918
+ } | {
2919
+ status: 404;
2920
+ data: ErrorBody;
2921
+ } | {
2922
+ status: 422;
2923
+ data: {
2924
+ code?: string;
2925
+ details?: string;
2926
+ status?: string;
2927
+ validationDetails?: ValidationDetail[];
2928
+ };
2929
+ } | {
2930
+ status: 500;
2931
+ data: {
2932
+ code?: string;
2933
+ details?: string;
2934
+ status?: string;
2935
+ validationDetails?: ValidationDetail[];
2936
+ };
2937
+ }>(`/v1/deployment-contexts/${encodeURIComponent(id)}`, {
2938
+ ...opts,
2939
+ method: "DELETE"
2940
+ }));
2941
+ }
2539
2942
  /**
2540
2943
  * Get application deployment by ID
2541
2944
  */
package/src/client/ai.ts CHANGED
@@ -9,7 +9,6 @@ import {
9
9
  conversationHistoryV1ConversationsConversationIdGet,
10
10
  createExecutionV1QuickCommandsCreateExecutionSlugPost,
11
11
  currentV1TokensUsageCurrentGet,
12
- currentV1TokensUsageTotalGet,
13
12
  defaults,
14
13
  deleteConversationV1ConversationsConversationIdDelete,
15
14
  deleteFavoriteV1AiStacksStackIdFavoriteDelete,
@@ -21,7 +20,9 @@ import {
21
20
  formatFetchStepV1QuickCommandsSlugStepsStepSlugFetchFormatPost,
22
21
  formatResultV1QuickCommandsSlugResultFormatPost,
23
22
  getContentDependenciesV1ContentContentTypeContentIdDependenciesGet,
23
+ getFlagsV1FlagsGet,
24
24
  getQuickCommandV1QuickCommandsSlugGet,
25
+ getScriptExecutionStatusV1QuickCommandsScriptExecutionsScriptExecutionIdGet,
25
26
  getUploadFormV1FileUploadFormPost,
26
27
  HttpValidationError,
27
28
  listAiStacksV1AiStacksGet,
@@ -38,6 +39,8 @@ import {
38
39
  resetKnowledgeObjectsV1KnowledgeSourcesSlugObjectsDelete,
39
40
  runFetchStepV1QuickCommandsSlugStepsStepSlugFetchRunPost,
40
41
  searchKnowledgeSourcesV1KnowledgeSourcesSearchPost,
42
+ startScriptStepV1QuickCommandsSlugStepsStepSlugStartScriptPost,
43
+ totalV1TokensUsageTotalGet,
41
44
  updateQuickCommandV1QuickCommandsSlugPatch,
42
45
  updateTitleV1ConversationsConversationIdPatch,
43
46
  vectorizeCustomKnowledgeSourceV1KnowledgeSourcesSlugCustomPost,
@@ -106,7 +109,7 @@ class AIClient extends ReactQueryNetworkClient {
106
109
  /**
107
110
  * Gets total tokens usage
108
111
  */
109
- totalTokensUsage = this.query(removeAuthorizationParam(currentV1TokensUsageTotalGet))
112
+ totalTokensUsage = this.query(removeAuthorizationParam(totalV1TokensUsageTotalGet))
110
113
  /**
111
114
  * Gets current tokens usage
112
115
  */
@@ -257,6 +260,18 @@ class AIClient extends ReactQueryNetworkClient {
257
260
  * Removes the resource of type Quick Command from the list of favorites.
258
261
  */
259
262
  removeFavoriteQuickCommand = this.mutation(removeAuthorizationParam(deleteFavoriteV1QuickCommandsSlugFavoriteDelete))
263
+ /**
264
+ * Lists all the feature flags for this user.
265
+ */
266
+ flags = this.query(getFlagsV1FlagsGet)
267
+ /**
268
+ * Starts the execution of a script step
269
+ */
270
+ startScriptStep = this.mutation(removeAuthorizationParam(startScriptStepV1QuickCommandsSlugStepsStepSlugStartScriptPost))
271
+ /**
272
+ * Gets the status of the execution of a script step
273
+ */
274
+ getStatusScriptStep = this.query(removeAuthorizationParam(getScriptExecutionStatusV1QuickCommandsScriptExecutionsScriptExecutionIdGet))
260
275
 
261
276
  private static async toolsOfAgent(agentId?: string) {
262
277
  try {
@@ -308,7 +323,7 @@ class AIClient extends ReactQueryNetworkClient {
308
323
  steps: info.data?.steps?.map(s => s.goal) ?? [],
309
324
  goal: info.data?.plan_goal ?? '',
310
325
  })
311
-
326
+
312
327
  info.data?.steps.forEach(s => data.steps?.push({
313
328
  id: s.id,
314
329
  type: 'step',
@@ -368,7 +383,7 @@ class AIClient extends ReactQueryNetworkClient {
368
383
  }
369
384
 
370
385
  if (info.type === 'tool' && info.action === 'awaiting_approval') {
371
- const tool = tools.find(({ id }) => id === info.data?.tool_id)
386
+ const tool = tools.find(({ id }) => id === info.data?.tool_id)
372
387
  data.steps.push({
373
388
  id: info.id,
374
389
  type: 'tool',
@@ -392,7 +407,7 @@ class AIClient extends ReactQueryNetworkClient {
392
407
  if (info.type === 'tool' && info.action === 'start') {
393
408
  const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
394
409
  if (!info.data) return
395
-
410
+
396
411
  //There might be a tool with status awaiting_approval, so we want to inform tool has already started
397
412
  if (!currentStep || !currentStep.attempts[0].tools) {
398
413
  const input = formatJson(info.data.input)
@@ -405,7 +420,7 @@ class AIClient extends ReactQueryNetworkClient {
405
420
  input: info.data?.input,
406
421
  user_question: info.data?.user_question,
407
422
  attempts: [{
408
- tools:[{ ...tool, executionId: info.id, input }],
423
+ tools: [{ ...tool, executionId: info.id, input }],
409
424
  }],
410
425
  })
411
426
  } else {
@@ -415,7 +430,7 @@ class AIClient extends ReactQueryNetworkClient {
415
430
  if (!toolInFirstAttempt) {
416
431
  const input = formatJson(info.data.input)
417
432
  const tool = tools?.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
418
- currentStep.attempts[info.data.attempt-1].tools?.push({
433
+ currentStep.attempts[info.data.attempt - 1].tools?.push({
419
434
  ...tool,
420
435
  executionId: info.id,
421
436
  input,
@@ -426,8 +441,8 @@ class AIClient extends ReactQueryNetworkClient {
426
441
  toolInFirstAttempt.input = input
427
442
  } else {
428
443
  const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
429
- currentStep.attempts[info.data.attempt-1] ??= { tools: [] }
430
- currentStep.attempts[info.data.attempt-1].tools?.push({
444
+ currentStep.attempts[info.data.attempt - 1] ??= { tools: [] }
445
+ currentStep.attempts[info.data.attempt - 1].tools?.push({
431
446
  ...tool,
432
447
  executionId: info.id,
433
448
  input,
@@ -440,7 +455,7 @@ class AIClient extends ReactQueryNetworkClient {
440
455
  if (info.type === 'tool' && info.action === 'end') {
441
456
  const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
442
457
  if (!currentStep || !info.data) return
443
- const tool = currentStep.attempts[info.data.attempt-1]?.tools?.find(t => t.executionId === info.id)
458
+ const tool = currentStep.attempts[info.data.attempt - 1]?.tools?.find(t => t.executionId === info.id)
444
459
  if (tool) {
445
460
  tool.output = formatJson(info.data.output)
446
461
  tool.duration = info.duration
@@ -4,7 +4,7 @@ import { DefaultAPIError } from '../error/DefaultAPIError'
4
4
  import { StackspotAPIError } from '../error/StackspotAPIError'
5
5
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
6
6
  import { removeAuthorizationParam } from '../utils/remove-authorization-param'
7
- import { associateWithWorkspaceEnvironment, createAddon, createDeployTemplate, createOrganization, createRuntime1, createTenant1, defaults, deploy, findApplicationDeploymentById, getApplicationDeploymentHealth, getApplicationDeploymentLogs, getAssociationWorkspaceEnvironmentByRuntimeId, getOrganizationById, getOrganizations, getRuntime1, getTenant1, listAddon, listApplicationDeployments, listAssociations, listDeployTemplate, listRuntimes, listRuntimes1, listTenants, listTenants1 } from '../api/cloudPlatformHorizon'
7
+ import { associateWithWorkspaceEnvironment, createAddon, createDeployTemplate, createOrganization, createRuntime1, createTenant1, defaults, deploy, findApplicationDeploymentById, getApplicationDeploymentHealth, getApplicationDeploymentLogs, getAssociationWorkspaceEnvironmentByRuntimeId, getOrganizationById, getOrganizations, getRuntime1, getTenant1, listAddon, listApplicationDeploymentRollouts, listApplicationDeployments, listAssociations, listDeployTemplate, listRuntimes, listRuntimes1, listTenants, listTenants1, postApplicationDeploymentRolloutAction } from '../api/cloudPlatformHorizon'
8
8
  import { baseDictionary } from '../error/dictionary/base'
9
9
  import { getApiAddresses } from '../api-addresses'
10
10
 
@@ -19,7 +19,7 @@ class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
19
19
  /**
20
20
  * Get a list of organizations
21
21
  */
22
- listOrganizations= this.query(removeAuthorizationParam(getOrganizations))
22
+ listOrganizations = this.query(removeAuthorizationParam(getOrganizations))
23
23
  /**
24
24
  * Get organization by id
25
25
  */
@@ -27,11 +27,11 @@ class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
27
27
  /**
28
28
  * Get details of an tenant
29
29
  */
30
- getTenantById= this.query(removeAuthorizationParam(getTenant1))
30
+ getTenantById = this.query(removeAuthorizationParam(getTenant1))
31
31
  /**
32
32
  * Get details of an runtime
33
33
  */
34
- getRuntimeById= this.query(removeAuthorizationParam(getRuntime1))
34
+ getRuntimeById = this.query(removeAuthorizationParam(getRuntime1))
35
35
  /**
36
36
  * Create an tenant
37
37
  */
@@ -108,6 +108,14 @@ class CloudPlatformHorizonClient extends ReactQueryNetworkClient {
108
108
  * List runtime associations to workspace's environment
109
109
  */
110
110
  listRuntimeAssociationsToEnv = this.query(removeAuthorizationParam(listAssociations))
111
+ /**
112
+ * List of application deployments rollout
113
+ */
114
+ listApplicationDeploymentRollouts = this.query(removeAuthorizationParam(listApplicationDeploymentRollouts))
115
+ /**
116
+ * Set an action to application deployment rollout
117
+ */
118
+ deployApplicationRolloutAction = this.mutation(removeAuthorizationParam(postApplicationDeploymentRolloutAction))
111
119
  }
112
120
 
113
121
  export const cloudPlatformHorizonClient = new CloudPlatformHorizonClient()