@a-cube-io/ereceipts-js-sdk 2.0.8 → 2.0.9

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/dist/index.d.ts CHANGED
@@ -1217,10 +1217,12 @@ interface AppState {
1217
1217
  isOnline: boolean;
1218
1218
  warning: WarningState;
1219
1219
  lastNotification: Notification | null;
1220
+ certificateMissing: boolean;
1220
1221
  }
1221
1222
  declare class AppStateService {
1222
1223
  private readonly notifications$;
1223
1224
  private readonly networkPort;
1225
+ private readonly certificateMissingInput$;
1224
1226
  private readonly stateSubject;
1225
1227
  private readonly destroy$;
1226
1228
  private warningTimerId;
@@ -1228,7 +1230,8 @@ declare class AppStateService {
1228
1230
  get mode$(): Observable<AppMode>;
1229
1231
  get isBlocked$(): Observable<boolean>;
1230
1232
  get warning$(): Observable<WarningState>;
1231
- constructor(notifications$: Observable<Notification[]>, networkPort: INetworkPort);
1233
+ get certificateMissing$(): Observable<boolean>;
1234
+ constructor(notifications$: Observable<Notification[]>, networkPort: INetworkPort, certificateMissingInput$?: Observable<boolean>);
1232
1235
  private setupSubscriptions;
1233
1236
  private processState;
1234
1237
  private getLatestNotificationByCode;
@@ -1332,6 +1335,9 @@ interface ManagedServices {
1332
1335
  }) => Promise<void>;
1333
1336
  hasCertificate: () => Promise<boolean>;
1334
1337
  clearCertificate: () => Promise<void>;
1338
+ getCertificate: () => Promise<StoredCertificate | null>;
1339
+ getCertificatesInfo: () => Promise<CertificateInfo | null>;
1340
+ notifications: INotificationRepository;
1335
1341
  isOnline: () => boolean;
1336
1342
  }
1337
1343
  /**
@@ -1391,6 +1397,7 @@ declare class SDKManager {
1391
1397
  private appStateService;
1392
1398
  private isInitialized;
1393
1399
  private isPollingActive;
1400
+ private readonly certificateMissingSubject;
1394
1401
  private constructor();
1395
1402
  /**
1396
1403
  * Handle user state changes (login/logout/token expiration)
@@ -1438,6 +1445,11 @@ declare class SDKManager {
1438
1445
  * Observable stream of warning state with countdown
1439
1446
  */
1440
1447
  get warning$(): Observable<WarningState>;
1448
+ /**
1449
+ * Observable stream indicating if certificate is missing
1450
+ * When true, polling is blocked and the user should install a certificate
1451
+ */
1452
+ get certificateMissing$(): Observable<boolean>;
1441
1453
  /**
1442
1454
  * Observable stream of telemetry state (data, isLoading, isCached, error)
1443
1455
  */
@@ -1479,6 +1491,11 @@ declare class SDKManager {
1479
1491
  * Get the underlying SDK instance (for advanced use cases)
1480
1492
  */
1481
1493
  getSDK(): ACubeSDK;
1494
+ /**
1495
+ * Check certificate availability and update certificateMissing state.
1496
+ * Returns true if certificate is available, false otherwise.
1497
+ */
1498
+ private checkCertificate;
1482
1499
  private cleanup;
1483
1500
  private ensureInitialized;
1484
1501
  }
@@ -2544,11 +2561,11 @@ declare const AddressSchema: z.ZodObject<{
2544
2561
  province: z.ZodString;
2545
2562
  }, z.core.$strip>;
2546
2563
  declare const PEMStatusSchema: z.ZodEnum<{
2564
+ ONLINE: "ONLINE";
2565
+ OFFLINE: "OFFLINE";
2547
2566
  NEW: "NEW";
2548
2567
  REGISTERED: "REGISTERED";
2549
2568
  ACTIVATED: "ACTIVATED";
2550
- ONLINE: "ONLINE";
2551
- OFFLINE: "OFFLINE";
2552
2569
  DISCARDED: "DISCARDED";
2553
2570
  }>;
2554
2571
  declare const ActivationRequestSchema: z.ZodObject<{