@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.
@@ -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 {
@@ -830,7 +830,7 @@ module.exports.isEncryptFileError = function (error) {
830
830
  function __wbg_adapter_54(arg0, arg1, arg2) {
831
831
  try {
832
832
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
833
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he48cd26e2b093151(
833
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha454bdf5b4fbe0b2(
834
834
  retptr,
835
835
  arg0,
836
836
  arg1,
@@ -847,7 +847,7 @@ function __wbg_adapter_54(arg0, arg1, arg2) {
847
847
  }
848
848
 
849
849
  function __wbg_adapter_57(arg0, arg1, arg2) {
850
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8707eb16eb8d903b(
850
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1357e1fddec762f2(
851
851
  arg0,
852
852
  arg1,
853
853
  addHeapObject(arg2),
@@ -1136,7 +1136,9 @@ const BitwardenClientFinalization =
1136
1136
  typeof FinalizationRegistry === "undefined"
1137
1137
  ? { register: () => {}, unregister: () => {} }
1138
1138
  : new FinalizationRegistry((ptr) => wasm.__wbg_bitwardenclient_free(ptr >>> 0, 1));
1139
-
1139
+ /**
1140
+ * The main entry point for the Bitwarden SDK in WebAssembly environments
1141
+ */
1140
1142
  class BitwardenClient {
1141
1143
  __destroy_into_raw() {
1142
1144
  const ptr = this.__wbg_ptr;
@@ -1150,6 +1152,7 @@ class BitwardenClient {
1150
1152
  wasm.__wbg_bitwardenclient_free(ptr, 0);
1151
1153
  }
1152
1154
  /**
1155
+ * Initialize a new instance of the SDK client
1153
1156
  * @param {any} token_provider
1154
1157
  * @param {ClientSettings | null} [settings]
1155
1158
  */
@@ -1186,6 +1189,7 @@ class BitwardenClient {
1186
1189
  }
1187
1190
  }
1188
1191
  /**
1192
+ * Returns the current SDK version
1189
1193
  * @returns {string}
1190
1194
  */
1191
1195
  version() {
@@ -1205,6 +1209,7 @@ class BitwardenClient {
1205
1209
  }
1206
1210
  }
1207
1211
  /**
1212
+ * Test method, always throws an error
1208
1213
  * @param {string} msg
1209
1214
  */
1210
1215
  throw(msg) {
@@ -1242,6 +1247,7 @@ class BitwardenClient {
1242
1247
  return AuthClient.__wrap(ret);
1243
1248
  }
1244
1249
  /**
1250
+ * Crypto related operations.
1245
1251
  * @returns {CryptoClient}
1246
1252
  */
1247
1253
  crypto() {
@@ -1249,6 +1255,7 @@ class BitwardenClient {
1249
1255
  return CryptoClient.__wrap(ret);
1250
1256
  }
1251
1257
  /**
1258
+ * Vault item related operations.
1252
1259
  * @returns {VaultClient}
1253
1260
  */
1254
1261
  vault() {
@@ -1272,6 +1279,7 @@ class BitwardenClient {
1272
1279
  return GeneratorClient.__wrap(ret);
1273
1280
  }
1274
1281
  /**
1282
+ * Exporter related operations.
1275
1283
  * @returns {ExporterClient}
1276
1284
  */
1277
1285
  exporters() {
@@ -4118,7 +4126,14 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
4118
4126
  return ret;
4119
4127
  };
4120
4128
 
4121
- module.exports.__wbg_get_2b018464256cd7d5 = function () {
4129
+ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
4130
+ return handleError(function (arg0, arg1) {
4131
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4132
+ return addHeapObject(ret);
4133
+ }, arguments);
4134
+ };
4135
+
4136
+ module.exports.__wbg_get_919cf82d3c6b2598 = function () {
4122
4137
  return handleError(function (arg0, arg1, arg2) {
4123
4138
  let deferred0_0;
4124
4139
  let deferred0_1;
@@ -4133,14 +4148,12 @@ module.exports.__wbg_get_2b018464256cd7d5 = function () {
4133
4148
  }, arguments);
4134
4149
  };
4135
4150
 
4136
- module.exports.__wbg_get_67b2ba62fc30de12 = function () {
4137
- return handleError(function (arg0, arg1) {
4138
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4139
- return addHeapObject(ret);
4140
- }, arguments);
4151
+ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
4152
+ const ret = getObject(arg0)[arg1 >>> 0];
4153
+ return addHeapObject(ret);
4141
4154
  };
4142
4155
 
4143
- module.exports.__wbg_get_ae2cb965654839ea = function () {
4156
+ module.exports.__wbg_get_bdd50f3b0f8b2699 = function () {
4144
4157
  return handleError(function (arg0, arg1, arg2) {
4145
4158
  let deferred0_0;
4146
4159
  let deferred0_1;
@@ -4155,12 +4168,7 @@ module.exports.__wbg_get_ae2cb965654839ea = function () {
4155
4168
  }, arguments);
4156
4169
  };
4157
4170
 
4158
- module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
4159
- const ret = getObject(arg0)[arg1 >>> 0];
4160
- return addHeapObject(ret);
4161
- };
4162
-
4163
- module.exports.__wbg_getaccesstoken_d4dcf182b3b58e08 = function (arg0) {
4171
+ module.exports.__wbg_getaccesstoken_1b27a44424385dd2 = function (arg0) {
4164
4172
  const ret = getObject(arg0).get_access_token();
4165
4173
  return addHeapObject(ret);
4166
4174
  };
@@ -4345,14 +4353,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
4345
4353
  return ret;
4346
4354
  };
4347
4355
 
4348
- module.exports.__wbg_list_9de7cb90d9c7068b = function () {
4356
+ module.exports.__wbg_list_ab0f82f15fa895f5 = function () {
4349
4357
  return handleError(function (arg0) {
4350
4358
  const ret = getObject(arg0).list();
4351
4359
  return addHeapObject(ret);
4352
4360
  }, arguments);
4353
4361
  };
4354
4362
 
4355
- module.exports.__wbg_list_ac43ab644719cf44 = function () {
4363
+ module.exports.__wbg_list_cb1cbcfe84e633e2 = function () {
4356
4364
  return handleError(function (arg0) {
4357
4365
  const ret = getObject(arg0).list();
4358
4366
  return addHeapObject(ret);
@@ -4553,7 +4561,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
4553
4561
  }, arguments);
4554
4562
  };
4555
4563
 
4556
- module.exports.__wbg_remove_1fc1be8bb5d0bfb0 = function () {
4564
+ module.exports.__wbg_remove_33dd296c8b72650a = function () {
4557
4565
  return handleError(function (arg0, arg1, arg2) {
4558
4566
  let deferred0_0;
4559
4567
  let deferred0_1;
@@ -4568,7 +4576,7 @@ module.exports.__wbg_remove_1fc1be8bb5d0bfb0 = function () {
4568
4576
  }, arguments);
4569
4577
  };
4570
4578
 
4571
- module.exports.__wbg_remove_c25e52cfa594f899 = function () {
4579
+ module.exports.__wbg_remove_de8be3014c49fdfe = function () {
4572
4580
  return handleError(function (arg0, arg1, arg2) {
4573
4581
  let deferred0_0;
4574
4582
  let deferred0_1;
@@ -4614,21 +4622,6 @@ module.exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
4614
4622
  return addHeapObject(ret);
4615
4623
  };
4616
4624
 
4617
- module.exports.__wbg_set_1fa890ed08247955 = function () {
4618
- return handleError(function (arg0, arg1, arg2, arg3) {
4619
- let deferred0_0;
4620
- let deferred0_1;
4621
- try {
4622
- deferred0_0 = arg1;
4623
- deferred0_1 = arg2;
4624
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
4625
- return addHeapObject(ret);
4626
- } finally {
4627
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4628
- }
4629
- }, arguments);
4630
- };
4631
-
4632
4625
  module.exports.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
4633
4626
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
4634
4627
  };
@@ -4641,12 +4634,22 @@ module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
4641
4634
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
4642
4635
  };
4643
4636
 
4644
- module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
4645
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
4646
- return addHeapObject(ret);
4637
+ module.exports.__wbg_set_7df0ddb96f670064 = function () {
4638
+ return handleError(function (arg0, arg1, arg2, arg3) {
4639
+ let deferred0_0;
4640
+ let deferred0_1;
4641
+ try {
4642
+ deferred0_0 = arg1;
4643
+ deferred0_1 = arg2;
4644
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
4645
+ return addHeapObject(ret);
4646
+ } finally {
4647
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4648
+ }
4649
+ }, arguments);
4647
4650
  };
4648
4651
 
4649
- module.exports.__wbg_set_aa15c91ba98227b1 = function () {
4652
+ module.exports.__wbg_set_88313dba6bf5c8e9 = function () {
4650
4653
  return handleError(function (arg0, arg1, arg2, arg3) {
4651
4654
  let deferred0_0;
4652
4655
  let deferred0_1;
@@ -4661,6 +4664,11 @@ module.exports.__wbg_set_aa15c91ba98227b1 = function () {
4661
4664
  }, arguments);
4662
4665
  };
4663
4666
 
4667
+ module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
4668
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
4669
+ return addHeapObject(ret);
4670
+ };
4671
+
4664
4672
  module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
4665
4673
  getObject(arg0).body = getObject(arg1);
4666
4674
  };
@@ -4881,7 +4889,7 @@ module.exports.__wbindgen_closure_wrapper193 = function (arg0, arg1, arg2) {
4881
4889
  return addHeapObject(ret);
4882
4890
  };
4883
4891
 
4884
- module.exports.__wbindgen_closure_wrapper3783 = function (arg0, arg1, arg2) {
4892
+ module.exports.__wbindgen_closure_wrapper3784 = function (arg0, arg1, arg2) {
4885
4893
  const ret = makeMutClosure(arg0, arg1, 294, __wbg_adapter_60);
4886
4894
  return addHeapObject(ret);
4887
4895
  };
@@ -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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.305",
3
+ "version": "0.2.0-main.307",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",