@capgo/cli 7.76.8 → 7.77.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.
- package/README.md +24 -1
- package/dist/index.js +343 -338
- package/dist/package.json +1 -1
- package/dist/src/app/updateProbe.d.ts +43 -0
- package/dist/src/probe.d.ts +20 -0
- package/dist/src/schemas/sdk.d.ts +7 -0
- package/dist/src/sdk.d.ts +7 -2
- package/dist/src/sdk.js +274 -274
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const updateProbeDeviceId = "00000000-0000-0000-0000-000000000000";
|
|
2
|
+
interface UpdateProbePayload {
|
|
3
|
+
app_id: string;
|
|
4
|
+
device_id: string;
|
|
5
|
+
version_name: string;
|
|
6
|
+
version_build: string;
|
|
7
|
+
is_emulator: boolean;
|
|
8
|
+
is_prod: boolean;
|
|
9
|
+
platform: 'ios' | 'android';
|
|
10
|
+
plugin_version: string;
|
|
11
|
+
defaultChannel: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PreparedUpdateProbe {
|
|
14
|
+
endpoint: string;
|
|
15
|
+
payload: UpdateProbePayload;
|
|
16
|
+
nativeSource: string;
|
|
17
|
+
versionBuildSource: string;
|
|
18
|
+
appIdSource: string;
|
|
19
|
+
}
|
|
20
|
+
export type PrepareUpdateProbeResult = {
|
|
21
|
+
ok: true;
|
|
22
|
+
context: PreparedUpdateProbe;
|
|
23
|
+
} | {
|
|
24
|
+
ok: false;
|
|
25
|
+
error: string;
|
|
26
|
+
};
|
|
27
|
+
export type UpdateProbeResult = {
|
|
28
|
+
success: true;
|
|
29
|
+
availableVersion: string;
|
|
30
|
+
} | {
|
|
31
|
+
success: false;
|
|
32
|
+
reason: string;
|
|
33
|
+
backendRefusal: boolean;
|
|
34
|
+
errorCode?: string;
|
|
35
|
+
backendMessage?: string;
|
|
36
|
+
extra?: Record<string, unknown>;
|
|
37
|
+
};
|
|
38
|
+
export declare function prepareUpdateProbe(platform: 'ios' | 'android', capConfig: any): Promise<PrepareUpdateProbeResult>;
|
|
39
|
+
export declare function singleProbeRequest(endpoint: string, payload: UpdateProbePayload): Promise<UpdateProbeResult>;
|
|
40
|
+
export declare function explainCommonUpdateError(result: Extract<UpdateProbeResult, {
|
|
41
|
+
success: false;
|
|
42
|
+
}>): string[];
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { UpdateProbeResult } from './app/updateProbe';
|
|
2
|
+
interface ProbeOptions {
|
|
3
|
+
platform?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ProbeInternalResult {
|
|
6
|
+
success: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
probeResult?: UpdateProbeResult;
|
|
9
|
+
endpoint?: string;
|
|
10
|
+
platform?: 'ios' | 'android';
|
|
11
|
+
versionBuild?: string;
|
|
12
|
+
versionBuildSource?: string;
|
|
13
|
+
appId?: string;
|
|
14
|
+
appIdSource?: string;
|
|
15
|
+
nativeSource?: string;
|
|
16
|
+
hints?: string[];
|
|
17
|
+
}
|
|
18
|
+
export declare function probeInternal(options: ProbeOptions): Promise<ProbeInternalResult>;
|
|
19
|
+
export declare function probe(options: ProbeOptions): Promise<void>;
|
|
20
|
+
export {};
|
|
@@ -324,3 +324,10 @@ export declare const deviceStatsSchema: z.ZodObject<{
|
|
|
324
324
|
createdAt: z.ZodString;
|
|
325
325
|
}, z.core.$strip>;
|
|
326
326
|
export type DeviceStats = z.infer<typeof deviceStatsSchema>;
|
|
327
|
+
export declare const probeOptionsSchema: z.ZodObject<{
|
|
328
|
+
platform: z.ZodEnum<{
|
|
329
|
+
ios: "ios";
|
|
330
|
+
android: "android";
|
|
331
|
+
}>;
|
|
332
|
+
}, z.core.$strip>;
|
|
333
|
+
export type ProbeOptions = z.infer<typeof probeOptionsSchema>;
|
package/dist/src/sdk.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type { Channel } from './api/channels';
|
|
|
2
2
|
import type { DecryptResult } from './bundle/decrypt';
|
|
3
3
|
import type { EncryptResult } from './bundle/encrypt';
|
|
4
4
|
import type { ZipResult } from './bundle/zip';
|
|
5
|
-
import type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, OrganizationInfo, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions } from './schemas/sdk';
|
|
5
|
+
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, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions } from './schemas/sdk';
|
|
6
|
+
import type { ProbeInternalResult } from './probe';
|
|
6
7
|
import { getInfoInternal } from './app/info';
|
|
7
8
|
import { checkCompatibilityInternal } from './bundle/compatibility';
|
|
8
9
|
export type DoctorInfo = Awaited<ReturnType<typeof getInfoInternal>>;
|
|
@@ -318,6 +319,7 @@ export declare class CapgoSDK {
|
|
|
318
319
|
*/
|
|
319
320
|
getStats(options: GetStatsOptions): Promise<SDKResult<DeviceStats[]>>;
|
|
320
321
|
setAppSetting(path: string, options: SetSettingOptions): Promise<SDKResult>;
|
|
322
|
+
probe(options: ProbeOptions): Promise<SDKResult<ProbeInternalResult>>;
|
|
321
323
|
}
|
|
322
324
|
/**
|
|
323
325
|
* Upload a bundle to Capgo Cloud (functional API)
|
|
@@ -459,6 +461,7 @@ export declare function requestBuild(options: RequestBuildOptions): Promise<SDKR
|
|
|
459
461
|
* ```
|
|
460
462
|
*/
|
|
461
463
|
export declare function getStats(options: GetStatsOptions): Promise<SDKResult<DeviceStats[]>>;
|
|
464
|
+
export declare function probeUpdates(options: ProbeOptions): Promise<SDKResult<ProbeInternalResult>>;
|
|
462
465
|
/**
|
|
463
466
|
* Get Capacitor configuration
|
|
464
467
|
*
|
|
@@ -482,7 +485,9 @@ export declare function getCapacitorConfig(): Promise<{
|
|
|
482
485
|
path: string;
|
|
483
486
|
} | null>;
|
|
484
487
|
export type { CapacitorConfig } from './config';
|
|
485
|
-
export type { AccountIdOptions, AddAppOptions, AddChannelOptions, AddOrganizationOptions, AppInfo, BundleCompatibilityOptions, BundleInfo, CleanupOptions, CurrentBundleOptions, DecryptBundleOptions, DeleteOldKeyOptions, DeleteOrganizationOptions, DeviceStats, DoctorOptions, EncryptBundleOptions, GenerateKeyOptions, GetStatsOptions, ListOrganizationsOptions, LoginOptions, OrganizationInfo, RequestBuildOptions, SaveKeyOptions, SDKResult, SetSettingOptions, StatsOrder, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions, } from './schemas/sdk';
|
|
488
|
+
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, StatsOrder, UpdateAppOptions, UpdateChannelOptions, UpdateOrganizationOptions, UploadOptions, UploadResult, ZipBundleOptions, } from './schemas/sdk';
|
|
489
|
+
export type { UpdateProbeResult } from './app/updateProbe';
|
|
490
|
+
export type { ProbeInternalResult } from './probe';
|
|
486
491
|
export type { Database } from './types/supabase.types';
|
|
487
492
|
export { createSupabaseClient } from './utils';
|
|
488
493
|
export { formatApiErrorForCli, getSecurityPolicyMessage, isSecurityPolicyError, parseSecurityPolicyError, SECURITY_POLICY_ERRORS, SECURITY_POLICY_MESSAGES, } from './utils/security_policy_errors';
|