eas-cli 20.1.0 → 20.2.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.
@@ -1,8 +1,9 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { UpdateByIdQueryVariables, UpdateFragment, ViewUpdateGroupsOnAppQueryVariables, ViewUpdateGroupsOnBranchQueryVariables, ViewUpdatesByGroupQueryVariables } from '../generated';
2
+ import { UpdateByIdQueryVariables, UpdateFragment, ViewUpdateGroupsOnAppQueryVariables, ViewUpdateGroupsOnBranchQueryVariables, ViewUpdateGroupsPaginatedOnBranchQueryVariables, ViewUpdatesByGroupQueryVariables } from '../generated';
3
3
  export declare const UpdateQuery: {
4
4
  viewUpdateGroupAsync(graphqlClient: ExpoGraphqlClient, { groupId }: ViewUpdatesByGroupQueryVariables): Promise<UpdateFragment[]>;
5
5
  viewUpdateGroupsOnBranchAsync(graphqlClient: ExpoGraphqlClient, { limit, offset, appId, branchName, filter }: ViewUpdateGroupsOnBranchQueryVariables): Promise<UpdateFragment[][]>;
6
+ viewUpdateGroupsPaginatedOnBranchAsync(graphqlClient: ExpoGraphqlClient, { appId, branchName, first, last, after, before, filter, }: ViewUpdateGroupsPaginatedOnBranchQueryVariables): Promise<UpdateFragment[][]>;
6
7
  viewUpdateGroupsOnAppAsync(graphqlClient: ExpoGraphqlClient, { limit, offset, appId, filter }: ViewUpdateGroupsOnAppQueryVariables): Promise<UpdateFragment[][]>;
7
8
  viewByUpdateAsync(graphqlClient: ExpoGraphqlClient, { updateId }: UpdateByIdQueryVariables): Promise<UpdateFragment>;
8
9
  };
@@ -64,6 +64,58 @@ exports.UpdateQuery = {
64
64
  }
65
65
  return branch.updateGroups;
66
66
  },
67
+ async viewUpdateGroupsPaginatedOnBranchAsync(graphqlClient, { appId, branchName, first, last, after, before, filter, }) {
68
+ const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
69
+ .query((0, graphql_tag_1.default) `
70
+ query ViewUpdateGroupsPaginatedOnBranch(
71
+ $appId: String!
72
+ $branchName: String!
73
+ $first: Int
74
+ $last: Int
75
+ $after: String
76
+ $before: String
77
+ $filter: UpdatesFilterV2
78
+ ) {
79
+ app {
80
+ byId(appId: $appId) {
81
+ id
82
+ updateBranchByName(name: $branchName) {
83
+ id
84
+ updateGroupsPaginated(
85
+ first: $first
86
+ last: $last
87
+ after: $after
88
+ before: $before
89
+ filter: $filter
90
+ ) {
91
+ edges {
92
+ node {
93
+ id
94
+ ...UpdateFragment
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
102
+ ${(0, graphql_1.print)(Update_1.UpdateFragmentNode)}
103
+ `, {
104
+ appId,
105
+ branchName,
106
+ first,
107
+ last,
108
+ after,
109
+ before,
110
+ filter,
111
+ }, { additionalTypenames: ['Update'] })
112
+ .toPromise());
113
+ const branch = response.app.byId.updateBranchByName;
114
+ if (!branch) {
115
+ throw new Error(`Could not find branch "${branchName}"`);
116
+ }
117
+ return branch.updateGroupsPaginated.edges.map(edge => edge.node);
118
+ },
67
119
  async viewUpdateGroupsOnAppAsync(graphqlClient, { limit, offset, appId, filter }) {
68
120
  const response = await (0, client_1.withErrorHandlingAsync)(graphqlClient
69
121
  .query((0, graphql_tag_1.default) `