@authticon/client 0.0.0-beta4 → 0.0.0-beta41

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 (248) hide show
  1. package/README.md +375 -0
  2. package/dist/CookieStorageAdapter.d.ts +15 -0
  3. package/dist/CookieStorageAdapter.d.ts.map +1 -0
  4. package/dist/CookieStorageAdapter.js +60 -0
  5. package/dist/CookieStorageAdapter.js.map +1 -0
  6. package/dist/InMemoryCacheAdapter.d.ts +3 -0
  7. package/dist/InMemoryCacheAdapter.d.ts.map +1 -0
  8. package/dist/InMemoryCacheAdapter.js +13 -0
  9. package/dist/InMemoryCacheAdapter.js.map +1 -0
  10. package/dist/TokenStorage.d.ts +14 -10
  11. package/dist/TokenStorage.d.ts.map +1 -1
  12. package/dist/TokenStorage.js +92 -59
  13. package/dist/TokenStorage.js.map +1 -1
  14. package/dist/TokenVerifier.d.ts +6 -11
  15. package/dist/TokenVerifier.d.ts.map +1 -1
  16. package/dist/TokenVerifier.js +48 -34
  17. package/dist/TokenVerifier.js.map +1 -1
  18. package/dist/admin.d.ts +2 -0
  19. package/dist/admin.d.ts.map +1 -0
  20. package/dist/admin.js +2 -0
  21. package/dist/admin.js.map +1 -0
  22. package/dist/adminClient.d.ts +104 -0
  23. package/dist/adminClient.d.ts.map +1 -0
  24. package/dist/adminClient.js +108 -0
  25. package/dist/adminClient.js.map +1 -0
  26. package/dist/apiClient.d.ts +8 -0
  27. package/dist/apiClient.d.ts.map +1 -0
  28. package/dist/apiClient.js +18 -0
  29. package/dist/apiClient.js.map +1 -0
  30. package/dist/authClient.d.ts +42 -0
  31. package/dist/authClient.d.ts.map +1 -0
  32. package/dist/authClient.js +75 -0
  33. package/dist/authClient.js.map +1 -0
  34. package/dist/authticon.d.ts +131 -0
  35. package/dist/authticon.d.ts.map +1 -0
  36. package/dist/authticon.js +24 -0
  37. package/dist/authticon.js.map +1 -0
  38. package/dist/browser.d.ts +134 -0
  39. package/dist/browser.d.ts.map +1 -0
  40. package/dist/browser.js +7 -0
  41. package/dist/browser.js.map +1 -0
  42. package/dist/clients/admin.d.ts +106 -0
  43. package/dist/clients/admin.d.ts.map +1 -0
  44. package/dist/clients/admin.js +126 -0
  45. package/dist/clients/admin.js.map +1 -0
  46. package/dist/clients/auth.d.ts +42 -0
  47. package/dist/clients/auth.d.ts.map +1 -0
  48. package/dist/clients/auth.js +74 -0
  49. package/dist/clients/auth.js.map +1 -0
  50. package/dist/clients/base.d.ts +8 -0
  51. package/dist/clients/base.d.ts.map +1 -0
  52. package/dist/clients/base.js +18 -0
  53. package/dist/clients/base.js.map +1 -0
  54. package/dist/clients/generated/client/client.gen.d.ts +3 -0
  55. package/dist/clients/generated/client/client.gen.d.ts.map +1 -0
  56. package/dist/clients/generated/client/client.gen.js +236 -0
  57. package/dist/clients/generated/client/client.gen.js.map +1 -0
  58. package/dist/clients/generated/client/index.d.ts +9 -0
  59. package/dist/clients/generated/client/index.d.ts.map +1 -0
  60. package/dist/clients/generated/client/index.js +7 -0
  61. package/dist/clients/generated/client/index.js.map +1 -0
  62. package/dist/clients/generated/client/types.gen.d.ts +118 -0
  63. package/dist/clients/generated/client/types.gen.d.ts.map +1 -0
  64. package/dist/clients/generated/client/types.gen.js +3 -0
  65. package/dist/clients/generated/client/types.gen.js.map +1 -0
  66. package/dist/clients/generated/client/utils.gen.d.ts +34 -0
  67. package/dist/clients/generated/client/utils.gen.d.ts.map +1 -0
  68. package/dist/clients/generated/client/utils.gen.js +229 -0
  69. package/dist/clients/generated/client/utils.gen.js.map +1 -0
  70. package/dist/clients/generated/client.gen.d.ts +13 -0
  71. package/dist/clients/generated/client.gen.d.ts.map +1 -0
  72. package/dist/clients/generated/client.gen.js +4 -0
  73. package/dist/clients/generated/client.gen.js.map +1 -0
  74. package/dist/clients/generated/core/auth.gen.d.ts +19 -0
  75. package/dist/clients/generated/core/auth.gen.d.ts.map +1 -0
  76. package/dist/clients/generated/core/auth.gen.js +15 -0
  77. package/dist/clients/generated/core/auth.gen.js.map +1 -0
  78. package/dist/clients/generated/core/bodySerializer.gen.d.ts +26 -0
  79. package/dist/clients/generated/core/bodySerializer.gen.d.ts.map +1 -0
  80. package/dist/clients/generated/core/bodySerializer.gen.js +58 -0
  81. package/dist/clients/generated/core/bodySerializer.gen.js.map +1 -0
  82. package/dist/clients/generated/core/params.gen.d.ts +44 -0
  83. package/dist/clients/generated/core/params.gen.d.ts.map +1 -0
  84. package/dist/clients/generated/core/params.gen.js +101 -0
  85. package/dist/clients/generated/core/params.gen.js.map +1 -0
  86. package/dist/clients/generated/core/pathSerializer.gen.d.ts +34 -0
  87. package/dist/clients/generated/core/pathSerializer.gen.d.ts.map +1 -0
  88. package/dist/clients/generated/core/pathSerializer.gen.js +107 -0
  89. package/dist/clients/generated/core/pathSerializer.gen.js.map +1 -0
  90. package/dist/clients/generated/core/queryKeySerializer.gen.d.ts +19 -0
  91. package/dist/clients/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
  92. package/dist/clients/generated/core/queryKeySerializer.gen.js +93 -0
  93. package/dist/clients/generated/core/queryKeySerializer.gen.js.map +1 -0
  94. package/dist/clients/generated/core/serverSentEvents.gen.d.ts +72 -0
  95. package/dist/clients/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  96. package/dist/clients/generated/core/serverSentEvents.gen.js +134 -0
  97. package/dist/clients/generated/core/serverSentEvents.gen.js.map +1 -0
  98. package/dist/clients/generated/core/types.gen.d.ts +79 -0
  99. package/dist/clients/generated/core/types.gen.d.ts.map +1 -0
  100. package/dist/clients/generated/core/types.gen.js +3 -0
  101. package/dist/clients/generated/core/types.gen.js.map +1 -0
  102. package/dist/clients/generated/core/utils.gen.d.ts +20 -0
  103. package/dist/clients/generated/core/utils.gen.d.ts.map +1 -0
  104. package/dist/clients/generated/core/utils.gen.js +88 -0
  105. package/dist/clients/generated/core/utils.gen.js.map +1 -0
  106. package/dist/clients/generated/index.d.ts +3 -0
  107. package/dist/clients/generated/index.d.ts.map +1 -0
  108. package/dist/clients/generated/index.js +3 -0
  109. package/dist/clients/generated/index.js.map +1 -0
  110. package/dist/clients/generated/sdk.gen.d.ts +168 -0
  111. package/dist/clients/generated/sdk.gen.d.ts.map +1 -0
  112. package/dist/clients/generated/sdk.gen.js +427 -0
  113. package/dist/clients/generated/sdk.gen.js.map +1 -0
  114. package/dist/clients/generated/types.gen.d.ts +1261 -0
  115. package/dist/clients/generated/types.gen.d.ts.map +1 -0
  116. package/dist/clients/generated/types.gen.js +3 -0
  117. package/dist/clients/generated/types.gen.js.map +1 -0
  118. package/dist/clients/user.d.ts +67 -0
  119. package/dist/clients/user.d.ts.map +1 -0
  120. package/dist/clients/user.js +72 -0
  121. package/dist/clients/user.js.map +1 -0
  122. package/dist/cookies/browser.d.ts +3 -0
  123. package/dist/cookies/browser.d.ts.map +1 -0
  124. package/dist/cookies/browser.js +31 -0
  125. package/dist/cookies/browser.js.map +1 -0
  126. package/dist/cookies/node.d.ts +8 -0
  127. package/dist/cookies/node.d.ts.map +1 -0
  128. package/dist/cookies/node.js +49 -0
  129. package/dist/cookies/node.js.map +1 -0
  130. package/dist/createSessionUser.d.ts +3 -0
  131. package/dist/createSessionUser.d.ts.map +1 -0
  132. package/dist/createSessionUser.js +15 -0
  133. package/dist/createSessionUser.js.map +1 -0
  134. package/dist/errors.d.ts +22 -0
  135. package/dist/errors.d.ts.map +1 -0
  136. package/dist/errors.js +40 -0
  137. package/dist/errors.js.map +1 -0
  138. package/dist/generated/client/client.gen.d.ts.map +1 -1
  139. package/dist/generated/client/client.gen.js +151 -50
  140. package/dist/generated/client/client.gen.js.map +1 -1
  141. package/dist/generated/client/index.d.ts +2 -2
  142. package/dist/generated/client/index.d.ts.map +1 -1
  143. package/dist/generated/client/index.js +1 -1
  144. package/dist/generated/client/index.js.map +1 -1
  145. package/dist/generated/client/types.gen.d.ts +53 -24
  146. package/dist/generated/client/types.gen.d.ts.map +1 -1
  147. package/dist/generated/client/utils.gen.d.ts +25 -6
  148. package/dist/generated/client/utils.gen.d.ts.map +1 -1
  149. package/dist/generated/client/utils.gen.js +117 -57
  150. package/dist/generated/client/utils.gen.js.map +1 -1
  151. package/dist/generated/client.gen.js +1 -1
  152. package/dist/generated/index.d.ts +2 -2
  153. package/dist/generated/index.d.ts.map +1 -1
  154. package/dist/generated/index.js +1 -1
  155. package/dist/generated/index.js.map +1 -1
  156. package/dist/generated/sdk.gen.d.ts +153 -52
  157. package/dist/generated/sdk.gen.d.ts.map +1 -1
  158. package/dist/generated/sdk.gen.js +234 -209
  159. package/dist/generated/sdk.gen.js.map +1 -1
  160. package/dist/generated/types.gen.d.ts +557 -971
  161. package/dist/generated/types.gen.d.ts.map +1 -1
  162. package/dist/index.d.ts +2 -6
  163. package/dist/index.d.ts.map +1 -1
  164. package/dist/index.js +2 -6
  165. package/dist/index.js.map +1 -1
  166. package/dist/node.d.ts +171 -0
  167. package/dist/node.d.ts.map +1 -0
  168. package/dist/node.js +46 -0
  169. package/dist/node.js.map +1 -0
  170. package/dist/session.d.ts +100 -0
  171. package/dist/session.d.ts.map +1 -0
  172. package/dist/session.js +203 -0
  173. package/dist/session.js.map +1 -0
  174. package/dist/sessionClient.d.ts +53 -0
  175. package/dist/sessionClient.d.ts.map +1 -0
  176. package/dist/sessionClient.js +267 -0
  177. package/dist/sessionClient.js.map +1 -0
  178. package/dist/tokens.d.ts +27 -0
  179. package/dist/tokens.d.ts.map +1 -0
  180. package/dist/tokens.js +212 -0
  181. package/dist/tokens.js.map +1 -0
  182. package/dist/types.d.ts +47 -8
  183. package/dist/types.d.ts.map +1 -1
  184. package/dist/userClient.d.ts +41 -0
  185. package/dist/userClient.d.ts.map +1 -0
  186. package/dist/userClient.js +64 -0
  187. package/dist/userClient.js.map +1 -0
  188. package/package.json +24 -7
  189. package/dist/Acccount.d.ts +0 -9
  190. package/dist/Acccount.d.ts.map +0 -1
  191. package/dist/Acccount.js +0 -22
  192. package/dist/Acccount.js.map +0 -1
  193. package/dist/Auth.d.ts +0 -19
  194. package/dist/Auth.d.ts.map +0 -1
  195. package/dist/Auth.js +0 -24
  196. package/dist/Auth.js.map +0 -1
  197. package/dist/Authticon.d.ts +0 -27
  198. package/dist/Authticon.d.ts.map +0 -1
  199. package/dist/Authticon.js +0 -41
  200. package/dist/Authticon.js.map +0 -1
  201. package/dist/BrowserCookieAdapter.d.ts +0 -13
  202. package/dist/BrowserCookieAdapter.d.ts.map +0 -1
  203. package/dist/BrowserCookieAdapter.js +0 -18
  204. package/dist/BrowserCookieAdapter.js.map +0 -1
  205. package/dist/BrowserCookieAdapter.test.d.ts +0 -2
  206. package/dist/BrowserCookieAdapter.test.d.ts.map +0 -1
  207. package/dist/BrowserCookieAdapter.test.js +0 -145
  208. package/dist/BrowserCookieAdapter.test.js.map +0 -1
  209. package/dist/RemixCookieAdapter.d.ts +0 -12
  210. package/dist/RemixCookieAdapter.d.ts.map +0 -1
  211. package/dist/RemixCookieAdapter.js +0 -25
  212. package/dist/RemixCookieAdapter.js.map +0 -1
  213. package/dist/RemixCookieAdapter.test.d.ts +0 -2
  214. package/dist/RemixCookieAdapter.test.d.ts.map +0 -1
  215. package/dist/RemixCookieAdapter.test.js +0 -136
  216. package/dist/RemixCookieAdapter.test.js.map +0 -1
  217. package/dist/TokenManager.d.ts +0 -22
  218. package/dist/TokenManager.d.ts.map +0 -1
  219. package/dist/TokenManager.js +0 -45
  220. package/dist/TokenManager.js.map +0 -1
  221. package/dist/TokenManager.test.d.ts +0 -2
  222. package/dist/TokenManager.test.d.ts.map +0 -1
  223. package/dist/TokenManager.test.js +0 -118
  224. package/dist/TokenManager.test.js.map +0 -1
  225. package/dist/TokenStorage.test.d.ts +0 -2
  226. package/dist/TokenStorage.test.d.ts.map +0 -1
  227. package/dist/TokenStorage.test.js +0 -179
  228. package/dist/TokenStorage.test.js.map +0 -1
  229. package/dist/TokenVerifier.test.d.ts +0 -2
  230. package/dist/TokenVerifier.test.d.ts.map +0 -1
  231. package/dist/TokenVerifier.test.js +0 -117
  232. package/dist/TokenVerifier.test.js.map +0 -1
  233. package/dist/TwoFa.d.ts +0 -22
  234. package/dist/TwoFa.d.ts.map +0 -1
  235. package/dist/TwoFa.js +0 -47
  236. package/dist/TwoFa.js.map +0 -1
  237. package/dist/User.d.ts +0 -25
  238. package/dist/User.d.ts.map +0 -1
  239. package/dist/User.js +0 -27
  240. package/dist/User.js.map +0 -1
  241. package/dist/Users.d.ts +0 -57
  242. package/dist/Users.d.ts.map +0 -1
  243. package/dist/Users.js +0 -54
  244. package/dist/Users.js.map +0 -1
  245. package/dist/cookie-utils.d.ts +0 -5
  246. package/dist/cookie-utils.d.ts.map +0 -1
  247. package/dist/cookie-utils.js +0 -33
  248. package/dist/cookie-utils.js.map +0 -1
@@ -1,398 +1,423 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { client } from './client.gen.js';
3
- export const getApiV1Healthz = (options) => (options?.client ?? client).get({ url: '/api/v1/healthz', ...options });
4
- export const deleteApiV1AuthTwoFa = (options) => (options.client ?? client).delete({
5
- responseType: 'json',
6
- url: '/api/v1/auth/two-fa',
3
+ /**
4
+ * Login as user
5
+ */
6
+ export const loginAs = (options) => (options.client ?? client).post({
7
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
8
+ url: '/api/v1/admin/login-as',
7
9
  ...options,
8
10
  headers: {
9
11
  'Content-Type': 'application/json',
10
12
  ...options.headers
11
13
  }
12
14
  });
13
- export const postApiV1AuthTwoFa = (options) => (options.client ?? client).post({
14
- responseType: 'json',
15
- url: '/api/v1/auth/two-fa',
15
+ /**
16
+ * Send test email
17
+ */
18
+ export const sendTestEmail = (options) => (options.client ?? client).post({
19
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
20
+ url: '/api/v1/admin/tools/test-email',
16
21
  ...options,
17
22
  headers: {
18
23
  'Content-Type': 'application/json',
19
24
  ...options.headers
20
25
  }
21
26
  });
22
- export const postApiV1AuthEmailChange = (options) => (options.client ?? client).post({
23
- responseType: 'json',
24
- url: '/api/v1/auth/email/change',
27
+ /**
28
+ * Verify SMS code
29
+ */
30
+ export const verifySmsCode = (options) => (options.client ?? client).patch({
31
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
32
+ url: '/api/v1/admin/tools/sms',
25
33
  ...options,
26
34
  headers: {
27
35
  'Content-Type': 'application/json',
28
36
  ...options.headers
29
37
  }
30
38
  });
31
- export const postApiV1AuthPasswordChange = (options) => (options.client ?? client).post({
32
- responseType: 'json',
33
- url: '/api/v1/auth/password/change',
39
+ /**
40
+ * Send SMS verification code
41
+ */
42
+ export const sendSmsCode = (options) => (options.client ?? client).post({
43
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
44
+ url: '/api/v1/admin/tools/sms',
34
45
  ...options,
35
46
  headers: {
36
47
  'Content-Type': 'application/json',
37
48
  ...options.headers
38
49
  }
39
50
  });
40
- export const postApiV1AuthGuest = (options) => (options.client ?? client).post({
41
- responseType: 'json',
42
- url: '/api/v1/auth/guest',
43
- ...options,
44
- headers: {
45
- 'Content-Type': 'application/json',
46
- ...options.headers
47
- }
51
+ /**
52
+ * List users
53
+ */
54
+ export const listUsers = (options) => (options?.client ?? client).get({
55
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
56
+ url: '/api/v1/admin/users/',
57
+ ...options
48
58
  });
49
- export const postApiV1AuthPasswordForgot = (options) => (options.client ?? client).post({
50
- responseType: 'json',
51
- url: '/api/v1/auth/password/forgot',
59
+ /**
60
+ * Create user
61
+ */
62
+ export const createUser = (options) => (options.client ?? client).post({
63
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
64
+ url: '/api/v1/admin/users/',
52
65
  ...options,
53
66
  headers: {
54
67
  'Content-Type': 'application/json',
55
68
  ...options.headers
56
69
  }
57
70
  });
58
- export const getApiV1AuthTwoFaRecoveryCodes = (options) => (options?.client ?? client).get({
59
- responseType: 'json',
60
- url: '/api/v1/auth/two-fa/recovery-codes',
71
+ /**
72
+ * Delete user
73
+ */
74
+ export const deleteUser = (options) => (options.client ?? client).delete({
75
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
76
+ url: '/api/v1/admin/users/{userId}/',
61
77
  ...options
62
78
  });
63
- export const postApiV1AuthTwoFaRecoveryCodes = (options) => (options.client ?? client).post({
64
- responseType: 'json',
65
- url: '/api/v1/auth/two-fa/recovery-codes',
66
- ...options,
67
- headers: {
68
- 'Content-Type': 'application/json',
69
- ...options.headers
70
- }
79
+ /**
80
+ * Get user
81
+ */
82
+ export const getUser = (options) => (options.client ?? client).get({
83
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
84
+ url: '/api/v1/admin/users/{userId}',
85
+ ...options
71
86
  });
72
- export const postApiV1AuthTwoFaSecret = (options) => (options.client ?? client).post({
73
- responseType: 'json',
74
- url: '/api/v1/auth/two-fa/secret',
87
+ /**
88
+ * Update user
89
+ */
90
+ export const updateUser = (options) => (options.client ?? client).patch({
91
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
92
+ url: '/api/v1/admin/users/{userId}',
75
93
  ...options,
76
94
  headers: {
77
95
  'Content-Type': 'application/json',
78
96
  ...options.headers
79
97
  }
80
98
  });
81
- export const postApiV1AuthEmailCheck = (options) => (options.client ?? client).post({
82
- responseType: 'json',
83
- url: '/api/v1/auth/email/check',
99
+ /**
100
+ * Create user role
101
+ */
102
+ export const createUserRole = (options) => (options.client ?? client).post({
103
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
104
+ url: '/api/v1/admin/users/{userId}/roles',
84
105
  ...options,
85
106
  headers: {
86
107
  'Content-Type': 'application/json',
87
108
  ...options.headers
88
109
  }
89
110
  });
90
- export const postApiV1AuthPhoneCheck = (options) => (options.client ?? client).post({
91
- responseType: 'json',
92
- url: '/api/v1/auth/phone/check',
93
- ...options,
94
- headers: {
95
- 'Content-Type': 'application/json',
96
- ...options.headers
97
- }
111
+ /**
112
+ * Delete user role
113
+ */
114
+ export const deleteUserRole = (options) => (options.client ?? client).delete({
115
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
116
+ url: '/api/v1/admin/users/{userId}/roles/roles/{roleId}',
117
+ ...options
98
118
  });
99
- export const postApiV1AuthLogin = (options) => (options.client ?? client).post({
100
- responseType: 'json',
101
- url: '/api/v1/auth/login',
102
- ...options,
103
- headers: {
104
- 'Content-Type': 'application/json',
105
- ...options.headers
106
- }
119
+ /**
120
+ * List user roles
121
+ */
122
+ export const listUserRoles = (options) => (options.client ?? client).get({
123
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
124
+ url: '/api/v1/admin/users/{userId}/roles/roles',
125
+ ...options
107
126
  });
108
- export const postApiV1AuthLoginAs = (options) => (options.client ?? client).post({
109
- responseType: 'json',
110
- url: '/api/v1/auth/login-as',
127
+ /**
128
+ * Update user role
129
+ */
130
+ export const updateUserRole = (options) => (options.client ?? client).patch({
131
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
132
+ url: '/api/v1/admin/users/{userId}/roles/{roleId}',
111
133
  ...options,
112
134
  headers: {
113
135
  'Content-Type': 'application/json',
114
136
  ...options.headers
115
137
  }
116
138
  });
117
- export const postApiV1AuthLogout = (options) => (options.client ?? client).post({
118
- responseType: 'json',
119
- url: '/api/v1/auth/logout',
139
+ /**
140
+ * Logout the user
141
+ */
142
+ export const logout = (options) => (options.client ?? client).post({
143
+ security: [{ scheme: 'bearer', type: 'http' }],
144
+ url: '/api/v1/me/logout',
120
145
  ...options,
121
146
  headers: {
122
147
  'Content-Type': 'application/json',
123
148
  ...options.headers
124
149
  }
125
150
  });
126
- export const getApiV1AuthMe = (options) => (options?.client ?? client).get({
127
- responseType: 'json',
128
- url: '/api/v1/auth/me',
151
+ /**
152
+ * Get the current user
153
+ */
154
+ export const me = (options) => (options?.client ?? client).get({
155
+ security: [{ scheme: 'bearer', type: 'http' }],
156
+ url: '/me',
129
157
  ...options
130
158
  });
131
- export const postApiV1AuthTokenRefresh = (options) => (options.client ?? client).post({
132
- responseType: 'json',
133
- url: '/api/v1/auth/token/refresh',
159
+ /**
160
+ * Refresh the access token
161
+ */
162
+ export const refresh = (options) => (options.client ?? client).post({
163
+ security: [{ scheme: 'bearer', type: 'http' }],
164
+ url: '/api/v1/me/token/refresh',
134
165
  ...options,
135
166
  headers: {
136
167
  'Content-Type': 'application/json',
137
168
  ...options.headers
138
169
  }
139
170
  });
140
- export const postApiV1AuthRegister = (options) => (options.client ?? client).post({
141
- responseType: 'json',
142
- url: '/api/v1/auth/register',
171
+ /**
172
+ * Update the current user
173
+ */
174
+ export const updateMe = (options) => (options.client ?? client).patch({
175
+ security: [{ scheme: 'bearer', type: 'http' }],
176
+ url: '/',
143
177
  ...options,
144
178
  headers: {
145
179
  'Content-Type': 'application/json',
146
180
  ...options.headers
147
181
  }
148
182
  });
149
- export const postApiV1AuthEmailResendConfirmation = (options) => (options.client ?? client).post({
150
- responseType: 'json',
151
- url: '/api/v1/auth/email/resend-confirmation',
183
+ /**
184
+ * Disable two factor authentication
185
+ */
186
+ export const disableTwoFa = (options) => (options.client ?? client).delete({
187
+ security: [{ scheme: 'bearer', type: 'http' }],
188
+ url: '/api/v1/me/2fa',
152
189
  ...options,
153
190
  headers: {
154
191
  'Content-Type': 'application/json',
155
192
  ...options.headers
156
193
  }
157
194
  });
158
- export const postApiV1AuthMagicLinkSend = (options) => (options.client ?? client).post({
159
- responseType: 'json',
160
- url: '/api/v1/auth/magic-link/send',
195
+ /**
196
+ * Enable two factor authentication
197
+ */
198
+ export const enableTwoFa = (options) => (options.client ?? client).post({
199
+ security: [{ scheme: 'bearer', type: 'http' }],
200
+ url: '/api/v1/me/2fa',
161
201
  ...options,
162
202
  headers: {
163
203
  'Content-Type': 'application/json',
164
204
  ...options.headers
165
205
  }
166
206
  });
167
- export const postApiV1AuthPhoneSendCode = (options) => (options.client ?? client).post({
168
- responseType: 'json',
169
- url: '/api/v1/auth/phone/send-code',
170
- ...options,
171
- headers: {
172
- 'Content-Type': 'application/json',
173
- ...options.headers
174
- }
175
- });
176
- export const postApiV1AuthSmsSendCode = (options) => (options.client ?? client).post({
177
- responseType: 'json',
178
- url: '/api/v1/auth/sms/send-code',
179
- ...options,
180
- headers: {
181
- 'Content-Type': 'application/json',
182
- ...options.headers
183
- }
207
+ /**
208
+ * Get two factor authentication secret
209
+ */
210
+ export const getTwoFaSecret = (options) => (options?.client ?? client).get({
211
+ security: [{ scheme: 'bearer', type: 'http' }],
212
+ url: '/api/v1/me/2fa/secret',
213
+ ...options
184
214
  });
185
- export const postApiV1AuthTestEmail = (options) => (options.client ?? client).post({
186
- responseType: 'json',
187
- url: '/api/v1/auth/test-email',
215
+ /**
216
+ * Send two factor authentication code
217
+ */
218
+ export const sendTwoFaCode = (options) => (options.client ?? client).post({
219
+ security: [{ scheme: 'bearer', type: 'http' }],
220
+ url: '/api/v1/me/2fa/send-code',
188
221
  ...options,
189
222
  headers: {
190
223
  'Content-Type': 'application/json',
191
224
  ...options.headers
192
225
  }
193
226
  });
194
- export const postApiV1AuthPasswordSet = (options) => (options.client ?? client).post({
195
- responseType: 'json',
196
- url: '/api/v1/auth/password/set',
227
+ /**
228
+ * Verify two factor authentication code
229
+ */
230
+ export const verifyTwoFa = (options) => (options.client ?? client).post({
231
+ security: [{ scheme: 'bearer', type: 'http' }],
232
+ url: '/api/v1/me/2fa/verify',
197
233
  ...options,
198
234
  headers: {
199
235
  'Content-Type': 'application/json',
200
236
  ...options.headers
201
237
  }
202
238
  });
203
- export const postApiV1AuthEmailVerify = (options) => (options.client ?? client).post({
204
- responseType: 'json',
205
- url: '/api/v1/auth/email/verify',
239
+ /**
240
+ * Change the email of the user
241
+ */
242
+ export const changeEmail = (options) => (options.client ?? client).patch({
243
+ security: [{ scheme: 'bearer', type: 'http' }],
244
+ url: '/api/v1/me/email',
206
245
  ...options,
207
246
  headers: {
208
247
  'Content-Type': 'application/json',
209
248
  ...options.headers
210
249
  }
211
250
  });
212
- export const postApiV1AuthTwoFaRecovery = (options) => (options.client ?? client).post({
213
- responseType: 'json',
214
- url: '/api/v1/auth/two-fa/recovery',
215
- ...options,
216
- headers: {
217
- 'Content-Type': 'application/json',
218
- ...options.headers
219
- }
251
+ /**
252
+ * Delete an invitation
253
+ */
254
+ export const deleteInvitation = (options) => (options.client ?? client).delete({
255
+ security: [{ scheme: 'bearer', type: 'http' }],
256
+ url: '/api/v1/me/invitations',
257
+ ...options
220
258
  });
221
- export const postApiV1AuthTwoFaVerify = (options) => (options.client ?? client).post({
222
- responseType: 'json',
223
- url: '/api/v1/auth/two-fa/verify',
259
+ /**
260
+ * Create an invitation
261
+ */
262
+ export const createInvitation = (options) => (options.client ?? client).post({
263
+ security: [{ scheme: 'bearer', type: 'http' }],
264
+ url: '/api/v1/me/invitations',
224
265
  ...options,
225
266
  headers: {
226
267
  'Content-Type': 'application/json',
227
268
  ...options.headers
228
269
  }
229
270
  });
230
- export const postApiV1AuthMagicLinkVerify = (options) => (options.client ?? client).post({
231
- responseType: 'json',
232
- url: '/api/v1/auth/magic-link/verify',
271
+ /**
272
+ * Change the password of the user
273
+ */
274
+ export const changePassword = (options) => (options.client ?? client).patch({
275
+ security: [{ scheme: 'bearer', type: 'http' }],
276
+ url: '/api/v1/me/password',
233
277
  ...options,
234
278
  headers: {
235
279
  'Content-Type': 'application/json',
236
280
  ...options.headers
237
281
  }
238
282
  });
239
- export const postApiV1AuthPhoneVerify = (options) => (options.client ?? client).post({
240
- responseType: 'json',
241
- url: '/api/v1/auth/phone/verify',
283
+ /**
284
+ * Set the password for passwordless user
285
+ */
286
+ export const setPassword = (options) => (options.client ?? client).post({
287
+ security: [{ scheme: 'bearer', type: 'http' }],
288
+ url: '/api/v1/me/password',
242
289
  ...options,
243
290
  headers: {
244
291
  'Content-Type': 'application/json',
245
292
  ...options.headers
246
293
  }
247
294
  });
248
- export const postApiV1AuthSmsVerify = (options) => (options.client ?? client).post({
249
- responseType: 'json',
250
- url: '/api/v1/auth/sms/verify',
295
+ /**
296
+ * Change the phone number of the user
297
+ */
298
+ export const changePhone = (options) => (options.client ?? client).patch({
299
+ security: [{ scheme: 'bearer', type: 'http' }],
300
+ url: '/api/v1/me/phone',
251
301
  ...options,
252
302
  headers: {
253
303
  'Content-Type': 'application/json',
254
304
  ...options.headers
255
305
  }
256
306
  });
257
- export const postApiV1InvitationsInvitationAccept = (options) => (options.client ?? client).post({
258
- responseType: 'json',
259
- url: '/api/v1/invitations/invitation/accept',
307
+ /**
308
+ * Verify the phone number of the user
309
+ */
310
+ export const verifyPhone = (options) => (options.client ?? client).post({
311
+ security: [{ scheme: 'bearer', type: 'http' }],
312
+ url: '/api/v1/me/phone/verify',
260
313
  ...options,
261
314
  headers: {
262
315
  'Content-Type': 'application/json',
263
316
  ...options.headers
264
317
  }
265
318
  });
266
- export const postApiV1InvitationsInvitation = (options) => (options.client ?? client).post({
267
- responseType: 'json',
268
- url: '/api/v1/invitations/invitation',
319
+ /**
320
+ * Accept an invitation
321
+ */
322
+ export const acceptInvitation = (options) => (options.client ?? client).post({
323
+ security: [{ name: 'x-project-id', type: 'apiKey' }],
324
+ url: '/api/v1/invitation/accept',
269
325
  ...options,
270
326
  headers: {
271
327
  'Content-Type': 'application/json',
272
328
  ...options.headers
273
329
  }
274
330
  });
275
- export const deleteApiV1InvitationsInvitationById = (options) => (options.client ?? client).delete({
276
- responseType: 'json',
277
- url: '/api/v1/invitations/invitation/{id}',
278
- ...options
279
- });
280
- export const getApiV1User = (options) => (options?.client ?? client).get({
281
- responseType: 'json',
282
- url: '/api/v1/user/',
283
- ...options
284
- });
285
- export const postApiV1User = (options) => (options.client ?? client).post({
286
- responseType: 'json',
287
- url: '/api/v1/user/',
331
+ /**
332
+ * Create a guest user
333
+ */
334
+ export const createGuestUser = (options) => (options.client ?? client).post({
335
+ security: [{ name: 'x-project-id', type: 'apiKey' }],
336
+ url: '/api/v1/guest',
288
337
  ...options,
289
338
  headers: {
290
339
  'Content-Type': 'application/json',
291
340
  ...options.headers
292
341
  }
293
342
  });
294
- export const getApiV1UserByUserIdRoles = (options) => (options.client ?? client).get({
295
- responseType: 'json',
296
- url: '/api/v1/user/{userId}/roles',
297
- ...options
298
- });
299
- export const postApiV1UserByUserIdRoles = (options) => (options.client ?? client).post({
300
- responseType: 'json',
301
- url: '/api/v1/user/{userId}/roles',
343
+ /**
344
+ * Forgot password
345
+ */
346
+ export const forgotPassword = (options) => (options.client ?? client).post({
347
+ security: [{ name: 'x-project-id', type: 'apiKey' }],
348
+ url: '/api/v1/password/forgot',
302
349
  ...options,
303
350
  headers: {
304
351
  'Content-Type': 'application/json',
305
352
  ...options.headers
306
353
  }
307
354
  });
308
- export const deleteApiV1UserById = (options) => (options.client ?? client).delete({
309
- responseType: 'json',
310
- url: '/api/v1/user/{id}',
311
- ...options
312
- });
313
- export const getApiV1UserById = (options) => (options.client ?? client).get({
314
- responseType: 'json',
315
- url: '/api/v1/user/{id}',
316
- ...options
317
- });
318
- export const patchApiV1UserById = (options) => (options.client ?? client).patch({
319
- responseType: 'json',
320
- url: '/api/v1/user/{id}',
355
+ /**
356
+ * Login
357
+ */
358
+ export const login = (options) => (options.client ?? client).post({
359
+ security: [{ name: 'x-project-id', type: 'apiKey' }],
360
+ url: '/api/v1/login',
321
361
  ...options,
322
362
  headers: {
323
363
  'Content-Type': 'application/json',
324
364
  ...options.headers
325
365
  }
326
366
  });
327
- export const deleteApiV1UserByUserIdRolesByRoleId = (options) => (options.client ?? client).delete({
328
- responseType: 'json',
329
- url: '/api/v1/user/{userId}/roles/{roleId}',
330
- ...options
331
- });
332
- export const patchApiV1UserByUserIdRolesByRoleId = (options) => (options.client ?? client).patch({
333
- responseType: 'json',
334
- url: '/api/v1/user/{userId}/roles/{roleId}',
367
+ /**
368
+ * Register a new user
369
+ */
370
+ export const register = (options) => (options.client ?? client).post({
371
+ security: [{ name: 'x-project-id', type: 'apiKey' }],
372
+ url: '/api/v1/register',
335
373
  ...options,
336
374
  headers: {
337
375
  'Content-Type': 'application/json',
338
376
  ...options.headers
339
377
  }
340
378
  });
341
- export const getApiV1Users = (options) => (options?.client ?? client).get({
342
- responseType: 'json',
343
- url: '/api/v1/users/',
344
- ...options
345
- });
346
- export const postApiV1Users = (options) => (options.client ?? client).post({
347
- responseType: 'json',
348
- url: '/api/v1/users/',
379
+ /**
380
+ * Resend email confirmation
381
+ */
382
+ export const resendEmailConfirmation = (options) => (options.client ?? client).post({
383
+ security: [{ name: 'x-project-id', type: 'apiKey' }],
384
+ url: '/api/v1/email/resend-confirmation',
349
385
  ...options,
350
386
  headers: {
351
387
  'Content-Type': 'application/json',
352
388
  ...options.headers
353
389
  }
354
390
  });
355
- export const getApiV1UsersByUserIdRoles = (options) => (options.client ?? client).get({
356
- responseType: 'json',
357
- url: '/api/v1/users/{userId}/roles',
358
- ...options
359
- });
360
- export const postApiV1UsersByUserIdRoles = (options) => (options.client ?? client).post({
361
- responseType: 'json',
362
- url: '/api/v1/users/{userId}/roles',
391
+ /**
392
+ * Send a magic link to the user
393
+ */
394
+ export const sendMagicLink = (options) => (options.client ?? client).post({
395
+ security: [{ name: 'x-project-id', type: 'apiKey' }],
396
+ url: '/api/v1/magic-link/send',
363
397
  ...options,
364
398
  headers: {
365
399
  'Content-Type': 'application/json',
366
400
  ...options.headers
367
401
  }
368
402
  });
369
- export const deleteApiV1UsersById = (options) => (options.client ?? client).delete({
370
- responseType: 'json',
371
- url: '/api/v1/users/{id}',
372
- ...options
373
- });
374
- export const getApiV1UsersById = (options) => (options.client ?? client).get({
375
- responseType: 'json',
376
- url: '/api/v1/users/{id}',
377
- ...options
378
- });
379
- export const patchApiV1UsersById = (options) => (options.client ?? client).patch({
380
- responseType: 'json',
381
- url: '/api/v1/users/{id}',
403
+ /**
404
+ * Verify the email of the user
405
+ */
406
+ export const verifyEmail = (options) => (options.client ?? client).post({
407
+ security: [{ name: 'x-project-id', type: 'apiKey' }],
408
+ url: '/api/v1/email/verify',
382
409
  ...options,
383
410
  headers: {
384
411
  'Content-Type': 'application/json',
385
412
  ...options.headers
386
413
  }
387
414
  });
388
- export const deleteApiV1UsersByUserIdRolesByRoleId = (options) => (options.client ?? client).delete({
389
- responseType: 'json',
390
- url: '/api/v1/users/{userId}/roles/{roleId}',
391
- ...options
392
- });
393
- export const patchApiV1UsersByUserIdRolesByRoleId = (options) => (options.client ?? client).patch({
394
- responseType: 'json',
395
- url: '/api/v1/users/{userId}/roles/{roleId}',
415
+ /**
416
+ * Verify magic link
417
+ */
418
+ export const verifyMagicLink = (options) => (options.client ?? client).post({
419
+ security: [{ name: 'x-project-id', type: 'apiKey' }],
420
+ url: '/api/v1/magic-link/verify',
396
421
  ...options,
397
422
  headers: {
398
423
  'Content-Type': 'application/json',