eas-cli 18.8.1 → 18.9.1

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.
Files changed (32) hide show
  1. package/README.md +162 -94
  2. package/build/commands/build/download.d.ts +6 -2
  3. package/build/commands/build/download.js +130 -18
  4. package/build/commands/integrations/asc/connect.d.ts +19 -0
  5. package/build/commands/integrations/asc/connect.js +159 -0
  6. package/build/commands/integrations/asc/disconnect.d.ts +15 -0
  7. package/build/commands/integrations/asc/disconnect.js +115 -0
  8. package/build/commands/integrations/asc/status.d.ts +14 -0
  9. package/build/commands/integrations/asc/status.js +65 -0
  10. package/build/commands/simulator/start.js +2 -0
  11. package/build/commands/simulator/stop.d.ts +13 -0
  12. package/build/commands/simulator/stop.js +38 -0
  13. package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +2 -1
  14. package/build/credentials/ios/actions/AscApiKeyUtils.js +16 -0
  15. package/build/credentials/ios/appstore/AppStoreApi.d.ts +3 -1
  16. package/build/credentials/ios/appstore/AppStoreApi.js +2 -2
  17. package/build/graphql/generated.d.ts +243 -0
  18. package/build/graphql/generated.js +11 -3
  19. package/build/graphql/mutations/AscAppLinkMutation.d.ts +12 -0
  20. package/build/graphql/mutations/AscAppLinkMutation.js +36 -0
  21. package/build/graphql/mutations/DeviceRunSessionMutation.d.ts +2 -1
  22. package/build/graphql/mutations/DeviceRunSessionMutation.js +15 -0
  23. package/build/graphql/queries/AscAppLinkQuery.d.ts +8 -0
  24. package/build/graphql/queries/AscAppLinkQuery.js +67 -0
  25. package/build/integrations/asc/ascApiKey.d.ts +7 -0
  26. package/build/integrations/asc/ascApiKey.js +26 -0
  27. package/build/integrations/asc/utils.d.ts +21 -0
  28. package/build/integrations/asc/utils.js +56 -0
  29. package/build/utils/download.d.ts +1 -0
  30. package/build/utils/download.js +1 -0
  31. package/oclif.manifest.json +1342 -962
  32. package/package.json +6 -3
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
5
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
6
+ const flags_1 = require("../../commandUtils/flags");
7
+ const DeviceRunSessionMutation_1 = require("../../graphql/mutations/DeviceRunSessionMutation");
8
+ const ora_1 = require("../../ora");
9
+ class SimulatorStop extends EasCommand_1.default {
10
+ static hidden = true;
11
+ static description = '[EXPERIMENTAL] stop a remote simulator session on EAS by its device run session ID';
12
+ static flags = {
13
+ id: core_1.Flags.string({
14
+ description: 'Device run session ID',
15
+ required: true,
16
+ }),
17
+ ...flags_1.EASNonInteractiveFlag,
18
+ };
19
+ static contextDefinition = {
20
+ ...this.ContextOptions.LoggedIn,
21
+ };
22
+ async runAsync() {
23
+ const { flags } = await this.parse(SimulatorStop);
24
+ const { loggedIn: { graphqlClient }, } = await this.getContextAsync(SimulatorStop, {
25
+ nonInteractive: flags['non-interactive'],
26
+ });
27
+ const stopSpinner = (0, ora_1.ora)(`🛑 Stopping device run session ${flags.id}`).start();
28
+ try {
29
+ const session = await DeviceRunSessionMutation_1.DeviceRunSessionMutation.stopDeviceRunSessionAsync(graphqlClient, flags.id);
30
+ stopSpinner.succeed(`🎉 Device run session ${session.id} is ${session.status.toLowerCase()}`);
31
+ }
32
+ catch (err) {
33
+ stopSpinner.fail(`Failed to stop device run session ${flags.id}`);
34
+ throw err;
35
+ }
36
+ }
37
+ }
38
+ exports.default = SimulatorStop;
@@ -3,7 +3,8 @@ import { CredentialsContext } from '../../context';
3
3
  import { AscApiKey } from '../appstore/Credentials.types';
4
4
  import { AscApiKeyPath, MinimalAscApiKey } from '../credentials';
5
5
  export declare enum AppStoreApiKeyPurpose {
6
- SUBMISSION_SERVICE = "EAS Submit"
6
+ SUBMISSION_SERVICE = "EAS Submit",
7
+ ASC_APP_CONNECTION = "EAS Connect"
7
8
  }
8
9
  export declare function promptForAscApiKeyPathAsync(ctx: CredentialsContext): Promise<AscApiKeyPath>;
9
10
  export declare function promptForIssuerIdAsync(): Promise<string>;
@@ -15,6 +15,7 @@ const chalk_1 = tslib_1.__importDefault(require("chalk"));
15
15
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
16
16
  const nanoid_1 = require("nanoid");
17
17
  const path_1 = tslib_1.__importDefault(require("path"));
18
+ const apple_utils_1 = require("@expo/apple-utils");
18
19
  const AppleTeamFormatting_1 = require("./AppleTeamFormatting");
19
20
  const log_1 = tslib_1.__importStar(require("../../../log"));
20
21
  const prompts_1 = require("../../../prompts");
@@ -25,6 +26,7 @@ const validateAscApiKey_1 = require("../validators/validateAscApiKey");
25
26
  var AppStoreApiKeyPurpose;
26
27
  (function (AppStoreApiKeyPurpose) {
27
28
  AppStoreApiKeyPurpose["SUBMISSION_SERVICE"] = "EAS Submit";
29
+ AppStoreApiKeyPurpose["ASC_APP_CONNECTION"] = "EAS Connect";
28
30
  })(AppStoreApiKeyPurpose || (exports.AppStoreApiKeyPurpose = AppStoreApiKeyPurpose = {}));
29
31
  async function promptForAscApiKeyPathAsync(ctx) {
30
32
  const { keyId, keyP8Path } = await promptForKeyP8AndIdAsync();
@@ -79,11 +81,25 @@ async function provideOrGenerateAscApiKeyAsync(ctx, purpose) {
79
81
  }
80
82
  async function generateAscApiKeyAsync(ctx, purpose) {
81
83
  await ctx.appStore.ensureAuthenticatedAsync();
84
+ const role = await selectRoleForGeneratedAscApiKeyAsync();
82
85
  const ascApiKey = await ctx.appStore.createAscApiKeyAsync(ctx.analytics, {
83
86
  nickname: getAscApiKeyName(purpose),
87
+ roles: [role],
84
88
  });
85
89
  return await getMinimalAscApiKeyAsync(ascApiKey);
86
90
  }
91
+ async function selectRoleForGeneratedAscApiKeyAsync() {
92
+ return await (0, prompts_1.selectAsync)('Select role for the generated API key:', [
93
+ {
94
+ title: 'ADMIN (default)',
95
+ value: apple_utils_1.UserRole.ADMIN,
96
+ },
97
+ {
98
+ title: 'APP_MANAGER (least privilege for app management)',
99
+ value: apple_utils_1.UserRole.APP_MANAGER,
100
+ },
101
+ ]);
102
+ }
87
103
  function getAscApiKeyName(purpose) {
88
104
  const nameParts = ['[Expo]', purpose, (0, nanoid_1.nanoid)(10)];
89
105
  return nameParts.join(' ');
@@ -1,4 +1,5 @@
1
1
  import { ProfileType } from '@expo/app-store';
2
+ import { UserRole } from '@expo/apple-utils';
2
3
  import { AscApiKey, AscApiKeyInfo, DistributionCertificate, DistributionCertificateStoreInfo, ProvisioningProfile, ProvisioningProfileStoreInfo, PushKey, PushKeyStoreInfo } from './Credentials.types';
3
4
  import { Options as AuthenticateOptions } from './authenticate';
4
5
  import { AuthCtx, AuthenticationMode, UserAuthCtx } from './authenticateTypes';
@@ -26,8 +27,9 @@ export default class AppStoreApi {
26
27
  createOrReuseAdhocProvisioningProfileAsync(udids: string[], bundleIdentifier: string, distCertSerialNumber: string, profileType: ProfileType): Promise<ProvisioningProfile>;
27
28
  listAscApiKeysAsync(): Promise<AscApiKeyInfo[]>;
28
29
  getAscApiKeyAsync(keyId: string): Promise<AscApiKeyInfo | null>;
29
- createAscApiKeyAsync(analytics: Analytics, { nickname }: {
30
+ createAscApiKeyAsync(analytics: Analytics, { nickname, roles }: {
30
31
  nickname: string;
32
+ roles?: UserRole[];
31
33
  }): Promise<AscApiKey>;
32
34
  revokeAscApiKeyAsync(keyId: string): Promise<AscApiKeyInfo>;
33
35
  }
@@ -94,9 +94,9 @@ class AppStoreApi {
94
94
  const userCtx = await this.ensureUserAuthenticatedAsync();
95
95
  return await (0, ascApiKey_1.getAscApiKeyAsync)(userCtx, keyId);
96
96
  }
97
- async createAscApiKeyAsync(analytics, { nickname }) {
97
+ async createAscApiKeyAsync(analytics, { nickname, roles }) {
98
98
  const userCtx = await this.ensureUserAuthenticatedAsync();
99
- return await (0, ascApiKey_1.createAscApiKeyAsync)(analytics, userCtx, { nickname });
99
+ return await (0, ascApiKey_1.createAscApiKeyAsync)(analytics, userCtx, { nickname, roles });
100
100
  }
101
101
  async revokeAscApiKeyAsync(keyId) {
102
102
  const userCtx = await this.ensureUserAuthenticatedAsync();
@@ -1239,6 +1239,7 @@ export type App = Project & {
1239
1239
  */
1240
1240
  buildsReleaseChannels: Array<Scalars['String']['output']>;
1241
1241
  channelsPaginated: AppChannelsConnection;
1242
+ convexProject?: Maybe<ConvexProject>;
1242
1243
  deployment?: Maybe<Deployment>;
1243
1244
  /** Deployments associated with this app */
1244
1245
  deployments: DeploymentsConnection;
@@ -1800,6 +1801,9 @@ export type AppNotificationPreferenceInput = {
1800
1801
  export type AppObserve = {
1801
1802
  __typename?: 'AppObserve';
1802
1803
  appVersions: Array<AppObserveAppVersion>;
1804
+ customEventCounts: AppObserveCustomEventCounts;
1805
+ customEventList: AppObserveCustomEventListConnection;
1806
+ customEventNames: AppObserveCustomEventNames;
1803
1807
  environments: Array<Scalars['String']['output']>;
1804
1808
  events: AppObserveEventsConnection;
1805
1809
  timeSeries: AppObserveTimeSeries;
@@ -1808,6 +1812,22 @@ export type AppObserve = {
1808
1812
  export type AppObserveAppVersionsArgs = {
1809
1813
  input: AppObserveReleasesInput;
1810
1814
  };
1815
+ export type AppObserveCustomEventCountsArgs = {
1816
+ input: AppObserveCustomEventCountsInput;
1817
+ };
1818
+ export type AppObserveCustomEventListArgs = {
1819
+ after?: InputMaybe<Scalars['String']['input']>;
1820
+ before?: InputMaybe<Scalars['String']['input']>;
1821
+ filter?: InputMaybe<AppObserveCustomEventListFilter>;
1822
+ first?: InputMaybe<Scalars['Int']['input']>;
1823
+ last?: InputMaybe<Scalars['Int']['input']>;
1824
+ };
1825
+ export type AppObserveCustomEventNamesArgs = {
1826
+ endTime: Scalars['DateTime']['input'];
1827
+ environment?: InputMaybe<Scalars['String']['input']>;
1828
+ platform?: InputMaybe<AppObservePlatform>;
1829
+ startTime: Scalars['DateTime']['input'];
1830
+ };
1811
1831
  export type AppObserveEnvironmentsArgs = {
1812
1832
  endTime?: InputMaybe<Scalars['DateTime']['input']>;
1813
1833
  platform?: InputMaybe<AppObservePlatform>;
@@ -1863,6 +1883,86 @@ export type AppObserveAppVersionMetric = {
1863
1883
  metricName: Scalars['String']['output'];
1864
1884
  statistics: AppObserveVersionMarkerStatistics;
1865
1885
  };
1886
+ export type AppObserveCustomEvent = {
1887
+ __typename?: 'AppObserveCustomEvent';
1888
+ appBuildNumber: Scalars['String']['output'];
1889
+ appEasBuildId?: Maybe<Scalars['String']['output']>;
1890
+ appUpdateId?: Maybe<Scalars['String']['output']>;
1891
+ appVersion: Scalars['String']['output'];
1892
+ countryCode?: Maybe<Scalars['String']['output']>;
1893
+ deviceModel: Scalars['String']['output'];
1894
+ deviceOs: Scalars['String']['output'];
1895
+ deviceOsVersion: Scalars['String']['output'];
1896
+ easClientId: Scalars['String']['output'];
1897
+ environment?: Maybe<Scalars['String']['output']>;
1898
+ eventName: Scalars['String']['output'];
1899
+ id: Scalars['ID']['output'];
1900
+ properties: Array<AppObserveEventProperty>;
1901
+ sessionId?: Maybe<Scalars['String']['output']>;
1902
+ severityNumber?: Maybe<Scalars['Int']['output']>;
1903
+ severityText?: Maybe<Scalars['String']['output']>;
1904
+ timestamp: Scalars['DateTime']['output'];
1905
+ };
1906
+ export type AppObserveCustomEventCountBucket = {
1907
+ __typename?: 'AppObserveCustomEventCountBucket';
1908
+ bucket: Scalars['DateTime']['output'];
1909
+ count: Scalars['Int']['output'];
1910
+ };
1911
+ export type AppObserveCustomEventCounts = {
1912
+ __typename?: 'AppObserveCustomEventCounts';
1913
+ buckets: Array<AppObserveCustomEventCountBucket>;
1914
+ totalCount: Scalars['Int']['output'];
1915
+ };
1916
+ export type AppObserveCustomEventCountsInput = {
1917
+ appBuildNumber?: InputMaybe<Scalars['String']['input']>;
1918
+ appEasBuildId?: InputMaybe<Scalars['String']['input']>;
1919
+ appUpdateId?: InputMaybe<Scalars['String']['input']>;
1920
+ appVersion?: InputMaybe<Scalars['String']['input']>;
1921
+ bucketIntervalMinutes?: InputMaybe<Scalars['Int']['input']>;
1922
+ endTime: Scalars['DateTime']['input'];
1923
+ environment?: InputMaybe<Scalars['String']['input']>;
1924
+ eventName: Scalars['String']['input'];
1925
+ platform: AppObservePlatform;
1926
+ startTime: Scalars['DateTime']['input'];
1927
+ };
1928
+ export type AppObserveCustomEventEdge = {
1929
+ __typename?: 'AppObserveCustomEventEdge';
1930
+ cursor: Scalars['String']['output'];
1931
+ node: AppObserveCustomEvent;
1932
+ };
1933
+ export type AppObserveCustomEventListConnection = {
1934
+ __typename?: 'AppObserveCustomEventListConnection';
1935
+ edges: Array<AppObserveCustomEventEdge>;
1936
+ pageInfo: PageInfo;
1937
+ };
1938
+ export type AppObserveCustomEventListFilter = {
1939
+ appBuildNumber?: InputMaybe<Scalars['String']['input']>;
1940
+ appEasBuildId?: InputMaybe<Scalars['String']['input']>;
1941
+ appUpdateId?: InputMaybe<Scalars['String']['input']>;
1942
+ appVersion?: InputMaybe<Scalars['String']['input']>;
1943
+ easClientId?: InputMaybe<Scalars['String']['input']>;
1944
+ endTime?: InputMaybe<Scalars['DateTime']['input']>;
1945
+ environment?: InputMaybe<Scalars['String']['input']>;
1946
+ eventName?: InputMaybe<Scalars['String']['input']>;
1947
+ platform?: InputMaybe<AppObservePlatform>;
1948
+ propertyFilters?: InputMaybe<Array<AppObserveCustomEventPropertyFilter>>;
1949
+ sessionId?: InputMaybe<Scalars['String']['input']>;
1950
+ startTime?: InputMaybe<Scalars['DateTime']['input']>;
1951
+ };
1952
+ export type AppObserveCustomEventName = {
1953
+ __typename?: 'AppObserveCustomEventName';
1954
+ count: Scalars['Int']['output'];
1955
+ eventName: Scalars['String']['output'];
1956
+ };
1957
+ export type AppObserveCustomEventNames = {
1958
+ __typename?: 'AppObserveCustomEventNames';
1959
+ isTruncated: Scalars['Boolean']['output'];
1960
+ names: Array<AppObserveCustomEventName>;
1961
+ };
1962
+ export type AppObserveCustomEventPropertyFilter = {
1963
+ key: Scalars['String']['input'];
1964
+ value: Scalars['String']['input'];
1965
+ };
1866
1966
  export type AppObserveEvent = {
1867
1967
  __typename?: 'AppObserveEvent';
1868
1968
  appBuildNumber: Scalars['String']['output'];
@@ -1900,6 +2000,12 @@ export type AppObserveEventEdge = {
1900
2000
  cursor: Scalars['String']['output'];
1901
2001
  node: AppObserveEvent;
1902
2002
  };
2003
+ export type AppObserveEventProperty = {
2004
+ __typename?: 'AppObserveEventProperty';
2005
+ key: Scalars['String']['output'];
2006
+ type: AppObservePropertyType;
2007
+ value: Scalars['String']['output'];
2008
+ };
1903
2009
  export type AppObserveEventsConnection = {
1904
2010
  __typename?: 'AppObserveEventsConnection';
1905
2011
  edges: Array<AppObserveEventEdge>;
@@ -1934,6 +2040,12 @@ export declare enum AppObservePlatform {
1934
2040
  Android = "ANDROID",
1935
2041
  Ios = "IOS"
1936
2042
  }
2043
+ export declare enum AppObservePropertyType {
2044
+ Boolean = "BOOLEAN",
2045
+ Json = "JSON",
2046
+ Number = "NUMBER",
2047
+ String = "STRING"
2048
+ }
1937
2049
  export type AppObserveReleasesInput = {
1938
2050
  endTime: Scalars['DateTime']['input'];
1939
2051
  environment?: InputMaybe<Scalars['String']['input']>;
@@ -3479,6 +3591,17 @@ export type ConvexIntegrationQuery = {
3479
3591
  __typename?: 'ConvexIntegrationQuery';
3480
3592
  clientIdentifier: Scalars['String']['output'];
3481
3593
  };
3594
+ export type ConvexProject = {
3595
+ __typename?: 'ConvexProject';
3596
+ app: App;
3597
+ convexProjectIdentifier: Scalars['String']['output'];
3598
+ convexProjectName: Scalars['String']['output'];
3599
+ convexProjectSlug: Scalars['String']['output'];
3600
+ convexTeamConnection: ConvexTeamConnection;
3601
+ createdAt: Scalars['DateTime']['output'];
3602
+ id: Scalars['ID']['output'];
3603
+ updatedAt: Scalars['DateTime']['output'];
3604
+ };
3482
3605
  export type ConvexTeamConnection = {
3483
3606
  __typename?: 'ConvexTeamConnection';
3484
3607
  account: Account;
@@ -4739,6 +4862,7 @@ export declare enum EntityTypeName {
4739
4862
  BillingContractEntity = "BillingContractEntity",
4740
4863
  BranchEntity = "BranchEntity",
4741
4864
  ChannelEntity = "ChannelEntity",
4865
+ ConvexProjectEntity = "ConvexProjectEntity",
4742
4866
  ConvexTeamConnectionEntity = "ConvexTeamConnectionEntity",
4743
4867
  CustomerEntity = "CustomerEntity",
4744
4868
  EchoProjectEntity = "EchoProjectEntity",
@@ -13339,6 +13463,33 @@ export type CreateAppVersionMutation = {
13339
13463
  };
13340
13464
  };
13341
13465
  };
13466
+ export type CreateAppStoreConnectAppMutationVariables = Exact<{
13467
+ appStoreConnectAppInput: AppStoreConnectAppInput;
13468
+ }>;
13469
+ export type CreateAppStoreConnectAppMutation = {
13470
+ __typename?: 'RootMutation';
13471
+ appStoreConnectApp: {
13472
+ __typename?: 'AppStoreConnectAppMutation';
13473
+ createAppStoreConnectApp: {
13474
+ __typename?: 'AppStoreConnectApp';
13475
+ id: string;
13476
+ ascAppIdentifier: string;
13477
+ };
13478
+ };
13479
+ };
13480
+ export type DeleteAppStoreConnectAppMutationVariables = Exact<{
13481
+ appStoreConnectAppId: Scalars['ID']['input'];
13482
+ }>;
13483
+ export type DeleteAppStoreConnectAppMutation = {
13484
+ __typename?: 'RootMutation';
13485
+ appStoreConnectApp: {
13486
+ __typename?: 'AppStoreConnectAppMutation';
13487
+ deleteAppStoreConnectApp: {
13488
+ __typename?: 'DeleteAppStoreConnectAppResult';
13489
+ id: string;
13490
+ };
13491
+ };
13492
+ };
13342
13493
  export type CreateAndroidBuildMutationVariables = Exact<{
13343
13494
  appId: Scalars['ID']['input'];
13344
13495
  job: AndroidJobInput;
@@ -13763,6 +13914,20 @@ export type CreateDeviceRunSessionMutation = {
13763
13914
  };
13764
13915
  };
13765
13916
  };
13917
+ export type StopDeviceRunSessionMutationVariables = Exact<{
13918
+ deviceRunSessionId: Scalars['ID']['input'];
13919
+ }>;
13920
+ export type StopDeviceRunSessionMutation = {
13921
+ __typename?: 'RootMutation';
13922
+ deviceRunSession: {
13923
+ __typename?: 'DeviceRunSessionMutation';
13924
+ stopDeviceRunSession: {
13925
+ __typename?: 'DeviceRunSession';
13926
+ id: string;
13927
+ status: DeviceRunSessionStatus;
13928
+ };
13929
+ };
13930
+ };
13766
13931
  export type CreateEnvironmentSecretForAccountMutationVariables = Exact<{
13767
13932
  input: CreateEnvironmentSecretInput;
13768
13933
  accountId: Scalars['String']['input'];
@@ -15018,6 +15183,84 @@ export type LatestAppVersionQuery = {
15018
15183
  };
15019
15184
  };
15020
15185
  };
15186
+ export type AscAppLinkAppMetadataQueryVariables = Exact<{
15187
+ appId: Scalars['String']['input'];
15188
+ }>;
15189
+ export type AscAppLinkAppMetadataQuery = {
15190
+ __typename?: 'RootQuery';
15191
+ app: {
15192
+ __typename?: 'AppQuery';
15193
+ byId: {
15194
+ __typename?: 'App';
15195
+ id: string;
15196
+ fullName: string;
15197
+ ownerAccount: {
15198
+ __typename?: 'Account';
15199
+ id: string;
15200
+ name: string;
15201
+ ownerUserActor?: {
15202
+ __typename?: 'SSOUser';
15203
+ id: string;
15204
+ username: string;
15205
+ } | {
15206
+ __typename?: 'User';
15207
+ id: string;
15208
+ username: string;
15209
+ } | null;
15210
+ users: Array<{
15211
+ __typename?: 'UserPermission';
15212
+ role: Role;
15213
+ actor: {
15214
+ __typename?: 'PartnerActor';
15215
+ id: string;
15216
+ } | {
15217
+ __typename?: 'Robot';
15218
+ id: string;
15219
+ } | {
15220
+ __typename?: 'SSOUser';
15221
+ id: string;
15222
+ } | {
15223
+ __typename?: 'User';
15224
+ id: string;
15225
+ };
15226
+ }>;
15227
+ };
15228
+ appStoreConnectApp?: {
15229
+ __typename?: 'AppStoreConnectApp';
15230
+ id: string;
15231
+ ascAppIdentifier: string;
15232
+ remoteAppStoreConnectApp: {
15233
+ __typename?: 'RemoteAppStoreConnectApp';
15234
+ ascAppIdentifier: string;
15235
+ bundleIdentifier: string;
15236
+ name?: string | null;
15237
+ appStoreIconUrl?: string | null;
15238
+ };
15239
+ } | null;
15240
+ };
15241
+ };
15242
+ };
15243
+ export type DiscoverAccessibleAppStoreConnectAppsQueryVariables = Exact<{
15244
+ appStoreConnectApiKeyId: Scalars['ID']['input'];
15245
+ bundleIdentifier?: InputMaybe<Scalars['String']['input']>;
15246
+ }>;
15247
+ export type DiscoverAccessibleAppStoreConnectAppsQuery = {
15248
+ __typename?: 'RootQuery';
15249
+ appStoreConnectApiKey: {
15250
+ __typename?: 'AppStoreConnectApiKeyQuery';
15251
+ byId: {
15252
+ __typename?: 'AppStoreConnectApiKey';
15253
+ id: string;
15254
+ remoteAppStoreConnectApps: Array<{
15255
+ __typename?: 'RemoteAppStoreConnectApp';
15256
+ ascAppIdentifier: string;
15257
+ bundleIdentifier: string;
15258
+ name?: string | null;
15259
+ appStoreIconUrl?: string | null;
15260
+ }>;
15261
+ };
15262
+ };
15263
+ };
15021
15264
  export type GetAssetSignedUrlsQueryVariables = Exact<{
15022
15265
  updateId: Scalars['ID']['input'];
15023
15266
  storageKeys: Array<Scalars['String']['input']> | Scalars['String']['input'];
@@ -6,9 +6,9 @@
6
6
  * For more info and docs, visit https://graphql-code-generator.com/
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.EasBuildWaiverType = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.DeviceRunSessionType = exports.DeviceRunSessionStatus = exports.DashboardViewPin = exports.CustomDomainStatus = exports.CustomDomainDnsRecordType = exports.CrashSampleFor = exports.ContinentCode = exports.BuildWorkflow = exports.BuildTrigger = exports.BuildStatus = exports.BuildRetryDisabledReason = exports.BuildResourceClass = exports.BuildPriority = exports.BuildPhase = exports.BuildMode = exports.BuildLimitThresholdExceededMetadataType = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.BuildAnnotationType = exports.BackgroundJobState = exports.BackgroundJobResultType = exports.AuthProviderIdentifier = exports.AuthProtocolType = exports.AuditLogsExportFormat = exports.AssetMetadataStatus = exports.AssetMapSourceType = exports.AppsFilter = exports.AppleTeamType = exports.AppleDeviceClass = exports.AppUploadSessionType = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppProfileImageWidth = exports.AppPrivacy = exports.AppPlatform = exports.AppObservePlatform = exports.AppObserveEventsOrderByField = exports.AppObserveEventsOrderByDirection = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountUploadSessionType = exports.AccountMemberType = exports.AccountAppsSortByField = void 0;
10
- exports.RequestsOrderByField = exports.RequestsOrderByDirection = exports.RequestMethod = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OnboardingEnvironment = exports.OnboardingDeviceType = exports.OfferType = exports.OAuthProvider = exports.NotificationType = exports.NotificationEvent = exports.LocalBuildArchiveSourceType = exports.JobRunStatus = exports.JobRunPriority = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.InsightsFilterType = exports.GitHubJobRunTriggerType = exports.GitHubJobRunTriggerRunStatus = exports.GitHubJobRunJobType = exports.GitHubBuildTriggerType = exports.GitHubBuildTriggerRunStatus = exports.GitHubBuildTriggerExecutionBehavior = exports.GitHubAppInstallationStatus = exports.GitHubAppInstallationAccountType = exports.GitHubAppEnvironment = exports.FingerprintSourceType = exports.Feature = exports.Experiment = exports.EnvironmentVariableVisibility = exports.EnvironmentVariableScope = exports.EnvironmentSecretType = exports.EntityTypeName = exports.EchoVersionSource = exports.EchoProjectVisibility = exports.EchoProjectUploadSessionType = exports.EchoProjectIconSource = exports.EchoMessageRole = exports.EchoMessagePartType = exports.EchoChatState = exports.EchoChangeType = exports.EchoBuildStatus = exports.EchoAgentType = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = void 0;
11
- exports.WorkflowsInsightsRunsOverTimeGranularity = exports.WorkflowsInsightsExportFormat = exports.WorkflowRunTriggerEventType = exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkflowJobReviewDecision = exports.WorkflowDeviceTestCaseStatus = exports.WorkflowArtifactStorageType = exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = exports.WorkerDeploymentCrashKind = exports.WebhookType = exports.UserSpecifiedAccountUsage = exports.UserEntityTypeName = exports.UserAgentPlatform = exports.UserAgentOs = exports.UserAgentBrowser = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.UpdateDiffReceiptStateValue = exports.UpdateDiffReceiptOrderByField = exports.UpdateDiffReceiptOrderByDirection = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ResponseType = exports.ResponseStatusType = exports.ResponseCacheStatus = exports.ResourceClassExperiment = void 0;
9
+ exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = exports.DeviceRunSessionType = exports.DeviceRunSessionStatus = exports.DashboardViewPin = exports.CustomDomainStatus = exports.CustomDomainDnsRecordType = exports.CrashSampleFor = exports.ContinentCode = exports.BuildWorkflow = exports.BuildTrigger = exports.BuildStatus = exports.BuildRetryDisabledReason = exports.BuildResourceClass = exports.BuildPriority = exports.BuildPhase = exports.BuildMode = exports.BuildLimitThresholdExceededMetadataType = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.BuildAnnotationType = exports.BackgroundJobState = exports.BackgroundJobResultType = exports.AuthProviderIdentifier = exports.AuthProtocolType = exports.AuditLogsExportFormat = exports.AssetMetadataStatus = exports.AssetMapSourceType = exports.AppsFilter = exports.AppleTeamType = exports.AppleDeviceClass = exports.AppUploadSessionType = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppProfileImageWidth = exports.AppPrivacy = exports.AppPlatform = exports.AppObservePropertyType = exports.AppObservePlatform = exports.AppObserveEventsOrderByField = exports.AppObserveEventsOrderByDirection = exports.AppInternalDistributionBuildPrivacy = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = exports.AccountUploadSessionType = exports.AccountMemberType = exports.AccountAppsSortByField = void 0;
10
+ exports.RequestsOrderByDirection = exports.RequestMethod = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OnboardingEnvironment = exports.OnboardingDeviceType = exports.OfferType = exports.OAuthProvider = exports.NotificationType = exports.NotificationEvent = exports.LocalBuildArchiveSourceType = exports.JobRunStatus = exports.JobRunPriority = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.InsightsFilterType = exports.GitHubJobRunTriggerType = exports.GitHubJobRunTriggerRunStatus = exports.GitHubJobRunJobType = exports.GitHubBuildTriggerType = exports.GitHubBuildTriggerRunStatus = exports.GitHubBuildTriggerExecutionBehavior = exports.GitHubAppInstallationStatus = exports.GitHubAppInstallationAccountType = exports.GitHubAppEnvironment = exports.FingerprintSourceType = exports.Feature = exports.Experiment = exports.EnvironmentVariableVisibility = exports.EnvironmentVariableScope = exports.EnvironmentSecretType = exports.EntityTypeName = exports.EchoVersionSource = exports.EchoProjectVisibility = exports.EchoProjectUploadSessionType = exports.EchoProjectIconSource = exports.EchoMessageRole = exports.EchoMessagePartType = exports.EchoChatState = exports.EchoChangeType = exports.EchoBuildStatus = exports.EchoAgentType = exports.EasTotalPlanEnablementUnit = exports.EasServiceMetric = exports.EasService = exports.EasBuildWaiverType = void 0;
11
+ exports.WorkflowsInsightsRunsOverTimeGranularity = exports.WorkflowsInsightsExportFormat = exports.WorkflowRunTriggerEventType = exports.WorkflowRunStatus = exports.WorkflowProjectSourceType = exports.WorkflowJobType = exports.WorkflowJobStatus = exports.WorkflowJobReviewDecision = exports.WorkflowDeviceTestCaseStatus = exports.WorkflowArtifactStorageType = exports.WorkerLoggerLevel = exports.WorkerDeploymentLogLevel = exports.WorkerDeploymentCrashKind = exports.WebhookType = exports.UserSpecifiedAccountUsage = exports.UserEntityTypeName = exports.UserAgentPlatform = exports.UserAgentOs = exports.UserAgentBrowser = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.UpdateDiffReceiptStateValue = exports.UpdateDiffReceiptOrderByField = exports.UpdateDiffReceiptOrderByDirection = exports.TargetEntityMutationType = exports.SubmissionStatus = exports.SubmissionPriority = exports.SubmissionArchiveSourceType = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ResponseType = exports.ResponseStatusType = exports.ResponseCacheStatus = exports.ResourceClassExperiment = exports.RequestsOrderByField = void 0;
12
12
  var AccountAppsSortByField;
13
13
  (function (AccountAppsSortByField) {
14
14
  AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
@@ -81,6 +81,13 @@ var AppObservePlatform;
81
81
  AppObservePlatform["Android"] = "ANDROID";
82
82
  AppObservePlatform["Ios"] = "IOS";
83
83
  })(AppObservePlatform || (exports.AppObservePlatform = AppObservePlatform = {}));
84
+ var AppObservePropertyType;
85
+ (function (AppObservePropertyType) {
86
+ AppObservePropertyType["Boolean"] = "BOOLEAN";
87
+ AppObservePropertyType["Json"] = "JSON";
88
+ AppObservePropertyType["Number"] = "NUMBER";
89
+ AppObservePropertyType["String"] = "STRING";
90
+ })(AppObservePropertyType || (exports.AppObservePropertyType = AppObservePropertyType = {}));
84
91
  var AppPlatform;
85
92
  (function (AppPlatform) {
86
93
  AppPlatform["Android"] = "ANDROID";
@@ -505,6 +512,7 @@ var EntityTypeName;
505
512
  EntityTypeName["BillingContractEntity"] = "BillingContractEntity";
506
513
  EntityTypeName["BranchEntity"] = "BranchEntity";
507
514
  EntityTypeName["ChannelEntity"] = "ChannelEntity";
515
+ EntityTypeName["ConvexProjectEntity"] = "ConvexProjectEntity";
508
516
  EntityTypeName["ConvexTeamConnectionEntity"] = "ConvexTeamConnectionEntity";
509
517
  EntityTypeName["CustomerEntity"] = "CustomerEntity";
510
518
  EntityTypeName["EchoProjectEntity"] = "EchoProjectEntity";
@@ -0,0 +1,12 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ export declare const AscAppLinkMutation: {
3
+ createAppStoreConnectAppAsync(graphqlClient: ExpoGraphqlClient, appStoreConnectAppInput: {
4
+ appId: string;
5
+ ascAppIdentifier: string;
6
+ appStoreConnectApiKeyId: string;
7
+ }): Promise<{
8
+ id: string;
9
+ ascAppIdentifier: string;
10
+ }>;
11
+ deleteAppStoreConnectAppAsync(graphqlClient: ExpoGraphqlClient, appStoreConnectAppId: string): Promise<void>;
12
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AscAppLinkMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
+ const client_1 = require("../client");
7
+ exports.AscAppLinkMutation = {
8
+ async createAppStoreConnectAppAsync(graphqlClient, appStoreConnectAppInput) {
9
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
10
+ .mutation((0, graphql_tag_1.default) `
11
+ mutation CreateAppStoreConnectApp($appStoreConnectAppInput: AppStoreConnectAppInput!) {
12
+ appStoreConnectApp {
13
+ createAppStoreConnectApp(appStoreConnectAppInput: $appStoreConnectAppInput) {
14
+ id
15
+ ascAppIdentifier
16
+ }
17
+ }
18
+ }
19
+ `, { appStoreConnectAppInput })
20
+ .toPromise());
21
+ return data.appStoreConnectApp.createAppStoreConnectApp;
22
+ },
23
+ async deleteAppStoreConnectAppAsync(graphqlClient, appStoreConnectAppId) {
24
+ await (0, client_1.withErrorHandlingAsync)(graphqlClient
25
+ .mutation((0, graphql_tag_1.default) `
26
+ mutation DeleteAppStoreConnectApp($appStoreConnectAppId: ID!) {
27
+ appStoreConnectApp {
28
+ deleteAppStoreConnectApp(appStoreConnectAppId: $appStoreConnectAppId) {
29
+ id
30
+ }
31
+ }
32
+ }
33
+ `, { appStoreConnectAppId })
34
+ .toPromise());
35
+ },
36
+ };
@@ -1,5 +1,6 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { CreateDeviceRunSessionInput, CreateDeviceRunSessionMutation } from '../generated';
2
+ import { CreateDeviceRunSessionInput, CreateDeviceRunSessionMutation, StopDeviceRunSessionMutation } from '../generated';
3
3
  export declare const DeviceRunSessionMutation: {
4
4
  createDeviceRunSessionAsync(graphqlClient: ExpoGraphqlClient, deviceRunSessionInput: CreateDeviceRunSessionInput): Promise<CreateDeviceRunSessionMutation["deviceRunSession"]["createDeviceRunSession"]>;
5
+ stopDeviceRunSessionAsync(graphqlClient: ExpoGraphqlClient, deviceRunSessionId: string): Promise<StopDeviceRunSessionMutation["deviceRunSession"]["stopDeviceRunSession"]>;
5
6
  };
@@ -31,4 +31,19 @@ exports.DeviceRunSessionMutation = {
31
31
  .toPromise());
32
32
  return data.deviceRunSession.createDeviceRunSession;
33
33
  },
34
+ async stopDeviceRunSessionAsync(graphqlClient, deviceRunSessionId) {
35
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
36
+ .mutation((0, graphql_tag_1.default) `
37
+ mutation StopDeviceRunSessionMutation($deviceRunSessionId: ID!) {
38
+ deviceRunSession {
39
+ stopDeviceRunSession(deviceRunSessionId: $deviceRunSessionId) {
40
+ id
41
+ status
42
+ }
43
+ }
44
+ }
45
+ `, { deviceRunSessionId }, { noRetry: true })
46
+ .toPromise());
47
+ return data.deviceRunSession.stopDeviceRunSession;
48
+ },
34
49
  };
@@ -0,0 +1,8 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { AscAppLinkAppMetadataQuery, DiscoverAccessibleAppStoreConnectAppsQuery } from '../generated';
3
+ export declare const AscAppLinkQuery: {
4
+ getAppMetadataAsync(graphqlClient: ExpoGraphqlClient, appId: string, options?: {
5
+ useCache?: boolean;
6
+ }): Promise<AscAppLinkAppMetadataQuery["app"]["byId"]>;
7
+ discoverAccessibleAppsAsync(graphqlClient: ExpoGraphqlClient, appStoreConnectApiKeyId: string, bundleIdentifier?: string): Promise<DiscoverAccessibleAppStoreConnectAppsQuery["appStoreConnectApiKey"]["byId"]["remoteAppStoreConnectApps"]>;
8
+ };
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AscAppLinkQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_1 = require("graphql");
6
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
+ const client_1 = require("../client");
8
+ const Account_1 = require("../types/Account");
9
+ exports.AscAppLinkQuery = {
10
+ async getAppMetadataAsync(graphqlClient, appId, options) {
11
+ const useCache = options?.useCache ?? true;
12
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
13
+ .query((0, graphql_tag_1.default) `
14
+ query AscAppLinkAppMetadata($appId: String!) {
15
+ app {
16
+ byId(appId: $appId) {
17
+ id
18
+ fullName
19
+ ownerAccount {
20
+ id
21
+ ...AccountFragment
22
+ }
23
+ appStoreConnectApp {
24
+ id
25
+ ascAppIdentifier
26
+ remoteAppStoreConnectApp {
27
+ ascAppIdentifier
28
+ bundleIdentifier
29
+ name
30
+ appStoreIconUrl
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ ${(0, graphql_1.print)(Account_1.AccountFragmentNode)}
37
+ `, { appId }, {
38
+ requestPolicy: useCache ? 'cache-first' : 'network-only',
39
+ additionalTypenames: ['App', 'AppStoreConnectApp'],
40
+ })
41
+ .toPromise());
42
+ return data.app.byId;
43
+ },
44
+ async discoverAccessibleAppsAsync(graphqlClient, appStoreConnectApiKeyId, bundleIdentifier) {
45
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
46
+ .query((0, graphql_tag_1.default) `
47
+ query DiscoverAccessibleAppStoreConnectApps(
48
+ $appStoreConnectApiKeyId: ID!
49
+ $bundleIdentifier: String
50
+ ) {
51
+ appStoreConnectApiKey {
52
+ byId(id: $appStoreConnectApiKeyId) {
53
+ id
54
+ remoteAppStoreConnectApps(bundleIdentifier: $bundleIdentifier) {
55
+ ascAppIdentifier
56
+ bundleIdentifier
57
+ name
58
+ appStoreIconUrl
59
+ }
60
+ }
61
+ }
62
+ }
63
+ `, { appStoreConnectApiKeyId, bundleIdentifier }, { additionalTypenames: ['AppStoreConnectApp'] })
64
+ .toPromise());
65
+ return data.appStoreConnectApiKey.byId?.remoteAppStoreConnectApps ?? [];
66
+ },
67
+ };
@@ -0,0 +1,7 @@
1
+ import { CredentialsContext } from '../../credentials/context';
2
+ import { AccountFragment, AppStoreConnectApiKeyFragment } from '../../graphql/generated';
3
+ export declare function selectOrCreateAscApiKeyIdAsync({ credentialsContext, existingKeys, ownerAccount, }: {
4
+ credentialsContext: CredentialsContext;
5
+ existingKeys: AppStoreConnectApiKeyFragment[];
6
+ ownerAccount: AccountFragment;
7
+ }): Promise<string>;