@stack-spot/portal-network 0.189.0 → 0.191.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.
@@ -12,7 +12,7 @@ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
12
12
  };
13
13
  const oazapfts = Oazapfts.runtime(defaults);
14
14
  export const servers = {};
15
- export type CodeShiftRole = "list-applications" | "create-application" | "list-repository" | "create-repository" | "delete-repository" | "dispatch-module" | "create-module" | "account-settings" | "list-integration" | "create-integration" | "delete-integration" | "list-program-group" | "create-program-group" | "delete-program-group" | "view-analytics";
15
+ export type CodeShiftRole = "list-applications" | "create-application" | "list-repository" | "create-repository" | "delete-repository" | "dispatch-module" | "create-module" | "account-settings" | "list-integration" | "create-integration" | "delete-integration" | "list-program-group" | "create-program-group" | "delete-program-group" | "view-analytics" | "account-discovery-repos";
16
16
  export type RolesResponse = {
17
17
  result: boolean;
18
18
  };
@@ -836,8 +836,9 @@ export type RepositoryLastReportStatusResponse = {
836
836
  totalFilesChanged: number | null;
837
837
  totalIssues: number | null;
838
838
  pullRequestLink: string | null;
839
- merged: boolean | null;
839
+ merged?: boolean | null;
840
840
  customerScore?: number | null;
841
+ languages?: string | null;
841
842
  };
842
843
  export type AnalyticsRepositoryLastReportStatusResponse = {
843
844
  totalFiles?: number;
@@ -987,7 +988,7 @@ export type RepositoryDetailedReportItemResponse = {
987
988
  moduleVersion?: string | null;
988
989
  processingTimeSeconds?: number | null;
989
990
  pullRequestLink?: string | null;
990
- merged?: string | null;
991
+ merged?: boolean | null;
991
992
  reportCreatedAt?: string | null;
992
993
  reportCreatedByEmail?: string | null;
993
994
  reportCreatedByName?: string | null;
@@ -1000,6 +1001,7 @@ export type RepositoryDetailedReportItemResponse = {
1000
1001
  totalFilesCount?: number;
1001
1002
  status?: string | null;
1002
1003
  customerScore?: number | null;
1004
+ languages?: string | null;
1003
1005
  };
1004
1006
  export type AnalyticsRepositoryDetailedReportResponse = {
1005
1007
  reposCount?: number;
@@ -11,6 +11,7 @@ import {
11
11
  bindRoles,
12
12
  bindToGroups,
13
13
  bindToRoles,
14
+ cancelSecretDelete,
14
15
  create,
15
16
  create1,
16
17
  createAccountRole, createExtension, createExtensionLink,
@@ -41,7 +42,7 @@ import {
41
42
  enableSecret,
42
43
  enterpriseContact,
43
44
  findAssociations,
44
- findSecrets1,
45
+ findSecrets,
45
46
  getAccess,
46
47
  getAccount1,
47
48
  getAccountMembers,
@@ -63,31 +64,23 @@ import {
63
64
  getFeatures3,
64
65
  getGroupById,
65
66
  getGroupResources,
66
- getGroupResources1,
67
67
  getGroups,
68
- getGroups1,
69
68
  getMemberById,
70
69
  getMemberGroups,
71
- getMemberGroups1,
72
70
  getMemberPreferences,
73
71
  getMembers,
74
- getMembers1,
75
72
  getPartnerAccount, getPartnersSharingAllowed,
76
73
  getPersonalAccountDetails,
77
74
  getPersonalClientCredentials,
78
- getResources1,
75
+ getResources,
79
76
  getResources2,
80
- getResourcesAndActionsWithStatus1,
77
+ getResourcesAndActionsWithStatus,
81
78
  getResourceTypes1,
82
79
  getRoleGroups,
83
- getRoleGroups1,
84
80
  getRoleMembers,
85
- getRoleMembers1,
86
81
  getRoles,
87
82
  getRoles1,
88
83
  getRoles2,
89
- getRoles3,
90
- getRoles4, getRoles5,
91
84
  getScmProvider,
92
85
  getServiceCredential,
93
86
  getServiceCredentialByIdRateLimit,
@@ -226,11 +219,11 @@ class AccountClient extends ReactQueryNetworkClient {
226
219
  /**
227
220
  * Gets member Groups (paginated).
228
221
  */
229
- memberGroups = this.infiniteQuery(getMemberGroups1)
222
+ memberGroups = this.infiniteQuery(getMemberGroups)
230
223
  /**
231
224
  * Gets member roles (paginated).
232
225
  */
233
- memberRoles = this.infiniteQuery(getRoles4)
226
+ memberRoles = this.infiniteQuery(getRoles1)
234
227
  /**
235
228
  * Gets member resources.
236
229
  */
@@ -282,7 +275,7 @@ class AccountClient extends ReactQueryNetworkClient {
282
275
  /**
283
276
  * Get all groups (paginated).
284
277
  */
285
- allGroups = this.infiniteQuery(getGroups1)
278
+ allGroups = this.infiniteQuery(getGroups)
286
279
  /**
287
280
  * Creates a group.
288
281
  */
@@ -298,7 +291,7 @@ class AccountClient extends ReactQueryNetworkClient {
298
291
  /**
299
292
  * Gets all members in a group (paginated).
300
293
  */
301
- groupMembers = this.infiniteQuery(getMembers1)
294
+ groupMembers = this.infiniteQuery(getMembers)
302
295
  /**
303
296
  * Adds several members to a group
304
297
  */
@@ -310,7 +303,7 @@ class AccountClient extends ReactQueryNetworkClient {
310
303
  /**
311
304
  * Gets all roles of a group.
312
305
  */
313
- groupRoles = this.infiniteQuery(getRoles5)
306
+ groupRoles = this.infiniteQuery(getRoles2)
314
307
  /**
315
308
  * Adds several roles to a group.
316
309
  */
@@ -322,7 +315,7 @@ class AccountClient extends ReactQueryNetworkClient {
322
315
  /**
323
316
  * Gets all resources of a group (paginated).
324
317
  */
325
- groupResources = this.infiniteQuery(getGroupResources1)
318
+ groupResources = this.infiniteQuery(getGroupResources)
326
319
  /**
327
320
  * Adds several resources to a group.
328
321
  */
@@ -334,14 +327,14 @@ class AccountClient extends ReactQueryNetworkClient {
334
327
  /**
335
328
  * Gets all roles in the account (paginated)
336
329
  */
337
- allRoles = this.infiniteQuery(getRoles3)
330
+ allRoles = this.infiniteQuery(getRoles)
338
331
  /**
339
332
  * Get a role by id
340
333
  */
341
334
  role = this.query({
342
335
  name: 'account.role',
343
336
  request: async (signal, { id }: { id: string }) => {
344
- const roles = await getRoles3({ filterBy: 'id', filterValue: id }, { signal })
337
+ const roles = await getRoles({ filterBy: 'id', filterValue: id }, { signal })
345
338
  if (!roles.length) throw new StackspotAPIError({ status: 404 })
346
339
  return roles[0]
347
340
  },
@@ -349,7 +342,7 @@ class AccountClient extends ReactQueryNetworkClient {
349
342
  /**
350
343
  * Gets all members with the provided role (paginated)
351
344
  */
352
- roleMembers = this.infiniteQuery(getRoleMembers1)
345
+ roleMembers = this.infiniteQuery(getRoleMembers)
353
346
  /**
354
347
  * Creates a role
355
348
  */
@@ -369,7 +362,7 @@ class AccountClient extends ReactQueryNetworkClient {
369
362
  /**
370
363
  * Gets all groups with the provided role (paginated)
371
364
  */
372
- roleGroups = this.infiniteQuery(getRoleGroups1)
365
+ roleGroups = this.infiniteQuery(getRoleGroups)
373
366
  /**
374
367
  * Adds a role to several groups
375
368
  */
@@ -377,7 +370,7 @@ class AccountClient extends ReactQueryNetworkClient {
377
370
  /**
378
371
  * Get the actions a role is allowed to perform
379
372
  */
380
- rolePermissions = this.infiniteQuery(getResourcesAndActionsWithStatus1)
373
+ rolePermissions = this.infiniteQuery(getResourcesAndActionsWithStatus)
381
374
  /**
382
375
  * Updates a role with new list of permissions
383
376
  */
@@ -389,7 +382,7 @@ class AccountClient extends ReactQueryNetworkClient {
389
382
  /**
390
383
  * Gets all resources (paginated)
391
384
  */
392
- allResources = this.infiniteQuery(getResources1)
385
+ allResources = this.infiniteQuery(getResources)
393
386
  /**
394
387
  * Gets all resource types (paginated)
395
388
  */
@@ -738,15 +731,15 @@ class AccountClient extends ReactQueryNetworkClient {
738
731
  /**
739
732
  * Get secrets
740
733
  */
741
- getSecrets = this.query(findSecrets1)
734
+ getSecrets = this.query(findSecrets)
742
735
  /**
743
736
  * Get workspace and spot secrets
744
737
  */
745
738
  getWorkspaceAndSpotSecrets = this.query({
746
739
  name: 'account.getWorkspaceAndSpotSecrets',
747
740
  request: async (signal) => {
748
- const workspaceSecrets = await findSecrets1({ filterByScope: 'SCOPED', filterByScopedBy: 'WORKSPACE', size: 1500 }, { signal })
749
- const spotSecrets = await findSecrets1({ filterByScope: 'SCOPED', filterByScopedBy: 'SPOT', size: 1500 }, { signal })
741
+ const workspaceSecrets = await findSecrets({ filterByScope: 'SCOPED', filterByScopedBy: 'WORKSPACE', size: 1500 }, { signal })
742
+ const spotSecrets = await findSecrets({ filterByScope: 'SCOPED', filterByScopedBy: 'SPOT', size: 1500 }, { signal })
750
743
  return { workspaces: workspaceSecrets?.items, spots: spotSecrets?.items }
751
744
  },
752
745
  })
@@ -759,10 +752,10 @@ class AccountClient extends ReactQueryNetworkClient {
759
752
  */
760
753
  getSecretsByIds = this.query({
761
754
  name: 'getSecretsByIds',
762
- request: (signal, variables: { ids: string[], }) => {
755
+ request: (signal, variables: { ids: string[] }) => {
763
756
  const requests = variables?.ids?.map((secretId) => getById({ secretId }, { signal }))
764
757
  return Promise.all(requests)
765
- }
758
+ },
766
759
  })
767
760
 
768
761
  /**
@@ -785,6 +778,10 @@ class AccountClient extends ReactQueryNetworkClient {
785
778
  * Disable secret
786
779
  */
787
780
  disableSecret = this.mutation(disableSecret)
781
+ /**
782
+ * Cancel Secret delete
783
+ */
784
+ cancelSecretDelete = this.mutation(cancelSecretDelete)
788
785
 
789
786
  // TRIAL
790
787
  /**