@metamask-previews/profile-sync-controller 27.1.0-preview-3d4d0d0ef → 27.1.0-preview-0866a6f

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs +7 -0
  3. package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs.map +1 -0
  4. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts +48 -0
  5. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts.map +1 -0
  6. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts +48 -0
  7. package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts.map +1 -0
  8. package/dist/controllers/authentication/AuthenticationController-method-action-types.mjs +6 -0
  9. package/dist/controllers/authentication/AuthenticationController-method-action-types.mjs.map +1 -0
  10. package/dist/controllers/authentication/AuthenticationController.cjs +13 -12
  11. package/dist/controllers/authentication/AuthenticationController.cjs.map +1 -1
  12. package/dist/controllers/authentication/AuthenticationController.d.cts +3 -15
  13. package/dist/controllers/authentication/AuthenticationController.d.cts.map +1 -1
  14. package/dist/controllers/authentication/AuthenticationController.d.mts +3 -15
  15. package/dist/controllers/authentication/AuthenticationController.d.mts.map +1 -1
  16. package/dist/controllers/authentication/AuthenticationController.mjs +12 -12
  17. package/dist/controllers/authentication/AuthenticationController.mjs.map +1 -1
  18. package/dist/controllers/authentication/index.cjs +3 -7
  19. package/dist/controllers/authentication/index.cjs.map +1 -1
  20. package/dist/controllers/authentication/index.d.cts +3 -3
  21. package/dist/controllers/authentication/index.d.cts.map +1 -1
  22. package/dist/controllers/authentication/index.d.mts +3 -3
  23. package/dist/controllers/authentication/index.d.mts.map +1 -1
  24. package/dist/controllers/authentication/index.mjs +2 -3
  25. package/dist/controllers/authentication/index.mjs.map +1 -1
  26. package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs +7 -0
  27. package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs.map +1 -0
  28. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts +137 -0
  29. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts.map +1 -0
  30. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.mts +137 -0
  31. package/dist/controllers/user-storage/UserStorageController-method-action-types.d.mts.map +1 -0
  32. package/dist/controllers/user-storage/UserStorageController-method-action-types.mjs +6 -0
  33. package/dist/controllers/user-storage/UserStorageController-method-action-types.mjs.map +1 -0
  34. package/dist/controllers/user-storage/UserStorageController.cjs +19 -13
  35. package/dist/controllers/user-storage/UserStorageController.cjs.map +1 -1
  36. package/dist/controllers/user-storage/UserStorageController.d.cts +6 -19
  37. package/dist/controllers/user-storage/UserStorageController.d.cts.map +1 -1
  38. package/dist/controllers/user-storage/UserStorageController.d.mts +6 -19
  39. package/dist/controllers/user-storage/UserStorageController.d.mts.map +1 -1
  40. package/dist/controllers/user-storage/UserStorageController.mjs +18 -13
  41. package/dist/controllers/user-storage/UserStorageController.mjs.map +1 -1
  42. package/dist/controllers/user-storage/contact-syncing/types.cjs.map +1 -1
  43. package/dist/controllers/user-storage/contact-syncing/types.d.cts +1 -1
  44. package/dist/controllers/user-storage/contact-syncing/types.d.cts.map +1 -1
  45. package/dist/controllers/user-storage/contact-syncing/types.d.mts +1 -1
  46. package/dist/controllers/user-storage/contact-syncing/types.d.mts.map +1 -1
  47. package/dist/controllers/user-storage/contact-syncing/types.mjs.map +1 -1
  48. package/dist/controllers/user-storage/index.cjs +3 -7
  49. package/dist/controllers/user-storage/index.cjs.map +1 -1
  50. package/dist/controllers/user-storage/index.d.cts +3 -3
  51. package/dist/controllers/user-storage/index.d.cts.map +1 -1
  52. package/dist/controllers/user-storage/index.d.mts +3 -3
  53. package/dist/controllers/user-storage/index.d.mts.map +1 -1
  54. package/dist/controllers/user-storage/index.mjs +2 -3
  55. package/dist/controllers/user-storage/index.mjs.map +1 -1
  56. package/package.json +5 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/controllers/authentication/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAAoD;AAG3C,qBAHF,kCAAU,CAGE;AADnB,MAAM,wBAAwB,GAAG,kCAAU,CAAC;AAE5C,kBAAe,wBAAwB,CAAC;AACxC,iEAA2C;AAC3C,2DAAiC","sourcesContent":["import Controller from './AuthenticationController';\n\nconst AuthenticationController = Controller;\nexport { Controller };\nexport default AuthenticationController;\nexport * from './AuthenticationController';\nexport * as Mocks from './mocks';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/controllers/authentication/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAsE;AAEjC,2FAF5B,mDAAwB,OAEc;AAC/C,kBAAe,mDAAwB,CAAC;AACxC,iEAA2C;AAC3C,2DAAiC","sourcesContent":["import { AuthenticationController } from './AuthenticationController';\n\nexport { AuthenticationController as Controller };\nexport default AuthenticationController;\nexport * from './AuthenticationController';\nexport * as Mocks from './mocks';\n\nexport type {\n AuthenticationControllerPerformSignInAction,\n AuthenticationControllerPerformSignOutAction,\n AuthenticationControllerGetBearerTokenAction,\n AuthenticationControllerGetSessionProfileAction,\n AuthenticationControllerGetUserProfileLineageAction,\n AuthenticationControllerIsSignedInAction,\n} from './AuthenticationController-method-action-types';\n"]}
@@ -1,7 +1,7 @@
1
- import Controller from "./AuthenticationController.cjs";
2
- declare const AuthenticationController: typeof Controller;
3
- export { Controller };
1
+ import { AuthenticationController } from "./AuthenticationController.cjs";
2
+ export { AuthenticationController as Controller };
4
3
  export default AuthenticationController;
5
4
  export * from "./AuthenticationController.cjs";
6
5
  export * as Mocks from "./mocks/index.cjs";
6
+ export type { AuthenticationControllerPerformSignInAction, AuthenticationControllerPerformSignOutAction, AuthenticationControllerGetBearerTokenAction, AuthenticationControllerGetSessionProfileAction, AuthenticationControllerGetUserProfileLineageAction, AuthenticationControllerIsSignedInAction, } from "./AuthenticationController-method-action-types.cjs";
7
7
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/controllers/authentication/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,uCAAmC;AAEpD,QAAA,MAAM,wBAAwB,mBAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,wBAAwB,CAAC;AACxC,+CAA2C;AAC3C,OAAO,KAAK,KAAK,0BAAgB"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/controllers/authentication/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uCAAmC;AAEtE,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,CAAC;AAClD,eAAe,wBAAwB,CAAC;AACxC,+CAA2C;AAC3C,OAAO,KAAK,KAAK,0BAAgB;AAEjC,YAAY,EACV,2CAA2C,EAC3C,4CAA4C,EAC5C,4CAA4C,EAC5C,+CAA+C,EAC/C,mDAAmD,EACnD,wCAAwC,GACzC,2DAAuD"}
@@ -1,7 +1,7 @@
1
- import Controller from "./AuthenticationController.mjs";
2
- declare const AuthenticationController: typeof Controller;
3
- export { Controller };
1
+ import { AuthenticationController } from "./AuthenticationController.mjs";
2
+ export { AuthenticationController as Controller };
4
3
  export default AuthenticationController;
5
4
  export * from "./AuthenticationController.mjs";
6
5
  export * as Mocks from "./mocks/index.mjs";
6
+ export type { AuthenticationControllerPerformSignInAction, AuthenticationControllerPerformSignOutAction, AuthenticationControllerGetBearerTokenAction, AuthenticationControllerGetSessionProfileAction, AuthenticationControllerGetUserProfileLineageAction, AuthenticationControllerIsSignedInAction, } from "./AuthenticationController-method-action-types.mjs";
7
7
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/controllers/authentication/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,uCAAmC;AAEpD,QAAA,MAAM,wBAAwB,mBAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,wBAAwB,CAAC;AACxC,+CAA2C;AAC3C,OAAO,KAAK,KAAK,0BAAgB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/controllers/authentication/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uCAAmC;AAEtE,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,CAAC;AAClD,eAAe,wBAAwB,CAAC;AACxC,+CAA2C;AAC3C,OAAO,KAAK,KAAK,0BAAgB;AAEjC,YAAY,EACV,2CAA2C,EAC3C,4CAA4C,EAC5C,4CAA4C,EAC5C,+CAA+C,EAC/C,mDAAmD,EACnD,wCAAwC,GACzC,2DAAuD"}
@@ -1,6 +1,5 @@
1
- import Controller from "./AuthenticationController.mjs";
2
- const AuthenticationController = Controller;
3
- export { Controller };
1
+ import { AuthenticationController } from "./AuthenticationController.mjs";
2
+ export { AuthenticationController as Controller };
4
3
  export default AuthenticationController;
5
4
  export * from "./AuthenticationController.mjs";
6
5
  export * as Mocks from "./mocks/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/controllers/authentication/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,uCAAmC;AAEpD,MAAM,wBAAwB,GAAG,UAAU,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,wBAAwB,CAAC;AACxC,+CAA2C;AAC3C,OAAO,KAAK,KAAK,0BAAgB","sourcesContent":["import Controller from './AuthenticationController';\n\nconst AuthenticationController = Controller;\nexport { Controller };\nexport default AuthenticationController;\nexport * from './AuthenticationController';\nexport * as Mocks from './mocks';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/controllers/authentication/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,uCAAmC;AAEtE,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,CAAC;AAClD,eAAe,wBAAwB,CAAC;AACxC,+CAA2C;AAC3C,OAAO,KAAK,KAAK,0BAAgB","sourcesContent":["import { AuthenticationController } from './AuthenticationController';\n\nexport { AuthenticationController as Controller };\nexport default AuthenticationController;\nexport * from './AuthenticationController';\nexport * as Mocks from './mocks';\n\nexport type {\n AuthenticationControllerPerformSignInAction,\n AuthenticationControllerPerformSignOutAction,\n AuthenticationControllerGetBearerTokenAction,\n AuthenticationControllerGetSessionProfileAction,\n AuthenticationControllerGetUserProfileLineageAction,\n AuthenticationControllerIsSignedInAction,\n} from './AuthenticationController-method-action-types';\n"]}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * This file is auto generated by `scripts/generate-method-action-types.ts`.
4
+ * Do not edit manually.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=UserStorageController-method-action-types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserStorageController-method-action-types.cjs","sourceRoot":"","sources":["../../../src/controllers/user-storage/UserStorageController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated by `scripts/generate-method-action-types.ts`.\n * Do not edit manually.\n */\n\nimport type { UserStorageController } from './UserStorageController';\n\n/**\n * Allows retrieval of stored data. Data stored is string formatted.\n * Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns the decrypted string contents found from user storage (or null if not found)\n */\nexport type UserStorageControllerPerformGetStorageAction = {\n type: `UserStorageController:performGetStorage`;\n handler: UserStorageController['performGetStorage'];\n};\n\n/**\n * Allows retrieval of all stored data for a specific feature. Data stored is formatted as an array of strings.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns the array of decrypted string contents found from user storage (or null if not found)\n */\nexport type UserStorageControllerPerformGetStorageAllFeatureEntriesAction = {\n type: `UserStorageController:performGetStorageAllFeatureEntries`;\n handler: UserStorageController['performGetStorageAllFeatureEntries'];\n};\n\n/**\n * Allows storage of user data. Data stored must be string formatted.\n * Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param value - The string data you want to store.\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\nexport type UserStorageControllerPerformSetStorageAction = {\n type: `UserStorageController:performSetStorage`;\n handler: UserStorageController['performSetStorage'];\n};\n\n/**\n * Allows storage of multiple user data entries for one specific feature. Data stored must be string formatted.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param values - data to store, in the form of an array of `[entryKey, entryValue]` pairs\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\nexport type UserStorageControllerPerformBatchSetStorageAction = {\n type: `UserStorageController:performBatchSetStorage`;\n handler: UserStorageController['performBatchSetStorage'];\n};\n\n/**\n * Allows deletion of user data. Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to delete data.\n */\nexport type UserStorageControllerPerformDeleteStorageAction = {\n type: `UserStorageController:performDeleteStorage`;\n handler: UserStorageController['performDeleteStorage'];\n};\n\n/**\n * Allows deletion of all user data entries for a specific feature.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to delete data.\n */\nexport type UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction = {\n type: `UserStorageController:performDeleteStorageAllFeatureEntries`;\n handler: UserStorageController['performDeleteStorageAllFeatureEntries'];\n};\n\n/**\n * Allows delete of multiple user data entries for one specific feature. Data deleted must be string formatted.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param values - data to store, in the form of an array of entryKey[]\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\nexport type UserStorageControllerPerformBatchDeleteStorageAction = {\n type: `UserStorageController:performBatchDeleteStorage`;\n handler: UserStorageController['performBatchDeleteStorage'];\n};\n\n/**\n * Retrieves the storage key, for internal use only!\n *\n * @returns the storage key\n */\nexport type UserStorageControllerGetStorageKeyAction = {\n type: `UserStorageController:getStorageKey`;\n handler: UserStorageController['getStorageKey'];\n};\n\n/**\n * Lists all the available HD keyring metadata IDs.\n * These IDs can be used in a multi-SRP context to segregate data specific to different SRPs.\n *\n * @returns A promise that resolves to an array of HD keyring metadata IDs.\n */\nexport type UserStorageControllerListEntropySourcesAction = {\n type: `UserStorageController:listEntropySources`;\n handler: UserStorageController['listEntropySources'];\n};\n\nexport type UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction = {\n type: `UserStorageController:setIsBackupAndSyncFeatureEnabled`;\n handler: UserStorageController['setIsBackupAndSyncFeatureEnabled'];\n};\n\n/**\n * Sets the isContactSyncingInProgress flag to prevent infinite loops during contact synchronization\n *\n * @param isContactSyncingInProgress - Whether contact syncing is in progress\n */\nexport type UserStorageControllerSetIsContactSyncingInProgressAction = {\n type: `UserStorageController:setIsContactSyncingInProgress`;\n handler: UserStorageController['setIsContactSyncingInProgress'];\n};\n\n/**\n * Syncs the address book list with the user storage address book list.\n * This method is used to make sure that the address book list is up-to-date with the user storage address book list and vice-versa.\n * It will add new contacts to the address book list, update/merge conflicting contacts and re-upload the results in some cases to the user storage.\n */\nexport type UserStorageControllerSyncContactsWithUserStorageAction = {\n type: `UserStorageController:syncContactsWithUserStorage`;\n handler: UserStorageController['syncContactsWithUserStorage'];\n};\n\n/**\n * Union of all UserStorageController action types.\n */\nexport type UserStorageControllerMethodActions =\n | UserStorageControllerPerformGetStorageAction\n | UserStorageControllerPerformGetStorageAllFeatureEntriesAction\n | UserStorageControllerPerformSetStorageAction\n | UserStorageControllerPerformBatchSetStorageAction\n | UserStorageControllerPerformDeleteStorageAction\n | UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction\n | UserStorageControllerPerformBatchDeleteStorageAction\n | UserStorageControllerGetStorageKeyAction\n | UserStorageControllerListEntropySourcesAction\n | UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction\n | UserStorageControllerSetIsContactSyncingInProgressAction\n | UserStorageControllerSyncContactsWithUserStorageAction;\n"]}
@@ -0,0 +1,137 @@
1
+ /**
2
+ * This file is auto generated by `scripts/generate-method-action-types.ts`.
3
+ * Do not edit manually.
4
+ */
5
+ import type { UserStorageController } from "./UserStorageController.cjs";
6
+ /**
7
+ * Allows retrieval of stored data. Data stored is string formatted.
8
+ * Developers can extend the entry path and entry name through the `schema.ts` file.
9
+ *
10
+ * @param path - string in the form of `${feature}.${key}` that matches schema
11
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
12
+ * @returns the decrypted string contents found from user storage (or null if not found)
13
+ */
14
+ export type UserStorageControllerPerformGetStorageAction = {
15
+ type: `UserStorageController:performGetStorage`;
16
+ handler: UserStorageController['performGetStorage'];
17
+ };
18
+ /**
19
+ * Allows retrieval of all stored data for a specific feature. Data stored is formatted as an array of strings.
20
+ * Developers can extend the entry path through the `schema.ts` file.
21
+ *
22
+ * @param path - string in the form of `${feature}` that matches schema
23
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
24
+ * @returns the array of decrypted string contents found from user storage (or null if not found)
25
+ */
26
+ export type UserStorageControllerPerformGetStorageAllFeatureEntriesAction = {
27
+ type: `UserStorageController:performGetStorageAllFeatureEntries`;
28
+ handler: UserStorageController['performGetStorageAllFeatureEntries'];
29
+ };
30
+ /**
31
+ * Allows storage of user data. Data stored must be string formatted.
32
+ * Developers can extend the entry path and entry name through the `schema.ts` file.
33
+ *
34
+ * @param path - string in the form of `${feature}.${key}` that matches schema
35
+ * @param value - The string data you want to store.
36
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
37
+ * @returns nothing. NOTE that an error is thrown if fails to store data.
38
+ */
39
+ export type UserStorageControllerPerformSetStorageAction = {
40
+ type: `UserStorageController:performSetStorage`;
41
+ handler: UserStorageController['performSetStorage'];
42
+ };
43
+ /**
44
+ * Allows storage of multiple user data entries for one specific feature. Data stored must be string formatted.
45
+ * Developers can extend the entry path through the `schema.ts` file.
46
+ *
47
+ * @param path - string in the form of `${feature}` that matches schema
48
+ * @param values - data to store, in the form of an array of `[entryKey, entryValue]` pairs
49
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
50
+ * @returns nothing. NOTE that an error is thrown if fails to store data.
51
+ */
52
+ export type UserStorageControllerPerformBatchSetStorageAction = {
53
+ type: `UserStorageController:performBatchSetStorage`;
54
+ handler: UserStorageController['performBatchSetStorage'];
55
+ };
56
+ /**
57
+ * Allows deletion of user data. Developers can extend the entry path and entry name through the `schema.ts` file.
58
+ *
59
+ * @param path - string in the form of `${feature}.${key}` that matches schema
60
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
61
+ * @returns nothing. NOTE that an error is thrown if fails to delete data.
62
+ */
63
+ export type UserStorageControllerPerformDeleteStorageAction = {
64
+ type: `UserStorageController:performDeleteStorage`;
65
+ handler: UserStorageController['performDeleteStorage'];
66
+ };
67
+ /**
68
+ * Allows deletion of all user data entries for a specific feature.
69
+ * Developers can extend the entry path through the `schema.ts` file.
70
+ *
71
+ * @param path - string in the form of `${feature}` that matches schema
72
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
73
+ * @returns nothing. NOTE that an error is thrown if fails to delete data.
74
+ */
75
+ export type UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction = {
76
+ type: `UserStorageController:performDeleteStorageAllFeatureEntries`;
77
+ handler: UserStorageController['performDeleteStorageAllFeatureEntries'];
78
+ };
79
+ /**
80
+ * Allows delete of multiple user data entries for one specific feature. Data deleted must be string formatted.
81
+ * Developers can extend the entry path through the `schema.ts` file.
82
+ *
83
+ * @param path - string in the form of `${feature}` that matches schema
84
+ * @param values - data to store, in the form of an array of entryKey[]
85
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
86
+ * @returns nothing. NOTE that an error is thrown if fails to store data.
87
+ */
88
+ export type UserStorageControllerPerformBatchDeleteStorageAction = {
89
+ type: `UserStorageController:performBatchDeleteStorage`;
90
+ handler: UserStorageController['performBatchDeleteStorage'];
91
+ };
92
+ /**
93
+ * Retrieves the storage key, for internal use only!
94
+ *
95
+ * @returns the storage key
96
+ */
97
+ export type UserStorageControllerGetStorageKeyAction = {
98
+ type: `UserStorageController:getStorageKey`;
99
+ handler: UserStorageController['getStorageKey'];
100
+ };
101
+ /**
102
+ * Lists all the available HD keyring metadata IDs.
103
+ * These IDs can be used in a multi-SRP context to segregate data specific to different SRPs.
104
+ *
105
+ * @returns A promise that resolves to an array of HD keyring metadata IDs.
106
+ */
107
+ export type UserStorageControllerListEntropySourcesAction = {
108
+ type: `UserStorageController:listEntropySources`;
109
+ handler: UserStorageController['listEntropySources'];
110
+ };
111
+ export type UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction = {
112
+ type: `UserStorageController:setIsBackupAndSyncFeatureEnabled`;
113
+ handler: UserStorageController['setIsBackupAndSyncFeatureEnabled'];
114
+ };
115
+ /**
116
+ * Sets the isContactSyncingInProgress flag to prevent infinite loops during contact synchronization
117
+ *
118
+ * @param isContactSyncingInProgress - Whether contact syncing is in progress
119
+ */
120
+ export type UserStorageControllerSetIsContactSyncingInProgressAction = {
121
+ type: `UserStorageController:setIsContactSyncingInProgress`;
122
+ handler: UserStorageController['setIsContactSyncingInProgress'];
123
+ };
124
+ /**
125
+ * Syncs the address book list with the user storage address book list.
126
+ * This method is used to make sure that the address book list is up-to-date with the user storage address book list and vice-versa.
127
+ * It will add new contacts to the address book list, update/merge conflicting contacts and re-upload the results in some cases to the user storage.
128
+ */
129
+ export type UserStorageControllerSyncContactsWithUserStorageAction = {
130
+ type: `UserStorageController:syncContactsWithUserStorage`;
131
+ handler: UserStorageController['syncContactsWithUserStorage'];
132
+ };
133
+ /**
134
+ * Union of all UserStorageController action types.
135
+ */
136
+ export type UserStorageControllerMethodActions = UserStorageControllerPerformGetStorageAction | UserStorageControllerPerformGetStorageAllFeatureEntriesAction | UserStorageControllerPerformSetStorageAction | UserStorageControllerPerformBatchSetStorageAction | UserStorageControllerPerformDeleteStorageAction | UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction | UserStorageControllerPerformBatchDeleteStorageAction | UserStorageControllerGetStorageKeyAction | UserStorageControllerListEntropySourcesAction | UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction | UserStorageControllerSetIsContactSyncingInProgressAction | UserStorageControllerSyncContactsWithUserStorageAction;
137
+ //# sourceMappingURL=UserStorageController-method-action-types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserStorageController-method-action-types.d.cts","sourceRoot":"","sources":["../../../src/controllers/user-storage/UserStorageController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,oCAAgC;AAErE;;;;;;;GAOG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,6DAA6D,GAAG;IAC1E,IAAI,EAAE,0DAA0D,CAAC;IACjE,OAAO,EAAE,qBAAqB,CAAC,oCAAoC,CAAC,CAAC;CACtE,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,iDAAiD,GAAG;IAC9D,IAAI,EAAE,8CAA8C,CAAC;IACrD,OAAO,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,CAAC;CAC1D,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,gEAAgE,GAAG;IAC7E,IAAI,EAAE,6DAA6D,CAAC;IACpE,OAAO,EAAE,qBAAqB,CAAC,uCAAuC,CAAC,CAAC;CACzE,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,oDAAoD,GAAG;IACjE,IAAI,EAAE,iDAAiD,CAAC;IACxD,OAAO,EAAE,qBAAqB,CAAC,2BAA2B,CAAC,CAAC;CAC7D,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,6CAA6C,GAAG;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,2DAA2D,GAAG;IACxE,IAAI,EAAE,wDAAwD,CAAC;IAC/D,OAAO,EAAE,qBAAqB,CAAC,kCAAkC,CAAC,CAAC;CACpE,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wDAAwD,GAAG;IACrE,IAAI,EAAE,qDAAqD,CAAC;IAC5D,OAAO,EAAE,qBAAqB,CAAC,+BAA+B,CAAC,CAAC;CACjE,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sDAAsD,GAAG;IACnE,IAAI,EAAE,mDAAmD,CAAC;IAC1D,OAAO,EAAE,qBAAqB,CAAC,6BAA6B,CAAC,CAAC;CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC1C,4CAA4C,GAC5C,6DAA6D,GAC7D,4CAA4C,GAC5C,iDAAiD,GACjD,+CAA+C,GAC/C,gEAAgE,GAChE,oDAAoD,GACpD,wCAAwC,GACxC,6CAA6C,GAC7C,2DAA2D,GAC3D,wDAAwD,GACxD,sDAAsD,CAAC"}
@@ -0,0 +1,137 @@
1
+ /**
2
+ * This file is auto generated by `scripts/generate-method-action-types.ts`.
3
+ * Do not edit manually.
4
+ */
5
+ import type { UserStorageController } from "./UserStorageController.mjs";
6
+ /**
7
+ * Allows retrieval of stored data. Data stored is string formatted.
8
+ * Developers can extend the entry path and entry name through the `schema.ts` file.
9
+ *
10
+ * @param path - string in the form of `${feature}.${key}` that matches schema
11
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
12
+ * @returns the decrypted string contents found from user storage (or null if not found)
13
+ */
14
+ export type UserStorageControllerPerformGetStorageAction = {
15
+ type: `UserStorageController:performGetStorage`;
16
+ handler: UserStorageController['performGetStorage'];
17
+ };
18
+ /**
19
+ * Allows retrieval of all stored data for a specific feature. Data stored is formatted as an array of strings.
20
+ * Developers can extend the entry path through the `schema.ts` file.
21
+ *
22
+ * @param path - string in the form of `${feature}` that matches schema
23
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
24
+ * @returns the array of decrypted string contents found from user storage (or null if not found)
25
+ */
26
+ export type UserStorageControllerPerformGetStorageAllFeatureEntriesAction = {
27
+ type: `UserStorageController:performGetStorageAllFeatureEntries`;
28
+ handler: UserStorageController['performGetStorageAllFeatureEntries'];
29
+ };
30
+ /**
31
+ * Allows storage of user data. Data stored must be string formatted.
32
+ * Developers can extend the entry path and entry name through the `schema.ts` file.
33
+ *
34
+ * @param path - string in the form of `${feature}.${key}` that matches schema
35
+ * @param value - The string data you want to store.
36
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
37
+ * @returns nothing. NOTE that an error is thrown if fails to store data.
38
+ */
39
+ export type UserStorageControllerPerformSetStorageAction = {
40
+ type: `UserStorageController:performSetStorage`;
41
+ handler: UserStorageController['performSetStorage'];
42
+ };
43
+ /**
44
+ * Allows storage of multiple user data entries for one specific feature. Data stored must be string formatted.
45
+ * Developers can extend the entry path through the `schema.ts` file.
46
+ *
47
+ * @param path - string in the form of `${feature}` that matches schema
48
+ * @param values - data to store, in the form of an array of `[entryKey, entryValue]` pairs
49
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
50
+ * @returns nothing. NOTE that an error is thrown if fails to store data.
51
+ */
52
+ export type UserStorageControllerPerformBatchSetStorageAction = {
53
+ type: `UserStorageController:performBatchSetStorage`;
54
+ handler: UserStorageController['performBatchSetStorage'];
55
+ };
56
+ /**
57
+ * Allows deletion of user data. Developers can extend the entry path and entry name through the `schema.ts` file.
58
+ *
59
+ * @param path - string in the form of `${feature}.${key}` that matches schema
60
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
61
+ * @returns nothing. NOTE that an error is thrown if fails to delete data.
62
+ */
63
+ export type UserStorageControllerPerformDeleteStorageAction = {
64
+ type: `UserStorageController:performDeleteStorage`;
65
+ handler: UserStorageController['performDeleteStorage'];
66
+ };
67
+ /**
68
+ * Allows deletion of all user data entries for a specific feature.
69
+ * Developers can extend the entry path through the `schema.ts` file.
70
+ *
71
+ * @param path - string in the form of `${feature}` that matches schema
72
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
73
+ * @returns nothing. NOTE that an error is thrown if fails to delete data.
74
+ */
75
+ export type UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction = {
76
+ type: `UserStorageController:performDeleteStorageAllFeatureEntries`;
77
+ handler: UserStorageController['performDeleteStorageAllFeatureEntries'];
78
+ };
79
+ /**
80
+ * Allows delete of multiple user data entries for one specific feature. Data deleted must be string formatted.
81
+ * Developers can extend the entry path through the `schema.ts` file.
82
+ *
83
+ * @param path - string in the form of `${feature}` that matches schema
84
+ * @param values - data to store, in the form of an array of entryKey[]
85
+ * @param entropySourceId - The entropy source ID used to generate the encryption key.
86
+ * @returns nothing. NOTE that an error is thrown if fails to store data.
87
+ */
88
+ export type UserStorageControllerPerformBatchDeleteStorageAction = {
89
+ type: `UserStorageController:performBatchDeleteStorage`;
90
+ handler: UserStorageController['performBatchDeleteStorage'];
91
+ };
92
+ /**
93
+ * Retrieves the storage key, for internal use only!
94
+ *
95
+ * @returns the storage key
96
+ */
97
+ export type UserStorageControllerGetStorageKeyAction = {
98
+ type: `UserStorageController:getStorageKey`;
99
+ handler: UserStorageController['getStorageKey'];
100
+ };
101
+ /**
102
+ * Lists all the available HD keyring metadata IDs.
103
+ * These IDs can be used in a multi-SRP context to segregate data specific to different SRPs.
104
+ *
105
+ * @returns A promise that resolves to an array of HD keyring metadata IDs.
106
+ */
107
+ export type UserStorageControllerListEntropySourcesAction = {
108
+ type: `UserStorageController:listEntropySources`;
109
+ handler: UserStorageController['listEntropySources'];
110
+ };
111
+ export type UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction = {
112
+ type: `UserStorageController:setIsBackupAndSyncFeatureEnabled`;
113
+ handler: UserStorageController['setIsBackupAndSyncFeatureEnabled'];
114
+ };
115
+ /**
116
+ * Sets the isContactSyncingInProgress flag to prevent infinite loops during contact synchronization
117
+ *
118
+ * @param isContactSyncingInProgress - Whether contact syncing is in progress
119
+ */
120
+ export type UserStorageControllerSetIsContactSyncingInProgressAction = {
121
+ type: `UserStorageController:setIsContactSyncingInProgress`;
122
+ handler: UserStorageController['setIsContactSyncingInProgress'];
123
+ };
124
+ /**
125
+ * Syncs the address book list with the user storage address book list.
126
+ * This method is used to make sure that the address book list is up-to-date with the user storage address book list and vice-versa.
127
+ * It will add new contacts to the address book list, update/merge conflicting contacts and re-upload the results in some cases to the user storage.
128
+ */
129
+ export type UserStorageControllerSyncContactsWithUserStorageAction = {
130
+ type: `UserStorageController:syncContactsWithUserStorage`;
131
+ handler: UserStorageController['syncContactsWithUserStorage'];
132
+ };
133
+ /**
134
+ * Union of all UserStorageController action types.
135
+ */
136
+ export type UserStorageControllerMethodActions = UserStorageControllerPerformGetStorageAction | UserStorageControllerPerformGetStorageAllFeatureEntriesAction | UserStorageControllerPerformSetStorageAction | UserStorageControllerPerformBatchSetStorageAction | UserStorageControllerPerformDeleteStorageAction | UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction | UserStorageControllerPerformBatchDeleteStorageAction | UserStorageControllerGetStorageKeyAction | UserStorageControllerListEntropySourcesAction | UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction | UserStorageControllerSetIsContactSyncingInProgressAction | UserStorageControllerSyncContactsWithUserStorageAction;
137
+ //# sourceMappingURL=UserStorageController-method-action-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserStorageController-method-action-types.d.mts","sourceRoot":"","sources":["../../../src/controllers/user-storage/UserStorageController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,oCAAgC;AAErE;;;;;;;GAOG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,6DAA6D,GAAG;IAC1E,IAAI,EAAE,0DAA0D,CAAC;IACjE,OAAO,EAAE,qBAAqB,CAAC,oCAAoC,CAAC,CAAC;CACtE,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,iDAAiD,GAAG;IAC9D,IAAI,EAAE,8CAA8C,CAAC;IACrD,OAAO,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,CAAC;CAC1D,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,gEAAgE,GAAG;IAC7E,IAAI,EAAE,6DAA6D,CAAC;IACpE,OAAO,EAAE,qBAAqB,CAAC,uCAAuC,CAAC,CAAC;CACzE,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,oDAAoD,GAAG;IACjE,IAAI,EAAE,iDAAiD,CAAC;IACxD,OAAO,EAAE,qBAAqB,CAAC,2BAA2B,CAAC,CAAC;CAC7D,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,6CAA6C,GAAG;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,2DAA2D,GAAG;IACxE,IAAI,EAAE,wDAAwD,CAAC;IAC/D,OAAO,EAAE,qBAAqB,CAAC,kCAAkC,CAAC,CAAC;CACpE,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wDAAwD,GAAG;IACrE,IAAI,EAAE,qDAAqD,CAAC;IAC5D,OAAO,EAAE,qBAAqB,CAAC,+BAA+B,CAAC,CAAC;CACjE,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sDAAsD,GAAG;IACnE,IAAI,EAAE,mDAAmD,CAAC;IAC1D,OAAO,EAAE,qBAAqB,CAAC,6BAA6B,CAAC,CAAC;CAC/D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC1C,4CAA4C,GAC5C,6DAA6D,GAC7D,4CAA4C,GAC5C,iDAAiD,GACjD,+CAA+C,GAC/C,gEAAgE,GAChE,oDAAoD,GACpD,wCAAwC,GACxC,6CAA6C,GAC7C,2DAA2D,GAC3D,wDAAwD,GACxD,sDAAsD,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file is auto generated by `scripts/generate-method-action-types.ts`.
3
+ * Do not edit manually.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=UserStorageController-method-action-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserStorageController-method-action-types.mjs","sourceRoot":"","sources":["../../../src/controllers/user-storage/UserStorageController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated by `scripts/generate-method-action-types.ts`.\n * Do not edit manually.\n */\n\nimport type { UserStorageController } from './UserStorageController';\n\n/**\n * Allows retrieval of stored data. Data stored is string formatted.\n * Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns the decrypted string contents found from user storage (or null if not found)\n */\nexport type UserStorageControllerPerformGetStorageAction = {\n type: `UserStorageController:performGetStorage`;\n handler: UserStorageController['performGetStorage'];\n};\n\n/**\n * Allows retrieval of all stored data for a specific feature. Data stored is formatted as an array of strings.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns the array of decrypted string contents found from user storage (or null if not found)\n */\nexport type UserStorageControllerPerformGetStorageAllFeatureEntriesAction = {\n type: `UserStorageController:performGetStorageAllFeatureEntries`;\n handler: UserStorageController['performGetStorageAllFeatureEntries'];\n};\n\n/**\n * Allows storage of user data. Data stored must be string formatted.\n * Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param value - The string data you want to store.\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\nexport type UserStorageControllerPerformSetStorageAction = {\n type: `UserStorageController:performSetStorage`;\n handler: UserStorageController['performSetStorage'];\n};\n\n/**\n * Allows storage of multiple user data entries for one specific feature. Data stored must be string formatted.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param values - data to store, in the form of an array of `[entryKey, entryValue]` pairs\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\nexport type UserStorageControllerPerformBatchSetStorageAction = {\n type: `UserStorageController:performBatchSetStorage`;\n handler: UserStorageController['performBatchSetStorage'];\n};\n\n/**\n * Allows deletion of user data. Developers can extend the entry path and entry name through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}.${key}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to delete data.\n */\nexport type UserStorageControllerPerformDeleteStorageAction = {\n type: `UserStorageController:performDeleteStorage`;\n handler: UserStorageController['performDeleteStorage'];\n};\n\n/**\n * Allows deletion of all user data entries for a specific feature.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to delete data.\n */\nexport type UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction = {\n type: `UserStorageController:performDeleteStorageAllFeatureEntries`;\n handler: UserStorageController['performDeleteStorageAllFeatureEntries'];\n};\n\n/**\n * Allows delete of multiple user data entries for one specific feature. Data deleted must be string formatted.\n * Developers can extend the entry path through the `schema.ts` file.\n *\n * @param path - string in the form of `${feature}` that matches schema\n * @param values - data to store, in the form of an array of entryKey[]\n * @param entropySourceId - The entropy source ID used to generate the encryption key.\n * @returns nothing. NOTE that an error is thrown if fails to store data.\n */\nexport type UserStorageControllerPerformBatchDeleteStorageAction = {\n type: `UserStorageController:performBatchDeleteStorage`;\n handler: UserStorageController['performBatchDeleteStorage'];\n};\n\n/**\n * Retrieves the storage key, for internal use only!\n *\n * @returns the storage key\n */\nexport type UserStorageControllerGetStorageKeyAction = {\n type: `UserStorageController:getStorageKey`;\n handler: UserStorageController['getStorageKey'];\n};\n\n/**\n * Lists all the available HD keyring metadata IDs.\n * These IDs can be used in a multi-SRP context to segregate data specific to different SRPs.\n *\n * @returns A promise that resolves to an array of HD keyring metadata IDs.\n */\nexport type UserStorageControllerListEntropySourcesAction = {\n type: `UserStorageController:listEntropySources`;\n handler: UserStorageController['listEntropySources'];\n};\n\nexport type UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction = {\n type: `UserStorageController:setIsBackupAndSyncFeatureEnabled`;\n handler: UserStorageController['setIsBackupAndSyncFeatureEnabled'];\n};\n\n/**\n * Sets the isContactSyncingInProgress flag to prevent infinite loops during contact synchronization\n *\n * @param isContactSyncingInProgress - Whether contact syncing is in progress\n */\nexport type UserStorageControllerSetIsContactSyncingInProgressAction = {\n type: `UserStorageController:setIsContactSyncingInProgress`;\n handler: UserStorageController['setIsContactSyncingInProgress'];\n};\n\n/**\n * Syncs the address book list with the user storage address book list.\n * This method is used to make sure that the address book list is up-to-date with the user storage address book list and vice-versa.\n * It will add new contacts to the address book list, update/merge conflicting contacts and re-upload the results in some cases to the user storage.\n */\nexport type UserStorageControllerSyncContactsWithUserStorageAction = {\n type: `UserStorageController:syncContactsWithUserStorage`;\n handler: UserStorageController['syncContactsWithUserStorage'];\n};\n\n/**\n * Union of all UserStorageController action types.\n */\nexport type UserStorageControllerMethodActions =\n | UserStorageControllerPerformGetStorageAction\n | UserStorageControllerPerformGetStorageAllFeatureEntriesAction\n | UserStorageControllerPerformSetStorageAction\n | UserStorageControllerPerformBatchSetStorageAction\n | UserStorageControllerPerformDeleteStorageAction\n | UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction\n | UserStorageControllerPerformBatchDeleteStorageAction\n | UserStorageControllerGetStorageKeyAction\n | UserStorageControllerListEntropySourcesAction\n | UserStorageControllerSetIsBackupAndSyncFeatureEnabledAction\n | UserStorageControllerSetIsContactSyncingInProgressAction\n | UserStorageControllerSyncContactsWithUserStorageAction;\n"]}
@@ -10,9 +10,9 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
10
10
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11
11
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12
12
  };
13
- var _UserStorageController_instances, _UserStorageController_userStorage, _UserStorageController_auth, _UserStorageController_config, _UserStorageController_trace, _UserStorageController_isUnlocked, _UserStorageController_storageKeyCache, _UserStorageController_keyringController, _UserStorageController_nativeScryptCrypto, _UserStorageController_registerMessageHandlers, _UserStorageController__snapSignMessageCache, _UserStorageController_snapSignMessage, _UserStorageController_setIsBackupAndSyncUpdateLoading;
13
+ var _UserStorageController_instances, _UserStorageController_userStorage, _UserStorageController_auth, _UserStorageController_config, _UserStorageController_trace, _UserStorageController_isUnlocked, _UserStorageController_storageKeyCache, _UserStorageController_keyringController, _UserStorageController_nativeScryptCrypto, _UserStorageController__snapSignMessageCache, _UserStorageController_snapSignMessage, _UserStorageController_setIsBackupAndSyncUpdateLoading;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.defaultState = void 0;
15
+ exports.UserStorageController = exports.defaultState = void 0;
16
16
  const base_controller_1 = require("@metamask/base-controller");
17
17
  const keyring_controller_1 = require("@metamask/keyring-controller");
18
18
  const constants_1 = require("./constants.cjs");
@@ -61,6 +61,20 @@ const metadata = {
61
61
  usedInUi: true,
62
62
  },
63
63
  };
64
+ const MESSENGER_EXPOSED_METHODS = [
65
+ 'performGetStorage',
66
+ 'performGetStorageAllFeatureEntries',
67
+ 'performSetStorage',
68
+ 'performBatchSetStorage',
69
+ 'performDeleteStorage',
70
+ 'performBatchDeleteStorage',
71
+ 'getStorageKey',
72
+ 'performDeleteStorageAllFeatureEntries',
73
+ 'listEntropySources',
74
+ 'setIsBackupAndSyncFeatureEnabled',
75
+ 'setIsContactSyncingInProgress',
76
+ 'syncContactsWithUserStorage',
77
+ ];
64
78
  /**
65
79
  * Reusable controller that allows any team to store synchronized data for a given user.
66
80
  * These can be settings shared cross MetaMask clients, or data we want to persist when uninstalling/reinstalling.
@@ -140,8 +154,8 @@ class UserStorageController extends base_controller_1.BaseController {
140
154
  },
141
155
  },
142
156
  }), "f");
157
+ this.messenger.registerMethodActionHandlers(this, MESSENGER_EXPOSED_METHODS);
143
158
  __classPrivateFieldGet(this, _UserStorageController_keyringController, "f").setupLockedStateSubscriptions();
144
- __classPrivateFieldGet(this, _UserStorageController_instances, "m", _UserStorageController_registerMessageHandlers).call(this);
145
159
  __classPrivateFieldSet(this, _UserStorageController_nativeScryptCrypto, nativeScryptCrypto, "f");
146
160
  // Contact Syncing
147
161
  (0, setup_subscriptions_1.setupContactSyncingSubscriptions)({
@@ -348,15 +362,8 @@ class UserStorageController extends base_controller_1.BaseController {
348
362
  });
349
363
  }
350
364
  }
351
- _UserStorageController_userStorage = new WeakMap(), _UserStorageController_auth = new WeakMap(), _UserStorageController_config = new WeakMap(), _UserStorageController_trace = new WeakMap(), _UserStorageController_isUnlocked = new WeakMap(), _UserStorageController_storageKeyCache = new WeakMap(), _UserStorageController_keyringController = new WeakMap(), _UserStorageController_nativeScryptCrypto = new WeakMap(), _UserStorageController__snapSignMessageCache = new WeakMap(), _UserStorageController_instances = new WeakSet(), _UserStorageController_registerMessageHandlers = function _UserStorageController_registerMessageHandlers() {
352
- this.messenger.registerActionHandler('UserStorageController:performGetStorage', this.performGetStorage.bind(this));
353
- this.messenger.registerActionHandler('UserStorageController:performGetStorageAllFeatureEntries', this.performGetStorageAllFeatureEntries.bind(this));
354
- this.messenger.registerActionHandler('UserStorageController:performSetStorage', this.performSetStorage.bind(this));
355
- this.messenger.registerActionHandler('UserStorageController:performBatchSetStorage', this.performBatchSetStorage.bind(this));
356
- this.messenger.registerActionHandler('UserStorageController:performDeleteStorage', this.performDeleteStorage.bind(this));
357
- this.messenger.registerActionHandler('UserStorageController:performBatchDeleteStorage', this.performBatchDeleteStorage.bind(this));
358
- this.messenger.registerActionHandler('UserStorageController:getStorageKey', this.getStorageKey.bind(this));
359
- }, _UserStorageController_snapSignMessage =
365
+ exports.UserStorageController = UserStorageController;
366
+ _UserStorageController_userStorage = new WeakMap(), _UserStorageController_auth = new WeakMap(), _UserStorageController_config = new WeakMap(), _UserStorageController_trace = new WeakMap(), _UserStorageController_isUnlocked = new WeakMap(), _UserStorageController_storageKeyCache = new WeakMap(), _UserStorageController_keyringController = new WeakMap(), _UserStorageController_nativeScryptCrypto = new WeakMap(), _UserStorageController__snapSignMessageCache = new WeakMap(), _UserStorageController_instances = new WeakSet(), _UserStorageController_snapSignMessage =
360
367
  /**
361
368
  * Signs a specific message using an underlying auth snap.
362
369
  *
@@ -381,5 +388,4 @@ async function _UserStorageController_snapSignMessage(message, entropySourceId)
381
388
  state.isBackupAndSyncUpdateLoading = isBackupAndSyncUpdateLoading;
382
389
  });
383
390
  };
384
- exports.default = UserStorageController;
385
391
  //# sourceMappingURL=UserStorageController.cjs.map