@bitwarden/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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- fa008dbe1c14f35e9c43646da9f8e8ccbf38050b
1
+ b033eddcc25f48e47cc0b6e22e360391fde464c2
@@ -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
  */
@@ -1875,6 +1884,7 @@ export class BitwardenClient {
1875
1884
  export class CipherRiskClient {
1876
1885
  private constructor();
1877
1886
  free(): void;
1887
+ [Symbol.dispose](): void;
1878
1888
  /**
1879
1889
  * Build password reuse map for a list of login ciphers.
1880
1890
  *
@@ -1915,6 +1925,7 @@ export class CipherRiskClient {
1915
1925
  export class CiphersClient {
1916
1926
  private constructor();
1917
1927
  free(): void;
1928
+ [Symbol.dispose](): void;
1918
1929
  /**
1919
1930
  * Create a new [Cipher] and save it to the server.
1920
1931
  */
@@ -1980,6 +1991,7 @@ export class CiphersClient {
1980
1991
  export class CollectionViewNodeItem {
1981
1992
  private constructor();
1982
1993
  free(): void;
1994
+ [Symbol.dispose](): void;
1983
1995
  get_item(): CollectionView;
1984
1996
  get_parent(): CollectionView | undefined;
1985
1997
  get_children(): CollectionView[];
@@ -1988,6 +2000,7 @@ export class CollectionViewNodeItem {
1988
2000
  export class CollectionViewTree {
1989
2001
  private constructor();
1990
2002
  free(): void;
2003
+ [Symbol.dispose](): void;
1991
2004
  get_item_for_view(collection_view: CollectionView): CollectionViewNodeItem | undefined;
1992
2005
  get_root_items(): CollectionViewNodeItem[];
1993
2006
  get_flat_items(): CollectionViewNodeItem[];
@@ -1995,6 +2008,7 @@ export class CollectionViewTree {
1995
2008
  export class CollectionsClient {
1996
2009
  private constructor();
1997
2010
  free(): void;
2011
+ [Symbol.dispose](): void;
1998
2012
  decrypt(collection: Collection): CollectionView;
1999
2013
  decrypt_list(collections: Collection[]): CollectionView[];
2000
2014
  /**
@@ -2010,6 +2024,7 @@ export class CollectionsClient {
2010
2024
  export class CryptoClient {
2011
2025
  private constructor();
2012
2026
  free(): void;
2027
+ [Symbol.dispose](): void;
2013
2028
  /**
2014
2029
  * Initialization method for the user crypto. Needs to be called before any other crypto
2015
2030
  * operations.
@@ -2066,6 +2081,7 @@ export class CryptoClient {
2066
2081
  export class ExporterClient {
2067
2082
  private constructor();
2068
2083
  free(): void;
2084
+ [Symbol.dispose](): void;
2069
2085
  export_vault(folders: Folder[], ciphers: Cipher[], format: ExportFormat): string;
2070
2086
  export_organization_vault(
2071
2087
  collections: Collection[],
@@ -2097,6 +2113,7 @@ export class ExporterClient {
2097
2113
  export class FoldersClient {
2098
2114
  private constructor();
2099
2115
  free(): void;
2116
+ [Symbol.dispose](): void;
2100
2117
  /**
2101
2118
  * Encrypt a [FolderView] to a [Folder].
2102
2119
  */
@@ -2129,6 +2146,7 @@ export class FoldersClient {
2129
2146
  export class GeneratorClient {
2130
2147
  private constructor();
2131
2148
  free(): void;
2149
+ [Symbol.dispose](): void;
2132
2150
  /**
2133
2151
  * Generates a random password.
2134
2152
  *
@@ -2188,9 +2206,11 @@ export class GeneratorClient {
2188
2206
  export class IdentityClient {
2189
2207
  private constructor();
2190
2208
  free(): void;
2209
+ [Symbol.dispose](): void;
2191
2210
  }
2192
2211
  export class IncomingMessage {
2193
2212
  free(): void;
2213
+ [Symbol.dispose](): void;
2194
2214
  constructor(payload: Uint8Array, destination: Endpoint, source: Endpoint, topic?: string | null);
2195
2215
  /**
2196
2216
  * Try to parse the payload as JSON.
@@ -2208,8 +2228,22 @@ export class IncomingMessage {
2208
2228
  * [IpcClient] documentation.
2209
2229
  */
2210
2230
  export class IpcClient {
2231
+ private constructor();
2211
2232
  free(): void;
2212
- constructor(communication_provider: IpcCommunicationBackend);
2233
+ [Symbol.dispose](): void;
2234
+ /**
2235
+ * Create a new `IpcClient` instance with an in-memory session repository for saving
2236
+ * sessions within the SDK.
2237
+ */
2238
+ static newWithSdkInMemorySessions(communication_provider: IpcCommunicationBackend): IpcClient;
2239
+ /**
2240
+ * Create a new `IpcClient` instance with a client-managed session repository for saving
2241
+ * sessions using State Provider.
2242
+ */
2243
+ static newWithClientManagedSessions(
2244
+ communication_provider: IpcCommunicationBackend,
2245
+ session_repository: IpcSessionRepository,
2246
+ ): IpcClient;
2213
2247
  start(): Promise<void>;
2214
2248
  isRunning(): Promise<boolean>;
2215
2249
  send(message: OutgoingMessage): Promise<void>;
@@ -2222,6 +2256,7 @@ export class IpcClient {
2222
2256
  export class IpcClientSubscription {
2223
2257
  private constructor();
2224
2258
  free(): void;
2259
+ [Symbol.dispose](): void;
2225
2260
  receive(abort_signal?: AbortSignal | null): Promise<IncomingMessage>;
2226
2261
  }
2227
2262
  /**
@@ -2229,6 +2264,7 @@ export class IpcClientSubscription {
2229
2264
  */
2230
2265
  export class IpcCommunicationBackend {
2231
2266
  free(): void;
2267
+ [Symbol.dispose](): void;
2232
2268
  /**
2233
2269
  * Creates a new instance of the JavaScript communication backend.
2234
2270
  */
@@ -2240,6 +2276,7 @@ export class IpcCommunicationBackend {
2240
2276
  }
2241
2277
  export class OutgoingMessage {
2242
2278
  free(): void;
2279
+ [Symbol.dispose](): void;
2243
2280
  constructor(payload: Uint8Array, destination: Endpoint, topic?: string | null);
2244
2281
  /**
2245
2282
  * Create a new message and encode the payload as JSON.
@@ -2257,6 +2294,7 @@ export class OutgoingMessage {
2257
2294
  export class PlatformClient {
2258
2295
  private constructor();
2259
2296
  free(): void;
2297
+ [Symbol.dispose](): void;
2260
2298
  state(): StateClient;
2261
2299
  /**
2262
2300
  * Load feature flags into the client
@@ -2272,6 +2310,7 @@ export class PlatformClient {
2272
2310
  export class PureCrypto {
2273
2311
  private constructor();
2274
2312
  free(): void;
2313
+ [Symbol.dispose](): void;
2275
2314
  /**
2276
2315
  * DEPRECATED: Use `symmetric_decrypt_string` instead.
2277
2316
  * Cleanup ticket: <https://bitwarden.atlassian.net/browse/PM-21247>
@@ -2387,6 +2426,7 @@ export class PureCrypto {
2387
2426
  export class SendAccessClient {
2388
2427
  private constructor();
2389
2428
  free(): void;
2429
+ [Symbol.dispose](): void;
2390
2430
  /**
2391
2431
  * Requests a new send access token.
2392
2432
  */
@@ -2395,6 +2435,7 @@ export class SendAccessClient {
2395
2435
  export class StateClient {
2396
2436
  private constructor();
2397
2437
  free(): void;
2438
+ [Symbol.dispose](): void;
2398
2439
  register_cipher_repository(cipher_repository: any): void;
2399
2440
  register_folder_repository(store: any): void;
2400
2441
  register_client_managed_repositories(repositories: Repositories): void;
@@ -2406,6 +2447,7 @@ export class StateClient {
2406
2447
  export class TotpClient {
2407
2448
  private constructor();
2408
2449
  free(): void;
2450
+ [Symbol.dispose](): void;
2409
2451
  /**
2410
2452
  * Generates a TOTP code from a provided key
2411
2453
  *
@@ -2421,6 +2463,7 @@ export class TotpClient {
2421
2463
  export class VaultClient {
2422
2464
  private constructor();
2423
2465
  free(): void;
2466
+ [Symbol.dispose](): void;
2424
2467
  /**
2425
2468
  * Attachment related operations.
2426
2469
  */