@thunderid/react 0.3.3 → 0.3.5

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 (255) hide show
  1. package/dist/ThunderIDReactClient.d.ts +1 -5
  2. package/dist/ThunderIDReactClient.d.ts.map +1 -1
  3. package/dist/ThunderIDReactClient.js +1 -68
  4. package/dist/ThunderIDReactClient.js.map +1 -1
  5. package/dist/cjs/ThunderIDReactClient.cjs +0 -67
  6. package/dist/cjs/ThunderIDReactClient.cjs.map +1 -1
  7. package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs +1 -1
  8. package/dist/cjs/components/presentation/UserAvatar/BaseUserAvatar.cjs +57 -0
  9. package/dist/cjs/components/presentation/UserAvatar/BaseUserAvatar.cjs.map +1 -0
  10. package/dist/cjs/components/presentation/UserAvatar/UserAvatar.cjs +36 -0
  11. package/dist/cjs/components/presentation/UserAvatar/UserAvatar.cjs.map +1 -0
  12. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs +6 -5
  13. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs.map +1 -1
  14. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +3 -15
  15. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
  16. package/dist/cjs/contexts/Theme/ThemeContext.cjs.map +1 -1
  17. package/dist/cjs/contexts/Theme/ThemeProvider.cjs +2 -5
  18. package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -1
  19. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs +0 -2
  20. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
  21. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +14 -90
  22. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
  23. package/dist/cjs/index.cjs +6 -51
  24. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js +1 -1
  25. package/dist/components/presentation/UserAvatar/BaseUserAvatar.d.ts +50 -0
  26. package/dist/components/presentation/UserAvatar/BaseUserAvatar.d.ts.map +1 -0
  27. package/dist/components/presentation/UserAvatar/BaseUserAvatar.js +55 -0
  28. package/dist/components/presentation/UserAvatar/BaseUserAvatar.js.map +1 -0
  29. package/dist/components/presentation/UserAvatar/UserAvatar.d.ts +46 -0
  30. package/dist/components/presentation/UserAvatar/UserAvatar.d.ts.map +1 -0
  31. package/dist/components/presentation/UserAvatar/UserAvatar.js +34 -0
  32. package/dist/components/presentation/UserAvatar/UserAvatar.js.map +1 -0
  33. package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -1
  34. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js +6 -5
  35. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js.map +1 -1
  36. package/dist/components/presentation/auth/AuthOptionFactory.d.ts +2 -2
  37. package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
  38. package/dist/components/presentation/auth/AuthOptionFactory.js +3 -15
  39. package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
  40. package/dist/contexts/Theme/ThemeContext.d.ts +0 -12
  41. package/dist/contexts/Theme/ThemeContext.d.ts.map +1 -1
  42. package/dist/contexts/Theme/ThemeContext.js.map +1 -1
  43. package/dist/contexts/Theme/ThemeProvider.d.ts +0 -4
  44. package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -1
  45. package/dist/contexts/Theme/ThemeProvider.js +2 -5
  46. package/dist/contexts/Theme/ThemeProvider.js.map +1 -1
  47. package/dist/contexts/ThunderID/ThunderIDContext.d.ts +2 -3
  48. package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
  49. package/dist/contexts/ThunderID/ThunderIDContext.js +0 -2
  50. package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
  51. package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
  52. package/dist/contexts/ThunderID/ThunderIDProvider.js +15 -91
  53. package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
  54. package/dist/index.d.ts +4 -40
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +5 -27
  57. package/package.json +2 -2
  58. package/dist/api/createOrganization.d.ts +0 -86
  59. package/dist/api/createOrganization.d.ts.map +0 -1
  60. package/dist/api/createOrganization.js +0 -80
  61. package/dist/api/createOrganization.js.map +0 -1
  62. package/dist/api/getAllOrganizations.d.ts +0 -78
  63. package/dist/api/getAllOrganizations.d.ts.map +0 -1
  64. package/dist/api/getAllOrganizations.js +0 -71
  65. package/dist/api/getAllOrganizations.js.map +0 -1
  66. package/dist/api/getMeOrganizations.d.ts +0 -82
  67. package/dist/api/getMeOrganizations.d.ts.map +0 -1
  68. package/dist/api/getMeOrganizations.js +0 -75
  69. package/dist/api/getMeOrganizations.js.map +0 -1
  70. package/dist/api/getOrganization.d.ts +0 -74
  71. package/dist/api/getOrganization.d.ts.map +0 -1
  72. package/dist/api/getOrganization.js +0 -67
  73. package/dist/api/getOrganization.js.map +0 -1
  74. package/dist/api/getSchemas.d.ts +0 -72
  75. package/dist/api/getSchemas.d.ts.map +0 -1
  76. package/dist/api/getSchemas.js +0 -65
  77. package/dist/api/getSchemas.js.map +0 -1
  78. package/dist/api/updateOrganization.d.ts +0 -81
  79. package/dist/api/updateOrganization.d.ts.map +0 -1
  80. package/dist/api/updateOrganization.js +0 -74
  81. package/dist/api/updateOrganization.js.map +0 -1
  82. package/dist/cjs/api/createOrganization.cjs +0 -82
  83. package/dist/cjs/api/createOrganization.cjs.map +0 -1
  84. package/dist/cjs/api/getAllOrganizations.cjs +0 -73
  85. package/dist/cjs/api/getAllOrganizations.cjs.map +0 -1
  86. package/dist/cjs/api/getMeOrganizations.cjs +0 -77
  87. package/dist/cjs/api/getMeOrganizations.cjs.map +0 -1
  88. package/dist/cjs/api/getOrganization.cjs +0 -69
  89. package/dist/cjs/api/getOrganization.cjs.map +0 -1
  90. package/dist/cjs/api/getSchemas.cjs +0 -67
  91. package/dist/cjs/api/getSchemas.cjs.map +0 -1
  92. package/dist/cjs/api/updateOrganization.cjs +0 -76
  93. package/dist/cjs/api/updateOrganization.cjs.map +0 -1
  94. package/dist/cjs/components/control/OrganizationContext/OrganizationContext.cjs +0 -34
  95. package/dist/cjs/components/control/OrganizationContext/OrganizationContext.cjs.map +0 -1
  96. package/dist/cjs/components/control/OrganizationContext/OrganizationContextController.cjs +0 -58
  97. package/dist/cjs/components/control/OrganizationContext/OrganizationContextController.cjs.map +0 -1
  98. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.cjs +0 -183
  99. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.cjs.map +0 -1
  100. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.styles.cjs +0 -150
  101. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.styles.cjs.map +0 -1
  102. package/dist/cjs/components/presentation/CreateOrganization/CreateOrganization.cjs +0 -90
  103. package/dist/cjs/components/presentation/CreateOrganization/CreateOrganization.cjs.map +0 -1
  104. package/dist/cjs/components/presentation/Organization/BaseOrganization.cjs +0 -41
  105. package/dist/cjs/components/presentation/Organization/BaseOrganization.cjs.map +0 -1
  106. package/dist/cjs/components/presentation/Organization/Organization.cjs +0 -49
  107. package/dist/cjs/components/presentation/Organization/Organization.cjs.map +0 -1
  108. package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.cjs +0 -257
  109. package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.cjs.map +0 -1
  110. package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.styles.cjs +0 -236
  111. package/dist/cjs/components/presentation/OrganizationList/BaseOrganizationList.styles.cjs.map +0 -1
  112. package/dist/cjs/components/presentation/OrganizationList/OrganizationList.cjs +0 -86
  113. package/dist/cjs/components/presentation/OrganizationList/OrganizationList.cjs.map +0 -1
  114. package/dist/cjs/components/presentation/OrganizationList/OrganizationList.styles.cjs +0 -75
  115. package/dist/cjs/components/presentation/OrganizationList/OrganizationList.styles.cjs.map +0 -1
  116. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.cjs +0 -328
  117. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.cjs.map +0 -1
  118. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.cjs +0 -166
  119. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.cjs.map +0 -1
  120. package/dist/cjs/components/presentation/OrganizationProfile/OrganizationProfile.cjs +0 -126
  121. package/dist/cjs/components/presentation/OrganizationProfile/OrganizationProfile.cjs.map +0 -1
  122. package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.cjs +0 -288
  123. package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.cjs.map +0 -1
  124. package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.cjs +0 -237
  125. package/dist/cjs/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.cjs.map +0 -1
  126. package/dist/cjs/components/presentation/OrganizationSwitcher/OrganizationSwitcher.cjs +0 -127
  127. package/dist/cjs/components/presentation/OrganizationSwitcher/OrganizationSwitcher.cjs.map +0 -1
  128. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.cjs +0 -183
  129. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.cjs.map +0 -1
  130. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.cjs +0 -128
  131. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.cjs.map +0 -1
  132. package/dist/cjs/components/primitives/Icons/Building.cjs +0 -75
  133. package/dist/cjs/components/primitives/Icons/Building.cjs.map +0 -1
  134. package/dist/cjs/contexts/Branding/BrandingContext.cjs +0 -12
  135. package/dist/cjs/contexts/Branding/BrandingContext.cjs.map +0 -1
  136. package/dist/cjs/contexts/Branding/BrandingProvider.cjs +0 -96
  137. package/dist/cjs/contexts/Branding/BrandingProvider.cjs.map +0 -1
  138. package/dist/cjs/contexts/Branding/useBrandingContext.cjs +0 -40
  139. package/dist/cjs/contexts/Branding/useBrandingContext.cjs.map +0 -1
  140. package/dist/cjs/contexts/Organization/OrganizationContext.cjs +0 -27
  141. package/dist/cjs/contexts/Organization/OrganizationContext.cjs.map +0 -1
  142. package/dist/cjs/contexts/Organization/OrganizationProvider.cjs +0 -97
  143. package/dist/cjs/contexts/Organization/OrganizationProvider.cjs.map +0 -1
  144. package/dist/cjs/contexts/Organization/useOrganization.cjs +0 -100
  145. package/dist/cjs/contexts/Organization/useOrganization.cjs.map +0 -1
  146. package/dist/cjs/hooks/useBranding.cjs +0 -71
  147. package/dist/cjs/hooks/useBranding.cjs.map +0 -1
  148. package/dist/components/control/OrganizationContext/OrganizationContext.d.ts +0 -40
  149. package/dist/components/control/OrganizationContext/OrganizationContext.d.ts.map +0 -1
  150. package/dist/components/control/OrganizationContext/OrganizationContext.js +0 -32
  151. package/dist/components/control/OrganizationContext/OrganizationContext.js.map +0 -1
  152. package/dist/components/control/OrganizationContext/OrganizationContextController.d.ts +0 -35
  153. package/dist/components/control/OrganizationContext/OrganizationContextController.d.ts.map +0 -1
  154. package/dist/components/control/OrganizationContext/OrganizationContextController.js +0 -55
  155. package/dist/components/control/OrganizationContext/OrganizationContextController.js.map +0 -1
  156. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts +0 -60
  157. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts.map +0 -1
  158. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.js +0 -178
  159. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.js.map +0 -1
  160. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts +0 -27
  161. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts.map +0 -1
  162. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.js +0 -147
  163. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.js.map +0 -1
  164. package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts +0 -68
  165. package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts.map +0 -1
  166. package/dist/components/presentation/CreateOrganization/CreateOrganization.js +0 -87
  167. package/dist/components/presentation/CreateOrganization/CreateOrganization.js.map +0 -1
  168. package/dist/components/presentation/Organization/BaseOrganization.d.ts +0 -67
  169. package/dist/components/presentation/Organization/BaseOrganization.d.ts.map +0 -1
  170. package/dist/components/presentation/Organization/BaseOrganization.js +0 -39
  171. package/dist/components/presentation/Organization/BaseOrganization.js.map +0 -1
  172. package/dist/components/presentation/Organization/Organization.d.ts +0 -67
  173. package/dist/components/presentation/Organization/Organization.d.ts.map +0 -1
  174. package/dist/components/presentation/Organization/Organization.js +0 -47
  175. package/dist/components/presentation/Organization/Organization.js.map +0 -1
  176. package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts +0 -135
  177. package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts.map +0 -1
  178. package/dist/components/presentation/OrganizationList/BaseOrganizationList.js +0 -252
  179. package/dist/components/presentation/OrganizationList/BaseOrganizationList.js.map +0 -1
  180. package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts +0 -27
  181. package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts.map +0 -1
  182. package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.js +0 -233
  183. package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.js.map +0 -1
  184. package/dist/components/presentation/OrganizationList/OrganizationList.d.ts +0 -93
  185. package/dist/components/presentation/OrganizationList/OrganizationList.d.ts.map +0 -1
  186. package/dist/components/presentation/OrganizationList/OrganizationList.js +0 -82
  187. package/dist/components/presentation/OrganizationList/OrganizationList.js.map +0 -1
  188. package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts +0 -27
  189. package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts.map +0 -1
  190. package/dist/components/presentation/OrganizationList/OrganizationList.styles.js +0 -72
  191. package/dist/components/presentation/OrganizationList/OrganizationList.styles.js.map +0 -1
  192. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +0 -160
  193. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts.map +0 -1
  194. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.js +0 -323
  195. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.js.map +0 -1
  196. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts +0 -27
  197. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts.map +0 -1
  198. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.js +0 -163
  199. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.js.map +0 -1
  200. package/dist/components/presentation/OrganizationProfile/OrganizationProfile.d.ts +0 -120
  201. package/dist/components/presentation/OrganizationProfile/OrganizationProfile.d.ts.map +0 -1
  202. package/dist/components/presentation/OrganizationProfile/OrganizationProfile.js +0 -122
  203. package/dist/components/presentation/OrganizationProfile/OrganizationProfile.js.map +0 -1
  204. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts +0 -149
  205. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts.map +0 -1
  206. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.js +0 -282
  207. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.js.map +0 -1
  208. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts +0 -27
  209. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts.map +0 -1
  210. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.js +0 -234
  211. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.js.map +0 -1
  212. package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts +0 -71
  213. package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts.map +0 -1
  214. package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.js +0 -124
  215. package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.js.map +0 -1
  216. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.d.ts +0 -30
  217. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.d.ts.map +0 -1
  218. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.js +0 -179
  219. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.js.map +0 -1
  220. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.d.ts +0 -21
  221. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.d.ts.map +0 -1
  222. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.js +0 -125
  223. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.js.map +0 -1
  224. package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts +0 -20
  225. package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts.map +0 -1
  226. package/dist/components/primitives/Icons/Building.js +0 -73
  227. package/dist/components/primitives/Icons/Building.js.map +0 -1
  228. package/dist/contexts/Branding/BrandingContext.d.ts +0 -53
  229. package/dist/contexts/Branding/BrandingContext.d.ts.map +0 -1
  230. package/dist/contexts/Branding/BrandingContext.js +0 -10
  231. package/dist/contexts/Branding/BrandingContext.js.map +0 -1
  232. package/dist/contexts/Branding/BrandingProvider.d.ts +0 -89
  233. package/dist/contexts/Branding/BrandingProvider.d.ts.map +0 -1
  234. package/dist/contexts/Branding/BrandingProvider.js +0 -92
  235. package/dist/contexts/Branding/BrandingProvider.js.map +0 -1
  236. package/dist/contexts/Branding/useBrandingContext.d.ts +0 -45
  237. package/dist/contexts/Branding/useBrandingContext.d.ts.map +0 -1
  238. package/dist/contexts/Branding/useBrandingContext.js +0 -38
  239. package/dist/contexts/Branding/useBrandingContext.js.map +0 -1
  240. package/dist/contexts/Organization/OrganizationContext.d.ts +0 -41
  241. package/dist/contexts/Organization/OrganizationContext.d.ts.map +0 -1
  242. package/dist/contexts/Organization/OrganizationContext.js +0 -25
  243. package/dist/contexts/Organization/OrganizationContext.js.map +0 -1
  244. package/dist/contexts/Organization/OrganizationProvider.d.ts +0 -94
  245. package/dist/contexts/Organization/OrganizationProvider.d.ts.map +0 -1
  246. package/dist/contexts/Organization/OrganizationProvider.js +0 -93
  247. package/dist/contexts/Organization/OrganizationProvider.js.map +0 -1
  248. package/dist/contexts/Organization/useOrganization.d.ts +0 -105
  249. package/dist/contexts/Organization/useOrganization.d.ts.map +0 -1
  250. package/dist/contexts/Organization/useOrganization.js +0 -98
  251. package/dist/contexts/Organization/useOrganization.js.map +0 -1
  252. package/dist/hooks/useBranding.d.ts +0 -128
  253. package/dist/hooks/useBranding.d.ts.map +0 -1
  254. package/dist/hooks/useBranding.js +0 -69
  255. package/dist/hooks/useBranding.js.map +0 -1
@@ -1,75 +0,0 @@
1
- import { FetchHttpClient, getMeOrganizations } from "@thunderid/browser";
2
-
3
- //#region src/api/getMeOrganizations.ts
4
- /**
5
- * Retrieves the organizations associated with the current user.
6
- * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.
7
- *
8
- * @param config - Configuration object containing baseUrl, optional query parameters, and request config.
9
- * @returns A promise that resolves with the organizations information.
10
- * @example
11
- * ```typescript
12
- * // Using default ThunderID SPA client httpClient
13
- * try {
14
- * const organizations = await getMeOrganizations({
15
- * baseUrl: "https://localhost:8090",
16
- * after: "",
17
- * before: "",
18
- * filter: "",
19
- * limit: 10,
20
- * recursive: false
21
- * });
22
- * console.log(organizations);
23
- * } catch (error) {
24
- * if (error instanceof ThunderIDAPIError) {
25
- * console.error('Failed to get organizations:', error.message);
26
- * }
27
- * }
28
- * ```
29
- *
30
- * @example
31
- * ```typescript
32
- * // Using custom fetcher
33
- * try {
34
- * const organizations = await getMeOrganizations({
35
- * baseUrl: "https://localhost:8090",
36
- * after: "",
37
- * before: "",
38
- * filter: "",
39
- * limit: 10,
40
- * recursive: false,
41
- * fetcher: customFetchFunction
42
- * });
43
- * console.log(organizations);
44
- * } catch (error) {
45
- * if (error instanceof ThunderIDAPIError) {
46
- * console.error('Failed to get organizations:', error.message);
47
- * }
48
- * }
49
- * ```
50
- */
51
- const getMeOrganizations$1 = async ({ fetcher, instanceId = 0,...requestConfig }) => {
52
- const defaultFetcher = async (url, config) => {
53
- const response = await FetchHttpClient.getInstance(instanceId).request({
54
- headers: config.headers,
55
- method: config.method || "GET",
56
- url
57
- });
58
- return {
59
- json: () => Promise.resolve(response.data),
60
- ok: response.status >= 200 && response.status < 300,
61
- status: response.status,
62
- statusText: response.statusText || "",
63
- text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
64
- };
65
- };
66
- return getMeOrganizations({
67
- ...requestConfig,
68
- fetcher: fetcher || defaultFetcher
69
- });
70
- };
71
- var getMeOrganizations_default = getMeOrganizations$1;
72
-
73
- //#endregion
74
- export { getMeOrganizations_default as default };
75
- //# sourceMappingURL=getMeOrganizations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getMeOrganizations.js","names":["getMeOrganizations","response: HttpResponse<any>","baseGetMeOrganizations"],"sources":["../../src/api/getMeOrganizations.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n Organization,\n HttpResponse,\n FetchHttpClient,\n HttpRequestConfig,\n getMeOrganizations as baseGetMeOrganizations,\n GetMeOrganizationsConfig as BaseGetMeOrganizationsConfig,\n} from '@thunderid/browser';\n\n/**\n * Configuration for the getMeOrganizations request (React-specific)\n */\nexport interface GetMeOrganizationsConfig extends Omit<BaseGetMeOrganizationsConfig, 'fetcher'> {\n /**\n * Optional custom fetcher function. If not provided, the ThunderID SPA client's httpClient will be used\n * which is a wrapper around axios http.request\n */\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n /**\n * Optional instance ID for multi-instance support. Defaults to 0.\n */\n instanceId?: number;\n}\n\n/**\n * Retrieves the organizations associated with the current user.\n * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.\n *\n * @param config - Configuration object containing baseUrl, optional query parameters, and request config.\n * @returns A promise that resolves with the organizations information.\n * @example\n * ```typescript\n * // Using default ThunderID SPA client httpClient\n * try {\n * const organizations = await getMeOrganizations({\n * baseUrl: \"https://localhost:8090\",\n * after: \"\",\n * before: \"\",\n * filter: \"\",\n * limit: 10,\n * recursive: false\n * });\n * console.log(organizations);\n * } catch (error) {\n * if (error instanceof ThunderIDAPIError) {\n * console.error('Failed to get organizations:', error.message);\n * }\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Using custom fetcher\n * try {\n * const organizations = await getMeOrganizations({\n * baseUrl: \"https://localhost:8090\",\n * after: \"\",\n * before: \"\",\n * filter: \"\",\n * limit: 10,\n * recursive: false,\n * fetcher: customFetchFunction\n * });\n * console.log(organizations);\n * } catch (error) {\n * if (error instanceof ThunderIDAPIError) {\n * console.error('Failed to get organizations:', error.message);\n * }\n * }\n * ```\n */\nconst getMeOrganizations = async ({\n fetcher,\n instanceId = 0,\n ...requestConfig\n}: GetMeOrganizationsConfig): Promise<Organization[]> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const httpClient: FetchHttpClient = FetchHttpClient.getInstance(instanceId);\n const response: HttpResponse<any> = await httpClient.request({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetMeOrganizations({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getMeOrganizations;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA,MAAMA,uBAAqB,OAAO,EAChC,SACA,aAAa,EACb,GAAG,oBACoD;CACvD,MAAM,iBAAiB,OAAO,KAAa,WAA2C;EAEpF,MAAMC,WAA8B,MADA,gBAAgB,YAAY,WAAW,CACtB,QAAQ;GAC3D,SAAS,OAAO;GAChB,QAAQ,OAAO,UAAU;GACzB;GACD,CAAsB;AAEvB,SAAO;GACL,YAAY,QAAQ,QAAQ,SAAS,KAAK;GAC1C,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS;GAChD,QAAQ,SAAS;GACjB,YAAY,SAAS,cAAc;GACnC,YAAY,QAAQ,QAAQ,OAAO,SAAS,SAAS,WAAW,SAAS,OAAO,KAAK,UAAU,SAAS,KAAK,CAAC;GAC/G;;AAGH,QAAOC,mBAAuB;EAC5B,GAAG;EACH,SAAS,WAAW;EACrB,CAAC;;AAGJ,iCAAeF"}
@@ -1,74 +0,0 @@
1
- /**
2
- * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
- *
4
- * WSO2 LLC. licenses this file to you under the Apache License,
5
- * Version 2.0 (the "License"); you may not use this file except
6
- * in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing,
12
- * software distributed under the License is distributed on an
13
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- * KIND, either express or implied. See the License for the
15
- * specific language governing permissions and limitations
16
- * under the License.
17
- */
18
- import { GetOrganizationConfig as BaseGetOrganizationConfig, OrganizationDetails } from '@thunderid/browser';
19
- /**
20
- * Configuration for the getOrganization request (React-specific)
21
- */
22
- export interface GetOrganizationConfig extends Omit<BaseGetOrganizationConfig, 'fetcher'> {
23
- /**
24
- * Optional custom fetcher function. If not provided, the ThunderID SPA client's httpClient will be used
25
- * which is a wrapper around axios http.request
26
- */
27
- fetcher?: (url: string, config: RequestInit) => Promise<Response>;
28
- /**
29
- * Optional instance ID for multi-instance support. Defaults to 0.
30
- */
31
- instanceId?: number;
32
- }
33
- /**
34
- * Retrieves detailed information for a specific organization.
35
- * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.
36
- *
37
- * @param config - Configuration object containing baseUrl, organizationId, and request config.
38
- * @returns A promise that resolves with the organization details.
39
- * @example
40
- * ```typescript
41
- * // Using default ThunderID SPA client httpClient
42
- * try {
43
- * const organization = await getOrganization({
44
- * baseUrl: "https://localhost:8090",
45
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1"
46
- * });
47
- * console.log(organization);
48
- * } catch (error) {
49
- * if (error instanceof ThunderIDAPIError) {
50
- * console.error('Failed to get organization:', error.message);
51
- * }
52
- * }
53
- * ```
54
- *
55
- * @example
56
- * ```typescript
57
- * // Using custom fetcher
58
- * try {
59
- * const organization = await getOrganization({
60
- * baseUrl: "https://localhost:8090",
61
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
62
- * fetcher: customFetchFunction
63
- * });
64
- * console.log(organization);
65
- * } catch (error) {
66
- * if (error instanceof ThunderIDAPIError) {
67
- * console.error('Failed to get organization:', error.message);
68
- * }
69
- * }
70
- * ```
71
- */
72
- declare const getOrganization: ({ fetcher, instanceId, ...requestConfig }: GetOrganizationConfig) => Promise<OrganizationDetails>;
73
- export default getOrganization;
74
- //# sourceMappingURL=getOrganization.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getOrganization.d.ts","sourceRoot":"","sources":["../../src/api/getOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAKL,qBAAqB,IAAI,yBAAyB,EAClD,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC;IACvF;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,QAAA,MAAM,eAAe,GAAU,2CAI5B,qBAAqB,KAAG,OAAO,CAAC,mBAAmB,CAsBrD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,67 +0,0 @@
1
- import { FetchHttpClient, getOrganization } from "@thunderid/browser";
2
-
3
- //#region src/api/getOrganization.ts
4
- /**
5
- * Retrieves detailed information for a specific organization.
6
- * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.
7
- *
8
- * @param config - Configuration object containing baseUrl, organizationId, and request config.
9
- * @returns A promise that resolves with the organization details.
10
- * @example
11
- * ```typescript
12
- * // Using default ThunderID SPA client httpClient
13
- * try {
14
- * const organization = await getOrganization({
15
- * baseUrl: "https://localhost:8090",
16
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1"
17
- * });
18
- * console.log(organization);
19
- * } catch (error) {
20
- * if (error instanceof ThunderIDAPIError) {
21
- * console.error('Failed to get organization:', error.message);
22
- * }
23
- * }
24
- * ```
25
- *
26
- * @example
27
- * ```typescript
28
- * // Using custom fetcher
29
- * try {
30
- * const organization = await getOrganization({
31
- * baseUrl: "https://localhost:8090",
32
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
33
- * fetcher: customFetchFunction
34
- * });
35
- * console.log(organization);
36
- * } catch (error) {
37
- * if (error instanceof ThunderIDAPIError) {
38
- * console.error('Failed to get organization:', error.message);
39
- * }
40
- * }
41
- * ```
42
- */
43
- const getOrganization$1 = async ({ fetcher, instanceId = 0,...requestConfig }) => {
44
- const defaultFetcher = async (url, config) => {
45
- const response = await FetchHttpClient.getInstance(instanceId).request({
46
- headers: config.headers,
47
- method: config.method || "GET",
48
- url
49
- });
50
- return {
51
- json: () => Promise.resolve(response.data),
52
- ok: response.status >= 200 && response.status < 300,
53
- status: response.status,
54
- statusText: response.statusText || "",
55
- text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
56
- };
57
- };
58
- return getOrganization({
59
- ...requestConfig,
60
- fetcher: fetcher || defaultFetcher
61
- });
62
- };
63
- var getOrganization_default = getOrganization$1;
64
-
65
- //#endregion
66
- export { getOrganization_default as default };
67
- //# sourceMappingURL=getOrganization.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getOrganization.js","names":["getOrganization","response: HttpResponse<any>","baseGetOrganization"],"sources":["../../src/api/getOrganization.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n HttpResponse,\n FetchHttpClient,\n HttpRequestConfig,\n getOrganization as baseGetOrganization,\n GetOrganizationConfig as BaseGetOrganizationConfig,\n OrganizationDetails,\n} from '@thunderid/browser';\n\n/**\n * Configuration for the getOrganization request (React-specific)\n */\nexport interface GetOrganizationConfig extends Omit<BaseGetOrganizationConfig, 'fetcher'> {\n /**\n * Optional custom fetcher function. If not provided, the ThunderID SPA client's httpClient will be used\n * which is a wrapper around axios http.request\n */\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n /**\n * Optional instance ID for multi-instance support. Defaults to 0.\n */\n instanceId?: number;\n}\n\n/**\n * Retrieves detailed information for a specific organization.\n * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.\n *\n * @param config - Configuration object containing baseUrl, organizationId, and request config.\n * @returns A promise that resolves with the organization details.\n * @example\n * ```typescript\n * // Using default ThunderID SPA client httpClient\n * try {\n * const organization = await getOrganization({\n * baseUrl: \"https://localhost:8090\",\n * organizationId: \"0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1\"\n * });\n * console.log(organization);\n * } catch (error) {\n * if (error instanceof ThunderIDAPIError) {\n * console.error('Failed to get organization:', error.message);\n * }\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Using custom fetcher\n * try {\n * const organization = await getOrganization({\n * baseUrl: \"https://localhost:8090\",\n * organizationId: \"0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1\",\n * fetcher: customFetchFunction\n * });\n * console.log(organization);\n * } catch (error) {\n * if (error instanceof ThunderIDAPIError) {\n * console.error('Failed to get organization:', error.message);\n * }\n * }\n * ```\n */\nconst getOrganization = async ({\n fetcher,\n instanceId = 0,\n ...requestConfig\n}: GetOrganizationConfig): Promise<OrganizationDetails> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const httpClient: FetchHttpClient = FetchHttpClient.getInstance(instanceId);\n const response: HttpResponse<any> = await httpClient.request({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetOrganization({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getOrganization;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFA,MAAMA,oBAAkB,OAAO,EAC7B,SACA,aAAa,EACb,GAAG,oBACsD;CACzD,MAAM,iBAAiB,OAAO,KAAa,WAA2C;EAEpF,MAAMC,WAA8B,MADA,gBAAgB,YAAY,WAAW,CACtB,QAAQ;GAC3D,SAAS,OAAO;GAChB,QAAQ,OAAO,UAAU;GACzB;GACD,CAAsB;AAEvB,SAAO;GACL,YAAY,QAAQ,QAAQ,SAAS,KAAK;GAC1C,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS;GAChD,QAAQ,SAAS;GACjB,YAAY,SAAS,cAAc;GACnC,YAAY,QAAQ,QAAQ,OAAO,SAAS,SAAS,WAAW,SAAS,OAAO,KAAK,UAAU,SAAS,KAAK,CAAC;GAC/G;;AAGH,QAAOC,gBAAoB;EACzB,GAAG;EACH,SAAS,WAAW;EACrB,CAAC;;AAGJ,8BAAeF"}
@@ -1,72 +0,0 @@
1
- /**
2
- * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
- *
4
- * WSO2 LLC. licenses this file to you under the Apache License,
5
- * Version 2.0 (the "License"); you may not use this file except
6
- * in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing,
12
- * software distributed under the License is distributed on an
13
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- * KIND, either express or implied. See the License for the
15
- * specific language governing permissions and limitations
16
- * under the License.
17
- */
18
- import { Schema, GetSchemasConfig as BaseGetSchemasConfig } from '@thunderid/browser';
19
- /**
20
- * Configuration for the getSchemas request (React-specific)
21
- */
22
- export interface GetSchemasConfig extends Omit<BaseGetSchemasConfig, 'fetcher'> {
23
- /**
24
- * Optional custom fetcher function. If not provided, the ThunderID SPA client's httpClient will be used
25
- * which is a wrapper around axios http.request
26
- */
27
- fetcher?: (url: string, config: RequestInit) => Promise<Response>;
28
- /**
29
- * Optional instance ID for multi-instance support. Defaults to 0.
30
- */
31
- instanceId?: number;
32
- }
33
- /**
34
- * Retrieves the SCIM2 schemas from the specified endpoint.
35
- * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.
36
- *
37
- * @param config - Request configuration object.
38
- * @returns A promise that resolves with the SCIM2 schemas information.
39
- * @example
40
- * ```typescript
41
- * // Using default ThunderID SPA client httpClient
42
- * try {
43
- * const schemas = await getSchemas({
44
- * url: "https://localhost:8090/scim2/Schemas",
45
- * });
46
- * console.log(schemas);
47
- * } catch (error) {
48
- * if (error instanceof ThunderIDAPIError) {
49
- * console.error('Failed to get schemas:', error.message);
50
- * }
51
- * }
52
- * ```
53
- *
54
- * @example
55
- * ```typescript
56
- * // Using custom fetcher
57
- * try {
58
- * const schemas = await getSchemas({
59
- * url: "https://localhost:8090/scim2/Schemas",
60
- * fetcher: customFetchFunction
61
- * });
62
- * console.log(schemas);
63
- * } catch (error) {
64
- * if (error instanceof ThunderIDAPIError) {
65
- * console.error('Failed to get schemas:', error.message);
66
- * }
67
- * }
68
- * ```
69
- */
70
- declare const getSchemas: ({ fetcher, instanceId, ...requestConfig }: GetSchemasConfig) => Promise<Schema[]>;
71
- export default getSchemas;
72
- //# sourceMappingURL=getSchemas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getSchemas.d.ts","sourceRoot":"","sources":["../../src/api/getSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,MAAM,EAKN,gBAAgB,IAAI,oBAAoB,EACzC,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAC7E;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,QAAA,MAAM,UAAU,GAAU,2CAA6C,gBAAgB,KAAG,OAAO,CAAC,MAAM,EAAE,CAsBzG,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,65 +0,0 @@
1
- import { FetchHttpClient, getSchemas } from "@thunderid/browser";
2
-
3
- //#region src/api/getSchemas.ts
4
- /**
5
- * Retrieves the SCIM2 schemas from the specified endpoint.
6
- * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.
7
- *
8
- * @param config - Request configuration object.
9
- * @returns A promise that resolves with the SCIM2 schemas information.
10
- * @example
11
- * ```typescript
12
- * // Using default ThunderID SPA client httpClient
13
- * try {
14
- * const schemas = await getSchemas({
15
- * url: "https://localhost:8090/scim2/Schemas",
16
- * });
17
- * console.log(schemas);
18
- * } catch (error) {
19
- * if (error instanceof ThunderIDAPIError) {
20
- * console.error('Failed to get schemas:', error.message);
21
- * }
22
- * }
23
- * ```
24
- *
25
- * @example
26
- * ```typescript
27
- * // Using custom fetcher
28
- * try {
29
- * const schemas = await getSchemas({
30
- * url: "https://localhost:8090/scim2/Schemas",
31
- * fetcher: customFetchFunction
32
- * });
33
- * console.log(schemas);
34
- * } catch (error) {
35
- * if (error instanceof ThunderIDAPIError) {
36
- * console.error('Failed to get schemas:', error.message);
37
- * }
38
- * }
39
- * ```
40
- */
41
- const getSchemas$1 = async ({ fetcher, instanceId = 0,...requestConfig }) => {
42
- const defaultFetcher = async (url, config) => {
43
- const response = await FetchHttpClient.getInstance(instanceId).request({
44
- headers: config.headers,
45
- method: config.method || "GET",
46
- url
47
- });
48
- return {
49
- json: () => Promise.resolve(response.data),
50
- ok: response.status >= 200 && response.status < 300,
51
- status: response.status,
52
- statusText: response.statusText || "",
53
- text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
54
- };
55
- };
56
- return getSchemas({
57
- ...requestConfig,
58
- fetcher: fetcher || defaultFetcher
59
- });
60
- };
61
- var getSchemas_default = getSchemas$1;
62
-
63
- //#endregion
64
- export { getSchemas_default as default };
65
- //# sourceMappingURL=getSchemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getSchemas.js","names":["getSchemas","response: HttpResponse<any>","baseGetSchemas"],"sources":["../../src/api/getSchemas.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n Schema,\n HttpResponse,\n FetchHttpClient,\n HttpRequestConfig,\n getSchemas as baseGetSchemas,\n GetSchemasConfig as BaseGetSchemasConfig,\n} from '@thunderid/browser';\n\n/**\n * Configuration for the getSchemas request (React-specific)\n */\nexport interface GetSchemasConfig extends Omit<BaseGetSchemasConfig, 'fetcher'> {\n /**\n * Optional custom fetcher function. If not provided, the ThunderID SPA client's httpClient will be used\n * which is a wrapper around axios http.request\n */\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n /**\n * Optional instance ID for multi-instance support. Defaults to 0.\n */\n instanceId?: number;\n}\n\n/**\n * Retrieves the SCIM2 schemas from the specified endpoint.\n * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.\n *\n * @param config - Request configuration object.\n * @returns A promise that resolves with the SCIM2 schemas information.\n * @example\n * ```typescript\n * // Using default ThunderID SPA client httpClient\n * try {\n * const schemas = await getSchemas({\n * url: \"https://localhost:8090/scim2/Schemas\",\n * });\n * console.log(schemas);\n * } catch (error) {\n * if (error instanceof ThunderIDAPIError) {\n * console.error('Failed to get schemas:', error.message);\n * }\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Using custom fetcher\n * try {\n * const schemas = await getSchemas({\n * url: \"https://localhost:8090/scim2/Schemas\",\n * fetcher: customFetchFunction\n * });\n * console.log(schemas);\n * } catch (error) {\n * if (error instanceof ThunderIDAPIError) {\n * console.error('Failed to get schemas:', error.message);\n * }\n * }\n * ```\n */\nconst getSchemas = async ({fetcher, instanceId = 0, ...requestConfig}: GetSchemasConfig): Promise<Schema[]> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const httpClient: FetchHttpClient = FetchHttpClient.getInstance(instanceId);\n const response: HttpResponse<any> = await httpClient.request({\n headers: config.headers as Record<string, string>,\n method: config.method || 'GET',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseGetSchemas({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\nexport default getSchemas;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA,MAAMA,eAAa,OAAO,EAAC,SAAS,aAAa,EAAG,GAAG,oBAAwD;CAC7G,MAAM,iBAAiB,OAAO,KAAa,WAA2C;EAEpF,MAAMC,WAA8B,MADA,gBAAgB,YAAY,WAAW,CACtB,QAAQ;GAC3D,SAAS,OAAO;GAChB,QAAQ,OAAO,UAAU;GACzB;GACD,CAAsB;AAEvB,SAAO;GACL,YAAY,QAAQ,QAAQ,SAAS,KAAK;GAC1C,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS;GAChD,QAAQ,SAAS;GACjB,YAAY,SAAS,cAAc;GACnC,YAAY,QAAQ,QAAQ,OAAO,SAAS,SAAS,WAAW,SAAS,OAAO,KAAK,UAAU,SAAS,KAAK,CAAC;GAC/G;;AAGH,QAAOC,WAAe;EACpB,GAAG;EACH,SAAS,WAAW;EACrB,CAAC;;AAGJ,yBAAeF"}
@@ -1,81 +0,0 @@
1
- /**
2
- * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
- *
4
- * WSO2 LLC. licenses this file to you under the Apache License,
5
- * Version 2.0 (the "License"); you may not use this file except
6
- * in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing,
12
- * software distributed under the License is distributed on an
13
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- * KIND, either express or implied. See the License for the
15
- * specific language governing permissions and limitations
16
- * under the License.
17
- */
18
- import { UpdateOrganizationConfig as BaseUpdateOrganizationConfig, OrganizationDetails, createPatchOperations } from '@thunderid/browser';
19
- /**
20
- * Configuration for the updateOrganization request (React-specific)
21
- */
22
- export interface UpdateOrganizationConfig extends Omit<BaseUpdateOrganizationConfig, 'fetcher'> {
23
- /**
24
- * Optional custom fetcher function. If not provided, the ThunderID SPA client's httpClient will be used
25
- * which is a wrapper around axios http.request
26
- */
27
- fetcher?: (url: string, config: RequestInit) => Promise<Response>;
28
- /**
29
- * Optional instance ID for multi-instance support. Defaults to 0.
30
- */
31
- instanceId?: number;
32
- }
33
- /**
34
- * Updates the organization information using the Organizations Management API.
35
- * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.
36
- *
37
- * @param config - Configuration object with baseUrl, organizationId, operations and optional request config.
38
- * @returns A promise that resolves with the updated organization information.
39
- * @example
40
- * ```typescript
41
- * // Using the helper function to create operations automatically
42
- * const operations = createPatchOperations({
43
- * name: "Updated Organization Name", // Will use REPLACE
44
- * description: "", // Will use REMOVE (empty string)
45
- * customField: "Some value" // Will use REPLACE
46
- * });
47
- *
48
- * await updateOrganization({
49
- * baseUrl: "https://localhost:8090",
50
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
51
- * operations
52
- * });
53
- *
54
- * // Or manually specify operations
55
- * await updateOrganization({
56
- * baseUrl: "https://localhost:8090",
57
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
58
- * operations: [
59
- * { operation: "REPLACE", path: "/name", value: "Updated Organization Name" },
60
- * { operation: "REMOVE", path: "/description" }
61
- * ]
62
- * });
63
- * ```
64
- *
65
- * @example
66
- * ```typescript
67
- * // Using custom fetcher
68
- * await updateOrganization({
69
- * baseUrl: "https://localhost:8090",
70
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
71
- * operations: [
72
- * { operation: "REPLACE", path: "/name", value: "Updated Organization Name" }
73
- * ],
74
- * fetcher: customFetchFunction
75
- * });
76
- * ```
77
- */
78
- declare const updateOrganization: ({ fetcher, instanceId, ...requestConfig }: UpdateOrganizationConfig) => Promise<OrganizationDetails>;
79
- export { createPatchOperations };
80
- export default updateOrganization;
81
- //# sourceMappingURL=updateOrganization.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateOrganization.d.ts","sourceRoot":"","sources":["../../src/api/updateOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAKL,wBAAwB,IAAI,4BAA4B,EACxD,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,4BAA4B,EAAE,SAAS,CAAC;IAC7F;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,QAAA,MAAM,kBAAkB,GAAU,2CAI/B,wBAAwB,KAAG,OAAO,CAAC,mBAAmB,CAuBxD,CAAC;AAGF,OAAO,EAAC,qBAAqB,EAAC,CAAC;AAE/B,eAAe,kBAAkB,CAAC"}
@@ -1,74 +0,0 @@
1
- import { FetchHttpClient, createPatchOperations, updateOrganization } from "@thunderid/browser";
2
-
3
- //#region src/api/updateOrganization.ts
4
- /**
5
- * Updates the organization information using the Organizations Management API.
6
- * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.
7
- *
8
- * @param config - Configuration object with baseUrl, organizationId, operations and optional request config.
9
- * @returns A promise that resolves with the updated organization information.
10
- * @example
11
- * ```typescript
12
- * // Using the helper function to create operations automatically
13
- * const operations = createPatchOperations({
14
- * name: "Updated Organization Name", // Will use REPLACE
15
- * description: "", // Will use REMOVE (empty string)
16
- * customField: "Some value" // Will use REPLACE
17
- * });
18
- *
19
- * await updateOrganization({
20
- * baseUrl: "https://localhost:8090",
21
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
22
- * operations
23
- * });
24
- *
25
- * // Or manually specify operations
26
- * await updateOrganization({
27
- * baseUrl: "https://localhost:8090",
28
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
29
- * operations: [
30
- * { operation: "REPLACE", path: "/name", value: "Updated Organization Name" },
31
- * { operation: "REMOVE", path: "/description" }
32
- * ]
33
- * });
34
- * ```
35
- *
36
- * @example
37
- * ```typescript
38
- * // Using custom fetcher
39
- * await updateOrganization({
40
- * baseUrl: "https://localhost:8090",
41
- * organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
42
- * operations: [
43
- * { operation: "REPLACE", path: "/name", value: "Updated Organization Name" }
44
- * ],
45
- * fetcher: customFetchFunction
46
- * });
47
- * ```
48
- */
49
- const updateOrganization$1 = async ({ fetcher, instanceId = 0,...requestConfig }) => {
50
- const defaultFetcher = async (url, config) => {
51
- const response = await FetchHttpClient.getInstance(instanceId).request({
52
- data: config.body ? JSON.parse(config.body) : void 0,
53
- headers: config.headers,
54
- method: config.method || "PATCH",
55
- url
56
- });
57
- return {
58
- json: () => Promise.resolve(response.data),
59
- ok: response.status >= 200 && response.status < 300,
60
- status: response.status,
61
- statusText: response.statusText || "",
62
- text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
63
- };
64
- };
65
- return updateOrganization({
66
- ...requestConfig,
67
- fetcher: fetcher || defaultFetcher
68
- });
69
- };
70
- var updateOrganization_default = updateOrganization$1;
71
-
72
- //#endregion
73
- export { createPatchOperations, updateOrganization_default as default };
74
- //# sourceMappingURL=updateOrganization.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateOrganization.js","names":["updateOrganization","response: HttpResponse<any>","baseUpdateOrganization"],"sources":["../../src/api/updateOrganization.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n HttpResponse,\n FetchHttpClient,\n HttpRequestConfig,\n updateOrganization as baseUpdateOrganization,\n UpdateOrganizationConfig as BaseUpdateOrganizationConfig,\n OrganizationDetails,\n createPatchOperations,\n} from '@thunderid/browser';\n\n/**\n * Configuration for the updateOrganization request (React-specific)\n */\nexport interface UpdateOrganizationConfig extends Omit<BaseUpdateOrganizationConfig, 'fetcher'> {\n /**\n * Optional custom fetcher function. If not provided, the ThunderID SPA client's httpClient will be used\n * which is a wrapper around axios http.request\n */\n fetcher?: (url: string, config: RequestInit) => Promise<Response>;\n /**\n * Optional instance ID for multi-instance support. Defaults to 0.\n */\n instanceId?: number;\n}\n\n/**\n * Updates the organization information using the Organizations Management API.\n * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.\n *\n * @param config - Configuration object with baseUrl, organizationId, operations and optional request config.\n * @returns A promise that resolves with the updated organization information.\n * @example\n * ```typescript\n * // Using the helper function to create operations automatically\n * const operations = createPatchOperations({\n * name: \"Updated Organization Name\", // Will use REPLACE\n * description: \"\", // Will use REMOVE (empty string)\n * customField: \"Some value\" // Will use REPLACE\n * });\n *\n * await updateOrganization({\n * baseUrl: \"https://localhost:8090\",\n * organizationId: \"0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1\",\n * operations\n * });\n *\n * // Or manually specify operations\n * await updateOrganization({\n * baseUrl: \"https://localhost:8090\",\n * organizationId: \"0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1\",\n * operations: [\n * { operation: \"REPLACE\", path: \"/name\", value: \"Updated Organization Name\" },\n * { operation: \"REMOVE\", path: \"/description\" }\n * ]\n * });\n * ```\n *\n * @example\n * ```typescript\n * // Using custom fetcher\n * await updateOrganization({\n * baseUrl: \"https://localhost:8090\",\n * organizationId: \"0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1\",\n * operations: [\n * { operation: \"REPLACE\", path: \"/name\", value: \"Updated Organization Name\" }\n * ],\n * fetcher: customFetchFunction\n * });\n * ```\n */\nconst updateOrganization = async ({\n fetcher,\n instanceId = 0,\n ...requestConfig\n}: UpdateOrganizationConfig): Promise<OrganizationDetails> => {\n const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {\n const httpClient: FetchHttpClient = FetchHttpClient.getInstance(instanceId);\n const response: HttpResponse<any> = await httpClient.request({\n data: config.body ? JSON.parse(config.body as string) : undefined,\n headers: config.headers as Record<string, string>,\n method: config.method || 'PATCH',\n url,\n } as HttpRequestConfig);\n\n return {\n json: () => Promise.resolve(response.data),\n ok: response.status >= 200 && response.status < 300,\n status: response.status,\n statusText: response.statusText || '',\n text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data)),\n } as Response;\n };\n\n return baseUpdateOrganization({\n ...requestConfig,\n fetcher: fetcher || defaultFetcher,\n });\n};\n\n// Re-export the helper function\nexport {createPatchOperations};\n\nexport default updateOrganization;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,MAAMA,uBAAqB,OAAO,EAChC,SACA,aAAa,EACb,GAAG,oBACyD;CAC5D,MAAM,iBAAiB,OAAO,KAAa,WAA2C;EAEpF,MAAMC,WAA8B,MADA,gBAAgB,YAAY,WAAW,CACtB,QAAQ;GAC3D,MAAM,OAAO,OAAO,KAAK,MAAM,OAAO,KAAe,GAAG;GACxD,SAAS,OAAO;GAChB,QAAQ,OAAO,UAAU;GACzB;GACD,CAAsB;AAEvB,SAAO;GACL,YAAY,QAAQ,QAAQ,SAAS,KAAK;GAC1C,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS;GAChD,QAAQ,SAAS;GACjB,YAAY,SAAS,cAAc;GACnC,YAAY,QAAQ,QAAQ,OAAO,SAAS,SAAS,WAAW,SAAS,OAAO,KAAK,UAAU,SAAS,KAAK,CAAC;GAC/G;;AAGH,QAAOC,mBAAuB;EAC5B,GAAG;EACH,SAAS,WAAW;EACrB,CAAC;;AAMJ,iCAAeF"}
@@ -1,82 +0,0 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __thunderid_browser = require("@thunderid/browser");
3
- __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
4
-
5
- //#region src/api/createOrganization.ts
6
- /**
7
- * Creates a new organization.
8
- * This function uses the ThunderID SPA client's httpClient by default, but allows for custom fetchers.
9
- *
10
- * @param config - Configuration object containing baseUrl, payload and optional request config.
11
- * @returns A promise that resolves with the created organization information.
12
- * @example
13
- * ```typescript
14
- * // Using default ThunderID SPA client httpClient
15
- * try {
16
- * const organization = await createOrganization({
17
- * baseUrl: "https://localhost:8090",
18
- * payload: {
19
- * description: "Share your screens",
20
- * name: "Team Viewer",
21
- * orgHandle: "team-viewer",
22
- * parentId: "f4825104-4948-40d9-ab65-a960eee3e3d5",
23
- * type: "TENANT"
24
- * }
25
- * });
26
- * console.log(organization);
27
- * } catch (error) {
28
- * if (error instanceof ThunderIDAPIError) {
29
- * console.error('Failed to create organization:', error.message);
30
- * }
31
- * }
32
- * ```
33
- *
34
- * @example
35
- * ```typescript
36
- * // Using custom fetcher
37
- * try {
38
- * const organization = await createOrganization({
39
- * baseUrl: "https://localhost:8090",
40
- * payload: {
41
- * description: "Share your screens",
42
- * name: "Team Viewer",
43
- * orgHandle: "team-viewer",
44
- * parentId: "f4825104-4948-40d9-ab65-a960eee3e3d5",
45
- * type: "TENANT"
46
- * },
47
- * fetcher: customFetchFunction
48
- * });
49
- * console.log(organization);
50
- * } catch (error) {
51
- * if (error instanceof ThunderIDAPIError) {
52
- * console.error('Failed to create organization:', error.message);
53
- * }
54
- * }
55
- * ```
56
- */
57
- const createOrganization = async ({ fetcher, instanceId = 0,...requestConfig }) => {
58
- const defaultFetcher = async (url, config) => {
59
- const response = await __thunderid_browser.FetchHttpClient.getInstance(instanceId).request({
60
- data: config.body ? JSON.parse(config.body) : void 0,
61
- headers: config.headers,
62
- method: config.method || "POST",
63
- url
64
- });
65
- return {
66
- json: () => Promise.resolve(response.data),
67
- ok: response.status >= 200 && response.status < 300,
68
- status: response.status,
69
- statusText: response.statusText || "",
70
- text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
71
- };
72
- };
73
- return (0, __thunderid_browser.createOrganization)({
74
- ...requestConfig,
75
- fetcher: fetcher || defaultFetcher
76
- });
77
- };
78
- var createOrganization_default = createOrganization;
79
-
80
- //#endregion
81
- exports.default = createOrganization_default;
82
- //# sourceMappingURL=createOrganization.cjs.map