@openmrs/esm-framework 10.0.1-pre.5539 → 10.0.1-pre.5545

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 (175) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/deprecated.d.ts +63 -0
  3. package/dist/deprecated.d.ts.map +1 -0
  4. package/dist/deprecated.js +65 -0
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/internal.d.ts +1 -1
  9. package/dist/internal.d.ts.map +1 -1
  10. package/dist/internal.js +1 -1
  11. package/docs/API.md +0 -47
  12. package/docs/classes/OpenmrsFetchError.md +4 -4
  13. package/docs/enumerations/VisitMode.md +4 -4
  14. package/docs/enumerations/VisitStatus.md +3 -3
  15. package/docs/functions/attach.md +1 -1
  16. package/docs/functions/clearCurrentUser.md +1 -1
  17. package/docs/functions/createErrorHandler.md +1 -1
  18. package/docs/functions/detach.md +1 -1
  19. package/docs/functions/detachAll.md +1 -1
  20. package/docs/functions/fetchCurrentPatient.md +5 -15
  21. package/docs/functions/getAssignedExtensions.md +1 -1
  22. package/docs/functions/getCoreTranslation.md +1 -1
  23. package/docs/functions/getCurrentUser.md +31 -41
  24. package/docs/functions/getDynamicOfflineDataEntries.md +11 -10
  25. package/docs/functions/getExtensionNameFromId.md +1 -1
  26. package/docs/functions/getExtensionStore.md +1 -1
  27. package/docs/functions/getLocations.md +3 -3
  28. package/docs/functions/getLoggedInUser.md +1 -1
  29. package/docs/functions/getSessionLocation.md +1 -1
  30. package/docs/functions/getSessionStore.md +1 -1
  31. package/docs/functions/getSynchronizationItems.md +11 -9
  32. package/docs/functions/getVisitStore.md +1 -1
  33. package/docs/functions/getVisitTypes.md +15 -8
  34. package/docs/functions/getVisitsForPatient.md +1 -1
  35. package/docs/functions/isVersionSatisfied.md +1 -1
  36. package/docs/functions/makeUrl.md +1 -1
  37. package/docs/functions/messageOmrsServiceWorker.md +13 -11
  38. package/docs/functions/openmrsFetch.md +1 -1
  39. package/docs/functions/refetchCurrentUser.md +4 -4
  40. package/docs/functions/renderExtension.md +1 -1
  41. package/docs/functions/reportError.md +1 -1
  42. package/docs/functions/saveVisit.md +1 -1
  43. package/docs/functions/setCurrentVisit.md +1 -1
  44. package/docs/functions/setSessionLocation.md +1 -1
  45. package/docs/functions/setUserLanguage.md +1 -1
  46. package/docs/functions/setUserProperties.md +1 -1
  47. package/docs/functions/setupDynamicOfflineDataHandler.md +17 -9
  48. package/docs/functions/setupOfflineSync.md +17 -24
  49. package/docs/functions/subscribeActionableNotificationShown.md +1 -1
  50. package/docs/functions/subscribeNotificationShown.md +1 -1
  51. package/docs/functions/subscribePrecacheStaticDependencies.md +11 -4
  52. package/docs/functions/subscribeSnackbarShown.md +1 -1
  53. package/docs/functions/subscribeToastShown.md +1 -1
  54. package/docs/functions/toLocationObject.md +1 -1
  55. package/docs/functions/toVisitTypeObject.md +1 -1
  56. package/docs/functions/updateVisit.md +1 -1
  57. package/docs/functions/useConnectivity.md +6 -16
  58. package/docs/functions/useLocations.md +1 -1
  59. package/docs/functions/useVisitTypes.md +1 -1
  60. package/docs/functions/userHasAccess.md +1 -1
  61. package/docs/interfaces/AssignedExtension.md +8 -24
  62. package/docs/interfaces/CancelLoading.md +2 -2
  63. package/docs/interfaces/ConnectedExtension.md +6 -6
  64. package/docs/interfaces/CurrentPatientOptions.md +2 -2
  65. package/docs/interfaces/DisplayConditionsConfigObject.md +0 -20
  66. package/docs/interfaces/ExtensionRegistration.md +3 -19
  67. package/docs/interfaces/ExtensionSlotConfig.md +5 -5
  68. package/docs/interfaces/ExtensionSlotConfigureValueObject.md +1 -1
  69. package/docs/interfaces/ExtensionSlotProps.md +2 -2
  70. package/docs/interfaces/ExtensionSlotState.md +3 -3
  71. package/docs/interfaces/ExtensionStore.md +2 -2
  72. package/docs/interfaces/FeatureFlagDefinition.md +4 -4
  73. package/docs/interfaces/FetchConfig.md +3 -3
  74. package/docs/interfaces/FetchError.md +3 -3
  75. package/docs/interfaces/FetchHeaders.md +1 -1
  76. package/docs/interfaces/FetchResponseJson.md +1 -1
  77. package/docs/interfaces/ImportMap.md +2 -2
  78. package/docs/interfaces/OnlyThePatient.md +2 -2
  79. package/docs/interfaces/OpenmrsAppRoutes.md +13 -13
  80. package/docs/interfaces/OpenmrsRoutes.md +3 -3
  81. package/docs/interfaces/PatientWithFullResponse.md +2 -2
  82. package/docs/interfaces/ResourceLoader.md +2 -2
  83. package/docs/interfaces/ShowActionableNotificationEvent.md +7 -7
  84. package/docs/interfaces/ShowNotificationEvent.md +6 -6
  85. package/docs/interfaces/ShowSnackbarEvent.md +9 -9
  86. package/docs/interfaces/ShowToastEvent.md +6 -6
  87. package/docs/interfaces/SpaConfig.md +5 -21
  88. package/docs/interfaces/VisitItem.md +5 -5
  89. package/docs/interfaces/VisitStoreState.md +3 -3
  90. package/docs/interfaces/WorkspaceDefinition2.md +5 -5
  91. package/docs/interfaces/WorkspaceGroupDefinition.md +3 -3
  92. package/docs/interfaces/WorkspaceGroupDefinition2.md +6 -6
  93. package/docs/interfaces/WorkspaceWindowDefinition2.md +7 -7
  94. package/docs/type-aliases/ConfigValue.md +1 -1
  95. package/docs/type-aliases/CurrentPatient.md +1 -1
  96. package/docs/type-aliases/ExtensionDefinition.md +10 -30
  97. package/docs/type-aliases/ExtensionSlotCustomState.md +1 -1
  98. package/docs/type-aliases/LoadedSessionStore.md +3 -3
  99. package/docs/type-aliases/ModalDefinition.md +3 -3
  100. package/docs/type-aliases/NameUse.md +1 -1
  101. package/docs/type-aliases/PageDefinition.md +1 -13
  102. package/docs/type-aliases/PatientUuid.md +1 -1
  103. package/docs/type-aliases/ProvidedConfig.md +3 -3
  104. package/docs/type-aliases/SessionStore.md +1 -1
  105. package/docs/type-aliases/SpaEnvironment.md +1 -1
  106. package/docs/type-aliases/UnloadedSessionStore.md +3 -3
  107. package/docs/type-aliases/Validator.md +1 -1
  108. package/docs/type-aliases/ValidatorFunction.md +1 -1
  109. package/docs/type-aliases/WorkspaceDefinition.md +10 -10
  110. package/docs/type-aliases/WorkspaceWindowState.md +1 -1
  111. package/docs/variables/defaultVisitCustomRepresentation.md +1 -1
  112. package/docs/variables/fhirBaseUrl.md +1 -1
  113. package/docs/variables/restBaseUrl.md +1 -1
  114. package/docs/variables/sessionEndpoint.md +1 -1
  115. package/docs/variables/visitTypesUrl.md +9 -0
  116. package/mock-jest.tsx +12 -4
  117. package/mock.tsx +12 -4
  118. package/package.json +19 -21
  119. package/src/deprecated.ts +87 -0
  120. package/src/index.ts +1 -1
  121. package/src/internal.ts +1 -1
  122. package/tsconfig.typedoc.json +0 -2
  123. package/docs/functions/beginEditSynchronizationItem.md +0 -22
  124. package/docs/functions/canBeginEditSynchronizationItemsOfType.md +0 -22
  125. package/docs/functions/deleteSynchronizationItem.md +0 -21
  126. package/docs/functions/generateOfflineUuid.md +0 -13
  127. package/docs/functions/getCurrentOfflineMode.md +0 -11
  128. package/docs/functions/getDynamicOfflineDataEntriesFor.md +0 -34
  129. package/docs/functions/getDynamicOfflineDataHandlers.md +0 -13
  130. package/docs/functions/getFullSynchronizationItems.md +0 -27
  131. package/docs/functions/getFullSynchronizationItemsFor.md +0 -33
  132. package/docs/functions/getOfflinePatientDataStore.md +0 -15
  133. package/docs/functions/getSynchronizationItem.md +0 -27
  134. package/docs/functions/isOfflineUuid.md +0 -19
  135. package/docs/functions/isOnline.md +0 -27
  136. package/docs/functions/openmrsObservableFetch.md +0 -55
  137. package/docs/functions/putDynamicOfflineData.md +0 -28
  138. package/docs/functions/putDynamicOfflineDataFor.md +0 -34
  139. package/docs/functions/queueSynchronizationItem.md +0 -39
  140. package/docs/functions/registerOfflinePatientHandler.md +0 -25
  141. package/docs/functions/removeDynamicOfflineData.md +0 -28
  142. package/docs/functions/removeDynamicOfflineDataFor.md +0 -34
  143. package/docs/functions/subscribeConnectivity.md +0 -21
  144. package/docs/functions/subscribeConnectivityChanged.md +0 -21
  145. package/docs/functions/syncAllDynamicOfflineData.md +0 -27
  146. package/docs/functions/syncDynamicOfflineData.md +0 -33
  147. package/docs/functions/syncOfflinePatientData.md +0 -21
  148. package/docs/interfaces/ClearDynamicRoutesMessage.md +0 -21
  149. package/docs/interfaces/ConnectivityChangedEvent.md +0 -13
  150. package/docs/interfaces/DynamicOfflineData.md +0 -60
  151. package/docs/interfaces/DynamicOfflineDataHandler.md +0 -98
  152. package/docs/interfaces/DynamicOfflineDataSyncState.md +0 -65
  153. package/docs/interfaces/MessageServiceWorkerResult.md +0 -35
  154. package/docs/interfaces/OfflineModeResult.md +0 -29
  155. package/docs/interfaces/OfflinePatientArgs.md +0 -25
  156. package/docs/interfaces/OfflinePatientDataSyncHandler.md +0 -35
  157. package/docs/interfaces/OfflinePatientDataSyncState.md +0 -61
  158. package/docs/interfaces/OfflinePatientDataSyncStore.md +0 -25
  159. package/docs/interfaces/OmrsServiceWorkerMessage.md +0 -25
  160. package/docs/interfaces/OnImportMapChangedMessage.md +0 -29
  161. package/docs/interfaces/PrecacheStaticDependenciesEvent.md +0 -5
  162. package/docs/interfaces/QueueItemDescriptor.md +0 -50
  163. package/docs/interfaces/RegisterDynamicRouteMessage.md +0 -45
  164. package/docs/interfaces/SyncItem.md +0 -79
  165. package/docs/interfaces/SyncProcessOptions.md +0 -53
  166. package/docs/type-aliases/KnownOmrsServiceWorkerMessages.md +0 -7
  167. package/docs/type-aliases/OfflineMode.md +0 -7
  168. package/docs/type-aliases/OmrsOfflineCachingStrategy.md +0 -12
  169. package/docs/type-aliases/OmrsOfflineHttpHeaderNames.md +0 -7
  170. package/docs/type-aliases/OmrsOfflineHttpHeaders.md +0 -44
  171. package/docs/variables/getStartedVisit.md +0 -9
  172. package/docs/variables/offlineUuidPrefix.md +0 -7
  173. package/docs/variables/omrsOfflineCachingStrategyHttpHeaderName.md +0 -7
  174. package/docs/variables/omrsOfflineResponseBodyHttpHeaderName.md +0 -7
  175. package/docs/variables/omrsOfflineResponseStatusHttpHeaderName.md +0 -7
@@ -1,39 +0,0 @@
1
- [O3 Framework](../API.md) / queueSynchronizationItem
2
-
3
- # Function: queueSynchronizationItem()
4
-
5
- > **queueSynchronizationItem**\<`T`\>(`type`, `content`, `descriptor?`): `Promise`\<`number`\>
6
-
7
- Defined in: [packages/framework/esm-offline/src/sync.ts:261](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/sync.ts#L261)
8
-
9
- Enqueues a new item in the sync queue and associates the item with the currently signed in user.
10
-
11
- ## Type Parameters
12
-
13
- ### T
14
-
15
- `T`
16
-
17
- ## Parameters
18
-
19
- ### type
20
-
21
- `string`
22
-
23
- The identifying type of the synchronization item.
24
-
25
- ### content
26
-
27
- `T`
28
-
29
- The actual data to be synchronized.
30
-
31
- ### descriptor?
32
-
33
- [`QueueItemDescriptor`](../interfaces/QueueItemDescriptor.md)
34
-
35
- An optional descriptor providing additional metadata about the sync item.
36
-
37
- ## Returns
38
-
39
- `Promise`\<`number`\>
@@ -1,25 +0,0 @@
1
- [O3 Framework](../API.md) / registerOfflinePatientHandler
2
-
3
- # Function: ~~registerOfflinePatientHandler()~~
4
-
5
- > **registerOfflinePatientHandler**(`identifier`, `handler`): `void`
6
-
7
- Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:45](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L45)
8
-
9
- ## Parameters
10
-
11
- ### identifier
12
-
13
- `string`
14
-
15
- ### handler
16
-
17
- [`OfflinePatientDataSyncHandler`](../interfaces/OfflinePatientDataSyncHandler.md)
18
-
19
- ## Returns
20
-
21
- `void`
22
-
23
- ## Deprecated
24
-
25
- Will be removed once all modules have been migrated to the new dynamic offline data API.
@@ -1,28 +0,0 @@
1
- [O3 Framework](../API.md) / removeDynamicOfflineData
2
-
3
- # Function: removeDynamicOfflineData()
4
-
5
- > **removeDynamicOfflineData**(`type`, `identifier`): `Promise`\<`void`\>
6
-
7
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:201](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L201)
8
-
9
- Declares that dynamic offline data of the given [type](#removedynamicofflinedata) with the given [identifier](#removedynamicofflinedata)
10
- no longer needs to be available offline for the currently logged in user.
11
-
12
- ## Parameters
13
-
14
- ### type
15
-
16
- `string`
17
-
18
- The type of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
19
-
20
- ### identifier
21
-
22
- `string`
23
-
24
- The identifier of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
25
-
26
- ## Returns
27
-
28
- `Promise`\<`void`\>
@@ -1,34 +0,0 @@
1
- [O3 Framework](../API.md) / removeDynamicOfflineDataFor
2
-
3
- # Function: removeDynamicOfflineDataFor()
4
-
5
- > **removeDynamicOfflineDataFor**(`userId`, `type`, `identifier`): `Promise`\<`void`\>
6
-
7
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:213](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L213)
8
-
9
- Declares that dynamic offline data of the given [type](#removedynamicofflinedatafor) with the given [identifier](#removedynamicofflinedatafor)
10
- no longer needs to be available offline for the user with the given ID.
11
-
12
- ## Parameters
13
-
14
- ### userId
15
-
16
- `string`
17
-
18
- The ID of the user who doesn't require the specified offline data.
19
-
20
- ### type
21
-
22
- `string`
23
-
24
- The type of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
25
-
26
- ### identifier
27
-
28
- `string`
29
-
30
- The identifier of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
31
-
32
- ## Returns
33
-
34
- `Promise`\<`void`\>
@@ -1,21 +0,0 @@
1
- [O3 Framework](../API.md) / subscribeConnectivity
2
-
3
- # Function: subscribeConnectivity()
4
-
5
- > **subscribeConnectivity**(`cb`): () => `void`
6
-
7
- Defined in: [packages/framework/esm-globals/src/events.ts:24](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L24)
8
-
9
- ## Parameters
10
-
11
- ### cb
12
-
13
- (`ev`) => `void`
14
-
15
- ## Returns
16
-
17
- > (): `void`
18
-
19
- ### Returns
20
-
21
- `void`
@@ -1,21 +0,0 @@
1
- [O3 Framework](../API.md) / subscribeConnectivityChanged
2
-
3
- # Function: subscribeConnectivityChanged()
4
-
5
- > **subscribeConnectivityChanged**(`cb`): () => `void`
6
-
7
- Defined in: [packages/framework/esm-globals/src/events.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L13)
8
-
9
- ## Parameters
10
-
11
- ### cb
12
-
13
- (`ev`) => `void`
14
-
15
- ## Returns
16
-
17
- > (): `void`
18
-
19
- ### Returns
20
-
21
- `void`
@@ -1,27 +0,0 @@
1
- [O3 Framework](../API.md) / syncAllDynamicOfflineData
2
-
3
- # Function: syncAllDynamicOfflineData()
4
-
5
- > **syncAllDynamicOfflineData**(`type`, `abortSignal?`): `Promise`\<`void`\>
6
-
7
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:241](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L241)
8
-
9
- Synchronizes all offline data entries of the given [type](#syncalldynamicofflinedata) for the currently logged in user.
10
-
11
- ## Parameters
12
-
13
- ### type
14
-
15
- `string`
16
-
17
- The type of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
18
-
19
- ### abortSignal?
20
-
21
- `AbortSignal`
22
-
23
- An `AbortSignal` which can be used to cancel the operation.
24
-
25
- ## Returns
26
-
27
- `Promise`\<`void`\>
@@ -1,33 +0,0 @@
1
- [O3 Framework](../API.md) / syncDynamicOfflineData
2
-
3
- # Function: syncDynamicOfflineData()
4
-
5
- > **syncDynamicOfflineData**(`type`, `identifier`, `abortSignal?`): `Promise`\<`void`\>
6
-
7
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:254](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L254)
8
-
9
- Synchronizes a single offline data entry of the given [type](#syncdynamicofflinedata) for the currently logged in user.
10
-
11
- ## Parameters
12
-
13
- ### type
14
-
15
- `string`
16
-
17
- The type of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
18
-
19
- ### identifier
20
-
21
- `string`
22
-
23
- The identifier of the offline data. See [DynamicOfflineData](../interfaces/DynamicOfflineData.md) for details.
24
-
25
- ### abortSignal?
26
-
27
- `AbortSignal`
28
-
29
- An `AbortSignal` which can be used to cancel the operation.
30
-
31
- ## Returns
32
-
33
- `Promise`\<`void`\>
@@ -1,21 +0,0 @@
1
- [O3 Framework](../API.md) / syncOfflinePatientData
2
-
3
- # Function: ~~syncOfflinePatientData()~~
4
-
5
- > **syncOfflinePatientData**(`patientUuid`): `Promise`\<`void`\>
6
-
7
- Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:62](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L62)
8
-
9
- ## Parameters
10
-
11
- ### patientUuid
12
-
13
- `string`
14
-
15
- ## Returns
16
-
17
- `Promise`\<`void`\>
18
-
19
- ## Deprecated
20
-
21
- Will be removed once all modules have been migrated to the new dynamic offline data API.
@@ -1,21 +0,0 @@
1
- [O3 Framework](../API.md) / ClearDynamicRoutesMessage
2
-
3
- # Interface: ClearDynamicRoutesMessage
4
-
5
- Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:33](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L33)
6
-
7
- ## Extends
8
-
9
- - [`OmrsServiceWorkerMessage`](OmrsServiceWorkerMessage.md)\<`"clearDynamicRoutes"`\>
10
-
11
- ## Properties
12
-
13
- ### type
14
-
15
- > **type**: `"clearDynamicRoutes"`
16
-
17
- Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:26](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L26)
18
-
19
- #### Inherited from
20
-
21
- [`OmrsServiceWorkerMessage`](OmrsServiceWorkerMessage.md).[`type`](OmrsServiceWorkerMessage.md#type)
@@ -1,13 +0,0 @@
1
- [O3 Framework](../API.md) / ConnectivityChangedEvent
2
-
3
- # Interface: ConnectivityChangedEvent
4
-
5
- Defined in: [packages/framework/esm-globals/src/events.ts:1](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L1)
6
-
7
- ## Properties
8
-
9
- ### online
10
-
11
- > **online**: `boolean`
12
-
13
- Defined in: [packages/framework/esm-globals/src/events.ts:2](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L2)
@@ -1,60 +0,0 @@
1
- [O3 Framework](../API.md) / DynamicOfflineData
2
-
3
- # Interface: DynamicOfflineData
4
-
5
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:44](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L44)
6
-
7
- Represents the registration of a single dynamic offline data entry.
8
-
9
- ## Properties
10
-
11
- ### id?
12
-
13
- > `optional` **id**: `number`
14
-
15
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L48)
16
-
17
- The internal ID of the data entry, as assigned by the IndexedDB where it is stored.
18
-
19
- ***
20
-
21
- ### identifier
22
-
23
- > **identifier**: `string`
24
-
25
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:58](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L58)
26
-
27
- The externally provided identifier of the data entry.
28
- This is typically the ID of the resource as assigned by a remote API.
29
-
30
- ***
31
-
32
- ### syncState?
33
-
34
- > `optional` **syncState**: [`DynamicOfflineDataSyncState`](DynamicOfflineDataSyncState.md)
35
-
36
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:67](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L67)
37
-
38
- If this entry has already been synced, returns the result of that last sync attempt.
39
- Otherwise this is `undefined`.
40
-
41
- ***
42
-
43
- ### type
44
-
45
- > **type**: `string`
46
-
47
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:53](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L53)
48
-
49
- The underlying type used for categorizing the data entry.
50
- Examples could be `"patient"` or `"form"`.
51
-
52
- ***
53
-
54
- ### users
55
-
56
- > **users**: `string`[]
57
-
58
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:62](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L62)
59
-
60
- The UUIDs of the users who need this data entry available offline.
@@ -1,98 +0,0 @@
1
- [O3 Framework](../API.md) / DynamicOfflineDataHandler
2
-
3
- # Interface: DynamicOfflineDataHandler
4
-
5
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:10](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L10)
6
-
7
- A handler for synchronizing dynamically declared offline data.
8
- Can be setup using the [setupDynamicOfflineDataHandler](../functions/setupDynamicOfflineDataHandler.md) function.
9
-
10
- ## Properties
11
-
12
- ### displayName?
13
-
14
- > `optional` **displayName**: `string`
15
-
16
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:24](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L24)
17
-
18
- A human-readable string representing the handler.
19
- If provided, the handler can be rendered in the UI using that string.
20
-
21
- ***
22
-
23
- ### id
24
-
25
- > **id**: `string`
26
-
27
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L14)
28
-
29
- A string uniquely identifying the handler.
30
-
31
- ***
32
-
33
- ### type
34
-
35
- > **type**: `string`
36
-
37
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:19](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L19)
38
-
39
- The type of offline data handled by this handler.
40
- See [DynamicOfflineData.type](DynamicOfflineData.md#type) for details.
41
-
42
- ## Methods
43
-
44
- ### isSynced()
45
-
46
- > **isSynced**(`identifier`, `abortSignal?`): `Promise`\<`boolean`\>
47
-
48
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:32](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L32)
49
-
50
- Evaluates whether the given offline data is correctly synced at this point in time from the perspective
51
- of this single handler.
52
- If `false`, the handler would have to (re-)sync the data in order for offline mode to properly work.
53
-
54
- #### Parameters
55
-
56
- ##### identifier
57
-
58
- `string`
59
-
60
- The identifier of the offline data. See [DynamicOfflineData](DynamicOfflineData.md) for details.
61
-
62
- ##### abortSignal?
63
-
64
- `AbortSignal`
65
-
66
- An `AbortSignal` which can be used to cancel the operation.
67
-
68
- #### Returns
69
-
70
- `Promise`\<`boolean`\>
71
-
72
- ***
73
-
74
- ### sync()
75
-
76
- > **sync**(`identifier`, `abortSignal?`): `Promise`\<`void`\>
77
-
78
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L38)
79
-
80
- Synchronizes the given offline data.
81
-
82
- #### Parameters
83
-
84
- ##### identifier
85
-
86
- `string`
87
-
88
- The identifier of the offline data. See [DynamicOfflineData](DynamicOfflineData.md) for details.
89
-
90
- ##### abortSignal?
91
-
92
- `AbortSignal`
93
-
94
- An `AbortSignal` which can be used to cancel the operation.
95
-
96
- #### Returns
97
-
98
- `Promise`\<`void`\>
@@ -1,65 +0,0 @@
1
- [O3 Framework](../API.md) / DynamicOfflineDataSyncState
2
-
3
- # Interface: DynamicOfflineDataSyncState
4
-
5
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:73](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L73)
6
-
7
- Represents the result of syncing a given [DynamicOfflineData](DynamicOfflineData.md) entry.
8
-
9
- ## Properties
10
-
11
- ### erroredHandlers
12
-
13
- > **erroredHandlers**: `string`[]
14
-
15
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:89](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L89)
16
-
17
- The IDs of the handlers which failed to synchronize their data.
18
-
19
- ***
20
-
21
- ### errors
22
-
23
- > **errors**: `object`[]
24
-
25
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:93](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L93)
26
-
27
- A collection of the errors caught while synchronizing, per handler.
28
-
29
- #### handlerId
30
-
31
- > **handlerId**: `string`
32
-
33
- #### message
34
-
35
- > **message**: `string`
36
-
37
- ***
38
-
39
- ### succeededHandlers
40
-
41
- > **succeededHandlers**: `string`[]
42
-
43
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:85](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L85)
44
-
45
- The IDs of the handlers which successfully synchronized their data.
46
-
47
- ***
48
-
49
- ### syncedBy
50
-
51
- > **syncedBy**: `string`
52
-
53
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:81](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L81)
54
-
55
- The ID of the user who has triggered the data synchronization.
56
-
57
- ***
58
-
59
- ### syncedOn
60
-
61
- > **syncedOn**: `Date`
62
-
63
- Defined in: [packages/framework/esm-offline/src/dynamic-offline-data.ts:77](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/dynamic-offline-data.ts#L77)
64
-
65
- The time when the entry has been synced the last time.
@@ -1,35 +0,0 @@
1
- [O3 Framework](../API.md) / MessageServiceWorkerResult
2
-
3
- # Interface: MessageServiceWorkerResult\<T\>
4
-
5
- Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:46](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L46)
6
-
7
- ## Type Parameters
8
-
9
- ### T
10
-
11
- `T`
12
-
13
- ## Properties
14
-
15
- ### error?
16
-
17
- > `optional` **error**: `string`
18
-
19
- Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:49](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L49)
20
-
21
- ***
22
-
23
- ### result?
24
-
25
- > `optional` **result**: `T`
26
-
27
- Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L48)
28
-
29
- ***
30
-
31
- ### success
32
-
33
- > **success**: `boolean`
34
-
35
- Defined in: [packages/framework/esm-offline/src/service-worker-messaging.ts:47](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/service-worker-messaging.ts#L47)
@@ -1,29 +0,0 @@
1
- [O3 Framework](../API.md) / OfflineModeResult
2
-
3
- # Interface: OfflineModeResult
4
-
5
- Defined in: [packages/framework/esm-offline/src/mode.ts:36](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/mode.ts#L36)
6
-
7
- ## Properties
8
-
9
- ### active
10
-
11
- > **active**: `boolean`
12
-
13
- Defined in: [packages/framework/esm-offline/src/mode.ts:39](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/mode.ts#L39)
14
-
15
- ***
16
-
17
- ### current
18
-
19
- > **current**: [`OfflineMode`](../type-aliases/OfflineMode.md)
20
-
21
- Defined in: [packages/framework/esm-offline/src/mode.ts:37](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/mode.ts#L37)
22
-
23
- ***
24
-
25
- ### notAvailable
26
-
27
- > **notAvailable**: `boolean`
28
-
29
- Defined in: [packages/framework/esm-offline/src/mode.ts:38](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/mode.ts#L38)
@@ -1,25 +0,0 @@
1
- [O3 Framework](../API.md) / OfflinePatientArgs
2
-
3
- # Interface: ~~OfflinePatientArgs~~
4
-
5
- Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:28](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L28)
6
-
7
- ## Deprecated
8
-
9
- Will be removed once all modules have been migrated to the new dynamic offline data API.
10
-
11
- ## Properties
12
-
13
- ### ~~patientUuid~~
14
-
15
- > **patientUuid**: `string`
16
-
17
- Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L29)
18
-
19
- ***
20
-
21
- ### ~~signal~~
22
-
23
- > **signal**: `AbortSignal`
24
-
25
- Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:30](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L30)
@@ -1,35 +0,0 @@
1
- [O3 Framework](../API.md) / OfflinePatientDataSyncHandler
2
-
3
- # Interface: ~~OfflinePatientDataSyncHandler~~
4
-
5
- Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:22](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L22)
6
-
7
- ## Deprecated
8
-
9
- Will be removed once all modules have been migrated to the new dynamic offline data API.
10
-
11
- ## Properties
12
-
13
- ### ~~displayName~~
14
-
15
- > `readonly` **displayName**: `string`
16
-
17
- Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:23](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L23)
18
-
19
- ## Methods
20
-
21
- ### ~~onOfflinePatientAdded()~~
22
-
23
- > **onOfflinePatientAdded**(`args`): `Promise`\<`void`\>
24
-
25
- Defined in: [packages/framework/esm-offline/src/offline-patient-data.ts:24](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-offline/src/offline-patient-data.ts#L24)
26
-
27
- #### Parameters
28
-
29
- ##### args
30
-
31
- [`OfflinePatientArgs`](OfflinePatientArgs.md)
32
-
33
- #### Returns
34
-
35
- `Promise`\<`void`\>