eas-cli 18.6.0 → 18.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.
Files changed (43) hide show
  1. package/README.md +149 -91
  2. package/build/channel/insights/formatInsights.d.ts +47 -0
  3. package/build/channel/insights/formatInsights.js +108 -0
  4. package/build/commands/build/dev.d.ts +1 -0
  5. package/build/commands/build/dev.js +10 -2
  6. package/build/commands/channel/insights.d.ts +18 -0
  7. package/build/commands/channel/insights.js +71 -0
  8. package/build/commands/observe/events.d.ts +1 -0
  9. package/build/commands/observe/events.js +17 -4
  10. package/build/commands/observe/metrics.d.ts +1 -0
  11. package/build/commands/observe/metrics.js +18 -6
  12. package/build/commands/observe/versions.d.ts +1 -0
  13. package/build/commands/observe/versions.js +17 -4
  14. package/build/commands/update/insights.d.ts +19 -0
  15. package/build/commands/update/insights.js +75 -0
  16. package/build/commands/update/view.d.ts +4 -0
  17. package/build/commands/update/view.js +47 -2
  18. package/build/credentials/ios/appstore/capabilityIdentifiers.js +28 -3
  19. package/build/graphql/client.d.ts +13 -0
  20. package/build/graphql/client.js +36 -1
  21. package/build/graphql/generated.d.ts +193 -0
  22. package/build/graphql/generated.js +8 -2
  23. package/build/graphql/queries/ChannelInsightsQuery.d.ts +12 -0
  24. package/build/graphql/queries/ChannelInsightsQuery.js +81 -0
  25. package/build/graphql/queries/UpdateInsightsQuery.d.ts +10 -0
  26. package/build/graphql/queries/UpdateInsightsQuery.js +53 -0
  27. package/build/graphql/types/Observe.js +1 -0
  28. package/build/insights/formatTimespan.d.ts +7 -0
  29. package/build/insights/formatTimespan.js +15 -0
  30. package/build/insights/timeRange.d.ts +10 -0
  31. package/build/insights/timeRange.js +10 -0
  32. package/build/metadata/apple/tasks/previews.js +41 -15
  33. package/build/observe/formatEvents.d.ts +3 -0
  34. package/build/observe/formatEvents.js +4 -0
  35. package/build/observe/formatMetrics.d.ts +3 -2
  36. package/build/observe/formatMetrics.js +16 -27
  37. package/build/observe/formatVersions.js +2 -8
  38. package/build/update/insights/formatInsights.d.ts +34 -0
  39. package/build/update/insights/formatInsights.js +128 -0
  40. package/build/utils/renderTextTable.d.ts +6 -0
  41. package/build/utils/renderTextTable.js +23 -0
  42. package/oclif.manifest.json +773 -469
  43. package/package.json +5 -5
@@ -34,6 +34,19 @@ async function syncCapabilityIdentifiersForEntitlementsAsync(bundleId, entitleme
34
34
  // these are only APPLE_PAY, ICLOUD, APP_GROUPS
35
35
  const CapabilityIdMapping = capabilityList_1.CapabilityMapping.filter(capability => capability.capabilityIdModel);
36
36
  const updateRequest = [];
37
+ // Fetch the bundle with its linked capability identifiers to check for already linked identifiers.
38
+ const bundleWithRelationships = await apple_utils_1.BundleId.infoAsync(bundleId.context, {
39
+ id: bundleId.id,
40
+ query: {
41
+ includes: [
42
+ 'bundleIdCapabilities',
43
+ 'bundleIdCapabilities.appGroups',
44
+ 'bundleIdCapabilities.merchantIds',
45
+ 'bundleIdCapabilities.cloudContainers',
46
+ ],
47
+ },
48
+ });
49
+ const linkedBundleCapabilities = bundleWithRelationships.attributes.bundleIdCapabilities ?? [];
37
50
  // Iterate through the supported capabilities to build the request.
38
51
  for (const classifier of CapabilityIdMapping) {
39
52
  const CapabilityModel = classifier.capabilityIdModel;
@@ -57,12 +70,24 @@ async function syncCapabilityIdentifiersForEntitlementsAsync(bundleId, entitleme
57
70
  const capabilityIds = [...new Set(entitlementValue)];
58
71
  // Get a list of all of the capability IDs that are already created on the server.
59
72
  const existingIds = await CapabilityModel.getAsync(bundleId.context);
73
+ // Opaque ids of identifiers already linked to this capability.
74
+ const remoteLinkedIds = linkedBundleCapabilities.find(c => c.isType(classifier.capability))
75
+ ?.attributes;
76
+ const alreadyLinkedOpaqueIds = new Set((remoteLinkedIds?.[CapabilityModel.type] ?? []).map(model => model.id));
60
77
  // A list of server IDs for linking.
61
78
  const capabilityIdOpaqueIds = [];
62
- const capabilitiesWithoutRemoteModels = capabilityIds.filter(localId => existingIds.find(model => model.attributes.identifier === localId) === undefined);
63
79
  // Iterate through all the local IDs and see if they exist on the server.
64
- for (const localId of capabilitiesWithoutRemoteModels) {
65
- let remoteIdModel = undefined;
80
+ for (const localId of capabilityIds) {
81
+ let remoteIdModel = existingIds.find(model => model.attributes.identifier === localId);
82
+ // Identifier already exists.
83
+ if (remoteIdModel) {
84
+ if (!alreadyLinkedOpaqueIds.has(remoteIdModel.id)) {
85
+ // Link the existing identifier to this bundle.
86
+ linkedIds.push(remoteIdModel.attributes.identifier);
87
+ capabilityIdOpaqueIds.push(remoteIdModel.id);
88
+ }
89
+ continue;
90
+ }
66
91
  if (log_1.default.isDebug) {
67
92
  log_1.default.log(`Creating capability ID: ${localId} (${CapabilityModel.type})`);
68
93
  }
@@ -1,3 +1,16 @@
1
1
  import { CombinedError as GraphqlError, OperationResult } from '@urql/core';
2
+ export declare const EAS_CLI_UPGRADE_REQUIRED_ERROR_CODE = "EAS_CLI_UPGRADE_REQUIRED";
2
3
  export declare function withErrorHandlingAsync<T>(promise: Promise<OperationResult<T>>): Promise<T>;
4
+ /**
5
+ * Wraps `withErrorHandlingAsync` for queries that hit endpoints which may evolve in
6
+ * ways that require a newer eas-cli. The server signals this by returning a GraphQL
7
+ * error with `extensions.errorCode === EAS_CLI_UPGRADE_REQUIRED`. As a fallback we
8
+ * also detect schema validation errors of the form `Cannot query field "X" on type "Y"`,
9
+ * which surface when a field has been removed without a coded error.
10
+ *
11
+ * In either case we re-throw an `EasCommandError` instructing the user to upgrade.
12
+ */
13
+ export declare function withUpgradeRequiredErrorHandlingAsync<T>(promise: Promise<OperationResult<T>>, { featureName }: {
14
+ featureName: string;
15
+ }): Promise<T>;
3
16
  export { GraphqlError };
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GraphqlError = void 0;
3
+ exports.GraphqlError = exports.EAS_CLI_UPGRADE_REQUIRED_ERROR_CODE = void 0;
4
4
  exports.withErrorHandlingAsync = withErrorHandlingAsync;
5
+ exports.withUpgradeRequiredErrorHandlingAsync = withUpgradeRequiredErrorHandlingAsync;
5
6
  const tslib_1 = require("tslib");
6
7
  const core_1 = require("@urql/core");
7
8
  Object.defineProperty(exports, "GraphqlError", { enumerable: true, get: function () { return core_1.CombinedError; } });
9
+ const errors_1 = require("../commandUtils/errors");
8
10
  const log_1 = tslib_1.__importDefault(require("../log"));
11
+ exports.EAS_CLI_UPGRADE_REQUIRED_ERROR_CODE = 'EAS_CLI_UPGRADE_REQUIRED';
9
12
  async function withErrorHandlingAsync(promise) {
10
13
  const { data, error } = await promise;
11
14
  if (error) {
@@ -25,3 +28,35 @@ async function withErrorHandlingAsync(promise) {
25
28
  }
26
29
  return data;
27
30
  }
31
+ /**
32
+ * Wraps `withErrorHandlingAsync` for queries that hit endpoints which may evolve in
33
+ * ways that require a newer eas-cli. The server signals this by returning a GraphQL
34
+ * error with `extensions.errorCode === EAS_CLI_UPGRADE_REQUIRED`. As a fallback we
35
+ * also detect schema validation errors of the form `Cannot query field "X" on type "Y"`,
36
+ * which surface when a field has been removed without a coded error.
37
+ *
38
+ * In either case we re-throw an `EasCommandError` instructing the user to upgrade.
39
+ */
40
+ async function withUpgradeRequiredErrorHandlingAsync(promise, { featureName }) {
41
+ try {
42
+ return await withErrorHandlingAsync(promise);
43
+ }
44
+ catch (error) {
45
+ if (isUpgradeRequiredError(error)) {
46
+ throw new errors_1.EasCommandError(`${featureName} is not supported by this version of eas-cli. ` +
47
+ `Upgrade to the latest version: \`npm install -g eas-cli@latest\`.`);
48
+ }
49
+ throw error;
50
+ }
51
+ }
52
+ function isUpgradeRequiredError(error) {
53
+ if (!(error instanceof core_1.CombinedError)) {
54
+ return false;
55
+ }
56
+ return error.graphQLErrors.some(e => {
57
+ if (e?.extensions?.errorCode === exports.EAS_CLI_UPGRADE_REQUIRED_ERROR_CODE) {
58
+ return true;
59
+ }
60
+ return /Cannot query field ".+" on type ".+"/.test(e?.message ?? '');
61
+ });
62
+ }
@@ -616,6 +616,8 @@ export type AccountMutation = {
616
616
  cancelAllSubscriptionsImmediately: Account;
617
617
  /** Cancel scheduled subscription change */
618
618
  cancelScheduledSubscriptionChange: Account;
619
+ /** Buys or revokes account's additional agent credits, charging the account the appropriate amount if needed. */
620
+ changeAdditionalAgentCreditsCount: Account;
619
621
  /** Buys or revokes account's additional concurrencies, charging the account the appropriate amount if needed. */
620
622
  changeAdditionalConcurrenciesCount: Account;
621
623
  /** Upgrades or downgrades the active subscription to the newPlanIdentifier, which must be one of the EAS plans (i.e., Production or Enterprise). */
@@ -650,6 +652,10 @@ export type AccountMutationCancelAllSubscriptionsImmediatelyArgs = {
650
652
  export type AccountMutationCancelScheduledSubscriptionChangeArgs = {
651
653
  accountID: Scalars['ID']['input'];
652
654
  };
655
+ export type AccountMutationChangeAdditionalAgentCreditsCountArgs = {
656
+ accountID: Scalars['ID']['input'];
657
+ newAdditionalAgentCreditsCount: Scalars['Int']['input'];
658
+ };
653
659
  export type AccountMutationChangeAdditionalConcurrenciesCountArgs = {
654
660
  accountID: Scalars['ID']['input'];
655
661
  newAdditionalConcurrenciesCount: Scalars['Int']['input'];
@@ -716,8 +722,11 @@ export type AccountNotificationPreferenceInput = {
716
722
  export type AccountOnboardingStats = {
717
723
  __typename?: 'AccountOnboardingStats';
718
724
  firstBuildCompletedAt?: Maybe<Scalars['DateTime']['output']>;
725
+ firstProjectCreatedAt?: Maybe<Scalars['DateTime']['output']>;
719
726
  firstSubmissionCompletedAt?: Maybe<Scalars['DateTime']['output']>;
727
+ firstUpdateCreatedAt?: Maybe<Scalars['DateTime']['output']>;
720
728
  hasConfiguredUpdate: Scalars['Boolean']['output'];
729
+ hasConfiguredWorkflow: Scalars['Boolean']['output'];
721
730
  hasTeamMembers: Scalars['Boolean']['output'];
722
731
  };
723
732
  export type AccountQuery = {
@@ -3469,6 +3478,7 @@ export type ConvexTeamConnectionMutation = {
3469
3478
  __typename?: 'ConvexTeamConnectionMutation';
3470
3479
  createConvexTeamConnection: ConvexTeamConnection;
3471
3480
  deleteConvexTeamConnection: ConvexTeamConnection;
3481
+ sendConvexTeamInviteToVerifiedEmail: Scalars['Boolean']['output'];
3472
3482
  };
3473
3483
  export type ConvexTeamConnectionMutationCreateConvexTeamConnectionArgs = {
3474
3484
  convexTeamConnectionData: CreateConvexTeamConnectionInput;
@@ -3476,6 +3486,9 @@ export type ConvexTeamConnectionMutationCreateConvexTeamConnectionArgs = {
3476
3486
  export type ConvexTeamConnectionMutationDeleteConvexTeamConnectionArgs = {
3477
3487
  convexTeamConnectionId: Scalars['ID']['input'];
3478
3488
  };
3489
+ export type ConvexTeamConnectionMutationSendConvexTeamInviteToVerifiedEmailArgs = {
3490
+ input: SendConvexTeamInviteToVerifiedEmailInput;
3491
+ };
3479
3492
  export declare enum CrashSampleFor {
3480
3493
  Newest = "NEWEST",
3481
3494
  Oldest = "OLDEST"
@@ -3561,6 +3574,13 @@ export type CreateEchoMessagePartInput = {
3561
3574
  index?: InputMaybe<Scalars['Int']['input']>;
3562
3575
  type: EchoMessagePartType;
3563
3576
  };
3577
+ export type CreateEchoProjectIconInput = {
3578
+ accentColor?: InputMaybe<Scalars['String']['input']>;
3579
+ model?: InputMaybe<Scalars['String']['input']>;
3580
+ prompt?: InputMaybe<Scalars['String']['input']>;
3581
+ source: EchoProjectIconSource;
3582
+ url: Scalars['String']['input'];
3583
+ };
3564
3584
  export type CreateEchoProjectInput = {
3565
3585
  accountId: Scalars['ID']['input'];
3566
3586
  currentPreviewEchoVersionId?: InputMaybe<Scalars['ID']['input']>;
@@ -4295,6 +4315,7 @@ export type EchoProject = {
4295
4315
  description?: Maybe<Scalars['String']['output']>;
4296
4316
  displayName?: Maybe<Scalars['String']['output']>;
4297
4317
  echoChats: EchoChatConnection;
4318
+ echoProjectIcon?: Maybe<EchoProjectIconGalleryItem>;
4298
4319
  echoVersions: EchoVersionConnection;
4299
4320
  /** Environment variables for this Echo project */
4300
4321
  environmentVariables: Array<EnvironmentVariable>;
@@ -4305,6 +4326,7 @@ export type EchoProject = {
4305
4326
  environmentVariablesIncludingSensitive: Array<EnvironmentVariableWithSecret>;
4306
4327
  githubInfo?: Maybe<EchoProjectGithubInfo>;
4307
4328
  icon?: Maybe<EchoProjectIcon>;
4329
+ iconGallery: Array<EchoProjectIconGalleryItem>;
4308
4330
  id: Scalars['ID']['output'];
4309
4331
  images: Array<EchoProjectImage>;
4310
4332
  initFromEchoProject?: Maybe<EchoProject>;
@@ -4363,10 +4385,24 @@ export type EchoProjectIcon = {
4363
4385
  accentColor?: Maybe<Scalars['String']['output']>;
4364
4386
  url: Scalars['String']['output'];
4365
4387
  };
4388
+ export type EchoProjectIconGalleryItem = {
4389
+ __typename?: 'EchoProjectIconGalleryItem';
4390
+ accentColor?: Maybe<Scalars['String']['output']>;
4391
+ createdAt: Scalars['DateTime']['output'];
4392
+ id: Scalars['ID']['output'];
4393
+ model?: Maybe<Scalars['String']['output']>;
4394
+ prompt?: Maybe<Scalars['String']['output']>;
4395
+ source: EchoProjectIconSource;
4396
+ url: Scalars['String']['output'];
4397
+ };
4366
4398
  export type EchoProjectIconInput = {
4367
4399
  accentColor?: InputMaybe<Scalars['String']['input']>;
4368
4400
  url: Scalars['String']['input'];
4369
4401
  };
4402
+ export declare enum EchoProjectIconSource {
4403
+ AiGenerated = "AI_GENERATED",
4404
+ UserUploaded = "USER_UPLOADED"
4405
+ }
4370
4406
  export type EchoProjectImage = {
4371
4407
  __typename?: 'EchoProjectImage';
4372
4408
  createdAt: Scalars['DateTime']['output'];
@@ -4377,17 +4413,38 @@ export type EchoProjectMutation = {
4377
4413
  __typename?: 'EchoProjectMutation';
4378
4414
  /** Create a new Echo project */
4379
4415
  createEchoProject: EchoProject;
4416
+ /**
4417
+ * Add one or more icons to the project's icon gallery.
4418
+ * Used for both AI-generated batches and user uploads.
4419
+ */
4420
+ createEchoProjectIcons: Array<EchoProjectIconGalleryItem>;
4380
4421
  /** Delete an Echo project by ID */
4381
4422
  deleteEchoProject: EchoProject;
4423
+ /** Delete an icon from the gallery. If it is the active icon, clears the project's icon. */
4424
+ deleteEchoProjectIcon: EchoProjectIconGalleryItem;
4425
+ /** Select an icon from the gallery as the project's active icon. */
4426
+ selectEchoProjectIcon: EchoProject;
4382
4427
  /** Update an Echo project */
4383
4428
  updateEchoProject: EchoProject;
4384
4429
  };
4385
4430
  export type EchoProjectMutationCreateEchoProjectArgs = {
4386
4431
  input: CreateEchoProjectInput;
4387
4432
  };
4433
+ export type EchoProjectMutationCreateEchoProjectIconsArgs = {
4434
+ echoProjectId: Scalars['ID']['input'];
4435
+ icons: Array<CreateEchoProjectIconInput>;
4436
+ };
4388
4437
  export type EchoProjectMutationDeleteEchoProjectArgs = {
4389
4438
  id: Scalars['ID']['input'];
4390
4439
  };
4440
+ export type EchoProjectMutationDeleteEchoProjectIconArgs = {
4441
+ echoProjectIconId: Scalars['ID']['input'];
4442
+ echoProjectId: Scalars['ID']['input'];
4443
+ };
4444
+ export type EchoProjectMutationSelectEchoProjectIconArgs = {
4445
+ echoProjectIconId: Scalars['ID']['input'];
4446
+ echoProjectId: Scalars['ID']['input'];
4447
+ };
4391
4448
  export type EchoProjectMutationUpdateEchoProjectArgs = {
4392
4449
  id: Scalars['ID']['input'];
4393
4450
  input: UpdateEchoProjectInput;
@@ -4465,6 +4522,7 @@ export type EchoRepositoryResult = {
4465
4522
  name: Scalars['String']['output'];
4466
4523
  nodeIdentifier: Scalars['String']['output'];
4467
4524
  owner: Scalars['String']['output'];
4525
+ status: Scalars['String']['output'];
4468
4526
  url: Scalars['String']['output'];
4469
4527
  };
4470
4528
  export type EchoTurn = {
@@ -5352,6 +5410,8 @@ export type InvoicePeriod = {
5352
5410
  };
5353
5411
  export type InvoiceQuery = {
5354
5412
  __typename?: 'InvoiceQuery';
5413
+ /** Previews the invoice for the specified number of additional agent credit units. */
5414
+ previewInvoiceForAdditionalAgentCreditsCountUpdate?: Maybe<Invoice>;
5355
5415
  /**
5356
5416
  * Previews the invoice for the specified number of additional concurrencies.
5357
5417
  * This is the total number of concurrencies the customer wishes to purchase
@@ -5363,6 +5423,10 @@ export type InvoiceQuery = {
5363
5423
  /** Preview an upgrade subscription invoice, with proration */
5364
5424
  previewInvoiceForSubscriptionUpdate: Invoice;
5365
5425
  };
5426
+ export type InvoiceQueryPreviewInvoiceForAdditionalAgentCreditsCountUpdateArgs = {
5427
+ accountID: Scalars['ID']['input'];
5428
+ additionalAgentCreditsCount: Scalars['Int']['input'];
5429
+ };
5366
5430
  export type InvoiceQueryPreviewInvoiceForAdditionalConcurrenciesCountUpdateArgs = {
5367
5431
  accountID: Scalars['ID']['input'];
5368
5432
  additionalConcurrenciesCount: Scalars['Int']['input'];
@@ -5958,10 +6022,12 @@ export type OAuthIdentity = {
5958
6022
  __typename?: 'OAuthIdentity';
5959
6023
  email: Scalars['String']['output'];
5960
6024
  id: Scalars['ID']['output'];
6025
+ login?: Maybe<Scalars['String']['output']>;
5961
6026
  provider: OAuthProvider;
5962
6027
  };
5963
6028
  export declare enum OAuthProvider {
5964
6029
  Apple = "apple",
6030
+ Github = "github",
5965
6031
  Google = "google"
5966
6032
  }
5967
6033
  export type Offer = {
@@ -6723,6 +6789,7 @@ export type SsoUser = Actor & UserActor & {
6723
6789
  /** Associated accounts */
6724
6790
  primaryAccount: Account;
6725
6791
  primaryAccountProfileImageUrl?: Maybe<Scalars['String']['output']>;
6792
+ /** @deprecated Use primaryAccountProfileImageUrl instead */
6726
6793
  profilePhoto: Scalars['String']['output'];
6727
6794
  /** Snacks associated with this account */
6728
6795
  snacks: Array<Snack>;
@@ -6794,6 +6861,9 @@ export type SecondFactorRegenerateBackupCodesResult = {
6794
6861
  __typename?: 'SecondFactorRegenerateBackupCodesResult';
6795
6862
  plaintextBackupCodes: Array<Scalars['String']['output']>;
6796
6863
  };
6864
+ export type SendConvexTeamInviteToVerifiedEmailInput = {
6865
+ convexTeamConnectionId: Scalars['ID']['input'];
6866
+ };
6797
6867
  export type SentryInstallation = {
6798
6868
  __typename?: 'SentryInstallation';
6799
6869
  account: Account;
@@ -7768,6 +7838,7 @@ export type User = Actor & UserActor & {
7768
7838
  /** Associated accounts */
7769
7839
  primaryAccount: Account;
7770
7840
  primaryAccountProfileImageUrl?: Maybe<Scalars['String']['output']>;
7841
+ /** @deprecated Use primaryAccountProfileImageUrl instead */
7771
7842
  profilePhoto: Scalars['String']['output'];
7772
7843
  /** Get all certified second factor authentication methods */
7773
7844
  secondFactorDevices: Array<UserSecondFactorDevice>;
@@ -7860,6 +7931,7 @@ export type UserActor = {
7860
7931
  /** Associated accounts */
7861
7932
  primaryAccount: Account;
7862
7933
  primaryAccountProfileImageUrl?: Maybe<Scalars['String']['output']>;
7934
+ /** @deprecated Use primaryAccountProfileImageUrl instead */
7863
7935
  profilePhoto: Scalars['String']['output'];
7864
7936
  /** Snacks associated with this user's personal account */
7865
7937
  snacks: Array<Snack>;
@@ -15569,6 +15641,77 @@ export type ViewBuildsOnAppQuery = {
15569
15641
  };
15570
15642
  };
15571
15643
  };
15644
+ export type ViewChannelRuntimeInsightsOnAppQueryVariables = Exact<{
15645
+ appId: Scalars['String']['input'];
15646
+ channelName: Scalars['String']['input'];
15647
+ runtimeVersion: Scalars['String']['input'];
15648
+ timespan: InsightsTimespan;
15649
+ }>;
15650
+ export type ViewChannelRuntimeInsightsOnAppQuery = {
15651
+ __typename?: 'RootQuery';
15652
+ app: {
15653
+ __typename?: 'AppQuery';
15654
+ byId: {
15655
+ __typename?: 'App';
15656
+ id: string;
15657
+ updateChannelByName?: {
15658
+ __typename?: 'UpdateChannel';
15659
+ id: string;
15660
+ name: string;
15661
+ runtimeInsights: {
15662
+ __typename?: 'UpdateChannelRuntimeInsights';
15663
+ id: string;
15664
+ embeddedUpdateTotalUniqueUsers: number;
15665
+ mostPopularUpdates: Array<{
15666
+ __typename?: 'Update';
15667
+ id: string;
15668
+ group: string;
15669
+ message?: string | null;
15670
+ runtimeVersion: string;
15671
+ platform: string;
15672
+ insights: {
15673
+ __typename?: 'UpdateInsights';
15674
+ id: string;
15675
+ totalUniqueUsers: number;
15676
+ };
15677
+ }>;
15678
+ uniqueUsersOverTime: {
15679
+ __typename?: 'UniqueUsersOverTimeData';
15680
+ data: {
15681
+ __typename?: 'LineChartData';
15682
+ labels: Array<string>;
15683
+ datasets: Array<{
15684
+ __typename?: 'LineDataset';
15685
+ id: string;
15686
+ label: string;
15687
+ data: Array<number | null>;
15688
+ }>;
15689
+ };
15690
+ };
15691
+ cumulativeMetricsOverTime: {
15692
+ __typename?: 'ChannelRuntimeCumulativeMetricsOverTimeData';
15693
+ data: {
15694
+ __typename?: 'LineChartData';
15695
+ labels: Array<string>;
15696
+ datasets: Array<{
15697
+ __typename?: 'LineDataset';
15698
+ id: string;
15699
+ label: string;
15700
+ data: Array<number | null>;
15701
+ }>;
15702
+ };
15703
+ metricsAtLastTimestamp: Array<{
15704
+ __typename?: 'LineDatapoint';
15705
+ id: string;
15706
+ label: string;
15707
+ data: number;
15708
+ }>;
15709
+ };
15710
+ };
15711
+ } | null;
15712
+ };
15713
+ };
15714
+ };
15572
15715
  export type ViewUpdateChannelBasicInfoOnAppQueryVariables = Exact<{
15573
15716
  appId: Scalars['String']['input'];
15574
15717
  channelName: Scalars['String']['input'];
@@ -16244,6 +16387,7 @@ export type AppObserveEventsQuery = {
16244
16387
  countryCode?: string | null;
16245
16388
  sessionId?: string | null;
16246
16389
  easClientId: string;
16390
+ customParams?: any | null;
16247
16391
  };
16248
16392
  }>;
16249
16393
  };
@@ -16440,6 +16584,54 @@ export type GetAllSubmissionsForAppQuery = {
16440
16584
  };
16441
16585
  };
16442
16586
  };
16587
+ export type ViewUpdateGroupInsightsQueryVariables = Exact<{
16588
+ groupId: Scalars['ID']['input'];
16589
+ timespan: InsightsTimespan;
16590
+ }>;
16591
+ export type ViewUpdateGroupInsightsQuery = {
16592
+ __typename?: 'RootQuery';
16593
+ updatesByGroup: Array<{
16594
+ __typename?: 'Update';
16595
+ id: string;
16596
+ platform: string;
16597
+ insights: {
16598
+ __typename?: 'UpdateInsights';
16599
+ id: string;
16600
+ totalUniqueUsers: number;
16601
+ cumulativeAverageMetrics: {
16602
+ __typename?: 'CumulativeAverageMetrics';
16603
+ launchAssetCount: number;
16604
+ averageUpdatePayloadBytes: number;
16605
+ };
16606
+ cumulativeMetrics: {
16607
+ __typename?: 'CumulativeMetrics';
16608
+ metricsAtLastTimestamp: {
16609
+ __typename?: 'CumulativeMetricsTotals';
16610
+ totalInstalls: number;
16611
+ totalFailedInstalls: number;
16612
+ };
16613
+ data: {
16614
+ __typename?: 'UpdatesMetricsData';
16615
+ labels: Array<string>;
16616
+ installsDataset: {
16617
+ __typename?: 'CumulativeUpdatesDataset';
16618
+ id: string;
16619
+ label: string;
16620
+ cumulative: Array<number>;
16621
+ difference: Array<number>;
16622
+ };
16623
+ failedInstallsDataset: {
16624
+ __typename?: 'CumulativeUpdatesDataset';
16625
+ id: string;
16626
+ label: string;
16627
+ cumulative: Array<number>;
16628
+ difference: Array<number>;
16629
+ };
16630
+ };
16631
+ };
16632
+ };
16633
+ }>;
16634
+ };
16443
16635
  export type ViewUpdatesByGroupQueryVariables = Exact<{
16444
16636
  groupId: Scalars['ID']['input'];
16445
16637
  }>;
@@ -18145,6 +18337,7 @@ export type AppObserveEventFragment = {
18145
18337
  countryCode?: string | null;
18146
18338
  sessionId?: string | null;
18147
18339
  easClientId: string;
18340
+ customParams?: any | null;
18148
18341
  };
18149
18342
  export type AppObserveAppVersionFragment = {
18150
18343
  __typename?: 'AppObserveAppVersion';
@@ -7,8 +7,8 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.EasServiceMetric = exports.EasService = exports.EasBuildWaiverType = exports.EasBuildDeprecationInfoType = exports.EasBuildBillingResourceClass = exports.DistributionType = 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.ResponseStatusType = exports.ResponseCacheStatus = exports.ResourceClassExperiment = 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.EchoMessageRole = exports.EchoMessagePartType = exports.EchoChatState = exports.EchoChangeType = exports.EchoBuildStatus = exports.EchoAgentType = exports.EasTotalPlanEnablementUnit = 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 = void 0;
10
+ exports.ResponseCacheStatus = exports.ResourceClassExperiment = 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 = 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 = void 0;
12
12
  var AccountAppsSortByField;
13
13
  (function (AccountAppsSortByField) {
14
14
  AccountAppsSortByField["LatestActivityTime"] = "LATEST_ACTIVITY_TIME";
@@ -457,6 +457,11 @@ var EchoMessageRole;
457
457
  EchoMessageRole["Assistant"] = "ASSISTANT";
458
458
  EchoMessageRole["User"] = "USER";
459
459
  })(EchoMessageRole || (exports.EchoMessageRole = EchoMessageRole = {}));
460
+ var EchoProjectIconSource;
461
+ (function (EchoProjectIconSource) {
462
+ EchoProjectIconSource["AiGenerated"] = "AI_GENERATED";
463
+ EchoProjectIconSource["UserUploaded"] = "USER_UPLOADED";
464
+ })(EchoProjectIconSource || (exports.EchoProjectIconSource = EchoProjectIconSource = {}));
460
465
  var EchoProjectUploadSessionType;
461
466
  (function (EchoProjectUploadSessionType) {
462
467
  EchoProjectUploadSessionType["ImageUpload"] = "IMAGE_UPLOAD";
@@ -660,6 +665,7 @@ var NotificationType;
660
665
  var OAuthProvider;
661
666
  (function (OAuthProvider) {
662
667
  OAuthProvider["Apple"] = "apple";
668
+ OAuthProvider["Github"] = "github";
663
669
  OAuthProvider["Google"] = "google";
664
670
  })(OAuthProvider || (exports.OAuthProvider = OAuthProvider = {}));
665
671
  var OfferType;
@@ -0,0 +1,12 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { ViewChannelRuntimeInsightsOnAppQuery } from '../generated';
3
+ export type ChannelRuntimeInsights = NonNullable<ViewChannelRuntimeInsightsOnAppQuery['app']['byId']['updateChannelByName']>['runtimeInsights'];
4
+ export declare const ChannelInsightsQuery: {
5
+ viewChannelRuntimeInsightsAsync(graphqlClient: ExpoGraphqlClient, { appId, channelName, runtimeVersion, startTime, endTime, }: {
6
+ appId: string;
7
+ channelName: string;
8
+ runtimeVersion: string;
9
+ startTime: string;
10
+ endTime: string;
11
+ }): Promise<ChannelRuntimeInsights>;
12
+ };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChannelInsightsQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
+ const errors_1 = require("../../channel/errors");
7
+ const client_1 = require("../client");
8
+ exports.ChannelInsightsQuery = {
9
+ async viewChannelRuntimeInsightsAsync(graphqlClient, { appId, channelName, runtimeVersion, startTime, endTime, }) {
10
+ const data = await (0, client_1.withUpgradeRequiredErrorHandlingAsync)(graphqlClient
11
+ .query((0, graphql_tag_1.default) `
12
+ query ViewChannelRuntimeInsightsOnApp(
13
+ $appId: String!
14
+ $channelName: String!
15
+ $runtimeVersion: String!
16
+ $timespan: InsightsTimespan!
17
+ ) {
18
+ app {
19
+ byId(appId: $appId) {
20
+ id
21
+ updateChannelByName(name: $channelName) {
22
+ id
23
+ name
24
+ runtimeInsights {
25
+ id
26
+ embeddedUpdateTotalUniqueUsers(runtimeVersion: $runtimeVersion, timespan: $timespan)
27
+ mostPopularUpdates(runtimeVersion: $runtimeVersion, timespan: $timespan) {
28
+ id
29
+ group
30
+ message
31
+ runtimeVersion
32
+ platform
33
+ insights {
34
+ id
35
+ totalUniqueUsers(timespan: $timespan)
36
+ }
37
+ }
38
+ uniqueUsersOverTime(runtimeVersion: $runtimeVersion, timespan: $timespan) {
39
+ data {
40
+ labels
41
+ datasets {
42
+ id
43
+ label
44
+ data
45
+ }
46
+ }
47
+ }
48
+ cumulativeMetricsOverTime(runtimeVersion: $runtimeVersion, timespan: $timespan) {
49
+ data {
50
+ labels
51
+ datasets {
52
+ id
53
+ label
54
+ data
55
+ }
56
+ }
57
+ metricsAtLastTimestamp {
58
+ id
59
+ label
60
+ data
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ `, {
69
+ appId,
70
+ channelName,
71
+ runtimeVersion,
72
+ timespan: { start: startTime, end: endTime },
73
+ }, { additionalTypenames: ['UpdateChannel', 'Update', 'UpdateChannelRuntimeInsights'] })
74
+ .toPromise(), { featureName: 'EAS Update channel insights' });
75
+ const updateChannel = data.app.byId.updateChannelByName;
76
+ if (!updateChannel) {
77
+ throw new errors_1.ChannelNotFoundError(`Could not find channel with the name ${channelName}`);
78
+ }
79
+ return updateChannel.runtimeInsights;
80
+ },
81
+ };
@@ -0,0 +1,10 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { ViewUpdateGroupInsightsQuery } from '../generated';
3
+ export type UpdateWithInsightsObject = ViewUpdateGroupInsightsQuery['updatesByGroup'][number];
4
+ export declare const UpdateInsightsQuery: {
5
+ viewUpdateGroupInsightsAsync(graphqlClient: ExpoGraphqlClient, { groupId, startTime, endTime }: {
6
+ groupId: string;
7
+ startTime: string;
8
+ endTime: string;
9
+ }): Promise<UpdateWithInsightsObject[]>;
10
+ };