@stack-spot/portal-network 0.191.0 → 0.192.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.
@@ -134,6 +134,9 @@ export type UpdateLlmModelRequest = {
134
134
  };
135
135
  resources: LlmModelResourceRequest[];
136
136
  };
137
+ export type GetModelByIdsRequest = {
138
+ model_ids: string[];
139
+ };
137
140
  export type UpdateLlmModelResourceRequest = {
138
141
  name: string;
139
142
  is_default?: boolean;
@@ -239,6 +242,8 @@ export type ChatCompletion = {
239
242
  function_call?: string | {
240
243
  [key: string]: string;
241
244
  } | null;
245
+ /** ID of an alternative model for chat completion. It should be present on available_model_ids agent attr. */
246
+ selected_model_id?: string | null;
242
247
  };
243
248
  export type ChatRequest = {
244
249
  streaming: boolean;
@@ -246,6 +251,8 @@ export type ChatRequest = {
246
251
  stackspot_knowledge?: boolean;
247
252
  return_ks_in_response?: boolean;
248
253
  upload_ids?: string[];
254
+ execution_id?: string | null;
255
+ selected_model?: string | null;
249
256
  };
250
257
  /**
251
258
  * Health Check
@@ -469,6 +476,32 @@ export function deleteV1LlmModelsModelIdDelete({ modelId, xAccountId, authorizat
469
476
  })
470
477
  }));
471
478
  }
479
+ /**
480
+ * Get Models List
481
+ */
482
+ export function getModelsListV1LlmModelsListPost({ xAccountId, authorization, getModelByIdsRequest }: {
483
+ xAccountId?: string | null;
484
+ authorization: string;
485
+ getModelByIdsRequest: GetModelByIdsRequest;
486
+ }, opts?: Oazapfts.RequestOpts) {
487
+ return oazapfts.ok(oazapfts.fetchJson<{
488
+ status: 200;
489
+ data: LlmModelsResponse[];
490
+ } | {
491
+ status: 404;
492
+ } | {
493
+ status: 422;
494
+ data: HttpValidationError;
495
+ }>("/v1/llm/models-list", oazapfts.json({
496
+ ...opts,
497
+ method: "POST",
498
+ body: getModelByIdsRequest,
499
+ headers: oazapfts.mergeHeaders(opts?.headers, {
500
+ "x-account-id": xAccountId,
501
+ authorization
502
+ })
503
+ })));
504
+ }
472
505
  /**
473
506
  * Save Or Update Model Resources
474
507
  */
@@ -549,10 +582,15 @@ export function listLlmProvidersV1LlmProvidersGet({ acceptsSelfHosted, xAccountI
549
582
  /**
550
583
  * Handle completions requests
551
584
  */
552
- export function createCompletionsV1ChatCompletionsPost({ xRequestOrigin, xAccountId, authorization, chatCompletion }: {
553
- xRequestOrigin?: string | null;
585
+ export function createCompletionsV1ChatCompletionsPost({ xAccountId, authorization, xRequestOrigin, xConversationId, xMessageId, xQcExecutionId, xQcSlug, xPlatformVersion, chatCompletion }: {
554
586
  xAccountId?: string | null;
555
587
  authorization: string;
588
+ xRequestOrigin?: string | null;
589
+ xConversationId?: string | null;
590
+ xMessageId?: string | null;
591
+ xQcExecutionId?: string | null;
592
+ xQcSlug?: string | null;
593
+ xPlatformVersion?: string | null;
556
594
  chatCompletion: ChatCompletion;
557
595
  }, opts?: Oazapfts.RequestOpts) {
558
596
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -568,9 +606,14 @@ export function createCompletionsV1ChatCompletionsPost({ xRequestOrigin, xAccoun
568
606
  method: "POST",
569
607
  body: chatCompletion,
570
608
  headers: oazapfts.mergeHeaders(opts?.headers, {
571
- "x-request-origin": xRequestOrigin,
572
609
  "x-account-id": xAccountId,
573
- authorization
610
+ authorization,
611
+ "x-request-origin": xRequestOrigin,
612
+ "x-conversation-id": xConversationId,
613
+ "x-message-id": xMessageId,
614
+ "x-qc-execution-id": xQcExecutionId,
615
+ "x-qc-slug": xQcSlug,
616
+ "x-platform-version": xPlatformVersion
574
617
  })
575
618
  })));
576
619
  }
@@ -46,9 +46,9 @@ import {
46
46
  getAccess,
47
47
  getAccount1,
48
48
  getAccountMembers,
49
- getAccountMembers2,
49
+ getAccountMembers1,
50
50
  getAccountRateLimit,
51
- getAccounts1,
51
+ getAccounts,
52
52
  getAccountSso,
53
53
  getActiveExtensionVersion,
54
54
  getAllAccountSso,
@@ -64,23 +64,33 @@ import {
64
64
  getFeatures3,
65
65
  getGroupById,
66
66
  getGroupResources,
67
+ getGroupResources1,
67
68
  getGroups,
69
+ getGroups1,
68
70
  getMemberById,
69
71
  getMemberGroups,
72
+ getMemberGroups1,
70
73
  getMemberPreferences,
71
74
  getMembers,
75
+ getMembers1,
72
76
  getPartnerAccount, getPartnersSharingAllowed,
73
77
  getPersonalAccountDetails,
78
+ getPersonalAccountExpirationData,
74
79
  getPersonalClientCredentials,
75
80
  getResources,
76
81
  getResources2,
77
82
  getResourcesAndActionsWithStatus,
78
83
  getResourceTypes1,
79
84
  getRoleGroups,
85
+ getRoleGroups1,
80
86
  getRoleMembers,
87
+ getRoleMembers1,
81
88
  getRoles,
82
89
  getRoles1,
83
90
  getRoles2,
91
+ getRoles3,
92
+ getRoles4,
93
+ getRoles5,
84
94
  getScmProvider,
85
95
  getServiceCredential,
86
96
  getServiceCredentialByIdRateLimit,
@@ -95,7 +105,7 @@ import {
95
105
  listExtensions,
96
106
  listExtensionVersions,
97
107
  listMemberFavoritesByResource,
98
- listScmCredentials,
108
+ listScmCredentials1,
99
109
  listScmCredentials2, partialUpdateSso, personalAccessTokenAuthorization,
100
110
  personalContact,
101
111
  removeRoleFromMember,
@@ -215,7 +225,7 @@ class AccountClient extends ReactQueryNetworkClient {
215
225
  /**
216
226
  * Gets all members (paginated).
217
227
  */
218
- allMembers = this.infiniteQuery(getAccountMembers2)
228
+ allMembers = this.infiniteQuery(getAccountMembers)
219
229
  /**
220
230
  * Gets member Groups (paginated).
221
231
  */
@@ -402,7 +412,7 @@ class AccountClient extends ReactQueryNetworkClient {
402
412
  /**
403
413
  * Gets all SCM credentials (account level).
404
414
  */
405
- allSCMCredentials = this.query(listScmCredentials2)
415
+ allSCMCredentials = this.query(listScmCredentials1)
406
416
  /**
407
417
  * Gets the status for the SCM credential.
408
418
  *
@@ -478,7 +488,7 @@ class AccountClient extends ReactQueryNetworkClient {
478
488
  /**
479
489
  * Gets all SCM credentials for the user currently logged in.
480
490
  */
481
- allUserSCMCredentials = this.query(listScmCredentials)
491
+ allUserSCMCredentials = this.query(listScmCredentials2)
482
492
  /**
483
493
  * Gets the SCM provider.
484
494
  */
@@ -616,43 +626,43 @@ class AccountClient extends ReactQueryNetworkClient {
616
626
  /**
617
627
  * Get all account members with pagination
618
628
  */
619
- allMembersWithPagination = this.query(getAccountMembers)
629
+ allMembersWithPagination = this.query(getAccountMembers1)
620
630
  /**
621
631
  * Get Members Groups By Profile
622
632
  */
623
- allMembersGroupsByProfileWithPagination = this.query(getMemberGroups)
633
+ allMembersGroupsByProfileWithPagination = this.query(getMemberGroups1)
624
634
  /**
625
635
  * Get Members Roles By Profile
626
636
  */
627
- allMembersRolesByProfileWithPagination = this.query(getRoles1)
637
+ allMembersRolesByProfileWithPagination = this.query(getRoles4)
628
638
  /**
629
639
  * Get all account groups with pagination
630
640
  */
631
- allGroupsWithPagination = this.query(getGroups)
641
+ allGroupsWithPagination = this.query(getGroups1)
632
642
  /**
633
643
  * Get all members by group with pagination
634
644
  */
635
- allMembersByGroupWithPagination = this.query(getMembers)
645
+ allMembersByGroupWithPagination = this.query(getMembers1)
636
646
  /**
637
647
  * Get all roles by groups with pagination
638
648
  */
639
- allRolesByGroupWithPagination = this.query(getRoles2)
649
+ allRolesByGroupWithPagination = this.query(getRoles5)
640
650
  /**
641
651
  * Get all resources by groups with pagination
642
652
  */
643
- allResourcesByGroupWithPagination = this.query(getGroupResources)
653
+ allResourcesByGroupWithPagination = this.query(getGroupResources1)
644
654
  /**
645
655
  * Get all roles account with pagination
646
656
  */
647
- allRolesWithPagination = this.query(getRoles)
657
+ allRolesWithPagination = this.query(getRoles3)
648
658
  /**
649
659
  * Get all members by role with pagination
650
660
  */
651
- allMembersByRoleWithPagination = this.query(getRoleMembers)
661
+ allMembersByRoleWithPagination = this.query(getRoleMembers1)
652
662
  /**
653
663
  * Get all groups by roles with pagination
654
664
  */
655
- allGroupsByRoleWithPagination = this.query(getRoleGroups)
665
+ allGroupsByRoleWithPagination = this.query(getRoleGroups1)
656
666
  /**
657
667
  * Get Service Credentials
658
668
  */
@@ -880,7 +890,7 @@ class AccountClient extends ReactQueryNetworkClient {
880
890
  /**
881
891
  * Lists enterprise accounts
882
892
  */
883
- getEnterpriseAccounts = this.query(getAccounts1)
893
+ getEnterpriseAccounts = this.query(getAccounts)
884
894
  /**
885
895
  * Get an enterprise account
886
896
  */
@@ -905,6 +915,10 @@ class AccountClient extends ReactQueryNetworkClient {
905
915
  * Find Secret Associations
906
916
  */
907
917
  findSecretAssociations = this.infiniteQuery(findAssociations, { accumulator: 'items' })
918
+ /**
919
+ * Get expiration data
920
+ */
921
+ getExpirationData = this.query(getPersonalAccountExpirationData)
908
922
  }
909
923
 
910
924
  export const accountClient = new AccountClient()
@@ -11,6 +11,7 @@ import {
11
11
  createNetwork,
12
12
  createNetworkConnection,
13
13
  createProject,
14
+ createRuntime,
14
15
  createTenant,
15
16
  createVpn,
16
17
  defaults,
@@ -18,7 +19,7 @@ import {
18
19
  getFolder,
19
20
  getFoundation,
20
21
  getNetwork,
21
- getProject1,
22
+ getProject,
22
23
  getVpnConfiguration,
23
24
  listCertificates,
24
25
  listCidr,
@@ -28,6 +29,7 @@ import {
28
29
  listInbound,
29
30
  listNetwork,
30
31
  listNetworkConnection,
32
+ listRuntime,
31
33
  listTenant,
32
34
  listVpns,
33
35
  providers,
@@ -106,7 +108,7 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
106
108
  /**
107
109
  * Get a project by id
108
110
  */
109
- getProjectById = this.query(removeAuthorizationParam(getProject1))
111
+ getProjectById = this.query(removeAuthorizationParam(getProject))
110
112
  /**
111
113
  * Get a list of dns records
112
114
  */
@@ -167,6 +169,14 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
167
169
  * Create a tenant
168
170
  */
169
171
  createTenant = this.mutation(removeAuthorizationParam(createTenant))
172
+ /**
173
+ * Get a list of runtimes
174
+ */
175
+ listRuntimes = this.query(removeAuthorizationParam(listRuntime))
176
+ /**
177
+ * Create a runtime
178
+ */
179
+ createRuntime = this.mutation(removeAuthorizationParam(createRuntime))
170
180
  }
171
181
 
172
182
  export const cloudPlatformClient = new CloudPlatformClient()
@@ -185,6 +185,7 @@ export interface FixedChatRequest extends ChatRequest {
185
185
  stackspot_ai_version?: string,
186
186
  os?: string,
187
187
  upload_ids?: string[],
188
+ selected_model_id?: string,
188
189
  },
189
190
  }
190
191