@bitwarden/sdk-internal 0.2.0-main.265 → 0.2.0-main.266

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 CHANGED
@@ -1 +1 @@
1
- a3d1c118ae47a053225fa57e33555baa40ff7b26
1
+ ab3c7dbd0699a57f626acf430d1bcf3120d2cc07
@@ -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
- // TODO: Uncomment this when the `uuid` crate is used.
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: Uuid | undefined;
183
- organizationId: Uuid;
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: Uuid | undefined;
195
- organizationId: Uuid;
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: Uuid | undefined;
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<Uuid, UnsignedSharedKey>;
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: Uuid;
836
+ encryptedFor: UserId;
825
837
  cipher: Cipher;
826
838
  }
827
839
 
828
840
  export interface Cipher {
829
- id: Uuid | undefined;
830
- organizationId: Uuid | undefined;
831
- folderId: Uuid | undefined;
832
- collectionIds: Uuid[];
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: Uuid | undefined;
863
- organizationId: Uuid | undefined;
864
- folderId: Uuid | undefined;
865
- collectionIds: Uuid[];
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: Uuid | undefined;
918
- organizationId: Uuid | undefined;
919
- folderId: Uuid | undefined;
920
- collectionIds: Uuid[];
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: Uuid | undefined;
1135
+ id: FolderId | undefined;
1119
1136
  name: EncString;
1120
1137
  revisionDate: DateTime<Utc>;
1121
1138
  }
1122
1139
 
1123
1140
  export interface FolderView {
1124
- id: Uuid | undefined;
1141
+ id: FolderId | undefined;
1125
1142
  name: string;
1126
1143
  revisionDate: DateTime<Utc>;
1127
1144
  }
@@ -3894,7 +3894,7 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
3894
3894
  return ret;
3895
3895
  }
3896
3896
 
3897
- export function __wbg_get_58d17ab6ca776ae1() {
3897
+ export function __wbg_get_5b8e3d66d3028864() {
3898
3898
  return handleError(function (arg0, arg1, arg2) {
3899
3899
  let deferred0_0;
3900
3900
  let deferred0_1;
@@ -3916,12 +3916,7 @@ export function __wbg_get_67b2ba62fc30de12() {
3916
3916
  }, arguments);
3917
3917
  }
3918
3918
 
3919
- export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
3920
- const ret = getObject(arg0)[arg1 >>> 0];
3921
- return addHeapObject(ret);
3922
- }
3923
-
3924
- export function __wbg_get_e46c583ca0983f5f() {
3919
+ export function __wbg_get_a216d449efda5b83() {
3925
3920
  return handleError(function (arg0, arg1, arg2) {
3926
3921
  let deferred0_0;
3927
3922
  let deferred0_1;
@@ -3936,7 +3931,12 @@ export function __wbg_get_e46c583ca0983f5f() {
3936
3931
  }, arguments);
3937
3932
  }
3938
3933
 
3939
- export function __wbg_getaccesstoken_e6c98a5d05573cab(arg0) {
3934
+ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
3935
+ const ret = getObject(arg0)[arg1 >>> 0];
3936
+ return addHeapObject(ret);
3937
+ }
3938
+
3939
+ export function __wbg_getaccesstoken_f04940224cf7da60(arg0) {
3940
3940
  const ret = getObject(arg0).get_access_token();
3941
3941
  return addHeapObject(ret);
3942
3942
  }
@@ -4041,14 +4041,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
4041
4041
  return ret;
4042
4042
  }
4043
4043
 
4044
- export function __wbg_list_60cef561c707b9da() {
4044
+ export function __wbg_list_249d074235c8a7bc() {
4045
4045
  return handleError(function (arg0) {
4046
4046
  const ret = getObject(arg0).list();
4047
4047
  return addHeapObject(ret);
4048
4048
  }, arguments);
4049
4049
  }
4050
4050
 
4051
- export function __wbg_list_9f30afad94f9c530() {
4051
+ export function __wbg_list_df32641beacaaebd() {
4052
4052
  return handleError(function (arg0) {
4053
4053
  const ret = getObject(arg0).list();
4054
4054
  return addHeapObject(ret);
@@ -4230,7 +4230,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
4230
4230
  }, arguments);
4231
4231
  }
4232
4232
 
4233
- export function __wbg_remove_43463ec33b170a2e() {
4233
+ export function __wbg_remove_79e92e6446a637d0() {
4234
4234
  return handleError(function (arg0, arg1, arg2) {
4235
4235
  let deferred0_0;
4236
4236
  let deferred0_1;
@@ -4245,7 +4245,7 @@ export function __wbg_remove_43463ec33b170a2e() {
4245
4245
  }, arguments);
4246
4246
  }
4247
4247
 
4248
- export function __wbg_remove_aca01354844c46e0() {
4248
+ export function __wbg_remove_e7bec9398552d33f() {
4249
4249
  return handleError(function (arg0, arg1, arg2) {
4250
4250
  let deferred0_0;
4251
4251
  let deferred0_1;
@@ -4292,16 +4292,7 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
4292
4292
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
4293
4293
  }
4294
4294
 
4295
- export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
4296
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
4297
- }
4298
-
4299
- export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
4300
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
4301
- return addHeapObject(ret);
4302
- }
4303
-
4304
- export function __wbg_set_9bbf6767d07e8651() {
4295
+ export function __wbg_set_47094df6bd728b0f() {
4305
4296
  return handleError(function (arg0, arg1, arg2, arg3) {
4306
4297
  let deferred0_0;
4307
4298
  let deferred0_1;
@@ -4316,7 +4307,16 @@ export function __wbg_set_9bbf6767d07e8651() {
4316
4307
  }, arguments);
4317
4308
  }
4318
4309
 
4319
- export function __wbg_set_c1f8132095b9b390() {
4310
+ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
4311
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
4312
+ }
4313
+
4314
+ export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
4315
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
4316
+ return addHeapObject(ret);
4317
+ }
4318
+
4319
+ export function __wbg_set_cbe909a733eef6b5() {
4320
4320
  return handleError(function (arg0, arg1, arg2, arg3) {
4321
4321
  let deferred0_0;
4322
4322
  let deferred0_1;
@@ -4519,18 +4519,18 @@ export function __wbindgen_cb_drop(arg0) {
4519
4519
  return ret;
4520
4520
  }
4521
4521
 
4522
- export function __wbindgen_closure_wrapper3339(arg0, arg1, arg2) {
4523
- const ret = makeMutClosure(arg0, arg1, 274, __wbg_adapter_54);
4522
+ export function __wbindgen_closure_wrapper3340(arg0, arg1, arg2) {
4523
+ const ret = makeMutClosure(arg0, arg1, 275, __wbg_adapter_54);
4524
4524
  return addHeapObject(ret);
4525
4525
  }
4526
4526
 
4527
- export function __wbindgen_closure_wrapper5700(arg0, arg1, arg2) {
4528
- const ret = makeMutClosure(arg0, arg1, 299, __wbg_adapter_54);
4527
+ export function __wbindgen_closure_wrapper5705(arg0, arg1, arg2) {
4528
+ const ret = makeMutClosure(arg0, arg1, 300, __wbg_adapter_54);
4529
4529
  return addHeapObject(ret);
4530
4530
  }
4531
4531
 
4532
- export function __wbindgen_closure_wrapper6054(arg0, arg1, arg2) {
4533
- const ret = makeMutClosure(arg0, arg1, 324, __wbg_adapter_59);
4532
+ export function __wbindgen_closure_wrapper6060(arg0, arg1, arg2) {
4533
+ const ret = makeMutClosure(arg0, arg1, 325, __wbg_adapter_59);
4534
4534
  return addHeapObject(ret);
4535
4535
  }
4536
4536
 
Binary file