@stack-spot/portal-network 0.220.0 → 0.221.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.
@@ -10,6 +10,7 @@ import {
10
10
  createFoundation,
11
11
  createNetwork,
12
12
  createProject,
13
+ createServiceControlPolicy,
13
14
  createVpn,
14
15
  defaults,
15
16
  deleteBoundary,
@@ -30,6 +31,7 @@ import {
30
31
  getFoundation,
31
32
  getNetwork,
32
33
  getProject,
34
+ getServiceControlPolicy,
33
35
  getVpnConfiguration,
34
36
  listBoundary,
35
37
  listBoundarySso,
@@ -39,6 +41,8 @@ import {
39
41
  listDnsZone,
40
42
  listFoundations,
41
43
  listNetwork,
44
+ listProject,
45
+ listServiceControlPolicy,
42
46
  listVpns,
43
47
  putBoundaryDescription,
44
48
  putBoundaryPolicyDocument,
@@ -50,8 +54,10 @@ import {
50
54
  putCidrTags,
51
55
  putDnsZoneTags,
52
56
  putFolderTags,
57
+ putFoundationSecProjectTags,
53
58
  putNetworkTags,
54
59
  putProjectTags,
60
+ putServiceControlPolicy,
55
61
  putVpnTags,
56
62
  } from '../api/cloudPlatform'
57
63
  import { DefaultAPIError } from '../error/DefaultAPIError'
@@ -277,6 +283,30 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
277
283
  * Edit sso boundary description
278
284
  */
279
285
  editSSOBoundaryDescription = this.mutation(removeAuthorizationParam(putBoundarySsoDescription))
286
+ /**
287
+ * Edit foundation security tags
288
+ */
289
+ editFoundationSecurityTags = this.mutation(removeAuthorizationParam(putFoundationSecProjectTags))
290
+ /**
291
+ * List service control policy
292
+ */
293
+ listServiceControlPolicy = this.query(removeAuthorizationParam(listServiceControlPolicy))
294
+ /**
295
+ * Get a service control policy details
296
+ */
297
+ getServiceControlPolicy = this.query(removeAuthorizationParam(getServiceControlPolicy))
298
+ /**
299
+ * Edit service control policy
300
+ */
301
+ editServiceControlPolicy = this.mutation(removeAuthorizationParam(putServiceControlPolicy))
302
+ /**
303
+ * Create a service control policy
304
+ */
305
+ createServiceControlPolicy = this.mutation(removeAuthorizationParam(createServiceControlPolicy))
306
+ /**
307
+ * List projects from a foundation
308
+ */
309
+ listFoundationProjects = this.query(removeAuthorizationParam(listProject))
280
310
  }
281
311
 
282
312
  export const cloudPlatformClient = new CloudPlatformClient()
@@ -1,7 +1,7 @@
1
1
  import { RequestOpts } from '@oazapfts/runtime'
2
2
  import { AccountScmInfoSaveRequest, AccountScmInfoUpdateRequest, AccountScmStatusResponse, GroupsFromResourceResponse, MembersFromResourceResponse } from '../api/account'
3
3
  import { AgentVisibilityLevelEnum, HttpMethod, ListAgentResponse, VisibilityLevelEnum } from '../api/agent-tools'
4
- import { ChatResponse3, ContentDependencyResponse, ConversationHistoryResponse, ConversationResponse, DependencyResponse, SourceKnowledgeSource, SourceProjectFile3, SourceStackAi } from '../api/ai'
4
+ import { ChatResponse3, ContentDependencyResponse, ConversationHistoryResponse, ConversationResponse, DependencyResponse, QuickCommandResponse, QuickCommandStepResult, SourceKnowledgeSource, SourceProjectFile3, SourceStackAi } from '../api/ai'
5
5
  import { ConnectAccountRequestV2, ManagedAccountProvisionRequest } from '../api/cloudAccount'
6
6
  import { AllocationCostRequest, AllocationCostResponse, ChargePeriod, getAllocationCostFilters, ManagedService, ServiceResource } from '../api/cloudServices'
7
7
  import { ChatRequest } from '../api/genAiInference'
@@ -422,3 +422,48 @@ export interface AgentToolsOpenAPIPreview {
422
422
  parameters?: Record<string, any>,
423
423
  request_body?: Record<string, any>,
424
424
  }
425
+
426
+ type SlugExecution = Record<string, QuickCommandStepResult>
427
+
428
+ interface QuickCommandContext {
429
+ workspace?: string,
430
+ conversation_id?: string,
431
+ stack_id?: string,
432
+ language?: string,
433
+ project_recent_files?: string,
434
+ knowledge_sources?: string[],
435
+ agent_id?: string,
436
+ agent_built_in?: boolean,
437
+ platform?: string,
438
+ platform_version?: string,
439
+ stackspot_ai_version?: string,
440
+ os?: string,
441
+ upload_ids?: string[],
442
+ selected_model_id?: string,
443
+ }
444
+
445
+ interface BaseQCContext {
446
+ context: QuickCommandContext,
447
+ resultMap: SlugExecution,
448
+ customInputs: Record<string, string>,
449
+ code?: string,
450
+ executionId: string,
451
+ signal: AbortSignal,
452
+ isRemote?: boolean,
453
+ headers?: Record<string, string>,
454
+ conversation_id?: string,
455
+ }
456
+
457
+ export interface QCContext extends BaseQCContext {
458
+ slug: string,
459
+ }
460
+
461
+ export interface QCContextExecution extends BaseQCContext {
462
+ qc: QuickCommandResponse,
463
+ }
464
+
465
+ export interface QCProgressProps{
466
+ update?: (index: number) => void,
467
+ remove?: () => void,
468
+ onStepChange?: (stepResult: any) => void,
469
+ }
@@ -17,3 +17,15 @@ export function formatJson(data: any): string {
17
17
  }
18
18
  return JSON.stringify(data, null, 2)
19
19
  }
20
+
21
+
22
+ /**
23
+ * Gets the size of a string removing control characters and spaces
24
+ * @param str the string to count.
25
+ * @returns the count value.
26
+ */
27
+ export function getSizeOfString(str: string): number {
28
+ // eslint-disable-next-line no-control-regex
29
+ const withoutSpacesAndControls = str.replace(/[\u0000-\u001F\u007F-\u009F\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069\s]/g, '')
30
+ return withoutSpacesAndControls.length
31
+ }