gomtm 0.0.184 → 0.0.185

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.
@@ -3,37 +3,37 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useAtom } from "jotai";
4
4
  import { ScopeAtomsHydrator } from "mtxlib/jotai/jotai-helper";
5
5
  import { usePathname } from "next/navigation";
6
- import { MtUnaryCallErrorView } from "../components/MtUnaryCallErrorView";
7
- import { curd3ItemsAtom, curd3ListParamsAtom, curdMethodListAtom, curdSvcAtom } from "./curd.atoms";
6
+ import { curd3ItemsV2Atom, curd3ListParamsAtom, curdPathAtom } from "./curd.atoms";
8
7
  import { ListItemView } from "./list-item/ListItem";
9
8
  function Curd3ListProviderV2(props) {
10
9
  const { params, children } = props;
11
10
  const pathName = usePathname();
12
11
  return /* @__PURE__ */ jsxs(ScopeAtomsHydrator, { atomValues: [
13
- [curd3ListParamsAtom, params]
14
- // [curdMethodListAtom, listMethod],
15
- // [curdSvcAtom, svcName]
12
+ [curd3ListParamsAtom, params],
13
+ [curdPathAtom, pathName]
16
14
  ], children: [
17
15
  /* @__PURE__ */ jsx(Curd3ListProviderV2Debug, {}),
18
16
  children
19
17
  ] });
20
18
  }
21
19
  const Curd2ListViewV2 = () => {
22
- const [res] = useAtom(curd3ItemsAtom);
23
- return /* @__PURE__ */ jsx("div", { className: "bg-blue-100 p-2", children: res.errCode ? /* @__PURE__ */ jsx(MtUnaryCallErrorView, { unaryError: res }) : /* @__PURE__ */ jsx(Fragment, { children: res.items.map((item, i) => {
20
+ var _a;
21
+ const [res] = useAtom(curd3ItemsV2Atom);
22
+ return /* @__PURE__ */ jsx("div", { className: "bg-blue-100 p-2", children: ((_a = res.error) == null ? void 0 : _a.code) ? /* @__PURE__ */ jsxs("div", { children: [
23
+ "error: ",
24
+ res.error.code
25
+ ] }) : /* @__PURE__ */ jsx(Fragment, { children: res.items.map((item, i) => {
24
26
  return /* @__PURE__ */ jsx(ListItemView, { item }, i);
25
27
  }) }) });
26
28
  };
27
29
  const Curd3ListProviderV2Debug = () => {
28
- const [curdSvc, setCurdSvc] = useAtom(curdSvcAtom);
29
- const [curdMethodList, setCurdMethodList] = useAtom(curdMethodListAtom);
30
+ const [pathName] = useAtom(curdPathAtom);
30
31
  return /* @__PURE__ */ jsxs("div", { className: "bg-slate-200 p-2", children: [
31
32
  /* @__PURE__ */ jsx("h1", { children: "Curd3ListProviderV2Debug" }),
33
+ /* @__PURE__ */ jsx("div", {}),
32
34
  /* @__PURE__ */ jsxs("div", { children: [
33
- "method:",
34
- curdSvc,
35
- ".",
36
- curdMethodList
35
+ "pathName: ",
36
+ pathName
37
37
  ] })
38
38
  ] });
39
39
  };
@@ -1,3 +1,3 @@
1
1
  import { PropsWithChildren } from "react";
2
- export declare function CurdViewShow<T>(props: PropsWithChildren): import("react").JSX.Element | null;
2
+ export declare function CurdViewDetail<T = any>(props: PropsWithChildren): import("react").JSX.Element;
3
3
  export declare const DetailViewActions: () => import("react").JSX.Element;
@@ -1,35 +1,66 @@
1
1
  "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { useAtom } from "jotai";
4
- import { useSearchParams } from "next/navigation";
5
- import { createContext, useMemo, useState } from "react";
2
+ var __async = (__this, __arguments, generator) => {
3
+ return new Promise((resolve, reject) => {
4
+ var fulfilled = (value) => {
5
+ try {
6
+ step(generator.next(value));
7
+ } catch (e) {
8
+ reject(e);
9
+ }
10
+ };
11
+ var rejected = (value) => {
12
+ try {
13
+ step(generator.throw(value));
14
+ } catch (e) {
15
+ reject(e);
16
+ }
17
+ };
18
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
19
+ step((generator = generator.apply(__this, __arguments)).next());
20
+ });
21
+ };
22
+ import { jsx, jsxs } from "react/jsx-runtime";
23
+ import { atom, useAtom } from "jotai";
24
+ import { ScopeAtomsHydrator } from "mtxlib/jotai/jotai-helper";
6
25
  import { Icons } from "mtxuilib/icons/icons";
7
26
  import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "mtxuilib/ui/dropdown-menu";
8
27
  import { MtButton } from "mtxuilib/ui/ui-mt/Button";
9
- import { curdActivateIdAtom } from "./curd.atoms";
10
- const curdDetailViewContext = createContext(void 0);
11
- function CurdViewDetailProvider(props) {
12
- const [isOpenEdit, setIsOpenEdit] = useState(false);
13
- return /* @__PURE__ */ jsx(curdDetailViewContext.Provider, { value: {
14
- isOpenEdit,
15
- setIsOpenEdit
16
- }, children: props.children });
17
- }
18
- function CurdViewShow(props) {
28
+ import { usePathname } from "next/navigation";
29
+ import { CurdDetailRes } from "../gomtmpb/mtm/sppb/mtm_pb";
30
+ import { gomtmBaseUrlAtom } from "../providers/GomtmProvider";
31
+ const curdDetailSlugAtom = atom("");
32
+ const curdViewDataAtom = atom((get) => __async(void 0, null, function* () {
33
+ const slugPath = get(curdDetailSlugAtom);
34
+ const path2 = slugPath.split("/");
35
+ const path3 = path2.slice(2).join("/");
36
+ const baseUrl = get(gomtmBaseUrlAtom);
37
+ const url = new URL(`/curd-api/detail/${path3}`, baseUrl);
38
+ const data = yield fetch(url.toString(), {}).then((x) => x.json());
39
+ return CurdDetailRes.fromJson(data);
40
+ }));
41
+ function CurdViewDetail(props) {
19
42
  const { children } = props;
20
- const [activateId, setActivateId] = useAtom(curdActivateIdAtom);
21
- const search = useSearchParams();
22
- useMemo(() => {
23
- const id = search.get("id");
24
- if (id) {
25
- setActivateId(id);
26
- }
27
- }, [search, setActivateId]);
28
- if (!activateId) {
29
- return null;
30
- }
31
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(CurdViewDetailProvider, {}) });
43
+ const pathName = usePathname();
44
+ return /* @__PURE__ */ jsxs(ScopeAtomsHydrator, { atomValues: [
45
+ [curdDetailSlugAtom, pathName]
46
+ ], children: [
47
+ /* @__PURE__ */ jsx(CurdViewDetailDebug, {}),
48
+ /* @__PURE__ */ jsx("h1", { children: "CurdViewDetail" }),
49
+ children
50
+ ] });
32
51
  }
52
+ const CurdViewDetailDebug = () => {
53
+ const [curdDetailSlug, setcurdDetailSlug] = useAtom(curdDetailSlugAtom);
54
+ const [curdViewData] = useAtom(curdViewDataAtom);
55
+ return /* @__PURE__ */ jsxs("div", { children: [
56
+ "CurdViewDetailDebug",
57
+ /* @__PURE__ */ jsxs("div", { children: [
58
+ "curdDetailSlugAtom: ",
59
+ curdDetailSlug
60
+ ] }),
61
+ /* @__PURE__ */ jsx("pre", { children: JSON.stringify(curdViewData, null, 2) })
62
+ ] });
63
+ };
33
64
  const DetailViewActions = () => {
34
65
  return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
35
66
  /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(MtButton, { variant: "ghost", className: "m-0 flex h-10 w-10 items-center justify-center border p-0 shadow-sm backdrop-blur", children: /* @__PURE__ */ jsx(Icons.ellipsis, {}) }) }),
@@ -42,6 +73,6 @@ const DetailViewActions = () => {
42
73
  ] });
43
74
  };
44
75
  export {
45
- CurdViewShow,
76
+ CurdViewDetail,
46
77
  DetailViewActions
47
78
  };
@@ -1,21 +1,14 @@
1
1
  import { AnyMessage, PlainMessage } from "@bufbuild/protobuf";
2
- import { CommontListRes, MtmError } from "../gomtmpb/mtm/sppb/mtm_pb";
2
+ import { CommontListRes } from "../gomtmpb/mtm/sppb/mtm_pb";
3
3
  export declare const curdDashPathPrefixAtom: import("jotai").PrimitiveAtom<string> & {
4
4
  init: string;
5
5
  };
6
6
  export declare const curdActivateIdAtom: import("jotai").PrimitiveAtom<string> & {
7
7
  init: string;
8
8
  };
9
- export declare const curdSvcAtom: import("jotai").PrimitiveAtom<string> & {
10
- init: string;
11
- };
12
- export declare const curdMethodListAtom: import("jotai").PrimitiveAtom<string> & {
13
- init: string;
14
- };
15
9
  export declare const curd3ListParamsAtom: import("jotai").PrimitiveAtom<PlainMessage<AnyMessage>> & {
16
10
  init: PlainMessage<AnyMessage>;
17
11
  };
18
- export declare const curd3ItemsAtom: import("jotai").Atom<Promise<PlainMessage<MtmError> | CommontListRes>>;
19
12
  export declare const curdPathAtom: import("jotai").PrimitiveAtom<string> & {
20
13
  init: string;
21
14
  };
@@ -20,50 +20,26 @@ var __async = (__this, __arguments, generator) => {
20
20
  });
21
21
  };
22
22
  import { atom } from "jotai";
23
- import { createMtmServiceClient, createMtmServiceClientByName } from "../gomtm-clients-ss";
24
- import { MtmService } from "../gomtmpb/mtm/sppb/mtm_connect";
23
+ import { CommontListRes } from "../gomtmpb/mtm/sppb/mtm_pb";
24
+ import { gomtmBaseUrlAtom } from "../providers/GomtmProvider";
25
25
  const curdDashPathPrefixAtom = atom("/gomtmadmin");
26
26
  const curdActivateIdAtom = atom("");
27
- const curdSvcAtom = atom("sppb.MtmService");
28
- const curdMethodListAtom = atom("blogPostList");
29
27
  const curd3ListParamsAtom = atom({});
30
- const curd3ItemsAtom = atom((get) => __async(void 0, null, function* () {
31
- const params = get(curd3ListParamsAtom);
32
- const methodList = get(curdMethodListAtom);
33
- if (!methodList) {
34
- throw new Error("curd3ItemsAtom, missing methodList");
35
- }
36
- const svcName = get(curdSvcAtom);
37
- if (!svcName) {
38
- throw new Error(`curd3ItemsAtom, missing svcName:\u201C${svcName}\u201D`);
39
- }
40
- const client = yield createMtmServiceClientByName(svcName);
41
- const methodFn = client[methodList];
42
- if (!methodFn) {
43
- throw new Error(`missing method ${svcName}.${methodList}`);
44
- }
45
- const data = yield methodFn(params);
46
- return data;
47
- }));
48
28
  const curdPathAtom = atom("");
49
29
  const curd3ItemsV2Atom = atom((get) => __async(void 0, null, function* () {
50
- const client = yield createMtmServiceClient(MtmService);
51
30
  const slugPath = get(curdPathAtom);
52
- const data = yield client.curdList({
53
- params: {
54
- slugs: slugPath
55
- }
56
- });
57
- console.log("list response data", data);
58
- return data;
31
+ const path2 = slugPath.split("/");
32
+ const path3 = path2.slice(2).join("/");
33
+ const baseUrl = get(gomtmBaseUrlAtom);
34
+ const url = new URL(`/curd-api/list/${path3}`, baseUrl);
35
+ const data = yield fetch(url.toString(), {}).then((x) => x.json());
36
+ const data2 = CommontListRes.fromJson(data);
37
+ return data2;
59
38
  }));
60
39
  export {
61
- curd3ItemsAtom,
62
40
  curd3ItemsV2Atom,
63
41
  curd3ListParamsAtom,
64
42
  curdActivateIdAtom,
65
43
  curdDashPathPrefixAtom,
66
- curdMethodListAtom,
67
- curdPathAtom,
68
- curdSvcAtom
44
+ curdPathAtom
69
45
  };
@@ -1,8 +1,9 @@
1
1
  "use client";
2
- import { Fragment, jsx } from "react/jsx-runtime";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { cn } from "mtxuilib/lib/utils";
4
4
  import { MtButton } from "mtxuilib/ui/ui-mt/Button";
5
5
  import { PostCard } from "../../components/blog/PostCard";
6
+ import { MtLink } from "mtxuilib/common/mtlink";
6
7
  const ListItemView = (props) => {
7
8
  const { item } = props;
8
9
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ListItemViewInner, { item }) });
@@ -36,7 +37,11 @@ const CommonListItemView = (props) => {
36
37
  "flex min-h-16 justify-start border p-4 text-left"
37
38
  // item.id == curd.activateId && " font-bold"
38
39
  ),
39
- "aria-label": item.id
40
+ "aria-label": item.id,
41
+ children: /* @__PURE__ */ jsxs(MtLink, { href: "#", children: [
42
+ item.title || item.id,
43
+ item.description && /* @__PURE__ */ jsx("div", { children: item.description })
44
+ ] })
40
45
  }
41
46
  );
42
47
  };
@@ -1,5 +1,5 @@
1
1
  import { MethodKind } from "@bufbuild/protobuf";
2
- import { ArtContentClassifyReply, ArtContentClassifyReq, ArtRewriteReply, ArtRewriteReq, AuthToken, BlogCategorie, BlogCategorieCreateReply, BlogCategorieCreateReq, BlogCategorieGetReq, BlogCategorieListReply, BlogCategorieListReq, BlogCategorieUpdateReq, BlogCategorieUpdateReqply, BlogCleanReq, BlogPost, BlogPostCreateReq, BlogPostGetReq, BlogPostImportReq, BlogPostUpdateReq, CommontListReq, CommontListRes, CurdViewCreateReq, CurdViewGetReq, CurdViewGetRes, CurdViewUpdateReq, DemoGetProductionRequest, Empty, FormCreateReq, FormGetReq, FormSchema, GetMetaReq, GetMetaRes, LoginReply, LoginReq, MtmServerListReq, MtmServerListRes, Oauth2LoginHookRequest, PullLogReq, PullLogRes, RegisterReply, RegisterReq, ResDeleteReq, Result, ServiceMetaReq, ServiceMetaRes, Site, SiteCreateReq, SiteCreateRes, SiteGetReq, SiteHost, SiteHostCreateReq, SiteHostGetReq, SiteHostListReply, SiteHostListReq, SiteHostUpdateReq, SiteImportReq, SiteSetupCftunnelReply, SiteSetupCftunnelReq, SiteUpdateReq, SlugReq, SlugRes, UserinfoRes } from "./mtm_pb";
2
+ import { ArtContentClassifyReply, ArtContentClassifyReq, ArtRewriteReply, ArtRewriteReq, AuthToken, BlogCategorie, BlogCategorieCreateReply, BlogCategorieCreateReq, BlogCategorieGetReq, BlogCategorieListReply, BlogCategorieListReq, BlogCategorieUpdateReq, BlogCategorieUpdateReqply, BlogCleanReq, BlogPost, BlogPostCreateReq, BlogPostGetReq, BlogPostImportReq, BlogPostUpdateReq, CommontListReq, CommontListRes, CurdViewCreateReq, CurdViewGetReq, CurdViewGetRes, CurdViewUpdateReq, Empty, FormCreateReq, FormGetReq, FormSchema, GetMetaReq, GetMetaRes, LoginReply, LoginReq, MtmServerListReq, MtmServerListRes, Oauth2LoginHookRequest, PullLogReq, PullLogRes, RegisterReply, RegisterReq, ResDeleteReq, Result, ServiceMetaReq, ServiceMetaRes, Site, SiteCreateReq, SiteCreateRes, SiteGetReq, SiteHost, SiteHostCreateReq, SiteHostGetReq, SiteHostListReply, SiteHostListReq, SiteHostUpdateReq, SiteImportReq, SiteSetupCftunnelReply, SiteSetupCftunnelReq, SiteUpdateReq, SlugReq, SlugRes, UserinfoRes } from "./mtm_pb";
3
3
  export declare const oauth2LoginHook: {
4
4
  readonly localName: "oauth2LoginHook";
5
5
  readonly name: "Oauth2LoginHook";
@@ -430,23 +430,3 @@ export declare const artRewrite: {
430
430
  readonly typeName: "sppb.MtmService";
431
431
  };
432
432
  };
433
- export declare const demoGetProduction: {
434
- readonly localName: "demoGetProduction";
435
- readonly name: "DemoGetProduction";
436
- readonly kind: MethodKind.Unary;
437
- readonly I: typeof DemoGetProductionRequest;
438
- readonly O: typeof Empty;
439
- readonly service: {
440
- readonly typeName: "sppb.MtmService";
441
- };
442
- };
443
- export declare const curdList: {
444
- readonly localName: "curdList";
445
- readonly name: "CurdList";
446
- readonly kind: MethodKind.Unary;
447
- readonly I: typeof CommontListReq;
448
- readonly O: typeof CommontListRes;
449
- readonly service: {
450
- readonly typeName: "sppb.MtmService";
451
- };
452
- };
@@ -1,5 +1,5 @@
1
1
  import { MethodKind } from "@bufbuild/protobuf";
2
- import { ArtContentClassifyReply, ArtContentClassifyReq, ArtRewriteReply, ArtRewriteReq, AuthToken, BlogCategorie, BlogCategorieCreateReply, BlogCategorieCreateReq, BlogCategorieGetReq, BlogCategorieListReply, BlogCategorieListReq, BlogCategorieUpdateReq, BlogCategorieUpdateReqply, BlogCleanReq, BlogPost, BlogPostCreateReq, BlogPostGetReq, BlogPostImportReq, BlogPostUpdateReq, CommontListReq, CommontListRes, CurdViewCreateReq, CurdViewGetReq, CurdViewGetRes, CurdViewUpdateReq, DemoGetProductionRequest, Empty, FormCreateReq, FormGetReq, FormSchema, GetMetaReq, GetMetaRes, LoginReply, LoginReq, MtmServerListReq, MtmServerListRes, Oauth2LoginHookRequest, PullLogReq, PullLogRes, RegisterReply, RegisterReq, ResDeleteReq, Result, ServiceMetaReq, ServiceMetaRes, Site, SiteCreateReq, SiteCreateRes, SiteGetReq, SiteHost, SiteHostCreateReq, SiteHostGetReq, SiteHostListReply, SiteHostListReq, SiteHostUpdateReq, SiteImportReq, SiteSetupCftunnelReply, SiteSetupCftunnelReq, SiteUpdateReq, SlugReq, SlugRes, UserinfoRes } from "./mtm_pb";
2
+ import { ArtContentClassifyReply, ArtContentClassifyReq, ArtRewriteReply, ArtRewriteReq, AuthToken, BlogCategorie, BlogCategorieCreateReply, BlogCategorieCreateReq, BlogCategorieGetReq, BlogCategorieListReply, BlogCategorieListReq, BlogCategorieUpdateReq, BlogCategorieUpdateReqply, BlogCleanReq, BlogPost, BlogPostCreateReq, BlogPostGetReq, BlogPostImportReq, BlogPostUpdateReq, CommontListReq, CommontListRes, CurdViewCreateReq, CurdViewGetReq, CurdViewGetRes, CurdViewUpdateReq, Empty, FormCreateReq, FormGetReq, FormSchema, GetMetaReq, GetMetaRes, LoginReply, LoginReq, MtmServerListReq, MtmServerListRes, Oauth2LoginHookRequest, PullLogReq, PullLogRes, RegisterReply, RegisterReq, ResDeleteReq, Result, ServiceMetaReq, ServiceMetaRes, Site, SiteCreateReq, SiteCreateRes, SiteGetReq, SiteHost, SiteHostCreateReq, SiteHostGetReq, SiteHostListReply, SiteHostListReq, SiteHostUpdateReq, SiteImportReq, SiteSetupCftunnelReply, SiteSetupCftunnelReq, SiteUpdateReq, SlugReq, SlugRes, UserinfoRes } from "./mtm_pb";
3
3
  const oauth2LoginHook = {
4
4
  localName: "oauth2LoginHook",
5
5
  name: "Oauth2LoginHook",
@@ -430,26 +430,6 @@ const artRewrite = {
430
430
  typeName: "sppb.MtmService"
431
431
  }
432
432
  };
433
- const demoGetProduction = {
434
- localName: "demoGetProduction",
435
- name: "DemoGetProduction",
436
- kind: MethodKind.Unary,
437
- I: DemoGetProductionRequest,
438
- O: Empty,
439
- service: {
440
- typeName: "sppb.MtmService"
441
- }
442
- };
443
- const curdList = {
444
- localName: "curdList",
445
- name: "CurdList",
446
- kind: MethodKind.Unary,
447
- I: CommontListReq,
448
- O: CommontListRes,
449
- service: {
450
- typeName: "sppb.MtmService"
451
- }
452
- };
453
433
  export {
454
434
  artContentClassify,
455
435
  artRewrite,
@@ -465,12 +445,10 @@ export {
465
445
  blogPostImport,
466
446
  blogPostList,
467
447
  blogPostUpdate,
468
- curdList,
469
448
  curdViewCreate,
470
449
  curdViewGet,
471
450
  curdViewList,
472
451
  curdViewUpdate,
473
- demoGetProduction,
474
452
  formCreate,
475
453
  formGet,
476
454
  formList,
@@ -1,4 +1,4 @@
1
- import { ArtContentClassifyReply, ArtContentClassifyReq, ArtRewriteReply, ArtRewriteReq, AuthToken, BlogCategorie, BlogCategorieCreateReply, BlogCategorieCreateReq, BlogCategorieGetReq, BlogCategorieListReply, BlogCategorieListReq, BlogCategorieUpdateReq, BlogCategorieUpdateReqply, BlogCleanReq, BlogPost, BlogPostCreateReq, BlogPostGetReq, BlogPostImportReq, BlogPostUpdateReq, CommontListReq, CommontListRes, CurdViewCreateReq, CurdViewGetReq, CurdViewGetRes, CurdViewUpdateReq, DemoGetProductionRequest, Empty, FormCreateReq, FormGetReq, FormSchema, GetMetaReq, GetMetaRes, LoginReply, LoginReq, MtmServerListReq, MtmServerListRes, Oauth2LoginHookRequest, PullLogReq, PullLogRes, RegisterReply, RegisterReq, ResDeleteReq, Result, ServiceMetaReq, ServiceMetaRes, Site, SiteCreateReq, SiteCreateRes, SiteGetReq, SiteHost, SiteHostCreateReq, SiteHostGetReq, SiteHostListReply, SiteHostListReq, SiteHostUpdateReq, SiteImportReq, SiteSetupCftunnelReply, SiteSetupCftunnelReq, SiteUpdateReq, SlugReq, SlugRes, UserinfoRes } from "./mtm_pb";
1
+ import { ArtContentClassifyReply, ArtContentClassifyReq, ArtRewriteReply, ArtRewriteReq, AuthToken, BlogCategorie, BlogCategorieCreateReply, BlogCategorieCreateReq, BlogCategorieGetReq, BlogCategorieListReply, BlogCategorieListReq, BlogCategorieUpdateReq, BlogCategorieUpdateReqply, BlogCleanReq, BlogPost, BlogPostCreateReq, BlogPostGetReq, BlogPostImportReq, BlogPostUpdateReq, CommontListReq, CommontListRes, CurdViewCreateReq, CurdViewGetReq, CurdViewGetRes, CurdViewUpdateReq, Empty, FormCreateReq, FormGetReq, FormSchema, GetMetaReq, GetMetaRes, LoginReply, LoginReq, MtmServerListReq, MtmServerListRes, Oauth2LoginHookRequest, PullLogReq, PullLogRes, RegisterReply, RegisterReq, ResDeleteReq, Result, ServiceMetaReq, ServiceMetaRes, Site, SiteCreateReq, SiteCreateRes, SiteGetReq, SiteHost, SiteHostCreateReq, SiteHostGetReq, SiteHostListReply, SiteHostListReq, SiteHostUpdateReq, SiteImportReq, SiteSetupCftunnelReply, SiteSetupCftunnelReq, SiteUpdateReq, SlugReq, SlugRes, UserinfoRes } from "./mtm_pb";
2
2
  import { MethodKind } from "@bufbuild/protobuf";
3
3
  export declare const MtmService: {
4
4
  readonly typeName: "sppb.MtmService";
@@ -261,17 +261,5 @@ export declare const MtmService: {
261
261
  readonly O: typeof ArtRewriteReply;
262
262
  readonly kind: MethodKind.Unary;
263
263
  };
264
- readonly demoGetProduction: {
265
- readonly name: "DemoGetProduction";
266
- readonly I: typeof DemoGetProductionRequest;
267
- readonly O: typeof Empty;
268
- readonly kind: MethodKind.Unary;
269
- };
270
- readonly curdList: {
271
- readonly name: "CurdList";
272
- readonly I: typeof CommontListReq;
273
- readonly O: typeof CommontListRes;
274
- readonly kind: MethodKind.Unary;
275
- };
276
264
  };
277
265
  };
@@ -1,4 +1,4 @@
1
- import { ArtContentClassifyReply, ArtContentClassifyReq, ArtRewriteReply, ArtRewriteReq, AuthToken, BlogCategorie, BlogCategorieCreateReply, BlogCategorieCreateReq, BlogCategorieGetReq, BlogCategorieListReply, BlogCategorieListReq, BlogCategorieUpdateReq, BlogCategorieUpdateReqply, BlogCleanReq, BlogPost, BlogPostCreateReq, BlogPostGetReq, BlogPostImportReq, BlogPostUpdateReq, CommontListReq, CommontListRes, CurdViewCreateReq, CurdViewGetReq, CurdViewGetRes, CurdViewUpdateReq, DemoGetProductionRequest, Empty, FormCreateReq, FormGetReq, FormSchema, GetMetaReq, GetMetaRes, LoginReply, LoginReq, MtmServerListReq, MtmServerListRes, Oauth2LoginHookRequest, PullLogReq, PullLogRes, RegisterReply, RegisterReq, ResDeleteReq, Result, ServiceMetaReq, ServiceMetaRes, Site, SiteCreateReq, SiteCreateRes, SiteGetReq, SiteHost, SiteHostCreateReq, SiteHostGetReq, SiteHostListReply, SiteHostListReq, SiteHostUpdateReq, SiteImportReq, SiteSetupCftunnelReply, SiteSetupCftunnelReq, SiteUpdateReq, SlugReq, SlugRes, UserinfoRes } from "./mtm_pb";
1
+ import { ArtContentClassifyReply, ArtContentClassifyReq, ArtRewriteReply, ArtRewriteReq, AuthToken, BlogCategorie, BlogCategorieCreateReply, BlogCategorieCreateReq, BlogCategorieGetReq, BlogCategorieListReply, BlogCategorieListReq, BlogCategorieUpdateReq, BlogCategorieUpdateReqply, BlogCleanReq, BlogPost, BlogPostCreateReq, BlogPostGetReq, BlogPostImportReq, BlogPostUpdateReq, CommontListReq, CommontListRes, CurdViewCreateReq, CurdViewGetReq, CurdViewGetRes, CurdViewUpdateReq, Empty, FormCreateReq, FormGetReq, FormSchema, GetMetaReq, GetMetaRes, LoginReply, LoginReq, MtmServerListReq, MtmServerListRes, Oauth2LoginHookRequest, PullLogReq, PullLogRes, RegisterReply, RegisterReq, ResDeleteReq, Result, ServiceMetaReq, ServiceMetaRes, Site, SiteCreateReq, SiteCreateRes, SiteGetReq, SiteHost, SiteHostCreateReq, SiteHostGetReq, SiteHostListReply, SiteHostListReq, SiteHostUpdateReq, SiteImportReq, SiteSetupCftunnelReply, SiteSetupCftunnelReq, SiteUpdateReq, SlugReq, SlugRes, UserinfoRes } from "./mtm_pb";
2
2
  import { MethodKind } from "@bufbuild/protobuf";
3
3
  const MtmService = {
4
4
  typeName: "sppb.MtmService",
@@ -423,26 +423,6 @@ const MtmService = {
423
423
  I: ArtRewriteReq,
424
424
  O: ArtRewriteReply,
425
425
  kind: MethodKind.Unary
426
- },
427
- /**
428
- * 临时范例
429
- *
430
- * @generated from rpc sppb.MtmService.DemoGetProduction
431
- */
432
- demoGetProduction: {
433
- name: "DemoGetProduction",
434
- I: DemoGetProductionRequest,
435
- O: Empty,
436
- kind: MethodKind.Unary
437
- },
438
- /**
439
- * @generated from rpc sppb.MtmService.CurdList
440
- */
441
- curdList: {
442
- name: "CurdList",
443
- I: CommontListReq,
444
- O: CommontListRes,
445
- kind: MethodKind.Unary
446
426
  }
447
427
  }
448
428
  };
@@ -513,6 +513,7 @@ export declare class CommontListRes extends Message<CommontListRes> {
513
513
  pagination?: Paging;
514
514
  Total: number;
515
515
  items: ListItem[];
516
+ error?: ErrorRes;
516
517
  constructor(data?: PartialMessage<CommontListRes>);
517
518
  static readonly runtime: typeof proto3;
518
519
  static readonly typeName = "sppb.CommontListRes";
@@ -522,6 +523,41 @@ export declare class CommontListRes extends Message<CommontListRes> {
522
523
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CommontListRes;
523
524
  static equals(a: CommontListRes | PlainMessage<CommontListRes> | undefined, b: CommontListRes | PlainMessage<CommontListRes> | undefined): boolean;
524
525
  }
526
+ export declare class CurdDetailReq extends Message<CurdDetailReq> {
527
+ slug: string;
528
+ constructor(data?: PartialMessage<CurdDetailReq>);
529
+ static readonly runtime: typeof proto3;
530
+ static readonly typeName = "sppb.CurdDetailReq";
531
+ static readonly fields: FieldList;
532
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CurdDetailReq;
533
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CurdDetailReq;
534
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CurdDetailReq;
535
+ static equals(a: CurdDetailReq | PlainMessage<CurdDetailReq> | undefined, b: CurdDetailReq | PlainMessage<CurdDetailReq> | undefined): boolean;
536
+ }
537
+ export declare class CurdDetail extends Message<CurdDetail> {
538
+ title: string;
539
+ form?: FormSchema;
540
+ constructor(data?: PartialMessage<CurdDetail>);
541
+ static readonly runtime: typeof proto3;
542
+ static readonly typeName = "sppb.CurdDetail";
543
+ static readonly fields: FieldList;
544
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CurdDetail;
545
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CurdDetail;
546
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CurdDetail;
547
+ static equals(a: CurdDetail | PlainMessage<CurdDetail> | undefined, b: CurdDetail | PlainMessage<CurdDetail> | undefined): boolean;
548
+ }
549
+ export declare class CurdDetailRes extends Message<CurdDetailRes> {
550
+ error?: ErrorRes;
551
+ detailView?: CurdDetail;
552
+ constructor(data?: PartialMessage<CurdDetailRes>);
553
+ static readonly runtime: typeof proto3;
554
+ static readonly typeName = "sppb.CurdDetailRes";
555
+ static readonly fields: FieldList;
556
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CurdDetailRes;
557
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CurdDetailRes;
558
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CurdDetailRes;
559
+ static equals(a: CurdDetailRes | PlainMessage<CurdDetailRes> | undefined, b: CurdDetailRes | PlainMessage<CurdDetailRes> | undefined): boolean;
560
+ }
525
561
  export declare class MtDate extends Message<MtDate> {
526
562
  year: number;
527
563
  month: number;
@@ -2037,6 +2037,10 @@ const _CommontListRes = class _CommontListRes extends Message {
2037
2037
  * @generated from field: repeated sppb.ListItem items = 4;
2038
2038
  */
2039
2039
  __publicField(this, "items", []);
2040
+ /**
2041
+ * @generated from field: sppb.ErrorRes error = 5;
2042
+ */
2043
+ __publicField(this, "error");
2040
2044
  proto3.util.initPartial(data, this);
2041
2045
  }
2042
2046
  static fromBinary(bytes, options) {
@@ -2064,9 +2068,118 @@ __publicField(_CommontListRes, "fields", proto3.util.newFieldList(() => [
2064
2068
  T: 5
2065
2069
  /* ScalarType.INT32 */
2066
2070
  },
2067
- { no: 4, name: "items", kind: "message", T: ListItem, repeated: true }
2071
+ { no: 4, name: "items", kind: "message", T: ListItem, repeated: true },
2072
+ { no: 5, name: "error", kind: "message", T: ErrorRes }
2068
2073
  ]));
2069
2074
  let CommontListRes = _CommontListRes;
2075
+ const _CurdDetailReq = class _CurdDetailReq extends Message {
2076
+ constructor(data) {
2077
+ super();
2078
+ /**
2079
+ * @generated from field: string slug = 1;
2080
+ */
2081
+ __publicField(this, "slug", "");
2082
+ proto3.util.initPartial(data, this);
2083
+ }
2084
+ static fromBinary(bytes, options) {
2085
+ return new _CurdDetailReq().fromBinary(bytes, options);
2086
+ }
2087
+ static fromJson(jsonValue, options) {
2088
+ return new _CurdDetailReq().fromJson(jsonValue, options);
2089
+ }
2090
+ static fromJsonString(jsonString, options) {
2091
+ return new _CurdDetailReq().fromJsonString(jsonString, options);
2092
+ }
2093
+ static equals(a, b) {
2094
+ return proto3.util.equals(_CurdDetailReq, a, b);
2095
+ }
2096
+ };
2097
+ __publicField(_CurdDetailReq, "runtime", proto3);
2098
+ __publicField(_CurdDetailReq, "typeName", "sppb.CurdDetailReq");
2099
+ __publicField(_CurdDetailReq, "fields", proto3.util.newFieldList(() => [
2100
+ {
2101
+ no: 1,
2102
+ name: "slug",
2103
+ kind: "scalar",
2104
+ T: 9
2105
+ /* ScalarType.STRING */
2106
+ }
2107
+ ]));
2108
+ let CurdDetailReq = _CurdDetailReq;
2109
+ const _CurdDetail = class _CurdDetail extends Message {
2110
+ constructor(data) {
2111
+ super();
2112
+ /**
2113
+ * @generated from field: string title = 1;
2114
+ */
2115
+ __publicField(this, "title", "");
2116
+ /**
2117
+ * TODO: 其他数据类型,例如 show card
2118
+ *
2119
+ * @generated from field: sppb.FormSchema form = 2;
2120
+ */
2121
+ __publicField(this, "form");
2122
+ proto3.util.initPartial(data, this);
2123
+ }
2124
+ static fromBinary(bytes, options) {
2125
+ return new _CurdDetail().fromBinary(bytes, options);
2126
+ }
2127
+ static fromJson(jsonValue, options) {
2128
+ return new _CurdDetail().fromJson(jsonValue, options);
2129
+ }
2130
+ static fromJsonString(jsonString, options) {
2131
+ return new _CurdDetail().fromJsonString(jsonString, options);
2132
+ }
2133
+ static equals(a, b) {
2134
+ return proto3.util.equals(_CurdDetail, a, b);
2135
+ }
2136
+ };
2137
+ __publicField(_CurdDetail, "runtime", proto3);
2138
+ __publicField(_CurdDetail, "typeName", "sppb.CurdDetail");
2139
+ __publicField(_CurdDetail, "fields", proto3.util.newFieldList(() => [
2140
+ {
2141
+ no: 1,
2142
+ name: "title",
2143
+ kind: "scalar",
2144
+ T: 9
2145
+ /* ScalarType.STRING */
2146
+ },
2147
+ { no: 2, name: "form", kind: "message", T: FormSchema }
2148
+ ]));
2149
+ let CurdDetail = _CurdDetail;
2150
+ const _CurdDetailRes = class _CurdDetailRes extends Message {
2151
+ constructor(data) {
2152
+ super();
2153
+ /**
2154
+ * @generated from field: sppb.ErrorRes error = 1;
2155
+ */
2156
+ __publicField(this, "error");
2157
+ /**
2158
+ * @generated from field: sppb.CurdDetail detail_view = 2;
2159
+ */
2160
+ __publicField(this, "detailView");
2161
+ proto3.util.initPartial(data, this);
2162
+ }
2163
+ static fromBinary(bytes, options) {
2164
+ return new _CurdDetailRes().fromBinary(bytes, options);
2165
+ }
2166
+ static fromJson(jsonValue, options) {
2167
+ return new _CurdDetailRes().fromJson(jsonValue, options);
2168
+ }
2169
+ static fromJsonString(jsonString, options) {
2170
+ return new _CurdDetailRes().fromJsonString(jsonString, options);
2171
+ }
2172
+ static equals(a, b) {
2173
+ return proto3.util.equals(_CurdDetailRes, a, b);
2174
+ }
2175
+ };
2176
+ __publicField(_CurdDetailRes, "runtime", proto3);
2177
+ __publicField(_CurdDetailRes, "typeName", "sppb.CurdDetailRes");
2178
+ __publicField(_CurdDetailRes, "fields", proto3.util.newFieldList(() => [
2179
+ { no: 1, name: "error", kind: "message", T: ErrorRes },
2180
+ { no: 2, name: "detail_view", kind: "message", T: CurdDetail }
2181
+ ]));
2182
+ let CurdDetailRes = _CurdDetailRes;
2070
2183
  const _MtDate = class _MtDate extends Message {
2071
2184
  constructor(data) {
2072
2185
  super();
@@ -7000,6 +7113,9 @@ export {
7000
7113
  CommonListItem,
7001
7114
  CommontListReq,
7002
7115
  CommontListRes,
7116
+ CurdDetail,
7117
+ CurdDetailReq,
7118
+ CurdDetailRes,
7003
7119
  CurdView,
7004
7120
  CurdViewCreateReq,
7005
7121
  CurdViewGetReq,