@bitwarden/commercial-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/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
|
}
|
|
@@ -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
|
|
@@ -906,7 +906,7 @@ function __wbg_adapter_60(arg0, arg1) {
|
|
|
906
906
|
);
|
|
907
907
|
}
|
|
908
908
|
|
|
909
|
-
function
|
|
909
|
+
function __wbg_adapter_357(arg0, arg1, arg2, arg3) {
|
|
910
910
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h849ee2a9e4ae2f91(
|
|
911
911
|
arg0,
|
|
912
912
|
arg1,
|
|
@@ -1472,6 +1472,50 @@ export class CiphersClient {
|
|
|
1472
1472
|
const ret = wasm.ciphersclient_edit(this.__wbg_ptr, addHeapObject(request));
|
|
1473
1473
|
return takeObject(ret);
|
|
1474
1474
|
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Moves a cipher into an organization, adds it to collections, and calls the share_cipher API.
|
|
1477
|
+
* @param {CipherView} cipher_view
|
|
1478
|
+
* @param {OrganizationId} organization_id
|
|
1479
|
+
* @param {CollectionId[]} collection_ids
|
|
1480
|
+
* @param {Cipher | null} [original_cipher]
|
|
1481
|
+
* @returns {Promise<Cipher>}
|
|
1482
|
+
*/
|
|
1483
|
+
share_cipher(cipher_view, organization_id, collection_ids, original_cipher) {
|
|
1484
|
+
const ptr0 = passArrayJsValueToWasm0(collection_ids, wasm.__wbindgen_malloc);
|
|
1485
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1486
|
+
const ret = wasm.ciphersclient_share_cipher(
|
|
1487
|
+
this.__wbg_ptr,
|
|
1488
|
+
addHeapObject(cipher_view),
|
|
1489
|
+
addHeapObject(organization_id),
|
|
1490
|
+
ptr0,
|
|
1491
|
+
len0,
|
|
1492
|
+
isLikeNone(original_cipher) ? 0 : addHeapObject(original_cipher),
|
|
1493
|
+
);
|
|
1494
|
+
return takeObject(ret);
|
|
1495
|
+
}
|
|
1496
|
+
/**
|
|
1497
|
+
* Moves a group of ciphers into an organization, adds them to collections, and calls the
|
|
1498
|
+
* share_ciphers API.
|
|
1499
|
+
* @param {CipherView[]} cipher_views
|
|
1500
|
+
* @param {OrganizationId} organization_id
|
|
1501
|
+
* @param {CollectionId[]} collection_ids
|
|
1502
|
+
* @returns {Promise<Cipher[]>}
|
|
1503
|
+
*/
|
|
1504
|
+
share_ciphers_bulk(cipher_views, organization_id, collection_ids) {
|
|
1505
|
+
const ptr0 = passArrayJsValueToWasm0(cipher_views, wasm.__wbindgen_malloc);
|
|
1506
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1507
|
+
const ptr1 = passArrayJsValueToWasm0(collection_ids, wasm.__wbindgen_malloc);
|
|
1508
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1509
|
+
const ret = wasm.ciphersclient_share_ciphers_bulk(
|
|
1510
|
+
this.__wbg_ptr,
|
|
1511
|
+
ptr0,
|
|
1512
|
+
len0,
|
|
1513
|
+
addHeapObject(organization_id),
|
|
1514
|
+
ptr1,
|
|
1515
|
+
len1,
|
|
1516
|
+
);
|
|
1517
|
+
return takeObject(ret);
|
|
1518
|
+
}
|
|
1475
1519
|
/**
|
|
1476
1520
|
* @param {CipherView} cipher_view
|
|
1477
1521
|
* @returns {EncryptionContext}
|
|
@@ -4319,7 +4363,7 @@ export function __wbg_call_7cccdd69e0791ae2() {
|
|
|
4319
4363
|
}, arguments);
|
|
4320
4364
|
}
|
|
4321
4365
|
|
|
4322
|
-
export function
|
|
4366
|
+
export function __wbg_cipher_8a6269e122b390ae(arg0) {
|
|
4323
4367
|
const ret = getObject(arg0).cipher;
|
|
4324
4368
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4325
4369
|
}
|
|
@@ -4399,7 +4443,7 @@ export function __wbg_fetch_509096533071c657(arg0, arg1) {
|
|
|
4399
4443
|
return addHeapObject(ret);
|
|
4400
4444
|
}
|
|
4401
4445
|
|
|
4402
|
-
export function
|
|
4446
|
+
export function __wbg_folder_6dfae1b1134b74f8(arg0) {
|
|
4403
4447
|
const ret = getObject(arg0).folder;
|
|
4404
4448
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4405
4449
|
}
|
|
@@ -4426,7 +4470,14 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
|
|
|
4426
4470
|
return ret;
|
|
4427
4471
|
}
|
|
4428
4472
|
|
|
4429
|
-
export function
|
|
4473
|
+
export function __wbg_get_67b2ba62fc30de12() {
|
|
4474
|
+
return handleError(function (arg0, arg1) {
|
|
4475
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4476
|
+
return addHeapObject(ret);
|
|
4477
|
+
}, arguments);
|
|
4478
|
+
}
|
|
4479
|
+
|
|
4480
|
+
export function __wbg_get_77a3546428c7fc7d() {
|
|
4430
4481
|
return handleError(function (arg0, arg1, arg2) {
|
|
4431
4482
|
let deferred0_0;
|
|
4432
4483
|
let deferred0_1;
|
|
@@ -4441,19 +4492,7 @@ export function __wbg_get_61df30619186fd87() {
|
|
|
4441
4492
|
}, arguments);
|
|
4442
4493
|
}
|
|
4443
4494
|
|
|
4444
|
-
export function
|
|
4445
|
-
return handleError(function (arg0, arg1) {
|
|
4446
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4447
|
-
return addHeapObject(ret);
|
|
4448
|
-
}, arguments);
|
|
4449
|
-
}
|
|
4450
|
-
|
|
4451
|
-
export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
4452
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4453
|
-
return addHeapObject(ret);
|
|
4454
|
-
}
|
|
4455
|
-
|
|
4456
|
-
export function __wbg_get_e4ef7322d68ab383() {
|
|
4495
|
+
export function __wbg_get_94e67783f37c82cd() {
|
|
4457
4496
|
return handleError(function (arg0, arg1, arg2) {
|
|
4458
4497
|
let deferred0_0;
|
|
4459
4498
|
let deferred0_1;
|
|
@@ -4468,7 +4507,12 @@ export function __wbg_get_e4ef7322d68ab383() {
|
|
|
4468
4507
|
}, arguments);
|
|
4469
4508
|
}
|
|
4470
4509
|
|
|
4471
|
-
export function
|
|
4510
|
+
export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
4511
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4512
|
+
return addHeapObject(ret);
|
|
4513
|
+
}
|
|
4514
|
+
|
|
4515
|
+
export function __wbg_getaccesstoken_9240256d891025b6(arg0) {
|
|
4472
4516
|
const ret = getObject(arg0).get_access_token();
|
|
4473
4517
|
return addHeapObject(ret);
|
|
4474
4518
|
}
|
|
@@ -4653,14 +4697,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
|
4653
4697
|
return ret;
|
|
4654
4698
|
}
|
|
4655
4699
|
|
|
4656
|
-
export function
|
|
4700
|
+
export function __wbg_list_005a77213c99fcd3() {
|
|
4657
4701
|
return handleError(function (arg0) {
|
|
4658
4702
|
const ret = getObject(arg0).list();
|
|
4659
4703
|
return addHeapObject(ret);
|
|
4660
4704
|
}, arguments);
|
|
4661
4705
|
}
|
|
4662
4706
|
|
|
4663
|
-
export function
|
|
4707
|
+
export function __wbg_list_b0cae842e3a13e2c() {
|
|
4664
4708
|
return handleError(function (arg0) {
|
|
4665
4709
|
const ret = getObject(arg0).list();
|
|
4666
4710
|
return addHeapObject(ret);
|
|
@@ -4703,7 +4747,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
|
4703
4747
|
const a = state0.a;
|
|
4704
4748
|
state0.a = 0;
|
|
4705
4749
|
try {
|
|
4706
|
-
return
|
|
4750
|
+
return __wbg_adapter_357(a, state0.b, arg0, arg1);
|
|
4707
4751
|
} finally {
|
|
4708
4752
|
state0.a = a;
|
|
4709
4753
|
}
|
|
@@ -4866,7 +4910,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
|
4866
4910
|
}, arguments);
|
|
4867
4911
|
}
|
|
4868
4912
|
|
|
4869
|
-
export function
|
|
4913
|
+
export function __wbg_remove_4817686ccc51caea() {
|
|
4870
4914
|
return handleError(function (arg0, arg1, arg2) {
|
|
4871
4915
|
let deferred0_0;
|
|
4872
4916
|
let deferred0_1;
|
|
@@ -4881,7 +4925,7 @@ export function __wbg_remove_b7ea90f3b7133fcb() {
|
|
|
4881
4925
|
}, arguments);
|
|
4882
4926
|
}
|
|
4883
4927
|
|
|
4884
|
-
export function
|
|
4928
|
+
export function __wbg_remove_d197cb44124071d6() {
|
|
4885
4929
|
return handleError(function (arg0, arg1, arg2) {
|
|
4886
4930
|
let deferred0_0;
|
|
4887
4931
|
let deferred0_1;
|
|
@@ -4935,11 +4979,7 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
|
4935
4979
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4936
4980
|
}
|
|
4937
4981
|
|
|
4938
|
-
export function
|
|
4939
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4940
|
-
}
|
|
4941
|
-
|
|
4942
|
-
export function __wbg_set_7f067b933dc18d3c() {
|
|
4982
|
+
export function __wbg_set_595fa1ff8502ba96() {
|
|
4943
4983
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4944
4984
|
let deferred0_0;
|
|
4945
4985
|
let deferred0_1;
|
|
@@ -4954,12 +4994,11 @@ export function __wbg_set_7f067b933dc18d3c() {
|
|
|
4954
4994
|
}, arguments);
|
|
4955
4995
|
}
|
|
4956
4996
|
|
|
4957
|
-
export function
|
|
4958
|
-
|
|
4959
|
-
return addHeapObject(ret);
|
|
4997
|
+
export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
|
4998
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4960
4999
|
}
|
|
4961
5000
|
|
|
4962
|
-
export function
|
|
5001
|
+
export function __wbg_set_66f7f1ab8b1b0899() {
|
|
4963
5002
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4964
5003
|
let deferred0_0;
|
|
4965
5004
|
let deferred0_1;
|
|
@@ -4974,6 +5013,11 @@ export function __wbg_set_99d30132201b391d() {
|
|
|
4974
5013
|
}, arguments);
|
|
4975
5014
|
}
|
|
4976
5015
|
|
|
5016
|
+
export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
|
|
5017
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5018
|
+
return addHeapObject(ret);
|
|
5019
|
+
}
|
|
5020
|
+
|
|
4977
5021
|
export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
|
|
4978
5022
|
getObject(arg0).body = getObject(arg1);
|
|
4979
5023
|
}
|
|
@@ -5199,17 +5243,17 @@ export function __wbindgen_closure_wrapper198(arg0, arg1, arg2) {
|
|
|
5199
5243
|
return addHeapObject(ret);
|
|
5200
5244
|
}
|
|
5201
5245
|
|
|
5202
|
-
export function
|
|
5246
|
+
export function __wbindgen_closure_wrapper4523(arg0, arg1, arg2) {
|
|
5203
5247
|
const ret = makeMutClosure(arg0, arg1, 349, __wbg_adapter_60);
|
|
5204
5248
|
return addHeapObject(ret);
|
|
5205
5249
|
}
|
|
5206
5250
|
|
|
5207
|
-
export function
|
|
5251
|
+
export function __wbindgen_closure_wrapper8581(arg0, arg1, arg2) {
|
|
5208
5252
|
const ret = makeMutClosure(arg0, arg1, 516, __wbg_adapter_60);
|
|
5209
5253
|
return addHeapObject(ret);
|
|
5210
5254
|
}
|
|
5211
5255
|
|
|
5212
|
-
export function
|
|
5256
|
+
export function __wbindgen_closure_wrapper8967(arg0, arg1, arg2) {
|
|
5213
5257
|
const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_57);
|
|
5214
5258
|
return addHeapObject(ret);
|
|
5215
5259
|
}
|
|
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,
|