dsh-mobile 0.8.5 → 0.8.6
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/CHANGELOG.md +19 -1
- package/CONTRIBUTORS.md +10 -4
- package/README.en.md +3 -2
- package/README.md +3 -2
- package/apps/mobile/README.md +2 -0
- package/apps/mobile/README.zh-CN.md +2 -0
- package/docs/CLIENT_MODULES.en.md +1 -1
- package/docs/CLIENT_MODULES.md +1 -1
- package/docs/README.md +1 -1
- package/docs/WEB_PUSH.en.md +20 -4
- package/docs/WEB_PUSH.md +20 -4
- package/lib/cli.js +104 -9
- package/lib/cli.js.map +1 -1
- package/lib/client.js +207 -14
- package/lib/client.js.map +1 -1
- package/lib/index.d.mts +40 -1
- package/lib/index.mjs +373 -31
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
- package/packages/question-fixes/package.json +1 -1
package/lib/index.d.mts
CHANGED
|
@@ -1024,6 +1024,17 @@ interface PushRegistration extends PushRecipientKey {
|
|
|
1024
1024
|
readonly enabled: boolean;
|
|
1025
1025
|
readonly health: 'ready' | 'suspended' | 'repair-required';
|
|
1026
1026
|
}
|
|
1027
|
+
interface PushCustomNotification {
|
|
1028
|
+
readonly sessionId: string;
|
|
1029
|
+
readonly title: string;
|
|
1030
|
+
readonly body: string;
|
|
1031
|
+
readonly category?: Exclude<PushCategory, 'test'>;
|
|
1032
|
+
readonly expiresAt?: number;
|
|
1033
|
+
}
|
|
1034
|
+
interface PushCustomNotificationResult {
|
|
1035
|
+
readonly queued: number;
|
|
1036
|
+
readonly expiresAt: number;
|
|
1037
|
+
}
|
|
1027
1038
|
interface PushTarget {
|
|
1028
1039
|
readonly sessionId: string;
|
|
1029
1040
|
readonly interaction: 'current' | 'resolved';
|
|
@@ -1072,6 +1083,7 @@ interface PushGatewayService {
|
|
|
1072
1083
|
logout(owner: PushOwner): Promise<void>;
|
|
1073
1084
|
/** Resolves only an owned, still-valid opaque reference. */
|
|
1074
1085
|
test(owner: PushOwner, installationId: string): Promise<void>;
|
|
1086
|
+
notifyCustom?(input: PushCustomNotification): Promise<PushCustomNotificationResult>;
|
|
1075
1087
|
resolve(owner: PushOwner, reference: string): Promise<PushTarget | undefined>;
|
|
1076
1088
|
}
|
|
1077
1089
|
/** A graph-selection conflict with a bounded diagnostic safe for authenticated callers. */
|
|
@@ -1348,6 +1360,12 @@ export declare class MobileAccessGateway {
|
|
|
1348
1360
|
private broadcastDeviceRevoked;
|
|
1349
1361
|
private pollLegacyCustomChanges;
|
|
1350
1362
|
private openExtensionEventStream;
|
|
1363
|
+
/**
|
|
1364
|
+
* Native background notifications need only Host task and revocation events.
|
|
1365
|
+
* They use the paired session cookie but no mobile document view, because the
|
|
1366
|
+
* App has no live WebView while this stream is serving a suspended page.
|
|
1367
|
+
*/
|
|
1368
|
+
private openBackgroundEventStream;
|
|
1351
1369
|
private readUpgradeResponse;
|
|
1352
1370
|
/** Snapshot of rejected upgrade paths for the approval UI (newest first). */
|
|
1353
1371
|
blockedUpgradePathReport(): BlockedUpgradePathEntry[];
|
|
@@ -1365,6 +1383,27 @@ export declare class MobileAccessGateway {
|
|
|
1365
1383
|
readonly failed: number;
|
|
1366
1384
|
};
|
|
1367
1385
|
}
|
|
1386
|
+
type SendCustomPush = (input: PushCustomNotification) => Promise<PushCustomNotificationResult>;
|
|
1387
|
+
declare module '@deepseek-ai/cordis' {
|
|
1388
|
+
interface Context {
|
|
1389
|
+
/** Trusted Host-plugin API for explicit, consent-checked web-push notifications. */
|
|
1390
|
+
mobilePush: MobilePushService;
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
/**
|
|
1394
|
+
* Small Cordis service exposed to trusted Host plugins. The provider owns the
|
|
1395
|
+
* runtime lifetime and all recipient, category, session, and expiry checks.
|
|
1396
|
+
*/
|
|
1397
|
+
export declare class MobilePushService extends Service {
|
|
1398
|
+
private readonly send;
|
|
1399
|
+
constructor(ctx: Context, send: SendCustomPush);
|
|
1400
|
+
/**
|
|
1401
|
+
* Queue a notification for enabled web-push recipients.
|
|
1402
|
+
* @param input - Session, text, optional category and optional expiry.
|
|
1403
|
+
* @returns The number of newly queued recipient deliveries and the applied expiry.
|
|
1404
|
+
*/
|
|
1405
|
+
notify(input: PushCustomNotification): Promise<PushCustomNotificationResult>;
|
|
1406
|
+
}
|
|
1368
1407
|
interface FrpArtifact {
|
|
1369
1408
|
readonly platform: NodeJS.Platform;
|
|
1370
1409
|
readonly arch: string;
|
|
@@ -2794,5 +2833,5 @@ export declare const inject: string[];
|
|
|
2794
2833
|
export declare function originGatewayConfig(template: ResolvedGatewayConfig, settings: OriginSettings, stateFile: string, instanceId: string, listenPort?: number, legacyInstanceId?: string): ResolvedGatewayConfig;
|
|
2795
2834
|
/** Mount the resident control route and its optional authenticated LAN gateway. */
|
|
2796
2835
|
export declare function apply(ctx: Context, config: PluginConfig): Promise<void>;
|
|
2797
|
-
export { type AccessControllerOptions, type AuthoritySpec, type BlockedUpgradePathEntry, type CaddySiteOptions, type CertRenewalStatus, type ClientModuleEntry, type ClientModulePreferenceSelection, type ClientModulePreferenceView, type CloudflaredComponentStatus, type CloudflaredControllerOptions, type CloudflaredState, type CloudflaredStatus, type CloudflaredTunnelMode, type CloudflaredTunnelSettings, type CloudflaredTunnelStatus, FRP_VHOST_HTTP_PORT as DEFAULT_VHOST_HTTP_PORT, type DeviceProbeResult, type DeviceSnapshot, type DeviceStore, type DeviceSummary, type DisabledTlsConfig, type FrpAttachOptions, type FrpAttachPlan, type FrpAttachPlanLocal, type FrpAttachPlanStep, type FrpAttachStepId, type FrpAttachTemplate, type FrpAttachVpsParts, type FrpComponentStatus, type FrpConfigurationStatus, type FrpControllerOptions, type FrpEntryTls, type FrpIngressCertificate, type FrpIngressPaths, type FrpIngressSelfCheck, type FrpSettings, type FrpState, type FrpStatus, type HostExecutionConfig, type IrohArtifact, type IrohComponentManagerOptions, type IrohComponentStatus, type IrohControllerOptions, type IrohPairingDescriptor, type IrohState, type IrohStatus, type IrohTlsCertificate, type IrohTlsPaths, type LocalExtensionManifest, type MobileAccessControlState, type MobileAccessControlStore, type MobileAccessService as MobileAccessRegistry, type MobileAccessRuntime, type MobileActionContext, type MobileExtensionClientEntry, type MobileExtensionDefinition, type MobileExtensionManifest, type MobileExtensionStatus, type MobileHostAction, type MobileHostRoute, type MobileRouteRequest, type MobileRouteResponse, type MobileWorkerHostApi, type OriginConfigurationStatus, type OriginControllerOptions, type OriginSettings, type OriginState, type OriginStatus, type PairingDescriptorField, type PairingResult, type ParsedCidr, type PluginConfig, type ProvidedTlsConfig, type RemoteProvider, type RemoteProviderController, type RemoteProviderState, type RemoteProviderStatus, type RenewalResult, type ResolvedGatewayConfig, type ResolvedHostExecutionConfig, type ServerCertificateAuthority, type ServerCertificateFiles, type ServerCertificateTarget, type SessionAuthorization, type SessionEndReason, type StoredDevice, type TaskCompletionEvent, type TaskEventContext, type TaskEventSession, type TaskEventSink, type TaskEventWatcherOptions, type TaskTurnEvent, type TlsConfig };
|
|
2836
|
+
export { type AccessControllerOptions, type AuthoritySpec, type BlockedUpgradePathEntry, type CaddySiteOptions, type CertRenewalStatus, type ClientModuleEntry, type ClientModulePreferenceSelection, type ClientModulePreferenceView, type CloudflaredComponentStatus, type CloudflaredControllerOptions, type CloudflaredState, type CloudflaredStatus, type CloudflaredTunnelMode, type CloudflaredTunnelSettings, type CloudflaredTunnelStatus, FRP_VHOST_HTTP_PORT as DEFAULT_VHOST_HTTP_PORT, type DeviceProbeResult, type DeviceSnapshot, type DeviceStore, type DeviceSummary, type DisabledTlsConfig, type FrpAttachOptions, type FrpAttachPlan, type FrpAttachPlanLocal, type FrpAttachPlanStep, type FrpAttachStepId, type FrpAttachTemplate, type FrpAttachVpsParts, type FrpComponentStatus, type FrpConfigurationStatus, type FrpControllerOptions, type FrpEntryTls, type FrpIngressCertificate, type FrpIngressPaths, type FrpIngressSelfCheck, type FrpSettings, type FrpState, type FrpStatus, type HostExecutionConfig, type IrohArtifact, type IrohComponentManagerOptions, type IrohComponentStatus, type IrohControllerOptions, type IrohPairingDescriptor, type IrohState, type IrohStatus, type IrohTlsCertificate, type IrohTlsPaths, type LocalExtensionManifest, type MobileAccessControlState, type MobileAccessControlStore, type MobileAccessService as MobileAccessRegistry, type MobileAccessRuntime, type MobileActionContext, type MobileExtensionClientEntry, type MobileExtensionDefinition, type MobileExtensionManifest, type MobileExtensionStatus, type MobileHostAction, type MobileHostRoute, type MobileRouteRequest, type MobileRouteResponse, type MobileWorkerHostApi, type OriginConfigurationStatus, type OriginControllerOptions, type OriginSettings, type OriginState, type OriginStatus, type PairingDescriptorField, type PairingResult, type ParsedCidr, type PluginConfig, type ProvidedTlsConfig, type PushCustomNotification, type PushCustomNotificationResult, type RemoteProvider, type RemoteProviderController, type RemoteProviderState, type RemoteProviderStatus, type RenewalResult, type ResolvedGatewayConfig, type ResolvedHostExecutionConfig, type SendCustomPush, type ServerCertificateAuthority, type ServerCertificateFiles, type ServerCertificateTarget, type SessionAuthorization, type SessionEndReason, type StoredDevice, type TaskCompletionEvent, type TaskEventContext, type TaskEventSession, type TaskEventSink, type TaskEventWatcherOptions, type TaskTurnEvent, type TlsConfig };
|
|
2798
2837
|
//# sourceMappingURL=index.d.mts.map
|