@forge/cli-shared 5.1.0-next.1 → 5.1.0-next.3

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,18 @@
1
1
  # @forge/cli-shared
2
2
 
3
+ ## 5.1.0-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8944e0c]
8
+ - @forge/manifest@7.4.1-next.1
9
+
10
+ ## 5.1.0-next.2
11
+
12
+ ### Patch Changes
13
+
14
+ - 7bf2dda: Get AAID from AGG when credentials are supplied via environment
15
+
3
16
  ## 5.1.0-next.1
4
17
 
5
18
  ### Minor Changes
@@ -1,7 +1,8 @@
1
1
  import * as t from 'io-ts';
2
- import { Logger } from '../../ui';
3
2
  import { CachedConf } from '../../cache';
4
3
  import { UserError } from '../../shared';
4
+ import { Logger } from '../../ui';
5
+ import { UserRepository } from './user-repository';
5
6
  export declare const EMAIL_KEY = "FORGE_EMAIL";
6
7
  export declare const API_TOKEN_KEY = "FORGE_API_TOKEN";
7
8
  export interface Keytar {
@@ -30,7 +31,6 @@ export declare class KeytarAccessError extends UserError {
30
31
  }
31
32
  export interface CredentialGetter {
32
33
  getCredentials(): Promise<PersonalApiCredentialsValidated>;
33
- getInstructionsWhenInvalid(): string;
34
34
  }
35
35
  export interface CredentialStore extends CredentialGetter {
36
36
  setCredentials(credentials: PersonalApiCredentialsValidated): Promise<void>;
@@ -41,8 +41,9 @@ export declare class CredentialStoreImpl implements CredentialStore {
41
41
  private readonly instructionsURL;
42
42
  private readonly keytar;
43
43
  private readonly cachedConfig;
44
+ private readonly userRepository;
44
45
  private keytarAccount;
45
- constructor(logger: Logger, instructionsURL: string, keytar: Keytar | null, cachedConfig: CachedConf);
46
+ constructor(logger: Logger, instructionsURL: string, keytar: Keytar | null, cachedConfig: CachedConf, userRepository: UserRepository);
46
47
  private wrapKeytarError;
47
48
  decodeCredentials(credentialsString: string | null): PersonalApiCredentialsValidated;
48
49
  getCredentialsKeytar(keytar: Keytar): Promise<PersonalApiCredentialsValidated | undefined>;
@@ -51,7 +52,6 @@ export declare class CredentialStoreImpl implements CredentialStore {
51
52
  getCredentials(): Promise<PersonalApiCredentialsValidated>;
52
53
  setCredentials(credentials: PersonalApiCredentialsValidated): Promise<void>;
53
54
  deleteCredentials(): Promise<void>;
54
- getInstructionsWhenInvalid(): string;
55
55
  }
56
- export declare function getCredentialStore(logger: Logger): CredentialStore;
56
+ export declare function getCredentialStore(logger: Logger, userRepository: UserRepository): CredentialStore;
57
57
  //# sourceMappingURL=credential-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"credential-store.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/credential-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAQ,MAAM,UAAU,CAAC;AACxC,OAAO,EAAuB,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9D,OAAO,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,SAAS,gBAAgB,CAAC;AACvC,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAc/C,MAAM,WAAW,MAAM;IACrB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEtE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/E,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE;AAUD,eAAO,MAAM,2BAA2B;;;EAGtC,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;EAI/C,CAAC;AAEH,oBAAY,sBAAsB,GAAG,CAAC,CAAC,MAA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require("os");
6
6
  const Either_1 = require("fp-ts/lib/Either");
7
7
  const t = tslib_1.__importStar(require("io-ts"));
8
- const ui_1 = require("../../ui");
9
8
  const cache_1 = require("../../cache");
10
9
  const instruction_1 = require("../instruction");
11
10
  const graphql_1 = require("../../graphql");
12
11
  const shared_1 = require("../../shared");
12
+ const ui_1 = require("../../ui");
13
13
  exports.EMAIL_KEY = 'FORGE_EMAIL';
14
14
  exports.API_TOKEN_KEY = 'FORGE_API_TOKEN';
15
- const AAID_KEY = 'FORGE_AAID';
16
15
  const KEYTAR_SERVICE = 'Atlassian';
17
16
  const CACHE_CREDENTIALS_KEY = 'forge-credentials';
18
17
  var KeytarAccount;
@@ -60,12 +59,14 @@ class CredentialStoreImpl {
60
59
  instructionsURL;
61
60
  keytar;
62
61
  cachedConfig;
62
+ userRepository;
63
63
  keytarAccount;
64
- constructor(logger, instructionsURL, keytar, cachedConfig) {
64
+ constructor(logger, instructionsURL, keytar, cachedConfig, userRepository) {
65
65
  this.logger = logger;
66
66
  this.instructionsURL = instructionsURL;
67
67
  this.keytar = keytar;
68
68
  this.cachedConfig = cachedConfig;
69
+ this.userRepository = userRepository;
69
70
  this.keytarAccount = (0, graphql_1.getEnvironment)(KeytarAccount);
70
71
  }
71
72
  wrapKeytarError(e) {
@@ -140,11 +141,12 @@ class CredentialStoreImpl {
140
141
  }
141
142
  }
142
143
  if (process.env[exports.API_TOKEN_KEY] && process.env[exports.EMAIL_KEY]) {
143
- return {
144
+ const credentials = {
144
145
  email: process.env[exports.EMAIL_KEY],
145
- token: process.env[exports.API_TOKEN_KEY],
146
- accountId: process.env[AAID_KEY] || ''
146
+ token: process.env[exports.API_TOKEN_KEY]
147
147
  };
148
+ const { accountId } = await this.userRepository.getUser(credentials);
149
+ return { ...credentials, accountId };
148
150
  }
149
151
  if (this.keytar) {
150
152
  const result = await this.getCredentialsKeytar(this.keytar);
@@ -177,18 +179,12 @@ class CredentialStoreImpl {
177
179
  }
178
180
  this.deleteInsecurePlaintextCredentials();
179
181
  }
180
- getInstructionsWhenInvalid() {
181
- if (process.env[exports.API_TOKEN_KEY] && process.env[exports.EMAIL_KEY]) {
182
- return ui_1.Text.error.invalidTokenInEnv(this.instructionsURL, exports.EMAIL_KEY, exports.API_TOKEN_KEY);
183
- }
184
- return ui_1.Text.error.invalidTokenInKeytar;
185
- }
186
182
  }
187
183
  exports.CredentialStoreImpl = CredentialStoreImpl;
188
- function getCredentialStore(logger) {
184
+ function getCredentialStore(logger, userRepository) {
189
185
  const keytar = getKeytar();
190
186
  const cachedConfig = cache_1.CachedConf.getCache(cache_1.CONFIG_PROJECT_NAME);
191
187
  const instructionsUrl = (0, instruction_1.getInstructionsUrl)();
192
- return new CredentialStoreImpl(logger, instructionsUrl, keytar, cachedConfig);
188
+ return new CredentialStoreImpl(logger, instructionsUrl, keytar, cachedConfig, userRepository);
193
189
  }
194
190
  exports.getCredentialStore = getCredentialStore;
@@ -3,4 +3,5 @@ export * from './login';
3
3
  export * from './logout';
4
4
  export * from './me-graphql-client';
5
5
  export * from './token-authenticator';
6
+ export * from './user-repository';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
@@ -6,3 +6,4 @@ tslib_1.__exportStar(require("./login"), exports);
6
6
  tslib_1.__exportStar(require("./logout"), exports);
7
7
  tslib_1.__exportStar(require("./me-graphql-client"), exports);
8
8
  tslib_1.__exportStar(require("./token-authenticator"), exports);
9
+ tslib_1.__exportStar(require("./user-repository"), exports);
@@ -1,19 +1,10 @@
1
- import { GraphQLClient, User } from '../../graphql';
2
- import { Logger } from '../../ui';
3
- import { Authenticator } from '../../auth';
4
- import { CredentialStore, PersonalApiCredentials, PersonalApiCredentialsValidated } from './credential-store';
1
+ import { User } from '../../graphql';
2
+ import { UserRepository } from '../../auth';
3
+ import { CredentialStore, PersonalApiCredentials } from './credential-store';
5
4
  export declare class LoginCommand {
6
- private readonly createGraphQLClient;
5
+ private readonly userRepository;
7
6
  private readonly store;
8
- private readonly logger;
9
- constructor(createGraphQLClient: (authenticator: Authenticator) => GraphQLClient, store: CredentialStore, logger: Logger);
10
- execute(credentials: PersonalApiCredentials): Promise<{
11
- user: User;
12
- creds: PersonalApiCredentialsValidated;
13
- analytics: {
14
- userId: string;
15
- };
16
- }>;
17
- getUser(credentials: PersonalApiCredentials): Promise<User>;
7
+ constructor(userRepository: UserRepository, store: CredentialStore);
8
+ execute(credentials: PersonalApiCredentials): Promise<User>;
18
9
  }
19
10
  //# sourceMappingURL=login.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAE9G,qBAAa,YAAY;IAErB,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFN,mBAAmB,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,aAAa,EACpE,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,MAAM;IAGpB,OAAO,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,CAAC;QACjE,IAAI,EAAE,IAAI,CAAC;QACX,KAAK,EAAE,+BAA+B,CAAC;QACvC,SAAS,EAAE;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;KAC/B,CAAC;IAmBW,OAAO,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;CAUzE"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE7E,qBAAa,YAAY;IAErB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK;gBADL,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,eAAe;IAG5B,OAAO,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;CAOzE"}
@@ -1,40 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LoginCommand = void 0;
4
- const me_graphql_client_1 = require("./me-graphql-client");
5
- const token_authenticator_1 = require("./token-authenticator");
6
4
  class LoginCommand {
7
- createGraphQLClient;
5
+ userRepository;
8
6
  store;
9
- logger;
10
- constructor(createGraphQLClient, store, logger) {
11
- this.createGraphQLClient = createGraphQLClient;
7
+ constructor(userRepository, store) {
8
+ this.userRepository = userRepository;
12
9
  this.store = store;
13
- this.logger = logger;
14
10
  }
15
11
  async execute(credentials) {
16
- const user = await this.getUser(credentials);
17
- const creds = {
18
- ...credentials,
19
- accountId: user.accountId
20
- };
21
- await this.store.setCredentials(creds);
22
- return {
23
- user,
24
- creds,
25
- analytics: {
26
- userId: creds.accountId
27
- }
28
- };
29
- }
30
- async getUser(credentials) {
31
- const authenticator = new token_authenticator_1.PersonalTokenAuthenticator({
32
- getCredentials: async () => ({ ...credentials, accountId: '' }),
33
- getInstructionsWhenInvalid: this.store.getInstructionsWhenInvalid
34
- });
35
- const graphqlClient = this.createGraphQLClient(authenticator);
36
- const meClient = new me_graphql_client_1.MeGraphqlClient(graphqlClient, this.logger);
37
- return await meClient.getUser();
12
+ const user = await this.userRepository.getUser(credentials);
13
+ await this.store.setCredentials({ ...credentials, accountId: user.accountId });
14
+ return user;
38
15
  }
39
16
  }
40
17
  exports.LoginCommand = LoginCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"token-authenticator.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/token-authenticator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,0BAA2B,YAAW,aAAa;IAClD,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,gBAAgB;IAEjD,sBAAsB;IAO5B,0BAA0B,IAAI,MAAM;CAG5C"}
1
+ {"version":3,"file":"token-authenticator.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/token-authenticator.ts"],"names":[],"mappings":"AACA,OAAO,EAA+B,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAiB,gBAAgB,EAAa,MAAM,oBAAoB,CAAC;AAEhF,qBAAa,0BAA2B,YAAW,aAAa;IAClD,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,gBAAgB;IAEjD,sBAAsB;IAO5B,0BAA0B,IAAI,MAAM;CAO5C"}
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PersonalTokenAuthenticator = void 0;
4
+ const ui_1 = require("../../ui");
4
5
  const authenticator_1 = require("../authenticator");
6
+ const instruction_1 = require("../instruction");
7
+ const credential_store_1 = require("./credential-store");
5
8
  class PersonalTokenAuthenticator {
6
9
  credentialStore;
7
10
  constructor(credentialStore) {
@@ -12,7 +15,11 @@ class PersonalTokenAuthenticator {
12
15
  return (0, authenticator_1.getBasicAuthorizationHeader)(email, token);
13
16
  }
14
17
  getInstructionsWhenInvalid() {
15
- return this.credentialStore.getInstructionsWhenInvalid();
18
+ const instructionsUrl = (0, instruction_1.getInstructionsUrl)();
19
+ if (process.env[credential_store_1.API_TOKEN_KEY] && process.env[credential_store_1.EMAIL_KEY]) {
20
+ return ui_1.Text.error.invalidTokenInEnv(instructionsUrl, credential_store_1.EMAIL_KEY, credential_store_1.API_TOKEN_KEY);
21
+ }
22
+ return ui_1.Text.error.invalidTokenInKeytar;
16
23
  }
17
24
  }
18
25
  exports.PersonalTokenAuthenticator = PersonalTokenAuthenticator;
@@ -0,0 +1,14 @@
1
+ import { GraphQLClient, User } from '../../graphql';
2
+ import { Logger } from '../../ui';
3
+ import { Authenticator } from '..';
4
+ import { PersonalApiCredentials } from './credential-store';
5
+ export interface UserRepository {
6
+ getUser(credentials: PersonalApiCredentials): Promise<User>;
7
+ }
8
+ export declare class UserRepositoryImpl {
9
+ private readonly createGraphQLClient;
10
+ private readonly logger;
11
+ constructor(createGraphQLClient: (authenticator: Authenticator) => GraphQLClient, logger: Logger);
12
+ getUser(credentials: PersonalApiCredentials): Promise<User>;
13
+ }
14
+ //# sourceMappingURL=user-repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-repository.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/user-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAInC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D;AAED,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,mBAAmB,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,aAAa,EACpE,MAAM,EAAE,MAAM;IAGpB,OAAO,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;CASzE"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserRepositoryImpl = void 0;
4
+ const me_graphql_client_1 = require("./me-graphql-client");
5
+ const token_authenticator_1 = require("./token-authenticator");
6
+ class UserRepositoryImpl {
7
+ createGraphQLClient;
8
+ logger;
9
+ constructor(createGraphQLClient, logger) {
10
+ this.createGraphQLClient = createGraphQLClient;
11
+ this.logger = logger;
12
+ }
13
+ async getUser(credentials) {
14
+ const authenticator = new token_authenticator_1.PersonalTokenAuthenticator({
15
+ getCredentials: async () => ({ ...credentials, accountId: '' })
16
+ });
17
+ const graphqlClient = this.createGraphQLClient(authenticator);
18
+ const meClient = new me_graphql_client_1.MeGraphqlClient(graphqlClient, this.logger);
19
+ return await meClient.getUser();
20
+ }
21
+ }
22
+ exports.UserRepositoryImpl = UserRepositoryImpl;
@@ -2510,6 +2510,7 @@ export declare type CcpEntitlementExperienceCapabilitiesChangeOfferingArgs = {
2510
2510
  };
2511
2511
  export declare type CcpEntitlementExperienceCapabilitiesChangeOfferingV2Args = {
2512
2512
  offeringKey?: InputMaybe<Scalars['ID']['input']>;
2513
+ skipTrial?: InputMaybe<Scalars['Boolean']['input']>;
2513
2514
  };
2514
2515
  export declare type CcpEntitlementPreDunning = CommerceEntitlementPreDunning & {
2515
2516
  __typename?: 'CcpEntitlementPreDunning';
@@ -27726,9 +27727,10 @@ export declare type HelpLayoutAnnouncementElementData = {
27726
27727
  export declare type HelpLayoutAnnouncementInput = {
27727
27728
  visualConfig?: InputMaybe<HelpLayoutVisualConfigInput>;
27728
27729
  };
27729
- export declare type HelpLayoutAtomicElement = HelpLayoutAnnouncementElement | HelpLayoutHeadingAtomicElement | HelpLayoutHeroElement | HelpLayoutImageAtomicElement | HelpLayoutParagraphAtomicElement | HelpLayoutPortalsListElement | HelpLayoutSearchAtomicElement | HelpLayoutSuggestedRequestFormsListElement | HelpLayoutTopicsListElement;
27730
+ export declare type HelpLayoutAtomicElement = HelpLayoutAnnouncementElement | HelpLayoutEditorElement | HelpLayoutHeadingAtomicElement | HelpLayoutHeroElement | HelpLayoutImageAtomicElement | HelpLayoutParagraphAtomicElement | HelpLayoutPortalsListElement | HelpLayoutSearchAtomicElement | HelpLayoutSuggestedRequestFormsListElement | HelpLayoutTopicsListElement;
27730
27731
  export declare type HelpLayoutAtomicElementInput = {
27731
27732
  announcementInput?: InputMaybe<HelpLayoutAnnouncementInput>;
27733
+ editorInput?: InputMaybe<HelpLayoutEditorInput>;
27732
27734
  elementTypeKey: HelpLayoutAtomicElementKey;
27733
27735
  headingConfigInput?: InputMaybe<HelpLayoutHeadingConfigInput>;
27734
27736
  heroElementInput?: InputMaybe<HelpLayoutHeroElementInput>;
@@ -27741,6 +27743,7 @@ export declare type HelpLayoutAtomicElementInput = {
27741
27743
  };
27742
27744
  export declare enum HelpLayoutAtomicElementKey {
27743
27745
  Announcement = "ANNOUNCEMENT",
27746
+ Editor = "EDITOR",
27744
27747
  Heading = "HEADING",
27745
27748
  Hero = "HERO",
27746
27749
  Image = "IMAGE",
@@ -27797,13 +27800,25 @@ export declare type HelpLayoutCreationInput = {
27797
27800
  parentAri: Scalars['ID']['input'];
27798
27801
  sections: Array<HelpLayoutSectionInput>;
27799
27802
  };
27800
- export declare type HelpLayoutElement = HelpLayoutAnnouncementElement | HelpLayoutHeadingAtomicElement | HelpLayoutHeroElement | HelpLayoutImageAtomicElement | HelpLayoutLinkCardCompositeElement | HelpLayoutParagraphAtomicElement | HelpLayoutPortalsListElement | HelpLayoutSearchAtomicElement | HelpLayoutSuggestedRequestFormsListElement | HelpLayoutTopicsListElement | QueryError;
27803
+ export declare type HelpLayoutEditorElement = HelpLayoutVisualEntity & Node & {
27804
+ __typename?: 'HelpLayoutEditorElement';
27805
+ adf?: Maybe<Scalars['String']['output']>;
27806
+ elementType?: Maybe<HelpLayoutAtomicElementType>;
27807
+ id: Scalars['ID']['output'];
27808
+ visualConfig?: Maybe<HelpLayoutVisualConfig>;
27809
+ };
27810
+ export declare type HelpLayoutEditorInput = {
27811
+ adf: Scalars['String']['input'];
27812
+ visualConfig?: InputMaybe<HelpLayoutVisualConfigInput>;
27813
+ };
27814
+ export declare type HelpLayoutElement = HelpLayoutAnnouncementElement | HelpLayoutEditorElement | HelpLayoutHeadingAtomicElement | HelpLayoutHeroElement | HelpLayoutImageAtomicElement | HelpLayoutLinkCardCompositeElement | HelpLayoutParagraphAtomicElement | HelpLayoutPortalsListElement | HelpLayoutSearchAtomicElement | HelpLayoutSuggestedRequestFormsListElement | HelpLayoutTopicsListElement | QueryError;
27801
27815
  export declare enum HelpLayoutElementCategory {
27802
27816
  Basic = "BASIC",
27803
27817
  Navigation = "NAVIGATION"
27804
27818
  }
27805
27819
  export declare type HelpLayoutElementInput = {
27806
27820
  announcementInput?: InputMaybe<HelpLayoutAnnouncementInput>;
27821
+ editorInput?: InputMaybe<HelpLayoutEditorInput>;
27807
27822
  elementTypeKey: HelpLayoutElementKey;
27808
27823
  headingConfigInput?: InputMaybe<HelpLayoutHeadingConfigInput>;
27809
27824
  heroElementInput?: InputMaybe<HelpLayoutHeroElementInput>;
@@ -27817,6 +27832,7 @@ export declare type HelpLayoutElementInput = {
27817
27832
  };
27818
27833
  export declare enum HelpLayoutElementKey {
27819
27834
  Announcement = "ANNOUNCEMENT",
27835
+ Editor = "EDITOR",
27820
27836
  Heading = "HEADING",
27821
27837
  Hero = "HERO",
27822
27838
  Image = "IMAGE",
@@ -42618,6 +42634,11 @@ export declare type JsmChatCreateConversationResponse = {
42618
42634
  __typename?: 'JsmChatCreateConversationResponse';
42619
42635
  id: Scalars['ID']['output'];
42620
42636
  };
42637
+ export declare type JsmChatDeleteSlackChannelMappingOutput = {
42638
+ __typename?: 'JsmChatDeleteSlackChannelMappingOutput';
42639
+ message?: Maybe<Scalars['String']['output']>;
42640
+ status?: Maybe<Scalars['Boolean']['output']>;
42641
+ };
42621
42642
  export declare type JsmChatDisconnectJiraProjectInput = {
42622
42643
  activationId: Scalars['ID']['input'];
42623
42644
  projectId: Scalars['ID']['input'];
@@ -42697,6 +42718,7 @@ export declare type JsmChatMutation = {
42697
42718
  createComment?: Maybe<JsmChatCreateCommentOutput>;
42698
42719
  createConversation?: Maybe<JsmChatCreateConversationPayload>;
42699
42720
  createConversationMessage?: Maybe<JsmChatCreateConversationMessagePayload>;
42721
+ deleteSlackChannelMapping: JsmChatDeleteSlackChannelMappingOutput;
42700
42722
  disconnectJiraProject?: Maybe<JsmChatDisconnectJiraProjectResponse>;
42701
42723
  disconnectMsTeamsJiraProject?: Maybe<JsmChatDisconnectJiraProjectResponse>;
42702
42724
  updateChannelSettings: JsmChatUpdateChannelSettingsOutput;
@@ -42727,6 +42749,10 @@ export declare type JsmChatMutationCreateConversationMessageArgs = {
42727
42749
  input: JsmChatCreateConversationMessageInput;
42728
42750
  workspaceAri: Scalars['ID']['input'];
42729
42751
  };
42752
+ export declare type JsmChatMutationDeleteSlackChannelMappingArgs = {
42753
+ jiraProjectAri: Scalars['ID']['input'];
42754
+ slackChannelAri: Scalars['ID']['input'];
42755
+ };
42730
42756
  export declare type JsmChatMutationDisconnectJiraProjectArgs = {
42731
42757
  input: JsmChatDisconnectJiraProjectInput;
42732
42758
  };
@@ -43768,17 +43794,17 @@ export declare type MarketplaceConsoleDevSpaceProgramEnrollment = {
43768
43794
  };
43769
43795
  export declare type MarketplaceConsoleDevSpaceSupportAvailability = {
43770
43796
  __typename?: 'MarketplaceConsoleDevSpaceSupportAvailability';
43771
- availableFrom?: Maybe<Scalars['String']['output']>;
43772
- availableTo?: Maybe<Scalars['String']['output']>;
43773
- days?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
43774
- holidays?: Maybe<Array<Maybe<MarketplaceConsoleDevSpaceSupportContactHoliday>>>;
43775
- timezone?: Maybe<Scalars['String']['output']>;
43797
+ availableFrom: Scalars['String']['output'];
43798
+ availableTo: Scalars['String']['output'];
43799
+ days?: Maybe<Array<Scalars['String']['output']>>;
43800
+ holidays?: Maybe<Array<MarketplaceConsoleDevSpaceSupportContactHoliday>>;
43801
+ timezone: Scalars['String']['output'];
43776
43802
  };
43777
43803
  export declare type MarketplaceConsoleDevSpaceSupportContactHoliday = {
43778
43804
  __typename?: 'MarketplaceConsoleDevSpaceSupportContactHoliday';
43779
- date?: Maybe<Scalars['String']['output']>;
43780
- repeatAnnually?: Maybe<Scalars['Boolean']['output']>;
43781
- title?: Maybe<Scalars['String']['output']>;
43805
+ date: Scalars['String']['output'];
43806
+ repeatAnnually: Scalars['Boolean']['output'];
43807
+ title: Scalars['String']['output'];
43782
43808
  };
43783
43809
  export declare type MarketplaceConsoleDevSpaceSupportDetails = {
43784
43810
  __typename?: 'MarketplaceConsoleDevSpaceSupportDetails';
@@ -43787,6 +43813,7 @@ export declare type MarketplaceConsoleDevSpaceSupportDetails = {
43787
43813
  contactName?: Maybe<Scalars['String']['output']>;
43788
43814
  contactPhone?: Maybe<Scalars['String']['output']>;
43789
43815
  emergencyContact?: Maybe<Scalars['String']['output']>;
43816
+ slaUrl?: Maybe<Scalars['String']['output']>;
43790
43817
  targetResponseTimeInHrs?: Maybe<Scalars['Int']['output']>;
43791
43818
  url?: Maybe<Scalars['String']['output']>;
43792
43819
  };
@@ -50757,6 +50784,7 @@ export declare type SearchResultSlackMessage = SearchResult & {
50757
50784
  iconUrl?: Maybe<Scalars['URL']['output']>;
50758
50785
  id: Scalars['ID']['output'];
50759
50786
  lastModifiedDate?: Maybe<Scalars['String']['output']>;
50787
+ mentions?: Maybe<Array<ThirdPartyUser>>;
50760
50788
  scoreL2Ranker?: Maybe<Scalars['Float']['output']>;
50761
50789
  title: Scalars['String']['output'];
50762
50790
  type: SearchResultType;
@@ -53619,6 +53647,16 @@ export declare type ToolchainDisassociateContainersPayload = Payload & {
53619
53647
  errors?: Maybe<Array<MutationError>>;
53620
53648
  success: Scalars['Boolean']['output'];
53621
53649
  };
53650
+ export declare enum ToolchainDisassociateEntitiesErrorCode {
53651
+ UnknownAssociation = "UNKNOWN_ASSOCIATION"
53652
+ }
53653
+ export declare type ToolchainDisassociateEntitiesErrorExtension = MutationErrorExtension & {
53654
+ __typename?: 'ToolchainDisassociateEntitiesErrorExtension';
53655
+ entityId?: Maybe<Scalars['ID']['output']>;
53656
+ errorCode?: Maybe<ToolchainDisassociateEntitiesErrorCode>;
53657
+ errorType?: Maybe<Scalars['String']['output']>;
53658
+ statusCode?: Maybe<Scalars['Int']['output']>;
53659
+ };
53622
53660
  export declare type ToolchainDisassociateEntitiesInput = {
53623
53661
  cloudId: Scalars['ID']['input'];
53624
53662
  disassociations: Array<ToolchainDisassociateEntityInput>;
@@ -55374,9 +55412,66 @@ export declare type UnifiedAtlassianProductEdge = UnifiedIEdge & {
55374
55412
  };
55375
55413
  export declare type UnifiedForums = UnifiedINode & {
55376
55414
  __typename?: 'UnifiedForums';
55415
+ badges?: Maybe<UnifiedUForumsBadgesResult>;
55416
+ groups?: Maybe<UnifiedUForumsGroupsResult>;
55377
55417
  id: Scalars['ID']['output'];
55378
55418
  snapshot?: Maybe<UnifiedUForumsSnapshotResult>;
55379
55419
  };
55420
+ export declare type UnifiedForumsBadgesArgs = {
55421
+ after?: InputMaybe<Scalars['String']['input']>;
55422
+ first?: InputMaybe<Scalars['Int']['input']>;
55423
+ };
55424
+ export declare type UnifiedForumsGroupsArgs = {
55425
+ after?: InputMaybe<Scalars['String']['input']>;
55426
+ first?: InputMaybe<Scalars['Int']['input']>;
55427
+ };
55428
+ export declare type UnifiedForumsBadge = UnifiedIBadge & UnifiedINode & {
55429
+ __typename?: 'UnifiedForumsBadge';
55430
+ description?: Maybe<Scalars['String']['output']>;
55431
+ id: Scalars['ID']['output'];
55432
+ imageUrl?: Maybe<Scalars['String']['output']>;
55433
+ lastCompletedDate?: Maybe<Scalars['String']['output']>;
55434
+ name?: Maybe<Scalars['String']['output']>;
55435
+ type?: Maybe<Scalars['String']['output']>;
55436
+ };
55437
+ export declare type UnifiedForumsBadgeEdge = UnifiedIEdge & {
55438
+ __typename?: 'UnifiedForumsBadgeEdge';
55439
+ cursor?: Maybe<Scalars['String']['output']>;
55440
+ node?: Maybe<UnifiedForumsBadge>;
55441
+ };
55442
+ export declare type UnifiedForumsBadgesConnection = UnifiedIConnection & {
55443
+ __typename?: 'UnifiedForumsBadgesConnection';
55444
+ edges?: Maybe<Array<Maybe<UnifiedForumsBadgeEdge>>>;
55445
+ pageInfo: UnifiedPageInfo;
55446
+ totalCount?: Maybe<Scalars['Int']['output']>;
55447
+ };
55448
+ export declare type UnifiedForumsGroup = UnifiedINode & {
55449
+ __typename?: 'UnifiedForumsGroup';
55450
+ avatar?: Maybe<UnifiedForumsGroupAvatar>;
55451
+ description?: Maybe<Scalars['String']['output']>;
55452
+ groupMemberCount?: Maybe<Scalars['Int']['output']>;
55453
+ id: Scalars['ID']['output'];
55454
+ title?: Maybe<Scalars['String']['output']>;
55455
+ viewHref?: Maybe<Scalars['String']['output']>;
55456
+ };
55457
+ export declare type UnifiedForumsGroupAvatar = {
55458
+ __typename?: 'UnifiedForumsGroupAvatar';
55459
+ largeHref?: Maybe<Scalars['String']['output']>;
55460
+ mediumHref?: Maybe<Scalars['String']['output']>;
55461
+ smallHref?: Maybe<Scalars['String']['output']>;
55462
+ tinyHref?: Maybe<Scalars['String']['output']>;
55463
+ };
55464
+ export declare type UnifiedForumsGroupEdge = UnifiedIEdge & {
55465
+ __typename?: 'UnifiedForumsGroupEdge';
55466
+ cursor?: Maybe<Scalars['String']['output']>;
55467
+ node?: Maybe<UnifiedForumsGroup>;
55468
+ };
55469
+ export declare type UnifiedForumsGroupsConnection = UnifiedIConnection & {
55470
+ __typename?: 'UnifiedForumsGroupsConnection';
55471
+ edges?: Maybe<Array<Maybe<UnifiedForumsGroupEdge>>>;
55472
+ pageInfo: UnifiedPageInfo;
55473
+ totalCount?: Maybe<Scalars['Int']['output']>;
55474
+ };
55380
55475
  export declare type UnifiedForumsSnapshot = UnifiedINode & {
55381
55476
  __typename?: 'UnifiedForumsSnapshot';
55382
55477
  acceptedAnswersCreated?: Maybe<Scalars['Int']['output']>;
@@ -55398,10 +55493,14 @@ export declare type UnifiedForumsSnapshot = UnifiedINode & {
55398
55493
  };
55399
55494
  export declare type UnifiedGamification = UnifiedINode & {
55400
55495
  __typename?: 'UnifiedGamification';
55401
- badges?: Maybe<Array<Maybe<UnifiedUGamificationBadgeResult>>>;
55496
+ badges?: Maybe<UnifiedUGamificationBadgesResult>;
55402
55497
  id: Scalars['ID']['output'];
55403
55498
  };
55404
- export declare type UnifiedGamificationBadge = UnifiedINode & {
55499
+ export declare type UnifiedGamificationBadgesArgs = {
55500
+ after?: InputMaybe<Scalars['String']['input']>;
55501
+ first?: InputMaybe<Scalars['Int']['input']>;
55502
+ };
55503
+ export declare type UnifiedGamificationBadge = UnifiedIBadge & UnifiedINode & {
55405
55504
  __typename?: 'UnifiedGamificationBadge';
55406
55505
  description?: Maybe<Scalars['String']['output']>;
55407
55506
  id: Scalars['ID']['output'];
@@ -55410,6 +55509,24 @@ export declare type UnifiedGamificationBadge = UnifiedINode & {
55410
55509
  name?: Maybe<Scalars['String']['output']>;
55411
55510
  type?: Maybe<Scalars['String']['output']>;
55412
55511
  };
55512
+ export declare type UnifiedGamificationBadgeEdge = UnifiedIEdge & {
55513
+ __typename?: 'UnifiedGamificationBadgeEdge';
55514
+ cursor?: Maybe<Scalars['String']['output']>;
55515
+ node?: Maybe<UnifiedGamificationBadge>;
55516
+ };
55517
+ export declare type UnifiedGamificationBadgesConnection = UnifiedIConnection & {
55518
+ __typename?: 'UnifiedGamificationBadgesConnection';
55519
+ edges?: Maybe<Array<Maybe<UnifiedGamificationBadgeEdge>>>;
55520
+ pageInfo: UnifiedPageInfo;
55521
+ totalCount?: Maybe<Scalars['Int']['output']>;
55522
+ };
55523
+ export declare type UnifiedIBadge = {
55524
+ description?: Maybe<Scalars['String']['output']>;
55525
+ id: Scalars['ID']['output'];
55526
+ imageUrl?: Maybe<Scalars['String']['output']>;
55527
+ name?: Maybe<Scalars['String']['output']>;
55528
+ type?: Maybe<Scalars['String']['output']>;
55529
+ };
55413
55530
  export declare type UnifiedIConnection = {
55414
55531
  edges?: Maybe<Array<Maybe<UnifiedIEdge>>>;
55415
55532
  pageInfo: UnifiedPageInfo;
@@ -55539,6 +55656,7 @@ export declare type UnifiedPayload = {
55539
55656
  };
55540
55657
  export declare type UnifiedProfile = UnifiedINode & {
55541
55658
  __typename?: 'UnifiedProfile';
55659
+ badges?: Maybe<UnifiedProfileBadgesConnection>;
55542
55660
  bio?: Maybe<Scalars['String']['output']>;
55543
55661
  company?: Maybe<Scalars['String']['output']>;
55544
55662
  forums?: Maybe<UnifiedUForumsResult>;
@@ -55558,6 +55676,30 @@ export declare type UnifiedProfile = UnifiedINode & {
55558
55676
  xUrl?: Maybe<Scalars['String']['output']>;
55559
55677
  youtubeUrl?: Maybe<Scalars['String']['output']>;
55560
55678
  };
55679
+ export declare type UnifiedProfileBadgesArgs = {
55680
+ after?: InputMaybe<Scalars['String']['input']>;
55681
+ first?: InputMaybe<Scalars['Int']['input']>;
55682
+ };
55683
+ export declare type UnifiedProfileBadge = UnifiedIBadge & UnifiedINode & {
55684
+ __typename?: 'UnifiedProfileBadge';
55685
+ description?: Maybe<Scalars['String']['output']>;
55686
+ id: Scalars['ID']['output'];
55687
+ imageUrl?: Maybe<Scalars['String']['output']>;
55688
+ lastCompletedDate?: Maybe<Scalars['String']['output']>;
55689
+ name?: Maybe<Scalars['String']['output']>;
55690
+ type?: Maybe<Scalars['String']['output']>;
55691
+ };
55692
+ export declare type UnifiedProfileBadgeEdge = UnifiedIEdge & {
55693
+ __typename?: 'UnifiedProfileBadgeEdge';
55694
+ cursor?: Maybe<Scalars['String']['output']>;
55695
+ node?: Maybe<UnifiedProfileBadge>;
55696
+ };
55697
+ export declare type UnifiedProfileBadgesConnection = UnifiedIConnection & {
55698
+ __typename?: 'UnifiedProfileBadgesConnection';
55699
+ edges?: Maybe<Array<Maybe<UnifiedProfileBadgeEdge>>>;
55700
+ pageInfo: UnifiedPageInfo;
55701
+ totalCount?: Maybe<Scalars['Int']['output']>;
55702
+ };
55561
55703
  export declare type UnifiedProfileInput = {
55562
55704
  bio?: InputMaybe<Scalars['String']['input']>;
55563
55705
  company?: InputMaybe<Scalars['String']['input']>;
@@ -55636,12 +55778,15 @@ export declare type UnifiedRecentCourseEdge = UnifiedIEdge & {
55636
55778
  };
55637
55779
  export declare type UnifiedUAccountResult = UnifiedAccount | UnifiedQueryError;
55638
55780
  export declare type UnifiedUAtlassianProductResult = UnifiedAtlassianProductConnection | UnifiedQueryError;
55781
+ export declare type UnifiedUForumsBadgesResult = UnifiedForumsBadgesConnection | UnifiedQueryError;
55782
+ export declare type UnifiedUForumsGroupsResult = UnifiedForumsGroupsConnection | UnifiedQueryError;
55639
55783
  export declare type UnifiedUForumsResult = UnifiedForums | UnifiedQueryError;
55640
55784
  export declare type UnifiedUForumsSnapshotResult = UnifiedForumsSnapshot | UnifiedQueryError;
55641
- export declare type UnifiedUGamificationBadgeResult = UnifiedGamificationBadge | UnifiedQueryError;
55785
+ export declare type UnifiedUGamificationBadgesResult = UnifiedGamificationBadgesConnection | UnifiedQueryError;
55642
55786
  export declare type UnifiedUGamificationResult = UnifiedGamification | UnifiedQueryError;
55643
55787
  export declare type UnifiedULearningCertificationResult = UnifiedLearningCertificationConnection | UnifiedQueryError;
55644
55788
  export declare type UnifiedULearningResult = UnifiedLearning | UnifiedQueryError;
55789
+ export declare type UnifiedUProfileBadgesResult = UnifiedProfileBadgesConnection | UnifiedQueryError;
55645
55790
  export declare type UnifiedUProfileResult = UnifiedProfile | UnifiedQueryError;
55646
55791
  export declare type UnifiedURecentCourseResult = UnifiedQueryError | UnifiedRecentCourseConnection;
55647
55792
  export declare type UnlinkExternalSourceInput = {