@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
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a3665fd60b34fa25255b2d05144e414c4f74587d
|
|
@@ -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
|
|
@@ -906,7 +906,7 @@ function __wbg_adapter_60(arg0, arg1) {
|
|
|
906
906
|
);
|
|
907
907
|
}
|
|
908
908
|
|
|
909
|
-
function
|
|
909
|
+
function __wbg_adapter_355(arg0, arg1, arg2, arg3) {
|
|
910
910
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h849ee2a9e4ae2f91(
|
|
911
911
|
arg0,
|
|
912
912
|
arg1,
|
|
@@ -1464,6 +1464,50 @@ export class CiphersClient {
|
|
|
1464
1464
|
const ret = wasm.ciphersclient_edit(this.__wbg_ptr, addHeapObject(request));
|
|
1465
1465
|
return takeObject(ret);
|
|
1466
1466
|
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Moves a cipher into an organization, adds it to collections, and calls the share_cipher API.
|
|
1469
|
+
* @param {CipherView} cipher_view
|
|
1470
|
+
* @param {OrganizationId} organization_id
|
|
1471
|
+
* @param {CollectionId[]} collection_ids
|
|
1472
|
+
* @param {Cipher | null} [original_cipher]
|
|
1473
|
+
* @returns {Promise<Cipher>}
|
|
1474
|
+
*/
|
|
1475
|
+
share_cipher(cipher_view, organization_id, collection_ids, original_cipher) {
|
|
1476
|
+
const ptr0 = passArrayJsValueToWasm0(collection_ids, wasm.__wbindgen_malloc);
|
|
1477
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1478
|
+
const ret = wasm.ciphersclient_share_cipher(
|
|
1479
|
+
this.__wbg_ptr,
|
|
1480
|
+
addHeapObject(cipher_view),
|
|
1481
|
+
addHeapObject(organization_id),
|
|
1482
|
+
ptr0,
|
|
1483
|
+
len0,
|
|
1484
|
+
isLikeNone(original_cipher) ? 0 : addHeapObject(original_cipher),
|
|
1485
|
+
);
|
|
1486
|
+
return takeObject(ret);
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* Moves a group of ciphers into an organization, adds them to collections, and calls the
|
|
1490
|
+
* share_ciphers API.
|
|
1491
|
+
* @param {CipherView[]} cipher_views
|
|
1492
|
+
* @param {OrganizationId} organization_id
|
|
1493
|
+
* @param {CollectionId[]} collection_ids
|
|
1494
|
+
* @returns {Promise<Cipher[]>}
|
|
1495
|
+
*/
|
|
1496
|
+
share_ciphers_bulk(cipher_views, organization_id, collection_ids) {
|
|
1497
|
+
const ptr0 = passArrayJsValueToWasm0(cipher_views, wasm.__wbindgen_malloc);
|
|
1498
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1499
|
+
const ptr1 = passArrayJsValueToWasm0(collection_ids, wasm.__wbindgen_malloc);
|
|
1500
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1501
|
+
const ret = wasm.ciphersclient_share_ciphers_bulk(
|
|
1502
|
+
this.__wbg_ptr,
|
|
1503
|
+
ptr0,
|
|
1504
|
+
len0,
|
|
1505
|
+
addHeapObject(organization_id),
|
|
1506
|
+
ptr1,
|
|
1507
|
+
len1,
|
|
1508
|
+
);
|
|
1509
|
+
return takeObject(ret);
|
|
1510
|
+
}
|
|
1467
1511
|
/**
|
|
1468
1512
|
* @param {CipherView} cipher_view
|
|
1469
1513
|
* @returns {EncryptionContext}
|
|
@@ -4245,7 +4289,7 @@ export function __wbg_call_7cccdd69e0791ae2() {
|
|
|
4245
4289
|
}, arguments);
|
|
4246
4290
|
}
|
|
4247
4291
|
|
|
4248
|
-
export function
|
|
4292
|
+
export function __wbg_cipher_8a6269e122b390ae(arg0) {
|
|
4249
4293
|
const ret = getObject(arg0).cipher;
|
|
4250
4294
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4251
4295
|
}
|
|
@@ -4325,7 +4369,7 @@ export function __wbg_fetch_509096533071c657(arg0, arg1) {
|
|
|
4325
4369
|
return addHeapObject(ret);
|
|
4326
4370
|
}
|
|
4327
4371
|
|
|
4328
|
-
export function
|
|
4372
|
+
export function __wbg_folder_6dfae1b1134b74f8(arg0) {
|
|
4329
4373
|
const ret = getObject(arg0).folder;
|
|
4330
4374
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4331
4375
|
}
|
|
@@ -4352,7 +4396,14 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
|
|
|
4352
4396
|
return ret;
|
|
4353
4397
|
}
|
|
4354
4398
|
|
|
4355
|
-
export function
|
|
4399
|
+
export function __wbg_get_67b2ba62fc30de12() {
|
|
4400
|
+
return handleError(function (arg0, arg1) {
|
|
4401
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4402
|
+
return addHeapObject(ret);
|
|
4403
|
+
}, arguments);
|
|
4404
|
+
}
|
|
4405
|
+
|
|
4406
|
+
export function __wbg_get_77a3546428c7fc7d() {
|
|
4356
4407
|
return handleError(function (arg0, arg1, arg2) {
|
|
4357
4408
|
let deferred0_0;
|
|
4358
4409
|
let deferred0_1;
|
|
@@ -4367,19 +4418,7 @@ export function __wbg_get_61df30619186fd87() {
|
|
|
4367
4418
|
}, arguments);
|
|
4368
4419
|
}
|
|
4369
4420
|
|
|
4370
|
-
export function
|
|
4371
|
-
return handleError(function (arg0, arg1) {
|
|
4372
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4373
|
-
return addHeapObject(ret);
|
|
4374
|
-
}, arguments);
|
|
4375
|
-
}
|
|
4376
|
-
|
|
4377
|
-
export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
4378
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4379
|
-
return addHeapObject(ret);
|
|
4380
|
-
}
|
|
4381
|
-
|
|
4382
|
-
export function __wbg_get_e4ef7322d68ab383() {
|
|
4421
|
+
export function __wbg_get_94e67783f37c82cd() {
|
|
4383
4422
|
return handleError(function (arg0, arg1, arg2) {
|
|
4384
4423
|
let deferred0_0;
|
|
4385
4424
|
let deferred0_1;
|
|
@@ -4394,7 +4433,12 @@ export function __wbg_get_e4ef7322d68ab383() {
|
|
|
4394
4433
|
}, arguments);
|
|
4395
4434
|
}
|
|
4396
4435
|
|
|
4397
|
-
export function
|
|
4436
|
+
export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
4437
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4438
|
+
return addHeapObject(ret);
|
|
4439
|
+
}
|
|
4440
|
+
|
|
4441
|
+
export function __wbg_getaccesstoken_9240256d891025b6(arg0) {
|
|
4398
4442
|
const ret = getObject(arg0).get_access_token();
|
|
4399
4443
|
return addHeapObject(ret);
|
|
4400
4444
|
}
|
|
@@ -4579,14 +4623,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
|
4579
4623
|
return ret;
|
|
4580
4624
|
}
|
|
4581
4625
|
|
|
4582
|
-
export function
|
|
4626
|
+
export function __wbg_list_005a77213c99fcd3() {
|
|
4583
4627
|
return handleError(function (arg0) {
|
|
4584
4628
|
const ret = getObject(arg0).list();
|
|
4585
4629
|
return addHeapObject(ret);
|
|
4586
4630
|
}, arguments);
|
|
4587
4631
|
}
|
|
4588
4632
|
|
|
4589
|
-
export function
|
|
4633
|
+
export function __wbg_list_b0cae842e3a13e2c() {
|
|
4590
4634
|
return handleError(function (arg0) {
|
|
4591
4635
|
const ret = getObject(arg0).list();
|
|
4592
4636
|
return addHeapObject(ret);
|
|
@@ -4629,7 +4673,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
|
4629
4673
|
const a = state0.a;
|
|
4630
4674
|
state0.a = 0;
|
|
4631
4675
|
try {
|
|
4632
|
-
return
|
|
4676
|
+
return __wbg_adapter_355(a, state0.b, arg0, arg1);
|
|
4633
4677
|
} finally {
|
|
4634
4678
|
state0.a = a;
|
|
4635
4679
|
}
|
|
@@ -4792,7 +4836,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
|
4792
4836
|
}, arguments);
|
|
4793
4837
|
}
|
|
4794
4838
|
|
|
4795
|
-
export function
|
|
4839
|
+
export function __wbg_remove_4817686ccc51caea() {
|
|
4796
4840
|
return handleError(function (arg0, arg1, arg2) {
|
|
4797
4841
|
let deferred0_0;
|
|
4798
4842
|
let deferred0_1;
|
|
@@ -4807,7 +4851,7 @@ export function __wbg_remove_b7ea90f3b7133fcb() {
|
|
|
4807
4851
|
}, arguments);
|
|
4808
4852
|
}
|
|
4809
4853
|
|
|
4810
|
-
export function
|
|
4854
|
+
export function __wbg_remove_d197cb44124071d6() {
|
|
4811
4855
|
return handleError(function (arg0, arg1, arg2) {
|
|
4812
4856
|
let deferred0_0;
|
|
4813
4857
|
let deferred0_1;
|
|
@@ -4861,11 +4905,7 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
|
4861
4905
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4862
4906
|
}
|
|
4863
4907
|
|
|
4864
|
-
export function
|
|
4865
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4866
|
-
}
|
|
4867
|
-
|
|
4868
|
-
export function __wbg_set_7f067b933dc18d3c() {
|
|
4908
|
+
export function __wbg_set_595fa1ff8502ba96() {
|
|
4869
4909
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4870
4910
|
let deferred0_0;
|
|
4871
4911
|
let deferred0_1;
|
|
@@ -4880,12 +4920,11 @@ export function __wbg_set_7f067b933dc18d3c() {
|
|
|
4880
4920
|
}, arguments);
|
|
4881
4921
|
}
|
|
4882
4922
|
|
|
4883
|
-
export function
|
|
4884
|
-
|
|
4885
|
-
return addHeapObject(ret);
|
|
4923
|
+
export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
|
4924
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4886
4925
|
}
|
|
4887
4926
|
|
|
4888
|
-
export function
|
|
4927
|
+
export function __wbg_set_66f7f1ab8b1b0899() {
|
|
4889
4928
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4890
4929
|
let deferred0_0;
|
|
4891
4930
|
let deferred0_1;
|
|
@@ -4900,6 +4939,11 @@ export function __wbg_set_99d30132201b391d() {
|
|
|
4900
4939
|
}, arguments);
|
|
4901
4940
|
}
|
|
4902
4941
|
|
|
4942
|
+
export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
|
|
4943
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
4944
|
+
return addHeapObject(ret);
|
|
4945
|
+
}
|
|
4946
|
+
|
|
4903
4947
|
export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
|
|
4904
4948
|
getObject(arg0).body = getObject(arg1);
|
|
4905
4949
|
}
|
|
@@ -5125,17 +5169,17 @@ export function __wbindgen_closure_wrapper200(arg0, arg1, arg2) {
|
|
|
5125
5169
|
return addHeapObject(ret);
|
|
5126
5170
|
}
|
|
5127
5171
|
|
|
5128
|
-
export function
|
|
5172
|
+
export function __wbindgen_closure_wrapper4512(arg0, arg1, arg2) {
|
|
5129
5173
|
const ret = makeMutClosure(arg0, arg1, 349, __wbg_adapter_60);
|
|
5130
5174
|
return addHeapObject(ret);
|
|
5131
5175
|
}
|
|
5132
5176
|
|
|
5133
|
-
export function
|
|
5177
|
+
export function __wbindgen_closure_wrapper8569(arg0, arg1, arg2) {
|
|
5134
5178
|
const ret = makeMutClosure(arg0, arg1, 516, __wbg_adapter_60);
|
|
5135
5179
|
return addHeapObject(ret);
|
|
5136
5180
|
}
|
|
5137
5181
|
|
|
5138
|
-
export function
|
|
5182
|
+
export function __wbindgen_closure_wrapper8955(arg0, arg1, arg2) {
|
|
5139
5183
|
const ret = makeMutClosure(arg0, arg1, 538, __wbg_adapter_54);
|
|
5140
5184
|
return addHeapObject(ret);
|
|
5141
5185
|
}
|
|
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,
|