@orbe-agro/client-core 3.3.10 → 3.3.11
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/lib/@ecme/auth/AuthProvider.js +29 -35
- package/dist/lib/@ecme/auth/AuthProvider.js.map +1 -1
- package/dist/lib/@ecme/views/auth/SignIn/components/SignInForm.js +35 -35
- package/dist/lib/@ecme/views/auth/SignIn/components/SignInForm.js.map +1 -1
- package/dist/lib/base/services/modules/FluxService.js +78 -79
- package/dist/lib/base/services/modules/FluxService.js.map +1 -1
- package/dist/lib/types/@ecme/@types/auth.d.ts +2 -9
- package/dist/lib/types/@ecme/auth/AuthProvider.d.ts +2 -2
- package/dist/lib/types/@ecme/views/auth/SignIn/components/SignInForm.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,41 +1,35 @@
|
|
|
1
|
-
import { jsx as p, Fragment as
|
|
1
|
+
import { jsx as p, Fragment as w, jsxs as T } from "react/jsx-runtime";
|
|
2
2
|
import { useImperativeHandle as R, useRef as E } from "react";
|
|
3
3
|
import P from "./AuthContext.js";
|
|
4
|
-
import
|
|
5
|
-
import { useSessionUser as r, useToken as
|
|
6
|
-
import { apiSignIn as
|
|
4
|
+
import d from "../configs/app.config.js";
|
|
5
|
+
import { useSessionUser as r, useToken as j } from "../store/authStore.js";
|
|
6
|
+
import { apiSignIn as x, apiSignUp as A, apiSignOut as C } from "../services/AuthService.js";
|
|
7
7
|
import { REDIRECT_URL_KEY as O } from "../constants/app.constant.js";
|
|
8
8
|
import { useNavigate as b } from "react-router-dom";
|
|
9
|
-
const
|
|
9
|
+
const L = ({ ref: o }) => {
|
|
10
10
|
const a = b();
|
|
11
11
|
return R(o, () => ({
|
|
12
12
|
navigate: a
|
|
13
|
-
}), [a]), /* @__PURE__ */ p(
|
|
13
|
+
}), [a]), /* @__PURE__ */ p(w, {});
|
|
14
14
|
};
|
|
15
15
|
function q({ children: o }) {
|
|
16
|
-
const a = r((t) => t.session.signedIn), f = r((t) => t.user),
|
|
16
|
+
const a = r((t) => t.session.signedIn), f = r((t) => t.user), l = r((t) => t.setUser), g = r(
|
|
17
17
|
(t) => t.setSessionSignedIn
|
|
18
|
-
), { token: h, setToken:
|
|
18
|
+
), { token: h, setToken: m } = j(), S = !!(h && a), i = E(null), c = () => {
|
|
19
19
|
var e;
|
|
20
|
-
const t = window.location.search,
|
|
20
|
+
const t = window.location.search, s = new URLSearchParams(t).get(O);
|
|
21
21
|
(e = i.current) == null || e.navigate(
|
|
22
|
-
|
|
22
|
+
s || d.authenticatedEntryPath
|
|
23
23
|
);
|
|
24
|
-
}, u = (t
|
|
25
|
-
|
|
26
|
-
avatar: null,
|
|
27
|
-
userName: s.name,
|
|
28
|
-
email: s.email,
|
|
29
|
-
authority: s.authority,
|
|
30
|
-
userId: s.id
|
|
31
|
-
});
|
|
24
|
+
}, u = (t) => {
|
|
25
|
+
m(t.accessToken), g(!0);
|
|
32
26
|
}, I = () => {
|
|
33
|
-
|
|
27
|
+
m(""), l({}), g(!1);
|
|
34
28
|
}, v = async (t) => {
|
|
35
|
-
var
|
|
29
|
+
var n, s;
|
|
36
30
|
try {
|
|
37
|
-
const e = await
|
|
38
|
-
return e ? (u({ accessToken: e.
|
|
31
|
+
const e = await x(t);
|
|
32
|
+
return e ? (u({ accessToken: e.jwtToken }), c(), {
|
|
39
33
|
status: "success",
|
|
40
34
|
message: ""
|
|
41
35
|
}) : {
|
|
@@ -45,14 +39,14 @@ function q({ children: o }) {
|
|
|
45
39
|
} catch (e) {
|
|
46
40
|
return {
|
|
47
41
|
status: "failed",
|
|
48
|
-
message: ((
|
|
42
|
+
message: ((s = (n = e == null ? void 0 : e.response) == null ? void 0 : n.data) == null ? void 0 : s.message) || e.toString()
|
|
49
43
|
};
|
|
50
44
|
}
|
|
51
|
-
},
|
|
52
|
-
var
|
|
45
|
+
}, U = async (t) => {
|
|
46
|
+
var n, s;
|
|
53
47
|
try {
|
|
54
|
-
const e = await
|
|
55
|
-
return e ? (u({ accessToken: e.
|
|
48
|
+
const e = await A(t);
|
|
49
|
+
return e ? (u({ accessToken: e.jwtToken }), c(), {
|
|
56
50
|
status: "success",
|
|
57
51
|
message: ""
|
|
58
52
|
}) : {
|
|
@@ -62,15 +56,15 @@ function q({ children: o }) {
|
|
|
62
56
|
} catch (e) {
|
|
63
57
|
return {
|
|
64
58
|
status: "failed",
|
|
65
|
-
message: ((
|
|
59
|
+
message: ((s = (n = e == null ? void 0 : e.response) == null ? void 0 : n.data) == null ? void 0 : s.message) || e.toString()
|
|
66
60
|
};
|
|
67
61
|
}
|
|
68
|
-
},
|
|
62
|
+
}, y = async () => {
|
|
69
63
|
var t;
|
|
70
64
|
try {
|
|
71
|
-
await
|
|
65
|
+
await C();
|
|
72
66
|
} finally {
|
|
73
|
-
I(), (t = i.current) == null || t.navigate(
|
|
67
|
+
I(), (t = i.current) == null || t.navigate(d.unAuthenticatedEntryPath);
|
|
74
68
|
}
|
|
75
69
|
}, k = (t) => {
|
|
76
70
|
t({
|
|
@@ -78,20 +72,20 @@ function q({ children: o }) {
|
|
|
78
72
|
redirect: c
|
|
79
73
|
});
|
|
80
74
|
};
|
|
81
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ T(
|
|
82
76
|
P.Provider,
|
|
83
77
|
{
|
|
84
78
|
value: {
|
|
85
79
|
authenticated: S,
|
|
86
80
|
user: f,
|
|
87
81
|
signIn: v,
|
|
88
|
-
signUp:
|
|
89
|
-
signOut:
|
|
82
|
+
signUp: U,
|
|
83
|
+
signOut: y,
|
|
90
84
|
oAuthSignIn: k
|
|
91
85
|
},
|
|
92
86
|
children: [
|
|
93
87
|
o,
|
|
94
|
-
/* @__PURE__ */ p(
|
|
88
|
+
/* @__PURE__ */ p(L, { ref: i })
|
|
95
89
|
]
|
|
96
90
|
}
|
|
97
91
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthProvider.js","sources":["../../../../lib/@ecme/auth/AuthProvider.tsx"],"sourcesContent":["import { useRef, useImperativeHandle } from 'react'\nimport AuthContext from './AuthContext'\nimport appConfig from '@/configs/app.config'\nimport { useSessionUser, useToken } from '@/store/authStore'\nimport { apiSignIn, apiSignOut, apiSignUp } from '@/services/AuthService'\nimport { REDIRECT_URL_KEY } from '@/constants/app.constant'\nimport { useNavigate } from 'react-router-dom'\nimport type {\n SignInCredential,\n SignUpCredential,\n AuthResult,\n OauthSignInCallbackPayload,\n
|
|
1
|
+
{"version":3,"file":"AuthProvider.js","sources":["../../../../lib/@ecme/auth/AuthProvider.tsx"],"sourcesContent":["import { useRef, useImperativeHandle, ReactNode, Ref } from 'react'\nimport AuthContext from './AuthContext'\nimport appConfig from '@/configs/app.config'\nimport { useSessionUser, useToken } from '@/store/authStore'\nimport { apiSignIn, apiSignOut, apiSignUp } from '@/services/AuthService'\nimport { REDIRECT_URL_KEY } from '@/constants/app.constant'\nimport { useNavigate, NavigateFunction } from 'react-router-dom'\nimport type {\n SignInCredential,\n SignUpCredential,\n AuthResult,\n OauthSignInCallbackPayload,\n Token,\n} from '@/@types/auth'\n\ntype AuthProviderProps = { children: ReactNode }\n\nexport type IsolatedNavigatorRef = {\n navigate: NavigateFunction\n}\n\nconst IsolatedNavigator = ({ ref }: { ref: Ref<IsolatedNavigatorRef> }) => {\n const navigate = useNavigate()\n\n useImperativeHandle(ref, () => {\n return {\n navigate,\n }\n }, [navigate])\n\n return <></>\n}\n\nfunction AuthProvider({ children }: AuthProviderProps) {\n const signedIn = useSessionUser((state) => state.session.signedIn)\n const user = useSessionUser((state) => state.user)\n const setUser = useSessionUser((state) => state.setUser)\n const setSessionSignedIn = useSessionUser(\n (state) => state.setSessionSignedIn,\n )\n const { token, setToken } = useToken()\n\n const authenticated = Boolean(token && signedIn)\n\n const navigatorRef = useRef<IsolatedNavigatorRef>(null)\n\n const redirect = () => {\n const search = window.location.search\n const params = new URLSearchParams(search)\n const redirectUrl = params.get(REDIRECT_URL_KEY)\n\n navigatorRef.current?.navigate(\n redirectUrl ? redirectUrl : appConfig.authenticatedEntryPath,\n )\n }\n\n const handleSignIn = (tokens: Token) => {\n setToken(tokens.accessToken)\n setSessionSignedIn(true)\n }\n\n const handleSignOut = () => {\n setToken('')\n setUser({})\n setSessionSignedIn(false)\n }\n\n const signIn = async (values: SignInCredential): AuthResult => {\n try {\n const resp = await apiSignIn(values)\n if (resp) {\n handleSignIn({ accessToken: resp.jwtToken })\n redirect()\n return {\n status: 'success',\n message: '',\n }\n }\n return {\n status: 'failed',\n message: 'Unable to sign in',\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (errors: any) {\n return {\n status: 'failed',\n message: errors?.response?.data?.message || errors.toString(),\n }\n }\n }\n\n const signUp = async (values: SignUpCredential): AuthResult => {\n try {\n const resp = await apiSignUp(values)\n if (resp) {\n handleSignIn({ accessToken: resp.jwtToken })\n redirect()\n return {\n status: 'success',\n message: '',\n }\n }\n return {\n status: 'failed',\n message: 'Unable to sign up',\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (errors: any) {\n return {\n status: 'failed',\n message: errors?.response?.data?.message || errors.toString(),\n }\n }\n }\n\n const signOut = async () => {\n try {\n await apiSignOut()\n } finally {\n handleSignOut()\n navigatorRef.current?.navigate(appConfig.unAuthenticatedEntryPath)\n }\n }\n const oAuthSignIn = (\n callback: (payload: OauthSignInCallbackPayload) => void,\n ) => {\n callback({\n onSignIn: handleSignIn,\n redirect,\n })\n }\n\n return (\n <AuthContext.Provider\n value={{\n authenticated,\n user,\n signIn,\n signUp,\n signOut,\n oAuthSignIn,\n }}\n >\n {children}\n <IsolatedNavigator ref={navigatorRef} />\n </AuthContext.Provider>\n )\n}\n\nexport default AuthProvider\n"],"names":["IsolatedNavigator","ref","navigate","useNavigate","useImperativeHandle","jsx","Fragment","AuthProvider","children","signedIn","useSessionUser","state","user","setUser","setSessionSignedIn","token","setToken","useToken","authenticated","navigatorRef","useRef","redirect","search","redirectUrl","REDIRECT_URL_KEY","_a","appConfig","handleSignIn","tokens","handleSignOut","signIn","values","resp","apiSignIn","errors","_b","signUp","apiSignUp","signOut","apiSignOut","oAuthSignIn","callback","jsxs","AuthContext"],"mappings":";;;;;;;;AAqBA,MAAMA,IAAoB,CAAC,EAAE,KAAAC,QAA8C;AACvE,QAAMC,IAAWC,EAAY;AAE7B,SAAAC,EAAoBH,GAAK,OACd;AAAA,IACH,UAAAC;AAAA,EACJ,IACD,CAACA,CAAQ,CAAC,GAEJ,gBAAAG,EAAAC,GAAA,EAAA;AACb;AAEA,SAASC,EAAa,EAAE,UAAAC,KAA+B;AACnD,QAAMC,IAAWC,EAAe,CAACC,MAAUA,EAAM,QAAQ,QAAQ,GAC3DC,IAAOF,EAAe,CAACC,MAAUA,EAAM,IAAI,GAC3CE,IAAUH,EAAe,CAACC,MAAUA,EAAM,OAAO,GACjDG,IAAqBJ;AAAA,IACvB,CAACC,MAAUA,EAAM;AAAA,EACrB,GACM,EAAE,OAAAI,GAAO,UAAAC,EAAS,IAAIC,EAAS,GAE/BC,IAAgB,GAAQH,KAASN,IAEjCU,IAAeC,EAA6B,IAAI,GAEhDC,IAAW,MAAM;;AACb,UAAAC,IAAS,OAAO,SAAS,QAEzBC,IADS,IAAI,gBAAgBD,CAAM,EACd,IAAIE,CAAgB;AAE/C,KAAAC,IAAAN,EAAa,YAAb,QAAAM,EAAsB;AAAA,MAClBF,KAA4BG,EAAU;AAAA;AAAA,EAE9C,GAEMC,IAAe,CAACC,MAAkB;AACpC,IAAAZ,EAASY,EAAO,WAAW,GAC3Bd,EAAmB,EAAI;AAAA,EAC3B,GAEMe,IAAgB,MAAM;AACxB,IAAAb,EAAS,EAAE,GACXH,EAAQ,CAAA,CAAE,GACVC,EAAmB,EAAK;AAAA,EAC5B,GAEMgB,IAAS,OAAOC,MAAyC;;AACvD,QAAA;AACM,YAAAC,IAAO,MAAMC,EAAUF,CAAM;AACnC,aAAIC,KACAL,EAAa,EAAE,aAAaK,EAAK,SAAA,CAAU,G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AA,MAEC,UAAA;AAAA,QAAAhC;AAAA,QACD,gBAAAH,EAACL,GAAkB,EAAA,KAAKmB,EAAc,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAC1C;AAER;"}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as r, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { useState as P } from "react";
|
|
3
3
|
import "../../../../components/ui/Input/index.js";
|
|
4
4
|
import "../../../../components/ui/Button/index.js";
|
|
5
5
|
import "../../../../components/ui/Form/index.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import y from "../../../../components/shared/PasswordInput.js";
|
|
7
|
+
import F from "../../../../utils/classNames.js";
|
|
8
8
|
import "../../../../auth/index.js";
|
|
9
|
-
import { useForm as
|
|
10
|
-
import { zodResolver as
|
|
11
|
-
import { z as
|
|
12
|
-
import
|
|
13
|
-
import { Form as
|
|
9
|
+
import { useForm as N, Controller as f } from "react-hook-form";
|
|
10
|
+
import { zodResolver as j } from "@hookform/resolvers/zod";
|
|
11
|
+
import { z as a } from "zod";
|
|
12
|
+
import q from "../../../../auth/useAuth.js";
|
|
13
|
+
import { Form as B } from "../../../../components/ui/Form/Form.js";
|
|
14
14
|
import c from "../../../../components/ui/Form/FormItem.js";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
password:
|
|
15
|
+
import C from "../../../../components/ui/Input/Input.js";
|
|
16
|
+
import z from "../../../../components/ui/Button/Button.js";
|
|
17
|
+
const E = a.object({
|
|
18
|
+
username: a.string({ required_error: "Por favor digite um login." }).min(1, { message: "Por favor digite um login válido." }),
|
|
19
|
+
password: a.string({ required_error: "Por favor digite uma senha." }).min(1, { message: "Por favor digite uma senha válida." })
|
|
20
20
|
}), X = (g) => {
|
|
21
21
|
var d, u, p;
|
|
22
|
-
const [i,
|
|
22
|
+
const [i, m] = P(!1), { disableSubmit: h = !1, className: b, setMessage: t, passwordHint: n } = g, {
|
|
23
23
|
handleSubmit: v,
|
|
24
24
|
formState: { errors: e },
|
|
25
25
|
control: l
|
|
26
|
-
} =
|
|
26
|
+
} = N({
|
|
27
27
|
defaultValues: {
|
|
28
|
-
|
|
28
|
+
username: "",
|
|
29
29
|
password: ""
|
|
30
30
|
},
|
|
31
|
-
resolver:
|
|
32
|
-
}), { signIn: S } =
|
|
33
|
-
return /* @__PURE__ */ r("div", { className: b, children: /* @__PURE__ */
|
|
34
|
-
const {
|
|
31
|
+
resolver: j(E)
|
|
32
|
+
}), { signIn: S } = q();
|
|
33
|
+
return /* @__PURE__ */ r("div", { className: b, children: /* @__PURE__ */ x(B, { onSubmit: v(async (o) => {
|
|
34
|
+
const { username: w, password: I } = o;
|
|
35
35
|
if (!h) {
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
(
|
|
36
|
+
m(!0);
|
|
37
|
+
const s = await S({ username: w, password: I });
|
|
38
|
+
(s == null ? void 0 : s.status) === "failed" && (t == null || t(s.message));
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
m(!1);
|
|
41
41
|
}), children: [
|
|
42
42
|
/* @__PURE__ */ r(
|
|
43
43
|
c,
|
|
44
44
|
{
|
|
45
|
-
label: "
|
|
46
|
-
invalid: !!e.
|
|
47
|
-
errorMessage: (d = e.
|
|
45
|
+
label: "Login",
|
|
46
|
+
invalid: !!e.username,
|
|
47
|
+
errorMessage: (d = e.username) == null ? void 0 : d.message,
|
|
48
48
|
children: /* @__PURE__ */ r(
|
|
49
49
|
f,
|
|
50
50
|
{
|
|
51
|
-
name: "
|
|
51
|
+
name: "username",
|
|
52
52
|
control: l,
|
|
53
53
|
render: ({ field: o }) => /* @__PURE__ */ r(
|
|
54
|
-
|
|
54
|
+
C,
|
|
55
55
|
{
|
|
56
|
-
type: "
|
|
57
|
-
placeholder: "
|
|
56
|
+
type: "text",
|
|
57
|
+
placeholder: "Login",
|
|
58
58
|
autoComplete: "off",
|
|
59
59
|
...o
|
|
60
60
|
}
|
|
@@ -69,7 +69,7 @@ const C = m.object({
|
|
|
69
69
|
label: "Senha",
|
|
70
70
|
invalid: !!e.password,
|
|
71
71
|
errorMessage: (u = e.password) == null ? void 0 : u.message,
|
|
72
|
-
className:
|
|
72
|
+
className: F(
|
|
73
73
|
n ? "mb-0" : "",
|
|
74
74
|
(p = e.password) != null && p.message ? "mb-8" : ""
|
|
75
75
|
),
|
|
@@ -80,7 +80,7 @@ const C = m.object({
|
|
|
80
80
|
control: l,
|
|
81
81
|
rules: { required: !0 },
|
|
82
82
|
render: ({ field: o }) => /* @__PURE__ */ r(
|
|
83
|
-
|
|
83
|
+
y,
|
|
84
84
|
{
|
|
85
85
|
type: "text",
|
|
86
86
|
placeholder: "Senha",
|
|
@@ -94,7 +94,7 @@ const C = m.object({
|
|
|
94
94
|
),
|
|
95
95
|
n,
|
|
96
96
|
/* @__PURE__ */ r(
|
|
97
|
-
|
|
97
|
+
z,
|
|
98
98
|
{
|
|
99
99
|
block: !0,
|
|
100
100
|
loading: i,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInForm.js","sources":["../../../../../../../lib/@ecme/views/auth/SignIn/components/SignInForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport Input from '@/components/ui/Input'\nimport Button from '@/components/ui/Button'\nimport { FormItem, Form } from '@/components/ui/Form'\nimport PasswordInput from '@/components/shared/PasswordInput'\nimport classNames from '@/utils/classNames'\nimport { useAuth } from '@/auth'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z
|
|
1
|
+
{"version":3,"file":"SignInForm.js","sources":["../../../../../../../lib/@ecme/views/auth/SignIn/components/SignInForm.tsx"],"sourcesContent":["import { ReactNode, useState } from 'react'\nimport Input from '@/components/ui/Input'\nimport Button from '@/components/ui/Button'\nimport { FormItem, Form } from '@/components/ui/Form'\nimport PasswordInput from '@/components/shared/PasswordInput'\nimport classNames from '@/utils/classNames'\nimport { useAuth } from '@/auth'\nimport { useForm, Controller } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { z, ZodType } from 'zod'\nimport type { CommonProps } from '@/@types/common'\n\ninterface SignInFormProps extends CommonProps {\n disableSubmit?: boolean\n passwordHint?: string | ReactNode\n setMessage?: (message: string) => void\n}\n\ntype SignInFormSchema = {\n username: string\n password: string\n}\n\nconst validationSchema: ZodType<SignInFormSchema> = z.object({\n username: z\n .string({ required_error: 'Por favor digite um login.' })\n .min(1, { message: 'Por favor digite um login válido.' }),\n password: z\n .string({ required_error: 'Por favor digite uma senha.' })\n .min(1, { message: 'Por favor digite uma senha válida.' }),\n})\n\nconst SignInForm = (props: SignInFormProps) => {\n const [isSubmitting, setSubmitting] = useState<boolean>(false)\n\n const { disableSubmit = false, className, setMessage, passwordHint } = props\n\n const {\n handleSubmit,\n formState: { errors },\n control,\n } = useForm<SignInFormSchema>({\n defaultValues: {\n username: '',\n password: '',\n },\n resolver: zodResolver(validationSchema),\n })\n\n const { signIn } = useAuth()\n\n const onSignIn = async (values: SignInFormSchema) => {\n const { username, password } = values\n\n if (!disableSubmit) {\n setSubmitting(true)\n\n const result = await signIn({ username, password })\n\n if (result?.status === 'failed') {\n setMessage?.(result.message)\n }\n }\n\n setSubmitting(false)\n }\n\n return (\n <div className={className}>\n <Form onSubmit={handleSubmit(onSignIn)}>\n <FormItem\n label=\"Login\"\n invalid={Boolean(errors.username)}\n errorMessage={errors.username?.message}\n >\n <Controller\n name=\"username\"\n control={control}\n render={({ field }) => (\n <Input\n type=\"text\"\n placeholder=\"Login\"\n autoComplete=\"off\"\n {...field}\n />\n )}\n />\n </FormItem>\n <FormItem\n label=\"Senha\"\n invalid={Boolean(errors.password)}\n errorMessage={errors.password?.message}\n className={classNames(\n passwordHint ? 'mb-0' : '',\n errors.password?.message ? 'mb-8' : '',\n )}\n >\n <Controller\n name=\"password\"\n control={control}\n rules={{ required: true }}\n render={({ field }) => (\n <PasswordInput\n type=\"text\"\n placeholder=\"Senha\"\n autoComplete=\"off\"\n {...field}\n />\n )}\n />\n </FormItem>\n {passwordHint}\n <Button\n block\n loading={isSubmitting}\n variant=\"solid\"\n type=\"submit\"\n className='mt-6'\n >\n {isSubmitting ? 'Entrando...' : 'Entrar'}\n </Button>\n </Form>\n </div>\n )\n}\n\nexport default SignInForm\n"],"names":["validationSchema","z","SignInForm","props","isSubmitting","setSubmitting","useState","disableSubmit","className","setMessage","passwordHint","handleSubmit","errors","control","useForm","zodResolver","signIn","useAuth","jsx","jsxs","Form","values","username","password","result","FormItem","_a","Controller","field","Input","_b","classNames","_c","PasswordInput","Button"],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAMA,IAA8CC,EAAE,OAAO;AAAA,EACzD,UAAUA,EACL,OAAO,EAAE,gBAAgB,6BAAA,CAA8B,EACvD,IAAI,GAAG,EAAE,SAAS,qCAAqC;AAAA,EAC5D,UAAUA,EACL,OAAO,EAAE,gBAAgB,+BAA+B,EACxD,IAAI,GAAG,EAAE,SAAS,qCAAsC,CAAA;AACjE,CAAC,GAEKC,IAAa,CAACC,MAA2B;;AAC3C,QAAM,CAACC,GAAcC,CAAa,IAAIC,EAAkB,EAAK,GAEvD,EAAE,eAAAC,IAAgB,IAAO,WAAAC,GAAW,YAAAC,GAAY,cAAAC,MAAiBP,GAEjE;AAAA,IACF,cAAAQ;AAAA,IACA,WAAW,EAAE,QAAAC,EAAO;AAAA,IACpB,SAAAC;AAAA,MACAC,EAA0B;AAAA,IAC1B,eAAe;AAAA,MACX,UAAU;AAAA,MACV,UAAU;AAAA,IACd;AAAA,IACA,UAAUC,EAAYf,CAAgB;AAAA,EAAA,CACzC,GAEK,EAAE,QAAAgB,EAAO,IAAIC,EAAQ;AAmBvB,SAAA,gBAAAC,EAAC,SAAI,WAAAV,GACD,UAAA,gBAAAW,EAACC,KAAK,UAAUT,EAlBP,OAAOU,MAA6B;AAC3C,UAAA,EAAE,U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,MAAK;AAAA,gBACL,aAAY;AAAA,gBACZ,cAAa;AAAA,gBACZ,GAAGL;AAAA,cAAA;AAAA,YAAA;AAAA,UACR;AAAA,QAAA;AAAA,MAER;AAAA,IACJ;AAAA,IACClB;AAAA,IACD,gBAAAQ;AAAA,MAACgB;AAAA,MAAA;AAAA,QACG,OAAK;AAAA,QACL,SAAS9B;AAAA,QACT,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAU;AAAA,QAET,cAAe,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EACpC,EAAA,CACJ,EACJ,CAAA;AAER;"}
|
|
@@ -1,259 +1,258 @@
|
|
|
1
1
|
import "../../configs/index.js";
|
|
2
|
-
import "../../../@ecme/services/index.js";
|
|
3
2
|
import e from "../../../@ecme/services/ApiService.js";
|
|
4
3
|
import a from "../../configs/endpoints.config/endpoints.navigation.js";
|
|
5
|
-
async function
|
|
4
|
+
async function n(t) {
|
|
6
5
|
return e.fetchDataWithAxios({
|
|
7
6
|
url: a.flux.tipoProcesso.findAll,
|
|
8
7
|
method: "post",
|
|
9
8
|
data: t
|
|
10
9
|
});
|
|
11
10
|
}
|
|
12
|
-
async function
|
|
11
|
+
async function u(t) {
|
|
13
12
|
return e.fetchDataWithAxios({
|
|
14
13
|
url: a.flux.tipoProcesso.add,
|
|
15
14
|
method: "post",
|
|
16
15
|
data: t
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
async function
|
|
18
|
+
async function c(t) {
|
|
20
19
|
return e.fetchDataWithAxios({
|
|
21
20
|
url: a.flux.tipoProcesso.update,
|
|
22
21
|
method: "patch",
|
|
23
22
|
data: t
|
|
24
23
|
});
|
|
25
24
|
}
|
|
26
|
-
async function
|
|
25
|
+
async function s(t) {
|
|
27
26
|
return e.fetchDataWithAxios({
|
|
28
27
|
url: `${a.flux.tipoProcesso.findOne}/${t}`,
|
|
29
28
|
method: "get"
|
|
30
29
|
});
|
|
31
30
|
}
|
|
32
|
-
async function
|
|
31
|
+
async function f(t) {
|
|
33
32
|
return e.fetchDataWithAxios({
|
|
34
33
|
url: `${a.flux.tipoProcesso.delete}/${t}`,
|
|
35
34
|
method: "delete"
|
|
36
35
|
});
|
|
37
36
|
}
|
|
38
|
-
async function
|
|
37
|
+
async function d(t) {
|
|
39
38
|
return e.fetchDataWithAxios({
|
|
40
39
|
url: a.flux.grupoAtendimento.findAll,
|
|
41
40
|
method: "post",
|
|
42
41
|
data: t
|
|
43
42
|
});
|
|
44
43
|
}
|
|
45
|
-
async function
|
|
44
|
+
async function h(t) {
|
|
46
45
|
return e.fetchDataWithAxios({
|
|
47
46
|
url: a.flux.grupoAtendimento.add,
|
|
48
47
|
method: "post",
|
|
49
48
|
data: t
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
|
-
async function
|
|
51
|
+
async function l(t) {
|
|
53
52
|
return e.fetchDataWithAxios({
|
|
54
53
|
url: a.flux.grupoAtendimento.update,
|
|
55
54
|
method: "patch",
|
|
56
55
|
data: t
|
|
57
56
|
});
|
|
58
57
|
}
|
|
59
|
-
async function
|
|
58
|
+
async function p(t) {
|
|
60
59
|
return e.fetchDataWithAxios({
|
|
61
60
|
url: `${a.flux.grupoAtendimento.findOne}/${t}`,
|
|
62
61
|
method: "get"
|
|
63
62
|
});
|
|
64
63
|
}
|
|
65
|
-
async function
|
|
64
|
+
async function x(t) {
|
|
66
65
|
return e.fetchDataWithAxios({
|
|
67
66
|
url: `${a.flux.grupoAtendimento.delete}/${t}`,
|
|
68
67
|
method: "delete"
|
|
69
68
|
});
|
|
70
69
|
}
|
|
71
|
-
async function
|
|
70
|
+
async function m(t) {
|
|
72
71
|
return e.fetchDataWithAxios({
|
|
73
72
|
url: a.flux.categoria.findAll,
|
|
74
73
|
method: "post",
|
|
75
74
|
data: t
|
|
76
75
|
});
|
|
77
76
|
}
|
|
78
|
-
async function
|
|
77
|
+
async function A(t) {
|
|
79
78
|
return e.fetchDataWithAxios({
|
|
80
79
|
url: a.flux.categoria.add,
|
|
81
80
|
method: "post",
|
|
82
81
|
data: t
|
|
83
82
|
});
|
|
84
83
|
}
|
|
85
|
-
async function
|
|
84
|
+
async function g(t) {
|
|
86
85
|
return e.fetchDataWithAxios({
|
|
87
86
|
url: a.flux.categoria.update,
|
|
88
87
|
method: "patch",
|
|
89
88
|
data: t
|
|
90
89
|
});
|
|
91
90
|
}
|
|
92
|
-
async function
|
|
91
|
+
async function y(t) {
|
|
93
92
|
return e.fetchDataWithAxios({
|
|
94
93
|
url: `${a.flux.categoria.findOne}/${t}`,
|
|
95
94
|
method: "get"
|
|
96
95
|
});
|
|
97
96
|
}
|
|
98
|
-
async function
|
|
97
|
+
async function D(t) {
|
|
99
98
|
return e.fetchDataWithAxios({
|
|
100
99
|
url: `${a.flux.categoria.delete}/${t}`,
|
|
101
100
|
method: "delete"
|
|
102
101
|
});
|
|
103
102
|
}
|
|
104
|
-
async function
|
|
103
|
+
async function W(t) {
|
|
105
104
|
return e.fetchDataWithAxios({
|
|
106
105
|
url: `${a.flux.categoria.findCategoriaByTipoProcesso}/${t}`,
|
|
107
106
|
method: "get"
|
|
108
107
|
});
|
|
109
108
|
}
|
|
110
|
-
async function
|
|
109
|
+
async function $(t) {
|
|
111
110
|
return e.fetchDataWithAxios({
|
|
112
111
|
url: a.flux.subcategoria.findAll,
|
|
113
112
|
method: "post",
|
|
114
113
|
data: t
|
|
115
114
|
});
|
|
116
115
|
}
|
|
117
|
-
async function
|
|
116
|
+
async function P(t) {
|
|
118
117
|
return e.fetchDataWithAxios({
|
|
119
118
|
url: a.flux.subcategoria.add,
|
|
120
119
|
method: "post",
|
|
121
120
|
data: t
|
|
122
121
|
});
|
|
123
122
|
}
|
|
124
|
-
async function
|
|
123
|
+
async function B(t) {
|
|
125
124
|
return e.fetchDataWithAxios({
|
|
126
125
|
url: a.flux.subcategoria.update,
|
|
127
126
|
method: "patch",
|
|
128
127
|
data: t
|
|
129
128
|
});
|
|
130
129
|
}
|
|
131
|
-
async function
|
|
130
|
+
async function C(t) {
|
|
132
131
|
return e.fetchDataWithAxios({
|
|
133
132
|
url: `${a.flux.subcategoria.findSubcategoriaByCategoria}/${t}`,
|
|
134
133
|
method: "get"
|
|
135
134
|
});
|
|
136
135
|
}
|
|
137
|
-
async function
|
|
136
|
+
async function b(t) {
|
|
138
137
|
return e.fetchDataWithAxios({
|
|
139
138
|
url: `${a.flux.subcategoria.findOne}/${t}`,
|
|
140
139
|
method: "get"
|
|
141
140
|
});
|
|
142
141
|
}
|
|
143
|
-
async function
|
|
142
|
+
async function F(t) {
|
|
144
143
|
return e.fetchDataWithAxios({
|
|
145
144
|
url: `${a.flux.subcategoria.delete}/${t}`,
|
|
146
145
|
method: "delete"
|
|
147
146
|
});
|
|
148
147
|
}
|
|
149
|
-
async function
|
|
148
|
+
async function O(t) {
|
|
150
149
|
return e.fetchDataWithAxios({
|
|
151
150
|
url: a.flux.formularioBase.findAll,
|
|
152
151
|
method: "post",
|
|
153
152
|
data: t
|
|
154
153
|
});
|
|
155
154
|
}
|
|
156
|
-
async function
|
|
155
|
+
async function S(t) {
|
|
157
156
|
return e.fetchDataWithAxios({
|
|
158
157
|
url: a.flux.formularioBase.add,
|
|
159
158
|
method: "post",
|
|
160
159
|
data: t
|
|
161
160
|
});
|
|
162
161
|
}
|
|
163
|
-
async function
|
|
162
|
+
async function G(t) {
|
|
164
163
|
return e.fetchDataWithAxios({
|
|
165
164
|
url: a.flux.formularioBase.update,
|
|
166
165
|
method: "patch",
|
|
167
166
|
data: t
|
|
168
167
|
});
|
|
169
168
|
}
|
|
170
|
-
async function
|
|
169
|
+
async function T(t) {
|
|
171
170
|
return e.fetchDataWithAxios({
|
|
172
171
|
url: `${a.flux.formularioBase.findOneBySubcategoria}/${t}`,
|
|
173
172
|
method: "get"
|
|
174
173
|
});
|
|
175
174
|
}
|
|
176
|
-
async function
|
|
175
|
+
async function U(t) {
|
|
177
176
|
return e.fetchDataWithAxios({
|
|
178
177
|
url: `${a.flux.formularioBase.findOne}/${t}`,
|
|
179
178
|
method: "get"
|
|
180
179
|
});
|
|
181
180
|
}
|
|
182
|
-
async function
|
|
181
|
+
async function v(t) {
|
|
183
182
|
return e.fetchDataWithAxios({
|
|
184
183
|
url: `${a.flux.formularioBase.delete}/${t}`,
|
|
185
184
|
method: "delete"
|
|
186
185
|
});
|
|
187
186
|
}
|
|
188
|
-
async function
|
|
187
|
+
async function H(t) {
|
|
189
188
|
return e.fetchDataWithAxios({
|
|
190
189
|
url: a.flux.processo.findAll,
|
|
191
190
|
method: "post",
|
|
192
191
|
data: t
|
|
193
192
|
});
|
|
194
193
|
}
|
|
195
|
-
async function
|
|
194
|
+
async function N(t) {
|
|
196
195
|
return e.fetchDataWithAxios({
|
|
197
196
|
url: a.flux.processo.add,
|
|
198
197
|
method: "post",
|
|
199
198
|
data: t
|
|
200
199
|
});
|
|
201
200
|
}
|
|
202
|
-
async function
|
|
201
|
+
async function j(t) {
|
|
203
202
|
return e.fetchDataWithAxios({
|
|
204
203
|
url: a.flux.processo.update,
|
|
205
204
|
method: "patch",
|
|
206
205
|
data: t
|
|
207
206
|
});
|
|
208
207
|
}
|
|
209
|
-
async function
|
|
208
|
+
async function k(t) {
|
|
210
209
|
return e.fetchDataWithAxios({
|
|
211
210
|
url: `${a.flux.processo.findOne}/${t}`,
|
|
212
211
|
method: "get"
|
|
213
212
|
});
|
|
214
213
|
}
|
|
215
|
-
async function
|
|
214
|
+
async function q(t) {
|
|
216
215
|
return e.fetchDataWithAxios({
|
|
217
216
|
url: `${a.flux.processo.aceitar}/${t}`,
|
|
218
217
|
method: "get"
|
|
219
218
|
});
|
|
220
219
|
}
|
|
221
|
-
async function
|
|
220
|
+
async function w(t) {
|
|
222
221
|
return e.fetchDataWithAxios({
|
|
223
222
|
url: a.flux.processo.concluir,
|
|
224
223
|
method: "put",
|
|
225
224
|
data: t
|
|
226
225
|
});
|
|
227
226
|
}
|
|
228
|
-
async function
|
|
227
|
+
async function z(t) {
|
|
229
228
|
return e.fetchDataWithAxios({
|
|
230
229
|
url: a.flux.processo.cancelar,
|
|
231
230
|
method: "put",
|
|
232
231
|
data: t
|
|
233
232
|
});
|
|
234
233
|
}
|
|
235
|
-
async function
|
|
234
|
+
async function E(t) {
|
|
236
235
|
return e.fetchDataWithAxios({
|
|
237
236
|
url: a.flux.processo.transferir,
|
|
238
237
|
method: "put",
|
|
239
238
|
data: t
|
|
240
239
|
});
|
|
241
240
|
}
|
|
242
|
-
async function
|
|
241
|
+
async function I(t) {
|
|
243
242
|
return e.fetchDataWithAxios({
|
|
244
243
|
url: a.flux.processo.transferirSolicitante,
|
|
245
244
|
method: "put",
|
|
246
245
|
data: t
|
|
247
246
|
});
|
|
248
247
|
}
|
|
249
|
-
async function
|
|
248
|
+
async function J(t) {
|
|
250
249
|
return e.fetchDataWithAxios({
|
|
251
250
|
url: a.flux.processo.transferirAtendente,
|
|
252
251
|
method: "put",
|
|
253
252
|
data: t
|
|
254
253
|
});
|
|
255
254
|
}
|
|
256
|
-
async function
|
|
255
|
+
async function K(t) {
|
|
257
256
|
return e.fetchDataWithAxios({
|
|
258
257
|
url: a.flux.processo.adicionarHistorico,
|
|
259
258
|
method: "put",
|
|
@@ -261,44 +260,44 @@ async function L(t) {
|
|
|
261
260
|
});
|
|
262
261
|
}
|
|
263
262
|
export {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
263
|
+
q as apiAceitarProcesso,
|
|
264
|
+
K as apiAdicionarHistorico,
|
|
265
|
+
z as apiCancelarProcesso,
|
|
266
|
+
w as apiConcluirProcesso,
|
|
267
|
+
A as apiCreateCategoria,
|
|
268
|
+
S as apiCreateFormularioBase,
|
|
269
|
+
h as apiCreateGrupoAtendimento,
|
|
270
|
+
N as apiCreateProcesso,
|
|
271
|
+
P as apiCreateSubcategoria,
|
|
272
|
+
u as apiCreateTipoProcesso,
|
|
273
|
+
D as apiDeleteCategoria,
|
|
274
|
+
v as apiDeleteFormularioBase,
|
|
275
|
+
x as apiDeleteGrupoAtendimento,
|
|
276
|
+
F as apiDeleteSubcategoria,
|
|
277
|
+
f as apiDeleteTipoProcesso,
|
|
278
|
+
W as apiFindCategoriaByTipoProcesso,
|
|
279
|
+
y as apiFindOneCategoria,
|
|
280
|
+
U as apiFindOneFormularioBase,
|
|
281
|
+
T as apiFindOneFormularioBaseBySubcategoria,
|
|
282
|
+
p as apiFindOneGrupoAtendimento,
|
|
283
|
+
k as apiFindOneProcesso,
|
|
284
|
+
b as apiFindOneSubcategoria,
|
|
285
|
+
s as apiFindOneTipoProcesso,
|
|
286
|
+
C as apiFindSubategoriaByCategoria,
|
|
287
|
+
m as apiGetCategoria,
|
|
288
|
+
O as apiGetFormularioBase,
|
|
289
|
+
d as apiGetGrupoAtendimento,
|
|
290
|
+
H as apiGetProcesso,
|
|
291
|
+
$ as apiGetSubcategoria,
|
|
292
|
+
n as apiGetTipoProcesso,
|
|
293
|
+
J as apiTransferirAtendente,
|
|
294
|
+
E as apiTransferirProcesso,
|
|
295
|
+
I as apiTransferirSolicitante,
|
|
296
|
+
g as apiUpdateCategoria,
|
|
297
|
+
G as apiUpdateFormularioBase,
|
|
298
|
+
l as apiUpdateGrupoAtendimento,
|
|
299
|
+
j as apiUpdateProcesso,
|
|
300
|
+
B as apiUpdateSubcategoria,
|
|
301
|
+
c as apiUpdateTipoProcesso
|
|
303
302
|
};
|
|
304
303
|
//# sourceMappingURL=FluxService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluxService.js","sources":["../../../../../lib/base/services/modules/FluxService.ts"],"sourcesContent":["import { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TTipoProcesso } from \"@base/@types/models/flux/tipoProcesso\";\nimport { TGrupoAtendimento } from \"@base/@types/models/flux/grupoAtendimento\";\nimport { TCategoria } from \"@base/@types/models/flux/categoria\";\nimport { TFormularioBase } from \"@base/@types/models/flux/formularioBase\";\nimport {\n TActionProcesso,\n TProcesso,\n TUpdateProcesso,\n} from \"@base/@types/models/flux/processo\";\nimport { TSubcategoria } from \"@base/@types/models/flux/subcategoria\";\nimport { endpointsConfig } from \"@base/configs\";\nimport { ApiService } from \"@/services\";\n\nexport async function apiGetTipoProcesso(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TTipoProcesso>>({\n url: endpointsConfig.flux.tipoProcesso.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateTipoProcesso(data?: TTipoProcesso) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TTipoProcesso>>({\n url: endpointsConfig.flux.tipoProcesso.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateTipoProcesso(data?: TTipoProcesso) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TTipoProcesso>>({\n url: endpointsConfig.flux.tipoProcesso.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneTipoProcesso(id: string) {\n return ApiService.fetchDataWithAxios<TTipoProcesso>({\n url: `${endpointsConfig.flux.tipoProcesso.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteTipoProcesso(id: string) {\n return ApiService.fetchDataWithAxios<TTipoProcesso>({\n url: `${endpointsConfig.flux.tipoProcesso.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiGetGrupoAtendimento(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TGrupoAtendimento>>({\n url: endpointsConfig.flux.grupoAtendimento.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateGrupoAtendimento(data?: TGrupoAtendimento) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TGrupoAtendimento>>({\n url: endpointsConfig.flux.grupoAtendimento.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateGrupoAtendimento(data?: TGrupoAtendimento) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TGrupoAtendimento>>({\n url: endpointsConfig.flux.grupoAtendimento.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneGrupoAtendimento(id: string) {\n return ApiService.fetchDataWithAxios<TGrupoAtendimento>({\n url: `${endpointsConfig.flux.grupoAtendimento.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteGrupoAtendimento(id: string) {\n return ApiService.fetchDataWithAxios<TGrupoAtendimento>({\n url: `${endpointsConfig.flux.grupoAtendimento.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiGetCategoria(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TCategoria>>({\n url: endpointsConfig.flux.categoria.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateCategoria(data?: TCategoria) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TCategoria>>({\n url: endpointsConfig.flux.categoria.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateCategoria(data?: TCategoria) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TCategoria>>({\n url: endpointsConfig.flux.categoria.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneCategoria(id: string) {\n return ApiService.fetchDataWithAxios<TCategoria>({\n url: `${endpointsConfig.flux.categoria.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteCategoria(id: string) {\n return ApiService.fetchDataWithAxios<TCategoria>({\n url: `${endpointsConfig.flux.categoria.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiFindCategoriaByTipoProcesso(idTipoProcesso: number) {\n return ApiService.fetchDataWithAxios<TCategoria[]>({\n url: `${endpointsConfig.flux.categoria.findCategoriaByTipoProcesso}/${idTipoProcesso}`,\n method: \"get\",\n });\n}\n\nexport async function apiGetSubcategoria(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TSubcategoria>>({\n url: endpointsConfig.flux.subcategoria.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateSubcategoria(data?: TSubcategoria) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TSubcategoria>>({\n url: endpointsConfig.flux.subcategoria.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateSubcategoria(data?: TSubcategoria) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TSubcategoria>>({\n url: endpointsConfig.flux.subcategoria.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindSubategoriaByCategoria(idCategoria: number) {\n return ApiService.fetchDataWithAxios<TSubcategoria[]>({\n url: `${endpointsConfig.flux.subcategoria.findSubcategoriaByCategoria}/${idCategoria}`,\n method: \"get\",\n });\n}\n\nexport async function apiFindOneSubcategoria(id: string) {\n return ApiService.fetchDataWithAxios<TSubcategoria>({\n url: `${endpointsConfig.flux.subcategoria.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteSubcategoria(id: string) {\n return ApiService.fetchDataWithAxios<TSubcategoria>({\n url: `${endpointsConfig.flux.subcategoria.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiGetFormularioBase(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TFormularioBase>>({\n url: endpointsConfig.flux.formularioBase.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateFormularioBase(data?: TFormularioBase) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TFormularioBase>>({\n url: endpointsConfig.flux.formularioBase.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateFormularioBase(data?: TFormularioBase) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TFormularioBase>>({\n url: endpointsConfig.flux.formularioBase.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneFormularioBaseBySubcategoria(\n idSubcategoria: number\n) {\n return ApiService.fetchDataWithAxios<TFormularioBase[]>({\n url: `${endpointsConfig.flux.formularioBase.findOneBySubcategoria}/${idSubcategoria}`,\n method: \"get\",\n });\n}\n\nexport async function apiFindOneFormularioBase(id: string) {\n return ApiService.fetchDataWithAxios<TFormularioBase>({\n url: `${endpointsConfig.flux.formularioBase.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteFormularioBase(id: string) {\n return ApiService.fetchDataWithAxios<TFormularioBase>({\n url: `${endpointsConfig.flux.formularioBase.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiGetProcesso(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TProcesso>>({\n url: endpointsConfig.flux.processo.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateProcesso(data?: TProcesso) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TProcesso>>({\n url: endpointsConfig.flux.processo.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateProcesso(data?: TUpdateProcesso) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TProcesso>>({\n url: endpointsConfig.flux.processo.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneProcesso(id: string) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: `${endpointsConfig.flux.processo.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiAceitarProcesso(id: number) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: `${endpointsConfig.flux.processo.aceitar}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiConcluirProcesso(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.concluir,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiCancelarProcesso(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.cancelar,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiTransferirProcesso(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.transferir,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiTransferirSolicitante(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.transferirSolicitante,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiTransferirAtendente(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.transferirAtendente,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiAdicionarHistorico(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.adicionarHistorico,\n method: \"put\",\n data: body,\n });\n}\n"],"names":["apiGetTipoProcesso","body","ApiService","endpointsConfig","apiCreateTipoProcesso","data","apiUpdateTipoProcesso","apiFindOneTipoProcesso","id","apiDeleteTipoProcesso","apiGetGrupoAtendimento","apiCreateGrupoAtendimento","apiUpdateGrupoAtendimento","apiFindOneGrupoAtendimento","apiDeleteGrupoAtendimento","apiGetCategoria","apiCreateCategoria","apiUpdateCategoria","apiFindOneCategoria","apiDeleteCategoria","apiFindCategoriaByTipoProcesso","idTipoProcesso","apiGetSubcategoria","apiCreateSubcategoria","apiUpdateSubcategoria","apiFindSubategoriaByCategoria","idCategoria","apiFindOneSubcategoria","apiDeleteSubcategoria","apiGetFormularioBase","apiCreateFormularioBase","apiUpdateFormularioBase","apiFindOneFormularioBaseBySubcategoria","idSubcategoria","apiFindOneFormularioBase","apiDeleteFormularioBase","apiGetProcesso","apiCreateProcesso","apiUpdateProcesso","apiFindOneProcesso","apiAceitarProcesso","apiConcluirProcesso","apiCancelarProcesso","apiTransferirProcesso","apiTransferirSolicitante","apiTransferirAtendente","apiAdicionarHistorico"],"mappings":";;;;AAcA,eAAsBA,EAAmBC,GAAsB;AAC7D,SAAOC,EAAW,mBAAkD;AAAA,IAClE,KAAKC,EAAgB,KAAK,aAAa;AAAA,IACvC,QAAQ;AAAA,IACR,MAAMF;AAAA,EAAA,CACP;AACH;AAEA,eAAsBG,EAAsBC,GAAsB;AAChE,SAAOH,EAAW,mBAAkD;AAAA,IAClE,KAAKC,EAAgB,KAAK,aAAa;AAAA,IACvC,QAAQ;AAAA,IACR,MAAAE;AAAA,EAAA,CACD;AACH;AAEA,eAAsBC,EAAsBD,GAAsB;AAChE,SAAOH,EAAW,mBAAkD;AAAA,IAClE,KAAKC,EAAgB,KAAK,aAAa;AAAA,IACvC,QAAQ;AAAA,IACR,MAAAE;AAAA,EAAA,CACD;AACH;AAEA,eAAsBE,EAAuBC,GAAY;AACvD,SAAON,EAAW,mBAAkC;AAAA,IAClD,KAAK,GAAGC,EAAgB,KAAK,aAAa,OAAO,IAAIK,CAAE;AAAA,IACvD,QAAQ;AAAA,EAAA,CACT;AACH;AAEA,eAAsBC,EAAsBD,GAAY;AACtD,SAAON,EAAW,mBAAkC;AAAA,IAClD,KAAK,GAAGC,EAAgB,KAAK,aAAa,MAAM,IAAIK,CAAE;AAAA,IACtD,QAAQ;AAAA,EAAA,CACT;AACH;AAEA,eAAsBE,EAAuBT,GAAsB;AACjE,SAAOC,EAAW,mBAAsD;AAAA,IACtE,KAAKC,EAAgB,KAAK,iBAAiB;AAAA,IAC3C,QAAQ;AAAA,IACR,MAAMF;AAAA,EAAA,CACP;AACH;AAEA,eAAsBU,EAA0BN,GAA0B;AACxE,SAAOH,EAAW,mBAAsD;AAAA,IACtE,KAAKC,EAAgB,KAAK,iBAAiB;AAAA,IAC3C,QAAQ;AAAA,IACR,MAAAE;AAA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,SAAS;AAAA,IACnC,QAAQ;AAAA,IACR,MAAMF;AAAA,EAAA,CACP;AACH;AAEA,eAAsB6C,EAAsB7C,GAAwB;AAClE,SAAOC,EAAW,mBAA8B;AAAA,IAC9C,KAAKC,EAAgB,KAAK,SAAS;AAAA,IACnC,QAAQ;AAAA,IACR,MAAMF;AAAA,EAAA,CACP;AACH;"}
|
|
1
|
+
{"version":3,"file":"FluxService.js","sources":["../../../../../lib/base/services/modules/FluxService.ts"],"sourcesContent":["import { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TTipoProcesso } from \"@base/@types/models/flux/tipoProcesso\";\nimport { TGrupoAtendimento } from \"@base/@types/models/flux/grupoAtendimento\";\nimport { TCategoria } from \"@base/@types/models/flux/categoria\";\nimport { TFormularioBase } from \"@base/@types/models/flux/formularioBase\";\nimport {\n TActionProcesso,\n TProcesso,\n TUpdateProcesso,\n} from \"@base/@types/models/flux/processo\";\nimport { TSubcategoria } from \"@base/@types/models/flux/subcategoria\";\nimport { endpointsConfig } from \"@base/configs\";\nimport ApiService from \"lib/@ecme/services/ApiService\";\n\nexport async function apiGetTipoProcesso(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TTipoProcesso>>({\n url: endpointsConfig.flux.tipoProcesso.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateTipoProcesso(data?: TTipoProcesso) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TTipoProcesso>>({\n url: endpointsConfig.flux.tipoProcesso.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateTipoProcesso(data?: TTipoProcesso) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TTipoProcesso>>({\n url: endpointsConfig.flux.tipoProcesso.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneTipoProcesso(id: string) {\n return ApiService.fetchDataWithAxios<TTipoProcesso>({\n url: `${endpointsConfig.flux.tipoProcesso.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteTipoProcesso(id: string) {\n return ApiService.fetchDataWithAxios<TTipoProcesso>({\n url: `${endpointsConfig.flux.tipoProcesso.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiGetGrupoAtendimento(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TGrupoAtendimento>>({\n url: endpointsConfig.flux.grupoAtendimento.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateGrupoAtendimento(data?: TGrupoAtendimento) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TGrupoAtendimento>>({\n url: endpointsConfig.flux.grupoAtendimento.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateGrupoAtendimento(data?: TGrupoAtendimento) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TGrupoAtendimento>>({\n url: endpointsConfig.flux.grupoAtendimento.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneGrupoAtendimento(id: string) {\n return ApiService.fetchDataWithAxios<TGrupoAtendimento>({\n url: `${endpointsConfig.flux.grupoAtendimento.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteGrupoAtendimento(id: string) {\n return ApiService.fetchDataWithAxios<TGrupoAtendimento>({\n url: `${endpointsConfig.flux.grupoAtendimento.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiGetCategoria(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TCategoria>>({\n url: endpointsConfig.flux.categoria.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateCategoria(data?: TCategoria) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TCategoria>>({\n url: endpointsConfig.flux.categoria.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateCategoria(data?: TCategoria) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TCategoria>>({\n url: endpointsConfig.flux.categoria.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneCategoria(id: string) {\n return ApiService.fetchDataWithAxios<TCategoria>({\n url: `${endpointsConfig.flux.categoria.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteCategoria(id: string) {\n return ApiService.fetchDataWithAxios<TCategoria>({\n url: `${endpointsConfig.flux.categoria.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiFindCategoriaByTipoProcesso(idTipoProcesso: number) {\n return ApiService.fetchDataWithAxios<TCategoria[]>({\n url: `${endpointsConfig.flux.categoria.findCategoriaByTipoProcesso}/${idTipoProcesso}`,\n method: \"get\",\n });\n}\n\nexport async function apiGetSubcategoria(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TSubcategoria>>({\n url: endpointsConfig.flux.subcategoria.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateSubcategoria(data?: TSubcategoria) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TSubcategoria>>({\n url: endpointsConfig.flux.subcategoria.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateSubcategoria(data?: TSubcategoria) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TSubcategoria>>({\n url: endpointsConfig.flux.subcategoria.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindSubategoriaByCategoria(idCategoria: number) {\n return ApiService.fetchDataWithAxios<TSubcategoria[]>({\n url: `${endpointsConfig.flux.subcategoria.findSubcategoriaByCategoria}/${idCategoria}`,\n method: \"get\",\n });\n}\n\nexport async function apiFindOneSubcategoria(id: string) {\n return ApiService.fetchDataWithAxios<TSubcategoria>({\n url: `${endpointsConfig.flux.subcategoria.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteSubcategoria(id: string) {\n return ApiService.fetchDataWithAxios<TSubcategoria>({\n url: `${endpointsConfig.flux.subcategoria.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiGetFormularioBase(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TFormularioBase>>({\n url: endpointsConfig.flux.formularioBase.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateFormularioBase(data?: TFormularioBase) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TFormularioBase>>({\n url: endpointsConfig.flux.formularioBase.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateFormularioBase(data?: TFormularioBase) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TFormularioBase>>({\n url: endpointsConfig.flux.formularioBase.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneFormularioBaseBySubcategoria(\n idSubcategoria: number\n) {\n return ApiService.fetchDataWithAxios<TFormularioBase[]>({\n url: `${endpointsConfig.flux.formularioBase.findOneBySubcategoria}/${idSubcategoria}`,\n method: \"get\",\n });\n}\n\nexport async function apiFindOneFormularioBase(id: string) {\n return ApiService.fetchDataWithAxios<TFormularioBase>({\n url: `${endpointsConfig.flux.formularioBase.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiDeleteFormularioBase(id: string) {\n return ApiService.fetchDataWithAxios<TFormularioBase>({\n url: `${endpointsConfig.flux.formularioBase.delete}/${id}`,\n method: \"delete\",\n });\n}\n\nexport async function apiGetProcesso(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TProcesso>>({\n url: endpointsConfig.flux.processo.findAll,\n method: \"post\",\n data: body,\n });\n}\n\nexport async function apiCreateProcesso(data?: TProcesso) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TProcesso>>({\n url: endpointsConfig.flux.processo.add,\n method: \"post\",\n data,\n });\n}\n\nexport async function apiUpdateProcesso(data?: TUpdateProcesso) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TProcesso>>({\n url: endpointsConfig.flux.processo.update,\n method: \"patch\",\n data,\n });\n}\n\nexport async function apiFindOneProcesso(id: string) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: `${endpointsConfig.flux.processo.findOne}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiAceitarProcesso(id: number) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: `${endpointsConfig.flux.processo.aceitar}/${id}`,\n method: \"get\",\n });\n}\n\nexport async function apiConcluirProcesso(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.concluir,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiCancelarProcesso(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.cancelar,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiTransferirProcesso(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.transferir,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiTransferirSolicitante(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.transferirSolicitante,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiTransferirAtendente(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.transferirAtendente,\n method: \"put\",\n data: body,\n });\n}\n\nexport async function apiAdicionarHistorico(body?: TActionProcesso) {\n return ApiService.fetchDataWithAxios<TProcesso>({\n url: endpointsConfig.flux.processo.adicionarHistorico,\n method: \"put\",\n data: body,\n });\n}\n"],"names":["apiGetTipoProcesso","body","ApiService","endpointsConfig","apiCreateTipoProcesso","data","apiUpdateTipoProcesso","apiFindOneTipoProcesso","id","apiDeleteTipoProcesso","apiGetGrupoAtendimento","apiCreateGrupoAtendimento","apiUpdateGrupoAtendimento","apiFindOneGrupoAtendimento","apiDeleteGrupoAtendimento","apiGetCategoria","apiCreateCategoria","apiUpdateCategoria","apiFindOneCategoria","apiDeleteCategoria","apiFindCategoriaByTipoProcesso","idTipoProcesso","apiGetSubcategoria","apiCreateSubcategoria","apiUpdateSubcategoria","apiFindSubategoriaByCategoria","idCategoria","apiFindOneSubcategoria","apiDeleteSubcategoria","apiGetFormularioBase","apiCreateFormularioBase","apiUpdateFormularioBase","apiFindOneFormularioBaseBySubcategoria","idSubcategoria","apiFindOneFormularioBase","apiDeleteFormularioBase","apiGetProcesso","apiCreateProcesso","apiUpdateProcesso","apiFindOneProcesso","apiAceitarProcesso","apiConcluirProcesso","apiCancelarProcesso","apiTransferirProcesso","apiTransferirSolicitante","apiTransferirAtendente","apiAdicionarHistorico"],"mappings":";;;AAcA,eAAsBA,EAAmBC,GAAsB;AAC7D,SAAOC,EAAW,mBAAkD;AAAA,IAClE,KAAKC,EAAgB,KAAK,aAAa;AAAA,IACvC,QAAQ;AAAA,IACR,MAAMF;AAAA,EAAA,CACP;AACH;AAEA,eAAsBG,EAAsBC,GAAsB;AAChE,SAAOH,EAAW,mBAAkD;AAAA,IAClE,KAAKC,EAAgB,KAAK,aAAa;AAAA,IACvC,QAAQ;AAAA,IACR,MAAAE;AAAA,EAAA,CACD;AACH;AAEA,eAAsBC,EAAsBD,GAAsB;AAChE,SAAOH,EAAW,mBAAkD;AAAA,IAClE,KAAKC,EAAgB,KAAK,aAAa;AAAA,IACvC,QAAQ;AAAA,IACR,MAAAE;AAAA,EAAA,CACD;AACH;AAEA,eAAsBE,EAAuBC,GAAY;AACvD,SAAON,EAAW,mBAAkC;AAAA,IAClD,KAAK,GAAGC,EAAgB,KAAK,aAAa,OAAO,IAAIK,CAAE;AAAA,IACvD,QAAQ;AAAA,EAAA,CACT;AACH;AAEA,eAAsBC,EAAsBD,GAAY;AACtD,SAAON,EAAW,mBAAkC;AAAA,IAClD,KAAK,GAAGC,EAAgB,KAAK,aAAa,MAAM,IAAIK,CAAE;AAAA,IACtD,QAAQ;AAAA,EAAA,CACT;AACH;AAEA,eAAsBE,EAAuBT,GAAsB;AACjE,SAAOC,EAAW,mBAAsD;AAAA,IACtE,KAAKC,EAAgB,KAAK,iBAAiB;AAAA,IAC3C,QAAQ;AAAA,IACR,MAAMF;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AAK,SAAS;AAAA,IACnC,QAAQ;AAAA,IACR,MAAMF;AAAA,EAAA,CACP;AACH;AAEA,eAAsB4C,EAAuB5C,GAAwB;AACnE,SAAOC,EAAW,mBAA8B;AAAA,IAC9C,KAAKC,EAAgB,KAAK,SAAS;AAAA,IACnC,QAAQ;AAAA,IACR,MAAMF;AAAA,EAAA,CACP;AACH;AAEA,eAAsB6C,EAAsB7C,GAAwB;AAClE,SAAOC,EAAW,mBAA8B;AAAA,IAC9C,KAAKC,EAAgB,KAAK,SAAS;AAAA,IACnC,QAAQ;AAAA,IACR,MAAMF;AAAA,EAAA,CACP;AACH;"}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
export type SignInCredential = {
|
|
2
|
-
|
|
2
|
+
username: string;
|
|
3
3
|
password: string;
|
|
4
4
|
};
|
|
5
5
|
export type SignInResponse = {
|
|
6
|
-
|
|
7
|
-
user: {
|
|
8
|
-
userId: string;
|
|
9
|
-
userName: string;
|
|
10
|
-
authority: string[];
|
|
11
|
-
avatar: string;
|
|
12
|
-
email: string;
|
|
13
|
-
};
|
|
6
|
+
jwtToken: string;
|
|
14
7
|
};
|
|
15
8
|
export type SignUpResponse = SignInResponse;
|
|
16
9
|
export type SignUpCredential = {
|