imzo-agnost 1.0.0 → 1.2.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.
package/dist/index.d.cts CHANGED
@@ -484,6 +484,80 @@ declare class IDCardPlugin extends EIMZOPlugin {
484
484
  loadKey: (cardIndex: number, password: string, onSuccess: CallbackFunction<string>, onError: ErrorCallback) => void;
485
485
  }
486
486
 
487
+ /**
488
+ * E-IMZO Session Manager
489
+ * KeyId larni saqlash va avtomatik unload qilish uchun
490
+ */
491
+ type StorageType = 'sessionStorage' | 'localStorage' | 'cookie' | 'memory';
492
+ interface SessionConfig {
493
+ storageType: StorageType;
494
+ autoUnloadAfter: number;
495
+ keyPrefix: string;
496
+ cookieOptions?: {
497
+ domain?: string;
498
+ path?: string;
499
+ secure?: boolean;
500
+ sameSite?: 'strict' | 'lax' | 'none';
501
+ };
502
+ }
503
+ interface KeySession {
504
+ keyId: string;
505
+ certificateId: string;
506
+ loadedAt: number;
507
+ expiresAt: number;
508
+ certificate: unknown;
509
+ autoUnload: boolean;
510
+ }
511
+ declare class EIMZOSessionManager {
512
+ private config;
513
+ private sessions;
514
+ private cleanupInterval;
515
+ constructor(config?: Partial<SessionConfig>);
516
+ /**
517
+ * KeyId ni session storage ga saqlash
518
+ */
519
+ saveKeySession(keyId: string, certificateId: string, certificate: unknown, autoUnload?: boolean): void;
520
+ /**
521
+ * Certificate ID bo'yicha keyId ni olish
522
+ */
523
+ getKeyId(certificateId: string): string | null;
524
+ /**
525
+ * Barcha active key sessions ni olish
526
+ */
527
+ getActiveSessions(): KeySession[];
528
+ /**
529
+ * Session ni kengaytirish (6 soat yana qo'shish)
530
+ */
531
+ extendSession(certificateId: string): boolean;
532
+ /**
533
+ * Key session ni o'chirish
534
+ */
535
+ removeKeySession(certificateId: string): Promise<void>;
536
+ /**
537
+ * Barcha sessionlarni tozalash
538
+ */
539
+ clearAllSessions(): Promise<void>;
540
+ /**
541
+ * Storage configuration ni o'zgartirish
542
+ */
543
+ updateConfig(newConfig: Partial<SessionConfig>): void;
544
+ private saveToStorage;
545
+ private loadFromStorage;
546
+ private removeFromStorage;
547
+ private initializeFromStorage;
548
+ private startCleanupTimer;
549
+ private cleanupExpiredSessions;
550
+ private unloadKeyFromEIMZO;
551
+ private setCookie;
552
+ private getCookie;
553
+ private deleteCookie;
554
+ /**
555
+ * Cleanup when instance is destroyed
556
+ */
557
+ destroy(): void;
558
+ }
559
+ declare const sessionManager: EIMZOSessionManager;
560
+
487
561
  interface PfxCertificate extends CertificateInfo {
488
562
  disk: string;
489
563
  path: string;
@@ -500,10 +574,32 @@ interface DiskInfo$1 {
500
574
  }
501
575
  /**
502
576
  * PFX Plugin for working with PFX key storage files
577
+ * Session management support for automatic key lifecycle
503
578
  */
504
579
  declare class PfxPlugin extends EIMZOPlugin {
505
580
  readonly name = "pfx";
506
- readonly description = "Plugin for working with PFX key storage files";
581
+ readonly description = "Plugin for working with PFX key storage files with session management";
582
+ updateSessionConfig(config: Partial<SessionConfig>): void;
583
+ private certificateCache;
584
+ /**
585
+ * Get keyId from certificate identifier
586
+ * Used for: await pfxPlugin.verifyPasswordAsync(keyId);
587
+ * @param certificateId - Format: "disk:path:name:alias" or just "alias"
588
+ * @returns keyId or null if not found
589
+ */
590
+ getKeyId(certificateId: string): string | null;
591
+ /**
592
+ * Get all active key sessions
593
+ */
594
+ getActiveSessions(): KeySession[];
595
+ /**
596
+ * Find certificate ID by partial match (alias, name, etc.)
597
+ */
598
+ findCertificateId(searchTerm: string): string | null;
599
+ /**
600
+ * Clear all sessions
601
+ */
602
+ clearAllSessions(): Promise<void>;
507
603
  /**
508
604
  * Get list of available disks
509
605
  */
@@ -519,9 +615,14 @@ declare class PfxPlugin extends EIMZOPlugin {
519
615
  */
520
616
  listAllCertificates: (onSuccess: CallbackFunction<PfxListResponse>, onError: ErrorCallback) => void;
521
617
  /**
522
- * Load key and get key identifier
618
+ * Load key and get key identifier with session management
619
+ * @param disk - Storage disk name
620
+ * @param path - Path to PFX file
621
+ * @param name - File name
622
+ * @param alias - Certificate alias
623
+ * @param saveForHours - Save in session for automatic management (6 hours default)
523
624
  */
524
- loadKey: (disk: string, path: string, name: string, alias: string, onSuccess: CallbackFunction<KeyResponse>, onError: ErrorCallback) => void;
625
+ loadKey: (disk: string, path: string, name: string, alias: string, onSuccess: CallbackFunction<KeyResponse>, onError: ErrorCallback, saveForHours?: number) => void;
525
626
  /**
526
627
  * Unload key by identifier
527
628
  */
@@ -567,9 +668,14 @@ declare class PfxPlugin extends EIMZOPlugin {
567
668
  */
568
669
  listAllCertificatesAsync: () => Promise<PfxListResponse>;
569
670
  /**
570
- * Load key (Promise version)
671
+ * Load key (Promise version) with session management
672
+ * @param disk Storage disk name
673
+ * @param path Path to PFX file
674
+ * @param name File name
675
+ * @param alias Certificate alias
676
+ * @param saveForHours Save in session for automatic management
571
677
  */
572
- loadKeyAsync: (args_0: string, args_1: string, args_2: string, args_3: string) => Promise<KeyResponse>;
678
+ loadKeyAsync: (disk: string, path: string, name: string, alias: string, saveForHours?: number) => Promise<KeyResponse>;
573
679
  /**
574
680
  * Unload key (Promise version)
575
681
  */
@@ -641,6 +747,10 @@ interface Pkcs7Response {
641
747
  success: true;
642
748
  pkcs7_64: string;
643
749
  }
750
+ interface Pkcs7CreateOptions {
751
+ detached?: boolean | 'yes' | 'no' | '';
752
+ autoBase64?: boolean;
753
+ }
644
754
  interface Pkcs7InfoResponse {
645
755
  success: boolean;
646
756
  signatures: {
@@ -655,16 +765,29 @@ interface Pkcs7InfoResponse {
655
765
  declare class Pkcs7Plugin extends EIMZOPlugin {
656
766
  readonly name = "pkcs7";
657
767
  readonly description = "Plugin for working with PKCS#7/CMS format";
768
+ private isBase64;
769
+ /**
770
+ * Create PKCS#7/CMS document by signing with key (enhanced version)
771
+ * @param data - String data or already base64 encoded data
772
+ * @param keyId - Key identifier
773
+ * @param options - Creation options with smart defaults
774
+ */
775
+ createPkcs7Enhanced: (data: string, keyId: string, options: Pkcs7CreateOptions | undefined, onSuccess: CallbackFunction<Pkcs7Response>, onError: ErrorCallback) => void;
658
776
  /**
659
- * Create PKCS#7/CMS document by signing with key
777
+ * Create PKCS#7/CMS document by signing with key (original method)
660
778
  */
661
- createPkcs7: (data64: string, keyId: string, detached: "yes" | "no" | "" | undefined, onSuccess: CallbackFunction<Pkcs7Response>, onError: ErrorCallback) => void;
779
+ createPkcs7: (data64: string, keyId: string, detached: "yes" | "no" | "" | undefined, // Default to attached
780
+ onSuccess: CallbackFunction<Pkcs7Response>, onError: ErrorCallback) => void;
662
781
  /**
663
782
  * Get full information about PKCS#7/CMS document (attached)
664
783
  */
665
784
  getPkcs7AttachedInfo: (pkcs764: string, trustStoreId: string | undefined, onSuccess: CallbackFunction<Pkcs7InfoResponse>, onError: ErrorCallback) => void;
666
785
  /**
667
- * Get full information about PKCS#7/CMS document (detached)
786
+ * Get full information about PKCS#7/CMS document (detached) with auto base64
787
+ */
788
+ getPkcs7DetachedInfoEnhanced: (data: string, pkcs764: string, trustStoreId: string | undefined, autoBase64: boolean | undefined, onSuccess: CallbackFunction<Pkcs7InfoResponse>, onError: ErrorCallback) => void;
789
+ /**
790
+ * Get full information about PKCS#7/CMS document (detached) - original
668
791
  */
669
792
  getPkcs7DetachedInfo: (data64: string, pkcs764: string, trustStoreId: string | undefined, onSuccess: CallbackFunction<Pkcs7InfoResponse>, onError: ErrorCallback) => void;
670
793
  /**
@@ -674,6 +797,13 @@ declare class Pkcs7Plugin extends EIMZOPlugin {
674
797
  success: true;
675
798
  valid: boolean;
676
799
  }>, onError: ErrorCallback) => void;
800
+ /**
801
+ * Verify PKCS#7/CMS document (detached) with auto base64
802
+ */
803
+ verifyPkcs7DetachedEnhanced: (data: string, pkcs764: string, trustStoreId: string, requesterId: string | undefined, autoBase64: boolean | undefined, onSuccess: CallbackFunction<{
804
+ success: true;
805
+ valid: boolean;
806
+ }>, onError: ErrorCallback) => void;
677
807
  /**
678
808
  * Verify PKCS#7/CMS document (detached) - STUB
679
809
  */
@@ -708,17 +838,28 @@ declare class Pkcs7Plugin extends EIMZOPlugin {
708
838
  */
709
839
  appendPkcs7Detached: (data64: string, pkcs764: string, keyId: string, onSuccess: CallbackFunction<Pkcs7Response>, onError: ErrorCallback) => void;
710
840
  /**
711
- * Create PKCS#7/CMS document (Promise version)
841
+ * Create PKCS#7/CMS document (Enhanced Promise version)
842
+ * @param data String data (auto base64 encoded) or base64 data
843
+ * @param keyId Key identifier
844
+ * @param options Creation options with smart defaults
712
845
  */
713
- createPkcs7Async: (args_0: string, args_1: string, args_2?: "" | "yes" | "no" | undefined) => Promise<Pkcs7Response>;
846
+ createPkcs7Async: (data: string, keyId: string, options?: Pkcs7CreateOptions) => Promise<Pkcs7Response>;
847
+ /**
848
+ * Create PKCS#7/CMS document (Original Promise version for backward compatibility)
849
+ */
850
+ createPkcs7LegacyAsync: (args_0: string, args_1: string, args_2?: "" | "yes" | "no" | undefined) => Promise<Pkcs7Response>;
714
851
  /**
715
852
  * Get PKCS#7 attached info (Promise version)
716
853
  */
717
854
  getPkcs7AttachedInfoAsync: (args_0: string, args_1?: string | undefined) => Promise<Pkcs7InfoResponse>;
718
855
  /**
719
- * Get PKCS#7 detached info (Promise version)
856
+ * Get PKCS#7 detached info (Enhanced Promise version)
720
857
  */
721
- getPkcs7DetachedInfoAsync: (args_0: string, args_1: string, args_2?: string | undefined) => Promise<Pkcs7InfoResponse>;
858
+ getPkcs7DetachedInfoAsync: (data: string, pkcs764: string, trustStoreId?: string, autoBase64?: boolean) => Promise<Pkcs7InfoResponse>;
859
+ /**
860
+ * Get PKCS#7 detached info (Original Promise version)
861
+ */
862
+ getPkcs7DetachedInfoLegacyAsync: (args_0: string, args_1: string, args_2?: string | undefined) => Promise<Pkcs7InfoResponse>;
722
863
  /**
723
864
  * Verify PKCS#7 attached (Promise version)
724
865
  */
@@ -727,9 +868,16 @@ declare class Pkcs7Plugin extends EIMZOPlugin {
727
868
  valid: boolean;
728
869
  }>;
729
870
  /**
730
- * Verify PKCS#7 detached (Promise version)
871
+ * Verify PKCS#7 detached (Enhanced Promise version)
872
+ */
873
+ verifyPkcs7DetachedAsync: (data: string, pkcs764: string, trustStoreId: string, requesterId?: string, autoBase64?: boolean) => Promise<{
874
+ success: true;
875
+ valid: boolean;
876
+ }>;
877
+ /**
878
+ * Verify PKCS#7 detached (Original Promise version)
731
879
  */
732
- verifyPkcs7DetachedAsync: (args_0: string, args_1: string, args_2: string, args_3?: string | undefined) => Promise<{
880
+ verifyPkcs7DetachedLegacyAsync: (args_0: string, args_1: string, args_2: string, args_3?: string | undefined) => Promise<{
733
881
  success: true;
734
882
  valid: boolean;
735
883
  }>;
@@ -991,4 +1139,4 @@ declare global {
991
1139
  }
992
1140
  }
993
1141
 
994
- export { type ApiResponse, type BasePlugin, CAPIWS, type CRLInfo, CRLPlugin, type CallbackFunction, CertKeyPlugin, type CertificateInfo$1 as CertificateInfo, type CertificateStatus, CipherPlugin, CryptoAuthPlugin, EIMZOApi, EIMZOClient, type EIMZOClientType, EIMZOPlugin, type ErrorCallback, FileIOPlugin, FtjcPlugin, type FtjcTokenInfo, IDCardPlugin, type KeyPairInfo, type KeyResponse, type ListResponse, type PKCS10Info, PKCS10Plugin, PKIPlugin, type PfxCertificate, PfxPlugin, Pkcs7Plugin, type Pkcs7Response, PluginManager, type PluginMethod, type PluginMethodArgs, type PluginMethodCall, type PluginMethodResult, type ReaderInfo, TSAClientPlugin, type TimestampTokenInfo, type TokenInfo, TruststoreJKSPlugin, TruststorePlugin, TunnelPlugin, X509Plugin, YTKSPlugin, dates, eimzoApi, ftjcPlugin, pfxPlugin, pkcs7Plugin };
1142
+ export { type ApiResponse, type BasePlugin, CAPIWS, type CRLInfo, CRLPlugin, type CallbackFunction, CertKeyPlugin, type CertificateInfo$1 as CertificateInfo, type CertificateStatus, CipherPlugin, CryptoAuthPlugin, EIMZOApi, EIMZOClient, type EIMZOClientType, EIMZOPlugin, EIMZOSessionManager, type ErrorCallback, FileIOPlugin, FtjcPlugin, type FtjcTokenInfo, IDCardPlugin, type KeyPairInfo, type KeyResponse, type KeySession, type ListResponse, type PKCS10Info, PKCS10Plugin, PKIPlugin, type PfxCertificate, PfxPlugin, Pkcs7Plugin, type Pkcs7Response, PluginManager, type PluginMethod, type PluginMethodArgs, type PluginMethodCall, type PluginMethodResult, type ReaderInfo, type SessionConfig, type StorageType, TSAClientPlugin, type TimestampTokenInfo, type TokenInfo, TruststoreJKSPlugin, TruststorePlugin, TunnelPlugin, X509Plugin, YTKSPlugin, dates, eimzoApi, ftjcPlugin, pfxPlugin, pkcs7Plugin, sessionManager };
package/dist/index.d.ts CHANGED
@@ -484,6 +484,80 @@ declare class IDCardPlugin extends EIMZOPlugin {
484
484
  loadKey: (cardIndex: number, password: string, onSuccess: CallbackFunction<string>, onError: ErrorCallback) => void;
485
485
  }
486
486
 
487
+ /**
488
+ * E-IMZO Session Manager
489
+ * KeyId larni saqlash va avtomatik unload qilish uchun
490
+ */
491
+ type StorageType = 'sessionStorage' | 'localStorage' | 'cookie' | 'memory';
492
+ interface SessionConfig {
493
+ storageType: StorageType;
494
+ autoUnloadAfter: number;
495
+ keyPrefix: string;
496
+ cookieOptions?: {
497
+ domain?: string;
498
+ path?: string;
499
+ secure?: boolean;
500
+ sameSite?: 'strict' | 'lax' | 'none';
501
+ };
502
+ }
503
+ interface KeySession {
504
+ keyId: string;
505
+ certificateId: string;
506
+ loadedAt: number;
507
+ expiresAt: number;
508
+ certificate: unknown;
509
+ autoUnload: boolean;
510
+ }
511
+ declare class EIMZOSessionManager {
512
+ private config;
513
+ private sessions;
514
+ private cleanupInterval;
515
+ constructor(config?: Partial<SessionConfig>);
516
+ /**
517
+ * KeyId ni session storage ga saqlash
518
+ */
519
+ saveKeySession(keyId: string, certificateId: string, certificate: unknown, autoUnload?: boolean): void;
520
+ /**
521
+ * Certificate ID bo'yicha keyId ni olish
522
+ */
523
+ getKeyId(certificateId: string): string | null;
524
+ /**
525
+ * Barcha active key sessions ni olish
526
+ */
527
+ getActiveSessions(): KeySession[];
528
+ /**
529
+ * Session ni kengaytirish (6 soat yana qo'shish)
530
+ */
531
+ extendSession(certificateId: string): boolean;
532
+ /**
533
+ * Key session ni o'chirish
534
+ */
535
+ removeKeySession(certificateId: string): Promise<void>;
536
+ /**
537
+ * Barcha sessionlarni tozalash
538
+ */
539
+ clearAllSessions(): Promise<void>;
540
+ /**
541
+ * Storage configuration ni o'zgartirish
542
+ */
543
+ updateConfig(newConfig: Partial<SessionConfig>): void;
544
+ private saveToStorage;
545
+ private loadFromStorage;
546
+ private removeFromStorage;
547
+ private initializeFromStorage;
548
+ private startCleanupTimer;
549
+ private cleanupExpiredSessions;
550
+ private unloadKeyFromEIMZO;
551
+ private setCookie;
552
+ private getCookie;
553
+ private deleteCookie;
554
+ /**
555
+ * Cleanup when instance is destroyed
556
+ */
557
+ destroy(): void;
558
+ }
559
+ declare const sessionManager: EIMZOSessionManager;
560
+
487
561
  interface PfxCertificate extends CertificateInfo {
488
562
  disk: string;
489
563
  path: string;
@@ -500,10 +574,32 @@ interface DiskInfo$1 {
500
574
  }
501
575
  /**
502
576
  * PFX Plugin for working with PFX key storage files
577
+ * Session management support for automatic key lifecycle
503
578
  */
504
579
  declare class PfxPlugin extends EIMZOPlugin {
505
580
  readonly name = "pfx";
506
- readonly description = "Plugin for working with PFX key storage files";
581
+ readonly description = "Plugin for working with PFX key storage files with session management";
582
+ updateSessionConfig(config: Partial<SessionConfig>): void;
583
+ private certificateCache;
584
+ /**
585
+ * Get keyId from certificate identifier
586
+ * Used for: await pfxPlugin.verifyPasswordAsync(keyId);
587
+ * @param certificateId - Format: "disk:path:name:alias" or just "alias"
588
+ * @returns keyId or null if not found
589
+ */
590
+ getKeyId(certificateId: string): string | null;
591
+ /**
592
+ * Get all active key sessions
593
+ */
594
+ getActiveSessions(): KeySession[];
595
+ /**
596
+ * Find certificate ID by partial match (alias, name, etc.)
597
+ */
598
+ findCertificateId(searchTerm: string): string | null;
599
+ /**
600
+ * Clear all sessions
601
+ */
602
+ clearAllSessions(): Promise<void>;
507
603
  /**
508
604
  * Get list of available disks
509
605
  */
@@ -519,9 +615,14 @@ declare class PfxPlugin extends EIMZOPlugin {
519
615
  */
520
616
  listAllCertificates: (onSuccess: CallbackFunction<PfxListResponse>, onError: ErrorCallback) => void;
521
617
  /**
522
- * Load key and get key identifier
618
+ * Load key and get key identifier with session management
619
+ * @param disk - Storage disk name
620
+ * @param path - Path to PFX file
621
+ * @param name - File name
622
+ * @param alias - Certificate alias
623
+ * @param saveForHours - Save in session for automatic management (6 hours default)
523
624
  */
524
- loadKey: (disk: string, path: string, name: string, alias: string, onSuccess: CallbackFunction<KeyResponse>, onError: ErrorCallback) => void;
625
+ loadKey: (disk: string, path: string, name: string, alias: string, onSuccess: CallbackFunction<KeyResponse>, onError: ErrorCallback, saveForHours?: number) => void;
525
626
  /**
526
627
  * Unload key by identifier
527
628
  */
@@ -567,9 +668,14 @@ declare class PfxPlugin extends EIMZOPlugin {
567
668
  */
568
669
  listAllCertificatesAsync: () => Promise<PfxListResponse>;
569
670
  /**
570
- * Load key (Promise version)
671
+ * Load key (Promise version) with session management
672
+ * @param disk Storage disk name
673
+ * @param path Path to PFX file
674
+ * @param name File name
675
+ * @param alias Certificate alias
676
+ * @param saveForHours Save in session for automatic management
571
677
  */
572
- loadKeyAsync: (args_0: string, args_1: string, args_2: string, args_3: string) => Promise<KeyResponse>;
678
+ loadKeyAsync: (disk: string, path: string, name: string, alias: string, saveForHours?: number) => Promise<KeyResponse>;
573
679
  /**
574
680
  * Unload key (Promise version)
575
681
  */
@@ -641,6 +747,10 @@ interface Pkcs7Response {
641
747
  success: true;
642
748
  pkcs7_64: string;
643
749
  }
750
+ interface Pkcs7CreateOptions {
751
+ detached?: boolean | 'yes' | 'no' | '';
752
+ autoBase64?: boolean;
753
+ }
644
754
  interface Pkcs7InfoResponse {
645
755
  success: boolean;
646
756
  signatures: {
@@ -655,16 +765,29 @@ interface Pkcs7InfoResponse {
655
765
  declare class Pkcs7Plugin extends EIMZOPlugin {
656
766
  readonly name = "pkcs7";
657
767
  readonly description = "Plugin for working with PKCS#7/CMS format";
768
+ private isBase64;
769
+ /**
770
+ * Create PKCS#7/CMS document by signing with key (enhanced version)
771
+ * @param data - String data or already base64 encoded data
772
+ * @param keyId - Key identifier
773
+ * @param options - Creation options with smart defaults
774
+ */
775
+ createPkcs7Enhanced: (data: string, keyId: string, options: Pkcs7CreateOptions | undefined, onSuccess: CallbackFunction<Pkcs7Response>, onError: ErrorCallback) => void;
658
776
  /**
659
- * Create PKCS#7/CMS document by signing with key
777
+ * Create PKCS#7/CMS document by signing with key (original method)
660
778
  */
661
- createPkcs7: (data64: string, keyId: string, detached: "yes" | "no" | "" | undefined, onSuccess: CallbackFunction<Pkcs7Response>, onError: ErrorCallback) => void;
779
+ createPkcs7: (data64: string, keyId: string, detached: "yes" | "no" | "" | undefined, // Default to attached
780
+ onSuccess: CallbackFunction<Pkcs7Response>, onError: ErrorCallback) => void;
662
781
  /**
663
782
  * Get full information about PKCS#7/CMS document (attached)
664
783
  */
665
784
  getPkcs7AttachedInfo: (pkcs764: string, trustStoreId: string | undefined, onSuccess: CallbackFunction<Pkcs7InfoResponse>, onError: ErrorCallback) => void;
666
785
  /**
667
- * Get full information about PKCS#7/CMS document (detached)
786
+ * Get full information about PKCS#7/CMS document (detached) with auto base64
787
+ */
788
+ getPkcs7DetachedInfoEnhanced: (data: string, pkcs764: string, trustStoreId: string | undefined, autoBase64: boolean | undefined, onSuccess: CallbackFunction<Pkcs7InfoResponse>, onError: ErrorCallback) => void;
789
+ /**
790
+ * Get full information about PKCS#7/CMS document (detached) - original
668
791
  */
669
792
  getPkcs7DetachedInfo: (data64: string, pkcs764: string, trustStoreId: string | undefined, onSuccess: CallbackFunction<Pkcs7InfoResponse>, onError: ErrorCallback) => void;
670
793
  /**
@@ -674,6 +797,13 @@ declare class Pkcs7Plugin extends EIMZOPlugin {
674
797
  success: true;
675
798
  valid: boolean;
676
799
  }>, onError: ErrorCallback) => void;
800
+ /**
801
+ * Verify PKCS#7/CMS document (detached) with auto base64
802
+ */
803
+ verifyPkcs7DetachedEnhanced: (data: string, pkcs764: string, trustStoreId: string, requesterId: string | undefined, autoBase64: boolean | undefined, onSuccess: CallbackFunction<{
804
+ success: true;
805
+ valid: boolean;
806
+ }>, onError: ErrorCallback) => void;
677
807
  /**
678
808
  * Verify PKCS#7/CMS document (detached) - STUB
679
809
  */
@@ -708,17 +838,28 @@ declare class Pkcs7Plugin extends EIMZOPlugin {
708
838
  */
709
839
  appendPkcs7Detached: (data64: string, pkcs764: string, keyId: string, onSuccess: CallbackFunction<Pkcs7Response>, onError: ErrorCallback) => void;
710
840
  /**
711
- * Create PKCS#7/CMS document (Promise version)
841
+ * Create PKCS#7/CMS document (Enhanced Promise version)
842
+ * @param data String data (auto base64 encoded) or base64 data
843
+ * @param keyId Key identifier
844
+ * @param options Creation options with smart defaults
712
845
  */
713
- createPkcs7Async: (args_0: string, args_1: string, args_2?: "" | "yes" | "no" | undefined) => Promise<Pkcs7Response>;
846
+ createPkcs7Async: (data: string, keyId: string, options?: Pkcs7CreateOptions) => Promise<Pkcs7Response>;
847
+ /**
848
+ * Create PKCS#7/CMS document (Original Promise version for backward compatibility)
849
+ */
850
+ createPkcs7LegacyAsync: (args_0: string, args_1: string, args_2?: "" | "yes" | "no" | undefined) => Promise<Pkcs7Response>;
714
851
  /**
715
852
  * Get PKCS#7 attached info (Promise version)
716
853
  */
717
854
  getPkcs7AttachedInfoAsync: (args_0: string, args_1?: string | undefined) => Promise<Pkcs7InfoResponse>;
718
855
  /**
719
- * Get PKCS#7 detached info (Promise version)
856
+ * Get PKCS#7 detached info (Enhanced Promise version)
720
857
  */
721
- getPkcs7DetachedInfoAsync: (args_0: string, args_1: string, args_2?: string | undefined) => Promise<Pkcs7InfoResponse>;
858
+ getPkcs7DetachedInfoAsync: (data: string, pkcs764: string, trustStoreId?: string, autoBase64?: boolean) => Promise<Pkcs7InfoResponse>;
859
+ /**
860
+ * Get PKCS#7 detached info (Original Promise version)
861
+ */
862
+ getPkcs7DetachedInfoLegacyAsync: (args_0: string, args_1: string, args_2?: string | undefined) => Promise<Pkcs7InfoResponse>;
722
863
  /**
723
864
  * Verify PKCS#7 attached (Promise version)
724
865
  */
@@ -727,9 +868,16 @@ declare class Pkcs7Plugin extends EIMZOPlugin {
727
868
  valid: boolean;
728
869
  }>;
729
870
  /**
730
- * Verify PKCS#7 detached (Promise version)
871
+ * Verify PKCS#7 detached (Enhanced Promise version)
872
+ */
873
+ verifyPkcs7DetachedAsync: (data: string, pkcs764: string, trustStoreId: string, requesterId?: string, autoBase64?: boolean) => Promise<{
874
+ success: true;
875
+ valid: boolean;
876
+ }>;
877
+ /**
878
+ * Verify PKCS#7 detached (Original Promise version)
731
879
  */
732
- verifyPkcs7DetachedAsync: (args_0: string, args_1: string, args_2: string, args_3?: string | undefined) => Promise<{
880
+ verifyPkcs7DetachedLegacyAsync: (args_0: string, args_1: string, args_2: string, args_3?: string | undefined) => Promise<{
733
881
  success: true;
734
882
  valid: boolean;
735
883
  }>;
@@ -991,4 +1139,4 @@ declare global {
991
1139
  }
992
1140
  }
993
1141
 
994
- export { type ApiResponse, type BasePlugin, CAPIWS, type CRLInfo, CRLPlugin, type CallbackFunction, CertKeyPlugin, type CertificateInfo$1 as CertificateInfo, type CertificateStatus, CipherPlugin, CryptoAuthPlugin, EIMZOApi, EIMZOClient, type EIMZOClientType, EIMZOPlugin, type ErrorCallback, FileIOPlugin, FtjcPlugin, type FtjcTokenInfo, IDCardPlugin, type KeyPairInfo, type KeyResponse, type ListResponse, type PKCS10Info, PKCS10Plugin, PKIPlugin, type PfxCertificate, PfxPlugin, Pkcs7Plugin, type Pkcs7Response, PluginManager, type PluginMethod, type PluginMethodArgs, type PluginMethodCall, type PluginMethodResult, type ReaderInfo, TSAClientPlugin, type TimestampTokenInfo, type TokenInfo, TruststoreJKSPlugin, TruststorePlugin, TunnelPlugin, X509Plugin, YTKSPlugin, dates, eimzoApi, ftjcPlugin, pfxPlugin, pkcs7Plugin };
1142
+ export { type ApiResponse, type BasePlugin, CAPIWS, type CRLInfo, CRLPlugin, type CallbackFunction, CertKeyPlugin, type CertificateInfo$1 as CertificateInfo, type CertificateStatus, CipherPlugin, CryptoAuthPlugin, EIMZOApi, EIMZOClient, type EIMZOClientType, EIMZOPlugin, EIMZOSessionManager, type ErrorCallback, FileIOPlugin, FtjcPlugin, type FtjcTokenInfo, IDCardPlugin, type KeyPairInfo, type KeyResponse, type KeySession, type ListResponse, type PKCS10Info, PKCS10Plugin, PKIPlugin, type PfxCertificate, PfxPlugin, Pkcs7Plugin, type Pkcs7Response, PluginManager, type PluginMethod, type PluginMethodArgs, type PluginMethodCall, type PluginMethodResult, type ReaderInfo, type SessionConfig, type StorageType, TSAClientPlugin, type TimestampTokenInfo, type TokenInfo, TruststoreJKSPlugin, TruststorePlugin, TunnelPlugin, X509Plugin, YTKSPlugin, dates, eimzoApi, ftjcPlugin, pfxPlugin, pkcs7Plugin, sessionManager };