@bitwarden/sdk-internal 0.2.0-main.305 → 0.2.0-main.307

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
- 1d43736c2e7c9c211579f84fbcbae01b771f5efa
1
+ 7878bdba26f1950c1e319ea7463bb2de61ff79a0
@@ -786,7 +786,7 @@ export interface CryptoError extends Error {
786
786
  | "EncString"
787
787
  | "Rsa"
788
788
  | "Fingerprint"
789
- | "ArgonError"
789
+ | "Argon"
790
790
  | "ZeroNumber"
791
791
  | "OperationNotSupported"
792
792
  | "WrongKeyType"
@@ -1032,12 +1032,7 @@ export function isKeyGenerationError(error: any): error is KeyGenerationError;
1032
1032
 
1033
1033
  export interface DatabaseError extends Error {
1034
1034
  name: "DatabaseError";
1035
- variant:
1036
- | "UnsupportedConfiguration"
1037
- | "ThreadBoundRunner"
1038
- | "Serialization"
1039
- | "JSError"
1040
- | "Internal";
1035
+ variant: "UnsupportedConfiguration" | "ThreadBoundRunner" | "Serialization" | "JS" | "Internal";
1041
1036
  }
1042
1037
 
1043
1038
  export function isDatabaseError(error: any): error is DatabaseError;
@@ -1423,7 +1418,7 @@ export interface PasswordHistory {
1423
1418
 
1424
1419
  export interface GetFolderError extends Error {
1425
1420
  name: "GetFolderError";
1426
- variant: "ItemNotFound" | "Crypto" | "RepositoryError";
1421
+ variant: "ItemNotFound" | "Crypto" | "Repository";
1427
1422
  }
1428
1423
 
1429
1424
  export function isGetFolderError(error: any): error is GetFolderError;
@@ -1436,7 +1431,7 @@ export interface EditFolderError extends Error {
1436
1431
  | "Api"
1437
1432
  | "VaultParse"
1438
1433
  | "MissingField"
1439
- | "RepositoryError"
1434
+ | "Repository"
1440
1435
  | "Uuid";
1441
1436
  }
1442
1437
 
@@ -1444,7 +1439,7 @@ export function isEditFolderError(error: any): error is EditFolderError;
1444
1439
 
1445
1440
  export interface CreateFolderError extends Error {
1446
1441
  name: "CreateFolderError";
1447
- variant: "Crypto" | "Api" | "VaultParse" | "MissingField" | "RepositoryError";
1442
+ variant: "Crypto" | "Api" | "VaultParse" | "MissingField" | "Repository";
1448
1443
  }
1449
1444
 
1450
1445
  export function isCreateFolderError(error: any): error is CreateFolderError;
@@ -1639,14 +1634,26 @@ export class AuthClient {
1639
1634
  */
1640
1635
  send_access(): SendAccessClient;
1641
1636
  }
1637
+ /**
1638
+ * The main entry point for the Bitwarden SDK in WebAssembly environments
1639
+ */
1642
1640
  export class BitwardenClient {
1643
1641
  free(): void;
1642
+ /**
1643
+ * Initialize a new instance of the SDK client
1644
+ */
1644
1645
  constructor(token_provider: any, settings?: ClientSettings | null);
1645
1646
  /**
1646
1647
  * Test method, echoes back the input
1647
1648
  */
1648
1649
  echo(msg: string): string;
1650
+ /**
1651
+ * Returns the current SDK version
1652
+ */
1649
1653
  version(): string;
1654
+ /**
1655
+ * Test method, always throws an error
1656
+ */
1650
1657
  throw(msg: string): void;
1651
1658
  /**
1652
1659
  * Test method, calls http endpoint
@@ -1656,7 +1663,13 @@ export class BitwardenClient {
1656
1663
  * Auth related operations.
1657
1664
  */
1658
1665
  auth(): AuthClient;
1666
+ /**
1667
+ * Crypto related operations.
1668
+ */
1659
1669
  crypto(): CryptoClient;
1670
+ /**
1671
+ * Vault item related operations.
1672
+ */
1660
1673
  vault(): VaultClient;
1661
1674
  /**
1662
1675
  * Constructs a specific client for platform-specific functionality
@@ -1666,6 +1679,9 @@ export class BitwardenClient {
1666
1679
  * Constructs a specific client for generating passwords and passphrases
1667
1680
  */
1668
1681
  generator(): GeneratorClient;
1682
+ /**
1683
+ * Exporter related operations.
1684
+ */
1669
1685
  exporters(): ExporterClient;
1670
1686
  }
1671
1687
  export class CiphersClient {
@@ -836,7 +836,7 @@ export function isEncryptFileError(error) {
836
836
  function __wbg_adapter_54(arg0, arg1, arg2) {
837
837
  try {
838
838
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
839
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he48cd26e2b093151(
839
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha454bdf5b4fbe0b2(
840
840
  retptr,
841
841
  arg0,
842
842
  arg1,
@@ -853,7 +853,7 @@ function __wbg_adapter_54(arg0, arg1, arg2) {
853
853
  }
854
854
 
855
855
  function __wbg_adapter_57(arg0, arg1, arg2) {
856
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8707eb16eb8d903b(
856
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1357e1fddec762f2(
857
857
  arg0,
858
858
  arg1,
859
859
  addHeapObject(arg2),
@@ -1140,7 +1140,9 @@ const BitwardenClientFinalization =
1140
1140
  typeof FinalizationRegistry === "undefined"
1141
1141
  ? { register: () => {}, unregister: () => {} }
1142
1142
  : new FinalizationRegistry((ptr) => wasm.__wbg_bitwardenclient_free(ptr >>> 0, 1));
1143
-
1143
+ /**
1144
+ * The main entry point for the Bitwarden SDK in WebAssembly environments
1145
+ */
1144
1146
  export class BitwardenClient {
1145
1147
  __destroy_into_raw() {
1146
1148
  const ptr = this.__wbg_ptr;
@@ -1154,6 +1156,7 @@ export class BitwardenClient {
1154
1156
  wasm.__wbg_bitwardenclient_free(ptr, 0);
1155
1157
  }
1156
1158
  /**
1159
+ * Initialize a new instance of the SDK client
1157
1160
  * @param {any} token_provider
1158
1161
  * @param {ClientSettings | null} [settings]
1159
1162
  */
@@ -1190,6 +1193,7 @@ export class BitwardenClient {
1190
1193
  }
1191
1194
  }
1192
1195
  /**
1196
+ * Returns the current SDK version
1193
1197
  * @returns {string}
1194
1198
  */
1195
1199
  version() {
@@ -1209,6 +1213,7 @@ export class BitwardenClient {
1209
1213
  }
1210
1214
  }
1211
1215
  /**
1216
+ * Test method, always throws an error
1212
1217
  * @param {string} msg
1213
1218
  */
1214
1219
  throw(msg) {
@@ -1246,6 +1251,7 @@ export class BitwardenClient {
1246
1251
  return AuthClient.__wrap(ret);
1247
1252
  }
1248
1253
  /**
1254
+ * Crypto related operations.
1249
1255
  * @returns {CryptoClient}
1250
1256
  */
1251
1257
  crypto() {
@@ -1253,6 +1259,7 @@ export class BitwardenClient {
1253
1259
  return CryptoClient.__wrap(ret);
1254
1260
  }
1255
1261
  /**
1262
+ * Vault item related operations.
1256
1263
  * @returns {VaultClient}
1257
1264
  */
1258
1265
  vault() {
@@ -1276,6 +1283,7 @@ export class BitwardenClient {
1276
1283
  return GeneratorClient.__wrap(ret);
1277
1284
  }
1278
1285
  /**
1286
+ * Exporter related operations.
1279
1287
  * @returns {ExporterClient}
1280
1288
  */
1281
1289
  exporters() {
@@ -4102,7 +4110,14 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
4102
4110
  return ret;
4103
4111
  }
4104
4112
 
4105
- export function __wbg_get_2b018464256cd7d5() {
4113
+ export function __wbg_get_67b2ba62fc30de12() {
4114
+ return handleError(function (arg0, arg1) {
4115
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4116
+ return addHeapObject(ret);
4117
+ }, arguments);
4118
+ }
4119
+
4120
+ export function __wbg_get_919cf82d3c6b2598() {
4106
4121
  return handleError(function (arg0, arg1, arg2) {
4107
4122
  let deferred0_0;
4108
4123
  let deferred0_1;
@@ -4117,14 +4132,12 @@ export function __wbg_get_2b018464256cd7d5() {
4117
4132
  }, arguments);
4118
4133
  }
4119
4134
 
4120
- export function __wbg_get_67b2ba62fc30de12() {
4121
- return handleError(function (arg0, arg1) {
4122
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4123
- return addHeapObject(ret);
4124
- }, arguments);
4135
+ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
4136
+ const ret = getObject(arg0)[arg1 >>> 0];
4137
+ return addHeapObject(ret);
4125
4138
  }
4126
4139
 
4127
- export function __wbg_get_ae2cb965654839ea() {
4140
+ export function __wbg_get_bdd50f3b0f8b2699() {
4128
4141
  return handleError(function (arg0, arg1, arg2) {
4129
4142
  let deferred0_0;
4130
4143
  let deferred0_1;
@@ -4139,12 +4152,7 @@ export function __wbg_get_ae2cb965654839ea() {
4139
4152
  }, arguments);
4140
4153
  }
4141
4154
 
4142
- export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
4143
- const ret = getObject(arg0)[arg1 >>> 0];
4144
- return addHeapObject(ret);
4145
- }
4146
-
4147
- export function __wbg_getaccesstoken_d4dcf182b3b58e08(arg0) {
4155
+ export function __wbg_getaccesstoken_1b27a44424385dd2(arg0) {
4148
4156
  const ret = getObject(arg0).get_access_token();
4149
4157
  return addHeapObject(ret);
4150
4158
  }
@@ -4329,14 +4337,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
4329
4337
  return ret;
4330
4338
  }
4331
4339
 
4332
- export function __wbg_list_9de7cb90d9c7068b() {
4340
+ export function __wbg_list_ab0f82f15fa895f5() {
4333
4341
  return handleError(function (arg0) {
4334
4342
  const ret = getObject(arg0).list();
4335
4343
  return addHeapObject(ret);
4336
4344
  }, arguments);
4337
4345
  }
4338
4346
 
4339
- export function __wbg_list_ac43ab644719cf44() {
4347
+ export function __wbg_list_cb1cbcfe84e633e2() {
4340
4348
  return handleError(function (arg0) {
4341
4349
  const ret = getObject(arg0).list();
4342
4350
  return addHeapObject(ret);
@@ -4537,7 +4545,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
4537
4545
  }, arguments);
4538
4546
  }
4539
4547
 
4540
- export function __wbg_remove_1fc1be8bb5d0bfb0() {
4548
+ export function __wbg_remove_33dd296c8b72650a() {
4541
4549
  return handleError(function (arg0, arg1, arg2) {
4542
4550
  let deferred0_0;
4543
4551
  let deferred0_1;
@@ -4552,7 +4560,7 @@ export function __wbg_remove_1fc1be8bb5d0bfb0() {
4552
4560
  }, arguments);
4553
4561
  }
4554
4562
 
4555
- export function __wbg_remove_c25e52cfa594f899() {
4563
+ export function __wbg_remove_de8be3014c49fdfe() {
4556
4564
  return handleError(function (arg0, arg1, arg2) {
4557
4565
  let deferred0_0;
4558
4566
  let deferred0_1;
@@ -4598,21 +4606,6 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
4598
4606
  return addHeapObject(ret);
4599
4607
  }
4600
4608
 
4601
- export function __wbg_set_1fa890ed08247955() {
4602
- return handleError(function (arg0, arg1, arg2, arg3) {
4603
- let deferred0_0;
4604
- let deferred0_1;
4605
- try {
4606
- deferred0_0 = arg1;
4607
- deferred0_1 = arg2;
4608
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
4609
- return addHeapObject(ret);
4610
- } finally {
4611
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4612
- }
4613
- }, arguments);
4614
- }
4615
-
4616
4609
  export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
4617
4610
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
4618
4611
  }
@@ -4625,12 +4618,22 @@ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
4625
4618
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
4626
4619
  }
4627
4620
 
4628
- export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
4629
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
4630
- return addHeapObject(ret);
4621
+ export function __wbg_set_7df0ddb96f670064() {
4622
+ return handleError(function (arg0, arg1, arg2, arg3) {
4623
+ let deferred0_0;
4624
+ let deferred0_1;
4625
+ try {
4626
+ deferred0_0 = arg1;
4627
+ deferred0_1 = arg2;
4628
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
4629
+ return addHeapObject(ret);
4630
+ } finally {
4631
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4632
+ }
4633
+ }, arguments);
4631
4634
  }
4632
4635
 
4633
- export function __wbg_set_aa15c91ba98227b1() {
4636
+ export function __wbg_set_88313dba6bf5c8e9() {
4634
4637
  return handleError(function (arg0, arg1, arg2, arg3) {
4635
4638
  let deferred0_0;
4636
4639
  let deferred0_1;
@@ -4645,6 +4648,11 @@ export function __wbg_set_aa15c91ba98227b1() {
4645
4648
  }, arguments);
4646
4649
  }
4647
4650
 
4651
+ export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
4652
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
4653
+ return addHeapObject(ret);
4654
+ }
4655
+
4648
4656
  export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
4649
4657
  getObject(arg0).body = getObject(arg1);
4650
4658
  }
@@ -4865,7 +4873,7 @@ export function __wbindgen_closure_wrapper193(arg0, arg1, arg2) {
4865
4873
  return addHeapObject(ret);
4866
4874
  }
4867
4875
 
4868
- export function __wbindgen_closure_wrapper3783(arg0, arg1, arg2) {
4876
+ export function __wbindgen_closure_wrapper3784(arg0, arg1, arg2) {
4869
4877
  const ret = makeMutClosure(arg0, arg1, 294, __wbg_adapter_60);
4870
4878
  return addHeapObject(ret);
4871
4879
  }
Binary file
@@ -401,13 +401,13 @@ export const __wbindgen_exn_store: (a: number) => void;
401
401
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
402
402
  export const __wbindgen_export_4: WebAssembly.Table;
403
403
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
404
- export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he48cd26e2b093151: (
404
+ export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha454bdf5b4fbe0b2: (
405
405
  a: number,
406
406
  b: number,
407
407
  c: number,
408
408
  d: number,
409
409
  ) => void;
410
- export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8707eb16eb8d903b: (
410
+ export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1357e1fddec762f2: (
411
411
  a: number,
412
412
  b: number,
413
413
  c: number,