@optimizely/ocp-cli-v2 2.0.0-beta.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 (252) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +51 -0
  3. package/bin/ocp.js +3 -0
  4. package/bin/run.js +3 -0
  5. package/dist/commands/accounts/whoami.d.ts +5 -0
  6. package/dist/commands/accounts/whoami.js +22 -0
  7. package/dist/commands/accounts/whoami.js.map +1 -0
  8. package/dist/commands/accounts/whois.d.ts +12 -0
  9. package/dist/commands/accounts/whois.js +57 -0
  10. package/dist/commands/accounts/whois.js.map +1 -0
  11. package/dist/commands/app/BaseBuildCommand.d.ts +37 -0
  12. package/dist/commands/app/BaseBuildCommand.js +255 -0
  13. package/dist/commands/app/BaseBuildCommand.js.map +1 -0
  14. package/dist/commands/app/abandon.d.ts +11 -0
  15. package/dist/commands/app/abandon.js +146 -0
  16. package/dist/commands/app/abandon.js.map +1 -0
  17. package/dist/commands/app/getLogLevel.d.ts +16 -0
  18. package/dist/commands/app/getLogLevel.js +66 -0
  19. package/dist/commands/app/getLogLevel.js.map +1 -0
  20. package/dist/commands/app/init.d.ts +27 -0
  21. package/dist/commands/app/init.js +326 -0
  22. package/dist/commands/app/init.js.map +1 -0
  23. package/dist/commands/app/logs.d.ts +24 -0
  24. package/dist/commands/app/logs.js +231 -0
  25. package/dist/commands/app/logs.js.map +1 -0
  26. package/dist/commands/app/package.d.ts +8 -0
  27. package/dist/commands/app/package.js +51 -0
  28. package/dist/commands/app/package.js.map +1 -0
  29. package/dist/commands/app/prepare.d.ts +16 -0
  30. package/dist/commands/app/prepare.js +119 -0
  31. package/dist/commands/app/prepare.js.map +1 -0
  32. package/dist/commands/app/register.d.ts +10 -0
  33. package/dist/commands/app/register.js +102 -0
  34. package/dist/commands/app/register.js.map +1 -0
  35. package/dist/commands/app/setLogLevel.d.ts +16 -0
  36. package/dist/commands/app/setLogLevel.js +83 -0
  37. package/dist/commands/app/setLogLevel.js.map +1 -0
  38. package/dist/commands/app/validate.d.ts +5 -0
  39. package/dist/commands/app/validate.js +26 -0
  40. package/dist/commands/app/validate.js.map +1 -0
  41. package/dist/commands/availability/list.d.ts +6 -0
  42. package/dist/commands/availability/list.js +32 -0
  43. package/dist/commands/availability/list.js.map +1 -0
  44. package/dist/commands/dev-server/start.d.ts +36 -0
  45. package/dist/commands/dev-server/start.js +209 -0
  46. package/dist/commands/dev-server/start.js.map +1 -0
  47. package/dist/commands/dev.d.ts +8 -0
  48. package/dist/commands/dev.js +12 -0
  49. package/dist/commands/dev.js.map +1 -0
  50. package/dist/commands/directory/info.d.ts +13 -0
  51. package/dist/commands/directory/info.js +85 -0
  52. package/dist/commands/directory/info.js.map +1 -0
  53. package/dist/commands/directory/install.d.ts +12 -0
  54. package/dist/commands/directory/install.js +46 -0
  55. package/dist/commands/directory/install.js.map +1 -0
  56. package/dist/commands/directory/list.d.ts +14 -0
  57. package/dist/commands/directory/list.js +114 -0
  58. package/dist/commands/directory/list.js.map +1 -0
  59. package/dist/commands/directory/listFunctions.d.ts +15 -0
  60. package/dist/commands/directory/listFunctions.js +86 -0
  61. package/dist/commands/directory/listFunctions.js.map +1 -0
  62. package/dist/commands/directory/listGlobalFunctions.d.ts +13 -0
  63. package/dist/commands/directory/listGlobalFunctions.js +64 -0
  64. package/dist/commands/directory/listGlobalFunctions.js.map +1 -0
  65. package/dist/commands/directory/listInstalls.d.ts +15 -0
  66. package/dist/commands/directory/listInstalls.js +72 -0
  67. package/dist/commands/directory/listInstalls.js.map +1 -0
  68. package/dist/commands/directory/listSourceFunctions.d.ts +14 -0
  69. package/dist/commands/directory/listSourceFunctions.js +71 -0
  70. package/dist/commands/directory/listSourceFunctions.js.map +1 -0
  71. package/dist/commands/directory/publish.d.ts +15 -0
  72. package/dist/commands/directory/publish.js +201 -0
  73. package/dist/commands/directory/publish.js.map +1 -0
  74. package/dist/commands/directory/status.d.ts +11 -0
  75. package/dist/commands/directory/status.js +50 -0
  76. package/dist/commands/directory/status.js.map +1 -0
  77. package/dist/commands/directory/uninstall.d.ts +13 -0
  78. package/dist/commands/directory/uninstall.js +55 -0
  79. package/dist/commands/directory/uninstall.js.map +1 -0
  80. package/dist/commands/directory/unpublish.d.ts +17 -0
  81. package/dist/commands/directory/unpublish.js +187 -0
  82. package/dist/commands/directory/unpublish.js.map +1 -0
  83. package/dist/commands/directory/upgrade.d.ts +15 -0
  84. package/dist/commands/directory/upgrade.js +113 -0
  85. package/dist/commands/directory/upgrade.js.map +1 -0
  86. package/dist/commands/env/get.d.ts +5 -0
  87. package/dist/commands/env/get.js +23 -0
  88. package/dist/commands/env/get.js.map +1 -0
  89. package/dist/commands/env/set.d.ts +8 -0
  90. package/dist/commands/env/set.js +63 -0
  91. package/dist/commands/env/set.js.map +1 -0
  92. package/dist/commands/jobs/list.d.ts +27 -0
  93. package/dist/commands/jobs/list.js +245 -0
  94. package/dist/commands/jobs/list.js.map +1 -0
  95. package/dist/commands/jobs/runtimeStatus.d.ts +11 -0
  96. package/dist/commands/jobs/runtimeStatus.js +55 -0
  97. package/dist/commands/jobs/runtimeStatus.js.map +1 -0
  98. package/dist/commands/jobs/status.d.ts +11 -0
  99. package/dist/commands/jobs/status.js +57 -0
  100. package/dist/commands/jobs/status.js.map +1 -0
  101. package/dist/commands/jobs/terminate.d.ts +11 -0
  102. package/dist/commands/jobs/terminate.js +35 -0
  103. package/dist/commands/jobs/terminate.js.map +1 -0
  104. package/dist/commands/jobs/trigger.d.ts +14 -0
  105. package/dist/commands/jobs/trigger.js +47 -0
  106. package/dist/commands/jobs/trigger.js.map +1 -0
  107. package/dist/commands/review/list.d.ts +9 -0
  108. package/dist/commands/review/list.js +74 -0
  109. package/dist/commands/review/list.js.map +1 -0
  110. package/dist/commands/review/open.d.ts +8 -0
  111. package/dist/commands/review/open.js +32 -0
  112. package/dist/commands/review/open.js.map +1 -0
  113. package/dist/hooks/command-not-found.d.ts +3 -0
  114. package/dist/hooks/command-not-found.js +93 -0
  115. package/dist/hooks/command-not-found.js.map +1 -0
  116. package/dist/hooks/preupdate.d.ts +10 -0
  117. package/dist/hooks/preupdate.js +42 -0
  118. package/dist/hooks/preupdate.js.map +1 -0
  119. package/dist/index.d.ts +1 -0
  120. package/dist/index.js +59 -0
  121. package/dist/index.js.map +1 -0
  122. package/dist/lib/AppContext.d.ts +9 -0
  123. package/dist/lib/AppContext.js +43 -0
  124. package/dist/lib/AppContext.js.map +1 -0
  125. package/dist/lib/AppPackager.d.ts +17 -0
  126. package/dist/lib/AppPackager.js +57 -0
  127. package/dist/lib/AppPackager.js.map +1 -0
  128. package/dist/lib/AppUpdater.d.ts +11 -0
  129. package/dist/lib/AppUpdater.js +143 -0
  130. package/dist/lib/AppUpdater.js.map +1 -0
  131. package/dist/lib/AppUploader.d.ts +9 -0
  132. package/dist/lib/AppUploader.js +37 -0
  133. package/dist/lib/AppUploader.js.map +1 -0
  134. package/dist/lib/BuildPipeline.d.ts +24 -0
  135. package/dist/lib/BuildPipeline.js +26 -0
  136. package/dist/lib/BuildPipeline.js.map +1 -0
  137. package/dist/lib/BuildPipelineFactory.d.ts +10 -0
  138. package/dist/lib/BuildPipelineFactory.js +23 -0
  139. package/dist/lib/BuildPipelineFactory.js.map +1 -0
  140. package/dist/lib/Config.d.ts +15 -0
  141. package/dist/lib/Config.js +47 -0
  142. package/dist/lib/Config.js.map +1 -0
  143. package/dist/lib/CustomHelp.d.ts +19 -0
  144. package/dist/lib/CustomHelp.js +81 -0
  145. package/dist/lib/CustomHelp.js.map +1 -0
  146. package/dist/lib/DependencyStage.d.ts +1 -0
  147. package/dist/lib/DependencyStage.js +3 -0
  148. package/dist/lib/DependencyStage.js.map +1 -0
  149. package/dist/lib/EnvironmentalOutput.d.ts +1 -0
  150. package/dist/lib/EnvironmentalOutput.js +22 -0
  151. package/dist/lib/EnvironmentalOutput.js.map +1 -0
  152. package/dist/lib/Moria.d.ts +51 -0
  153. package/dist/lib/Moria.js +30 -0
  154. package/dist/lib/Moria.js.map +1 -0
  155. package/dist/lib/MoriaApi.d.ts +22 -0
  156. package/dist/lib/MoriaApi.js +74 -0
  157. package/dist/lib/MoriaApi.js.map +1 -0
  158. package/dist/lib/NodeBuildPipeline.d.ts +25 -0
  159. package/dist/lib/NodeBuildPipeline.js +60 -0
  160. package/dist/lib/NodeBuildPipeline.js.map +1 -0
  161. package/dist/lib/PackageManager.d.ts +242 -0
  162. package/dist/lib/PackageManager.js +511 -0
  163. package/dist/lib/PackageManager.js.map +1 -0
  164. package/dist/lib/Rivendell.d.ts +409 -0
  165. package/dist/lib/Rivendell.js +391 -0
  166. package/dist/lib/Rivendell.js.map +1 -0
  167. package/dist/lib/RivendellApi.d.ts +22 -0
  168. package/dist/lib/RivendellApi.js +159 -0
  169. package/dist/lib/RivendellApi.js.map +1 -0
  170. package/dist/lib/Shards.d.ts +3 -0
  171. package/dist/lib/Shards.js +41 -0
  172. package/dist/lib/Shards.js.map +1 -0
  173. package/dist/lib/StringUtils.d.ts +1 -0
  174. package/dist/lib/StringUtils.js +9 -0
  175. package/dist/lib/StringUtils.js.map +1 -0
  176. package/dist/lib/TeminalPassthru.d.ts +7 -0
  177. package/dist/lib/TeminalPassthru.js +12 -0
  178. package/dist/lib/TeminalPassthru.js.map +1 -0
  179. package/dist/lib/TerminalConfirm.d.ts +3 -0
  180. package/dist/lib/TerminalConfirm.js +31 -0
  181. package/dist/lib/TerminalConfirm.js.map +1 -0
  182. package/dist/lib/TerminalInput.d.ts +32 -0
  183. package/dist/lib/TerminalInput.js +207 -0
  184. package/dist/lib/TerminalInput.js.map +1 -0
  185. package/dist/lib/TerminalMenu.d.ts +34 -0
  186. package/dist/lib/TerminalMenu.js +186 -0
  187. package/dist/lib/TerminalMenu.js.map +1 -0
  188. package/dist/lib/TerminalOutput.d.ts +5 -0
  189. package/dist/lib/TerminalOutput.js +12 -0
  190. package/dist/lib/TerminalOutput.js.map +1 -0
  191. package/dist/lib/TerminalSpinner.d.ts +14 -0
  192. package/dist/lib/TerminalSpinner.js +69 -0
  193. package/dist/lib/TerminalSpinner.js.map +1 -0
  194. package/dist/lib/Tracking.d.ts +15 -0
  195. package/dist/lib/Tracking.js +19 -0
  196. package/dist/lib/Tracking.js.map +1 -0
  197. package/dist/lib/build.d.ts +5 -0
  198. package/dist/lib/build.js +41 -0
  199. package/dist/lib/build.js.map +1 -0
  200. package/dist/lib/die.d.ts +5 -0
  201. package/dist/lib/die.js +14 -0
  202. package/dist/lib/die.js.map +1 -0
  203. package/dist/lib/directoryExists.d.ts +1 -0
  204. package/dist/lib/directoryExists.js +9 -0
  205. package/dist/lib/directoryExists.js.map +1 -0
  206. package/dist/lib/formatBuildState.d.ts +2 -0
  207. package/dist/lib/formatBuildState.js +23 -0
  208. package/dist/lib/formatBuildState.js.map +1 -0
  209. package/dist/lib/formatError.d.ts +1 -0
  210. package/dist/lib/formatError.js +55 -0
  211. package/dist/lib/formatError.js.map +1 -0
  212. package/dist/lib/formatJobStatus.d.ts +3 -0
  213. package/dist/lib/formatJobStatus.js +28 -0
  214. package/dist/lib/formatJobStatus.js.map +1 -0
  215. package/dist/lib/formatReviewStatus.d.ts +4 -0
  216. package/dist/lib/formatReviewStatus.js +28 -0
  217. package/dist/lib/formatReviewStatus.js.map +1 -0
  218. package/dist/lib/formatTimstamp.d.ts +1 -0
  219. package/dist/lib/formatTimstamp.js +25 -0
  220. package/dist/lib/formatTimstamp.js.map +1 -0
  221. package/dist/lib/formatVersionState.d.ts +2 -0
  222. package/dist/lib/formatVersionState.js +37 -0
  223. package/dist/lib/formatVersionState.js.map +1 -0
  224. package/dist/lib/gatherAppEnv.d.ts +3 -0
  225. package/dist/lib/gatherAppEnv.js +71 -0
  226. package/dist/lib/gatherAppEnv.js.map +1 -0
  227. package/dist/lib/handleInterrupt.d.ts +1 -0
  228. package/dist/lib/handleInterrupt.js +17 -0
  229. package/dist/lib/handleInterrupt.js.map +1 -0
  230. package/dist/lib/jobRuntime.d.ts +3 -0
  231. package/dist/lib/jobRuntime.js +16 -0
  232. package/dist/lib/jobRuntime.js.map +1 -0
  233. package/dist/lib/migrateOptiCli.d.ts +1 -0
  234. package/dist/lib/migrateOptiCli.js +30 -0
  235. package/dist/lib/migrateOptiCli.js.map +1 -0
  236. package/dist/lib/parseDate.d.ts +2 -0
  237. package/dist/lib/parseDate.js +26 -0
  238. package/dist/lib/parseDate.js.map +1 -0
  239. package/dist/lib/templating/TemplateRenderer.d.ts +13 -0
  240. package/dist/lib/templating/TemplateRenderer.js +63 -0
  241. package/dist/lib/templating/TemplateRenderer.js.map +1 -0
  242. package/dist/lib/templating/fetchTemplatesManifest.d.ts +1 -0
  243. package/dist/lib/templating/fetchTemplatesManifest.js +9 -0
  244. package/dist/lib/templating/fetchTemplatesManifest.js.map +1 -0
  245. package/dist/lib/templating/types.d.ts +27 -0
  246. package/dist/lib/templating/types.js +3 -0
  247. package/dist/lib/templating/types.js.map +1 -0
  248. package/dist/oclif.manifest.json +1616 -0
  249. package/dist/utils/utils.d.ts +5 -0
  250. package/dist/utils/utils.js +61 -0
  251. package/dist/utils/utils.js.map +1 -0
  252. package/package.json +180 -0
@@ -0,0 +1,409 @@
1
+ import { AppContext } from './AppContext';
2
+ import { DotenvParseOutput } from 'dotenv';
3
+ export declare namespace Rivendell {
4
+ enum AppVersionState {
5
+ NEW = "NEW",
6
+ PUBLISHED = "PUBLISHED",
7
+ BUILD_FAILED = "BUILD_FAILED",
8
+ STARTING = "STARTING",
9
+ START_FAILED = "START_FAILED",
10
+ RUNNING = "RUNNING",
11
+ UPGRADING_RUNTIME = "UPGRADING_RUNTIME",
12
+ STOPPING = "STOPPING",
13
+ STOP_FAILED = "STOP_FAILED",
14
+ STOPPED = "STOPPED",
15
+ ABANDONED = "ABANDONED"
16
+ }
17
+ enum ReviewStatus {
18
+ NOT_STARTED = "NOT_STARTED",
19
+ IN_REVIEW = "IN_REVIEW",
20
+ APPROVED = "APPROVED",
21
+ NOT_REQUIRED = "NOT_REQUIRED"
22
+ }
23
+ enum BuildState {
24
+ NEW = "NEW",
25
+ QUEUED = "QUEUED",
26
+ RUNNING = "RUNNING",
27
+ FINISHED = "FINISHED"
28
+ }
29
+ enum BuildMode {
30
+ VALIDATE = "VALIDATE",
31
+ PUBLISH = "PUBLISH"
32
+ }
33
+ enum BuildStatus {
34
+ SUCCESS = "SUCCESS",
35
+ FAILURE = "FAILURE",
36
+ ERROR = "ERROR"
37
+ }
38
+ enum DeploymentStage {
39
+ TEST = "TEST",
40
+ PRODUCTION = "PRODUCTION"
41
+ }
42
+ enum JobStatus {
43
+ PENDING = "PENDING",
44
+ SCHEDULED = "SCHEDULED",
45
+ RUNNING = "RUNNING",
46
+ COMPLETE = "COMPLETE",
47
+ ERROR = "ERROR",
48
+ TERMINATED = "TERMINATED"
49
+ }
50
+ enum JobTriggerType {
51
+ IMMEDIATE = "IMMEDIATE",
52
+ RECURRING = "RECURRING"
53
+ }
54
+ enum LogLevel {
55
+ DEBUG = "DEBUG",
56
+ INFO = "INFO",
57
+ WARN = "WARN",
58
+ ERROR = "ERROR",
59
+ NEVER = "NEVER"
60
+ }
61
+ enum InstallationResolutionType {
62
+ GUUID = "GUUID",
63
+ HEADER = "HEADER",
64
+ QUERY_PARAM = "QUERY_PARAM",
65
+ JSON_BODY_FIELD = "JSON_BODY_FIELD"
66
+ }
67
+ interface AppVersionId {
68
+ appId: string;
69
+ version: string;
70
+ }
71
+ interface Build {
72
+ id: number;
73
+ appVersionId: AppVersionId;
74
+ mode: BuildMode;
75
+ state: BuildState;
76
+ status?: BuildStatus;
77
+ errors?: string[];
78
+ queuedAt?: string;
79
+ runningAt?: string;
80
+ finishedAt?: string;
81
+ dependencySet?: string;
82
+ }
83
+ interface App {
84
+ id: string;
85
+ name: string;
86
+ createdAt: string;
87
+ updatedAt: string;
88
+ }
89
+ interface AppVersion {
90
+ id: AppVersionId;
91
+ manifestJson: string;
92
+ packageUrl: string;
93
+ state: string;
94
+ reviewStatus?: string;
95
+ stage: string;
96
+ image: string;
97
+ accountType: string;
98
+ createdAt: string;
99
+ updatedAt: string;
100
+ }
101
+ interface AppInstallation {
102
+ id: number;
103
+ appId: string;
104
+ version: string;
105
+ accountId: number;
106
+ trackerId: string;
107
+ createdAt: string;
108
+ updatedAt: string;
109
+ }
110
+ interface Job {
111
+ id: string;
112
+ accountId: number;
113
+ trackerId: string;
114
+ status: JobStatus;
115
+ definition: JobDefinition;
116
+ errors: string;
117
+ triggeredAt: string;
118
+ scheduledAt: string;
119
+ startedAt: string;
120
+ completedAt: string;
121
+ terminatedAt: string;
122
+ createdAt: string;
123
+ updatedAt: string;
124
+ }
125
+ interface JobRuntimeStatus {
126
+ status: string;
127
+ }
128
+ interface JobDefinition {
129
+ id: string;
130
+ appId: string;
131
+ version: string;
132
+ function: string;
133
+ parameters: string;
134
+ trigger: JobTriggerType;
135
+ }
136
+ interface Webhook {
137
+ id: string;
138
+ url: string;
139
+ attributes: WebhookAttributes;
140
+ createdAt: string;
141
+ updatedAt?: string;
142
+ deletedAt?: string;
143
+ }
144
+ interface WebhookAttributes {
145
+ appId: string;
146
+ appVersion: string;
147
+ appInstallId?: number;
148
+ taskName: string;
149
+ internal: boolean;
150
+ enabled: boolean;
151
+ installationResolutionType: InstallationResolutionType;
152
+ installationResolutionKey: string;
153
+ installationResolutionValue: string;
154
+ dataSyncId?: string;
155
+ }
156
+ interface AppVersionSearchCriteria {
157
+ appId?: string;
158
+ version?: string;
159
+ appName?: string;
160
+ states?: AppVersionState[];
161
+ reviewStatuses?: ReviewStatus[];
162
+ stages?: DeploymentStage[];
163
+ categories?: Set<string>;
164
+ sorts?: Sort[];
165
+ }
166
+ interface AppInstallationSearchCriteria {
167
+ appId?: string;
168
+ version?: string;
169
+ trackerIds?: string[];
170
+ sorts?: Sort[];
171
+ }
172
+ interface WebhookSearchCriteria {
173
+ appId?: string;
174
+ appInstallId?: number;
175
+ includeInternal?: boolean;
176
+ includeDisabled?: boolean;
177
+ }
178
+ interface JobSearchCriteria {
179
+ appId: string;
180
+ versions?: string[];
181
+ trackerIds?: string[];
182
+ states?: JobStatus[];
183
+ functions?: string[];
184
+ minDurationMillis?: number;
185
+ sort?: Sort[];
186
+ limit?: number;
187
+ start?: number;
188
+ end?: number;
189
+ }
190
+ interface Upgrade {
191
+ id: number;
192
+ status: UpgradeStatus;
193
+ message?: string;
194
+ }
195
+ enum UpgradeStatus {
196
+ SCHEDULED = "SCHEDULED",
197
+ UPGRADING_LIFECYCLE = "UPGRADING_LIFECYLES",
198
+ UPGRADING_LIFECYCLE_FAILED = "UPGRADING_LIFECYCLE_FAILED",
199
+ UPDATING_WEBHOOKS = "UPDATING_WEBHOOKS",
200
+ UPDATING_WEBHOOKS_FAILED = "UPGRADING_LIFECYCLE_FAILED",
201
+ FINALIZING_LIFECYCLE = "FINALIZING_LIFECYCLE",
202
+ FINALIZING_LIFECYCLE_FAILED = "FINALIZING_LIFECYCLE_FAILED",
203
+ COMPLETE = "COMPLETE"
204
+ }
205
+ interface AppReview {
206
+ url: string;
207
+ }
208
+ enum SortDirection {
209
+ ASC = "ASC",
210
+ DESC = "DESC"
211
+ }
212
+ interface Sort {
213
+ field: string;
214
+ direction?: SortDirection;
215
+ }
216
+ enum Audience {
217
+ USER = "USER",
218
+ DEVELOPER = "DEVELOPER",
219
+ ZAIUS = "ZAIUS"
220
+ }
221
+ interface AwsCredentials {
222
+ accessKeyId: string;
223
+ secretAccessKey: string;
224
+ sessionToken: string;
225
+ expiration: string;
226
+ }
227
+ interface Account {
228
+ id: number;
229
+ trackerId: string;
230
+ name: string;
231
+ accountType: string;
232
+ }
233
+ interface DeveloperApp {
234
+ id: string;
235
+ }
236
+ interface Developer {
237
+ id: string;
238
+ email: string;
239
+ role: string;
240
+ vendor: string;
241
+ personal_apps: DeveloperApp[];
242
+ vendor_apps: DeveloperApp[];
243
+ }
244
+ interface Shard {
245
+ id: string;
246
+ description: string;
247
+ url: string;
248
+ live: boolean;
249
+ }
250
+ interface LogLevelRecord {
251
+ appId: string;
252
+ version: string;
253
+ trackerId?: string;
254
+ logLevel: string;
255
+ }
256
+ interface JwtResponse {
257
+ jwt: string;
258
+ }
259
+ interface JwtHeader {
260
+ kid: string;
261
+ typ: string;
262
+ alg: string;
263
+ }
264
+ interface JwtPayload {
265
+ aud: string;
266
+ exp: number;
267
+ iss: string;
268
+ sub: string;
269
+ }
270
+ interface Jwt {
271
+ token: string;
272
+ header: JwtHeader;
273
+ payload: JwtPayload;
274
+ }
275
+ function searchAccounts(term: string, shard: string): Promise<Account[]>;
276
+ function whoami(): Promise<Developer>;
277
+ function isAdmin(): Promise<boolean>;
278
+ /**
279
+ * Register a new App.
280
+ * @param appId
281
+ * @param name
282
+ * @param accountType
283
+ * @param personalApp
284
+ * @param shard
285
+ */
286
+ function registerApp(appId: string, name: string, accountType: any, personalApp: boolean, shard: string): Promise<App>;
287
+ /**
288
+ * Fetch an App by identifier.
289
+ * @param appId
290
+ */
291
+ function fetchApp(appId: string, shard?: string): Promise<App>;
292
+ /**
293
+ * Get app version review url.
294
+ * @param appId
295
+ */
296
+ function getReviewUrl(appVersion: string): Promise<AppReview>;
297
+ /**
298
+ * Search for AppVersions using the supplied criteria.
299
+ * @param criteria
300
+ */
301
+ function searchAppVersions(criteria: AppVersionSearchCriteria, shard: string): Promise<AppVersion[]>;
302
+ /**
303
+ * Fetch an AppVersion by identifier.
304
+ * @param appContext
305
+ */
306
+ function fetchAppVersion(appContext: AppContext, shard: string): Promise<AppVersion>;
307
+ /**
308
+ * Register a new app version.
309
+ */
310
+ function registerAppVersion(appId: string, version: string, packageUrl: string, appEnvValues: DotenvParseOutput, usePreviousAppEnvValues: boolean, shard: string): Promise<AppVersion>;
311
+ /**
312
+ * Register a new app version.
313
+ */
314
+ function updateAppVersion(appId: string, version: string, packageUrl: string, appEnvValues: DotenvParseOutput, usePreviousAppEnvValues: boolean, shard: string): Promise<AppVersion>;
315
+ /**
316
+ * Review an app version.
317
+ */
318
+ function reviewAppVersion(appId: string, version: string): Promise<void>;
319
+ /**
320
+ * Search for AppVersions using the supplied criteria.
321
+ * @param criteria
322
+ */
323
+ function searchAppInstallations(criteria: AppInstallationSearchCriteria, shard: string): Promise<AppInstallation[]>;
324
+ /**
325
+ * Search for Webhooks using the supplied criteria.
326
+ * @param criteria
327
+ */
328
+ function searchWebhooks(criteria: WebhookSearchCriteria, shard: string): Promise<Webhook[]>;
329
+ /**
330
+ * Loads a single AppInstallation.
331
+ * @param appId
332
+ * @param trackerId
333
+ */
334
+ function fetchAppInstallation(appId: string, trackerId: string, shard?: string): Promise<AppInstallation>;
335
+ /**
336
+ * Trigger an installation.
337
+ */
338
+ function install(appId: string, version: string, trackerId: string, shard: string): Promise<AppInstallation>;
339
+ /**
340
+ * Trigger an uninstall.
341
+ */
342
+ function uninstall(appInstallationId: number, shard: string): Promise<void>;
343
+ /**
344
+ * Request an upgrade.
345
+ */
346
+ function upgrade(appInstallationId: number, appId: string, version: string, shard: string): Promise<Upgrade>;
347
+ function fetchUpgrade(upgradeId: number, shard: string): Promise<Upgrade>;
348
+ /**
349
+ * Trigger a publish.
350
+ */
351
+ function publish(appId: string, version: string, shard: string): Promise<void>;
352
+ /**
353
+ * Trigger a unpublish.
354
+ */
355
+ function unpublish(appId: string, version: string, shard: string): Promise<void>;
356
+ /**
357
+ * Trigger a abandon.
358
+ */
359
+ function abandon(appId: string, version: string, shard: string): Promise<void>;
360
+ /**
361
+ * Set logLevel of an app version or an installation
362
+ */
363
+ function setLogLevel(shard: string, appId: string, version: string, logLevel: string, timeToLive: number, trackerId?: string): Promise<void>;
364
+ /**
365
+ * Get logLevel of an app version or an installation
366
+ */
367
+ function getLogLevel(shard: string, appId: string, version: string, trackerId?: string): Promise<LogLevelRecord>;
368
+ /**
369
+ * Fetch a build by id.
370
+ */
371
+ function fetchBuild(id: number): Promise<Build>;
372
+ /**
373
+ * Trigger a build.
374
+ */
375
+ function build(appId: string, version: string, useRCDependencySet: boolean): Promise<Build>;
376
+ /**
377
+ * Trigger a verification.
378
+ */
379
+ function verify(appId: string, version: string): Promise<Build>;
380
+ /**
381
+ * Fetch temp credentials to upload to s3.
382
+ */
383
+ function uploadCredentials(vendor: string, appId: string, version: string, checksum: string): Promise<AwsCredentials>;
384
+ /**
385
+ * List shards.
386
+ */
387
+ function shards(): Promise<Shard[]>;
388
+ /**
389
+ * Search Jobs.
390
+ */
391
+ function searchJobs(criteria: JobSearchCriteria, shard: string): Promise<Job[]>;
392
+ /**
393
+ * Terminate Jobs
394
+ */
395
+ function terminateJob(jobId: string, shard: string): Promise<void>;
396
+ /**
397
+ * Trigger a Job
398
+ */
399
+ function triggerJob(appId: string, jobName: string, trackerId: string, parameters: string, shard: string): Promise<Job>;
400
+ /**
401
+ * Fetch a Job
402
+ */
403
+ function fetchJob(jobId: string, shard: string): Promise<Job>;
404
+ /**
405
+ * Fetch a jobs runtimeStatus
406
+ */
407
+ function fetchJobRuntimeStatus(jobId: string, shard: string): Promise<JobRuntimeStatus>;
408
+ function jwt(shard: string): Promise<string>;
409
+ }