@bitwarden/commercial-sdk-internal 0.2.0-main.370 → 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/bitwarden_wasm_internal.d.ts +23 -0
- package/bitwarden_wasm_internal_bg.js +75 -31
- 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 +75 -31
- 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_8a6269e122b390ae = 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_6dfae1b1134b74f8 = function (arg0) {
|
|
4423
4467
|
const ret = getObject(arg0).folder;
|
|
4424
4468
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4425
4469
|
};
|
|
@@ -4446,7 +4490,14 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
4446
4490
|
return ret;
|
|
4447
4491
|
};
|
|
4448
4492
|
|
|
4449
|
-
module.exports.
|
|
4493
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
4494
|
+
return handleError(function (arg0, arg1) {
|
|
4495
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4496
|
+
return addHeapObject(ret);
|
|
4497
|
+
}, arguments);
|
|
4498
|
+
};
|
|
4499
|
+
|
|
4500
|
+
module.exports.__wbg_get_77a3546428c7fc7d = function () {
|
|
4450
4501
|
return handleError(function (arg0, arg1, arg2) {
|
|
4451
4502
|
let deferred0_0;
|
|
4452
4503
|
let deferred0_1;
|
|
@@ -4461,7 +4512,7 @@ module.exports.__wbg_get_06a7c389d73976e4 = function () {
|
|
|
4461
4512
|
}, arguments);
|
|
4462
4513
|
};
|
|
4463
4514
|
|
|
4464
|
-
module.exports.
|
|
4515
|
+
module.exports.__wbg_get_94e67783f37c82cd = function () {
|
|
4465
4516
|
return handleError(function (arg0, arg1, arg2) {
|
|
4466
4517
|
let deferred0_0;
|
|
4467
4518
|
let deferred0_1;
|
|
@@ -4476,19 +4527,12 @@ module.exports.__wbg_get_0d53d8bad034f847 = function () {
|
|
|
4476
4527
|
}, arguments);
|
|
4477
4528
|
};
|
|
4478
4529
|
|
|
4479
|
-
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
4480
|
-
return handleError(function (arg0, arg1) {
|
|
4481
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4482
|
-
return addHeapObject(ret);
|
|
4483
|
-
}, arguments);
|
|
4484
|
-
};
|
|
4485
|
-
|
|
4486
4530
|
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
4487
4531
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4488
4532
|
return addHeapObject(ret);
|
|
4489
4533
|
};
|
|
4490
4534
|
|
|
4491
|
-
module.exports.
|
|
4535
|
+
module.exports.__wbg_getaccesstoken_9240256d891025b6 = 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_005a77213c99fcd3 = 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_b0cae842e3a13e2c = 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_4817686ccc51caea = 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_b61892357ced7e0d = function () {
|
|
|
4901
4945
|
}, arguments);
|
|
4902
4946
|
};
|
|
4903
4947
|
|
|
4904
|
-
module.exports.
|
|
4948
|
+
module.exports.__wbg_remove_d197cb44124071d6 = function () {
|
|
4905
4949
|
return handleError(function (arg0, arg1, arg2) {
|
|
4906
4950
|
let deferred0_0;
|
|
4907
4951
|
let deferred0_1;
|
|
@@ -4947,7 +4991,15 @@ module.exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
4947
4991
|
return addHeapObject(ret);
|
|
4948
4992
|
};
|
|
4949
4993
|
|
|
4950
|
-
module.exports.
|
|
4994
|
+
module.exports.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
|
|
4995
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
4996
|
+
};
|
|
4997
|
+
|
|
4998
|
+
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
4999
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5000
|
+
};
|
|
5001
|
+
|
|
5002
|
+
module.exports.__wbg_set_595fa1ff8502ba96 = function () {
|
|
4951
5003
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4952
5004
|
let deferred0_0;
|
|
4953
5005
|
let deferred0_1;
|
|
@@ -4962,19 +5014,11 @@ module.exports.__wbg_set_21a2ed8a70365e91 = function () {
|
|
|
4962
5014
|
}, arguments);
|
|
4963
5015
|
};
|
|
4964
5016
|
|
|
4965
|
-
module.exports.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
|
|
4966
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
4967
|
-
};
|
|
4968
|
-
|
|
4969
|
-
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
4970
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4971
|
-
};
|
|
4972
|
-
|
|
4973
5017
|
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
4974
5018
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4975
5019
|
};
|
|
4976
5020
|
|
|
4977
|
-
module.exports.
|
|
5021
|
+
module.exports.__wbg_set_66f7f1ab8b1b0899 = function () {
|
|
4978
5022
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4979
5023
|
let deferred0_0;
|
|
4980
5024
|
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,
|