@bitwarden/sdk-internal 0.2.0-main.371 → 0.2.0-main.372
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 +1 -1
- package/bitwarden_wasm_internal.d.ts +23 -0
- package/bitwarden_wasm_internal_bg.js +79 -35
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +16 -0
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +23 -0
- package/node/bitwarden_wasm_internal.js +79 -35
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +16 -0
- package/package.json +1 -1
|
@@ -1706,8 +1706,13 @@ export interface CipherError extends Error {
|
|
|
1706
1706
|
variant:
|
|
1707
1707
|
| "MissingField"
|
|
1708
1708
|
| "Crypto"
|
|
1709
|
+
| "Decrypt"
|
|
1709
1710
|
| "Encrypt"
|
|
1710
1711
|
| "AttachmentsWithoutKeys"
|
|
1712
|
+
| "OrganizationAlreadySet"
|
|
1713
|
+
| "PutShare"
|
|
1714
|
+
| "PutShareMany"
|
|
1715
|
+
| "Repository"
|
|
1711
1716
|
| "Chrono"
|
|
1712
1717
|
| "SerdeJson";
|
|
1713
1718
|
}
|
|
@@ -1918,6 +1923,24 @@ export class CiphersClient {
|
|
|
1918
1923
|
* Edit an existing [Cipher] and save it to the server.
|
|
1919
1924
|
*/
|
|
1920
1925
|
edit(request: CipherEditRequest): Promise<CipherView>;
|
|
1926
|
+
/**
|
|
1927
|
+
* Moves a cipher into an organization, adds it to collections, and calls the share_cipher API.
|
|
1928
|
+
*/
|
|
1929
|
+
share_cipher(
|
|
1930
|
+
cipher_view: CipherView,
|
|
1931
|
+
organization_id: OrganizationId,
|
|
1932
|
+
collection_ids: CollectionId[],
|
|
1933
|
+
original_cipher?: Cipher | null,
|
|
1934
|
+
): Promise<Cipher>;
|
|
1935
|
+
/**
|
|
1936
|
+
* Moves a group of ciphers into an organization, adds them to collections, and calls the
|
|
1937
|
+
* share_ciphers API.
|
|
1938
|
+
*/
|
|
1939
|
+
share_ciphers_bulk(
|
|
1940
|
+
cipher_views: CipherView[],
|
|
1941
|
+
organization_id: OrganizationId,
|
|
1942
|
+
collection_ids: CollectionId[],
|
|
1943
|
+
): Promise<Cipher[]>;
|
|
1921
1944
|
encrypt(cipher_view: CipherView): EncryptionContext;
|
|
1922
1945
|
/**
|
|
1923
1946
|
* Encrypt a cipher with the provided key. This should only be used when rotating encryption
|
|
@@ -900,7 +900,7 @@ function __wbg_adapter_60(arg0, arg1) {
|
|
|
900
900
|
);
|
|
901
901
|
}
|
|
902
902
|
|
|
903
|
-
function
|
|
903
|
+
function __wbg_adapter_355(arg0, arg1, arg2, arg3) {
|
|
904
904
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h849ee2a9e4ae2f91(
|
|
905
905
|
arg0,
|
|
906
906
|
arg1,
|
|
@@ -1462,6 +1462,50 @@ class CiphersClient {
|
|
|
1462
1462
|
const ret = wasm.ciphersclient_edit(this.__wbg_ptr, addHeapObject(request));
|
|
1463
1463
|
return takeObject(ret);
|
|
1464
1464
|
}
|
|
1465
|
+
/**
|
|
1466
|
+
* Moves a cipher into an organization, adds it to collections, and calls the share_cipher API.
|
|
1467
|
+
* @param {CipherView} cipher_view
|
|
1468
|
+
* @param {OrganizationId} organization_id
|
|
1469
|
+
* @param {CollectionId[]} collection_ids
|
|
1470
|
+
* @param {Cipher | null} [original_cipher]
|
|
1471
|
+
* @returns {Promise<Cipher>}
|
|
1472
|
+
*/
|
|
1473
|
+
share_cipher(cipher_view, organization_id, collection_ids, original_cipher) {
|
|
1474
|
+
const ptr0 = passArrayJsValueToWasm0(collection_ids, wasm.__wbindgen_malloc);
|
|
1475
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1476
|
+
const ret = wasm.ciphersclient_share_cipher(
|
|
1477
|
+
this.__wbg_ptr,
|
|
1478
|
+
addHeapObject(cipher_view),
|
|
1479
|
+
addHeapObject(organization_id),
|
|
1480
|
+
ptr0,
|
|
1481
|
+
len0,
|
|
1482
|
+
isLikeNone(original_cipher) ? 0 : addHeapObject(original_cipher),
|
|
1483
|
+
);
|
|
1484
|
+
return takeObject(ret);
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* Moves a group of ciphers into an organization, adds them to collections, and calls the
|
|
1488
|
+
* share_ciphers API.
|
|
1489
|
+
* @param {CipherView[]} cipher_views
|
|
1490
|
+
* @param {OrganizationId} organization_id
|
|
1491
|
+
* @param {CollectionId[]} collection_ids
|
|
1492
|
+
* @returns {Promise<Cipher[]>}
|
|
1493
|
+
*/
|
|
1494
|
+
share_ciphers_bulk(cipher_views, organization_id, collection_ids) {
|
|
1495
|
+
const ptr0 = passArrayJsValueToWasm0(cipher_views, wasm.__wbindgen_malloc);
|
|
1496
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1497
|
+
const ptr1 = passArrayJsValueToWasm0(collection_ids, wasm.__wbindgen_malloc);
|
|
1498
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1499
|
+
const ret = wasm.ciphersclient_share_ciphers_bulk(
|
|
1500
|
+
this.__wbg_ptr,
|
|
1501
|
+
ptr0,
|
|
1502
|
+
len0,
|
|
1503
|
+
addHeapObject(organization_id),
|
|
1504
|
+
ptr1,
|
|
1505
|
+
len1,
|
|
1506
|
+
);
|
|
1507
|
+
return takeObject(ret);
|
|
1508
|
+
}
|
|
1465
1509
|
/**
|
|
1466
1510
|
* @param {CipherView} cipher_view
|
|
1467
1511
|
* @returns {EncryptionContext}
|
|
@@ -4263,7 +4307,7 @@ module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
|
|
|
4263
4307
|
}, arguments);
|
|
4264
4308
|
};
|
|
4265
4309
|
|
|
4266
|
-
module.exports.
|
|
4310
|
+
module.exports.__wbg_cipher_8a6269e122b390ae = function (arg0) {
|
|
4267
4311
|
const ret = getObject(arg0).cipher;
|
|
4268
4312
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4269
4313
|
};
|
|
@@ -4343,7 +4387,7 @@ module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
|
|
|
4343
4387
|
return addHeapObject(ret);
|
|
4344
4388
|
};
|
|
4345
4389
|
|
|
4346
|
-
module.exports.
|
|
4390
|
+
module.exports.__wbg_folder_6dfae1b1134b74f8 = function (arg0) {
|
|
4347
4391
|
const ret = getObject(arg0).folder;
|
|
4348
4392
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4349
4393
|
};
|
|
@@ -4370,7 +4414,14 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
4370
4414
|
return ret;
|
|
4371
4415
|
};
|
|
4372
4416
|
|
|
4373
|
-
module.exports.
|
|
4417
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
4418
|
+
return handleError(function (arg0, arg1) {
|
|
4419
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4420
|
+
return addHeapObject(ret);
|
|
4421
|
+
}, arguments);
|
|
4422
|
+
};
|
|
4423
|
+
|
|
4424
|
+
module.exports.__wbg_get_77a3546428c7fc7d = function () {
|
|
4374
4425
|
return handleError(function (arg0, arg1, arg2) {
|
|
4375
4426
|
let deferred0_0;
|
|
4376
4427
|
let deferred0_1;
|
|
@@ -4385,19 +4436,7 @@ module.exports.__wbg_get_61df30619186fd87 = function () {
|
|
|
4385
4436
|
}, arguments);
|
|
4386
4437
|
};
|
|
4387
4438
|
|
|
4388
|
-
module.exports.
|
|
4389
|
-
return handleError(function (arg0, arg1) {
|
|
4390
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4391
|
-
return addHeapObject(ret);
|
|
4392
|
-
}, arguments);
|
|
4393
|
-
};
|
|
4394
|
-
|
|
4395
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
4396
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4397
|
-
return addHeapObject(ret);
|
|
4398
|
-
};
|
|
4399
|
-
|
|
4400
|
-
module.exports.__wbg_get_e4ef7322d68ab383 = function () {
|
|
4439
|
+
module.exports.__wbg_get_94e67783f37c82cd = function () {
|
|
4401
4440
|
return handleError(function (arg0, arg1, arg2) {
|
|
4402
4441
|
let deferred0_0;
|
|
4403
4442
|
let deferred0_1;
|
|
@@ -4412,7 +4451,12 @@ module.exports.__wbg_get_e4ef7322d68ab383 = function () {
|
|
|
4412
4451
|
}, arguments);
|
|
4413
4452
|
};
|
|
4414
4453
|
|
|
4415
|
-
module.exports.
|
|
4454
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
4455
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4456
|
+
return addHeapObject(ret);
|
|
4457
|
+
};
|
|
4458
|
+
|
|
4459
|
+
module.exports.__wbg_getaccesstoken_9240256d891025b6 = function (arg0) {
|
|
4416
4460
|
const ret = getObject(arg0).get_access_token();
|
|
4417
4461
|
return addHeapObject(ret);
|
|
4418
4462
|
};
|
|
@@ -4597,14 +4641,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
4597
4641
|
return ret;
|
|
4598
4642
|
};
|
|
4599
4643
|
|
|
4600
|
-
module.exports.
|
|
4644
|
+
module.exports.__wbg_list_005a77213c99fcd3 = function () {
|
|
4601
4645
|
return handleError(function (arg0) {
|
|
4602
4646
|
const ret = getObject(arg0).list();
|
|
4603
4647
|
return addHeapObject(ret);
|
|
4604
4648
|
}, arguments);
|
|
4605
4649
|
};
|
|
4606
4650
|
|
|
4607
|
-
module.exports.
|
|
4651
|
+
module.exports.__wbg_list_b0cae842e3a13e2c = function () {
|
|
4608
4652
|
return handleError(function (arg0) {
|
|
4609
4653
|
const ret = getObject(arg0).list();
|
|
4610
4654
|
return addHeapObject(ret);
|
|
@@ -4647,7 +4691,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
4647
4691
|
const a = state0.a;
|
|
4648
4692
|
state0.a = 0;
|
|
4649
4693
|
try {
|
|
4650
|
-
return
|
|
4694
|
+
return __wbg_adapter_355(a, state0.b, arg0, arg1);
|
|
4651
4695
|
} finally {
|
|
4652
4696
|
state0.a = a;
|
|
4653
4697
|
}
|
|
@@ -4810,7 +4854,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
4810
4854
|
}, arguments);
|
|
4811
4855
|
};
|
|
4812
4856
|
|
|
4813
|
-
module.exports.
|
|
4857
|
+
module.exports.__wbg_remove_4817686ccc51caea = function () {
|
|
4814
4858
|
return handleError(function (arg0, arg1, arg2) {
|
|
4815
4859
|
let deferred0_0;
|
|
4816
4860
|
let deferred0_1;
|
|
@@ -4825,7 +4869,7 @@ module.exports.__wbg_remove_b7ea90f3b7133fcb = function () {
|
|
|
4825
4869
|
}, arguments);
|
|
4826
4870
|
};
|
|
4827
4871
|
|
|
4828
|
-
module.exports.
|
|
4872
|
+
module.exports.__wbg_remove_d197cb44124071d6 = function () {
|
|
4829
4873
|
return handleError(function (arg0, arg1, arg2) {
|
|
4830
4874
|
let deferred0_0;
|
|
4831
4875
|
let deferred0_1;
|
|
@@ -4879,11 +4923,7 @@ module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
|
4879
4923
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4880
4924
|
};
|
|
4881
4925
|
|
|
4882
|
-
module.exports.
|
|
4883
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4884
|
-
};
|
|
4885
|
-
|
|
4886
|
-
module.exports.__wbg_set_7f067b933dc18d3c = function () {
|
|
4926
|
+
module.exports.__wbg_set_595fa1ff8502ba96 = function () {
|
|
4887
4927
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4888
4928
|
let deferred0_0;
|
|
4889
4929
|
let deferred0_1;
|
|
@@ -4898,12 +4938,11 @@ module.exports.__wbg_set_7f067b933dc18d3c = function () {
|
|
|
4898
4938
|
}, arguments);
|
|
4899
4939
|
};
|
|
4900
4940
|
|
|
4901
|
-
module.exports.
|
|
4902
|
-
|
|
4903
|
-
return addHeapObject(ret);
|
|
4941
|
+
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
4942
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4904
4943
|
};
|
|
4905
4944
|
|
|
4906
|
-
module.exports.
|
|
4945
|
+
module.exports.__wbg_set_66f7f1ab8b1b0899 = function () {
|
|
4907
4946
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4908
4947
|
let deferred0_0;
|
|
4909
4948
|
let deferred0_1;
|
|
@@ -4918,6 +4957,11 @@ module.exports.__wbg_set_99d30132201b391d = function () {
|
|
|
4918
4957
|
}, arguments);
|
|
4919
4958
|
};
|
|
4920
4959
|
|
|
4960
|
+
module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
|
|
4961
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
4962
|
+
return addHeapObject(ret);
|
|
4963
|
+
};
|
|
4964
|
+
|
|
4921
4965
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
|
4922
4966
|
getObject(arg0).body = getObject(arg1);
|
|
4923
4967
|
};
|
|
@@ -5143,17 +5187,17 @@ module.exports.__wbindgen_closure_wrapper200 = function (arg0, arg1, arg2) {
|
|
|
5143
5187
|
return addHeapObject(ret);
|
|
5144
5188
|
};
|
|
5145
5189
|
|
|
5146
|
-
module.exports.
|
|
5190
|
+
module.exports.__wbindgen_closure_wrapper4512 = function (arg0, arg1, arg2) {
|
|
5147
5191
|
const ret = makeMutClosure(arg0, arg1, 349, __wbg_adapter_60);
|
|
5148
5192
|
return addHeapObject(ret);
|
|
5149
5193
|
};
|
|
5150
5194
|
|
|
5151
|
-
module.exports.
|
|
5195
|
+
module.exports.__wbindgen_closure_wrapper8569 = function (arg0, arg1, arg2) {
|
|
5152
5196
|
const ret = makeMutClosure(arg0, arg1, 516, __wbg_adapter_60);
|
|
5153
5197
|
return addHeapObject(ret);
|
|
5154
5198
|
};
|
|
5155
5199
|
|
|
5156
|
-
module.exports.
|
|
5200
|
+
module.exports.__wbindgen_closure_wrapper8955 = function (arg0, arg1, arg2) {
|
|
5157
5201
|
const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_54);
|
|
5158
5202
|
return addHeapObject(ret);
|
|
5159
5203
|
};
|
|
Binary file
|
|
@@ -321,6 +321,22 @@ export const attachmentsclient_decrypt_buffer: (
|
|
|
321
321
|
) => void;
|
|
322
322
|
export const ciphersclient_create: (a: number, b: number) => number;
|
|
323
323
|
export const ciphersclient_edit: (a: number, b: number) => number;
|
|
324
|
+
export const ciphersclient_share_cipher: (
|
|
325
|
+
a: number,
|
|
326
|
+
b: number,
|
|
327
|
+
c: number,
|
|
328
|
+
d: number,
|
|
329
|
+
e: number,
|
|
330
|
+
f: number,
|
|
331
|
+
) => number;
|
|
332
|
+
export const ciphersclient_share_ciphers_bulk: (
|
|
333
|
+
a: number,
|
|
334
|
+
b: number,
|
|
335
|
+
c: number,
|
|
336
|
+
d: number,
|
|
337
|
+
e: number,
|
|
338
|
+
f: number,
|
|
339
|
+
) => number;
|
|
324
340
|
export const ciphersclient_encrypt: (a: number, b: number, c: number) => void;
|
|
325
341
|
export const ciphersclient_encrypt_cipher_for_rotation: (
|
|
326
342
|
a: number,
|