@gorth-io/structure 0.0.0-alpha.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 (345) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -0
  3. package/dist/cores/ably/ai-transport/index.cjs +1 -0
  4. package/dist/cores/ably/ai-transport/index.d.cts +1 -0
  5. package/dist/cores/ably/ai-transport/index.d.ts +1 -0
  6. package/dist/cores/ably/ai-transport/index.js +1 -0
  7. package/dist/cores/ably/ai-transport/react/index.cjs +1 -0
  8. package/dist/cores/ably/ai-transport/react/index.d.cts +1 -0
  9. package/dist/cores/ably/ai-transport/react/index.d.ts +1 -0
  10. package/dist/cores/ably/ai-transport/react/index.js +1 -0
  11. package/dist/cores/ably/chat/index.cjs +1 -0
  12. package/dist/cores/ably/chat/index.d.cts +1 -0
  13. package/dist/cores/ably/chat/index.d.ts +1 -0
  14. package/dist/cores/ably/chat/index.js +1 -0
  15. package/dist/cores/ably/chat/react/index.cjs +1 -0
  16. package/dist/cores/ably/chat/react/index.d.cts +1 -0
  17. package/dist/cores/ably/chat/react/index.d.ts +1 -0
  18. package/dist/cores/ably/chat/react/index.js +1 -0
  19. package/dist/cores/ably/index.cjs +1 -0
  20. package/dist/cores/ably/index.d.cts +1 -0
  21. package/dist/cores/ably/index.d.ts +1 -0
  22. package/dist/cores/ably/index.js +1 -0
  23. package/dist/cores/ably/liveobjects/index.cjs +1 -0
  24. package/dist/cores/ably/liveobjects/index.d.cts +1 -0
  25. package/dist/cores/ably/liveobjects/index.d.ts +1 -0
  26. package/dist/cores/ably/liveobjects/index.js +1 -0
  27. package/dist/cores/ably/liveobjects/react/index.cjs +1 -0
  28. package/dist/cores/ably/liveobjects/react/index.d.cts +1 -0
  29. package/dist/cores/ably/liveobjects/react/index.d.ts +1 -0
  30. package/dist/cores/ably/liveobjects/react/index.js +1 -0
  31. package/dist/cores/ably/modular/index.cjs +1 -0
  32. package/dist/cores/ably/modular/index.d.cts +1 -0
  33. package/dist/cores/ably/modular/index.d.ts +1 -0
  34. package/dist/cores/ably/modular/index.js +1 -0
  35. package/dist/cores/ably/push/index.cjs +1 -0
  36. package/dist/cores/ably/push/index.d.cts +2 -0
  37. package/dist/cores/ably/push/index.d.ts +2 -0
  38. package/dist/cores/ably/push/index.js +1 -0
  39. package/dist/cores/ably/react/index.cjs +1 -0
  40. package/dist/cores/ably/react/index.d.cts +1 -0
  41. package/dist/cores/ably/react/index.d.ts +1 -0
  42. package/dist/cores/ably/react/index.js +1 -0
  43. package/dist/cores/ably/spaces/index.cjs +1 -0
  44. package/dist/cores/ably/spaces/index.d.cts +3 -0
  45. package/dist/cores/ably/spaces/index.d.ts +3 -0
  46. package/dist/cores/ably/spaces/index.js +1 -0
  47. package/dist/cores/axios.cjs +1 -0
  48. package/dist/cores/axios.d.cts +3 -0
  49. package/dist/cores/axios.d.ts +3 -0
  50. package/dist/cores/axios.js +1 -0
  51. package/dist/cores/graphql/index.cjs +1 -0
  52. package/dist/cores/graphql/index.d.cts +1 -0
  53. package/dist/cores/graphql/index.d.ts +1 -0
  54. package/dist/cores/graphql/index.js +1 -0
  55. package/dist/cores/graphql/request.cjs +1 -0
  56. package/dist/cores/graphql/request.d.cts +1 -0
  57. package/dist/cores/graphql/request.d.ts +1 -0
  58. package/dist/cores/graphql/request.js +1 -0
  59. package/dist/cores/graphql/tag.cjs +1 -0
  60. package/dist/cores/graphql/tag.d.cts +1 -0
  61. package/dist/cores/graphql/tag.d.ts +1 -0
  62. package/dist/cores/graphql/tag.js +1 -0
  63. package/dist/cores/index.cjs +0 -0
  64. package/dist/cores/index.d.cts +1 -0
  65. package/dist/cores/index.d.ts +1 -0
  66. package/dist/cores/index.js +1 -0
  67. package/dist/cores/jose.cjs +1 -0
  68. package/dist/cores/jose.d.cts +1 -0
  69. package/dist/cores/jose.d.ts +1 -0
  70. package/dist/cores/jose.js +1 -0
  71. package/dist/cores/pg.cjs +1 -0
  72. package/dist/cores/pg.d.cts +3 -0
  73. package/dist/cores/pg.d.ts +3 -0
  74. package/dist/cores/pg.js +2 -0
  75. package/dist/cores/pg.js.map +1 -0
  76. package/dist/cores/postgres.cjs +1 -0
  77. package/dist/cores/postgres.d.cts +2 -0
  78. package/dist/cores/postgres.d.ts +2 -0
  79. package/dist/cores/postgres.js +2 -0
  80. package/dist/cores/postgres.js.map +1 -0
  81. package/dist/cores/supabase/index.cjs +1 -0
  82. package/dist/cores/supabase/index.d.cts +1 -0
  83. package/dist/cores/supabase/index.d.ts +1 -0
  84. package/dist/cores/supabase/index.js +1 -0
  85. package/dist/cores/supabase/postgrest.cjs +1 -0
  86. package/dist/cores/supabase/postgrest.d.cts +1 -0
  87. package/dist/cores/supabase/postgrest.d.ts +1 -0
  88. package/dist/cores/supabase/postgrest.js +1 -0
  89. package/dist/cores/supabase/server.cjs +1 -0
  90. package/dist/cores/supabase/server.d.cts +1 -0
  91. package/dist/cores/supabase/server.d.ts +1 -0
  92. package/dist/cores/supabase/server.js +1 -0
  93. package/dist/cores/supabase/ssr.cjs +1 -0
  94. package/dist/cores/supabase/ssr.d.cts +1 -0
  95. package/dist/cores/supabase/ssr.d.ts +1 -0
  96. package/dist/cores/supabase/ssr.js +1 -0
  97. package/dist/cores/uuid.cjs +1 -0
  98. package/dist/cores/uuid.d.cts +1 -0
  99. package/dist/cores/uuid.d.ts +1 -0
  100. package/dist/cores/uuid.js +1 -0
  101. package/dist/cores/zod.cjs +1 -0
  102. package/dist/cores/zod.d.cts +3 -0
  103. package/dist/cores/zod.d.ts +3 -0
  104. package/dist/cores/zod.js +1 -0
  105. package/dist/formatter-MMKFBkro.d.cts +12 -0
  106. package/dist/formatter-MMKFBkro.d.cts.map +1 -0
  107. package/dist/formatter-vjbCoK9k.d.ts +12 -0
  108. package/dist/formatter-vjbCoK9k.d.ts.map +1 -0
  109. package/dist/index.cjs +1 -0
  110. package/dist/index.d.cts +6 -0
  111. package/dist/index.d.ts +6 -0
  112. package/dist/index.js +1 -0
  113. package/dist/interface-BFsLlmGy.d.ts +1 -0
  114. package/dist/interface-BR9QNgXO.d.cts +283 -0
  115. package/dist/interface-BR9QNgXO.d.cts.map +1 -0
  116. package/dist/interface-ii8DV63k.d.ts +283 -0
  117. package/dist/interface-ii8DV63k.d.ts.map +1 -0
  118. package/dist/interface-weqBVeUf.d.cts +1 -0
  119. package/dist/lib/permission.cjs +0 -0
  120. package/dist/lib/permission.d.cts +1 -0
  121. package/dist/lib/permission.d.ts +1 -0
  122. package/dist/lib/permission.js +1 -0
  123. package/dist/modules/auth/client/index.cjs +1 -0
  124. package/dist/modules/auth/client/index.d.cts +5 -0
  125. package/dist/modules/auth/client/index.d.ts +5 -0
  126. package/dist/modules/auth/client/index.js +1 -0
  127. package/dist/modules/auth/client/retry.cjs +1 -0
  128. package/dist/modules/auth/client/retry.d.cts +11 -0
  129. package/dist/modules/auth/client/retry.d.cts.map +1 -0
  130. package/dist/modules/auth/client/retry.d.ts +11 -0
  131. package/dist/modules/auth/client/retry.d.ts.map +1 -0
  132. package/dist/modules/auth/client/retry.js +2 -0
  133. package/dist/modules/auth/client/retry.js.map +1 -0
  134. package/dist/modules/auth/interface.cjs +1 -0
  135. package/dist/modules/auth/interface.d.cts +8 -0
  136. package/dist/modules/auth/interface.d.cts.map +1 -0
  137. package/dist/modules/auth/interface.d.ts +8 -0
  138. package/dist/modules/auth/interface.d.ts.map +1 -0
  139. package/dist/modules/auth/interface.js +2 -0
  140. package/dist/modules/auth/interface.js.map +1 -0
  141. package/dist/modules/auth/policy.cjs +1 -0
  142. package/dist/modules/auth/policy.d.cts +15 -0
  143. package/dist/modules/auth/policy.d.cts.map +1 -0
  144. package/dist/modules/auth/policy.d.ts +15 -0
  145. package/dist/modules/auth/policy.d.ts.map +1 -0
  146. package/dist/modules/auth/policy.js +2 -0
  147. package/dist/modules/auth/policy.js.map +1 -0
  148. package/dist/modules/auth/server/crypto.cjs +1 -0
  149. package/dist/modules/auth/server/crypto.d.cts +3 -0
  150. package/dist/modules/auth/server/crypto.d.cts.map +1 -0
  151. package/dist/modules/auth/server/crypto.d.ts +3 -0
  152. package/dist/modules/auth/server/crypto.d.ts.map +1 -0
  153. package/dist/modules/auth/server/crypto.js +2 -0
  154. package/dist/modules/auth/server/crypto.js.map +1 -0
  155. package/dist/modules/auth/server/grant-guard.cjs +1 -0
  156. package/dist/modules/auth/server/grant-guard.d.cts +6 -0
  157. package/dist/modules/auth/server/grant-guard.d.cts.map +1 -0
  158. package/dist/modules/auth/server/grant-guard.d.ts +6 -0
  159. package/dist/modules/auth/server/grant-guard.d.ts.map +1 -0
  160. package/dist/modules/auth/server/grant-guard.js +2 -0
  161. package/dist/modules/auth/server/grant-guard.js.map +1 -0
  162. package/dist/modules/auth/server/identity-cache.cjs +1 -0
  163. package/dist/modules/auth/server/identity-cache.d.cts +8 -0
  164. package/dist/modules/auth/server/identity-cache.d.cts.map +1 -0
  165. package/dist/modules/auth/server/identity-cache.d.ts +8 -0
  166. package/dist/modules/auth/server/identity-cache.d.ts.map +1 -0
  167. package/dist/modules/auth/server/identity-cache.js +2 -0
  168. package/dist/modules/auth/server/identity-cache.js.map +1 -0
  169. package/dist/modules/auth/server/identity.cjs +1 -0
  170. package/dist/modules/auth/server/identity.d.cts +5 -0
  171. package/dist/modules/auth/server/identity.d.cts.map +1 -0
  172. package/dist/modules/auth/server/identity.d.ts +5 -0
  173. package/dist/modules/auth/server/identity.d.ts.map +1 -0
  174. package/dist/modules/auth/server/identity.js +2 -0
  175. package/dist/modules/auth/server/identity.js.map +1 -0
  176. package/dist/modules/auth/server/index.cjs +1 -0
  177. package/dist/modules/auth/server/index.d.cts +12 -0
  178. package/dist/modules/auth/server/index.d.ts +12 -0
  179. package/dist/modules/auth/server/index.js +1 -0
  180. package/dist/modules/auth/server/interface.cjs +0 -0
  181. package/dist/modules/auth/server/interface.d.cts +3 -0
  182. package/dist/modules/auth/server/interface.d.ts +3 -0
  183. package/dist/modules/auth/server/interface.js +1 -0
  184. package/dist/modules/auth/server/logout.cjs +1 -0
  185. package/dist/modules/auth/server/logout.d.cts +10 -0
  186. package/dist/modules/auth/server/logout.d.cts.map +1 -0
  187. package/dist/modules/auth/server/logout.d.ts +10 -0
  188. package/dist/modules/auth/server/logout.d.ts.map +1 -0
  189. package/dist/modules/auth/server/logout.js +2 -0
  190. package/dist/modules/auth/server/logout.js.map +1 -0
  191. package/dist/modules/auth/server/proof.cjs +1 -0
  192. package/dist/modules/auth/server/proof.d.cts +6 -0
  193. package/dist/modules/auth/server/proof.d.cts.map +1 -0
  194. package/dist/modules/auth/server/proof.d.ts +6 -0
  195. package/dist/modules/auth/server/proof.d.ts.map +1 -0
  196. package/dist/modules/auth/server/proof.js +2 -0
  197. package/dist/modules/auth/server/proof.js.map +1 -0
  198. package/dist/modules/auth/server/resource.cjs +1 -0
  199. package/dist/modules/auth/server/resource.d.cts +10 -0
  200. package/dist/modules/auth/server/resource.d.cts.map +1 -0
  201. package/dist/modules/auth/server/resource.d.ts +10 -0
  202. package/dist/modules/auth/server/resource.d.ts.map +1 -0
  203. package/dist/modules/auth/server/resource.js +2 -0
  204. package/dist/modules/auth/server/resource.js.map +1 -0
  205. package/dist/modules/auth/server/revocation.cjs +1 -0
  206. package/dist/modules/auth/server/revocation.d.cts +4 -0
  207. package/dist/modules/auth/server/revocation.d.cts.map +1 -0
  208. package/dist/modules/auth/server/revocation.d.ts +4 -0
  209. package/dist/modules/auth/server/revocation.d.ts.map +1 -0
  210. package/dist/modules/auth/server/revocation.js +2 -0
  211. package/dist/modules/auth/server/revocation.js.map +1 -0
  212. package/dist/modules/common/admin.cjs +1 -0
  213. package/dist/modules/common/admin.d.cts +4 -0
  214. package/dist/modules/common/admin.d.cts.map +1 -0
  215. package/dist/modules/common/admin.d.ts +4 -0
  216. package/dist/modules/common/admin.d.ts.map +1 -0
  217. package/dist/modules/common/admin.js +2 -0
  218. package/dist/modules/common/admin.js.map +1 -0
  219. package/dist/modules/common/client.cjs +1 -0
  220. package/dist/modules/common/client.d.cts +118 -0
  221. package/dist/modules/common/client.d.cts.map +1 -0
  222. package/dist/modules/common/client.d.ts +118 -0
  223. package/dist/modules/common/client.d.ts.map +1 -0
  224. package/dist/modules/common/client.js +2 -0
  225. package/dist/modules/common/client.js.map +1 -0
  226. package/dist/modules/common/index.cjs +1 -0
  227. package/dist/modules/common/index.d.cts +6 -0
  228. package/dist/modules/common/index.d.ts +6 -0
  229. package/dist/modules/common/index.js +1 -0
  230. package/dist/modules/common/realtime.cjs +0 -0
  231. package/dist/modules/common/realtime.d.cts +2 -0
  232. package/dist/modules/common/realtime.d.ts +2 -0
  233. package/dist/modules/common/realtime.js +1 -0
  234. package/dist/modules/common/upload.cjs +1 -0
  235. package/dist/modules/common/upload.d.cts +4 -0
  236. package/dist/modules/common/upload.d.cts.map +1 -0
  237. package/dist/modules/common/upload.d.ts +4 -0
  238. package/dist/modules/common/upload.d.ts.map +1 -0
  239. package/dist/modules/common/upload.js +2 -0
  240. package/dist/modules/common/upload.js.map +1 -0
  241. package/dist/modules/desktop/index.cjs +1 -0
  242. package/dist/modules/desktop/index.d.cts +6 -0
  243. package/dist/modules/desktop/index.d.ts +6 -0
  244. package/dist/modules/desktop/index.js +1 -0
  245. package/dist/modules/desktop/interface.cjs +0 -0
  246. package/dist/modules/desktop/interface.d.cts +2 -0
  247. package/dist/modules/desktop/interface.d.ts +2 -0
  248. package/dist/modules/desktop/interface.js +1 -0
  249. package/dist/modules/desktop/rpc.cjs +1 -0
  250. package/dist/modules/desktop/rpc.d.cts +7 -0
  251. package/dist/modules/desktop/rpc.d.cts.map +1 -0
  252. package/dist/modules/desktop/rpc.d.ts +7 -0
  253. package/dist/modules/desktop/rpc.d.ts.map +1 -0
  254. package/dist/modules/desktop/rpc.js +2 -0
  255. package/dist/modules/desktop/rpc.js.map +1 -0
  256. package/dist/modules/desktop/shortcut.cjs +1 -0
  257. package/dist/modules/desktop/shortcut.d.cts +6 -0
  258. package/dist/modules/desktop/shortcut.d.cts.map +1 -0
  259. package/dist/modules/desktop/shortcut.d.ts +6 -0
  260. package/dist/modules/desktop/shortcut.d.ts.map +1 -0
  261. package/dist/modules/desktop/shortcut.js +2 -0
  262. package/dist/modules/desktop/shortcut.js.map +1 -0
  263. package/dist/modules/http/caller.cjs +1 -0
  264. package/dist/modules/http/caller.d.cts +18 -0
  265. package/dist/modules/http/caller.d.cts.map +1 -0
  266. package/dist/modules/http/caller.d.ts +18 -0
  267. package/dist/modules/http/caller.d.ts.map +1 -0
  268. package/dist/modules/http/caller.js +2 -0
  269. package/dist/modules/http/caller.js.map +1 -0
  270. package/dist/modules/http/error.cjs +1 -0
  271. package/dist/modules/http/error.d.cts +2 -0
  272. package/dist/modules/http/error.d.ts +2 -0
  273. package/dist/modules/http/error.js +2 -0
  274. package/dist/modules/http/error.js.map +1 -0
  275. package/dist/modules/http/fetcher.cjs +1 -0
  276. package/dist/modules/http/fetcher.d.cts +6 -0
  277. package/dist/modules/http/fetcher.d.cts.map +1 -0
  278. package/dist/modules/http/fetcher.d.ts +6 -0
  279. package/dist/modules/http/fetcher.d.ts.map +1 -0
  280. package/dist/modules/http/fetcher.js +2 -0
  281. package/dist/modules/http/fetcher.js.map +1 -0
  282. package/dist/modules/http/index.cjs +1 -0
  283. package/dist/modules/http/index.d.cts +5 -0
  284. package/dist/modules/http/index.d.ts +5 -0
  285. package/dist/modules/http/index.js +1 -0
  286. package/dist/modules/http/response.cjs +1 -0
  287. package/dist/modules/http/response.d.cts +6 -0
  288. package/dist/modules/http/response.d.cts.map +1 -0
  289. package/dist/modules/http/response.d.ts +6 -0
  290. package/dist/modules/http/response.d.ts.map +1 -0
  291. package/dist/modules/http/response.js +2 -0
  292. package/dist/modules/http/response.js.map +1 -0
  293. package/dist/modules/supabase/express/client.cjs +1 -0
  294. package/dist/modules/supabase/express/client.d.cts +3 -0
  295. package/dist/modules/supabase/express/client.d.cts.map +1 -0
  296. package/dist/modules/supabase/express/client.d.ts +3 -0
  297. package/dist/modules/supabase/express/client.d.ts.map +1 -0
  298. package/dist/modules/supabase/express/client.js +2 -0
  299. package/dist/modules/supabase/express/client.js.map +1 -0
  300. package/dist/modules/supabase/express/index.cjs +1 -0
  301. package/dist/modules/supabase/express/index.d.cts +3 -0
  302. package/dist/modules/supabase/express/index.d.ts +3 -0
  303. package/dist/modules/supabase/express/index.js +1 -0
  304. package/dist/modules/supabase/express/server.cjs +1 -0
  305. package/dist/modules/supabase/express/server.d.cts +2 -0
  306. package/dist/modules/supabase/express/server.d.ts +2 -0
  307. package/dist/modules/supabase/express/server.js +1 -0
  308. package/dist/modules/supabase/next/client.cjs +1 -0
  309. package/dist/modules/supabase/next/client.d.cts +60 -0
  310. package/dist/modules/supabase/next/client.d.cts.map +1 -0
  311. package/dist/modules/supabase/next/client.d.ts +60 -0
  312. package/dist/modules/supabase/next/client.d.ts.map +1 -0
  313. package/dist/modules/supabase/next/client.js +2 -0
  314. package/dist/modules/supabase/next/client.js.map +1 -0
  315. package/dist/modules/supabase/next/index.cjs +1 -0
  316. package/dist/modules/supabase/next/index.d.cts +5 -0
  317. package/dist/modules/supabase/next/index.d.ts +5 -0
  318. package/dist/modules/supabase/next/index.js +1 -0
  319. package/dist/modules/supabase/next/middleware.cjs +1 -0
  320. package/dist/modules/supabase/next/middleware.d.cts +2 -0
  321. package/dist/modules/supabase/next/middleware.d.cts.map +1 -0
  322. package/dist/modules/supabase/next/middleware.d.ts +2 -0
  323. package/dist/modules/supabase/next/middleware.d.ts.map +1 -0
  324. package/dist/modules/supabase/next/middleware.js +2 -0
  325. package/dist/modules/supabase/next/middleware.js.map +1 -0
  326. package/dist/modules/supabase/next/server.cjs +1 -0
  327. package/dist/modules/supabase/next/server.d.cts +61 -0
  328. package/dist/modules/supabase/next/server.d.cts.map +1 -0
  329. package/dist/modules/supabase/next/server.d.ts +61 -0
  330. package/dist/modules/supabase/next/server.d.ts.map +1 -0
  331. package/dist/modules/supabase/next/server.js +2 -0
  332. package/dist/modules/supabase/next/server.js.map +1 -0
  333. package/dist/rolldown-runtime-BocRIvOZ.cjs +1 -0
  334. package/dist/utils/formatter.cjs +1 -0
  335. package/dist/utils/formatter.d.cts +2 -0
  336. package/dist/utils/formatter.d.ts +2 -0
  337. package/dist/utils/formatter.js +2 -0
  338. package/dist/utils/formatter.js.map +1 -0
  339. package/dist/utils/interface.cjs +0 -0
  340. package/dist/utils/interface.d.cts +2 -0
  341. package/dist/utils/interface.d.ts +2 -0
  342. package/dist/utils/interface.js +1 -0
  343. package/docs/auth.md +183 -0
  344. package/docs/modules.md +36 -0
  345. package/package.json +189 -0
@@ -0,0 +1,2 @@
1
+ import{createAuthRetry as e}from"../auth/client/retry.js";import{normalizeCallerError as t}from"./error.js";import{createFetcher as n}from"./fetcher.js";import{isAxiosError as r}from"axios";function i(i){let a=n(i.client),o=i.refresh?e({refresh:i.refresh,getStatus:e=>r(e)?e.response?.status:void 0}):void 0;function s(e,t,n){if(t===!1||!i.notify)return;let r=typeof t==`object`?t[e]:void 0,a=typeof r==`function`?r(n):r??(e===`error`?n.message:void 0);if(a)try{i.notify(e,a)}catch{}}async function c(e){let{url:n,method:c=`GET`,body:l,params:u,query:d,baseURL:f,auth:p=!0,unwrapData:m=!0,schema:h,responseHandler:g,toast:_,onSuccess:v,onError:y,retryUnsafe:b,...x}=e,S=c.toUpperCase(),C=()=>a({...x,url:n,method:c,body:l,params:d??u,baseURL:f===null?``:f,responseType:x.responseType??(typeof g==`string`&&g!==`content-type`?g===`arrayBuffer`?`arraybuffer`:g:void 0)});try{x.signal?.throwIfAborted();let e=x.signal,t=o?await o.withAuthRetry(C,{signal:e,enabled:p&&(i.canRetry?.(n)??!/(?:^|\/)auth(?:\/|\?|$)/.test(n))&&([`GET`,`HEAD`,`OPTIONS`].includes(S)||b===!0)}):await C(),r=t.status===204||S===`HEAD`?null:typeof g==`function`?await g(t):m&&t.data!==null&&typeof t.data==`object`&&`data`in t.data?t.data.data:t.data;h&&(r=await h.parseAsync(r));let a=r;return await v?.(a),s(`success`,_,a),a}catch(e){let n=t(e);throw i.mapError&&(n=i.mapError(n,r(e)?e.response?.data:void 0)),await y?.(n),n.code!==`ERR_CANCELED`&&s(`error`,_,n),n}}return{caller:c,http:{request:c,get(e,t={}){return c({...t,url:e,method:`GET`})},post(e,t,n={}){return c({...n,url:e,method:`POST`,body:t})},put(e,t,n={}){return c({...n,url:e,method:`PUT`,body:t})},patch(e,t,n={}){return c({...n,url:e,method:`PATCH`,body:t})},delete(e,t={}){return c({...t,url:e,method:`DELETE`})},head(e,t={}){return c({...t,url:e,method:`HEAD`})},options(e,t={}){return c({...t,url:e,method:`OPTIONS`})}},reset:()=>o?.reset(),dispose:()=>o?.dispose()}}export{i as createCaller};
2
+ //# sourceMappingURL=caller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"caller.js","names":["createCaller","fetcher","createFetcher","options","retry","createAuthRetry","isAxiosError","error","notify","setting","configured","kind","message","value","caller","config","input","upperMethod","method","request","query","params","baseURL","responseHandler","signal","response","auth","url","retryUnsafe","data","unwrapData","schema","result","onSuccess","toast","normalized","normalizeCallerError","onError"],"sources":["../../../src/modules/http/caller.ts"],"sourcesContent":["import { createAuthRetry } from \"@/modules/auth/client/retry\";\nimport { CallerError, normalizeCallerError } from \"@/modules/http/error\";\nimport { createFetcher } from \"@/modules/http/fetcher\";\nimport type {\n CallerMethodOptions,\n CallerOptions,\n CallerRequestOptions,\n} from \"@/utils/interface\";\nimport { isAxiosError, type ResponseType } from \"axios\";\n\nexport function createCaller(options: CallerOptions) {\n const fetcher = createFetcher(options.client);\n const retry = options.refresh\n ? createAuthRetry({\n refresh: options.refresh,\n getStatus: (error) =>\n isAxiosError(error) ? error.response?.status : undefined,\n })\n : undefined;\n\n function notify<Data>(\n kind: \"success\" | \"error\",\n setting: CallerRequestOptions<Data>[\"toast\"],\n value: Data | CallerError,\n ) {\n if (setting === false || !options.notify) return;\n const configured = typeof setting === \"object\" ? setting[kind] : undefined;\n const message =\n typeof configured === \"function\"\n ? (configured as (value: Data | CallerError) => string)(value)\n : (configured ??\n (kind === \"error\" ? (value as CallerError).message : undefined));\n if (message) {\n try {\n options.notify(kind, message);\n } catch {\n /* UI observers cannot change request outcome. */\n }\n }\n }\n\n async function caller<\n Data = unknown,\n Body = unknown,\n Params = Record<string, unknown>,\n >(input: CallerRequestOptions<Data, Body, Params>): Promise<Data> {\n const {\n url,\n method = \"GET\",\n body,\n params,\n query,\n baseURL,\n auth = true,\n unwrapData = true,\n schema,\n responseHandler,\n toast,\n onSuccess,\n onError,\n retryUnsafe,\n ...config\n } = input;\n const upperMethod = method.toUpperCase();\n const request = () =>\n fetcher<unknown, Body, Params>({\n ...config,\n url,\n method,\n body,\n params: query ?? params,\n // null deliberately bypasses an instance's configured baseURL.\n baseURL: baseURL === null ? \"\" : baseURL,\n responseType:\n config.responseType ??\n (typeof responseHandler === \"string\" &&\n responseHandler !== \"content-type\"\n ? responseHandler === \"arrayBuffer\"\n ? \"arraybuffer\"\n : (responseHandler as ResponseType)\n : undefined),\n });\n try {\n config.signal?.throwIfAborted();\n const signal = config.signal as AbortSignal | undefined;\n const response = retry\n ? await retry.withAuthRetry(request, {\n signal,\n enabled:\n auth &&\n (options.canRetry?.(url) ??\n !/(?:^|\\/)auth(?:\\/|\\?|$)/.test(url)) &&\n ([\"GET\", \"HEAD\", \"OPTIONS\"].includes(upperMethod) ||\n retryUnsafe === true),\n })\n : await request();\n let data: unknown =\n response.status === 204 || upperMethod === \"HEAD\"\n ? null\n : typeof responseHandler === \"function\"\n ? await responseHandler(response)\n : unwrapData &&\n response.data !== null &&\n typeof response.data === \"object\" &&\n \"data\" in response.data\n ? response.data.data\n : response.data;\n if (schema) data = await schema.parseAsync(data);\n const result = data as Data;\n await onSuccess?.(result);\n notify(\"success\", toast, result);\n return result;\n } catch (error) {\n let normalized = normalizeCallerError(error);\n if (options.mapError)\n normalized = options.mapError(\n normalized,\n isAxiosError(error) ? error.response?.data : undefined,\n );\n await onError?.(normalized);\n if (normalized.code !== \"ERR_CANCELED\")\n notify(\"error\", toast, normalized);\n throw normalized;\n }\n }\n\n const http = {\n request: caller,\n get<Data = unknown, Params = Record<string, unknown>>(\n url: string,\n input: CallerMethodOptions<Data, never, Params> = {},\n ) {\n return caller<Data, never, Params>({ ...input, url, method: \"GET\" });\n },\n post<Data = unknown, Body = unknown, Params = Record<string, unknown>>(\n url: string,\n body?: Body,\n input: CallerMethodOptions<Data, Body, Params> = {},\n ) {\n return caller<Data, Body, Params>({\n ...input,\n url,\n method: \"POST\",\n body,\n });\n },\n put<Data = unknown, Body = unknown, Params = Record<string, unknown>>(\n url: string,\n body?: Body,\n input: CallerMethodOptions<Data, Body, Params> = {},\n ) {\n return caller<Data, Body, Params>({ ...input, url, method: \"PUT\", body });\n },\n patch<Data = unknown, Body = unknown, Params = Record<string, unknown>>(\n url: string,\n body?: Body,\n input: CallerMethodOptions<Data, Body, Params> = {},\n ) {\n return caller<Data, Body, Params>({\n ...input,\n url,\n method: \"PATCH\",\n body,\n });\n },\n delete<Data = unknown, Body = unknown, Params = Record<string, unknown>>(\n url: string,\n input: Omit<\n CallerRequestOptions<Data, Body, Params>,\n \"url\" | \"method\"\n > = {},\n ) {\n return caller<Data, Body, Params>({ ...input, url, method: \"DELETE\" });\n },\n head<Data = unknown, Params = Record<string, unknown>>(\n url: string,\n input: CallerMethodOptions<Data, never, Params> = {},\n ) {\n return caller<Data, never, Params>({ ...input, url, method: \"HEAD\" });\n },\n options<Data = unknown, Body = unknown, Params = Record<string, unknown>>(\n url: string,\n input: Omit<\n CallerRequestOptions<Data, Body, Params>,\n \"url\" | \"method\"\n > = {},\n ) {\n return caller<Data, Body, Params>({ ...input, url, method: \"OPTIONS\" });\n },\n };\n return {\n caller,\n http,\n reset: () => retry?.reset(),\n dispose: () => retry?.dispose(),\n };\n}\n\nexport type {\n CallerOptions,\n CallerRequestOptions,\n CallerResponseHandler,\n CallerToastOptions,\n} from \"@/utils/interface\";\n"],"mappings":"A,8LAUA,SAAgBA,EAAa,EAAwB,CACnD,IAAMC,EAAUC,EAAcC,EAAQ,MAAM,EACtCC,EAAQD,EAAQ,QAClBE,EAAgB,CACd,QAASF,EAAQ,QACjB,UAAY,GACVG,EAAaC,CAAK,EAAIA,EAAM,UAAU,OAAS,IAAA,EACnD,CAAC,EACD,IAAA,GAEJ,SAASC,EACP,EACA,EACA,EACA,CACA,GAAIC,IAAY,IAAS,CAACN,EAAQ,OAAQ,OAC1C,IAAMO,EAAa,OAAOD,GAAY,SAAWA,EAAQE,GAAQ,IAAA,GAC3DC,EACJ,OAAOF,GAAe,WACjBA,EAAqDG,CAAK,EAC1DH,IACAC,IAAS,QAAWE,EAAsB,QAAU,IAAA,IAC3D,GAAID,EACF,GAAI,CACFT,EAAQ,OAAOQ,EAAMC,CAAO,CAC9B,MAAQ,CAER,CAEJ,CAEA,eAAeE,EAIb,EAAgE,CAChE,GAAM,CACJ,MACA,SAAS,MACT,OACA,SACA,QACA,UACA,OAAO,GACP,aAAa,GACb,SACA,kBACA,QACA,YACA,UACA,cACA,GAAGC,GACDC,EACEC,EAAcC,EAAO,YAAY,EACjCC,MACJlB,EAA+B,CAC7B,GAAGc,EACH,MACA,SACA,OACA,OAAQK,GAASC,EAEjB,QAASC,IAAY,KAAO,GAAKA,EACjC,aACEP,EAAO,eACN,OAAOQ,GAAoB,UAC5BA,IAAoB,eAChBA,IAAoB,cAClB,cACCA,EACH,IAAA,GACR,CAAC,EACH,GAAI,CACFR,EAAO,QAAQ,eAAe,EAC9B,IAAMS,EAAST,EAAO,OAChBU,EAAWrB,EACb,MAAMA,EAAM,cAAce,EAAS,CACjC,SACA,QACEO,IACCvB,EAAQ,WAAWwB,CAAG,GACrB,CAAC,0BAA0B,KAAKA,CAAG,KACpC,CAAC,MAAO,OAAQ,SAAS,CAAC,CAAC,SAASV,CAAW,GAC9CW,IAAgB,GACtB,CAAC,EACD,MAAMT,EAAQ,EACdU,EACFJ,EAAS,SAAW,KAAOR,IAAgB,OACvC,KACA,OAAOM,GAAoB,WACzB,MAAMA,EAAgBE,CAAQ,EAC9BK,GACEL,EAAS,OAAS,MAClB,OAAOA,EAAS,MAAS,UACzB,SAAUA,EAAS,KACnBA,EAAS,KAAK,KACdA,EAAS,KACfM,IAAQ,EAAO,MAAMA,EAAO,WAAWF,CAAI,GAC/C,IAAMG,EAASH,EAGf,OAFA,MAAMI,IAAYD,CAAM,EACxBxB,EAAO,UAAW0B,EAAOF,CAAM,EACxBA,CACT,OAASzB,EAAO,CACd,IAAI4B,EAAaC,EAAqB7B,CAAK,EAS3C,MARIJ,EAAQ,WACV,EAAaA,EAAQ,SACnBgC,EACA7B,EAAaC,CAAK,EAAIA,EAAM,UAAU,KAAO,IAAA,EAC/C,GACF,MAAM8B,IAAUF,CAAU,EACtBA,EAAW,OAAS,gBACtB3B,EAAO,QAAS0B,EAAOC,CAAU,EAC7BA,CACR,CACF,CAkEA,MAAO,CACL,SACA,KAAA,CAjEA,QAASrB,EACT,IACE,EACA,EAAkD,CAAC,EACnD,CACA,OAAOA,EAA4B,CAAE,GAAGE,EAAO,MAAK,OAAQ,KAAM,CAAC,CACrE,EACA,KACE,EACA,EACA,EAAiD,CAAC,EAClD,CACA,OAAOF,EAA2B,CAChC,GAAGE,EACH,MACA,OAAQ,OACR,MACF,CAAC,CACH,EACA,IACE,EACA,EACA,EAAiD,CAAC,EAClD,CACA,OAAOF,EAA2B,CAAE,GAAGE,EAAO,MAAK,OAAQ,MAAO,MAAK,CAAC,CAC1E,EACA,MACE,EACA,EACA,EAAiD,CAAC,EAClD,CACA,OAAOF,EAA2B,CAChC,GAAGE,EACH,MACA,OAAQ,QACR,MACF,CAAC,CACH,EACA,OACE,EACA,EAGI,CAAC,EACL,CACA,OAAOF,EAA2B,CAAE,GAAGE,EAAO,MAAK,OAAQ,QAAS,CAAC,CACvE,EACA,KACE,EACA,EAAkD,CAAC,EACnD,CACA,OAAOF,EAA4B,CAAE,GAAGE,EAAO,MAAK,OAAQ,MAAO,CAAC,CACtE,EACA,QACE,EACA,EAGI,CAAC,EACL,CACA,OAAOF,EAA2B,CAAE,GAAGE,EAAO,MAAK,OAAQ,SAAU,CAAC,CACxE,CAIG,EACH,UAAaZ,GAAO,MAAM,EAC1B,YAAeA,GAAO,QAAQ,CAChC,CACF,C"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("axios");var t=class extends Error{status;code;details;constructor(e,t={}){super(e),this.name=`CallerError`,this.status=t.status,this.code=t.code,this.details=t.details}};function n(n){return n instanceof t?n:(0,e.isAxiosError)(n)?new t(n.code===`ERR_CANCELED`?`Request cancelled`:`Request failed`,{status:n.response?.status,code:n.code}):n instanceof DOMException&&n.name===`AbortError`?new t(`Request cancelled`,{code:`ERR_CANCELED`}):new t(`Request failed`)}exports.CallerError=t,exports.normalizeCallerError=n;
@@ -0,0 +1,2 @@
1
+ import { G as CallerError, K as normalizeCallerError, f as CallerErrorOptions } from "../../interface-BR9QNgXO.cjs";
2
+ export { CallerError, type CallerErrorOptions, normalizeCallerError };
@@ -0,0 +1,2 @@
1
+ import { G as CallerError, K as normalizeCallerError, f as CallerErrorOptions } from "../../interface-ii8DV63k.js";
2
+ export { CallerError, type CallerErrorOptions, normalizeCallerError };
@@ -0,0 +1,2 @@
1
+ import{isAxiosError as e}from"axios";var t=class extends Error{status;code;details;constructor(e,t={}){super(e),this.name=`CallerError`,this.status=t.status,this.code=t.code,this.details=t.details}};function n(n){return n instanceof t?n:e(n)?new t(n.code===`ERR_CANCELED`?`Request cancelled`:`Request failed`,{status:n.response?.status,code:n.code}):n instanceof DOMException&&n.name===`AbortError`?new t(`Request cancelled`,{code:`ERR_CANCELED`}):new t(`Request failed`)}export{t as CallerError,n as normalizeCallerError};
2
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","names":["CallerError","message","options","normalizeCallerError","error","isAxiosError"],"sources":["../../../src/modules/http/error.ts"],"sourcesContent":["import type { CallerErrorOptions } from \"@/utils/interface\";\nimport { isAxiosError } from \"axios\";\n\nexport class CallerError extends Error {\n readonly status?: number;\n readonly code?: string;\n readonly details?: unknown;\n constructor(message: string, options: CallerErrorOptions = {}) {\n super(message);\n this.name = \"CallerError\";\n this.status = options.status;\n this.code = options.code;\n this.details = options.details;\n }\n}\n\n/** Do not propagate raw Axios errors (which contain credentials and request bodies). */\nexport function normalizeCallerError(error: unknown): CallerError {\n if (error instanceof CallerError) return error;\n if (isAxiosError(error)) {\n return new CallerError(\n error.code === \"ERR_CANCELED\" ? \"Request cancelled\" : \"Request failed\",\n {\n status: error.response?.status,\n code: error.code,\n },\n );\n }\n if (error instanceof DOMException && error.name === \"AbortError\")\n return new CallerError(\"Request cancelled\", { code: \"ERR_CANCELED\" });\n return new CallerError(\"Request failed\");\n}\n\nexport type { CallerErrorOptions } from \"@/utils/interface\";\n"],"mappings":"A,qCAGA,IAAaA,EAAb,cAAiC,KAAM,CACrC,OACA,KACA,QACA,YAAY,EAAiB,EAA8B,CAAC,EAAG,CAC7D,MAAMC,CAAO,EACb,KAAK,KAAO,cACZ,KAAK,OAASC,EAAQ,OACtB,KAAK,KAAOA,EAAQ,KACpB,KAAK,QAAUA,EAAQ,OACzB,CACF,EAGA,SAAgBC,EAAqB,EAA6B,CAahE,OAZIC,aAAiBJ,EAAoBI,EACrCC,EAAaD,CAAK,EACb,IAAIJ,EACTI,EAAM,OAAS,eAAiB,oBAAsB,iBACtD,CACE,OAAQA,EAAM,UAAU,OACxB,KAAMA,EAAM,IACd,CACF,EAEEA,aAAiB,cAAgBA,EAAM,OAAS,aAC3C,IAAIJ,EAAY,oBAAqB,CAAE,KAAM,cAAe,CAAC,EAC/D,IAAIA,EAAY,gBAAgB,CACzC,C"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("axios");function t(t){return async function(n){let{url:r,method:i,body:a,params:o,headers:s,cache:c,credentials:l,redirect:u,maxRedirects:d,...f}=n,p=new e.AxiosHeaders(s);c===`no-store`?p.set(`Cache-Control`,`no-store`,!1):(c===`no-cache`||c===`reload`)&&p.set(`Cache-Control`,`no-cache`,!1);let m=await t.request({...f,url:String(r),method:i,data:a,params:o,headers:p,maxRedirects:u===`manual`||u===`error`?0:d,...l===void 0?{}:{withCredentials:l===`include`}});if(u===`error`&&m.status>=300&&m.status<400)throw Error(`Redirect refused`);return m}}exports.createFetcher=t;
@@ -0,0 +1,6 @@
1
+ import { E as FetcherOptions } from "../../interface-BR9QNgXO.cjs";
2
+ import { AxiosInstance, AxiosResponse } from "axios";
3
+ /** App owns instance setup, adapter selection, authentication and destination policy. */
4
+ export declare function createFetcher(client: Pick<AxiosInstance, "request">): <Data = unknown, Body = unknown, Params = Record<string, unknown>>(options: FetcherOptions<Body, Params>) => Promise<AxiosResponse<Data, Body>>;
5
+ export type { FetcherOptions };
6
+ //# sourceMappingURL=fetcher.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetcher.d.cts","names":[],"sources":["../../../src/modules/http/fetcher.ts"],"mappings":";;;wBASgB,cAAc,QAAQ,KAAK,6BAEvC,gBACA,gBACA,SAAS,yBACT,SAAS,eAAe,MAAM,YAAU,QAAQ,cAAc,MAAM"}
@@ -0,0 +1,6 @@
1
+ import { E as FetcherOptions } from "../../interface-ii8DV63k.js";
2
+ import { AxiosInstance, AxiosResponse } from "axios";
3
+ /** App owns instance setup, adapter selection, authentication and destination policy. */
4
+ export declare function createFetcher(client: Pick<AxiosInstance, "request">): <Data = unknown, Body = unknown, Params = Record<string, unknown>>(options: FetcherOptions<Body, Params>) => Promise<AxiosResponse<Data, Body>>;
5
+ export type { FetcherOptions };
6
+ //# sourceMappingURL=fetcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetcher.d.ts","names":[],"sources":["../../../src/modules/http/fetcher.ts"],"mappings":";;;wBASgB,cAAc,QAAQ,KAAK,6BAEvC,gBACA,gBACA,SAAS,yBACT,SAAS,eAAe,MAAM,YAAU,QAAQ,cAAc,MAAM"}
@@ -0,0 +1,2 @@
1
+ import{AxiosHeaders as e}from"axios";function t(t){return async function(n){let{url:r,method:i,body:a,params:o,headers:s,cache:c,credentials:l,redirect:u,maxRedirects:d,...f}=n,p=new e(s);c===`no-store`?p.set(`Cache-Control`,`no-store`,!1):(c===`no-cache`||c===`reload`)&&p.set(`Cache-Control`,`no-cache`,!1);let m=await t.request({...f,url:String(r),method:i,data:a,params:o,headers:p,maxRedirects:u===`manual`||u===`error`?0:d,...l===void 0?{}:{withCredentials:l===`include`}});if(u===`error`&&m.status>=300&&m.status<400)throw Error(`Redirect refused`);return m}}export{t as createFetcher};
2
+ //# sourceMappingURL=fetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetcher.js","names":["createFetcher","config","options","nextHeaders","AxiosHeaders","headers","cache","response","client","url","body","redirect","maxRedirects","credentials"],"sources":["../../../src/modules/http/fetcher.ts"],"sourcesContent":["import type { FetcherOptions } from \"@/utils/interface\";\nimport {\n AxiosHeaders,\n type AxiosInstance,\n type AxiosResponse,\n type RawAxiosHeaders,\n} from \"axios\";\n\n/** App owns instance setup, adapter selection, authentication and destination policy. */\nexport function createFetcher(client: Pick<AxiosInstance, \"request\">) {\n return async function fetcher<\n Data = unknown,\n Body = unknown,\n Params = Record<string, unknown>,\n >(options: FetcherOptions<Body, Params>): Promise<AxiosResponse<Data, Body>> {\n const {\n url,\n method,\n body,\n params,\n headers,\n cache,\n credentials,\n redirect,\n maxRedirects,\n ...config\n } = options;\n const nextHeaders = new AxiosHeaders(\n headers as RawAxiosHeaders | AxiosHeaders | undefined,\n );\n if (cache === \"no-store\")\n nextHeaders.set(\"Cache-Control\", \"no-store\", false);\n else if (cache === \"no-cache\" || cache === \"reload\")\n nextHeaders.set(\"Cache-Control\", \"no-cache\", false);\n const response = await client.request<\n Data,\n AxiosResponse<Data, Body>,\n Body\n >({\n ...config,\n url: String(url),\n method,\n data: body,\n params,\n headers: nextHeaders,\n maxRedirects:\n redirect === \"manual\" || redirect === \"error\" ? 0 : maxRedirects,\n ...(credentials === undefined\n ? {}\n : { withCredentials: credentials === \"include\" }),\n });\n if (redirect === \"error\" && response.status >= 300 && response.status < 400)\n throw new Error(\"Redirect refused\");\n return response;\n };\n}\n\nexport type { FetcherOptions } from \"@/utils/interface\";\n"],"mappings":"A,qCASA,SAAgBA,EAAc,EAAwC,CACpE,OAAO,eAIL,EAA2E,CAC3E,GAAM,CACJ,MACA,SACA,OACA,SACA,UACA,QACA,cACA,WACA,eACA,GAAGC,GACDC,EACEC,EAAc,IAAIC,EACtBC,CACF,EACIC,IAAU,WACZH,EAAY,IAAI,gBAAiB,WAAY,EAAK,GAC3CG,IAAU,YAAcA,IAAU,WACzCH,EAAY,IAAI,gBAAiB,WAAY,EAAK,EACpD,IAAMI,EAAW,MAAMC,EAAO,QAI5B,CACA,GAAGP,EACH,IAAK,OAAOQ,CAAG,EACf,SACA,KAAMC,EACN,SACA,QAASP,EACT,aACEQ,IAAa,UAAYA,IAAa,QAAU,EAAIC,EACtD,GAAIC,IAAgB,IAAA,GAChB,CAAC,EACD,CAAE,gBAAiBA,IAAgB,SAAU,CACnD,CAAC,EACD,GAAIF,IAAa,SAAWJ,EAAS,QAAU,KAAOA,EAAS,OAAS,IACtE,MAAU,MAAM,kBAAkB,EACpC,OAAOA,CACT,CACF,C"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./caller.cjs"),t=require("./error.cjs"),n=require("./fetcher.cjs"),r=require("./response.cjs");exports.CallerError=t.CallerError,exports.createCaller=e.createCaller,exports.createFetcher=n.createFetcher,exports.normalizeCallerError=t.normalizeCallerError,exports.toWebResponse=r.toWebResponse;
@@ -0,0 +1,5 @@
1
+ import { createCaller } from "./caller.cjs";
2
+ import { E as FetcherOptions, G as CallerError, K as normalizeCallerError, W as WebResponseOptions, _ as CallerToastOptions, f as CallerErrorOptions, g as CallerResponseHandler, h as CallerRequestOptions, m as CallerOptions } from "../../interface-BR9QNgXO.cjs";
3
+ import { createFetcher } from "./fetcher.cjs";
4
+ import { toWebResponse } from "./response.cjs";
5
+ export { CallerError, type CallerErrorOptions, type CallerOptions, type CallerRequestOptions, type CallerResponseHandler, type CallerToastOptions, type FetcherOptions, type WebResponseOptions, createCaller, createFetcher, normalizeCallerError, toWebResponse };
@@ -0,0 +1,5 @@
1
+ import { createCaller } from "./caller.js";
2
+ import { E as FetcherOptions, G as CallerError, K as normalizeCallerError, W as WebResponseOptions, _ as CallerToastOptions, f as CallerErrorOptions, g as CallerResponseHandler, h as CallerRequestOptions, m as CallerOptions } from "../../interface-ii8DV63k.js";
3
+ import { createFetcher } from "./fetcher.js";
4
+ import { toWebResponse } from "./response.js";
5
+ export { CallerError, type CallerErrorOptions, type CallerOptions, type CallerRequestOptions, type CallerResponseHandler, type CallerToastOptions, type FetcherOptions, type WebResponseOptions, createCaller, createFetcher, normalizeCallerError, toWebResponse };
@@ -0,0 +1 @@
1
+ import{createCaller as e}from"./caller.js";import{CallerError as t,normalizeCallerError as n}from"./error.js";import{createFetcher as r}from"./fetcher.js";import{toWebResponse as i}from"./response.js";export{t as CallerError,e as createCaller,r as createFetcher,n as normalizeCallerError,i as toWebResponse};
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../utils/formatter.cjs");function t(t,n={}){let r=e.formatResponseHeaders(t),i=n.emptyBody||[204,205,304].includes(t.status)?null:n.mapBody?n.mapBody(t.data):e.formatResponseBody(t.data,r);return new Response(i,{status:t.status,statusText:t.statusText,headers:r})}exports.toWebResponse=t;
@@ -0,0 +1,6 @@
1
+ import { W as WebResponseOptions } from "../../interface-BR9QNgXO.cjs";
2
+ import { AxiosResponse } from "axios";
3
+ /** Preserves multiple Set-Cookie values and JSON null; 204/205/304 have no body. */
4
+ export declare function toWebResponse<Data>(response: AxiosResponse<Data>, options?: WebResponseOptions): Response;
5
+ export type { WebResponseOptions };
6
+ //# sourceMappingURL=response.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.d.cts","names":[],"sources":["../../../src/modules/http/response.ts"],"mappings":";;;wBAKgB,cAAc,MAC5B,UAAU,cAAc,OACxB,UAAS,qBACR"}
@@ -0,0 +1,6 @@
1
+ import { W as WebResponseOptions } from "../../interface-ii8DV63k.js";
2
+ import { AxiosResponse } from "axios";
3
+ /** Preserves multiple Set-Cookie values and JSON null; 204/205/304 have no body. */
4
+ export declare function toWebResponse<Data>(response: AxiosResponse<Data>, options?: WebResponseOptions): Response;
5
+ export type { WebResponseOptions };
6
+ //# sourceMappingURL=response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.d.ts","names":[],"sources":["../../../src/modules/http/response.ts"],"mappings":";;;wBAKgB,cAAc,MAC5B,UAAU,cAAc,OACxB,UAAS,qBACR"}
@@ -0,0 +1,2 @@
1
+ import{formatResponseBody as e,formatResponseHeaders as t}from"../../utils/formatter.js";function n(n,r={}){let i=t(n),a=r.emptyBody||[204,205,304].includes(n.status)?null:r.mapBody?r.mapBody(n.data):e(n.data,i);return new Response(a,{status:n.status,statusText:n.statusText,headers:i})}export{n as toWebResponse};
2
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","names":["toWebResponse","headers","formatResponseHeaders","response","body","options","formatResponseBody"],"sources":["../../../src/modules/http/response.ts"],"sourcesContent":["import { formatResponseBody, formatResponseHeaders } from \"@/utils/formatter\";\nimport type { WebResponseOptions } from \"@/utils/interface\";\nimport type { AxiosResponse } from \"axios\";\n\n/** Preserves multiple Set-Cookie values and JSON null; 204/205/304 have no body. */\nexport function toWebResponse<Data>(\n response: AxiosResponse<Data>,\n options: WebResponseOptions = {},\n): Response {\n const headers = formatResponseHeaders(response);\n const body =\n options.emptyBody || [204, 205, 304].includes(response.status)\n ? null\n : options.mapBody\n ? options.mapBody(response.data)\n : formatResponseBody(response.data, headers);\n return new Response(body, {\n status: response.status,\n statusText: response.statusText,\n headers,\n });\n}\n\nexport type { WebResponseOptions } from \"@/utils/interface\";\n"],"mappings":"A,yFAKA,SAAgBA,EACd,EACA,EAA8B,CAAC,EACrB,CACV,IAAMC,EAAUC,EAAsBC,CAAQ,EACxCC,EACJC,EAAQ,WAAa,CAAC,IAAK,IAAK,GAAG,CAAC,CAAC,SAASF,EAAS,MAAM,EACzD,KACAE,EAAQ,QACNA,EAAQ,QAAQF,EAAS,IAAI,EAC7BG,EAAmBH,EAAS,KAAMF,CAAO,EACjD,OAAO,IAAI,SAASG,EAAM,CACxB,OAAQD,EAAS,OACjB,WAAYA,EAAS,WACrB,SACF,CAAC,CACH,C"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../common/admin.cjs");function t(t,n,r){return e.createCommonPublicClient(t,n,r)}exports.createExpressClient=t;
@@ -0,0 +1,3 @@
1
+ import { SupabaseClientOptions } from "@supabase/supabase-js";
2
+ export declare function createExpressClient(url: string, anonOrPublishableKey: string, options?: SupabaseClientOptions<"public">): import("@supabase/supabase-js").SupabaseClient<any, "public", "public", any, any>;
3
+ //# sourceMappingURL=client.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.cts","names":[],"sources":["../../../../src/modules/supabase/express/client.ts"],"mappings":";wBAGgB,oBACd,aACA,8BACA,UAAU,kEAA+B"}
@@ -0,0 +1,3 @@
1
+ import { SupabaseClientOptions } from "@supabase/supabase-js";
2
+ export declare function createExpressClient(url: string, anonOrPublishableKey: string, options?: SupabaseClientOptions<"public">): import("@supabase/supabase-js").SupabaseClient<any, "public", "public", any, any>;
3
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","names":[],"sources":["../../../../src/modules/supabase/express/client.ts"],"mappings":";wBAGgB,oBACd,aACA,8BACA,UAAU,kEAA+B"}
@@ -0,0 +1,2 @@
1
+ import{createCommonPublicClient as e}from"../../common/admin.js";function t(t,n,r){return e(t,n,r)}export{t as createExpressClient};
2
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","names":["createExpressClient","createCommonPublicClient","url","anonOrPublishableKey","options"],"sources":["../../../../src/modules/supabase/express/client.ts"],"sourcesContent":["import { createCommonPublicClient } from \"@/modules/common/admin\";\nimport type { SupabaseClientOptions } from \"@supabase/supabase-js\";\n\nexport function createExpressClient(\n url: string,\n anonOrPublishableKey: string,\n options?: SupabaseClientOptions<\"public\">,\n) {\n return createCommonPublicClient(url, anonOrPublishableKey, options);\n}\n"],"mappings":"A,iEAGA,SAAgBA,EACd,EACA,EACA,EACA,CACA,OAAOC,EAAyBC,EAAKC,EAAsBC,CAAO,CACpE,C"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./client.cjs");require("./server.cjs"),exports.createExpressClient=e.createExpressClient;
@@ -0,0 +1,3 @@
1
+ import { createExpressClient } from "./client.cjs";
2
+ import "./server.cjs";
3
+ export { createExpressClient };
@@ -0,0 +1,3 @@
1
+ import { createExpressClient } from "./client.js";
2
+ import "./server.js";
3
+ export { createExpressClient };
@@ -0,0 +1 @@
1
+ export{createExpressClient}from"./client.js";import"./server.js";
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./client.cjs");exports.createExpressClient=e.createExpressClient;
@@ -0,0 +1,2 @@
1
+ import { createExpressClient } from "./client.cjs";
2
+ export { createExpressClient };
@@ -0,0 +1,2 @@
1
+ import { createExpressClient } from "./client.js";
2
+ export { createExpressClient };
@@ -0,0 +1 @@
1
+ export{createExpressClient}from"./client.js";
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@supabase/ssr");function t(t,n,r){return(0,e.createBrowserClient)(t,n,r)}exports.createNextClient=t;
@@ -0,0 +1,60 @@
1
+ import { b as DefaultSchema, y as DatabaseSchema } from "../../../interface-BR9QNgXO.cjs";
2
+ import { SupabaseClientOptions } from "@supabase/supabase-js";
3
+ export declare function createNextClient<Database = any, SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>>(url: string, publishableKey: string, options?: SupabaseClientOptions<SchemaName>): import("@supabase/supabase-js").SupabaseClient<Database, SchemaName, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">, Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] extends {
4
+ Tables: Record<string, {
5
+ Row: Record<string, unknown>;
6
+ Insert: Record<string, unknown>;
7
+ Update: Record<string, unknown>;
8
+ Relationships: {
9
+ foreignKeyName: string;
10
+ columns: string[];
11
+ isOneToOne?: boolean;
12
+ referencedRelation: string;
13
+ referencedColumns: string[];
14
+ }[];
15
+ ComputedFields?: string;
16
+ }>;
17
+ Views: Record<string, {
18
+ Row: Record<string, unknown>;
19
+ Insert: Record<string, unknown>;
20
+ Update: Record<string, unknown>;
21
+ Relationships: {
22
+ foreignKeyName: string;
23
+ columns: string[];
24
+ isOneToOne?: boolean;
25
+ referencedRelation: string;
26
+ referencedColumns: string[];
27
+ }[];
28
+ ComputedFields?: string;
29
+ } | {
30
+ Row: Record<string, unknown>;
31
+ Relationships: {
32
+ foreignKeyName: string;
33
+ columns: string[];
34
+ isOneToOne?: boolean;
35
+ referencedRelation: string;
36
+ referencedColumns: string[];
37
+ }[];
38
+ ComputedFields?: string;
39
+ }>;
40
+ Functions: Record<string, {
41
+ Args: Record<string, unknown> | never;
42
+ Returns: unknown;
43
+ SetofOptions?: {
44
+ isSetofReturn?: boolean | undefined;
45
+ isOneToOne?: boolean | undefined;
46
+ isNotNullable?: boolean | undefined;
47
+ to: string;
48
+ from: string;
49
+ };
50
+ }>;
51
+ } ? Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] : never, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
52
+ __InternalSupabase: {
53
+ PostgrestVersion: string;
54
+ };
55
+ } ? Database["__InternalSupabase"] : {
56
+ PostgrestVersion: "12";
57
+ } : SchemaName extends {
58
+ PostgrestVersion: string;
59
+ } ? SchemaName : never>;
60
+ //# sourceMappingURL=client.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.cts","names":[],"sources":["../../../../src/modules/supabase/next/client.ts"],"mappings":";;wBAIgB,iBACd,gBACA,mBAAmB,eAAe,YAAY,cAAc,WAE5D,aACA,wBACA,UAAU,sBAAsB,8CAAW,eAAA,UAAA,YAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA,wDAAA,KAAA,gCAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO5C"}
@@ -0,0 +1,60 @@
1
+ import { b as DefaultSchema, y as DatabaseSchema } from "../../../interface-ii8DV63k.js";
2
+ import { SupabaseClientOptions } from "@supabase/supabase-js";
3
+ export declare function createNextClient<Database = any, SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>>(url: string, publishableKey: string, options?: SupabaseClientOptions<SchemaName>): import("@supabase/supabase-js").SupabaseClient<Database, SchemaName, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">, Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] extends {
4
+ Tables: Record<string, {
5
+ Row: Record<string, unknown>;
6
+ Insert: Record<string, unknown>;
7
+ Update: Record<string, unknown>;
8
+ Relationships: {
9
+ foreignKeyName: string;
10
+ columns: string[];
11
+ isOneToOne?: boolean;
12
+ referencedRelation: string;
13
+ referencedColumns: string[];
14
+ }[];
15
+ ComputedFields?: string;
16
+ }>;
17
+ Views: Record<string, {
18
+ Row: Record<string, unknown>;
19
+ Insert: Record<string, unknown>;
20
+ Update: Record<string, unknown>;
21
+ Relationships: {
22
+ foreignKeyName: string;
23
+ columns: string[];
24
+ isOneToOne?: boolean;
25
+ referencedRelation: string;
26
+ referencedColumns: string[];
27
+ }[];
28
+ ComputedFields?: string;
29
+ } | {
30
+ Row: Record<string, unknown>;
31
+ Relationships: {
32
+ foreignKeyName: string;
33
+ columns: string[];
34
+ isOneToOne?: boolean;
35
+ referencedRelation: string;
36
+ referencedColumns: string[];
37
+ }[];
38
+ ComputedFields?: string;
39
+ }>;
40
+ Functions: Record<string, {
41
+ Args: Record<string, unknown> | never;
42
+ Returns: unknown;
43
+ SetofOptions?: {
44
+ isSetofReturn?: boolean | undefined;
45
+ isOneToOne?: boolean | undefined;
46
+ isNotNullable?: boolean | undefined;
47
+ to: string;
48
+ from: string;
49
+ };
50
+ }>;
51
+ } ? Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] : never, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
52
+ __InternalSupabase: {
53
+ PostgrestVersion: string;
54
+ };
55
+ } ? Database["__InternalSupabase"] : {
56
+ PostgrestVersion: "12";
57
+ } : SchemaName extends {
58
+ PostgrestVersion: string;
59
+ } ? SchemaName : never>;
60
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","names":[],"sources":["../../../../src/modules/supabase/next/client.ts"],"mappings":";;wBAIgB,iBACd,gBACA,mBAAmB,eAAe,YAAY,cAAc,WAE5D,aACA,wBACA,UAAU,sBAAsB,8CAAW,eAAA,UAAA,YAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA,wDAAA,KAAA,gCAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO5C"}
@@ -0,0 +1,2 @@
1
+ import{createBrowserClient as e}from"@supabase/ssr";function t(t,n,r){return e(t,n,r)}export{t as createNextClient};
2
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","names":["createNextClient","createBrowserClient","url","publishableKey","options"],"sources":["../../../../src/modules/supabase/next/client.ts"],"sourcesContent":["import type { DatabaseSchema, DefaultSchema } from \"@/utils/interface\";\nimport { createBrowserClient } from \"@supabase/ssr\";\nimport type { SupabaseClientOptions } from \"@supabase/supabase-js\";\n\nexport function createNextClient<\n Database = any,\n SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>,\n>(\n url: string,\n publishableKey: string,\n options?: SupabaseClientOptions<SchemaName>,\n) {\n return createBrowserClient<Database, SchemaName>(\n url,\n publishableKey,\n options,\n );\n}\n"],"mappings":"A,oDAIA,SAAgBA,EAId,EACA,EACA,EACA,CACA,OAAOC,EACLC,EACAC,EACAC,CACF,CACF,C"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./client.cjs"),t=require("./middleware.cjs"),n=require("./server.cjs");exports.createNextClient=e.createNextClient,exports.createNextMiddleware=t.createNextMiddleware,exports.createServer=n.createServer;
@@ -0,0 +1,5 @@
1
+ import { v as CommonCookieMethods } from "../../../interface-BR9QNgXO.cjs";
2
+ import { createNextClient } from "./client.cjs";
3
+ import { createNextMiddleware } from "./middleware.cjs";
4
+ import { createServer } from "./server.cjs";
5
+ export { type CommonCookieMethods, createNextClient, createNextMiddleware, createServer };
@@ -0,0 +1,5 @@
1
+ import { v as CommonCookieMethods } from "../../../interface-ii8DV63k.js";
2
+ import { createNextClient } from "./client.js";
3
+ import { createNextMiddleware } from "./middleware.js";
4
+ import { createServer } from "./server.js";
5
+ export { type CommonCookieMethods, createNextClient, createNextMiddleware, createServer };
@@ -0,0 +1 @@
1
+ import{createNextClient as e}from"./client.js";import{createNextMiddleware as t}from"./middleware.js";import{createServer as n}from"./server.js";export{e as createNextClient,t as createNextMiddleware,n as createServer};
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(){}exports.createNextMiddleware=e;
@@ -0,0 +1,2 @@
1
+ export declare function createNextMiddleware(): void;
2
+ //# sourceMappingURL=middleware.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware.d.cts","names":[],"sources":["../../../../src/modules/supabase/next/middleware.ts"],"mappings":"A,wBAAgB"}
@@ -0,0 +1,2 @@
1
+ export declare function createNextMiddleware(): void;
2
+ //# sourceMappingURL=middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware.d.ts","names":[],"sources":["../../../../src/modules/supabase/next/middleware.ts"],"mappings":"A,wBAAgB"}
@@ -0,0 +1,2 @@
1
+ function e(){}export{e as createNextMiddleware};
2
+ //# sourceMappingURL=middleware.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware.js","names":["createNextMiddleware"],"sources":["../../../../src/modules/supabase/next/middleware.ts"],"sourcesContent":["export function createNextMiddleware() {}\n"],"mappings":"AAAA,SAAgBA,GAAuB,CAAC,C"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@supabase/ssr");function t(t,n,r,i){return(0,e.createServerClient)(t,n,{...i,cookies:{getAll(){return r.getAll()},async setAll(e,t){try{await r.setAll?.(e,t)}catch{}}}})}exports.createServer=t;
@@ -0,0 +1,61 @@
1
+ import { b as DefaultSchema, v as CommonCookieMethods, y as DatabaseSchema } from "../../../interface-BR9QNgXO.cjs";
2
+ import { SupabaseClientOptions } from "@supabase/supabase-js";
3
+ export declare function createServer<Database = any, SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>>(url: string, publishableKey: string, cookies: CommonCookieMethods, options?: SupabaseClientOptions<SchemaName>): import("@supabase/supabase-js").SupabaseClient<Database, SchemaName, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">, Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] extends {
4
+ Tables: Record<string, {
5
+ Row: Record<string, unknown>;
6
+ Insert: Record<string, unknown>;
7
+ Update: Record<string, unknown>;
8
+ Relationships: {
9
+ foreignKeyName: string;
10
+ columns: string[];
11
+ isOneToOne?: boolean;
12
+ referencedRelation: string;
13
+ referencedColumns: string[];
14
+ }[];
15
+ ComputedFields?: string;
16
+ }>;
17
+ Views: Record<string, {
18
+ Row: Record<string, unknown>;
19
+ Insert: Record<string, unknown>;
20
+ Update: Record<string, unknown>;
21
+ Relationships: {
22
+ foreignKeyName: string;
23
+ columns: string[];
24
+ isOneToOne?: boolean;
25
+ referencedRelation: string;
26
+ referencedColumns: string[];
27
+ }[];
28
+ ComputedFields?: string;
29
+ } | {
30
+ Row: Record<string, unknown>;
31
+ Relationships: {
32
+ foreignKeyName: string;
33
+ columns: string[];
34
+ isOneToOne?: boolean;
35
+ referencedRelation: string;
36
+ referencedColumns: string[];
37
+ }[];
38
+ ComputedFields?: string;
39
+ }>;
40
+ Functions: Record<string, {
41
+ Args: Record<string, unknown> | never;
42
+ Returns: unknown;
43
+ SetofOptions?: {
44
+ isSetofReturn?: boolean | undefined;
45
+ isOneToOne?: boolean | undefined;
46
+ isNotNullable?: boolean | undefined;
47
+ to: string;
48
+ from: string;
49
+ };
50
+ }>;
51
+ } ? Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] : never, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
52
+ __InternalSupabase: {
53
+ PostgrestVersion: string;
54
+ };
55
+ } ? Database["__InternalSupabase"] : {
56
+ PostgrestVersion: "12";
57
+ } : SchemaName extends {
58
+ PostgrestVersion: string;
59
+ } ? SchemaName : never>;
60
+ export type { CommonCookieMethods };
61
+ //# sourceMappingURL=server.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.cts","names":[],"sources":["../../../../src/modules/supabase/next/server.ts"],"mappings":";;wBAQgB,aACd,gBACA,mBAAmB,eAAe,YAAY,cAAc,WAE5D,aACA,wBACA,SAAS,qBACT,UAAU,sBAAsB,8CAAW,eAAA,UAAA,YAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA,wDAAA,KAAA,gCAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiB5C"}
@@ -0,0 +1,61 @@
1
+ import { b as DefaultSchema, v as CommonCookieMethods, y as DatabaseSchema } from "../../../interface-ii8DV63k.js";
2
+ import { SupabaseClientOptions } from "@supabase/supabase-js";
3
+ export declare function createServer<Database = any, SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>>(url: string, publishableKey: string, cookies: CommonCookieMethods, options?: SupabaseClientOptions<SchemaName>): import("@supabase/supabase-js").SupabaseClient<Database, SchemaName, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">, Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] extends {
4
+ Tables: Record<string, {
5
+ Row: Record<string, unknown>;
6
+ Insert: Record<string, unknown>;
7
+ Update: Record<string, unknown>;
8
+ Relationships: {
9
+ foreignKeyName: string;
10
+ columns: string[];
11
+ isOneToOne?: boolean;
12
+ referencedRelation: string;
13
+ referencedColumns: string[];
14
+ }[];
15
+ ComputedFields?: string;
16
+ }>;
17
+ Views: Record<string, {
18
+ Row: Record<string, unknown>;
19
+ Insert: Record<string, unknown>;
20
+ Update: Record<string, unknown>;
21
+ Relationships: {
22
+ foreignKeyName: string;
23
+ columns: string[];
24
+ isOneToOne?: boolean;
25
+ referencedRelation: string;
26
+ referencedColumns: string[];
27
+ }[];
28
+ ComputedFields?: string;
29
+ } | {
30
+ Row: Record<string, unknown>;
31
+ Relationships: {
32
+ foreignKeyName: string;
33
+ columns: string[];
34
+ isOneToOne?: boolean;
35
+ referencedRelation: string;
36
+ referencedColumns: string[];
37
+ }[];
38
+ ComputedFields?: string;
39
+ }>;
40
+ Functions: Record<string, {
41
+ Args: Record<string, unknown> | never;
42
+ Returns: unknown;
43
+ SetofOptions?: {
44
+ isSetofReturn?: boolean | undefined;
45
+ isOneToOne?: boolean | undefined;
46
+ isNotNullable?: boolean | undefined;
47
+ to: string;
48
+ from: string;
49
+ };
50
+ }>;
51
+ } ? Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] : never, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
52
+ __InternalSupabase: {
53
+ PostgrestVersion: string;
54
+ };
55
+ } ? Database["__InternalSupabase"] : {
56
+ PostgrestVersion: "12";
57
+ } : SchemaName extends {
58
+ PostgrestVersion: string;
59
+ } ? SchemaName : never>;
60
+ export type { CommonCookieMethods };
61
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","names":[],"sources":["../../../../src/modules/supabase/next/server.ts"],"mappings":";;wBAQgB,aACd,gBACA,mBAAmB,eAAe,YAAY,cAAc,WAE5D,aACA,wBACA,SAAS,qBACT,UAAU,sBAAsB,8CAAW,eAAA,UAAA,YAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA,wDAAA,KAAA,gCAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiB5C"}
@@ -0,0 +1,2 @@
1
+ import{createServerClient as e}from"@supabase/ssr";function t(t,n,r,i){return e(t,n,{...i,cookies:{getAll(){return r.getAll()},async setAll(e,t){try{await r.setAll?.(e,t)}catch{}}}})}export{t as createServer};
2
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","names":["createServer","createServerClient","url","publishableKey","options","cookies","cookiesToSet","headers"],"sources":["../../../../src/modules/supabase/next/server.ts"],"sourcesContent":["import type {\n CommonCookieMethods,\n DatabaseSchema,\n DefaultSchema,\n} from \"@/utils/interface\";\nimport { createServerClient } from \"@supabase/ssr\";\nimport type { SupabaseClientOptions } from \"@supabase/supabase-js\";\n\nexport function createServer<\n Database = any,\n SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>,\n>(\n url: string,\n publishableKey: string,\n cookies: CommonCookieMethods,\n options?: SupabaseClientOptions<SchemaName>,\n) {\n return createServerClient<Database, SchemaName>(url, publishableKey, {\n ...options,\n cookies: {\n getAll() {\n return cookies.getAll();\n },\n async setAll(cookiesToSet, headers) {\n try {\n await cookies.setAll?.(cookiesToSet, headers);\n } catch {\n /* A read-only server render cannot persist refreshed cookies. */\n }\n },\n },\n });\n}\nexport type { CommonCookieMethods } from \"@/utils/interface\";\n"],"mappings":"A,mDAQA,SAAgBA,EAId,EACA,EACA,EACA,EACA,CACA,OAAOC,EAAyCC,EAAKC,EAAgB,CACnE,GAAGC,EACH,QAAS,CACP,QAAS,CACP,OAAOC,EAAQ,OAAO,CACxB,EACA,MAAM,OAAO,EAAc,EAAS,CAClC,GAAI,CACF,MAAMA,EAAQ,SAASC,EAAcC,CAAO,CAC9C,MAAQ,CAER,CACF,CACF,CACF,CAAC,CACH,C"}
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return{subject:e.sub,name:e.name,email:e.email,emailVerified:e.email_verified,username:e.preferred_username,image:e.picture}}function t(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function n(e,t,n,r){return{status:e,body:JSON.stringify({error:{message:t,code:n,data:{code:r,httpStatus:e}}})}}function r(e){if(!e.trim())return``;let t=e.split(`+`).map(e=>e.trim()),n=t.pop().replace(/^Arrow/,``);if(!/^(?:[a-z0-9,./;[\]\\-]|Tab|Space|Plus|Enter|Backspace|Delete|Escape|Up|Down|Left|Right|F(?:[1-9]|1[0-9]|2[0-4]))$/i.test(n))throw Error(`Choose a letter, number, function key or navigation key.`);let r=[`CmdOrCtrl`,`Ctrl`,`Alt`,`Shift`,`Super`];if(t.some(e=>!r.includes(e))||new Set(t).size!==t.length||!t.some(e=>[`CmdOrCtrl`,`Ctrl`,`Alt`,`Super`].includes(e))&&!/^F\d+$/i.test(n))throw Error(`Use Command/Control, Alt, or a function key.`);let i=[`Tab`,`Space`,`Plus`,`Enter`,`Backspace`,`Delete`,`Escape`,`Up`,`Down`,`Left`,`Right`];return[...r.filter(e=>t.includes(e)),i.find(e=>e.toLowerCase()===n.toLowerCase())??n.toUpperCase()].join(`+`)}function i(e,t){return e.replace(`CmdOrCtrl`,t?`Super`:`Ctrl`).split(`+`).sort().join(`+`)}function a(e){let t=new Headers;for(let[n,r]of Object.entries(e.headers))if(r!=null&&r!==!1)for(let e of Array.isArray(r)?r:[r])t.append(n,String(e));for(let e of(t.get(`connection`)??``).split(`,`))e.trim()&&t.delete(e.trim());for(let e of[`content-length`,`content-encoding`,`transfer-encoding`,`connection`,`keep-alive`,`trailer`,`upgrade`,`proxy-authenticate`,`proxy-authorization`])t.delete(e);return t}function o(e,t){if(e===void 0)return null;if(typeof e==`string`||e instanceof Blob||e instanceof ReadableStream||e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),t}if(e instanceof URLSearchParams||e instanceof FormData)return e;if(typeof e==`object`&&e&&`pipe`in e)throw TypeError(`Supply mapBody for a Node stream`);return t.has(`content-type`)||t.set(`content-type`,`application/json`),JSON.stringify(e)}exports.formatEpochMilliseconds=t,exports.formatOAuthIdentity=e,exports.formatResponseBody=o,exports.formatResponseHeaders=a,exports.formatRpcFailure=n,exports.normalizeAccelerator=r,exports.shortcutIdentity=i;
@@ -0,0 +1,2 @@
1
+ import { a as formatRpcFailure, i as formatResponseHeaders, n as formatOAuthIdentity, o as normalizeAccelerator, r as formatResponseBody, s as shortcutIdentity, t as formatEpochMilliseconds } from "../formatter-MMKFBkro.cjs";
2
+ export { formatEpochMilliseconds, formatOAuthIdentity, formatResponseBody, formatResponseHeaders, formatRpcFailure, normalizeAccelerator, shortcutIdentity };
@@ -0,0 +1,2 @@
1
+ import { a as formatRpcFailure, i as formatResponseHeaders, n as formatOAuthIdentity, o as normalizeAccelerator, r as formatResponseBody, s as shortcutIdentity, t as formatEpochMilliseconds } from "../formatter-vjbCoK9k.js";
2
+ export { formatEpochMilliseconds, formatOAuthIdentity, formatResponseBody, formatResponseHeaders, formatRpcFailure, normalizeAccelerator, shortcutIdentity };