@bitwarden/commercial-sdk-internal 0.2.0-main.373 → 0.2.0-main.375

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.
@@ -974,6 +974,12 @@ export interface IpcCommunicationBackendSender {
974
974
  send(message: OutgoingMessage): Promise<void>;
975
975
  }
976
976
 
977
+ export interface IpcSessionRepository {
978
+ get(endpoint: Endpoint): Promise<any | undefined>;
979
+ save(endpoint: Endpoint, session: any): Promise<void>;
980
+ remove(endpoint: Endpoint): Promise<void>;
981
+ }
982
+
977
983
  export interface ChannelError extends Error {
978
984
  name: "ChannelError";
979
985
  }
@@ -1798,6 +1804,7 @@ export interface Attachment {
1798
1804
  export class AttachmentsClient {
1799
1805
  private constructor();
1800
1806
  free(): void;
1807
+ [Symbol.dispose](): void;
1801
1808
  decrypt_buffer(
1802
1809
  cipher: Cipher,
1803
1810
  attachment: AttachmentView,
@@ -1810,6 +1817,7 @@ export class AttachmentsClient {
1810
1817
  export class AuthClient {
1811
1818
  private constructor();
1812
1819
  free(): void;
1820
+ [Symbol.dispose](): void;
1813
1821
  /**
1814
1822
  * Client for identity functionality
1815
1823
  */
@@ -1824,6 +1832,7 @@ export class AuthClient {
1824
1832
  */
1825
1833
  export class BitwardenClient {
1826
1834
  free(): void;
1835
+ [Symbol.dispose](): void;
1827
1836
  /**
1828
1837
  * Initialize a new instance of the SDK client
1829
1838
  */
@@ -1879,6 +1888,7 @@ export class BitwardenClient {
1879
1888
  export class CipherRiskClient {
1880
1889
  private constructor();
1881
1890
  free(): void;
1891
+ [Symbol.dispose](): void;
1882
1892
  /**
1883
1893
  * Build password reuse map for a list of login ciphers.
1884
1894
  *
@@ -1919,6 +1929,7 @@ export class CipherRiskClient {
1919
1929
  export class CiphersClient {
1920
1930
  private constructor();
1921
1931
  free(): void;
1932
+ [Symbol.dispose](): void;
1922
1933
  /**
1923
1934
  * Create a new [Cipher] and save it to the server.
1924
1935
  */
@@ -1984,6 +1995,7 @@ export class CiphersClient {
1984
1995
  export class CollectionViewNodeItem {
1985
1996
  private constructor();
1986
1997
  free(): void;
1998
+ [Symbol.dispose](): void;
1987
1999
  get_item(): CollectionView;
1988
2000
  get_parent(): CollectionView | undefined;
1989
2001
  get_children(): CollectionView[];
@@ -1992,6 +2004,7 @@ export class CollectionViewNodeItem {
1992
2004
  export class CollectionViewTree {
1993
2005
  private constructor();
1994
2006
  free(): void;
2007
+ [Symbol.dispose](): void;
1995
2008
  get_item_for_view(collection_view: CollectionView): CollectionViewNodeItem | undefined;
1996
2009
  get_root_items(): CollectionViewNodeItem[];
1997
2010
  get_flat_items(): CollectionViewNodeItem[];
@@ -1999,6 +2012,7 @@ export class CollectionViewTree {
1999
2012
  export class CollectionsClient {
2000
2013
  private constructor();
2001
2014
  free(): void;
2015
+ [Symbol.dispose](): void;
2002
2016
  decrypt(collection: Collection): CollectionView;
2003
2017
  decrypt_list(collections: Collection[]): CollectionView[];
2004
2018
  /**
@@ -2014,6 +2028,7 @@ export class CollectionsClient {
2014
2028
  export class CommercialPasswordManagerClient {
2015
2029
  private constructor();
2016
2030
  free(): void;
2031
+ [Symbol.dispose](): void;
2017
2032
  /**
2018
2033
  * Vault item operations
2019
2034
  */
@@ -2022,6 +2037,7 @@ export class CommercialPasswordManagerClient {
2022
2037
  export class CommercialVaultClient {
2023
2038
  private constructor();
2024
2039
  free(): void;
2040
+ [Symbol.dispose](): void;
2025
2041
  }
2026
2042
  /**
2027
2043
  * A client for the crypto operations.
@@ -2029,6 +2045,7 @@ export class CommercialVaultClient {
2029
2045
  export class CryptoClient {
2030
2046
  private constructor();
2031
2047
  free(): void;
2048
+ [Symbol.dispose](): void;
2032
2049
  /**
2033
2050
  * Initialization method for the user crypto. Needs to be called before any other crypto
2034
2051
  * operations.
@@ -2085,6 +2102,7 @@ export class CryptoClient {
2085
2102
  export class ExporterClient {
2086
2103
  private constructor();
2087
2104
  free(): void;
2105
+ [Symbol.dispose](): void;
2088
2106
  export_vault(folders: Folder[], ciphers: Cipher[], format: ExportFormat): string;
2089
2107
  export_organization_vault(
2090
2108
  collections: Collection[],
@@ -2116,6 +2134,7 @@ export class ExporterClient {
2116
2134
  export class FoldersClient {
2117
2135
  private constructor();
2118
2136
  free(): void;
2137
+ [Symbol.dispose](): void;
2119
2138
  /**
2120
2139
  * Encrypt a [FolderView] to a [Folder].
2121
2140
  */
@@ -2148,6 +2167,7 @@ export class FoldersClient {
2148
2167
  export class GeneratorClient {
2149
2168
  private constructor();
2150
2169
  free(): void;
2170
+ [Symbol.dispose](): void;
2151
2171
  /**
2152
2172
  * Generates a random password.
2153
2173
  *
@@ -2207,9 +2227,11 @@ export class GeneratorClient {
2207
2227
  export class IdentityClient {
2208
2228
  private constructor();
2209
2229
  free(): void;
2230
+ [Symbol.dispose](): void;
2210
2231
  }
2211
2232
  export class IncomingMessage {
2212
2233
  free(): void;
2234
+ [Symbol.dispose](): void;
2213
2235
  constructor(payload: Uint8Array, destination: Endpoint, source: Endpoint, topic?: string | null);
2214
2236
  /**
2215
2237
  * Try to parse the payload as JSON.
@@ -2227,8 +2249,22 @@ export class IncomingMessage {
2227
2249
  * [IpcClient] documentation.
2228
2250
  */
2229
2251
  export class IpcClient {
2252
+ private constructor();
2230
2253
  free(): void;
2231
- constructor(communication_provider: IpcCommunicationBackend);
2254
+ [Symbol.dispose](): void;
2255
+ /**
2256
+ * Create a new `IpcClient` instance with an in-memory session repository for saving
2257
+ * sessions within the SDK.
2258
+ */
2259
+ static newWithSdkInMemorySessions(communication_provider: IpcCommunicationBackend): IpcClient;
2260
+ /**
2261
+ * Create a new `IpcClient` instance with a client-managed session repository for saving
2262
+ * sessions using State Provider.
2263
+ */
2264
+ static newWithClientManagedSessions(
2265
+ communication_provider: IpcCommunicationBackend,
2266
+ session_repository: IpcSessionRepository,
2267
+ ): IpcClient;
2232
2268
  start(): Promise<void>;
2233
2269
  isRunning(): Promise<boolean>;
2234
2270
  send(message: OutgoingMessage): Promise<void>;
@@ -2241,6 +2277,7 @@ export class IpcClient {
2241
2277
  export class IpcClientSubscription {
2242
2278
  private constructor();
2243
2279
  free(): void;
2280
+ [Symbol.dispose](): void;
2244
2281
  receive(abort_signal?: AbortSignal | null): Promise<IncomingMessage>;
2245
2282
  }
2246
2283
  /**
@@ -2248,6 +2285,7 @@ export class IpcClientSubscription {
2248
2285
  */
2249
2286
  export class IpcCommunicationBackend {
2250
2287
  free(): void;
2288
+ [Symbol.dispose](): void;
2251
2289
  /**
2252
2290
  * Creates a new instance of the JavaScript communication backend.
2253
2291
  */
@@ -2259,6 +2297,7 @@ export class IpcCommunicationBackend {
2259
2297
  }
2260
2298
  export class OutgoingMessage {
2261
2299
  free(): void;
2300
+ [Symbol.dispose](): void;
2262
2301
  constructor(payload: Uint8Array, destination: Endpoint, topic?: string | null);
2263
2302
  /**
2264
2303
  * Create a new message and encode the payload as JSON.
@@ -2276,6 +2315,7 @@ export class OutgoingMessage {
2276
2315
  export class PlatformClient {
2277
2316
  private constructor();
2278
2317
  free(): void;
2318
+ [Symbol.dispose](): void;
2279
2319
  state(): StateClient;
2280
2320
  /**
2281
2321
  * Load feature flags into the client
@@ -2291,6 +2331,7 @@ export class PlatformClient {
2291
2331
  export class PureCrypto {
2292
2332
  private constructor();
2293
2333
  free(): void;
2334
+ [Symbol.dispose](): void;
2294
2335
  /**
2295
2336
  * DEPRECATED: Use `symmetric_decrypt_string` instead.
2296
2337
  * Cleanup ticket: <https://bitwarden.atlassian.net/browse/PM-21247>
@@ -2406,6 +2447,7 @@ export class PureCrypto {
2406
2447
  export class SendAccessClient {
2407
2448
  private constructor();
2408
2449
  free(): void;
2450
+ [Symbol.dispose](): void;
2409
2451
  /**
2410
2452
  * Requests a new send access token.
2411
2453
  */
@@ -2414,6 +2456,7 @@ export class SendAccessClient {
2414
2456
  export class StateClient {
2415
2457
  private constructor();
2416
2458
  free(): void;
2459
+ [Symbol.dispose](): void;
2417
2460
  register_cipher_repository(cipher_repository: any): void;
2418
2461
  register_folder_repository(store: any): void;
2419
2462
  register_client_managed_repositories(repositories: Repositories): void;
@@ -2425,6 +2468,7 @@ export class StateClient {
2425
2468
  export class TotpClient {
2426
2469
  private constructor();
2427
2470
  free(): void;
2471
+ [Symbol.dispose](): void;
2428
2472
  /**
2429
2473
  * Generates a TOTP code from a provided key
2430
2474
  *
@@ -2440,6 +2484,7 @@ export class TotpClient {
2440
2484
  export class VaultClient {
2441
2485
  private constructor();
2442
2486
  free(): void;
2487
+ [Symbol.dispose](): void;
2443
2488
  /**
2444
2489
  * Attachment related operations.
2445
2490
  */