@bitwarden/sdk-internal 0.2.0-main.265 → 0.2.0-main.267
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 +42 -25
- package/bitwarden_wasm_internal_bg.js +44 -44
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +42 -25
- package/node/bitwarden_wasm_internal.js +44 -44
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/package.json +1 -1
@@ -135,10 +135,7 @@ import { Tagged } from "type-fest";
|
|
135
135
|
*
|
136
136
|
* Never create or cast to this type directly, use the `uuid<T>()` function instead.
|
137
137
|
*/
|
138
|
-
|
139
|
-
// export type Uuid = unknown;
|
140
|
-
|
141
|
-
export type Uuid = string;
|
138
|
+
export type Uuid = unknown;
|
142
139
|
|
143
140
|
/**
|
144
141
|
* RFC3339 compliant date-time string.
|
@@ -178,9 +175,14 @@ export interface TestError extends Error {
|
|
178
175
|
|
179
176
|
export function isTestError(error: any): error is TestError;
|
180
177
|
|
178
|
+
/**
|
179
|
+
* NewType wrapper for `CollectionId`
|
180
|
+
*/
|
181
|
+
export type CollectionId = Tagged<Uuid, "CollectionId">;
|
182
|
+
|
181
183
|
export interface Collection {
|
182
|
-
id:
|
183
|
-
organizationId:
|
184
|
+
id: CollectionId | undefined;
|
185
|
+
organizationId: OrganizationId;
|
184
186
|
name: EncString;
|
185
187
|
externalId: string | undefined;
|
186
188
|
hidePasswords: boolean;
|
@@ -191,8 +193,8 @@ export interface Collection {
|
|
191
193
|
}
|
192
194
|
|
193
195
|
export interface CollectionView {
|
194
|
-
id:
|
195
|
-
organizationId:
|
196
|
+
id: CollectionId | undefined;
|
197
|
+
organizationId: OrganizationId;
|
196
198
|
name: string;
|
197
199
|
externalId: string | undefined;
|
198
200
|
hidePasswords: boolean;
|
@@ -220,7 +222,7 @@ export interface InitUserCryptoRequest {
|
|
220
222
|
/**
|
221
223
|
* The user\'s ID.
|
222
224
|
*/
|
223
|
-
userId:
|
225
|
+
userId: UserId | undefined;
|
224
226
|
/**
|
225
227
|
* The user\'s KDF parameters, as received from the prelogin request
|
226
228
|
*/
|
@@ -278,7 +280,7 @@ export interface InitOrgCryptoRequest {
|
|
278
280
|
/**
|
279
281
|
* The encryption keys for all the organizations the user is a part of
|
280
282
|
*/
|
281
|
-
organizationKeys: Map<
|
283
|
+
organizationKeys: Map<OrganizationId, UnsignedSharedKey>;
|
282
284
|
}
|
283
285
|
|
284
286
|
/**
|
@@ -417,6 +419,11 @@ export interface UserCryptoV2KeysResponse {
|
|
417
419
|
|
418
420
|
export type SignedSecurityState = string;
|
419
421
|
|
422
|
+
/**
|
423
|
+
* NewType wrapper for `UserId`
|
424
|
+
*/
|
425
|
+
export type UserId = Tagged<Uuid, "UserId">;
|
426
|
+
|
420
427
|
/**
|
421
428
|
* NewType wrapper for `OrganizationId`
|
422
429
|
*/
|
@@ -816,20 +823,25 @@ export interface CallError extends Error {
|
|
816
823
|
|
817
824
|
export function isCallError(error: any): error is CallError;
|
818
825
|
|
826
|
+
/**
|
827
|
+
* NewType wrapper for `CipherId`
|
828
|
+
*/
|
829
|
+
export type CipherId = Tagged<Uuid, "CipherId">;
|
830
|
+
|
819
831
|
export interface EncryptionContext {
|
820
832
|
/**
|
821
833
|
* The Id of the user that encrypted the cipher. It should always represent a UserId, even for
|
822
834
|
* Organization-owned ciphers
|
823
835
|
*/
|
824
|
-
encryptedFor:
|
836
|
+
encryptedFor: UserId;
|
825
837
|
cipher: Cipher;
|
826
838
|
}
|
827
839
|
|
828
840
|
export interface Cipher {
|
829
|
-
id:
|
830
|
-
organizationId:
|
831
|
-
folderId:
|
832
|
-
collectionIds:
|
841
|
+
id: CipherId | undefined;
|
842
|
+
organizationId: OrganizationId | undefined;
|
843
|
+
folderId: FolderId | undefined;
|
844
|
+
collectionIds: CollectionId[];
|
833
845
|
/**
|
834
846
|
* More recent ciphers uses individual encryption keys to encrypt the other fields of the
|
835
847
|
* Cipher.
|
@@ -859,10 +871,10 @@ export interface Cipher {
|
|
859
871
|
}
|
860
872
|
|
861
873
|
export interface CipherView {
|
862
|
-
id:
|
863
|
-
organizationId:
|
864
|
-
folderId:
|
865
|
-
collectionIds:
|
874
|
+
id: CipherId | undefined;
|
875
|
+
organizationId: OrganizationId | undefined;
|
876
|
+
folderId: FolderId | undefined;
|
877
|
+
collectionIds: CollectionId[];
|
866
878
|
/**
|
867
879
|
* Temporary, required to support re-encrypting existing items.
|
868
880
|
*/
|
@@ -914,10 +926,10 @@ export type CopyableCipherFields =
|
|
914
926
|
| "SecureNotes";
|
915
927
|
|
916
928
|
export interface CipherListView {
|
917
|
-
id:
|
918
|
-
organizationId:
|
919
|
-
folderId:
|
920
|
-
collectionIds:
|
929
|
+
id: CipherId | undefined;
|
930
|
+
organizationId: OrganizationId | undefined;
|
931
|
+
folderId: FolderId | undefined;
|
932
|
+
collectionIds: CollectionId[];
|
921
933
|
/**
|
922
934
|
* Temporary, required to support calculating TOTP from CipherListView.
|
923
935
|
*/
|
@@ -1114,14 +1126,19 @@ export interface FolderAddEditRequest {
|
|
1114
1126
|
name: string;
|
1115
1127
|
}
|
1116
1128
|
|
1129
|
+
/**
|
1130
|
+
* NewType wrapper for `FolderId`
|
1131
|
+
*/
|
1132
|
+
export type FolderId = Tagged<Uuid, "FolderId">;
|
1133
|
+
|
1117
1134
|
export interface Folder {
|
1118
|
-
id:
|
1135
|
+
id: FolderId | undefined;
|
1119
1136
|
name: EncString;
|
1120
1137
|
revisionDate: DateTime<Utc>;
|
1121
1138
|
}
|
1122
1139
|
|
1123
1140
|
export interface FolderView {
|
1124
|
-
id:
|
1141
|
+
id: FolderId | undefined;
|
1125
1142
|
name: string;
|
1126
1143
|
revisionDate: DateTime<Utc>;
|
1127
1144
|
}
|
@@ -3910,7 +3910,14 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
3910
3910
|
return ret;
|
3911
3911
|
};
|
3912
3912
|
|
3913
|
-
module.exports.
|
3913
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
3914
|
+
return handleError(function (arg0, arg1) {
|
3915
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
3916
|
+
return addHeapObject(ret);
|
3917
|
+
}, arguments);
|
3918
|
+
};
|
3919
|
+
|
3920
|
+
module.exports.__wbg_get_716835f67e08995b = function () {
|
3914
3921
|
return handleError(function (arg0, arg1, arg2) {
|
3915
3922
|
let deferred0_0;
|
3916
3923
|
let deferred0_1;
|
@@ -3925,19 +3932,7 @@ module.exports.__wbg_get_58d17ab6ca776ae1 = function () {
|
|
3925
3932
|
}, arguments);
|
3926
3933
|
};
|
3927
3934
|
|
3928
|
-
module.exports.
|
3929
|
-
return handleError(function (arg0, arg1) {
|
3930
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
3931
|
-
return addHeapObject(ret);
|
3932
|
-
}, arguments);
|
3933
|
-
};
|
3934
|
-
|
3935
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
3936
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
3937
|
-
return addHeapObject(ret);
|
3938
|
-
};
|
3939
|
-
|
3940
|
-
module.exports.__wbg_get_e46c583ca0983f5f = function () {
|
3935
|
+
module.exports.__wbg_get_9b6b832abffc55ee = function () {
|
3941
3936
|
return handleError(function (arg0, arg1, arg2) {
|
3942
3937
|
let deferred0_0;
|
3943
3938
|
let deferred0_1;
|
@@ -3952,7 +3947,12 @@ module.exports.__wbg_get_e46c583ca0983f5f = function () {
|
|
3952
3947
|
}, arguments);
|
3953
3948
|
};
|
3954
3949
|
|
3955
|
-
module.exports.
|
3950
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
3951
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
3952
|
+
return addHeapObject(ret);
|
3953
|
+
};
|
3954
|
+
|
3955
|
+
module.exports.__wbg_getaccesstoken_b48274ce74f2b1b3 = function (arg0) {
|
3956
3956
|
const ret = getObject(arg0).get_access_token();
|
3957
3957
|
return addHeapObject(ret);
|
3958
3958
|
};
|
@@ -4057,14 +4057,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
4057
4057
|
return ret;
|
4058
4058
|
};
|
4059
4059
|
|
4060
|
-
module.exports.
|
4060
|
+
module.exports.__wbg_list_1dff04ad2e54740d = function () {
|
4061
4061
|
return handleError(function (arg0) {
|
4062
4062
|
const ret = getObject(arg0).list();
|
4063
4063
|
return addHeapObject(ret);
|
4064
4064
|
}, arguments);
|
4065
4065
|
};
|
4066
4066
|
|
4067
|
-
module.exports.
|
4067
|
+
module.exports.__wbg_list_d90764f579e59d07 = function () {
|
4068
4068
|
return handleError(function (arg0) {
|
4069
4069
|
const ret = getObject(arg0).list();
|
4070
4070
|
return addHeapObject(ret);
|
@@ -4246,7 +4246,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
4246
4246
|
}, arguments);
|
4247
4247
|
};
|
4248
4248
|
|
4249
|
-
module.exports.
|
4249
|
+
module.exports.__wbg_remove_7ca6fad44c0d6ac7 = function () {
|
4250
4250
|
return handleError(function (arg0, arg1, arg2) {
|
4251
4251
|
let deferred0_0;
|
4252
4252
|
let deferred0_1;
|
@@ -4261,7 +4261,7 @@ module.exports.__wbg_remove_43463ec33b170a2e = function () {
|
|
4261
4261
|
}, arguments);
|
4262
4262
|
};
|
4263
4263
|
|
4264
|
-
module.exports.
|
4264
|
+
module.exports.__wbg_remove_abb5de0578dfedc0 = function () {
|
4265
4265
|
return handleError(function (arg0, arg1, arg2) {
|
4266
4266
|
let deferred0_0;
|
4267
4267
|
let deferred0_1;
|
@@ -4300,24 +4300,7 @@ module.exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
4300
4300
|
return addHeapObject(ret);
|
4301
4301
|
};
|
4302
4302
|
|
4303
|
-
module.exports.
|
4304
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
4305
|
-
};
|
4306
|
-
|
4307
|
-
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
4308
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
4309
|
-
};
|
4310
|
-
|
4311
|
-
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
4312
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
4313
|
-
};
|
4314
|
-
|
4315
|
-
module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
|
4316
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
4317
|
-
return addHeapObject(ret);
|
4318
|
-
};
|
4319
|
-
|
4320
|
-
module.exports.__wbg_set_9bbf6767d07e8651 = function () {
|
4303
|
+
module.exports.__wbg_set_0d31c656c2e3f24c = function () {
|
4321
4304
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
4322
4305
|
let deferred0_0;
|
4323
4306
|
let deferred0_1;
|
@@ -4332,7 +4315,7 @@ module.exports.__wbg_set_9bbf6767d07e8651 = function () {
|
|
4332
4315
|
}, arguments);
|
4333
4316
|
};
|
4334
4317
|
|
4335
|
-
module.exports.
|
4318
|
+
module.exports.__wbg_set_1c069c9cfdb8d2bb = function () {
|
4336
4319
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
4337
4320
|
let deferred0_0;
|
4338
4321
|
let deferred0_1;
|
@@ -4347,6 +4330,23 @@ module.exports.__wbg_set_c1f8132095b9b390 = function () {
|
|
4347
4330
|
}, arguments);
|
4348
4331
|
};
|
4349
4332
|
|
4333
|
+
module.exports.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
|
4334
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
4335
|
+
};
|
4336
|
+
|
4337
|
+
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
4338
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
4339
|
+
};
|
4340
|
+
|
4341
|
+
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
4342
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
4343
|
+
};
|
4344
|
+
|
4345
|
+
module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
|
4346
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
4347
|
+
return addHeapObject(ret);
|
4348
|
+
};
|
4349
|
+
|
4350
4350
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
4351
4351
|
getObject(arg0).body = getObject(arg1);
|
4352
4352
|
};
|
@@ -4535,18 +4535,18 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
4535
4535
|
return ret;
|
4536
4536
|
};
|
4537
4537
|
|
4538
|
-
module.exports.
|
4539
|
-
const ret = makeMutClosure(arg0, arg1,
|
4538
|
+
module.exports.__wbindgen_closure_wrapper3344 = function (arg0, arg1, arg2) {
|
4539
|
+
const ret = makeMutClosure(arg0, arg1, 275, __wbg_adapter_54);
|
4540
4540
|
return addHeapObject(ret);
|
4541
4541
|
};
|
4542
4542
|
|
4543
|
-
module.exports.
|
4544
|
-
const ret = makeMutClosure(arg0, arg1,
|
4543
|
+
module.exports.__wbindgen_closure_wrapper5707 = function (arg0, arg1, arg2) {
|
4544
|
+
const ret = makeMutClosure(arg0, arg1, 300, __wbg_adapter_54);
|
4545
4545
|
return addHeapObject(ret);
|
4546
4546
|
};
|
4547
4547
|
|
4548
|
-
module.exports.
|
4549
|
-
const ret = makeMutClosure(arg0, arg1,
|
4548
|
+
module.exports.__wbindgen_closure_wrapper6061 = function (arg0, arg1, arg2) {
|
4549
|
+
const ret = makeMutClosure(arg0, arg1, 325, __wbg_adapter_59);
|
4550
4550
|
return addHeapObject(ret);
|
4551
4551
|
};
|
4552
4552
|
|
Binary file
|