@capgo/cli 8.0.0-alpha.4 → 8.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 (221) hide show
  1. package/README.md +755 -75
  2. package/dist/index.js +1135 -311
  3. package/dist/keychain-export.swift +351 -0
  4. package/dist/package.json +120 -29
  5. package/dist/src/ai/analyze.d.ts +48 -0
  6. package/dist/src/ai/log-capture.d.ts +14 -0
  7. package/dist/src/ai/prompt.d.ts +1 -0
  8. package/dist/src/ai/render-markdown.d.ts +12 -0
  9. package/dist/src/ai/sse.d.ts +5 -0
  10. package/dist/src/ai/stream-markdown.d.ts +22 -0
  11. package/dist/src/ai/telemetry.d.ts +39 -0
  12. package/dist/src/analytics/error-category.d.ts +11 -0
  13. package/dist/src/analytics/org-resolver.d.ts +11 -0
  14. package/dist/src/analytics/supabase-perf.d.ts +48 -0
  15. package/dist/src/analytics/track.d.ts +70 -0
  16. package/dist/src/api/app.d.ts +17 -8
  17. package/dist/src/api/channels.d.ts +2442 -2729
  18. package/dist/src/api/crypto.d.ts +26 -0
  19. package/dist/src/api/update.d.ts +7 -1
  20. package/dist/src/api/versions.d.ts +9 -2
  21. package/dist/src/app/add.d.ts +6 -4
  22. package/dist/src/app/debug.d.ts +3 -7
  23. package/dist/src/app/delete.d.ts +1 -2
  24. package/dist/src/app/info.d.ts +5 -1
  25. package/dist/src/app/list.d.ts +23 -2
  26. package/dist/src/app/set.d.ts +0 -1
  27. package/dist/src/app/setting.d.ts +3 -9
  28. package/dist/src/app/updateProbe.d.ts +43 -0
  29. package/dist/src/build/credentials-command.d.ts +89 -0
  30. package/dist/src/build/credentials-manage.d.ts +7 -0
  31. package/dist/src/build/credentials.d.ts +78 -0
  32. package/dist/src/build/env-render.d.ts +8 -0
  33. package/dist/src/build/last-output-command.d.ts +6 -0
  34. package/dist/src/build/mobileprovision-parser.d.ts +35 -0
  35. package/dist/src/build/needed.d.ts +28 -0
  36. package/dist/src/build/onboarding/ai-fit.d.ts +110 -0
  37. package/dist/src/build/onboarding/analytics.d.ts +23 -0
  38. package/dist/src/build/onboarding/android/gcp-api.d.ts +128 -0
  39. package/dist/src/build/onboarding/android/gradle-parser.d.ts +19 -0
  40. package/dist/src/build/onboarding/android/keystore.d.ts +77 -0
  41. package/dist/src/build/onboarding/android/oauth-config.d.ts +24 -0
  42. package/dist/src/build/onboarding/android/oauth-google.d.ts +134 -0
  43. package/dist/src/build/onboarding/android/play-api.d.ts +91 -0
  44. package/dist/src/build/onboarding/android/progress.d.ts +22 -0
  45. package/dist/src/build/onboarding/android/service-account-validation.d.ts +58 -0
  46. package/dist/src/build/onboarding/android/types.d.ts +72 -0
  47. package/dist/src/build/onboarding/android/ui/app.d.ts +17 -0
  48. package/dist/src/build/onboarding/app-verification.d.ts +86 -0
  49. package/dist/src/build/onboarding/apple-api.d.ts +234 -0
  50. package/dist/src/build/onboarding/build-log.d.ts +10 -0
  51. package/dist/src/build/onboarding/bundle-id-detector.d.ts +117 -0
  52. package/dist/src/build/onboarding/ci-secrets.d.ts +87 -0
  53. package/dist/src/build/onboarding/command.d.ts +6 -0
  54. package/dist/src/build/onboarding/csr.d.ts +33 -0
  55. package/dist/src/build/onboarding/diff-utils.d.ts +24 -0
  56. package/dist/src/build/onboarding/env-export.d.ts +46 -0
  57. package/dist/src/build/onboarding/error-categories.d.ts +13 -0
  58. package/dist/src/build/onboarding/file-picker.d.ts +47 -0
  59. package/dist/src/build/onboarding/macos-signing.d.ts +190 -0
  60. package/dist/src/build/onboarding/min-terminal-size.d.ts +16 -0
  61. package/dist/src/build/onboarding/progress.d.ts +51 -0
  62. package/dist/src/build/onboarding/recovery.d.ts +7 -0
  63. package/dist/src/build/onboarding/telemetry.d.ts +28 -0
  64. package/dist/src/build/onboarding/types.d.ts +140 -0
  65. package/dist/src/build/onboarding/ui/app.d.ts +36 -0
  66. package/dist/src/build/onboarding/ui/completed-steps-log.d.ts +9 -0
  67. package/dist/src/build/onboarding/ui/components.d.ts +178 -0
  68. package/dist/src/build/onboarding/ui/frame-fit.d.ts +10 -0
  69. package/dist/src/build/onboarding/ui/min-size-gate.d.ts +20 -0
  70. package/dist/src/build/onboarding/ui/platform-picker.d.ts +19 -0
  71. package/dist/src/build/onboarding/ui/shell.d.ts +33 -0
  72. package/dist/src/build/onboarding/ui/steps/android-ci.d.ts +45 -0
  73. package/dist/src/build/onboarding/ui/steps/android-keystore.d.ts +75 -0
  74. package/dist/src/build/onboarding/ui/steps/android-sa-gcp.d.ts +85 -0
  75. package/dist/src/build/onboarding/ui/steps/android-shared.d.ts +67 -0
  76. package/dist/src/build/onboarding/ui/steps/ios-ci.d.ts +44 -0
  77. package/dist/src/build/onboarding/ui/steps/ios-credentials.d.ts +66 -0
  78. package/dist/src/build/onboarding/ui/steps/ios-import.d.ts +79 -0
  79. package/dist/src/build/onboarding/ui/steps/ios-shared.d.ts +93 -0
  80. package/dist/src/build/onboarding/workflow-generator.d.ts +48 -0
  81. package/dist/src/build/onboarding/workflow-ui-helpers.d.ts +18 -0
  82. package/dist/src/build/onboarding/workflow-writer.d.ts +36 -0
  83. package/dist/src/build/output-record.d.ts +30 -0
  84. package/dist/src/build/pbxproj-parser.d.ts +48 -0
  85. package/dist/src/build/platform-paths.d.ts +20 -0
  86. package/dist/src/build/qr.d.ts +5 -0
  87. package/dist/src/build/request.d.ts +107 -0
  88. package/dist/src/build/telemetry.d.ts +17 -0
  89. package/dist/src/bundle/builder-cta.d.ts +67 -0
  90. package/dist/src/bundle/check.d.ts +0 -1
  91. package/dist/src/bundle/cleanup.d.ts +3 -12
  92. package/dist/src/bundle/compatibility.d.ts +23 -12
  93. package/dist/src/bundle/decrypt.d.ts +4 -0
  94. package/dist/src/bundle/delete.d.ts +3 -8
  95. package/dist/src/bundle/encrypt.d.ts +4 -0
  96. package/dist/src/bundle/list.d.ts +5 -2
  97. package/dist/src/bundle/partial.d.ts +5 -3
  98. package/dist/src/bundle/releaseType.d.ts +15 -0
  99. package/dist/src/bundle/unlink.d.ts +6 -5
  100. package/dist/src/bundle/upload-command.d.ts +8 -0
  101. package/dist/src/bundle/upload.d.ts +21 -14
  102. package/dist/src/bundle/upload_interface.d.ts +2 -50
  103. package/dist/src/bundle/zip.d.ts +4 -19
  104. package/dist/src/capacitor-cli.d.ts +13 -0
  105. package/dist/src/channel/add.d.ts +8 -10
  106. package/dist/src/channel/currentBundle.d.ts +3 -9
  107. package/dist/src/channel/delete.d.ts +3 -9
  108. package/dist/src/channel/list.d.ts +31 -4
  109. package/dist/src/channel/set.d.ts +2 -17
  110. package/dist/src/checksum.d.ts +1 -2
  111. package/dist/src/config/index.d.ts +2 -13
  112. package/dist/src/docs.d.ts +0 -1
  113. package/dist/src/github-command.d.ts +9 -0
  114. package/dist/src/github.d.ts +40 -0
  115. package/dist/src/index.d.ts +0 -1
  116. package/dist/src/init/app-conflict.d.ts +2 -0
  117. package/dist/src/init/command.d.ts +57 -0
  118. package/dist/src/init/index.d.ts +1 -0
  119. package/dist/src/init/prompts.d.ts +41 -0
  120. package/dist/src/init/runtime.d.ts +111 -0
  121. package/dist/src/init/ui/app.d.ts +9 -0
  122. package/dist/src/init/ui/components.d.ts +31 -0
  123. package/dist/src/init/ui.d.ts +12 -0
  124. package/dist/src/init/updater.d.ts +13 -0
  125. package/dist/src/key.d.ts +16 -0
  126. package/dist/src/login.d.ts +0 -1
  127. package/dist/src/mcp/server.d.ts +5 -0
  128. package/dist/src/onboarding-support.d.ts +18 -0
  129. package/dist/src/organization/add.d.ts +26 -0
  130. package/dist/src/organization/delete.d.ts +3 -0
  131. package/dist/src/{organisation → organization}/index.d.ts +1 -1
  132. package/dist/src/{organisation → organization}/list.d.ts +14 -2
  133. package/dist/src/organization/members.d.ts +12 -0
  134. package/dist/src/organization/set.d.ts +21 -0
  135. package/dist/src/posthog.d.ts +13 -0
  136. package/dist/src/probe.d.ts +20 -0
  137. package/dist/src/promptPreferences.d.ts +13 -0
  138. package/dist/src/replicationProgress.d.ts +8 -0
  139. package/dist/src/run/device.d.ts +5 -0
  140. package/dist/src/runner-command.d.ts +5 -0
  141. package/dist/src/schemas/app.d.ts +26 -0
  142. package/dist/src/schemas/base.d.ts +7 -0
  143. package/dist/src/schemas/build.d.ts +196 -0
  144. package/dist/src/schemas/bundle.d.ts +157 -0
  145. package/dist/src/schemas/channel.d.ts +62 -0
  146. package/dist/src/schemas/common.d.ts +46 -0
  147. package/dist/src/schemas/config.d.ts +20 -0
  148. package/dist/src/schemas/index.d.ts +19 -0
  149. package/dist/src/schemas/organization.d.ts +41 -0
  150. package/dist/src/schemas/sdk.d.ts +335 -0
  151. package/dist/src/schemas/validate.d.ts +12 -0
  152. package/dist/src/sdk.d.ts +138 -317
  153. package/dist/src/sdk.js +542 -299
  154. package/dist/src/terminal-table.d.ts +7 -0
  155. package/dist/src/types/supabase.types.d.ts +2770 -296
  156. package/dist/src/updaterConfig.d.ts +8 -0
  157. package/dist/src/user/account.d.ts +0 -1
  158. package/dist/src/utils/latest-version.d.ts +0 -1
  159. package/dist/src/utils/safeWrites.d.ts +21 -0
  160. package/dist/src/utils/security_policy_errors.d.ts +47 -0
  161. package/dist/src/utils.d.ts +2869 -341
  162. package/dist/src/versionHelpers.d.ts +19 -0
  163. package/package.json +120 -29
  164. package/skills/native-builds/SKILL.md +255 -0
  165. package/skills/organization-management/SKILL.md +93 -0
  166. package/skills/release-management/SKILL.md +225 -0
  167. package/skills/usage/SKILL.md +92 -0
  168. package/dist/src/api/app.d.ts.map +0 -1
  169. package/dist/src/api/channels.d.ts.map +0 -1
  170. package/dist/src/api/cryptoV2.d.ts +0 -16
  171. package/dist/src/api/cryptoV2.d.ts.map +0 -1
  172. package/dist/src/api/update.d.ts.map +0 -1
  173. package/dist/src/api/versions.d.ts.map +0 -1
  174. package/dist/src/app/add.d.ts.map +0 -1
  175. package/dist/src/app/debug.d.ts.map +0 -1
  176. package/dist/src/app/delete.d.ts.map +0 -1
  177. package/dist/src/app/info.d.ts.map +0 -1
  178. package/dist/src/app/list.d.ts.map +0 -1
  179. package/dist/src/app/set.d.ts.map +0 -1
  180. package/dist/src/app/setting.d.ts.map +0 -1
  181. package/dist/src/bundle/check.d.ts.map +0 -1
  182. package/dist/src/bundle/cleanup.d.ts.map +0 -1
  183. package/dist/src/bundle/compatibility.d.ts.map +0 -1
  184. package/dist/src/bundle/decryptV2.d.ts +0 -13
  185. package/dist/src/bundle/decryptV2.d.ts.map +0 -1
  186. package/dist/src/bundle/delete.d.ts.map +0 -1
  187. package/dist/src/bundle/encryptV2.d.ts +0 -14
  188. package/dist/src/bundle/encryptV2.d.ts.map +0 -1
  189. package/dist/src/bundle/list.d.ts.map +0 -1
  190. package/dist/src/bundle/partial.d.ts.map +0 -1
  191. package/dist/src/bundle/unlink.d.ts.map +0 -1
  192. package/dist/src/bundle/upload.d.ts.map +0 -1
  193. package/dist/src/bundle/upload_interface.d.ts.map +0 -1
  194. package/dist/src/bundle/zip.d.ts.map +0 -1
  195. package/dist/src/channel/add.d.ts.map +0 -1
  196. package/dist/src/channel/currentBundle.d.ts.map +0 -1
  197. package/dist/src/channel/delete.d.ts.map +0 -1
  198. package/dist/src/channel/list.d.ts.map +0 -1
  199. package/dist/src/channel/set.d.ts.map +0 -1
  200. package/dist/src/checksum.d.ts.map +0 -1
  201. package/dist/src/config/index.d.ts.map +0 -1
  202. package/dist/src/docs.d.ts.map +0 -1
  203. package/dist/src/index.d.ts.map +0 -1
  204. package/dist/src/init.d.ts +0 -7
  205. package/dist/src/init.d.ts.map +0 -1
  206. package/dist/src/keyV2.d.ts +0 -19
  207. package/dist/src/keyV2.d.ts.map +0 -1
  208. package/dist/src/login.d.ts.map +0 -1
  209. package/dist/src/organisation/add.d.ts +0 -19
  210. package/dist/src/organisation/add.d.ts.map +0 -1
  211. package/dist/src/organisation/delete.d.ts +0 -8
  212. package/dist/src/organisation/delete.d.ts.map +0 -1
  213. package/dist/src/organisation/index.d.ts.map +0 -1
  214. package/dist/src/organisation/list.d.ts.map +0 -1
  215. package/dist/src/organisation/set.d.ts +0 -13
  216. package/dist/src/organisation/set.d.ts.map +0 -1
  217. package/dist/src/sdk.d.ts.map +0 -1
  218. package/dist/src/types/supabase.types.d.ts.map +0 -1
  219. package/dist/src/user/account.d.ts.map +0 -1
  220. package/dist/src/utils/latest-version.d.ts.map +0 -1
  221. package/dist/src/utils.d.ts.map +0 -1
package/dist/src/sdk.d.ts CHANGED
@@ -1,325 +1,16 @@
1
1
  import type { Channel } from './api/channels';
2
- import type { DecryptResult } from './bundle/decryptV2';
3
- import type { EncryptResult } from './bundle/encryptV2';
4
- import type { UploadBundleResult } from './bundle/upload';
2
+ import type { DecryptResult } from './bundle/decrypt';
3
+ import type { EncryptResult } from './bundle/encrypt';
5
4
  import type { ZipResult } from './bundle/zip';
5
+ import type { StarAllRepositoryResult } from './github';
6
+ import type { ProbeInternalResult } from './probe';
7
+ import type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, OrganizationInfo, ProbeOptions, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, StarAllRepositoriesOptions, StarRepoOptions, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions } from './schemas/sdk';
6
8
  import { getInfoInternal } from './app/info';
7
9
  import { checkCompatibilityInternal } from './bundle/compatibility';
8
10
  export type DoctorInfo = Awaited<ReturnType<typeof getInfoInternal>>;
9
11
  type CompatibilityReport = Awaited<ReturnType<typeof checkCompatibilityInternal>>['finalCompatibility'];
10
12
  export type BundleCompatibilityEntry = CompatibilityReport[number];
11
- /** Common result wrapper for all SDK operations */
12
- export interface SDKResult<T = void> {
13
- success: boolean;
14
- data?: T;
15
- error?: string;
16
- warnings?: string[];
17
- }
18
- export interface AddAppOptions {
19
- /** App ID (e.g., com.example.app) */
20
- appId: string;
21
- /** App name for display in Capgo Cloud */
22
- name?: string;
23
- /** App icon path for display in Capgo Cloud */
24
- icon?: string;
25
- /** API key for authentication */
26
- apikey?: string;
27
- /** Custom Supabase host */
28
- supaHost?: string;
29
- /** Custom Supabase anon key */
30
- supaAnon?: string;
31
- }
32
- export interface UpdateAppOptions {
33
- /** App ID (e.g., com.example.app) */
34
- appId: string;
35
- /** Updated app name */
36
- name?: string;
37
- /** Updated app icon path */
38
- icon?: string;
39
- /** Days to keep old bundles (0 = infinite) */
40
- retention?: number;
41
- /** API key for authentication */
42
- apikey?: string;
43
- /** Custom Supabase host */
44
- supaHost?: string;
45
- /** Custom Supabase anon key */
46
- supaAnon?: string;
47
- }
48
- export interface AppInfo {
49
- appId: string;
50
- name: string;
51
- iconUrl?: string;
52
- createdAt: Date;
53
- }
54
- export interface UploadOptions {
55
- /** App ID (e.g., com.example.app) */
56
- appId: string;
57
- /** Path to build folder */
58
- path: string;
59
- /** Bundle version */
60
- bundle?: string;
61
- /** Channel name */
62
- channel?: string;
63
- /** API key for authentication */
64
- apikey?: string;
65
- /** External URL instead of upload */
66
- external?: string;
67
- /** Enable encryption */
68
- encrypt?: boolean;
69
- /** Private key for encryption */
70
- encryptionKey?: string;
71
- /** Custom Supabase host */
72
- supaHost?: string;
73
- /** Custom Supabase anon key */
74
- supaAnon?: string;
75
- /** Timeout in seconds */
76
- timeout?: number;
77
- /** Use TUS protocol for upload */
78
- useTus?: boolean;
79
- /** Comment for this version */
80
- comment?: string;
81
- /** Minimum update version required */
82
- minUpdateVersion?: string;
83
- /** Automatically set min-update-version when compatibility fails */
84
- autoMinUpdateVersion?: boolean;
85
- /** Allow self-assignment to channel */
86
- selfAssign?: boolean;
87
- /** Package.json paths for monorepos */
88
- packageJsonPaths?: string;
89
- /** Ignore compatibility checks */
90
- ignoreCompatibilityCheck?: boolean;
91
- /** Disable code check for notifyAppReady() */
92
- disableCodeCheck?: boolean;
93
- /** Use legacy zip upload instead of TUS */
94
- useZip?: boolean;
95
- }
96
- export interface UploadResult {
97
- success: boolean;
98
- bundleId?: string;
99
- bundleUrl?: string;
100
- checksum?: string | null;
101
- encryptionMethod?: UploadBundleResult['encryptionMethod'];
102
- sessionKey?: string;
103
- ivSessionKey?: string | null;
104
- storageProvider?: string;
105
- skipped?: boolean;
106
- reason?: string;
107
- error?: string;
108
- warnings?: string[];
109
- }
110
- export interface BundleInfo {
111
- id: string;
112
- version: string;
113
- channel?: string;
114
- uploadedAt: Date;
115
- size: number;
116
- encrypted: boolean;
117
- }
118
- export interface CleanupOptions {
119
- /** App ID */
120
- appId: string;
121
- /** Number of versions to keep */
122
- keep?: number;
123
- /** Bundle version pattern */
124
- bundle?: string;
125
- /** Force removal without confirmation */
126
- force?: boolean;
127
- /** Delete bundles even if linked to channels */
128
- ignoreChannel?: boolean;
129
- /** API key for authentication */
130
- apikey?: string;
131
- /** Custom Supabase host */
132
- supaHost?: string;
133
- /** Custom Supabase anon key */
134
- supaAnon?: string;
135
- }
136
- export interface GenerateKeyOptions {
137
- /** Overwrite existing keys if they already exist */
138
- force?: boolean;
139
- /** Automatically configure the default encryption channel instead of prompting */
140
- setupChannel?: boolean;
141
- }
142
- export interface SaveKeyOptions {
143
- /** Path to the public key file (.pub) */
144
- keyPath?: string;
145
- /** Public key contents as string (used if keyPath not provided) */
146
- keyData?: string;
147
- /** Automatically configure the default encryption channel instead of prompting */
148
- setupChannel?: boolean;
149
- }
150
- export interface DeleteOldKeyOptions {
151
- /** Force deletion if legacy files are present */
152
- force?: boolean;
153
- /** Automatically configure the default encryption channel instead of prompting */
154
- setupChannel?: boolean;
155
- }
156
- export interface AddChannelOptions {
157
- /** Channel ID/name */
158
- channelId: string;
159
- /** App ID */
160
- appId: string;
161
- /** Set as default channel */
162
- default?: boolean;
163
- /** Allow device self-assignment */
164
- selfAssign?: boolean;
165
- /** API key for authentication */
166
- apikey?: string;
167
- /** Custom Supabase host */
168
- supaHost?: string;
169
- /** Custom Supabase anon key */
170
- supaAnon?: string;
171
- }
172
- export interface UpdateChannelOptions {
173
- /** Channel ID/name */
174
- channelId: string;
175
- /** App ID */
176
- appId: string;
177
- /** Bundle version to link */
178
- bundle?: string;
179
- /** Channel state (default or normal) */
180
- state?: string;
181
- /** Allow downgrade */
182
- downgrade?: boolean;
183
- /** Enable for iOS */
184
- ios?: boolean;
185
- /** Enable for Android */
186
- android?: boolean;
187
- /** Allow device self-assignment */
188
- selfAssign?: boolean;
189
- /** Disable auto update strategy */
190
- disableAutoUpdate?: string;
191
- /** Enable for dev builds */
192
- dev?: boolean;
193
- /** Enable for emulators */
194
- emulator?: boolean;
195
- /** API key for authentication */
196
- apikey?: string;
197
- /** Custom Supabase host */
198
- supaHost?: string;
199
- /** Custom Supabase anon key */
200
- supaAnon?: string;
201
- }
202
- export interface AccountIdOptions {
203
- /** API key for authentication */
204
- apikey?: string;
205
- /** Custom Supabase host */
206
- supaHost?: string;
207
- /** Custom Supabase anon key */
208
- supaAnon?: string;
209
- }
210
- export interface ListOrganizationsOptions extends AccountIdOptions {
211
- }
212
- export interface AddOrganizationOptions extends AccountIdOptions {
213
- /** Organization name */
214
- name: string;
215
- /** Management email */
216
- email: string;
217
- }
218
- export interface UpdateOrganizationOptions extends AccountIdOptions {
219
- /** Organization ID */
220
- orgId: string;
221
- /** Updated name */
222
- name?: string;
223
- /** Updated management email */
224
- email?: string;
225
- }
226
- export interface OrganizationInfo {
227
- id: string;
228
- name: string;
229
- role?: string;
230
- appCount?: number;
231
- email?: string;
232
- createdAt?: Date;
233
- }
234
- export interface DeleteOrganizationOptions extends AccountIdOptions {
235
- autoConfirm?: boolean;
236
- }
237
- export interface LoginOptions {
238
- apikey: string;
239
- local?: boolean;
240
- supaHost?: string;
241
- supaAnon?: string;
242
- }
243
- export interface DoctorOptions {
244
- packageJson?: string;
245
- }
246
- export interface BundleCompatibilityOptions {
247
- appId: string;
248
- channel: string;
249
- packageJson?: string;
250
- nodeModules?: string;
251
- textOutput?: boolean;
252
- apikey?: string;
253
- supaHost?: string;
254
- supaAnon?: string;
255
- }
256
- export interface EncryptBundleOptions {
257
- zipPath: string;
258
- checksum: string;
259
- keyPath?: string;
260
- keyData?: string;
261
- json?: boolean;
262
- }
263
- export interface DecryptBundleOptions {
264
- zipPath: string;
265
- ivSessionKey: string;
266
- keyPath?: string;
267
- keyData?: string;
268
- checksum?: string;
269
- }
270
- export interface ZipBundleOptions {
271
- appId: string;
272
- path: string;
273
- bundle?: string;
274
- name?: string;
275
- codeCheck?: boolean;
276
- json?: boolean;
277
- keyV2?: boolean;
278
- packageJson?: string;
279
- }
280
- export interface CurrentBundleOptions extends AccountIdOptions {
281
- }
282
- export interface SetSettingOptions {
283
- apikey?: string;
284
- bool?: string;
285
- string?: string;
286
- }
287
- export interface StatsOrder {
288
- key: string;
289
- sortable?: 'asc' | 'desc';
290
- }
291
- export interface GetStatsOptions {
292
- /** App ID */
293
- appId: string;
294
- /** Filter by specific device IDs */
295
- deviceIds?: string[];
296
- /** Search query */
297
- search?: string;
298
- /** Sort order */
299
- order?: StatsOrder[];
300
- /** Start date/time for range filter (ISO string) */
301
- rangeStart?: string;
302
- /** End date/time for range filter (ISO string) */
303
- rangeEnd?: string;
304
- /** Limit number of results */
305
- limit?: number;
306
- /** Get only stats after this timestamp (for polling) */
307
- after?: string | null;
308
- /** API key for authentication */
309
- apikey?: string;
310
- /** Custom Supabase host */
311
- supaHost?: string;
312
- /** Custom Supabase anon key */
313
- supaAnon?: string;
314
- }
315
- export interface DeviceStats {
316
- appId: string;
317
- deviceId: string;
318
- action: string;
319
- versionId: number;
320
- version?: number;
321
- createdAt: string;
322
- }
13
+ export type { UpdateProbeResult } from './app/updateProbe';
323
14
  /**
324
15
  * Capgo SDK for programmatic access to all CLI functionality.
325
16
  * Use this class to integrate Capgo operations directly into your application.
@@ -418,6 +109,35 @@ export declare class CapgoSDK {
418
109
  * Retrieve the account ID associated with the configured API key
419
110
  */
420
111
  getAccountId(options?: AccountIdOptions): Promise<SDKResult<string>>;
112
+ /**
113
+ * Star the Capgo repository on GitHub
114
+ *
115
+ * @example
116
+ * ```typescript
117
+ * const result = await sdk.starRepo({ repository: 'Cap-go/capacitor-updater' })
118
+ * if (result.success) {
119
+ * console.log(`${result.data?.repository} starred`)
120
+ * }
121
+ * ```
122
+ */
123
+ starRepo(options?: StarRepoOptions): Promise<SDKResult<{
124
+ repository: string;
125
+ alreadyStarred: boolean;
126
+ }>>;
127
+ /**
128
+ * Star the Capgo-related repositories on GitHub
129
+ *
130
+ * @example
131
+ * ```typescript
132
+ * const result = await sdk.starAllRepositories()
133
+ * if (result.success) {
134
+ * for (const entry of result.data ?? []) {
135
+ * console.log(entry.repository, entry.status)
136
+ * }
137
+ * }
138
+ * ```
139
+ */
140
+ starAllRepositories(options?: StarAllRepositoriesOptions): Promise<SDKResult<StarAllRepositoryResult[]>>;
421
141
  checkBundleCompatibility(options: BundleCompatibilityOptions): Promise<SDKResult<BundleCompatibilityEntry[]>>;
422
142
  encryptBundle(options: EncryptBundleOptions): Promise<SDKResult<EncryptResult>>;
423
143
  decryptBundle(options: DecryptBundleOptions): Promise<SDKResult<DecryptResult>>;
@@ -478,6 +198,42 @@ export declare class CapgoSDK {
478
198
  removed: number;
479
199
  kept: number;
480
200
  }>>;
201
+ /**
202
+ * Request a native build for your app with store publishing
203
+ *
204
+ * SECURITY GUARANTEE:
205
+ * Credentials provided to this method are NEVER stored on Capgo servers.
206
+ * They are used only during the build process and automatically deleted
207
+ * after completion (maximum 24 hours retention). Build outputs may optionally
208
+ * be uploaded for time-limited download links.
209
+ *
210
+ * @example
211
+ * ```typescript
212
+ * const result = await sdk.requestBuild({
213
+ * appId: 'com.example.app',
214
+ * path: './my-project',
215
+ * lane: 'ios', // Must be exactly "ios" or "android"
216
+ * credentials: {
217
+ * BUILD_CERTIFICATE_BASE64: 'base64-cert...',
218
+ * CAPGO_IOS_PROVISIONING_MAP: '{"com.example.app":{"profile":"base64...","name":"match AppStore com.example.app"}}',
219
+ * P12_PASSWORD: 'cert-password',
220
+ * APPLE_KEY_ID: 'KEY123',
221
+ * APPLE_ISSUER_ID: 'issuer-uuid',
222
+ * APPLE_KEY_CONTENT: 'base64-p8...',
223
+ * APP_STORE_CONNECT_TEAM_ID: 'team-id'
224
+ * }
225
+ * })
226
+ *
227
+ * if (result.success) {
228
+ * console.log('Job ID:', result.data.jobId)
229
+ * }
230
+ * ```
231
+ */
232
+ requestBuild(options: RequestBuildOptions): Promise<SDKResult<{
233
+ jobId: string;
234
+ uploadUrl: string;
235
+ status: string;
236
+ }>>;
481
237
  getCurrentBundle(appId: string, channelId: string, options?: CurrentBundleOptions): Promise<SDKResult<string>>;
482
238
  /**
483
239
  * Create a new channel for app distribution
@@ -593,6 +349,7 @@ export declare class CapgoSDK {
593
349
  */
594
350
  getStats(options: GetStatsOptions): Promise<SDKResult<DeviceStats[]>>;
595
351
  setAppSetting(path: string, options: SetSettingOptions): Promise<SDKResult>;
352
+ probe(options: ProbeOptions): Promise<SDKResult<ProbeInternalResult>>;
596
353
  }
597
354
  /**
598
355
  * Upload a bundle to Capgo Cloud (functional API)
@@ -614,6 +371,11 @@ export declare function checkBundleCompatibility(options: BundleCompatibilityOpt
614
371
  export declare function encryptBundle(options: EncryptBundleOptions): Promise<SDKResult<EncryptResult>>;
615
372
  export declare function decryptBundle(options: DecryptBundleOptions): Promise<SDKResult<DecryptResult>>;
616
373
  export declare function zipBundle(options: ZipBundleOptions): Promise<SDKResult<ZipResult>>;
374
+ export declare function starRepo(options?: StarRepoOptions): Promise<SDKResult<{
375
+ repository: string;
376
+ alreadyStarred: boolean;
377
+ }>>;
378
+ export declare function starAllRepositories(options?: StarAllRepositoriesOptions): Promise<SDKResult<StarAllRepositoryResult[]>>;
617
379
  export declare function generateEncryptionKeys(options?: GenerateKeyOptions): Promise<SDKResult>;
618
380
  export declare function saveEncryptionKey(options?: SaveKeyOptions): Promise<SDKResult>;
619
381
  export declare function deleteLegacyEncryptionKey(options?: DeleteOldKeyOptions): Promise<SDKResult<{
@@ -667,6 +429,50 @@ export declare function listBundles(appId: string, options?: {
667
429
  * ```
668
430
  */
669
431
  export declare function addChannel(options: AddChannelOptions): Promise<SDKResult>;
432
+ /**
433
+ * Request a native build for your app (functional API)
434
+ *
435
+ * SECURITY GUARANTEE:
436
+ * Credentials are NEVER stored on Capgo servers. They are used only during
437
+ * the build process and automatically deleted after completion.
438
+ * Build outputs may optionally be uploaded for time-limited download links.
439
+ *
440
+ * @example
441
+ * ```typescript
442
+ * const result = await requestBuild({
443
+ * appId: 'com.example.app',
444
+ * path: './my-project',
445
+ * lane: 'ios', // Must be exactly "ios" or "android"
446
+ * credentials: {
447
+ * // iOS credentials (use standard environment variable names)
448
+ * BUILD_CERTIFICATE_BASE64: 'base64-encoded-cert',
449
+ * BUILD_PROVISION_PROFILE_BASE64: 'base64-encoded-profile',
450
+ * P12_PASSWORD: 'cert-password',
451
+ * APPLE_KEY_ID: 'KEY123',
452
+ * APPLE_ISSUER_ID: 'issuer-uuid',
453
+ * APPLE_KEY_CONTENT: 'base64-encoded-p8',
454
+ * APP_STORE_CONNECT_TEAM_ID: 'team-id',
455
+ * // Android credentials (use standard environment variable names)
456
+ * ANDROID_KEYSTORE_FILE: 'base64-encoded-keystore',
457
+ * KEYSTORE_KEY_ALIAS: 'my-key-alias',
458
+ * KEYSTORE_KEY_PASSWORD: 'key-password',
459
+ * KEYSTORE_STORE_PASSWORD: 'store-password',
460
+ * PLAY_CONFIG_JSON: 'base64-encoded-service-account-json'
461
+ * },
462
+ * apikey: 'your-api-key'
463
+ * })
464
+ *
465
+ * if (result.success) {
466
+ * console.log('Job ID:', result.data.jobId)
467
+ * console.log('Status:', result.data.status)
468
+ * }
469
+ * ```
470
+ */
471
+ export declare function requestBuild(options: RequestBuildOptions): Promise<SDKResult<{
472
+ jobId: string;
473
+ uploadUrl: string;
474
+ status: string;
475
+ }>>;
670
476
  /**
671
477
  * Get device statistics/logs from Capgo backend (functional API)
672
478
  *
@@ -690,6 +496,7 @@ export declare function addChannel(options: AddChannelOptions): Promise<SDKResul
690
496
  * ```
691
497
  */
692
498
  export declare function getStats(options: GetStatsOptions): Promise<SDKResult<DeviceStats[]>>;
499
+ export declare function probeUpdates(options: ProbeOptions): Promise<SDKResult<ProbeInternalResult>>;
693
500
  /**
694
501
  * Get Capacitor configuration
695
502
  *
@@ -701,8 +508,22 @@ export declare function getStats(options: GetStatsOptions): Promise<SDKResult<De
701
508
  * }
702
509
  * ```
703
510
  */
704
- export declare function getCapacitorConfig(): Promise<import("./config").ExtConfigPairs | null>;
511
+ export declare function getCapacitorConfig(): Promise<{
512
+ config: {
513
+ [x: string]: unknown;
514
+ appId: string;
515
+ appName: string;
516
+ webDir: string;
517
+ plugins?: Record<string, any> | undefined;
518
+ android?: Record<string, any> | undefined;
519
+ };
520
+ path: string;
521
+ } | null>;
522
+ export type { BuildCredentials } from './build/request';
705
523
  export type { CapacitorConfig } from './config';
524
+ export type { ProbeInternalResult } from './probe';
525
+ export type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, OrganizationInfo, ProbeOptions, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, StarAllRepositoriesOptions, StarRepoOptions, StatsOrder, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions, } from './schemas/sdk';
706
526
  export type { Database } from './types/supabase.types';
707
527
  export { createSupabaseClient } from './utils';
708
- //# sourceMappingURL=sdk.d.ts.map
528
+ export { formatApiErrorForCli, getSecurityPolicyMessage, isSecurityPolicyError, parseSecurityPolicyError, SECURITY_POLICY_ERRORS, SECURITY_POLICY_MESSAGES, } from './utils/security_policy_errors';
529
+ export type { ParsedSecurityError, SecurityPolicyErrorCode } from './utils/security_policy_errors';