gemi 0.84.1 → 0.86.0
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.
- package/dist/ai/Agent.d.ts +41 -3
- package/dist/ai/Agent.d.ts.map +1 -1
- package/dist/ai/AgentController.d.ts +238 -0
- package/dist/ai/AgentController.d.ts.map +1 -1
- package/dist/ai/AgentProvider.d.ts +15 -0
- package/dist/ai/AgentProvider.d.ts.map +1 -1
- package/dist/ai/client/index.d.ts +2 -2
- package/dist/ai/client/index.d.ts.map +1 -1
- package/dist/ai/client/index.js +138 -35
- package/dist/ai/client/index.js.map +1 -1
- package/dist/ai/client/reducer.d.ts +7 -1
- package/dist/ai/client/reducer.d.ts.map +1 -1
- package/dist/ai/generate.d.ts.map +1 -1
- package/dist/ai/index.d.ts +4 -2
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +12 -12
- package/dist/ai/index.js.map +19 -16
- package/dist/ai/providers/call.d.ts +4 -0
- package/dist/ai/providers/call.d.ts.map +1 -1
- package/dist/ai/providers/fileRejection.d.ts +84 -0
- package/dist/ai/providers/fileRejection.d.ts.map +1 -0
- package/dist/ai/providers/request.d.ts.map +1 -1
- package/dist/ai/redact.d.ts +70 -0
- package/dist/ai/redact.d.ts.map +1 -0
- package/dist/ai/signing.d.ts +33 -4
- package/dist/ai/signing.d.ts.map +1 -1
- package/dist/ai/store/Attachments.d.ts +5 -3
- package/dist/ai/store/Attachments.d.ts.map +1 -1
- package/dist/ai/store/FileOwners.d.ts +59 -0
- package/dist/ai/store/FileOwners.d.ts.map +1 -0
- package/dist/ai/store/LiveRuns.d.ts +25 -0
- package/dist/ai/store/LiveRuns.d.ts.map +1 -1
- package/dist/ai/store/MemoryAgentStore.d.ts +1 -0
- package/dist/ai/store/MemoryAgentStore.d.ts.map +1 -1
- package/dist/ai/store/Nonces.d.ts +109 -0
- package/dist/ai/store/Nonces.d.ts.map +1 -0
- package/dist/ai/store/index.d.ts +2 -0
- package/dist/ai/store/index.d.ts.map +1 -1
- package/dist/ai/types.d.ts +30 -1
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/ai/useChat.d.ts +62 -3
- package/dist/ai/useChat.d.ts.map +1 -1
- package/dist/app/index.js +1 -1
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-82nn71zs.js → chunk-09sr33ff.js} +2 -2
- package/dist/{chunk-82nn71zs.js.map → chunk-09sr33ff.js.map} +1 -1
- package/dist/chunk-174jkg6d.js +7 -0
- package/dist/{chunk-302mkqeq.js.map → chunk-174jkg6d.js.map} +9 -8
- package/dist/{chunk-87x692j7.js → chunk-1b5s4w5f.js} +2 -2
- package/dist/{chunk-87x692j7.js.map → chunk-1b5s4w5f.js.map} +1 -1
- package/dist/{chunk-rmv1jp9p.js → chunk-1jcp8m8h.js} +2 -2
- package/dist/{chunk-rmv1jp9p.js.map → chunk-1jcp8m8h.js.map} +1 -1
- package/dist/{chunk-g6qe6wyb.js → chunk-1w5a11cd.js} +2 -2
- package/dist/{chunk-g6qe6wyb.js.map → chunk-1w5a11cd.js.map} +1 -1
- package/dist/chunk-1wby1sr2.js +5 -0
- package/dist/{chunk-e43drft2.js.map → chunk-1wby1sr2.js.map} +3 -3
- package/dist/{chunk-vmpzg4z5.js → chunk-1yq1e6sb.js} +3 -3
- package/dist/{chunk-vmpzg4z5.js.map → chunk-1yq1e6sb.js.map} +1 -1
- package/dist/chunk-1yzdxv2a.js +5 -0
- package/dist/{chunk-tmwsvf02.js.map → chunk-1yzdxv2a.js.map} +1 -1
- package/dist/chunk-2dzqrf0z.js +55 -0
- package/dist/{chunk-rp5j1mgk.js.map → chunk-2dzqrf0z.js.map} +3 -3
- package/dist/{chunk-ah9ajys0.js → chunk-2gdhcswa.js} +1 -1
- package/dist/{chunk-1evk2pma.js → chunk-2yw23zhn.js} +4 -4
- package/dist/{chunk-1evk2pma.js.map → chunk-2yw23zhn.js.map} +1 -1
- package/dist/{chunk-3z6wkvwj.js → chunk-4ysar3ev.js} +2 -2
- package/dist/{chunk-3z6wkvwj.js.map → chunk-4ysar3ev.js.map} +1 -1
- package/dist/{chunk-z409rk5j.js → chunk-4zj05vry.js} +2 -2
- package/dist/{chunk-z409rk5j.js.map → chunk-4zj05vry.js.map} +1 -1
- package/dist/{chunk-1cebv3h8.js → chunk-55x9kkdt.js} +2 -2
- package/dist/{chunk-1cebv3h8.js.map → chunk-55x9kkdt.js.map} +1 -1
- package/dist/{chunk-3zb2ycxj.js → chunk-7c33ngqs.js} +2 -2
- package/dist/{chunk-3zb2ycxj.js.map → chunk-7c33ngqs.js.map} +1 -1
- package/dist/{chunk-en3mtnsg.js → chunk-7n5775qx.js} +2 -2
- package/dist/{chunk-en3mtnsg.js.map → chunk-7n5775qx.js.map} +1 -1
- package/dist/{chunk-bn9pzgww.js → chunk-7nj2t2gm.js} +2 -2
- package/dist/{chunk-bn9pzgww.js.map → chunk-7nj2t2gm.js.map} +1 -1
- package/dist/{chunk-kfavcgv2.js → chunk-81k26w39.js} +2 -2
- package/dist/{chunk-kfavcgv2.js.map → chunk-81k26w39.js.map} +1 -1
- package/dist/{chunk-cg4k40zy.js → chunk-81v4c4b1.js} +2 -2
- package/dist/{chunk-cg4k40zy.js.map → chunk-81v4c4b1.js.map} +1 -1
- package/dist/{chunk-wh728wd6.js → chunk-8gexb1gt.js} +2 -2
- package/dist/{chunk-wh728wd6.js.map → chunk-8gexb1gt.js.map} +1 -1
- package/dist/{chunk-zfch4da5.js → chunk-9tsw1bmt.js} +2 -2
- package/dist/{chunk-8mmfpqgs.js.map → chunk-9tsw1bmt.js.map} +1 -1
- package/dist/{chunk-m0zba09s.js → chunk-9tv5j3b2.js} +3 -3
- package/dist/{chunk-m0zba09s.js.map → chunk-9tv5j3b2.js.map} +1 -1
- package/dist/{chunk-jg9eqd3r.js → chunk-c3gzpjba.js} +1 -1
- package/dist/{chunk-r5e4vpa1.js → chunk-cbycz5z3.js} +2 -2
- package/dist/{chunk-r5e4vpa1.js.map → chunk-cbycz5z3.js.map} +1 -1
- package/dist/{chunk-cfvq30n4.js → chunk-cfykfnqx.js} +2 -2
- package/dist/{chunk-cfvq30n4.js.map → chunk-cfykfnqx.js.map} +1 -1
- package/dist/{chunk-eysexnqb.js → chunk-ct7wxm98.js} +2 -2
- package/dist/{chunk-eysexnqb.js.map → chunk-ct7wxm98.js.map} +1 -1
- package/dist/{chunk-v27a4se1.js → chunk-d3jkypc7.js} +3 -3
- package/dist/{chunk-v27a4se1.js.map → chunk-d3jkypc7.js.map} +1 -1
- package/dist/{chunk-vfrrzr10.js → chunk-dadygfkf.js} +2 -2
- package/dist/{chunk-vfrrzr10.js.map → chunk-dadygfkf.js.map} +1 -1
- package/dist/{chunk-m4xw99vm.js → chunk-dwqh79e5.js} +2 -2
- package/dist/{chunk-m4xw99vm.js.map → chunk-dwqh79e5.js.map} +1 -1
- package/dist/chunk-eptv0nvv.js +24 -0
- package/dist/chunk-eptv0nvv.js.map +17 -0
- package/dist/{chunk-ng8pp9k2.js → chunk-fbwe0agk.js} +2 -2
- package/dist/{chunk-ng8pp9k2.js.map → chunk-fbwe0agk.js.map} +1 -1
- package/dist/{chunk-495qwteq.js → chunk-fc2je244.js} +3 -3
- package/dist/{chunk-495qwteq.js.map → chunk-fc2je244.js.map} +1 -1
- package/dist/{chunk-gr61ymse.js → chunk-gx0x772p.js} +2 -2
- package/dist/{chunk-gr61ymse.js.map → chunk-gx0x772p.js.map} +1 -1
- package/dist/{chunk-tdnfhe7x.js → chunk-ha705bcz.js} +3 -3
- package/dist/{chunk-tdnfhe7x.js.map → chunk-ha705bcz.js.map} +1 -1
- package/dist/chunk-jhe0t7yj.js +5 -0
- package/dist/chunk-jhe0t7yj.js.map +11 -0
- package/dist/{chunk-d0qwdeza.js → chunk-k5j65f2c.js} +2 -2
- package/dist/{chunk-d0qwdeza.js.map → chunk-k5j65f2c.js.map} +1 -1
- package/dist/{chunk-pt59xjfc.js → chunk-kmsrzbx1.js} +2 -2
- package/dist/{chunk-pt59xjfc.js.map → chunk-kmsrzbx1.js.map} +1 -1
- package/dist/{chunk-v1nm4tcq.js → chunk-m7y8d3k7.js} +2 -2
- package/dist/{chunk-v1nm4tcq.js.map → chunk-m7y8d3k7.js.map} +1 -1
- package/dist/{chunk-k2qh3hvd.js → chunk-mk8m3ffx.js} +2 -2
- package/dist/{chunk-k2qh3hvd.js.map → chunk-mk8m3ffx.js.map} +1 -1
- package/dist/{chunk-z7442w3q.js → chunk-mszy6cfw.js} +2 -2
- package/dist/{chunk-z7442w3q.js.map → chunk-mszy6cfw.js.map} +1 -1
- package/dist/{chunk-kb3xk9r8.js → chunk-ndat0nf0.js} +2 -2
- package/dist/{chunk-kb3xk9r8.js.map → chunk-ndat0nf0.js.map} +1 -1
- package/dist/{chunk-j9wqzemf.js → chunk-p0m3qgs5.js} +2 -2
- package/dist/{chunk-j9wqzemf.js.map → chunk-p0m3qgs5.js.map} +1 -1
- package/dist/{chunk-8mmfpqgs.js → chunk-p7r3ecpk.js} +2 -2
- package/dist/{chunk-zfch4da5.js.map → chunk-p7r3ecpk.js.map} +1 -1
- package/dist/{chunk-zp971jp2.js → chunk-pmmrhak1.js} +3 -3
- package/dist/{chunk-zp971jp2.js.map → chunk-pmmrhak1.js.map} +1 -1
- package/dist/{chunk-0agfx93f.js → chunk-ptkt4h2j.js} +2 -2
- package/dist/{chunk-0agfx93f.js.map → chunk-ptkt4h2j.js.map} +1 -1
- package/dist/{chunk-nvj1z2rs.js → chunk-pzwyg474.js} +2 -2
- package/dist/{chunk-nvj1z2rs.js.map → chunk-pzwyg474.js.map} +1 -1
- package/dist/{chunk-73dk6k4p.js → chunk-qje4kdff.js} +3 -3
- package/dist/{chunk-73dk6k4p.js.map → chunk-qje4kdff.js.map} +1 -1
- package/dist/{chunk-yk8s5egf.js → chunk-rdnm6rem.js} +2 -2
- package/dist/{chunk-yk8s5egf.js.map → chunk-rdnm6rem.js.map} +1 -1
- package/dist/{chunk-enf9mdac.js → chunk-s046a984.js} +2 -2
- package/dist/{chunk-enf9mdac.js.map → chunk-s046a984.js.map} +1 -1
- package/dist/{chunk-1s914cdj.js → chunk-saqfc6vp.js} +3 -3
- package/dist/{chunk-1s914cdj.js.map → chunk-saqfc6vp.js.map} +1 -1
- package/dist/{chunk-pgpqsgzx.js → chunk-sejnmn1q.js} +1 -1
- package/dist/{chunk-xhha1gb3.js → chunk-sjckrbr2.js} +2 -2
- package/dist/{chunk-xhha1gb3.js.map → chunk-sjckrbr2.js.map} +1 -1
- package/dist/{chunk-r8nhndzb.js → chunk-swhyp0yw.js} +2 -2
- package/dist/{chunk-r8nhndzb.js.map → chunk-swhyp0yw.js.map} +1 -1
- package/dist/{chunk-wkdzz0rx.js → chunk-trdwxm5x.js} +3 -3
- package/dist/{chunk-wkdzz0rx.js.map → chunk-trdwxm5x.js.map} +1 -1
- package/dist/{chunk-aztkrzvf.js → chunk-v2hvnxsf.js} +2 -2
- package/dist/{chunk-aztkrzvf.js.map → chunk-v2hvnxsf.js.map} +1 -1
- package/dist/{chunk-57ryyhh3.js → chunk-v4ngf77f.js} +2 -2
- package/dist/{chunk-57ryyhh3.js.map → chunk-v4ngf77f.js.map} +1 -1
- package/dist/{chunk-159hyeng.js → chunk-v8nf45gt.js} +2 -2
- package/dist/{chunk-159hyeng.js.map → chunk-v8nf45gt.js.map} +1 -1
- package/dist/{chunk-ys4fejmx.js → chunk-vwp1g8wh.js} +2 -2
- package/dist/{chunk-ys4fejmx.js.map → chunk-vwp1g8wh.js.map} +1 -1
- package/dist/chunk-w312e9nx.js +5 -0
- package/dist/{chunk-ash9e6fn.js.map → chunk-w312e9nx.js.map} +4 -3
- package/dist/{chunk-wwdaswxh.js → chunk-wwzg4dmy.js} +3 -3
- package/dist/{chunk-wwdaswxh.js.map → chunk-wwzg4dmy.js.map} +1 -1
- package/dist/{chunk-wsx3j5ws.js → chunk-xckeyg3v.js} +2 -2
- package/dist/{chunk-wsx3j5ws.js.map → chunk-xckeyg3v.js.map} +1 -1
- package/dist/chunk-xx2zg6sk.js +17 -0
- package/dist/{chunk-49akdtfe.js.map → chunk-xx2zg6sk.js.map} +11 -12
- package/dist/{chunk-rqh2wdhb.js → chunk-y7qnx8vm.js} +2 -2
- package/dist/{chunk-rqh2wdhb.js.map → chunk-y7qnx8vm.js.map} +1 -1
- package/dist/{chunk-rv7da58g.js → chunk-z4k18gnp.js} +2 -2
- package/dist/{chunk-rv7da58g.js.map → chunk-z4k18gnp.js.map} +1 -1
- package/dist/{chunk-w099t7zj.js → chunk-zf4r4kat.js} +2 -2
- package/dist/{chunk-w099t7zj.js.map → chunk-zf4r4kat.js.map} +1 -1
- package/dist/{chunk-dvpxkzms.js → chunk-zs90w6ke.js} +2 -2
- package/dist/{chunk-dvpxkzms.js.map → chunk-zs90w6ke.js.map} +1 -1
- package/dist/chunks/{ThemeProvider-Dn3UREDn.js → ThemeProvider-D1kDfCwY.js} +59 -2
- package/dist/chunks/ThemeProvider-D1kDfCwY.js.map +1 -0
- package/dist/client/Link.d.ts.map +1 -1
- package/dist/client/MutationError.d.ts +60 -50
- package/dist/client/MutationError.d.ts.map +1 -1
- package/dist/client/ProgressManager.d.ts +1 -1
- package/dist/client/QueryResource.d.ts +20 -0
- package/dist/client/QueryResource.d.ts.map +1 -1
- package/dist/client/auth/useForgotPassword.d.ts +2 -1
- package/dist/client/auth/useForgotPassword.d.ts.map +1 -1
- package/dist/client/auth/useResetPassword.d.ts +2 -1
- package/dist/client/auth/useResetPassword.d.ts.map +1 -1
- package/dist/client/auth/useSignIn.d.ts +11 -1
- package/dist/client/auth/useSignIn.d.ts.map +1 -1
- package/dist/client/auth/useSignOut.d.ts +2 -1
- package/dist/client/auth/useSignOut.d.ts.map +1 -1
- package/dist/client/auth/useSignUp.d.ts +2 -1
- package/dist/client/auth/useSignUp.d.ts.map +1 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +169 -65
- package/dist/client/index.js.map +1 -1
- package/dist/client/useMutation.d.ts +33 -6
- package/dist/client/useMutation.d.ts.map +1 -1
- package/dist/client/useQuery.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/Email.d.ts.map +1 -1
- package/dist/email/debugEmail.d.ts +40 -0
- package/dist/email/debugEmail.d.ts.map +1 -0
- package/dist/email/index.js +4 -3
- package/dist/email/index.js.map +6 -5
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/http/ApiRouter.d.ts +12 -0
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/CSRFMiddleware.d.ts +1 -1
- package/dist/http/CSRFMiddleware.d.ts.map +1 -1
- package/dist/http/Error.d.ts +50 -0
- package/dist/http/Error.d.ts.map +1 -1
- package/dist/http/HttpRequest.d.ts +26 -0
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/RateLimitMiddleware.d.ts +6 -3
- package/dist/http/RateLimitMiddleware.d.ts.map +1 -1
- package/dist/http/Router.d.ts.map +1 -1
- package/dist/http/errors.d.ts.map +1 -1
- package/dist/http/index.d.ts +2 -1
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/http/mediaType.d.ts +16 -0
- package/dist/http/mediaType.d.ts.map +1 -0
- package/dist/http/refusal.d.ts +52 -0
- package/dist/http/refusal.d.ts.map +1 -0
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +2 -2
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +2 -2
- package/dist/orm/index.js +2 -2
- package/dist/orm/index.js.map +1 -1
- package/dist/server/devFetch.d.ts.map +1 -1
- package/dist/server/forwardedFor.d.ts +42 -0
- package/dist/server/forwardedFor.d.ts.map +1 -0
- package/dist/server/httpProd.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/staticFile.d.ts +33 -0
- package/dist/server/staticFile.d.ts.map +1 -0
- package/dist/server/unhandledError.d.ts.map +1 -1
- package/dist/services/index.js +2 -2
- package/dist/services/index.js.map +2 -2
- package/dist/services/mcp/McpRegistry.d.ts +2 -1
- package/dist/services/mcp/McpRegistry.d.ts.map +1 -1
- package/dist/services/mcp/toAgentTools.d.ts +1 -1
- package/dist/services/mcp/toAgentTools.d.ts.map +1 -1
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/services/router/notFound.d.ts.map +1 -1
- package/dist/services/router/policyDenied.d.ts.map +1 -1
- package/dist/services/router/serverQueryFetcher.d.ts.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/testing/index.js +1 -1
- package/package.json +1 -1
- package/skills/gemi-react-best-practices/rules/controller-throw-framework-errors.md +5 -0
- package/dist/chunk-302mkqeq.js +0 -7
- package/dist/chunk-49akdtfe.js +0 -17
- package/dist/chunk-ash9e6fn.js +0 -5
- package/dist/chunk-e43drft2.js +0 -5
- package/dist/chunk-j5xcfeqx.js +0 -24
- package/dist/chunk-j5xcfeqx.js.map +0 -16
- package/dist/chunk-rp5j1mgk.js +0 -55
- package/dist/chunk-tmwsvf02.js +0 -5
- package/dist/chunks/ThemeProvider-Dn3UREDn.js.map +0 -1
- /package/dist/{chunk-ah9ajys0.js.map → chunk-2gdhcswa.js.map} +0 -0
- /package/dist/{chunk-jg9eqd3r.js.map → chunk-c3gzpjba.js.map} +0 -0
- /package/dist/{chunk-pgpqsgzx.js.map → chunk-sejnmn1q.js.map} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RefusalKind } from "../http/refusal";
|
|
1
2
|
/**
|
|
2
3
|
* What a failed mutation hands `onError` and puts in `error` — `useMutation`
|
|
3
4
|
* and its `usePost`/`usePut`/`usePatch`/`useDelete` shorthands, `useUpload`,
|
|
@@ -10,33 +11,54 @@
|
|
|
10
11
|
* member by member, read off the server's error payloads and the client's
|
|
11
12
|
* fetch code (issue #626).
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* Since 0.85 every refusal is an object with a `kind`, its `message` and the
|
|
15
|
+
* `status` it came with (issue #673). Most refusals were a bare string before,
|
|
16
|
+
* which carried no status, so a refusal thrown with a message of its own could
|
|
17
|
+
* not be told apart from any other string. A server older than 0.85 still sends
|
|
18
|
+
* those strings; the client wraps them into the same object, so the guards and
|
|
19
|
+
* `error.message` work against either.
|
|
17
20
|
*/
|
|
18
21
|
/** A server-side `ValidationError` (400): messages keyed by field. */
|
|
19
22
|
export interface MutationValidationError {
|
|
20
23
|
kind: "validation_error";
|
|
21
24
|
messages: Record<string, string[]>;
|
|
25
|
+
status?: number;
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
|
-
* A single form-level message, which `<FormError>` renders
|
|
25
|
-
*
|
|
28
|
+
* A single form-level message, which `<FormError>` renders: a
|
|
29
|
+
* `RequestBreakerError` of the app's own, or any other 4xx that answered a
|
|
30
|
+
* message without a kind of its own.
|
|
26
31
|
*/
|
|
27
32
|
export interface MutationFormError {
|
|
28
33
|
kind: "form_error";
|
|
29
34
|
message: string;
|
|
35
|
+
status?: number;
|
|
30
36
|
}
|
|
31
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* The server failed: an unhandled exception (500; under `gemi dev` the message
|
|
39
|
+
* is the exception's), or a failed `useUpload` whose body was not JSON.
|
|
40
|
+
*/
|
|
32
41
|
export interface MutationServerError {
|
|
33
42
|
kind: "server_error";
|
|
34
43
|
message: string;
|
|
44
|
+
status?: number;
|
|
35
45
|
}
|
|
46
|
+
/** The refusals other than the three above. */
|
|
47
|
+
export type MutationRefusalKind = Exclude<RefusalKind, "validation_error" | "form_error" | "server_error">;
|
|
36
48
|
/**
|
|
37
|
-
* A
|
|
38
|
-
*
|
|
39
|
-
* `
|
|
49
|
+
* A refusal: `authentication` (401), `authorization` (`AuthorizationError`,
|
|
50
|
+
* 401), `permission` (`InsufficientPermissionsError` or a policy, 403), `csrf`
|
|
51
|
+
* (403), `not_found` (404), `range_not_satisfiable` (416) or `rate_limit`
|
|
52
|
+
* (429). `message` is the one it was thrown with.
|
|
53
|
+
*/
|
|
54
|
+
export interface MutationRefusal<K extends MutationRefusalKind = MutationRefusalKind> {
|
|
55
|
+
kind: K;
|
|
56
|
+
message: string;
|
|
57
|
+
status: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated A `{ message }` body is wrapped into a `MutationRefusal` or
|
|
61
|
+
* `MutationFormError` since 0.85, and `MutationError` no longer includes this.
|
|
40
62
|
*/
|
|
41
63
|
export interface MutationMessageError {
|
|
42
64
|
kind?: undefined;
|
|
@@ -46,44 +68,35 @@ export interface MutationMessageError {
|
|
|
46
68
|
* Every value `onError` receives and `error` holds for a request gemi's server
|
|
47
69
|
* answered, or failed to reach:
|
|
48
70
|
*
|
|
49
|
-
* - `MutationValidationError`, `MutationFormError`, `MutationServerError
|
|
50
|
-
* tagged with `kind`.
|
|
51
|
-
* - `MutationMessageError` — `{ message }`, see above.
|
|
52
|
-
* - `string` — a refusal or failure answered with a bare string:
|
|
53
|
-
* `"Authentication error"` (401), `"Not authorized"` (401), `"Insufficient
|
|
54
|
-
* permissions"` (403), `"Invalid CSRF token"` (403), `"Internal Server
|
|
55
|
-
* Error"` (500; the exception's message under `gemi dev`). A refusal thrown
|
|
56
|
-
* with a message of its own arrives as that message.
|
|
71
|
+
* - `MutationValidationError`, `MutationFormError`, `MutationServerError`,
|
|
72
|
+
* `MutationRefusal` — tagged with `kind`, and (from the server) `status`.
|
|
57
73
|
* - `Error` — raised in the browser: a `TypeError` when the request never got
|
|
58
74
|
* an answer (offline, DNS, CORS), a `SyntaxError` when the answer was not
|
|
59
75
|
* JSON (a proxy's HTML error page, say). A throw from an `onSuccess` of
|
|
60
76
|
* yours is reported through `onError` as well, as whatever it threw.
|
|
61
77
|
*
|
|
62
|
-
* A cancelled request is not an error: `onCanceled`
|
|
63
|
-
* `null`. A route that answers an error body of its own
|
|
64
|
-
* type: a body with an `error` field
|
|
65
|
-
* 409 })`) hands over that field, as
|
|
66
|
-
* is handed over whole.
|
|
78
|
+
* Never a string since 0.85. A cancelled request is not an error: `onCanceled`
|
|
79
|
+
* runs and `error` stays `null`. A route that answers an error body of its own
|
|
80
|
+
* shape is outside this type: a body with an `error` field
|
|
81
|
+
* (`HttpResponse.json({ error }, { status: 409 })`) hands over that field, as
|
|
82
|
+
* gemi's own errors do, and any other body is handed over whole. Either is
|
|
83
|
+
* given a `kind` (from the status) and the `status` when it is an object with
|
|
84
|
+
* a string `message` and no `kind`, and becomes one when it is a string.
|
|
67
85
|
*/
|
|
68
|
-
export type MutationError = MutationValidationError | MutationFormError | MutationServerError |
|
|
86
|
+
export type MutationError = MutationValidationError | MutationFormError | MutationServerError | MutationRefusal | Error;
|
|
69
87
|
/** What `mutationErrorKind` answers, one per guard below. */
|
|
70
88
|
export type MutationErrorKind = "validation" | "form" | "authentication" | "permission" | "csrf" | "not_found" | "rate_limit" | "server" | "network" | "unknown";
|
|
71
|
-
declare const AUTHENTICATION = "Authentication error";
|
|
72
|
-
declare const CSRF = "Invalid CSRF token";
|
|
73
|
-
declare const SERVER = "Internal Server Error";
|
|
74
|
-
type PermissionRefusal = "Insufficient permissions" | "Not authorized";
|
|
75
|
-
type MessageOf<M extends string> = MutationMessageError & {
|
|
76
|
-
message: M;
|
|
77
|
-
};
|
|
78
89
|
/**
|
|
79
90
|
* The `MutationError` a non-2xx response's parsed body stands for.
|
|
80
91
|
*
|
|
81
92
|
* gemi's own error bodies are `{ error }`, and the value under `error` is what
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* over
|
|
93
|
+
* is handed over. An app's body without one —
|
|
94
|
+
* `HttpResponse.json({ message: "Taken" }, { status: 409 })` — is handed over
|
|
95
|
+
* whole. A body with no content (`null`) becomes a refusal naming the status.
|
|
96
|
+
*
|
|
97
|
+
* What is handed over carries `status`, and a `kind` when it has a `message`:
|
|
98
|
+
* a bare string, which servers before 0.85 sent for most refusals, becomes
|
|
99
|
+
* `{ kind, message, status }`, and so does a `{ message }` without a kind.
|
|
87
100
|
*
|
|
88
101
|
* @internal
|
|
89
102
|
*/
|
|
@@ -93,32 +106,29 @@ export declare function isValidationError(error: unknown): error is MutationVali
|
|
|
93
106
|
/** A form-level message, as `<FormError>` renders it. */
|
|
94
107
|
export declare function isFormError(error: unknown): error is MutationFormError;
|
|
95
108
|
/** No signed-in user: `AuthenticationError` (401). */
|
|
96
|
-
export declare function isAuthenticationError(error: unknown): error is
|
|
109
|
+
export declare function isAuthenticationError(error: unknown): error is MutationRefusal<"authentication">;
|
|
97
110
|
/**
|
|
98
111
|
* A signed-in user who may not do this: `InsufficientPermissionsError` (403),
|
|
99
|
-
* `AuthorizationError` (401) or a policy denial (403,
|
|
100
|
-
*
|
|
112
|
+
* `AuthorizationError` (401) or a policy denial (403), whatever message it was
|
|
113
|
+
* thrown with.
|
|
101
114
|
*/
|
|
102
|
-
export declare function isPermissionError(error: unknown): error is
|
|
115
|
+
export declare function isPermissionError(error: unknown): error is MutationRefusal<"permission" | "authorization">;
|
|
103
116
|
/** The CSRF cookie is missing or stale (403). A reload fixes it. */
|
|
104
|
-
export declare function isCsrfError(error: unknown): error is
|
|
117
|
+
export declare function isCsrfError(error: unknown): error is MutationRefusal<"csrf">;
|
|
105
118
|
/** A missing record, file or route (404). */
|
|
106
|
-
export declare function isNotFoundError(error: unknown): error is
|
|
119
|
+
export declare function isNotFoundError(error: unknown): error is MutationRefusal<"not_found">;
|
|
107
120
|
/** `RateLimitMiddleware` refused the request (429). */
|
|
108
|
-
export declare function isRateLimitError(error: unknown): error is
|
|
121
|
+
export declare function isRateLimitError(error: unknown): error is MutationRefusal<"rate_limit">;
|
|
109
122
|
/**
|
|
110
|
-
* The server failed (a
|
|
111
|
-
* JSON.
|
|
112
|
-
* is `"unknown"`.
|
|
123
|
+
* The server failed (a 500, under `gemi dev` too), or answered something that
|
|
124
|
+
* is not JSON.
|
|
113
125
|
*/
|
|
114
|
-
export declare function isServerError(error: unknown): error is
|
|
126
|
+
export declare function isServerError(error: unknown): error is MutationServerError | SyntaxError;
|
|
115
127
|
/** The request got no answer: offline, DNS, CORS, a dropped connection. */
|
|
116
128
|
export declare function isNetworkError(error: unknown): error is TypeError;
|
|
117
129
|
/**
|
|
118
130
|
* Which of the guards above `error` passes, for a `switch` over all of them.
|
|
119
|
-
* `"unknown"` is everything else: a
|
|
120
|
-
* a 500 under `gemi dev`, an error body of the app's own shape.
|
|
131
|
+
* `"unknown"` is everything else: a 416, an error body of the app's own shape.
|
|
121
132
|
*/
|
|
122
133
|
export declare function mutationErrorKind(error: unknown): MutationErrorKind;
|
|
123
|
-
export {};
|
|
124
134
|
//# sourceMappingURL=MutationError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutationError.d.ts","sourceRoot":"","sources":["../../client/MutationError.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"MutationError.d.ts","sourceRoot":"","sources":["../../client/MutationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEzE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,sEAAsE;AACtE,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC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,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAEtE;AAED,sDAAsD;AACtD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,eAAe,CAAC,gBAAgB,CAAC,CAE5C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,eAAe,CAAC,YAAY,GAAG,eAAe,CAAC,CAG1D;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAAC,MAAM,CAAC,CAE5E;AAED,6CAA6C;AAC7C,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,eAAe,CAAC,WAAW,CAAC,CAEvC;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,eAAe,CAAC,YAAY,CAAC,CAExC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,mBAAmB,GAAG,WAAW,CAE5C;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAEjE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAWnE"}
|
|
@@ -7,7 +7,7 @@ export declare class ProgressManager {
|
|
|
7
7
|
isTicking: boolean;
|
|
8
8
|
constructor(subject: Subject<boolean>);
|
|
9
9
|
getNextIncrement(): number;
|
|
10
|
-
getNextInterval(): 1000 | 200 | 100 |
|
|
10
|
+
getNextInterval(): 400 | 1000 | 200 | 100 | 2000;
|
|
11
11
|
nextTick(): Promise<void>;
|
|
12
12
|
start(): void;
|
|
13
13
|
end(): void;
|
|
@@ -65,6 +65,13 @@ export declare class QueryResource {
|
|
|
65
65
|
private seq;
|
|
66
66
|
private issued;
|
|
67
67
|
private applied;
|
|
68
|
+
/**
|
|
69
|
+
* The abort controller of every request on the wire, per variant (#659).
|
|
70
|
+
* When the last mounted reader of a variant lets go of it, its requests are
|
|
71
|
+
* aborted: nobody is left to render the answer, and the server sees the
|
|
72
|
+
* disconnect through `req.signal`.
|
|
73
|
+
*/
|
|
74
|
+
private controllers;
|
|
68
75
|
constructor(key: string, initialState: Record<string, any>);
|
|
69
76
|
/**
|
|
70
77
|
* Adopt server-prefetched data into the cache.
|
|
@@ -128,6 +135,19 @@ export declare class QueryResource {
|
|
|
128
135
|
* put on screen.
|
|
129
136
|
*/
|
|
130
137
|
retain(variantKey: string): () => void;
|
|
138
|
+
/**
|
|
139
|
+
* Abort the variant's requests on the wire once nobody renders it (#659) —
|
|
140
|
+
* e.g. a `search` that changed again before its answer landed. Deferred a
|
|
141
|
+
* task so a reader that lets go and takes hold again in the same commit
|
|
142
|
+
* (StrictMode's double effects, a resubscribe) never cancels anything.
|
|
143
|
+
*
|
|
144
|
+
* A request with no mounted reader at all — a hover `prefetch`, a render
|
|
145
|
+
* that suspended for the first time — is never aborted here: only losing
|
|
146
|
+
* the *last* reader does that.
|
|
147
|
+
*/
|
|
148
|
+
private scheduleAbort;
|
|
149
|
+
/** Abort every request on the wire for this variant. */
|
|
150
|
+
private abort;
|
|
131
151
|
/** How many fetches of this variant have failed in a row (0 after a success). */
|
|
132
152
|
failureCount(variantKey: string): number;
|
|
133
153
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryResource.d.ts","sourceRoot":"","sources":["../../client/QueryResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,GAAG,CAAC;IACV;;;;;;OAMG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,GAAG,CAAC;IACX,OAA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AM;IAIxC;;;;;OAKG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAqB/C,WAAW,CAAC,UAAU,EAAE,MAAM;IAQ9B;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM;IAQ3B,2EAA2E;IAC3E,WAAW,IAAI,MAAM,EAAE;IAIvB;;;;;OAKG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG;IAgBtD,OAAO,CAAC,aAAa;IAiBrB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,GAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAoB;IA8BlE,OAAO,CAAC,UAAU,EAAE,MAAM;IAI1B,4EAA4E;IAC5E,OAAO,CAAC,WAAW;YAIL,cAAc;CAsK7B"}
|
|
@@ -5,12 +5,13 @@ export declare function useForgotPassword(args?: UseForgotPasswordArgs): {
|
|
|
5
5
|
data: {};
|
|
6
6
|
error: import("gemi/client").MutationError;
|
|
7
7
|
loading: boolean;
|
|
8
|
+
pending: number;
|
|
8
9
|
formData: FormData;
|
|
9
10
|
cancel: () => void;
|
|
10
11
|
trigger: {
|
|
11
12
|
(input?: {
|
|
12
13
|
email: string;
|
|
13
|
-
}): Promise<{}>;
|
|
14
|
+
}, call?: import("../useMutation").MutationCallConfig<{}>): Promise<{}>;
|
|
14
15
|
formData(formData: FormData): Promise<{}>;
|
|
15
16
|
};
|
|
16
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForgotPassword.d.ts","sourceRoot":"","sources":["../../../client/auth/useForgotPassword.ts"],"names":[],"mappings":"AAEA,UAAU,qBAAqB;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,qBAAmC
|
|
1
|
+
{"version":3,"file":"useForgotPassword.d.ts","sourceRoot":"","sources":["../../../client/auth/useForgotPassword.ts"],"names":[],"mappings":"AAEA,UAAU,qBAAqB;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,qBAAmC;;;;;;;;;;;;;EAU1E"}
|
|
@@ -5,13 +5,14 @@ export declare function useResetPassword(args?: UseResetPasswordArgs): {
|
|
|
5
5
|
data: {};
|
|
6
6
|
error: import("gemi/client").MutationError;
|
|
7
7
|
loading: boolean;
|
|
8
|
+
pending: number;
|
|
8
9
|
formData: FormData;
|
|
9
10
|
cancel: () => void;
|
|
10
11
|
trigger: {
|
|
11
12
|
(input?: {
|
|
12
13
|
password: string;
|
|
13
14
|
token: string;
|
|
14
|
-
}): Promise<{}>;
|
|
15
|
+
}, call?: import("../useMutation").MutationCallConfig<{}>): Promise<{}>;
|
|
15
16
|
formData(formData: FormData): Promise<{}>;
|
|
16
17
|
};
|
|
17
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResetPassword.d.ts","sourceRoot":"","sources":["../../../client/auth/useResetPassword.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,oBAAkC
|
|
1
|
+
{"version":3,"file":"useResetPassword.d.ts","sourceRoot":"","sources":["../../../client/auth/useResetPassword.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,oBAAkC;;;;;;;;;;;;;;EAUxE"}
|
|
@@ -14,13 +14,23 @@ export declare function useSignIn(args?: UseSignInArgs): {
|
|
|
14
14
|
};
|
|
15
15
|
error: import("gemi/client").MutationError;
|
|
16
16
|
loading: boolean;
|
|
17
|
+
pending: number;
|
|
17
18
|
formData: FormData;
|
|
18
19
|
cancel: () => void;
|
|
19
20
|
trigger: {
|
|
20
21
|
(input?: {
|
|
21
22
|
email: string;
|
|
22
23
|
password: string;
|
|
23
|
-
})
|
|
24
|
+
}, call?: import("../useMutation").MutationCallConfig<{
|
|
25
|
+
id: number;
|
|
26
|
+
publicId: string;
|
|
27
|
+
name: string | null;
|
|
28
|
+
email: string | null;
|
|
29
|
+
emailVerifiedAt: Date | null;
|
|
30
|
+
globalRole: number;
|
|
31
|
+
accounts: import("../../auth/types").Account[];
|
|
32
|
+
extension: Record<string, any>;
|
|
33
|
+
}>): Promise<{
|
|
24
34
|
id: number;
|
|
25
35
|
publicId: string;
|
|
26
36
|
name: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignIn.d.ts","sourceRoot":"","sources":["../../../client/auth/useSignIn.tsx"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC;AAMD,wBAAgB,SAAS,CAAC,IAAI,GAAE,aAA2B
|
|
1
|
+
{"version":3,"file":"useSignIn.d.ts","sourceRoot":"","sources":["../../../client/auth/useSignIn.tsx"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC;AAMD,wBAAgB,SAAS,CAAC,IAAI,GAAE,aAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe1D"}
|
|
@@ -5,10 +5,11 @@ export declare function useSignOut(args?: UseSignOutArgs): {
|
|
|
5
5
|
data: {};
|
|
6
6
|
error: import("gemi/client").MutationError;
|
|
7
7
|
loading: boolean;
|
|
8
|
+
pending: number;
|
|
8
9
|
formData: FormData;
|
|
9
10
|
cancel: () => void;
|
|
10
11
|
trigger: {
|
|
11
|
-
(input?: Record<string, never>): Promise<{}>;
|
|
12
|
+
(input?: Record<string, never>, call?: import("../useMutation").MutationCallConfig<{}>): Promise<{}>;
|
|
12
13
|
formData(formData: FormData): Promise<{}>;
|
|
13
14
|
};
|
|
14
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignOut.d.ts","sourceRoot":"","sources":["../../../client/auth/useSignOut.ts"],"names":[],"mappings":"AAGA,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAMD,wBAAgB,UAAU,CAAC,IAAI,GAAE,cAA4B
|
|
1
|
+
{"version":3,"file":"useSignOut.d.ts","sourceRoot":"","sources":["../../../client/auth/useSignOut.ts"],"names":[],"mappings":"AAGA,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAMD,wBAAgB,UAAU,CAAC,IAAI,GAAE,cAA4B;;;;;;;;;;;EAY5D"}
|
|
@@ -2,10 +2,11 @@ export declare function useSignUp(): {
|
|
|
2
2
|
data: import("../../auth/types").User;
|
|
3
3
|
error: import("gemi/client").MutationError;
|
|
4
4
|
loading: boolean;
|
|
5
|
+
pending: number;
|
|
5
6
|
formData: FormData;
|
|
6
7
|
cancel: () => void;
|
|
7
8
|
trigger: {
|
|
8
|
-
(input?: import("../../http/HttpRequest").Body): Promise<import("../../auth/types").User>;
|
|
9
|
+
(input?: import("../../http/HttpRequest").Body, call?: import("../useMutation").MutationCallConfig<import("../../auth/types").User>): Promise<import("../../auth/types").User>;
|
|
9
10
|
formData(formData: FormData): Promise<import("../../auth/types").User>;
|
|
10
11
|
};
|
|
11
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignUp.d.ts","sourceRoot":"","sources":["../../../client/auth/useSignUp.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS
|
|
1
|
+
{"version":3,"file":"useSignUp.d.ts","sourceRoot":"","sources":["../../../client/auth/useSignUp.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS;;;;;;;;;;;EAExB"}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -7,9 +7,11 @@ export { QueryError } from "./QueryError";
|
|
|
7
7
|
export { isRetryableQueryError } from "./retryPolicy";
|
|
8
8
|
export type { QueryFailure, RetryOption, RetryDelayOption, } from "./retryPolicy";
|
|
9
9
|
export { useMutation, useDelete, usePatch, usePost, usePut, useUpload } from "./useMutation";
|
|
10
|
+
export type { MutationCallConfig, MutationConcurrency } from "./useMutation";
|
|
10
11
|
export { useMutate } from "./useMutate";
|
|
11
12
|
export { isValidationError, isFormError, isAuthenticationError, isPermissionError, isCsrfError, isNotFoundError, isRateLimitError, isServerError, isNetworkError, mutationErrorKind, } from "./MutationError";
|
|
12
|
-
export type { MutationError, MutationErrorKind, MutationValidationError, MutationFormError, MutationServerError, MutationMessageError, } from "./MutationError";
|
|
13
|
+
export type { MutationError, MutationErrorKind, MutationValidationError, MutationFormError, MutationServerError, MutationRefusal, MutationRefusalKind, MutationMessageError, } from "./MutationError";
|
|
14
|
+
export type { RefusalKind } from "../http/refusal";
|
|
13
15
|
export { Form, FormError, useMutationStatus, useFormStatus, useFormData, FormFieldContainer, ValidationErrors, } from "./Mutation";
|
|
14
16
|
export { QueryManagerProvider } from "./QueryManagerContext";
|
|
15
17
|
export type { QueryConfig, UserQueryConfig } from "./QueryManagerContext";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../client/index.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,Y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