eas-cli 2.1.0 → 2.2.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 (300) hide show
  1. package/README.md +179 -133
  2. package/build/branch/queries.d.ts +10 -2
  3. package/build/branch/queries.js +30 -30
  4. package/build/branch/utils.d.ts +4 -0
  5. package/build/branch/utils.js +15 -0
  6. package/build/build/android/build.js +3 -3
  7. package/build/build/android/prepareJob.js +1 -2
  8. package/build/build/android/syncProjectConfiguration.d.ts +2 -1
  9. package/build/build/android/syncProjectConfiguration.js +2 -2
  10. package/build/build/build.js +15 -4
  11. package/build/build/configure.js +2 -2
  12. package/build/build/createContext.d.ts +5 -1
  13. package/build/build/createContext.js +8 -14
  14. package/build/build/ios/build.js +2 -1
  15. package/build/build/ios/credentials.js +1 -1
  16. package/build/build/ios/prepareJob.js +1 -2
  17. package/build/build/ios/syncProjectConfiguration.d.ts +2 -1
  18. package/build/build/ios/syncProjectConfiguration.js +2 -2
  19. package/build/build/local.js +1 -1
  20. package/build/build/metadata.js +1 -2
  21. package/build/build/queries.d.ts +9 -0
  22. package/build/build/queries.js +51 -0
  23. package/build/build/runBuildAndSubmit.d.ts +3 -1
  24. package/build/build/runBuildAndSubmit.js +15 -7
  25. package/build/build/utils/repository.js +5 -1
  26. package/build/channel/queries.d.ts +17 -0
  27. package/build/channel/queries.js +137 -0
  28. package/build/channel/utils.d.ts +22 -0
  29. package/build/channel/utils.js +87 -0
  30. package/build/commandUtils/EasCommand.d.ts +68 -7
  31. package/build/commandUtils/EasCommand.js +60 -79
  32. package/build/commandUtils/context/ActorContextField.d.ts +5 -0
  33. package/build/commandUtils/context/ActorContextField.js +11 -0
  34. package/build/commandUtils/context/ContextField.d.ts +6 -0
  35. package/build/commandUtils/context/ContextField.js +5 -0
  36. package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +11 -0
  37. package/build/commandUtils/context/DynamicProjectConfigContextField.js +27 -0
  38. package/build/commandUtils/context/OptionalProjectConfigContextField.d.ts +13 -0
  39. package/build/commandUtils/context/OptionalProjectConfigContextField.js +37 -0
  40. package/build/commandUtils/context/ProjectConfigContextField.d.ts +13 -0
  41. package/build/commandUtils/context/ProjectConfigContextField.js +23 -0
  42. package/build/commandUtils/context/ProjectDirContextField.d.ts +4 -0
  43. package/build/commandUtils/context/ProjectDirContextField.js +11 -0
  44. package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.d.ts +21 -0
  45. package/build/commandUtils/context/contextUtils/ensureLoggedInAsync.js +75 -0
  46. package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.d.ts +17 -0
  47. package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +102 -0
  48. package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +24 -0
  49. package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +108 -0
  50. package/build/commandUtils/flags.d.ts +10 -0
  51. package/build/commandUtils/flags.js +23 -0
  52. package/build/commandUtils/pagination.d.ts +7 -4
  53. package/build/commandUtils/pagination.js +11 -15
  54. package/build/commands/account/login.d.ts +0 -2
  55. package/build/commands/account/login.js +2 -7
  56. package/build/commands/account/logout.d.ts +0 -2
  57. package/build/commands/account/logout.js +0 -5
  58. package/build/commands/account/view.d.ts +0 -2
  59. package/build/commands/account/view.js +0 -5
  60. package/build/commands/analytics.d.ts +0 -1
  61. package/build/commands/analytics.js +0 -4
  62. package/build/commands/branch/create.d.ts +4 -0
  63. package/build/commands/branch/create.js +18 -18
  64. package/build/commands/branch/delete.d.ts +4 -0
  65. package/build/commands/branch/delete.js +29 -26
  66. package/build/commands/branch/list.d.ts +5 -2
  67. package/build/commands/branch/list.js +13 -8
  68. package/build/commands/branch/rename.d.ts +5 -1
  69. package/build/commands/branch/rename.js +15 -13
  70. package/build/commands/branch/view.d.ts +5 -2
  71. package/build/commands/branch/view.js +31 -13
  72. package/build/commands/build/cancel.d.ts +7 -0
  73. package/build/commands/build/cancel.js +50 -23
  74. package/build/commands/build/configure.d.ts +3 -0
  75. package/build/commands/build/configure.js +12 -7
  76. package/build/commands/build/index.d.ts +7 -2
  77. package/build/commands/build/index.js +31 -23
  78. package/build/commands/build/inspect.d.ts +5 -0
  79. package/build/commands/build/inspect.js +12 -3
  80. package/build/commands/build/list.d.ts +7 -2
  81. package/build/commands/build/list.js +36 -59
  82. package/build/commands/build/version/set.d.ts +5 -0
  83. package/build/commands/build/version/set.js +22 -14
  84. package/build/commands/build/version/sync.d.ts +5 -0
  85. package/build/commands/build/version/sync.js +22 -13
  86. package/build/commands/build/view.d.ts +3 -0
  87. package/build/commands/build/view.js +20 -14
  88. package/build/commands/channel/create.d.ts +4 -0
  89. package/build/commands/channel/create.js +32 -25
  90. package/build/commands/channel/delete.d.ts +3 -0
  91. package/build/commands/channel/delete.js +36 -59
  92. package/build/commands/channel/edit.d.ts +7 -7
  93. package/build/commands/channel/edit.js +39 -72
  94. package/build/commands/channel/list.d.ts +6 -0
  95. package/build/commands/channel/list.js +20 -76
  96. package/build/commands/channel/rollout.d.ts +5 -1
  97. package/build/commands/channel/rollout.js +34 -35
  98. package/build/commands/channel/view.d.ts +6 -33
  99. package/build/commands/channel/view.js +31 -132
  100. package/build/commands/config.d.ts +6 -2
  101. package/build/commands/config.js +22 -13
  102. package/build/commands/credentials.d.ts +4 -0
  103. package/build/commands/credentials.js +10 -1
  104. package/build/commands/device/create.d.ts +4 -0
  105. package/build/commands/device/create.js +15 -3
  106. package/build/commands/device/delete.d.ts +13 -8
  107. package/build/commands/device/delete.js +81 -130
  108. package/build/commands/device/list.d.ts +7 -0
  109. package/build/commands/device/list.js +42 -63
  110. package/build/commands/device/view.d.ts +3 -0
  111. package/build/commands/device/view.js +10 -5
  112. package/build/commands/diagnostics.d.ts +3 -1
  113. package/build/commands/diagnostics.js +10 -8
  114. package/build/commands/metadata/pull.d.ts +4 -0
  115. package/build/commands/metadata/pull.js +13 -8
  116. package/build/commands/metadata/push.d.ts +4 -0
  117. package/build/commands/metadata/push.js +13 -8
  118. package/build/commands/open.d.ts +3 -0
  119. package/build/commands/open.js +11 -9
  120. package/build/commands/project/info.d.ts +3 -0
  121. package/build/commands/project/info.js +9 -6
  122. package/build/commands/project/init.d.ts +12 -0
  123. package/build/commands/project/init.js +155 -8
  124. package/build/commands/secret/create.d.ts +6 -0
  125. package/build/commands/secret/create.js +88 -30
  126. package/build/commands/secret/delete.d.ts +4 -0
  127. package/build/commands/secret/delete.js +28 -19
  128. package/build/commands/secret/list.d.ts +3 -0
  129. package/build/commands/secret/list.js +19 -13
  130. package/build/commands/submit.d.ts +5 -0
  131. package/build/commands/submit.js +16 -7
  132. package/build/commands/update/configure.d.ts +3 -0
  133. package/build/commands/update/configure.js +22 -16
  134. package/build/commands/update/delete.d.ts +1 -0
  135. package/build/commands/update/delete.js +4 -7
  136. package/build/commands/update/index.d.ts +8 -12
  137. package/build/commands/update/index.js +90 -166
  138. package/build/commands/update/list.d.ts +8 -2
  139. package/build/commands/update/list.js +51 -81
  140. package/build/commands/update/view.d.ts +0 -4
  141. package/build/commands/update/view.js +14 -51
  142. package/build/commands/webhook/create.d.ts +4 -0
  143. package/build/commands/webhook/create.js +10 -5
  144. package/build/commands/webhook/delete.d.ts +6 -0
  145. package/build/commands/webhook/delete.js +26 -14
  146. package/build/commands/webhook/list.d.ts +3 -0
  147. package/build/commands/webhook/list.js +13 -9
  148. package/build/commands/webhook/update.d.ts +1 -0
  149. package/build/commands/webhook/update.js +3 -1
  150. package/build/credentials/android/actions/BuildCredentialsUtils.js +2 -6
  151. package/build/credentials/android/actions/CreateFcm.d.ts +2 -3
  152. package/build/credentials/android/actions/CreateGoogleServiceAccountKey.d.ts +2 -3
  153. package/build/credentials/android/actions/CreateKeystore.d.ts +2 -3
  154. package/build/credentials/android/actions/CreateKeystore.js +1 -2
  155. package/build/credentials/android/actions/RemoveGoogleServiceAccountKey.d.ts +2 -3
  156. package/build/credentials/android/actions/UseExistingGoogleServiceAccountKey.d.ts +2 -3
  157. package/build/credentials/android/api/GraphqlClient.d.ts +6 -7
  158. package/build/credentials/context.d.ts +8 -4
  159. package/build/credentials/context.js +8 -23
  160. package/build/credentials/ios/IosCredentialsProvider.js +11 -6
  161. package/build/credentials/ios/actions/AppleTeamFormatting.d.ts +2 -0
  162. package/build/credentials/ios/actions/AppleTeamFormatting.js +7 -0
  163. package/build/credentials/ios/actions/AppleTeamUtils.d.ts +1 -2
  164. package/build/credentials/ios/actions/AppleTeamUtils.js +1 -5
  165. package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +3 -4
  166. package/build/credentials/ios/actions/AscApiKeyUtils.js +2 -2
  167. package/build/credentials/ios/actions/AssignAscApiKey.d.ts +1 -1
  168. package/build/credentials/ios/actions/AssignPushKey.d.ts +1 -1
  169. package/build/credentials/ios/actions/BuildCredentialsUtils.d.ts +3 -3
  170. package/build/credentials/ios/actions/BuildCredentialsUtils.js +8 -12
  171. package/build/credentials/ios/actions/ConfigureProvisioningProfile.d.ts +1 -1
  172. package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
  173. package/build/credentials/ios/actions/CreateAscApiKey.d.ts +2 -3
  174. package/build/credentials/ios/actions/CreateDistributionCertificate.d.ts +2 -2
  175. package/build/credentials/ios/actions/CreateProvisioningProfile.d.ts +1 -1
  176. package/build/credentials/ios/actions/CreatePushKey.d.ts +2 -3
  177. package/build/credentials/ios/actions/DeviceUtils.d.ts +0 -1
  178. package/build/credentials/ios/actions/DeviceUtils.js +3 -19
  179. package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +3 -4
  180. package/build/credentials/ios/actions/DistributionCertificateUtils.js +2 -2
  181. package/build/credentials/ios/actions/ProvisioningProfileUtils.js +1 -1
  182. package/build/credentials/ios/actions/PushKeyUtils.d.ts +2 -3
  183. package/build/credentials/ios/actions/PushKeyUtils.js +2 -2
  184. package/build/credentials/ios/actions/RemoveAscApiKey.d.ts +2 -3
  185. package/build/credentials/ios/actions/RemoveDistributionCertificate.d.ts +3 -4
  186. package/build/credentials/ios/actions/RemoveProvisioningProfile.d.ts +1 -1
  187. package/build/credentials/ios/actions/RemovePushKey.d.ts +2 -3
  188. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.d.ts +1 -1
  189. package/build/credentials/ios/actions/SetUpAdhocProvisioningProfile.js +1 -1
  190. package/build/credentials/ios/actions/SetUpAscApiKey.d.ts +1 -1
  191. package/build/credentials/ios/actions/SetUpDistributionCertificate.d.ts +1 -1
  192. package/build/credentials/ios/actions/SetUpInternalProvisioningProfile.d.ts +1 -1
  193. package/build/credentials/ios/actions/SetUpProvisioningProfile.d.ts +1 -1
  194. package/build/credentials/ios/actions/SetUpProvisioningProfile.js +1 -1
  195. package/build/credentials/ios/actions/SetUpPushKey.d.ts +1 -1
  196. package/build/credentials/ios/actions/SetUpSubmissionCredentials.d.ts +1 -1
  197. package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +1 -1
  198. package/build/credentials/ios/actions/SetUpTargetBuildCredentialsFromCredentialsJson.d.ts +1 -1
  199. package/build/credentials/ios/api/GraphqlClient.d.ts +9 -15
  200. package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.d.ts +2 -3
  201. package/build/credentials/ios/api/graphql/mutations/AppleTeamMutation.js +3 -1
  202. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.d.ts +3 -3
  203. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +20 -6
  204. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.d.ts +2 -2
  205. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +8 -7
  206. package/build/credentials/ios/api/graphql/types/AppLookupParams.d.ts +7 -0
  207. package/build/credentials/ios/api/graphql/types/AppLookupParams.js +2 -0
  208. package/build/credentials/ios/types.d.ts +2 -3
  209. package/build/credentials/ios/utils/printCredentials.d.ts +1 -1
  210. package/build/credentials/ios/validators/validateProvisioningProfile.d.ts +1 -1
  211. package/build/credentials/ios/validators/validateProvisioningProfile.js +1 -1
  212. package/build/credentials/manager/HelperActions.d.ts +4 -1
  213. package/build/credentials/manager/ManageAndroid.js +4 -14
  214. package/build/credentials/manager/ManageIos.js +12 -15
  215. package/build/credentials/manager/SelectBuildProfileFromEasJson.d.ts +1 -1
  216. package/build/credentials/manager/SelectBuildProfileFromEasJson.js +3 -3
  217. package/build/credentials/manager/SelectPlatform.d.ts +5 -1
  218. package/build/credentials/manager/SelectPlatform.js +5 -3
  219. package/build/devices/actions/create/action.d.ts +2 -3
  220. package/build/devices/context.d.ts +3 -5
  221. package/build/devices/context.js +2 -11
  222. package/build/devices/manager.d.ts +4 -5
  223. package/build/devices/manager.js +9 -16
  224. package/build/devices/queries.d.ts +21 -0
  225. package/build/devices/queries.js +121 -0
  226. package/build/devices/utils/errors.d.ts +3 -0
  227. package/build/devices/utils/errors.js +9 -0
  228. package/build/devices/utils/formatDevice.d.ts +3 -3
  229. package/build/devices/utils/formatDevice.js +8 -3
  230. package/build/graphql/generated.d.ts +1101 -191
  231. package/build/graphql/generated.js +13 -2
  232. package/build/graphql/mutations/EnvironmentSecretMutation.d.ts +3 -1
  233. package/build/graphql/queries/AppQuery.d.ts +1 -0
  234. package/build/graphql/queries/AppQuery.js +19 -0
  235. package/build/graphql/queries/BranchQuery.d.ts +5 -6
  236. package/build/graphql/queries/BranchQuery.js +44 -3
  237. package/build/graphql/queries/BuildQuery.d.ts +2 -20
  238. package/build/graphql/queries/BuildQuery.js +2 -2
  239. package/build/graphql/queries/ChannelQuery.d.ts +5 -2
  240. package/build/graphql/queries/ChannelQuery.js +45 -19
  241. package/build/graphql/queries/EnvironmentSecretsQuery.d.ts +5 -3
  242. package/build/graphql/queries/EnvironmentSecretsQuery.js +14 -28
  243. package/build/graphql/queries/UpdateQuery.d.ts +4 -6
  244. package/build/graphql/queries/UpdateQuery.js +59 -50
  245. package/build/graphql/queries/UserQuery.js +8 -1
  246. package/build/graphql/types/Account.d.ts +1 -0
  247. package/build/graphql/types/Account.js +17 -0
  248. package/build/graphql/types/App.js +7 -0
  249. package/build/graphql/types/EnvironmentSecret.d.ts +7 -0
  250. package/build/graphql/types/EnvironmentSecret.js +16 -1
  251. package/build/graphql/types/Update.d.ts +1 -0
  252. package/build/graphql/types/Update.js +30 -0
  253. package/build/graphql/types/UpdateBranch.js +4 -15
  254. package/build/metadata/context.d.ts +1 -1
  255. package/build/metadata/context.js +7 -9
  256. package/build/project/android/applicationId.d.ts +2 -1
  257. package/build/project/android/applicationId.js +7 -7
  258. package/build/project/android/versions.js +1 -1
  259. package/build/project/applicationIdentifier.d.ts +2 -1
  260. package/build/project/applicationIdentifier.js +2 -2
  261. package/build/project/expoConfig.d.ts +3 -3
  262. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.d.ts +22 -0
  263. package/build/project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync.js +93 -0
  264. package/build/project/ios/bundleIdentifier.d.ts +2 -1
  265. package/build/project/ios/bundleIdentifier.js +7 -7
  266. package/build/project/ios/scheme.d.ts +1 -1
  267. package/build/project/ios/target.d.ts +17 -2
  268. package/build/project/ios/target.js +51 -4
  269. package/build/project/projectUtils.d.ts +4 -31
  270. package/build/project/projectUtils.js +13 -123
  271. package/build/project/remoteVersionSource.d.ts +2 -2
  272. package/build/project/remoteVersionSource.js +8 -7
  273. package/build/submit/android/ServiceAccountSource.js +1 -2
  274. package/build/submit/context.d.ts +3 -1
  275. package/build/submit/context.js +12 -14
  276. package/build/submit/ios/CredentialsServiceSource.js +1 -2
  277. package/build/submit/utils/builds.js +3 -1
  278. package/build/update/android/UpdatesModule.d.ts +1 -1
  279. package/build/update/android/UpdatesModule.js +2 -3
  280. package/build/update/ios/UpdatesModule.d.ts +1 -1
  281. package/build/update/ios/UpdatesModule.js +2 -3
  282. package/build/update/queries.d.ts +16 -1
  283. package/build/update/queries.js +96 -30
  284. package/build/update/utils.d.ts +21 -8
  285. package/build/update/utils.js +75 -14
  286. package/build/user/actions.d.ts +2 -8
  287. package/build/user/actions.js +4 -63
  288. package/build/utils/profiles.d.ts +3 -3
  289. package/build/utils/profiles.js +6 -5
  290. package/build/vcs/clients/git.d.ts +1 -1
  291. package/build/vcs/clients/git.js +1 -1
  292. package/build/vcs/vcs.d.ts +1 -1
  293. package/build/webhooks/input.d.ts +2 -1
  294. package/build/webhooks/input.js +10 -1
  295. package/oclif.manifest.json +1 -1
  296. package/package.json +4 -4
  297. package/build/project/ensureProjectExists.d.ts +0 -21
  298. package/build/project/ensureProjectExists.js +0 -88
  299. package/build/user/Account.d.ts +0 -3
  300. package/build/user/Account.js +0 -7
@@ -6,8 +6,8 @@
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.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.Feature = exports.EasServiceMetric = exports.EasBuildDeprecationInfoType = exports.DistributionType = exports.CacheControlScope = exports.BuildWorkflow = exports.BuildStatus = exports.BuildResourceClass = exports.BuildPriority = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.AuthProtocolType = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = void 0;
10
- exports.WebhookType = void 0;
9
+ exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StatuspageServiceStatus = exports.StatuspageServiceName = exports.StatuspageIncidentStatus = exports.StatuspageIncidentImpact = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.GitHubAppInstallationStatus = exports.Feature = exports.EnvironmentSecretType = exports.EasServiceMetric = exports.EasBuildDeprecationInfoType = exports.DistributionType = exports.CacheControlScope = exports.BuildWorkflow = exports.BuildStatus = exports.BuildResourceClass = exports.BuildPriority = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.AuthProtocolType = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = void 0;
10
+ exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = void 0;
11
11
  var ActivityTimelineProjectActivityType;
12
12
  (function (ActivityTimelineProjectActivityType) {
13
13
  ActivityTimelineProjectActivityType["Build"] = "BUILD";
@@ -168,6 +168,11 @@ var EasServiceMetric;
168
168
  EasServiceMetric["UniqueUpdaters"] = "UNIQUE_UPDATERS";
169
169
  EasServiceMetric["UniqueUsers"] = "UNIQUE_USERS";
170
170
  })(EasServiceMetric = exports.EasServiceMetric || (exports.EasServiceMetric = {}));
171
+ var EnvironmentSecretType;
172
+ (function (EnvironmentSecretType) {
173
+ EnvironmentSecretType["FileBase64"] = "FILE_BASE64";
174
+ EnvironmentSecretType["String"] = "STRING";
175
+ })(EnvironmentSecretType = exports.EnvironmentSecretType || (exports.EnvironmentSecretType = {}));
171
176
  var Feature;
172
177
  (function (Feature) {
173
178
  /** Priority Builds */
@@ -179,6 +184,12 @@ var Feature;
179
184
  /** Share access to projects */
180
185
  Feature["Teams"] = "TEAMS";
181
186
  })(Feature = exports.Feature || (exports.Feature = {}));
187
+ var GitHubAppInstallationStatus;
188
+ (function (GitHubAppInstallationStatus) {
189
+ GitHubAppInstallationStatus["Active"] = "ACTIVE";
190
+ GitHubAppInstallationStatus["NotInstalled"] = "NOT_INSTALLED";
191
+ GitHubAppInstallationStatus["Suspended"] = "SUSPENDED";
192
+ })(GitHubAppInstallationStatus = exports.GitHubAppInstallationStatus || (exports.GitHubAppInstallationStatus = {}));
182
193
  var InvoiceDiscountType;
183
194
  (function (InvoiceDiscountType) {
184
195
  InvoiceDiscountType["Amount"] = "AMOUNT";
@@ -1,12 +1,14 @@
1
- import { EnvironmentSecretFragment } from '../generated';
1
+ import { EnvironmentSecretFragment, EnvironmentSecretType } from '../generated';
2
2
  export declare const EnvironmentSecretMutation: {
3
3
  createForAccountAsync(input: {
4
4
  name: string;
5
5
  value: string;
6
+ type: EnvironmentSecretType;
6
7
  }, accountId: string): Promise<EnvironmentSecretFragment>;
7
8
  createForAppAsync(input: {
8
9
  name: string;
9
10
  value: string;
11
+ type: EnvironmentSecretType;
10
12
  }, appId: string): Promise<EnvironmentSecretFragment>;
11
13
  deleteAsync(id: string): Promise<{
12
14
  id: string;
@@ -1,4 +1,5 @@
1
1
  import { AppFragment } from '../generated';
2
2
  export declare const AppQuery: {
3
+ byIdAsync(projectId: string): Promise<AppFragment>;
3
4
  byFullNameAsync(fullName: string): Promise<AppFragment>;
4
5
  };
@@ -8,6 +8,25 @@ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
8
8
  const client_1 = require("../client");
9
9
  const App_1 = require("../types/App");
10
10
  exports.AppQuery = {
11
+ async byIdAsync(projectId) {
12
+ const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
13
+ .query((0, graphql_tag_1.default) `
14
+ query AppByIdQuery($appId: String!) {
15
+ app {
16
+ byId(appId: $appId) {
17
+ id
18
+ ...AppFragment
19
+ }
20
+ }
21
+ }
22
+ ${(0, graphql_1.print)(App_1.AppFragmentNode)}
23
+ `, { appId: projectId }, {
24
+ additionalTypenames: ['App'],
25
+ })
26
+ .toPromise());
27
+ (0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
28
+ return data.app.byId;
29
+ },
11
30
  async byFullNameAsync(fullName) {
12
31
  const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
13
32
  .query((0, graphql_tag_1.default) `
@@ -1,8 +1,7 @@
1
- import { BranchesByAppQueryVariables, UpdateBranchFragment, ViewBranchQuery } from '../generated';
1
+ import { BranchesByAppQueryVariables, UpdateBranchFragment, ViewBranchQuery, ViewBranchQueryVariables, ViewBranchesOnUpdateChannelQuery, ViewBranchesOnUpdateChannelQueryVariables } from '../generated';
2
+ export declare type UpdateBranchOnChannelObject = NonNullable<ViewBranchesOnUpdateChannelQuery['app']['byId']['updateChannelByName']>['updateBranches'][number];
2
3
  export declare const BranchQuery: {
3
- getBranchByNameAsync({ appId, name, }: {
4
- appId: string;
5
- name: string;
6
- }): Promise<ViewBranchQuery['app']['byId']['updateBranchByName']>;
7
- listBranchesAsync({ appId, limit, offset, }: BranchesByAppQueryVariables): Promise<UpdateBranchFragment[]>;
4
+ getBranchByNameAsync({ appId, name, }: ViewBranchQueryVariables): Promise<NonNullable<ViewBranchQuery['app']['byId']['updateBranchByName']>>;
5
+ listBranchesOnAppAsync({ appId, limit, offset, }: BranchesByAppQueryVariables): Promise<UpdateBranchFragment[]>;
6
+ listBranchesOnChannelAsync({ appId, channelName, offset, limit, }: ViewBranchesOnUpdateChannelQueryVariables): Promise<UpdateBranchOnChannelObject[]>;
8
7
  };
@@ -4,11 +4,13 @@ exports.BranchQuery = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const graphql_1 = require("graphql");
6
6
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
7
+ const utils_1 = require("../../branch/utils");
7
8
  const client_1 = require("../client");
9
+ const Update_1 = require("../types/Update");
8
10
  const UpdateBranch_1 = require("../types/UpdateBranch");
9
11
  exports.BranchQuery = {
10
12
  async getBranchByNameAsync({ appId, name, }) {
11
- const { app: { byId: { updateBranchByName: branch }, }, } = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
13
+ const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
12
14
  .query((0, graphql_tag_1.default) `
13
15
  query ViewBranch($appId: String!, $name: String!) {
14
16
  app {
@@ -26,9 +28,13 @@ exports.BranchQuery = {
26
28
  name,
27
29
  }, { additionalTypenames: ['UpdateBranch'] })
28
30
  .toPromise());
29
- return branch;
31
+ const { updateBranchByName } = response.app.byId;
32
+ if (!updateBranchByName) {
33
+ throw new utils_1.BranchNotFoundError(`Could not find a branch named "${name}".`);
34
+ }
35
+ return updateBranchByName;
30
36
  },
31
- async listBranchesAsync({ appId, limit, offset, }) {
37
+ async listBranchesOnAppAsync({ appId, limit, offset, }) {
32
38
  var _a, _b;
33
39
  const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
34
40
  .query((0, graphql_tag_1.default) `
@@ -52,4 +58,39 @@ exports.BranchQuery = {
52
58
  .toPromise());
53
59
  return (_b = (_a = data === null || data === void 0 ? void 0 : data.app) === null || _a === void 0 ? void 0 : _a.byId.updateBranches) !== null && _b !== void 0 ? _b : [];
54
60
  },
61
+ async listBranchesOnChannelAsync({ appId, channelName, offset, limit, }) {
62
+ const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
63
+ .query((0, graphql_tag_1.default) `
64
+ query ViewBranchesOnUpdateChannel(
65
+ $appId: String!
66
+ $channelName: String!
67
+ $offset: Int!
68
+ $limit: Int!
69
+ ) {
70
+ app {
71
+ byId(appId: $appId) {
72
+ id
73
+ updateChannelByName(name: $channelName) {
74
+ id
75
+ updateBranches(offset: $offset, limit: $limit) {
76
+ id
77
+ name
78
+ updateGroups(offset: 0, limit: 1) {
79
+ id
80
+ ...UpdateFragment
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ ${(0, graphql_1.print)(Update_1.UpdateFragmentNode)}
88
+ `, { appId, channelName, offset, limit }, { additionalTypenames: ['UpdateChannel', 'UpdateBranch', 'Update'] })
89
+ .toPromise());
90
+ const { updateChannelByName } = response.app.byId;
91
+ if (!updateChannelByName) {
92
+ throw new Error(`Could not find channels with the name ${channelName}`);
93
+ }
94
+ return updateChannelByName.updateBranches;
95
+ },
55
96
  };
@@ -1,21 +1,4 @@
1
- import { AppPlatform, BuildFragment, BuildStatus, BuildWithSubmissionsFragment, DistributionType } from '../generated';
2
- declare type BuildsQuery = {
3
- offset?: number;
4
- limit?: number;
5
- filter?: {
6
- platform?: AppPlatform;
7
- status?: BuildStatus;
8
- distribution?: DistributionType;
9
- channel?: string;
10
- appVersion?: string;
11
- appBuildVersion?: string;
12
- sdkVersion?: string;
13
- runtimeVersion?: string;
14
- appIdentifier?: string;
15
- buildProfile?: string;
16
- gitCommitHash?: string;
17
- };
18
- };
1
+ import { BuildFragment, BuildWithSubmissionsFragment, ViewBuildsOnAppQueryVariables } from '../generated';
19
2
  export declare const BuildQuery: {
20
3
  byIdAsync(buildId: string, { useCache }?: {
21
4
  useCache?: boolean | undefined;
@@ -23,6 +6,5 @@ export declare const BuildQuery: {
23
6
  withSubmissionsByIdAsync(buildId: string, { useCache }?: {
24
7
  useCache?: boolean | undefined;
25
8
  }): Promise<BuildWithSubmissionsFragment>;
26
- allForAppAsync(appId: string, { limit, offset, filter }: BuildsQuery): Promise<BuildFragment[]>;
9
+ viewBuildsOnAppAsync({ appId, limit, offset, filter, }: ViewBuildsOnAppQueryVariables): Promise<BuildFragment[]>;
27
10
  };
28
- export {};
@@ -45,13 +45,13 @@ exports.BuildQuery = {
45
45
  .toPromise());
46
46
  return data.builds.byId;
47
47
  },
48
- async allForAppAsync(appId, { limit = 10, offset = 0, filter }) {
48
+ async viewBuildsOnAppAsync({ appId, limit, offset, filter, }) {
49
49
  var _a, _b;
50
50
  const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
51
51
  .query(
52
52
  // TODO: Change $appId: String! to ID! when fixed server-side schema
53
53
  (0, graphql_tag_1.default) `
54
- query GetAllBuildsForApp(
54
+ query ViewBuildsOnApp(
55
55
  $appId: String!
56
56
  $offset: Int!
57
57
  $limit: Int!
@@ -1,4 +1,7 @@
1
- import { GetChannelByNameForAppQuery, GetChannelByNameForAppQueryVariables } from '../generated';
1
+ import { ViewUpdateChannelOnAppQuery, ViewUpdateChannelOnAppQueryVariables, ViewUpdateChannelsOnAppQuery, ViewUpdateChannelsOnAppQueryVariables } from '../generated';
2
+ export declare type UpdateChannelObject = NonNullable<ViewUpdateChannelsOnAppQuery['app']['byId']['updateChannels']>[number];
3
+ export declare type UpdateChannelByNameObject = NonNullable<ViewUpdateChannelOnAppQuery['app']['byId']['updateChannelByName']>;
2
4
  export declare const ChannelQuery: {
3
- getUpdateChannelByNameForAppAsync({ appId, channelName, }: GetChannelByNameForAppQueryVariables): Promise<GetChannelByNameForAppQuery['app']['byId']['updateChannelByName']>;
5
+ viewUpdateChannelAsync({ appId, channelName, }: ViewUpdateChannelOnAppQueryVariables): Promise<UpdateChannelByNameObject>;
6
+ viewUpdateChannelsOnAppAsync({ appId, limit, offset, }: ViewUpdateChannelsOnAppQueryVariables): Promise<UpdateChannelObject[]>;
4
7
  };
@@ -2,13 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChannelQuery = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const graphql_1 = require("graphql");
5
6
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
7
  const client_1 = require("../client");
8
+ const Update_1 = require("../types/Update");
7
9
  exports.ChannelQuery = {
8
- async getUpdateChannelByNameForAppAsync({ appId, channelName, }) {
9
- const { app: { byId: { updateChannelByName }, }, } = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async viewUpdateChannelAsync({ appId, channelName, }) {
11
+ const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
12
  .query((0, graphql_tag_1.default) `
11
- query GetChannelByNameForApp($appId: String!, $channelName: String!) {
13
+ query ViewUpdateChannelOnApp($appId: String!, $channelName: String!) {
12
14
  app {
13
15
  byId(appId: $appId) {
14
16
  id
@@ -17,33 +19,57 @@ exports.ChannelQuery = {
17
19
  name
18
20
  createdAt
19
21
  branchMapping
20
- updateBranches(offset: 0, limit: 1000) {
22
+ updateBranches(offset: 0, limit: 5) {
21
23
  id
22
24
  name
23
- updates(offset: 0, limit: 10) {
25
+ updateGroups(offset: 0, limit: 1) {
24
26
  id
25
- group
26
- message
27
- runtimeVersion
28
- createdAt
29
- platform
30
- actor {
31
- id
32
- ... on User {
33
- username
34
- }
35
- ... on Robot {
36
- firstName
37
- }
38
- }
27
+ ...UpdateFragment
39
28
  }
40
29
  }
41
30
  }
42
31
  }
43
32
  }
44
33
  }
34
+ ${(0, graphql_1.print)(Update_1.UpdateFragmentNode)}
45
35
  `, { appId, channelName }, { additionalTypenames: ['UpdateChannel', 'UpdateBranch', 'Update'] })
46
36
  .toPromise());
37
+ const { updateChannelByName } = response.app.byId;
38
+ if (!updateChannelByName) {
39
+ throw new Error(`Could not find channel with the name ${channelName}`);
40
+ }
47
41
  return updateChannelByName;
48
42
  },
43
+ async viewUpdateChannelsOnAppAsync({ appId, limit, offset, }) {
44
+ const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
45
+ .query((0, graphql_tag_1.default) `
46
+ query ViewUpdateChannelsOnApp($appId: String!, $offset: Int!, $limit: Int!) {
47
+ app {
48
+ byId(appId: $appId) {
49
+ id
50
+ updateChannels(offset: $offset, limit: $limit) {
51
+ id
52
+ name
53
+ branchMapping
54
+ updateBranches(offset: 0, limit: 5) {
55
+ id
56
+ name
57
+ updateGroups(offset: 0, limit: 1) {
58
+ id
59
+ ...UpdateFragment
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ${(0, graphql_1.print)(Update_1.UpdateFragmentNode)}
67
+ `, { appId, offset, limit }, { additionalTypenames: ['UpdateChannel', 'UpdateBranch', 'Update'] })
68
+ .toPromise());
69
+ const { updateChannels } = response.app.byId;
70
+ if (!updateChannels) {
71
+ throw new Error(`Could not find channels on project with id ${appId}`);
72
+ }
73
+ return updateChannels;
74
+ },
49
75
  };
@@ -7,7 +7,9 @@ export declare type EnvironmentSecretWithScope = EnvironmentSecretFragment & {
7
7
  scope: EnvironmentSecretScope;
8
8
  };
9
9
  export declare const EnvironmentSecretsQuery: {
10
- byAccountNameAsync(accountName: string): Promise<EnvironmentSecretFragment[]>;
11
- byAppIdAsync(appId: string): Promise<EnvironmentSecretFragment[]>;
12
- allAsync(projectAccountName: string, projectId: string): Promise<EnvironmentSecretWithScope[]>;
10
+ byAppIdAsync(appId: string): Promise<{
11
+ accountSecrets: EnvironmentSecretFragment[];
12
+ appSecrets: EnvironmentSecretFragment[];
13
+ }>;
14
+ allAsync(projectId: string): Promise<EnvironmentSecretWithScope[]>;
13
15
  };
@@ -12,35 +12,21 @@ var EnvironmentSecretScope;
12
12
  EnvironmentSecretScope["PROJECT"] = "project";
13
13
  })(EnvironmentSecretScope = exports.EnvironmentSecretScope || (exports.EnvironmentSecretScope = {}));
14
14
  exports.EnvironmentSecretsQuery = {
15
- async byAccountNameAsync(accountName) {
16
- const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
17
- .query((0, graphql_tag_1.default) `
18
- query EnvironmentSecretsByAccountName($accountName: String!) {
19
- account {
20
- byName(accountName: $accountName) {
21
- id
22
- environmentSecrets {
23
- id
24
- ...EnvironmentSecretFragment
25
- }
26
- }
27
- }
28
- }
29
- ${(0, graphql_1.print)(EnvironmentSecret_1.EnvironmentSecretFragmentNode)}
30
- `, { accountName }, {
31
- additionalTypenames: ['EnvironmentSecret'],
32
- })
33
- .toPromise());
34
- return data.account.byName.environmentSecrets;
35
- },
36
15
  async byAppIdAsync(appId) {
37
- var _a, _b;
16
+ var _a, _b, _c, _d;
38
17
  const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
39
18
  .query((0, graphql_tag_1.default) `
40
19
  query EnvironmentSecretsByAppId($appId: String!) {
41
20
  app {
42
21
  byId(appId: $appId) {
43
22
  id
23
+ ownerAccount {
24
+ id
25
+ environmentSecrets {
26
+ id
27
+ ...EnvironmentSecretFragment
28
+ }
29
+ }
44
30
  environmentSecrets {
45
31
  id
46
32
  ...EnvironmentSecretFragment
@@ -51,13 +37,13 @@ exports.EnvironmentSecretsQuery = {
51
37
  ${(0, graphql_1.print)(EnvironmentSecret_1.EnvironmentSecretFragmentNode)}
52
38
  `, { appId }, { additionalTypenames: ['EnvironmentSecret'] })
53
39
  .toPromise());
54
- return (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.environmentSecrets) !== null && _b !== void 0 ? _b : [];
40
+ return {
41
+ accountSecrets: (_b = (_a = data.app) === null || _a === void 0 ? void 0 : _a.byId.ownerAccount.environmentSecrets) !== null && _b !== void 0 ? _b : [],
42
+ appSecrets: (_d = (_c = data.app) === null || _c === void 0 ? void 0 : _c.byId.environmentSecrets) !== null && _d !== void 0 ? _d : [],
43
+ };
55
44
  },
56
- async allAsync(projectAccountName, projectId) {
57
- const [accountSecrets, appSecrets] = await Promise.all([
58
- this.byAccountNameAsync(projectAccountName),
59
- this.byAppIdAsync(projectId),
60
- ]);
45
+ async allAsync(projectId) {
46
+ const { accountSecrets, appSecrets } = await this.byAppIdAsync(projectId);
61
47
  return [
62
48
  ...appSecrets.map(s => ({ ...s, scope: EnvironmentSecretScope.PROJECT })),
63
49
  ...accountSecrets.map(s => ({ ...s, scope: EnvironmentSecretScope.ACCOUNT })),
@@ -1,8 +1,6 @@
1
- import { ViewAllUpdatesQuery, ViewAllUpdatesQueryVariables, ViewBranchUpdatesQuery, ViewBranchUpdatesQueryVariables } from '../generated';
2
- export declare type BranchUpdateObject = Exclude<ViewBranchUpdatesQuery['app']['byId']['updateBranchByName'], null | undefined>['updates'][number];
3
- export declare type AppUpdateObject = ViewAllUpdatesQuery['app']['byId']['updates'][number];
4
- export declare type UpdateObject = BranchUpdateObject | AppUpdateObject;
1
+ import { UpdateFragment, ViewUpdateGroupsOnAppQueryVariables, ViewUpdateGroupsOnBranchQueryVariables, ViewUpdatesByGroupQueryVariables } from '../generated';
5
2
  export declare const UpdateQuery: {
6
- viewAllAsync({ appId, limit, offset }: ViewAllUpdatesQueryVariables): Promise<ViewAllUpdatesQuery>;
7
- viewBranchAsync({ appId, name, limit, offset }: ViewBranchUpdatesQueryVariables): Promise<ViewBranchUpdatesQuery>;
3
+ viewUpdateGroupAsync({ groupId, }: ViewUpdatesByGroupQueryVariables): Promise<UpdateFragment[]>;
4
+ viewUpdateGroupsOnBranchAsync({ limit, offset, appId, branchName, filter, }: ViewUpdateGroupsOnBranchQueryVariables): Promise<UpdateFragment[][]>;
5
+ viewUpdateGroupsOnAppAsync({ limit, offset, appId, filter, }: ViewUpdateGroupsOnAppQueryVariables): Promise<UpdateFragment[][]>;
8
6
  };
@@ -2,89 +2,98 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateQuery = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const graphql_1 = require("graphql");
5
6
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
7
  const client_1 = require("../client");
8
+ const Update_1 = require("../types/Update");
7
9
  exports.UpdateQuery = {
8
- async viewAllAsync({ appId, limit, offset }) {
9
- return (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ async viewUpdateGroupAsync({ groupId, }) {
11
+ const { updatesByGroup } = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
12
  .query((0, graphql_tag_1.default) `
11
- query ViewAllUpdates($appId: String!, $limit: Int!, $offset: Int!) {
13
+ query ViewUpdatesByGroup($groupId: ID!) {
14
+ updatesByGroup(group: $groupId) {
15
+ id
16
+ ...UpdateFragment
17
+ }
18
+ }
19
+ ${(0, graphql_1.print)(Update_1.UpdateFragmentNode)}
20
+ `, {
21
+ groupId,
22
+ }, { additionalTypenames: ['Update'] })
23
+ .toPromise());
24
+ if (updatesByGroup.length === 0) {
25
+ throw new Error(`Could not find any updates with group ID: "${groupId}"`);
26
+ }
27
+ return updatesByGroup;
28
+ },
29
+ async viewUpdateGroupsOnBranchAsync({ limit, offset, appId, branchName, filter, }) {
30
+ const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
31
+ .query((0, graphql_tag_1.default) `
32
+ query ViewUpdateGroupsOnBranch(
33
+ $appId: String!
34
+ $branchName: String!
35
+ $limit: Int!
36
+ $offset: Int!
37
+ $filter: UpdatesFilter
38
+ ) {
12
39
  app {
13
40
  byId(appId: $appId) {
14
41
  id
15
- updates(limit: $limit, offset: $offset) {
42
+ updateBranchByName(name: $branchName) {
16
43
  id
17
- group
18
- message
19
- createdAt
20
- runtimeVersion
21
- platform
22
- actor {
23
- id
24
- ... on User {
25
- username
26
- }
27
- ... on Robot {
28
- firstName
29
- }
30
- }
31
- branch {
44
+ updateGroups(limit: $limit, offset: $offset, filter: $filter) {
32
45
  id
33
- name
46
+ ...UpdateFragment
34
47
  }
35
48
  }
36
49
  }
37
50
  }
38
51
  }
52
+ ${(0, graphql_1.print)(Update_1.UpdateFragmentNode)}
39
53
  `, {
40
54
  appId,
41
55
  limit,
42
56
  offset,
43
- }, { additionalTypenames: ['UpdateBranch', 'Update'] })
57
+ branchName,
58
+ filter,
59
+ }, { additionalTypenames: ['Update'] })
44
60
  .toPromise());
61
+ const branch = response.app.byId.updateBranchByName;
62
+ if (!branch) {
63
+ throw new Error(`Could not find branch "${branchName}"`);
64
+ }
65
+ return branch.updateGroups;
45
66
  },
46
- async viewBranchAsync({ appId, name, limit, offset }) {
47
- return (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
67
+ async viewUpdateGroupsOnAppAsync({ limit, offset, appId, filter, }) {
68
+ const response = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
48
69
  .query((0, graphql_tag_1.default) `
49
- query ViewBranchUpdates($appId: String!, $name: String!, $limit: Int!, $offset: Int!) {
70
+ query ViewUpdateGroupsOnApp(
71
+ $appId: String!
72
+ $limit: Int!
73
+ $offset: Int!
74
+ $filter: UpdatesFilter
75
+ ) {
50
76
  app {
51
77
  byId(appId: $appId) {
52
78
  id
53
- updateBranchByName(name: $name) {
79
+ updateGroups(limit: $limit, offset: $offset, filter: $filter) {
54
80
  id
55
- name
56
- updates(limit: $limit, offset: $offset) {
57
- id
58
- group
59
- message
60
- createdAt
61
- runtimeVersion
62
- platform
63
- manifestFragment
64
- actor {
65
- id
66
- ... on User {
67
- username
68
- }
69
- ... on Robot {
70
- firstName
71
- }
72
- }
73
- branch {
74
- id
75
- name
76
- }
77
- }
81
+ ...UpdateFragment
78
82
  }
79
83
  }
80
84
  }
81
85
  }
86
+ ${(0, graphql_1.print)(Update_1.UpdateFragmentNode)}
82
87
  `, {
83
88
  appId,
84
- name,
85
89
  limit,
86
90
  offset,
87
- }, { additionalTypenames: ['UpdateBranch', 'Update'] })
91
+ filter,
92
+ }, { additionalTypenames: ['Update'] })
88
93
  .toPromise());
94
+ if (!response) {
95
+ throw new Error(`Could not find project with id "${appId}"`);
96
+ }
97
+ return response.app.byId.updateGroups;
89
98
  },
90
99
  };
@@ -2,8 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UserQuery = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const graphql_1 = require("graphql");
5
6
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
7
  const client_1 = require("../client");
8
+ const Account_1 = require("../types/Account");
7
9
  exports.UserQuery = {
8
10
  async currentUserAsync() {
9
11
  const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
@@ -14,17 +16,22 @@ exports.UserQuery = {
14
16
  id
15
17
  ... on User {
16
18
  username
19
+ primaryAccount {
20
+ id
21
+ ...AccountFragment
22
+ }
17
23
  }
18
24
  ... on Robot {
19
25
  firstName
20
26
  }
21
27
  accounts {
22
28
  id
23
- name
29
+ ...AccountFragment
24
30
  }
25
31
  isExpoAdmin
26
32
  }
27
33
  }
34
+ ${(0, graphql_1.print)(Account_1.AccountFragmentNode)}
28
35
  `,
29
36
  /* variables */ undefined, {
30
37
  additionalTypenames: ['User'],
@@ -0,0 +1 @@
1
+ export declare const AccountFragmentNode: import("graphql").DocumentNode;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountFragmentNode = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
+ exports.AccountFragmentNode = (0, graphql_tag_1.default) `
7
+ fragment AccountFragment on Account {
8
+ id
9
+ name
10
+ users {
11
+ actor {
12
+ id
13
+ }
14
+ role
15
+ }
16
+ }
17
+ `;
@@ -3,10 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AppFragmentNode = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
+ const Account_1 = require("./Account");
6
7
  exports.AppFragmentNode = (0, graphql_tag_1.default) `
7
8
  fragment AppFragment on App {
8
9
  id
9
10
  fullName
10
11
  slug
12
+ ownerAccount {
13
+ id
14
+ name
15
+ ...AccountFragment
16
+ }
11
17
  }
18
+ ${Account_1.AccountFragmentNode}
12
19
  `;
@@ -1 +1,8 @@
1
+ import { EnvironmentSecretType } from '../generated';
1
2
  export declare const EnvironmentSecretFragmentNode: import("graphql").DocumentNode;
3
+ export declare enum SecretType {
4
+ STRING = "string",
5
+ FILE = "file"
6
+ }
7
+ export declare const SecretTypeToEnvironmentSecretType: Record<SecretType, EnvironmentSecretType>;
8
+ export declare const EnvironmentSecretTypeToSecretType: Record<EnvironmentSecretType, SecretType>;