eas-cli 23.1.0 → 24.0.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 (126) hide show
  1. package/README.md +424 -226
  2. package/build/api.d.ts +1 -0
  3. package/build/api.js +12 -0
  4. package/build/build/utils/url.d.ts +1 -0
  5. package/build/build/utils/url.js +4 -0
  6. package/build/channel/protection.d.ts +4 -0
  7. package/build/channel/protection.js +49 -0
  8. package/build/channel/queries.d.ts +6 -0
  9. package/build/channel/queries.js +5 -1
  10. package/build/commandUtils/workflow/logs/fetchLogs.d.ts +5 -0
  11. package/build/commandUtils/workflow/logs/fetchLogs.js +24 -0
  12. package/build/commandUtils/workflow/logs/parseLogs.d.ts +14 -0
  13. package/build/commandUtils/workflow/logs/parseLogs.js +69 -0
  14. package/build/commandUtils/workflow/logs/watcher.d.ts +32 -0
  15. package/build/commandUtils/workflow/logs/watcher.js +162 -0
  16. package/build/commandUtils/workflow/stateMachine.js +2 -1
  17. package/build/commandUtils/workflow/types.d.ts +12 -5
  18. package/build/commandUtils/workflow/utils.d.ts +9 -5
  19. package/build/commandUtils/workflow/utils.js +144 -146
  20. package/build/commands/channel/protect.d.ts +16 -0
  21. package/build/commands/channel/protect.js +68 -0
  22. package/build/commands/channel/unprotect.d.ts +16 -0
  23. package/build/commands/channel/unprotect.js +78 -0
  24. package/build/commands/observe/errors.d.ts +27 -0
  25. package/build/commands/observe/errors.js +122 -0
  26. package/build/commands/observe/event.d.ts +18 -0
  27. package/build/commands/observe/event.js +149 -0
  28. package/build/commands/observe/events.d.ts +2 -0
  29. package/build/commands/observe/events.js +10 -4
  30. package/build/commands/observe/metrics-summary.d.ts +1 -0
  31. package/build/commands/observe/metrics-summary.js +3 -2
  32. package/build/commands/observe/metrics.d.ts +2 -0
  33. package/build/commands/observe/metrics.js +8 -4
  34. package/build/commands/observe/routes.d.ts +2 -1
  35. package/build/commands/observe/routes.js +5 -5
  36. package/build/commands/observe/session.d.ts +1 -0
  37. package/build/commands/observe/session.js +14 -8
  38. package/build/commands/observe/versions.d.ts +1 -0
  39. package/build/commands/observe/versions.js +3 -2
  40. package/build/commands/project/status.d.ts +16 -0
  41. package/build/commands/project/status.js +47 -0
  42. package/build/commands/simulator/get.js +5 -1
  43. package/build/commands/simulator/index.d.ts +1 -0
  44. package/build/commands/simulator/index.js +16 -2
  45. package/build/commands/simulator/list.d.ts +1 -0
  46. package/build/commands/simulator/list.js +9 -0
  47. package/build/commands/workflow/run.d.ts +8 -0
  48. package/build/commands/workflow/run.js +27 -0
  49. package/build/commands/workflow/ssh.d.ts +31 -0
  50. package/build/commands/workflow/ssh.js +190 -0
  51. package/build/credentials/ios/credentials.d.ts +5 -3
  52. package/build/credentials/ios/utils/printCredentials.js +6 -1
  53. package/build/graphql/generated.d.ts +2474 -1079
  54. package/build/graphql/generated.js +71 -16
  55. package/build/graphql/mutations/RealtimeLogsMutation.d.ts +6 -0
  56. package/build/graphql/mutations/RealtimeLogsMutation.js +40 -0
  57. package/build/graphql/mutations/WorkflowRunMutation.d.ts +3 -2
  58. package/build/graphql/mutations/WorkflowRunMutation.js +4 -1
  59. package/build/graphql/queries/AppStoreConnectApiKeyQuery.d.ts +1 -1
  60. package/build/graphql/queries/AppStoreConnectApiKeyQuery.js +1 -1
  61. package/build/graphql/queries/ChannelQuery.js +2 -0
  62. package/build/graphql/queries/DeviceRunSessionQuery.js +10 -0
  63. package/build/graphql/queries/ObserveQuery.d.ts +62 -30
  64. package/build/graphql/queries/ObserveQuery.js +276 -121
  65. package/build/graphql/queries/SubmissionQuery.d.ts +6 -1
  66. package/build/graphql/queries/SubmissionQuery.js +41 -0
  67. package/build/graphql/queries/WorkflowJobSshQuery.d.ts +20 -0
  68. package/build/graphql/queries/WorkflowJobSshQuery.js +133 -0
  69. package/build/graphql/types/Observe.d.ts +5 -3
  70. package/build/graphql/types/Observe.js +80 -21
  71. package/build/graphql/types/UpdateChannelBasicInfo.js +1 -0
  72. package/build/observe/fetchCustomEvents.d.ts +6 -4
  73. package/build/observe/fetchCustomEvents.js +4 -2
  74. package/build/observe/fetchErrors.d.ts +32 -0
  75. package/build/observe/fetchErrors.js +42 -0
  76. package/build/observe/fetchEvents.d.ts +9 -6
  77. package/build/observe/fetchEvents.js +16 -17
  78. package/build/observe/fetchMetrics.d.ts +2 -2
  79. package/build/observe/fetchMetrics.js +9 -9
  80. package/build/observe/fetchNavigationRoutes.d.ts +7 -5
  81. package/build/observe/fetchNavigationRoutes.js +8 -8
  82. package/build/observe/fetchSessions.d.ts +13 -11
  83. package/build/observe/fetchSessions.js +59 -30
  84. package/build/observe/fetchVersions.d.ts +4 -3
  85. package/build/observe/fetchVersions.js +7 -11
  86. package/build/observe/flags.d.ts +6 -0
  87. package/build/observe/flags.js +12 -2
  88. package/build/observe/formatCustomEvents.d.ts +16 -10
  89. package/build/observe/formatCustomEvents.js +61 -28
  90. package/build/observe/formatErrors.d.ts +97 -0
  91. package/build/observe/formatErrors.js +203 -0
  92. package/build/observe/formatEvents.d.ts +11 -5
  93. package/build/observe/formatEvents.js +46 -18
  94. package/build/observe/formatMetrics.d.ts +4 -4
  95. package/build/observe/formatMetrics.js +2 -2
  96. package/build/observe/formatNavigationRoutes.d.ts +4 -4
  97. package/build/observe/formatNavigationRoutes.js +3 -3
  98. package/build/observe/formatSessions.d.ts +3 -3
  99. package/build/observe/formatSessions.js +8 -8
  100. package/build/observe/formatVersions.js +2 -2
  101. package/build/observe/platforms.d.ts +10 -19
  102. package/build/observe/platforms.js +42 -40
  103. package/build/ora.d.ts +7 -0
  104. package/build/ora.js +12 -0
  105. package/build/project/projectStatus.d.ts +96 -0
  106. package/build/project/projectStatus.js +314 -0
  107. package/build/simulator/utils.d.ts +11 -0
  108. package/build/simulator/utils.js +51 -4
  109. package/build/submit/utils/urls.js +2 -3
  110. package/build/utils/centrifuge.d.ts +10 -0
  111. package/build/utils/centrifuge.js +89 -0
  112. package/build/utils/expodash/uniqBy.js +3 -2
  113. package/oclif.manifest.json +2947 -2328
  114. package/package.json +10 -7
  115. package/build/chat/chatClient.d.ts +0 -37
  116. package/build/chat/chatClient.js +0 -359
  117. package/build/chat/detectProject.d.ts +0 -5
  118. package/build/chat/detectProject.js +0 -41
  119. package/build/chat/renderMarkdown.d.ts +0 -7
  120. package/build/chat/renderMarkdown.js +0 -47
  121. package/build/chat/replInput.d.ts +0 -10
  122. package/build/chat/replInput.js +0 -52
  123. package/build/commandUtils/workflow/fetchLogs.d.ts +0 -6
  124. package/build/commandUtils/workflow/fetchLogs.js +0 -44
  125. package/build/commands/chat.d.ts +0 -18
  126. package/build/commands/chat.js +0 -221
@@ -7,89 +7,105 @@ const client_1 = require("../client");
7
7
  const graphql_1 = require("graphql");
8
8
  const Observe_1 = require("../types/Observe");
9
9
  exports.ObserveQuery = {
10
- async timeSeriesAsync(graphqlClient, { appId, metricName, platform, startTime, endTime, }) {
10
+ async appVersionsAsync(graphqlClient, { appId, platforms, startTime, endTime, metricNames, environment, }) {
11
11
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
12
12
  .query((0, graphql_tag_1.default) `
13
- query AppObserveTimeSeries(
14
- $appId: String!
15
- $input: AppObserveTimeSeriesInput!
16
- ) {
13
+ query AppObserveAppVersions($appId: String!, $input: AppObserveReleasesInput!) {
17
14
  app {
18
15
  byId(appId: $appId) {
19
16
  id
20
17
  observe {
21
- timeSeries(input: $input) {
22
- ...AppObserveTimeSeriesFragment
18
+ appVersions(input: $input) {
19
+ ...AppObserveAppVersionFragment
23
20
  }
24
21
  }
25
22
  }
26
23
  }
27
24
  }
28
25
  ${(0, graphql_1.print)(Observe_1.AppObserveAppVersionFragmentNode)}
29
- ${(0, graphql_1.print)(Observe_1.AppObserveTimeSeriesFragmentNode)}
30
26
  `, {
31
27
  appId,
32
- input: { metricName, platform, startTime, endTime },
28
+ input: {
29
+ platforms,
30
+ startTime,
31
+ endTime,
32
+ ...(metricNames && { metricNames }),
33
+ ...(environment && { environment }),
34
+ },
33
35
  })
34
36
  .toPromise());
35
- return data.app.byId.observe.timeSeries;
37
+ return data.app.byId.observe.appVersions;
36
38
  },
37
- async appVersionsAsync(graphqlClient, { appId, platform, startTime, endTime, metricNames, }) {
39
+ async eventsAsync(graphqlClient, variables) {
38
40
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
39
41
  .query((0, graphql_tag_1.default) `
40
- query AppObserveAppVersions(
42
+ query AppObserveMetricsList(
41
43
  $appId: String!
42
- $input: AppObserveReleasesInput!
44
+ $filter: AppObserveMetricsListFilter
45
+ $first: Int
46
+ $after: String
47
+ $orderBy: AppObserveMetricsListOrderBy
43
48
  ) {
44
49
  app {
45
50
  byId(appId: $appId) {
46
51
  id
47
52
  observe {
48
- appVersions(input: $input) {
49
- ...AppObserveAppVersionFragment
53
+ metrics {
54
+ list(filter: $filter, first: $first, after: $after, orderBy: $orderBy) {
55
+ pageInfo {
56
+ hasNextPage
57
+ hasPreviousPage
58
+ endCursor
59
+ }
60
+ edges {
61
+ cursor
62
+ node {
63
+ id
64
+ ...AppObserveMetricFragment
65
+ }
66
+ }
67
+ }
50
68
  }
51
69
  }
52
70
  }
53
71
  }
54
72
  }
55
- ${(0, graphql_1.print)(Observe_1.AppObserveAppVersionFragmentNode)}
56
- `, {
57
- appId,
58
- input: { platform, startTime, endTime, ...(metricNames && { metricNames }) },
59
- })
73
+ ${(0, graphql_1.print)(Observe_1.AppObserveMetricFragmentNode)}
74
+ `, variables)
60
75
  .toPromise());
61
- return data.app.byId.observe.appVersions;
76
+ const { edges, pageInfo } = data.app.byId.observe.metrics.list;
77
+ return {
78
+ events: edges.map(edge => edge.node),
79
+ pageInfo,
80
+ };
62
81
  },
63
- async eventsAsync(graphqlClient, variables) {
82
+ async customEventListAsync(graphqlClient, variables) {
64
83
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
65
84
  .query((0, graphql_tag_1.default) `
66
- query AppObserveEvents(
85
+ query AppObserveUserEventList(
67
86
  $appId: String!
68
- $filter: AppObserveEventsFilter
87
+ $filter: AppObserveUserEventListFilter
69
88
  $first: Int
70
89
  $after: String
71
- $orderBy: AppObserveEventsOrderBy
90
+ $orderBy: AppObserveUserEventListOrderBy
72
91
  ) {
73
92
  app {
74
93
  byId(appId: $appId) {
75
94
  id
76
95
  observe {
77
- events(
78
- filter: $filter
79
- first: $first
80
- after: $after
81
- orderBy: $orderBy
82
- ) {
83
- pageInfo {
84
- hasNextPage
85
- hasPreviousPage
86
- endCursor
87
- }
88
- edges {
89
- cursor
90
- node {
91
- id
92
- ...AppObserveEventFragment
96
+ userEvents {
97
+ list(filter: $filter, first: $first, after: $after, orderBy: $orderBy) {
98
+ pageInfo {
99
+ hasNextPage
100
+ hasPreviousPage
101
+ endCursor
102
+ }
103
+ edges {
104
+ cursor
105
+ node {
106
+ id
107
+ ...AppObserveUserEventFragment
108
+ }
93
109
  }
94
110
  }
95
111
  }
@@ -97,45 +113,89 @@ exports.ObserveQuery = {
97
113
  }
98
114
  }
99
115
  }
100
- ${(0, graphql_1.print)(Observe_1.AppObserveEventFragmentNode)}
116
+ ${(0, graphql_1.print)(Observe_1.AppObserveUserEventFragmentNode)}
101
117
  `, variables)
102
118
  .toPromise());
103
- const { edges, pageInfo } = data.app.byId.observe.events;
119
+ const { edges, pageInfo } = data.app.byId.observe.userEvents.list;
104
120
  return {
105
121
  events: edges.map(edge => edge.node),
106
122
  pageInfo,
107
123
  };
108
124
  },
109
- async customEventListAsync(graphqlClient, variables) {
125
+ async customEventNamesAsync(graphqlClient, { appId, startTime, endTime, platforms, environment, }) {
110
126
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
111
127
  .query((0, graphql_tag_1.default) `
112
- query AppObserveCustomEventList(
128
+ query AppObserveUserEventNames($appId: String!, $input: AppObserveUserEventNamesInput!) {
129
+ app {
130
+ byId(appId: $appId) {
131
+ id
132
+ observe {
133
+ userEvents {
134
+ names(input: $input) {
135
+ isTruncated
136
+ names {
137
+ name
138
+ count
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+ `, {
147
+ appId,
148
+ input: {
149
+ startTime,
150
+ endTime,
151
+ ...(platforms?.length && { platforms }),
152
+ ...(environment && { environment }),
153
+ },
154
+ })
155
+ .toPromise());
156
+ return data.app.byId.observe.userEvents.names;
157
+ },
158
+ async navigationRoutesAsync(graphqlClient, variables) {
159
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
160
+ .query((0, graphql_tag_1.default) `
161
+ query AppObserveNavigationRoutes(
113
162
  $appId: String!
114
- $filter: AppObserveCustomEventListFilter
163
+ $filter: AppObserveNavigationFilter!
115
164
  $first: Int
116
165
  $after: String
117
- $orderBy: AppObserveCustomEventListOrderBy
166
+ $orderBy: AppObserveNavigationOrderBy
118
167
  ) {
119
168
  app {
120
169
  byId(appId: $appId) {
121
170
  id
122
171
  observe {
123
- customEventList(
124
- filter: $filter
125
- first: $first
126
- after: $after
127
- orderBy: $orderBy
128
- ) {
129
- pageInfo {
130
- hasNextPage
131
- hasPreviousPage
132
- endCursor
133
- }
134
- edges {
135
- cursor
136
- node {
137
- id
138
- ...AppObserveCustomEventFragment
172
+ navigation {
173
+ routes(filter: $filter, first: $first, after: $after, orderBy: $orderBy) {
174
+ pageInfo {
175
+ hasNextPage
176
+ hasPreviousPage
177
+ endCursor
178
+ }
179
+ edges {
180
+ cursor
181
+ node {
182
+ routeName
183
+ coldTtr {
184
+ count
185
+ median
186
+ p90
187
+ }
188
+ warmTtr {
189
+ count
190
+ median
191
+ p90
192
+ }
193
+ tti {
194
+ count
195
+ median
196
+ p90
197
+ }
198
+ }
139
199
  }
140
200
  }
141
201
  }
@@ -143,93 +203,132 @@ exports.ObserveQuery = {
143
203
  }
144
204
  }
145
205
  }
146
- ${(0, graphql_1.print)(Observe_1.AppObserveCustomEventFragmentNode)}
147
206
  `, variables)
148
207
  .toPromise());
149
- const { edges, pageInfo } = data.app.byId.observe.customEventList;
208
+ const { edges, pageInfo } = data.app.byId.observe.navigation.routes;
150
209
  return {
151
- events: edges.map(edge => edge.node),
210
+ routes: edges.map(edge => edge.node),
152
211
  pageInfo,
153
212
  };
154
213
  },
155
- async customEventNamesAsync(graphqlClient, { appId, startTime, endTime, platform, environment, }) {
214
+ async errorGroupsAsync(graphqlClient, { appId, input }) {
156
215
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
157
216
  .query((0, graphql_tag_1.default) `
158
- query AppObserveCustomEventNames(
159
- $appId: String!
160
- $startTime: DateTime!
161
- $endTime: DateTime!
162
- $platform: AppObservePlatform
163
- $environment: String
164
- ) {
217
+ query AppObserveErrorGroups($appId: String!, $input: AppObserveErrorsGroupsInput!) {
165
218
  app {
166
219
  byId(appId: $appId) {
167
220
  id
168
221
  observe {
169
- customEventNames(
170
- startTime: $startTime
171
- endTime: $endTime
172
- platform: $platform
173
- environment: $environment
174
- ) {
175
- isTruncated
176
- names {
177
- eventName
178
- count
222
+ errors {
223
+ groups(input: $input) {
224
+ isTruncated
225
+ groups {
226
+ ...AppObserveErrorGroupFragment
227
+ }
179
228
  }
180
229
  }
181
230
  }
182
231
  }
183
232
  }
184
233
  }
185
- `, {
186
- appId,
187
- startTime,
188
- endTime,
189
- ...(platform && { platform }),
190
- ...(environment && { environment }),
191
- })
234
+ ${(0, graphql_1.print)(Observe_1.AppObserveErrorGroupFragmentNode)}
235
+ `, { appId, input })
192
236
  .toPromise());
193
- return data.app.byId.observe.customEventNames;
237
+ return data.app.byId.observe.errors.groups;
194
238
  },
195
- async navigationRoutesAsync(graphqlClient, variables) {
239
+ async errorOccurrencesAsync(graphqlClient, variables) {
196
240
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
197
241
  .query((0, graphql_tag_1.default) `
198
- query AppObserveNavigationRoutes(
242
+ query AppObserveErrorOccurrences(
199
243
  $appId: String!
200
- $filter: AppObserveNavigationRoutesFilter!
244
+ $filter: AppObserveErrorOccurrencesFilter
201
245
  $first: Int
202
246
  $after: String
203
- $orderBy: AppObserveNavigationRoutesOrderBy
247
+ $orderBy: AppObserveErrorOccurrencesOrderBy
204
248
  ) {
205
249
  app {
206
250
  byId(appId: $appId) {
207
251
  id
208
252
  observe {
209
- navigationRoutes(filter: $filter, first: $first, after: $after, orderBy: $orderBy) {
210
- pageInfo {
211
- hasNextPage
212
- hasPreviousPage
213
- endCursor
214
- }
215
- edges {
216
- cursor
217
- node {
218
- routeName
219
- coldTtr {
220
- count
221
- median
222
- p90
253
+ errors {
254
+ occurrences(
255
+ filter: $filter
256
+ first: $first
257
+ after: $after
258
+ orderBy: $orderBy
259
+ ) {
260
+ pageInfo {
261
+ hasNextPage
262
+ hasPreviousPage
263
+ endCursor
264
+ }
265
+ edges {
266
+ cursor
267
+ node {
268
+ id
269
+ ...AppObserveErrorOccurrenceFragment
223
270
  }
224
- warmTtr {
225
- count
226
- median
227
- p90
271
+ }
272
+ }
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
278
+ ${(0, graphql_1.print)(Observe_1.AppObserveErrorOccurrenceFragmentNode)}
279
+ `, variables)
280
+ .toPromise());
281
+ const { edges, pageInfo } = data.app.byId.observe.errors.occurrences;
282
+ return {
283
+ occurrences: edges.map(edge => edge.node),
284
+ pageInfo,
285
+ };
286
+ },
287
+ async sessionEventsAsync(graphqlClient, variables) {
288
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
289
+ .query((0, graphql_tag_1.default) `
290
+ query AppObserveSessionEvents(
291
+ $appId: String!
292
+ $id: ID!
293
+ $first: Int
294
+ $metricsOrderBy: AppObserveMetricsListOrderBy
295
+ $logsOrderBy: AppObserveLogsOrderBy
296
+ ) {
297
+ app {
298
+ byId(appId: $appId) {
299
+ id
300
+ observe {
301
+ session(id: $id) {
302
+ id
303
+ metrics(first: $first, orderBy: $metricsOrderBy) {
304
+ pageInfo {
305
+ hasNextPage
306
+ hasPreviousPage
307
+ endCursor
308
+ }
309
+ edges {
310
+ node {
311
+ id
312
+ ...AppObserveMetricFragment
228
313
  }
229
- tti {
230
- count
231
- median
232
- p90
314
+ }
315
+ }
316
+ logs(first: $first, orderBy: $logsOrderBy) {
317
+ pageInfo {
318
+ hasNextPage
319
+ hasPreviousPage
320
+ endCursor
321
+ }
322
+ edges {
323
+ node {
324
+ id
325
+ __typename
326
+ ... on AppObserveUserEvent {
327
+ ...AppObserveUserEventFragment
328
+ }
329
+ ... on AppObserveError {
330
+ ...AppObserveErrorFragment
331
+ }
233
332
  }
234
333
  }
235
334
  }
@@ -238,12 +337,68 @@ exports.ObserveQuery = {
238
337
  }
239
338
  }
240
339
  }
340
+ ${(0, graphql_1.print)(Observe_1.AppObserveMetricFragmentNode)}
341
+ ${(0, graphql_1.print)(Observe_1.AppObserveUserEventFragmentNode)}
342
+ ${(0, graphql_1.print)(Observe_1.AppObserveErrorFragmentNode)}
241
343
  `, variables)
242
344
  .toPromise());
243
- const { edges, pageInfo } = data.app.byId.observe.navigationRoutes;
345
+ const { metrics, logs } = data.app.byId.observe.session;
244
346
  return {
245
- routes: edges.map(edge => edge.node),
246
- pageInfo,
347
+ metrics: metrics.edges.map(edge => edge.node),
348
+ logs: logs.edges.map(edge => edge.node),
349
+ metricsPageInfo: metrics.pageInfo,
350
+ logsPageInfo: logs.pageInfo,
247
351
  };
248
352
  },
353
+ async metricByIdAsync(graphqlClient, { appId, id }) {
354
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
355
+ .query((0, graphql_tag_1.default) `
356
+ query AppObserveMetricById($appId: String!, $id: ID!) {
357
+ app {
358
+ byId(appId: $appId) {
359
+ id
360
+ observe {
361
+ metrics {
362
+ metric(id: $id) {
363
+ id
364
+ ...AppObserveMetricFragment
365
+ }
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ ${(0, graphql_1.print)(Observe_1.AppObserveMetricFragmentNode)}
372
+ `, { appId, id })
373
+ .toPromise());
374
+ return data.app.byId.observe.metrics.metric ?? null;
375
+ },
376
+ async logByIdAsync(graphqlClient, { appId, id }) {
377
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
378
+ .query((0, graphql_tag_1.default) `
379
+ query AppObserveLogById($appId: String!, $id: ID!) {
380
+ app {
381
+ byId(appId: $appId) {
382
+ id
383
+ observe {
384
+ log(id: $id) {
385
+ id
386
+ __typename
387
+ ... on AppObserveUserEvent {
388
+ ...AppObserveUserEventFragment
389
+ }
390
+ ... on AppObserveError {
391
+ ...AppObserveErrorFragment
392
+ }
393
+ }
394
+ }
395
+ }
396
+ }
397
+ }
398
+ ${(0, graphql_1.print)(Observe_1.AppObserveUserEventFragmentNode)}
399
+ ${(0, graphql_1.print)(Observe_1.AppObserveErrorFragmentNode)}
400
+ `, { appId, id })
401
+ .toPromise());
402
+ return data.app.byId.observe.log ?? null;
403
+ },
249
404
  };
@@ -1,16 +1,21 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { AppPlatform, SubmissionFragment, SubmissionStatus, SubmissionWithSubmittedBuildFragment } from '../generated';
2
+ import { AppPlatform, GetProjectStatusSubmissionsQuery, SubmissionFragment, SubmissionStatus, SubmissionWithSubmittedBuildFragment } from '../generated';
3
3
  type Filters = {
4
4
  platform?: AppPlatform;
5
5
  status?: SubmissionStatus;
6
6
  offset?: number;
7
7
  limit?: number;
8
8
  };
9
+ export type ProjectStatusSubmission = GetProjectStatusSubmissionsQuery['app']['byId']['submissions'][number];
9
10
  export declare const SubmissionQuery: {
10
11
  byIdAsync(graphqlClient: ExpoGraphqlClient, submissionId: string, { useCache }?: {
11
12
  useCache?: boolean;
12
13
  }): Promise<SubmissionFragment>;
13
14
  byIdWithSubmittedBuildAsync(graphqlClient: ExpoGraphqlClient, submissionId: string): Promise<SubmissionWithSubmittedBuildFragment>;
14
15
  allForAppAsync(graphqlClient: ExpoGraphqlClient, appId: string, { limit, offset, status, platform }: Filters): Promise<SubmissionWithSubmittedBuildFragment[]>;
16
+ forProjectStatusAsync(graphqlClient: ExpoGraphqlClient, appId: string, { limit, offset }: {
17
+ limit: number;
18
+ offset: number;
19
+ }): Promise<ProjectStatusSubmission[]>;
15
20
  };
16
21
  export {};
@@ -72,4 +72,45 @@ exports.SubmissionQuery = {
72
72
  .toPromise());
73
73
  return data.app?.byId.submissions ?? [];
74
74
  },
75
+ async forProjectStatusAsync(graphqlClient, appId, { limit, offset }) {
76
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
77
+ .query((0, graphql_tag_1.default) `
78
+ query GetProjectStatusSubmissions($appId: String!, $offset: Int!, $limit: Int!) {
79
+ app {
80
+ byId(appId: $appId) {
81
+ id
82
+ submissions(filter: {}, offset: $offset, limit: $limit) {
83
+ id
84
+ status
85
+ platform
86
+ createdAt
87
+ completedAt
88
+ initiatingActor {
89
+ id
90
+ displayName
91
+ }
92
+ submittedBuild {
93
+ id
94
+ }
95
+ androidConfig {
96
+ applicationIdentifier
97
+ track
98
+ releaseStatus
99
+ rollout
100
+ }
101
+ iosConfig {
102
+ ascAppIdentifier
103
+ }
104
+ error {
105
+ errorCode
106
+ message
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ `, { appId, offset, limit }, { additionalTypenames: ['Submission'] })
113
+ .toPromise());
114
+ return data.app?.byId.submissions ?? [];
115
+ },
75
116
  };
@@ -0,0 +1,20 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ export type WorkflowJobSshConnectionConfig = {
3
+ host: string;
4
+ secret: string;
5
+ reconnecting: boolean;
6
+ };
7
+ export type WorkflowJobSshSession = {
8
+ id: string;
9
+ connectionConfig: WorkflowJobSshConnectionConfig;
10
+ };
11
+ export type WorkflowJobSshConnectInfo = {
12
+ sshRequested: boolean;
13
+ jobCompleted: boolean;
14
+ session: WorkflowJobSshSession | null;
15
+ };
16
+ export declare const WorkflowJobSshQuery: {
17
+ connectInfoForWorkflowJobAsync(graphqlClient: ExpoGraphqlClient, workflowJobId: string): Promise<WorkflowJobSshConnectInfo | null>;
18
+ connectInfoForJobRunAsync(graphqlClient: ExpoGraphqlClient, jobRunId: string): Promise<WorkflowJobSshConnectInfo | null>;
19
+ connectInfoForResourceIdAsync(graphqlClient: ExpoGraphqlClient, resourceId: string): Promise<WorkflowJobSshConnectInfo | null>;
20
+ };