@bitwarden/commercial-sdk-internal 0.2.0-main.371 → 0.2.0-main.373
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/bitwarden_wasm_internal.d.ts +23 -0
- package/bitwarden_wasm_internal_bg.js +65 -21
- 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 +65 -21
- 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
|
}
|
|
@@ -1922,6 +1927,24 @@ export class CiphersClient {
|
|
|
1922
1927
|
* Edit an existing [Cipher] and save it to the server.
|
|
1923
1928
|
*/
|
|
1924
1929
|
edit(request: CipherEditRequest): Promise<CipherView>;
|
|
1930
|
+
/**
|
|
1931
|
+
* Moves a cipher into an organization, adds it to collections, and calls the share_cipher API.
|
|
1932
|
+
*/
|
|
1933
|
+
share_cipher(
|
|
1934
|
+
cipher_view: CipherView,
|
|
1935
|
+
organization_id: OrganizationId,
|
|
1936
|
+
collection_ids: CollectionId[],
|
|
1937
|
+
original_cipher?: Cipher | null,
|
|
1938
|
+
): Promise<Cipher>;
|
|
1939
|
+
/**
|
|
1940
|
+
* Moves a group of ciphers into an organization, adds them to collections, and calls the
|
|
1941
|
+
* share_ciphers API.
|
|
1942
|
+
*/
|
|
1943
|
+
share_ciphers_bulk(
|
|
1944
|
+
cipher_views: CipherView[],
|
|
1945
|
+
organization_id: OrganizationId,
|
|
1946
|
+
collection_ids: CollectionId[],
|
|
1947
|
+
): Promise<Cipher[]>;
|
|
1925
1948
|
encrypt(cipher_view: CipherView): EncryptionContext;
|
|
1926
1949
|
/**
|
|
1927
1950
|
* 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_357(arg0, arg1, arg2, arg3) {
|
|
904
904
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h849ee2a9e4ae2f91(
|
|
905
905
|
arg0,
|
|
906
906
|
arg1,
|
|
@@ -1470,6 +1470,50 @@ class CiphersClient {
|
|
|
1470
1470
|
const ret = wasm.ciphersclient_edit(this.__wbg_ptr, addHeapObject(request));
|
|
1471
1471
|
return takeObject(ret);
|
|
1472
1472
|
}
|
|
1473
|
+
/**
|
|
1474
|
+
* Moves a cipher into an organization, adds it to collections, and calls the share_cipher API.
|
|
1475
|
+
* @param {CipherView} cipher_view
|
|
1476
|
+
* @param {OrganizationId} organization_id
|
|
1477
|
+
* @param {CollectionId[]} collection_ids
|
|
1478
|
+
* @param {Cipher | null} [original_cipher]
|
|
1479
|
+
* @returns {Promise<Cipher>}
|
|
1480
|
+
*/
|
|
1481
|
+
share_cipher(cipher_view, organization_id, collection_ids, original_cipher) {
|
|
1482
|
+
const ptr0 = passArrayJsValueToWasm0(collection_ids, wasm.__wbindgen_malloc);
|
|
1483
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1484
|
+
const ret = wasm.ciphersclient_share_cipher(
|
|
1485
|
+
this.__wbg_ptr,
|
|
1486
|
+
addHeapObject(cipher_view),
|
|
1487
|
+
addHeapObject(organization_id),
|
|
1488
|
+
ptr0,
|
|
1489
|
+
len0,
|
|
1490
|
+
isLikeNone(original_cipher) ? 0 : addHeapObject(original_cipher),
|
|
1491
|
+
);
|
|
1492
|
+
return takeObject(ret);
|
|
1493
|
+
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Moves a group of ciphers into an organization, adds them to collections, and calls the
|
|
1496
|
+
* share_ciphers API.
|
|
1497
|
+
* @param {CipherView[]} cipher_views
|
|
1498
|
+
* @param {OrganizationId} organization_id
|
|
1499
|
+
* @param {CollectionId[]} collection_ids
|
|
1500
|
+
* @returns {Promise<Cipher[]>}
|
|
1501
|
+
*/
|
|
1502
|
+
share_ciphers_bulk(cipher_views, organization_id, collection_ids) {
|
|
1503
|
+
const ptr0 = passArrayJsValueToWasm0(cipher_views, wasm.__wbindgen_malloc);
|
|
1504
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1505
|
+
const ptr1 = passArrayJsValueToWasm0(collection_ids, wasm.__wbindgen_malloc);
|
|
1506
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1507
|
+
const ret = wasm.ciphersclient_share_ciphers_bulk(
|
|
1508
|
+
this.__wbg_ptr,
|
|
1509
|
+
ptr0,
|
|
1510
|
+
len0,
|
|
1511
|
+
addHeapObject(organization_id),
|
|
1512
|
+
ptr1,
|
|
1513
|
+
len1,
|
|
1514
|
+
);
|
|
1515
|
+
return takeObject(ret);
|
|
1516
|
+
}
|
|
1473
1517
|
/**
|
|
1474
1518
|
* @param {CipherView} cipher_view
|
|
1475
1519
|
* @returns {EncryptionContext}
|
|
@@ -4339,7 +4383,7 @@ module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
|
|
|
4339
4383
|
}, arguments);
|
|
4340
4384
|
};
|
|
4341
4385
|
|
|
4342
|
-
module.exports.
|
|
4386
|
+
module.exports.__wbg_cipher_a27a94359315cc93 = function (arg0) {
|
|
4343
4387
|
const ret = getObject(arg0).cipher;
|
|
4344
4388
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4345
4389
|
};
|
|
@@ -4419,7 +4463,7 @@ module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
|
|
|
4419
4463
|
return addHeapObject(ret);
|
|
4420
4464
|
};
|
|
4421
4465
|
|
|
4422
|
-
module.exports.
|
|
4466
|
+
module.exports.__wbg_folder_ff53d2d4dc2faf85 = function (arg0) {
|
|
4423
4467
|
const ret = getObject(arg0).folder;
|
|
4424
4468
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4425
4469
|
};
|
|
@@ -4446,7 +4490,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
4446
4490
|
return ret;
|
|
4447
4491
|
};
|
|
4448
4492
|
|
|
4449
|
-
module.exports.
|
|
4493
|
+
module.exports.__wbg_get_669deafd63743335 = function () {
|
|
4450
4494
|
return handleError(function (arg0, arg1, arg2) {
|
|
4451
4495
|
let deferred0_0;
|
|
4452
4496
|
let deferred0_1;
|
|
@@ -4468,12 +4512,7 @@ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
|
4468
4512
|
}, arguments);
|
|
4469
4513
|
};
|
|
4470
4514
|
|
|
4471
|
-
module.exports.
|
|
4472
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4473
|
-
return addHeapObject(ret);
|
|
4474
|
-
};
|
|
4475
|
-
|
|
4476
|
-
module.exports.__wbg_get_e4ef7322d68ab383 = function () {
|
|
4515
|
+
module.exports.__wbg_get_ab004b7c5fd98da4 = function () {
|
|
4477
4516
|
return handleError(function (arg0, arg1, arg2) {
|
|
4478
4517
|
let deferred0_0;
|
|
4479
4518
|
let deferred0_1;
|
|
@@ -4488,7 +4527,12 @@ module.exports.__wbg_get_e4ef7322d68ab383 = function () {
|
|
|
4488
4527
|
}, arguments);
|
|
4489
4528
|
};
|
|
4490
4529
|
|
|
4491
|
-
module.exports.
|
|
4530
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
4531
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4532
|
+
return addHeapObject(ret);
|
|
4533
|
+
};
|
|
4534
|
+
|
|
4535
|
+
module.exports.__wbg_getaccesstoken_005ebb39d33faf4d = function (arg0) {
|
|
4492
4536
|
const ret = getObject(arg0).get_access_token();
|
|
4493
4537
|
return addHeapObject(ret);
|
|
4494
4538
|
};
|
|
@@ -4673,14 +4717,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
4673
4717
|
return ret;
|
|
4674
4718
|
};
|
|
4675
4719
|
|
|
4676
|
-
module.exports.
|
|
4720
|
+
module.exports.__wbg_list_8a771eed93888b5d = function () {
|
|
4677
4721
|
return handleError(function (arg0) {
|
|
4678
4722
|
const ret = getObject(arg0).list();
|
|
4679
4723
|
return addHeapObject(ret);
|
|
4680
4724
|
}, arguments);
|
|
4681
4725
|
};
|
|
4682
4726
|
|
|
4683
|
-
module.exports.
|
|
4727
|
+
module.exports.__wbg_list_97f0fbb3cdf20313 = function () {
|
|
4684
4728
|
return handleError(function (arg0) {
|
|
4685
4729
|
const ret = getObject(arg0).list();
|
|
4686
4730
|
return addHeapObject(ret);
|
|
@@ -4723,7 +4767,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
4723
4767
|
const a = state0.a;
|
|
4724
4768
|
state0.a = 0;
|
|
4725
4769
|
try {
|
|
4726
|
-
return
|
|
4770
|
+
return __wbg_adapter_357(a, state0.b, arg0, arg1);
|
|
4727
4771
|
} finally {
|
|
4728
4772
|
state0.a = a;
|
|
4729
4773
|
}
|
|
@@ -4886,7 +4930,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
4886
4930
|
}, arguments);
|
|
4887
4931
|
};
|
|
4888
4932
|
|
|
4889
|
-
module.exports.
|
|
4933
|
+
module.exports.__wbg_remove_956f7c593f896a01 = function () {
|
|
4890
4934
|
return handleError(function (arg0, arg1, arg2) {
|
|
4891
4935
|
let deferred0_0;
|
|
4892
4936
|
let deferred0_1;
|
|
@@ -4901,7 +4945,7 @@ module.exports.__wbg_remove_b7ea90f3b7133fcb = function () {
|
|
|
4901
4945
|
}, arguments);
|
|
4902
4946
|
};
|
|
4903
4947
|
|
|
4904
|
-
module.exports.
|
|
4948
|
+
module.exports.__wbg_remove_e3a32c8e47e778c1 = function () {
|
|
4905
4949
|
return handleError(function (arg0, arg1, arg2) {
|
|
4906
4950
|
let deferred0_0;
|
|
4907
4951
|
let deferred0_1;
|
|
@@ -4959,7 +5003,7 @@ module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
|
4959
5003
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4960
5004
|
};
|
|
4961
5005
|
|
|
4962
|
-
module.exports.
|
|
5006
|
+
module.exports.__wbg_set_89104a657df0b114 = function () {
|
|
4963
5007
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4964
5008
|
let deferred0_0;
|
|
4965
5009
|
let deferred0_1;
|
|
@@ -4979,7 +5023,7 @@ module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
|
|
|
4979
5023
|
return addHeapObject(ret);
|
|
4980
5024
|
};
|
|
4981
5025
|
|
|
4982
|
-
module.exports.
|
|
5026
|
+
module.exports.__wbg_set_d46a2477f493c1aa = function () {
|
|
4983
5027
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4984
5028
|
let deferred0_0;
|
|
4985
5029
|
let deferred0_1;
|
|
@@ -5219,17 +5263,17 @@ module.exports.__wbindgen_closure_wrapper198 = function (arg0, arg1, arg2) {
|
|
|
5219
5263
|
return addHeapObject(ret);
|
|
5220
5264
|
};
|
|
5221
5265
|
|
|
5222
|
-
module.exports.
|
|
5266
|
+
module.exports.__wbindgen_closure_wrapper4523 = function (arg0, arg1, arg2) {
|
|
5223
5267
|
const ret = makeMutClosure(arg0, arg1, 349, __wbg_adapter_60);
|
|
5224
5268
|
return addHeapObject(ret);
|
|
5225
5269
|
};
|
|
5226
5270
|
|
|
5227
|
-
module.exports.
|
|
5271
|
+
module.exports.__wbindgen_closure_wrapper8581 = function (arg0, arg1, arg2) {
|
|
5228
5272
|
const ret = makeMutClosure(arg0, arg1, 516, __wbg_adapter_60);
|
|
5229
5273
|
return addHeapObject(ret);
|
|
5230
5274
|
};
|
|
5231
5275
|
|
|
5232
|
-
module.exports.
|
|
5276
|
+
module.exports.__wbindgen_closure_wrapper8967 = function (arg0, arg1, arg2) {
|
|
5233
5277
|
const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_57);
|
|
5234
5278
|
return addHeapObject(ret);
|
|
5235
5279
|
};
|
|
Binary file
|
|
@@ -325,6 +325,22 @@ export const attachmentsclient_decrypt_buffer: (
|
|
|
325
325
|
) => void;
|
|
326
326
|
export const ciphersclient_create: (a: number, b: number) => number;
|
|
327
327
|
export const ciphersclient_edit: (a: number, b: number) => number;
|
|
328
|
+
export const ciphersclient_share_cipher: (
|
|
329
|
+
a: number,
|
|
330
|
+
b: number,
|
|
331
|
+
c: number,
|
|
332
|
+
d: number,
|
|
333
|
+
e: number,
|
|
334
|
+
f: number,
|
|
335
|
+
) => number;
|
|
336
|
+
export const ciphersclient_share_ciphers_bulk: (
|
|
337
|
+
a: number,
|
|
338
|
+
b: number,
|
|
339
|
+
c: number,
|
|
340
|
+
d: number,
|
|
341
|
+
e: number,
|
|
342
|
+
f: number,
|
|
343
|
+
) => number;
|
|
328
344
|
export const ciphersclient_encrypt: (a: number, b: number, c: number) => void;
|
|
329
345
|
export const ciphersclient_encrypt_cipher_for_rotation: (
|
|
330
346
|
a: number,
|