@stack-spot/portal-network 0.7.0 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.7.0...portal-network@v0.8.0) (2024-08-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * network - scm ([#240](https://github.com/stack-spot/portal-commons/issues/240)) ([55278fb](https://github.com/stack-spot/portal-commons/commit/55278fbc8f6ea76bf50ab8c95806594fd6db1084))
9
+
3
10
  ## [0.7.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.6.0...portal-network@v0.7.0) (2024-08-07)
4
11
 
5
12
 
@@ -1,6 +1,7 @@
1
1
  import { HttpError } from '@oazapfts/runtime';
2
2
  import { StackspotAPIError } from '../error/StackspotAPIError.js';
3
3
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
4
+ import { CreateSCMRequest, SCMStatus, UpdateSCMRequest } from './types.js';
4
5
  declare class AccountClient extends ReactQueryNetworkClient {
5
6
  constructor();
6
7
  protected buildStackSpotError(error: HttpError): StackspotAPIError;
@@ -477,6 +478,69 @@ declare class AccountClient extends ReactQueryNetworkClient {
477
478
  * Sends an email for downloading the CLI
478
479
  */
479
480
  sendDownloadCLIEmail: import("../network/types.js").MutationObject<void, unknown>;
481
+ /**
482
+ * Creates an SCM credential (account level).
483
+ */
484
+ createSCMCredential: import("../network/types.js").MutationObject<CreateSCMRequest, unknown>;
485
+ /**
486
+ * Updates an SCM credential (account level).
487
+ */
488
+ updateSCMCredential: import("../network/types.js").MutationObject<UpdateSCMRequest, unknown>;
489
+ /**
490
+ * Gets all SCM credentials (account level).
491
+ */
492
+ allSCMCredentials: import("../network/types.js").QueryObject<void, import("../api/account.js").AccountScmInfoResponse[]>;
493
+ /**
494
+ * Gets the status for the SCM credential.
495
+ *
496
+ * - If the SCM status is invalid because there's no configuration at the account level, it returns `{ status: 'missing-account' }`.
497
+ * - If the SCM status is invalid because, although the SCM integration is configured, the SCM access is not, it returns
498
+ * `{ status: 'missing-user' }`.
499
+ * - If the SCM status is valid, it returns `{ status: 'valid', mandate: boolean, hasUserConfiguration: boolean }`. `mandate` indicates
500
+ * if the SCM credential is mandatory at the account level for every user. `hasUserConfiguration` indicates if the user currently logged
501
+ * in has an SCM credential configured or not.
502
+ */
503
+ scmCredentialStatus: Omit<import("../network/types.js").QueryObject<void, SCMStatus>, "isAllowed" | "useAllowed" | "getPermissionKey">;
504
+ /**
505
+ * Enables Personal Access Token (PAT) generation.
506
+ */
507
+ enablePATGeneration: import("../network/types.js").MutationObject<void, unknown>;
508
+ /**
509
+ * Disables Personal Access Token (PAT) generation.
510
+ */
511
+ disablePATGeneration: import("../network/types.js").MutationObject<void, unknown>;
512
+ /**
513
+ * Verifies if Personal Access Token (PAT) generation is enabled.
514
+ */
515
+ patGenerationEnabled: Omit<import("../network/types.js").QueryObject<void, boolean>, "isAllowed" | "useAllowed" | "getPermissionKey">;
516
+ /**
517
+ * Verifies if the current user has an SCM credential configured.
518
+ */
519
+ userHasSCMCredential: Omit<import("../network/types.js").QueryObject<void, boolean>, "isAllowed" | "useAllowed" | "getPermissionKey">;
520
+ /**
521
+ * Creates an SCM credential for the user currently logged in.
522
+ */
523
+ createUserSCMCredential: import("../network/types.js").MutationObject<{
524
+ userScmInfoRequest: import("../api/account.js").UserScmInfoRequest;
525
+ }, unknown>;
526
+ /**
527
+ * Updates an SCM credential for the user currently logged in.
528
+ */
529
+ updateUserSCMCredential: import("../network/types.js").MutationObject<{
530
+ userScmInfoRequest: import("../api/account.js").UserScmInfoRequest;
531
+ }, unknown>;
532
+ /**
533
+ * Gets all SCM credentials for the user currently logged in.
534
+ */
535
+ allUserSCMCredentials: import("../network/types.js").QueryObject<void, import("../api/account.js").UserScmInfoResponse[]>;
536
+ /**
537
+ * Gets the SCM provider.
538
+ */
539
+ scmProvider: import("../network/types.js").QueryObject<void, import("../api/account.js").AccountScmProviderResponse>;
540
+ /**
541
+ * Deletes the SCM credentials for the user currently logged in.
542
+ */
543
+ deleteSCMCredentials: import("../network/types.js").MutationObject<void, unknown>;
480
544
  }
481
545
  export declare const accountClient: AccountClient;
482
546
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/client/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AA0C7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,cAAM,aAAc,SAAQ,uBAAuB;;IAKjD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAIlE;;OAEG;IACH,iCAAiC,8GAA8C;IAC/E;;OAEG;IACH,iBAAiB;;gBAAwB;IACzC;;OAEG;IACH,WAAW;;;8DAAqC;IAChD;;OAEG;IACH,YAAY,gGAA0B;IACtC;;OAEG;IACH,QAAQ;;0DAAwC;IAChD;;OAEG;IACH,OAAO;;iDAAgC;IACvC;;OAEG;IACH,aAAa;;4CAA+B;IAC5C;;OAEG;IACH,aAAa;;;gBAA0C;IACvD;;OAEG;IACH,kBAAkB;;;gBAA+C;IACjE;;OAEG;IACH,iBAAiB;;gBAA+B;IAChD;;OAEG;IACH,sBAAsB;;gBAAwC;IAC9D;;;OAGG;IACH,+BAA+B;;;yDAc7B;IACF;;OAEG;IACH,MAAM;;8DAA4B;IAClC;;OAEG;IACH,UAAU;;;;;;;;;;;6DAAyC;IACnD;;OAEG;IACH,YAAY;;;;;;;;;;;;yDAAsC;IAClD;;OAEG;IACH,WAAW;;;;;;;;;;;;8DAAgC;IAC3C;;OAEG;IACH,eAAe;;+CAA4B;IAC3C;;OAEG;IACH,eAAe;;;;;;;;;;;;wEAA4E;IAC3F;;OAE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IAC9C;;OAEG;IACH,eAAe;;;gBAAgC;IAC/C;;OAEG;IACH,eAAe;;;;;;;;;;;;uDAAuD;IACtE;;OAEG;IACH,qBAAqB;;;gBAA0C;IAC/D;;OAEG;IACH,YAAY;;;;;;;;;;;wDAAmC;IAC/C;;OAEG;IACH,gBAAgB;;;;;;;;;;;4DAAuC;IACvD;;OAEG;IACH,oBAAoB,2DAAmC;IACvD;;OAEG;IACH,mBAAmB,uEAA6G;IAChI;;OAEG;IACH,mBAAmB,uEAA+G;IAClI;;OAEG;IACH,iBAAiB,kGAAkC;IACnD;;;;;;;;;OASG;IACH,mBAAmB,iHAgBjB;IACF;;OAEG;IACH,mBAAmB,2DAA2C;IAC9D;;OAEG;IACH,oBAAoB,2DAAsD;IAC1E;;OAEG;IACH,oBAAoB,+GAWlB;IACF;;OAEG;IACH,oBAAoB,+GAUlB;IACF;;OAEG;IACH,uBAAuB;;gBAAmC;IAC1D;;OAEG;IACH,uBAAuB;;gBAAqC;IAC5D;;OAEG;IACH,qBAAqB,+FAAiC;IACtD;;OAEG;IACH,WAAW,oGAA6B;IACxC;;OAEG;IACH,oBAAoB,2DAA2B;CAChD;AAED,eAAO,MAAM,aAAa,eAAsB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { HttpError } from '@oazapfts/runtime';
2
- import { accountDataIsAvailable, addResourcesToGroup, addRoleToMember, bindGroupMembers, bindRoleGroups, bindRoles, bindToGroups, bindToRoles, create, createAccountRole, createPartner, createUser, deactivateFidoCredentials, defaults, deleteAccountRole, deleteMember, deletePartner, deleteResourceFromGroup, deleteRole, deleteV1GroupsByGroupId, enableFidoCredentials, getAccountMembers1, getAllMemberFidoCredentials, getFeatures, getGroupById, getGroupResources, getGroups, getMemberById, getMemberGroups, getMembers, getPartnerAccount, getPartnersSharingAllowed, getPersonalClientCredentials, getResources, getResources1, getResourcesAndActionsWithStatus, getResourceTypes, getRoleGroups, getRoleMembers, getRoles, getRoles1, getRoles2, removeRoleFromMember, resetPassword, save, sendDownloadEmail, update1, updateAccountRole, updatePartnerAccountAdminData, updatePartnerAccountData, updateRoleWithNewActions, updateUser, validateNewPartnerData, validatePartnerAssociationLimit, } from '../api/account.js';
2
+ import { accountDataIsAvailable, addResourcesToGroup, addRoleToMember, bindGroupMembers, bindRoleGroups, bindRoles, bindToGroups, bindToRoles, create, createAccountRole, createPartner, createPersonalAccessToken, createUser, deactivateFidoCredentials, defaults, deleteAccountRole, deleteMember, deletePartner, deleteResourceFromGroup, deleteRole, deleteV1GroupsByGroupId, disablePersonalAccessTokenGeneration, enableFidoCredentials, getAccountMembers1, getAllMemberFidoCredentials, getFeatures, getGroupById, getGroupResources, getGroups, getMemberById, getMemberGroups, getMembers, getPartnerAccount, getPartnersSharingAllowed, getPersonalClientCredentials, getResources, getResources1, getResourcesAndActionsWithStatus, getResourceTypes, getRoleGroups, getRoleMembers, getRoles, getRoles1, getRoles2, getScmProvider, isCreatedScmCredentials, isCreatedScmCredentials1, listScmCredentials, listScmCredentials1, personalAccessTokenAuthorization, removeRoleFromMember, resetPassword, save, scmCredentialSave, scmCredentialSave1, scmCredentialUpdate, scmCredentialUpdate1, scmDelete, sendDownloadEmail, update1, updateAccountRole, updatePartnerAccountAdminData, updatePartnerAccountData, updateRoleWithNewActions, updateUser, validateNewPartnerData, validatePartnerAssociationLimit, } from '../api/account.js';
3
3
  import apis from '../apis.json';
4
4
  import { DefaultAPIError } from '../error/DefaultAPIError.js';
5
5
  import { accountDictionary } from '../error/dictionary/account.js';
@@ -519,6 +519,173 @@ class AccountClient extends ReactQueryNetworkClient {
519
519
  writable: true,
520
520
  value: this.mutation(sendDownloadEmail)
521
521
  });
522
+ /**
523
+ * Creates an SCM credential (account level).
524
+ */
525
+ Object.defineProperty(this, "createSCMCredential", {
526
+ enumerable: true,
527
+ configurable: true,
528
+ writable: true,
529
+ value: this.mutation(scmCredentialSave1)
530
+ });
531
+ /**
532
+ * Updates an SCM credential (account level).
533
+ */
534
+ Object.defineProperty(this, "updateSCMCredential", {
535
+ enumerable: true,
536
+ configurable: true,
537
+ writable: true,
538
+ value: this.mutation(scmCredentialUpdate1)
539
+ });
540
+ /**
541
+ * Gets all SCM credentials (account level).
542
+ */
543
+ Object.defineProperty(this, "allSCMCredentials", {
544
+ enumerable: true,
545
+ configurable: true,
546
+ writable: true,
547
+ value: this.query(listScmCredentials1)
548
+ });
549
+ /**
550
+ * Gets the status for the SCM credential.
551
+ *
552
+ * - If the SCM status is invalid because there's no configuration at the account level, it returns `{ status: 'missing-account' }`.
553
+ * - If the SCM status is invalid because, although the SCM integration is configured, the SCM access is not, it returns
554
+ * `{ status: 'missing-user' }`.
555
+ * - If the SCM status is valid, it returns `{ status: 'valid', mandate: boolean, hasUserConfiguration: boolean }`. `mandate` indicates
556
+ * if the SCM credential is mandatory at the account level for every user. `hasUserConfiguration` indicates if the user currently logged
557
+ * in has an SCM credential configured or not.
558
+ */
559
+ Object.defineProperty(this, "scmCredentialStatus", {
560
+ enumerable: true,
561
+ configurable: true,
562
+ writable: true,
563
+ value: this.query({
564
+ name: 'account.scmStatus',
565
+ request: async (signal) => {
566
+ try {
567
+ const data = await isCreatedScmCredentials1({ signal });
568
+ return { status: 'valid', ...data };
569
+ }
570
+ catch (error) {
571
+ if (error instanceof HttpError) {
572
+ // 404 means that the scm integration was not configured
573
+ if (error.status === 404)
574
+ return { status: 'missing-account' };
575
+ // 422 means that the scm integration is configured, but the scm access is not
576
+ if (error.status === 422)
577
+ return { status: 'missing-user' };
578
+ }
579
+ throw error;
580
+ }
581
+ },
582
+ })
583
+ });
584
+ /**
585
+ * Enables Personal Access Token (PAT) generation.
586
+ */
587
+ Object.defineProperty(this, "enablePATGeneration", {
588
+ enumerable: true,
589
+ configurable: true,
590
+ writable: true,
591
+ value: this.mutation(createPersonalAccessToken)
592
+ });
593
+ /**
594
+ * Disables Personal Access Token (PAT) generation.
595
+ */
596
+ Object.defineProperty(this, "disablePATGeneration", {
597
+ enumerable: true,
598
+ configurable: true,
599
+ writable: true,
600
+ value: this.mutation(disablePersonalAccessTokenGeneration)
601
+ });
602
+ /**
603
+ * Verifies if Personal Access Token (PAT) generation is enabled.
604
+ */
605
+ Object.defineProperty(this, "patGenerationEnabled", {
606
+ enumerable: true,
607
+ configurable: true,
608
+ writable: true,
609
+ value: this.query({
610
+ name: 'account.patEnabled',
611
+ request: async (signal) => {
612
+ try {
613
+ await personalAccessTokenAuthorization({ signal });
614
+ return true;
615
+ }
616
+ catch (error) {
617
+ if (error instanceof HttpError && error.status === 404)
618
+ return false;
619
+ throw error;
620
+ }
621
+ },
622
+ })
623
+ });
624
+ /**
625
+ * Verifies if the current user has an SCM credential configured.
626
+ */
627
+ Object.defineProperty(this, "userHasSCMCredential", {
628
+ enumerable: true,
629
+ configurable: true,
630
+ writable: true,
631
+ value: this.query({
632
+ name: 'account.userHasSCMCredential',
633
+ request: async (signal) => {
634
+ try {
635
+ await isCreatedScmCredentials({ signal });
636
+ return true;
637
+ }
638
+ catch {
639
+ return false;
640
+ }
641
+ },
642
+ })
643
+ });
644
+ /**
645
+ * Creates an SCM credential for the user currently logged in.
646
+ */
647
+ Object.defineProperty(this, "createUserSCMCredential", {
648
+ enumerable: true,
649
+ configurable: true,
650
+ writable: true,
651
+ value: this.mutation(scmCredentialSave)
652
+ });
653
+ /**
654
+ * Updates an SCM credential for the user currently logged in.
655
+ */
656
+ Object.defineProperty(this, "updateUserSCMCredential", {
657
+ enumerable: true,
658
+ configurable: true,
659
+ writable: true,
660
+ value: this.mutation(scmCredentialUpdate)
661
+ });
662
+ /**
663
+ * Gets all SCM credentials for the user currently logged in.
664
+ */
665
+ Object.defineProperty(this, "allUserSCMCredentials", {
666
+ enumerable: true,
667
+ configurable: true,
668
+ writable: true,
669
+ value: this.query(listScmCredentials)
670
+ });
671
+ /**
672
+ * Gets the SCM provider.
673
+ */
674
+ Object.defineProperty(this, "scmProvider", {
675
+ enumerable: true,
676
+ configurable: true,
677
+ writable: true,
678
+ value: this.query(getScmProvider)
679
+ });
680
+ /**
681
+ * Deletes the SCM credentials for the user currently logged in.
682
+ */
683
+ Object.defineProperty(this, "deleteSCMCredentials", {
684
+ enumerable: true,
685
+ configurable: true,
686
+ writable: true,
687
+ value: this.mutation(scmDelete)
688
+ });
522
689
  }
523
690
  buildStackSpotError(error) {
524
691
  return new DefaultAPIError(error.data, error.status, accountDictionary, error.headers);
@@ -1 +1 @@
1
- {"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/client/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,aAAa,EACnE,UAAU,EACV,yBAAyB,EACzB,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,aAAa,EAAE,uBAAuB,EAAE,UAAU,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,kBAAkB,EACtH,2BAA2B,EAAE,WAAW,EACxC,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,eAAe,EACf,UAAU,EACV,iBAAiB,EAAE,yBAAyB,EAC5C,4BAA4B,EAC5B,YAAY,EACZ,aAAa,EACb,gCAAgC,EAChC,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,QAAQ,EACR,SAAS,EAAE,SAAS,EAAE,oBAAoB,EAAE,aAAa,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,iBAAiB,EAC9G,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,EACxB,UAAU,EACV,sBAAsB,EACtB,+BAA+B,GAChC,MAAM,gBAAgB,CAAA;AACvB,OAAO,IAAI,MAAM,cAAc,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;A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AAE,8BAA8B;gBACpC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;oBACxB,IAAI,CAAC;wBACH,MAAM,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;wBACzC,OAAO,IAAI,CAAA;oBACb,CAAC;oBAAC,MAAM,CAAC;wBACP,OAAO,KAAK,CAAA;oBACd,CAAC;gBACH,CAAC;aACF,CAAC;WAAA;QACF;;WAEG;QACH;;;;mBAA0B,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC;WAAA;QAC1D;;WAEG;QACH;;;;mBAA0B,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC;WAAA;QAC5D;;WAEG;QACH;;;;mBAAwB,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC;WAAA;QACtD;;WAEG;QACH;;;;mBAAc,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;WAAA;QACxC;;WAEG;QACH;;;;mBAAuB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;WAAA;IAnV/C,CAAC;IAES,mBAAmB,CAAC,KAAgB;QAC5C,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACxF,CAAC;CAgVF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { AccountScmInfoSaveRequest, AccountScmInfoUpdateRequest, AccountScmStatusResponse } from '../api/account.js';
2
+ interface BaseSMCStatus {
3
+ /**
4
+ * Indicates the current status of the SCM credential.
5
+ * - 'valid': the SCM credential is valid.
6
+ * - 'missing-account': the SCM credential is not configured at the account level.
7
+ * - 'missing-user': the SCM credential is configured at the account level, but the SCM access is not configured for the user.
8
+ */
9
+ status: 'missing-account' | 'missing-user' | 'valid';
10
+ }
11
+ interface ValidSCMStatus extends BaseSMCStatus, AccountScmStatusResponse {
12
+ status: 'valid';
13
+ }
14
+ interface InvalidSCMStatus extends BaseSMCStatus {
15
+ status: 'missing-account' | 'missing-user';
16
+ }
17
+ export type SCMStatus = InvalidSCMStatus | ValidSCMStatus;
18
+ interface SCMAuthPATValue {
19
+ user: string;
20
+ pass: string;
21
+ }
22
+ interface SCMAuthGitValue {
23
+ appId: string;
24
+ installationId: string;
25
+ privateKey: string;
26
+ }
27
+ export interface CreateSCMRequest {
28
+ accountScmInfoSaveRequest: AccountScmInfoSaveRequest & {
29
+ value: SCMAuthGitValue | SCMAuthPATValue;
30
+ };
31
+ }
32
+ export interface UpdateSCMRequest {
33
+ accountScmInfoUpdateRequest: AccountScmInfoUpdateRequest & {
34
+ value?: SCMAuthGitValue | SCMAuthPATValue;
35
+ };
36
+ }
37
+ export {};
38
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAEjH,UAAU,aAAa;IACrB;;;;;OAKG;IACH,MAAM,EAAE,iBAAiB,GAAG,cAAc,GAAG,OAAO,CAAC;CACtD;AAED,UAAU,cAAe,SAAQ,aAAa,EAAE,wBAAwB;IACtE,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,gBAAiB,SAAQ,aAAa;IAC9C,MAAM,EAAE,iBAAiB,GAAG,cAAc,CAAC;CAC5C;AAED,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,cAAc,CAAA;AAEzD,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,yBAAyB,EAAE,yBAAyB,GAAG;QACrD,KAAK,EAAE,eAAe,GAAG,eAAe,CAAC;KAC1C,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,2BAA2B,EAAE,2BAA2B,GAAG;QACzD,KAAK,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC;KAC3C,CAAC;CACH"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { accountClient } from './client/account.js';
2
2
  export { secretsClient } from './client/secrets.js';
3
+ export * from './client/types.js';
3
4
  export { workspaceClient } from './client/workspace.js';
4
5
  export { DefaultAPIError } from './error/DefaultAPIError.js';
5
6
  export { StackspotAPIError } from './error/StackspotAPIError.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export { accountClient } from './client/account.js';
2
2
  export { secretsClient } from './client/secrets.js';
3
+ export * from './client/types.js';
3
4
  export { workspaceClient } from './client/workspace.js';
4
5
  export { DefaultAPIError } from './error/DefaultAPIError.js';
5
6
  export { StackspotAPIError } from './error/StackspotAPIError.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-network",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,4 +1,4 @@
1
- import { HttpError } from '@oazapfts/runtime'
1
+ import { HttpError, RequestOpts } from '@oazapfts/runtime'
2
2
  import {
3
3
  accountDataIsAvailable,
4
4
  addResourcesToGroup,
@@ -7,12 +7,14 @@ import {
7
7
  bindRoleGroups,
8
8
  bindRoles,
9
9
  bindToGroups, bindToRoles, create, createAccountRole, createPartner,
10
+ createPersonalAccessToken,
10
11
  createUser,
11
12
  deactivateFidoCredentials,
12
13
  defaults,
13
14
  deleteAccountRole,
14
15
  deleteMember,
15
- deletePartner, deleteResourceFromGroup, deleteRole, deleteV1GroupsByGroupId, enableFidoCredentials, getAccountMembers1,
16
+ deletePartner, deleteResourceFromGroup, deleteRole, deleteV1GroupsByGroupId, disablePersonalAccessTokenGeneration, enableFidoCredentials,
17
+ getAccountMembers1,
16
18
  getAllMemberFidoCredentials, getFeatures,
17
19
  getGroupById,
18
20
  getGroupResources,
@@ -29,7 +31,13 @@ import {
29
31
  getRoleGroups,
30
32
  getRoleMembers,
31
33
  getRoles,
32
- getRoles1, getRoles2, removeRoleFromMember, resetPassword, save, sendDownloadEmail, update1, updateAccountRole,
34
+ getRoles1, getRoles2,
35
+ getScmProvider,
36
+ isCreatedScmCredentials,
37
+ isCreatedScmCredentials1, listScmCredentials, listScmCredentials1, personalAccessTokenAuthorization, removeRoleFromMember,
38
+ resetPassword, save,
39
+ scmCredentialSave, scmCredentialSave1, scmCredentialUpdate, scmCredentialUpdate1, scmDelete, sendDownloadEmail, update1,
40
+ updateAccountRole,
33
41
  updatePartnerAccountAdminData,
34
42
  updatePartnerAccountData,
35
43
  updateRoleWithNewActions,
@@ -42,6 +50,7 @@ import { DefaultAPIError } from '../error/DefaultAPIError'
42
50
  import { accountDictionary } from '../error/dictionary/account'
43
51
  import { StackspotAPIError } from '../error/StackspotAPIError'
44
52
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
53
+ import { CreateSCMRequest, SCMStatus, UpdateSCMRequest } from './types'
45
54
 
46
55
  class AccountClient extends ReactQueryNetworkClient {
47
56
  constructor() {
@@ -290,6 +299,102 @@ class AccountClient extends ReactQueryNetworkClient {
290
299
  * Sends an email for downloading the CLI
291
300
  */
292
301
  sendDownloadCLIEmail = this.mutation(sendDownloadEmail)
302
+ /**
303
+ * Creates an SCM credential (account level).
304
+ */
305
+ createSCMCredential = this.mutation(scmCredentialSave1 as (variables: CreateSCMRequest, opts?: RequestOpts) => Promise<unknown>)
306
+ /**
307
+ * Updates an SCM credential (account level).
308
+ */
309
+ updateSCMCredential = this.mutation(scmCredentialUpdate1 as (variables: UpdateSCMRequest, opts?: RequestOpts) => Promise<unknown>)
310
+ /**
311
+ * Gets all SCM credentials (account level).
312
+ */
313
+ allSCMCredentials = this.query(listScmCredentials1)
314
+ /**
315
+ * Gets the status for the SCM credential.
316
+ *
317
+ * - If the SCM status is invalid because there's no configuration at the account level, it returns `{ status: 'missing-account' }`.
318
+ * - If the SCM status is invalid because, although the SCM integration is configured, the SCM access is not, it returns
319
+ * `{ status: 'missing-user' }`.
320
+ * - If the SCM status is valid, it returns `{ status: 'valid', mandate: boolean, hasUserConfiguration: boolean }`. `mandate` indicates
321
+ * if the SCM credential is mandatory at the account level for every user. `hasUserConfiguration` indicates if the user currently logged
322
+ * in has an SCM credential configured or not.
323
+ */
324
+ scmCredentialStatus = this.query({
325
+ name: 'account.scmStatus',
326
+ request: async (signal): Promise<SCMStatus> => {
327
+ try {
328
+ const data = await isCreatedScmCredentials1({ signal })
329
+ return { status: 'valid', ...data }
330
+ } catch (error) {
331
+ if (error instanceof HttpError) {
332
+ // 404 means that the scm integration was not configured
333
+ if (error.status === 404) return { status: 'missing-account' }
334
+ // 422 means that the scm integration is configured, but the scm access is not
335
+ if (error.status === 422) return { status: 'missing-user' }
336
+ }
337
+ throw error
338
+ }
339
+ },
340
+ })
341
+ /**
342
+ * Enables Personal Access Token (PAT) generation.
343
+ */
344
+ enablePATGeneration = this.mutation(createPersonalAccessToken)
345
+ /**
346
+ * Disables Personal Access Token (PAT) generation.
347
+ */
348
+ disablePATGeneration = this.mutation(disablePersonalAccessTokenGeneration)
349
+ /**
350
+ * Verifies if Personal Access Token (PAT) generation is enabled.
351
+ */
352
+ patGenerationEnabled = this.query({
353
+ name: 'account.patEnabled',
354
+ request: async (signal) => {
355
+ try {
356
+ await personalAccessTokenAuthorization({ signal })
357
+ return true
358
+ } catch (error) {
359
+ if (error instanceof HttpError && error.status === 404) return false
360
+ throw error
361
+ }
362
+ },
363
+ })
364
+ /**
365
+ * Verifies if the current user has an SCM credential configured.
366
+ */
367
+ userHasSCMCredential = this.query({
368
+ name: 'account.userHasSCMCredential',
369
+ request: async (signal) => {
370
+ try {
371
+ await isCreatedScmCredentials({ signal })
372
+ return true
373
+ } catch {
374
+ return false
375
+ }
376
+ },
377
+ })
378
+ /**
379
+ * Creates an SCM credential for the user currently logged in.
380
+ */
381
+ createUserSCMCredential = this.mutation(scmCredentialSave)
382
+ /**
383
+ * Updates an SCM credential for the user currently logged in.
384
+ */
385
+ updateUserSCMCredential = this.mutation(scmCredentialUpdate)
386
+ /**
387
+ * Gets all SCM credentials for the user currently logged in.
388
+ */
389
+ allUserSCMCredentials = this.query(listScmCredentials)
390
+ /**
391
+ * Gets the SCM provider.
392
+ */
393
+ scmProvider = this.query(getScmProvider)
394
+ /**
395
+ * Deletes the SCM credentials for the user currently logged in.
396
+ */
397
+ deleteSCMCredentials = this.mutation(scmDelete)
293
398
  }
294
399
 
295
400
  export const accountClient = new AccountClient()
@@ -0,0 +1,44 @@
1
+ import { AccountScmInfoSaveRequest, AccountScmInfoUpdateRequest, AccountScmStatusResponse } from '../api/account'
2
+
3
+ interface BaseSMCStatus {
4
+ /**
5
+ * Indicates the current status of the SCM credential.
6
+ * - 'valid': the SCM credential is valid.
7
+ * - 'missing-account': the SCM credential is not configured at the account level.
8
+ * - 'missing-user': the SCM credential is configured at the account level, but the SCM access is not configured for the user.
9
+ */
10
+ status: 'missing-account' | 'missing-user' | 'valid',
11
+ }
12
+
13
+ interface ValidSCMStatus extends BaseSMCStatus, AccountScmStatusResponse {
14
+ status: 'valid',
15
+ }
16
+
17
+ interface InvalidSCMStatus extends BaseSMCStatus {
18
+ status: 'missing-account' | 'missing-user',
19
+ }
20
+
21
+ export type SCMStatus = InvalidSCMStatus | ValidSCMStatus
22
+
23
+ interface SCMAuthPATValue {
24
+ user: string,
25
+ pass: string,
26
+ }
27
+
28
+ interface SCMAuthGitValue {
29
+ appId: string,
30
+ installationId: string,
31
+ privateKey: string,
32
+ }
33
+
34
+ export interface CreateSCMRequest {
35
+ accountScmInfoSaveRequest: AccountScmInfoSaveRequest & {
36
+ value: SCMAuthGitValue | SCMAuthPATValue,
37
+ },
38
+ }
39
+
40
+ export interface UpdateSCMRequest {
41
+ accountScmInfoUpdateRequest: AccountScmInfoUpdateRequest & {
42
+ value?: SCMAuthGitValue | SCMAuthPATValue,
43
+ },
44
+ }
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { accountClient } from './client/account'
2
2
  export { secretsClient } from './client/secrets'
3
+ export * from './client/types'
3
4
  export { workspaceClient } from './client/workspace'
4
5
  export { DefaultAPIError } from './error/DefaultAPIError'
5
6
  export { StackspotAPIError } from './error/StackspotAPIError'