m2m-components 3.0.2 → 3.0.3-alpha-aeac601.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/cjs/endpoints/matsuri-forms.js +16 -0
- package/cjs/endpoints/matsuri-forms.js.map +1 -0
- package/cjs/endpoints/matsuri-forms.v1.js +381 -0
- package/cjs/endpoints/matsuri-forms.v1.js.map +1 -0
- package/cjs/feedback/MultipleTextQuestion.js +19 -0
- package/cjs/feedback/MultipleTextQuestion.js.map +1 -0
- package/cjs/feedback/SelectQuestion.js +27 -0
- package/cjs/feedback/SelectQuestion.js.map +1 -0
- package/cjs/feedback/getRandomId.js +12 -0
- package/cjs/feedback/getRandomId.js.map +1 -0
- package/cjs/feedback/index.js +178 -0
- package/cjs/feedback/index.js.map +1 -0
- package/endpoints/matsuri-forms.d.ts +5 -0
- package/endpoints/matsuri-forms.d.ts.map +1 -0
- package/endpoints/matsuri-forms.js +6 -0
- package/endpoints/matsuri-forms.js.map +1 -0
- package/endpoints/matsuri-forms.v1.d.ts +177 -0
- package/endpoints/matsuri-forms.v1.d.ts.map +1 -0
- package/endpoints/matsuri-forms.v1.js +405 -0
- package/endpoints/matsuri-forms.v1.js.map +1 -0
- package/feedback/MultipleTextQuestion.d.ts +3 -0
- package/feedback/MultipleTextQuestion.d.ts.map +1 -0
- package/feedback/MultipleTextQuestion.js +12 -0
- package/feedback/MultipleTextQuestion.js.map +1 -0
- package/feedback/SelectQuestion.d.ts +3 -0
- package/feedback/SelectQuestion.d.ts.map +1 -0
- package/feedback/SelectQuestion.js +20 -0
- package/feedback/SelectQuestion.js.map +1 -0
- package/feedback/getRandomId.d.ts +5 -0
- package/feedback/getRandomId.d.ts.map +1 -0
- package/feedback/getRandomId.js +5 -0
- package/feedback/getRandomId.js.map +1 -0
- package/feedback/index.d.ts +13 -0
- package/feedback/index.d.ts.map +1 -0
- package/feedback/index.js +189 -0
- package/feedback/index.js.map +1 -0
- package/package.json +14 -7
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FeedbackProvider = void 0;
|
|
7
|
+
var _matsuriUi = require("matsuri-ui");
|
|
8
|
+
var _Feedback = _interopRequireDefault(require("@mui/icons-material/Feedback"));
|
|
9
|
+
var _matsuriFormsSdk = require("matsuri-forms-sdk");
|
|
10
|
+
var _SelectQuestion = require("./SelectQuestion");
|
|
11
|
+
var _MultipleTextQuestion = require("./MultipleTextQuestion");
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
var _getRandomId = require("./getRandomId");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
const getFormId = () => {
|
|
17
|
+
return globalThis.M2M_COMPONENTS_ENV === "production" ? "01GWRQ1MRS7PE29XGRETFZ6D7Y" : "01GTBSYMGPMX91E96P007SXEMH";
|
|
18
|
+
};
|
|
19
|
+
const TextQuestionContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
20
|
+
const TextQuestion = props => {
|
|
21
|
+
const context = (0, _react.useContext)(TextQuestionContext);
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
23
|
+
value: context[props.title],
|
|
24
|
+
type: "hidden",
|
|
25
|
+
name: props.name
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const FeedbackProviderModal = props => {
|
|
29
|
+
const {
|
|
30
|
+
questions,
|
|
31
|
+
submit
|
|
32
|
+
} = (0, _matsuriFormsSdk.useMatsuriForms)(getFormId());
|
|
33
|
+
const {
|
|
34
|
+
throwAlert
|
|
35
|
+
} = (0, _matsuriUi.useAlert)();
|
|
36
|
+
const [status, setStatus] = (0, _react.useState)("started");
|
|
37
|
+
const id = (0, _getRandomId.getRandomId)();
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_matsuriUi.Modal, {
|
|
39
|
+
backdrop: true,
|
|
40
|
+
width: 600,
|
|
41
|
+
maxWidth: 600,
|
|
42
|
+
header: /*#__PURE__*/(0, _jsxRuntime.jsx)(_matsuriUi.Typography, {
|
|
43
|
+
variant: "h3",
|
|
44
|
+
children: "\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u9001\u4FE1"
|
|
45
|
+
}),
|
|
46
|
+
body: status === "completed" ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
47
|
+
style: {
|
|
48
|
+
display: "grid",
|
|
49
|
+
gap: 32
|
|
50
|
+
},
|
|
51
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_matsuriUi.Typography, {
|
|
52
|
+
children: "\u30EC\u30DD\u30FC\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F\u3002\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002"
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_matsuriUi.Typography, {
|
|
54
|
+
color: "textSecondary",
|
|
55
|
+
variant: "caption",
|
|
56
|
+
as: "p",
|
|
57
|
+
children: "\u304A\u9001\u308A\u3044\u305F\u3060\u3044\u305F\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u306F\u3001\u554F\u984C\u306E\u89E3\u6C7A\u3068\u30B5\u30FC\u30D3\u30B9\u306E\u6539\u5584\u306B\u5F79\u7ACB\u3066\u3055\u305B\u3066\u3044\u305F\u3060\u304D\u307E\u3059\u3002"
|
|
58
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_matsuriUi.Button, {
|
|
59
|
+
color: "primary",
|
|
60
|
+
variant: "filled",
|
|
61
|
+
onClick: () => {
|
|
62
|
+
props.onClose?.();
|
|
63
|
+
},
|
|
64
|
+
children: "\u9589\u3058\u308B"
|
|
65
|
+
})]
|
|
66
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
|
|
67
|
+
onSubmit: async event => {
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
setStatus("sending");
|
|
70
|
+
const {
|
|
71
|
+
error
|
|
72
|
+
} = await submit(event.currentTarget);
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 以下、対応が行われるまでは取れる値だけ送る
|
|
76
|
+
* https://github.com/matsuri-tech/matsuri-forms-manager-front/issues/265
|
|
77
|
+
*/
|
|
78
|
+
const input = {
|
|
79
|
+
id,
|
|
80
|
+
userId: props.userId,
|
|
81
|
+
userName: props.userName,
|
|
82
|
+
serviceName: props.serviceName,
|
|
83
|
+
url: window.location.href
|
|
84
|
+
};
|
|
85
|
+
throwAlert(error, {
|
|
86
|
+
ignoreSuccess: true,
|
|
87
|
+
errorMessage: {
|
|
88
|
+
reason: "サーバー側のエラーの可能性があります。",
|
|
89
|
+
action: "しばらく時間を空けて試すか、開発チームへお問い合わせください。",
|
|
90
|
+
happend: "フィードバックの送信に失敗しました。"
|
|
91
|
+
},
|
|
92
|
+
onSuccess: () => {
|
|
93
|
+
props.datadogLogs?.logger?.info?.(`Feedback: ${id} by ${props.userId}`, {
|
|
94
|
+
input
|
|
95
|
+
});
|
|
96
|
+
window.setTimeout(() => {
|
|
97
|
+
setStatus("completed");
|
|
98
|
+
}, 2000);
|
|
99
|
+
},
|
|
100
|
+
onError: () => {
|
|
101
|
+
props.datadogLogs?.logger?.error?.(`Failed Feedback: ${input.id} by ${input.userId}`, {
|
|
102
|
+
input,
|
|
103
|
+
error
|
|
104
|
+
});
|
|
105
|
+
window.setTimeout(() => {
|
|
106
|
+
setStatus("started");
|
|
107
|
+
}, 2000);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(TextQuestionContext.Provider, {
|
|
112
|
+
value: {
|
|
113
|
+
userId: props.userId,
|
|
114
|
+
userName: props.userName,
|
|
115
|
+
serviceName: props.serviceName,
|
|
116
|
+
url: window.location.href
|
|
117
|
+
},
|
|
118
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_matsuriFormsSdk.MatsuriFormsQuestionProvider, {
|
|
119
|
+
renderSelect: _SelectQuestion.SelectQuestion,
|
|
120
|
+
renderMultilineText: _MultipleTextQuestion.MultipleTextQuestion,
|
|
121
|
+
renderText: TextQuestion,
|
|
122
|
+
children: questions.map(question => {
|
|
123
|
+
return /*#__PURE__*/(0, _react.createElement)(_matsuriFormsSdk.MatsuriFormsQuestion, {
|
|
124
|
+
...question,
|
|
125
|
+
key: question.id
|
|
126
|
+
});
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
130
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_matsuriUi.Button, {
|
|
131
|
+
type: "submit",
|
|
132
|
+
color: "primary",
|
|
133
|
+
variant: "filled",
|
|
134
|
+
disabled: status === "sending",
|
|
135
|
+
fullWidth: true,
|
|
136
|
+
children: "\u9001\u4FE1"
|
|
137
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_matsuriUi.Typography, {
|
|
138
|
+
variant: "caption",
|
|
139
|
+
style: {
|
|
140
|
+
float: "right"
|
|
141
|
+
},
|
|
142
|
+
children: [status === "sending" ? "送信中..." : undefined, "\xA0"]
|
|
143
|
+
})]
|
|
144
|
+
})]
|
|
145
|
+
}),
|
|
146
|
+
...props
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
const FeedbackProvider = ({
|
|
150
|
+
children,
|
|
151
|
+
...modalProps
|
|
152
|
+
}) => {
|
|
153
|
+
const [open] = (0, _matsuriUi.useModal)(FeedbackProviderModal, {
|
|
154
|
+
enableClickOutside: true,
|
|
155
|
+
disableClose: false
|
|
156
|
+
});
|
|
157
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
158
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_matsuriUi.Portal, {
|
|
159
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_matsuriUi.Button, {
|
|
160
|
+
style: {
|
|
161
|
+
position: "fixed",
|
|
162
|
+
bottom: 16,
|
|
163
|
+
right: 16
|
|
164
|
+
},
|
|
165
|
+
onClick: () => {
|
|
166
|
+
open(modalProps);
|
|
167
|
+
},
|
|
168
|
+
type: "button",
|
|
169
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Feedback.default, {}),
|
|
170
|
+
color: "secondary",
|
|
171
|
+
variant: "filled",
|
|
172
|
+
rounded: true
|
|
173
|
+
})
|
|
174
|
+
})]
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
exports.FeedbackProvider = FeedbackProvider;
|
|
178
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_matsuriUi","require","_Feedback","_interopRequireDefault","_matsuriFormsSdk","_SelectQuestion","_MultipleTextQuestion","_react","_getRandomId","_jsxRuntime","obj","__esModule","default","getFormId","globalThis","M2M_COMPONENTS_ENV","TextQuestionContext","createContext","TextQuestion","props","context","useContext","jsx","value","title","type","name","FeedbackProviderModal","questions","submit","useMatsuriForms","throwAlert","useAlert","status","setStatus","useState","id","getRandomId","Modal","backdrop","width","maxWidth","header","Typography","variant","children","body","jsxs","style","display","gap","color","as","Button","onClick","onClose","onSubmit","event","preventDefault","error","currentTarget","input","userId","userName","serviceName","url","window","location","href","ignoreSuccess","errorMessage","reason","action","happend","onSuccess","datadogLogs","logger","info","setTimeout","onError","Provider","MatsuriFormsQuestionProvider","renderSelect","SelectQuestion","renderMultilineText","MultipleTextQuestion","renderText","map","question","createElement","MatsuriFormsQuestion","key","disabled","fullWidth","float","undefined","FeedbackProvider","modalProps","open","useModal","enableClickOutside","disableClose","Portal","position","bottom","right","icon","rounded","exports"],"sources":["../../src/feedback/index.tsx"],"sourcesContent":["import {\n Button,\n Modal,\n ModalProps,\n Portal,\n Typography,\n useAlert,\n useModal,\n} from \"matsuri-ui\";\nimport FeedbackIcon from \"@mui/icons-material/Feedback\";\nimport {\n MatsuriFormsQuestion,\n MatsuriFormsQuestionProvider,\n MatsuriFormsTextQuestionProps,\n useMatsuriForms,\n} from \"matsuri-forms-sdk\";\nimport { SelectQuestion } from \"./SelectQuestion\";\nimport { MultipleTextQuestion } from \"./MultipleTextQuestion\";\nimport { createContext, PropsWithChildren, useContext, useState } from \"react\";\nimport { getRandomId } from \"./getRandomId\";\nimport { type Logger } from \"@datadog/browser-logs\";\n\nconst getFormId = () => {\n return globalThis.M2M_COMPONENTS_ENV === \"production\"\n ? \"01GWRQ1MRS7PE29XGRETFZ6D7Y\"\n : \"01GTBSYMGPMX91E96P007SXEMH\";\n};\n\ninterface TextQuestionContextValue {\n userId?: string;\n userName?: string;\n serviceName?: string;\n url?: string;\n}\n\nconst TextQuestionContext = createContext<TextQuestionContextValue>({});\n\nconst TextQuestion = (props: MatsuriFormsTextQuestionProps) => {\n const context = useContext(TextQuestionContext);\n return (\n <input\n value={context[props.title as keyof TextQuestionContextValue]}\n type=\"hidden\"\n name={props.name}\n />\n );\n};\n\ninterface FeedbackProviderModalProps\n extends Partial<ModalProps>,\n FeedbackProviderProps {}\n\nconst FeedbackProviderModal = (props: FeedbackProviderModalProps) => {\n const { questions, submit } = useMatsuriForms(getFormId());\n\n const { throwAlert } = useAlert();\n\n const [status, setStatus] = useState<\"started\" | \"sending\" | \"completed\">(\n \"started\"\n );\n\n const id = getRandomId();\n\n return (\n <Modal\n backdrop\n width={600}\n maxWidth={600}\n header={<Typography variant=\"h3\">フィードバックを送信</Typography>}\n body={\n status === \"completed\" ? (\n <div\n style={{\n display: \"grid\",\n gap: 32,\n }}\n >\n <Typography>\n レポートを送信しました。ありがとうございます。\n </Typography>\n <Typography color=\"textSecondary\" variant=\"caption\" as=\"p\">\n お送りいただいたフィードバックは、問題の解決とサービスの改善に役立てさせていただきます。\n </Typography>\n <Button\n color=\"primary\"\n variant=\"filled\"\n onClick={() => {\n props.onClose?.();\n }}\n >\n 閉じる\n </Button>\n </div>\n ) : (\n <form\n onSubmit={async (event) => {\n event.preventDefault();\n setStatus(\"sending\");\n const { error } = await submit(event.currentTarget);\n\n /**\n * 以下、対応が行われるまでは取れる値だけ送る\n * https://github.com/matsuri-tech/matsuri-forms-manager-front/issues/265\n */\n const input = {\n id,\n userId: props.userId,\n userName: props.userName,\n serviceName: props.serviceName,\n url: window.location.href,\n };\n throwAlert(error, {\n ignoreSuccess: true,\n errorMessage: {\n reason: \"サーバー側のエラーの可能性があります。\",\n action:\n \"しばらく時間を空けて試すか、開発チームへお問い合わせください。\",\n happend: \"フィードバックの送信に失敗しました。\",\n },\n onSuccess: () => {\n props.datadogLogs?.logger?.info?.(\n `Feedback: ${id} by ${props.userId}`,\n {\n input,\n }\n );\n\n window.setTimeout(() => {\n setStatus(\"completed\");\n }, 2000);\n },\n onError: () => {\n props.datadogLogs?.logger?.error?.(\n `Failed Feedback: ${input.id} by ${input.userId}`,\n { input, error }\n );\n\n window.setTimeout(() => {\n setStatus(\"started\");\n }, 2000);\n },\n });\n }}\n >\n <TextQuestionContext.Provider\n value={{\n userId: props.userId,\n userName: props.userName,\n serviceName: props.serviceName,\n url: window.location.href,\n }}\n >\n <MatsuriFormsQuestionProvider\n renderSelect={SelectQuestion}\n renderMultilineText={MultipleTextQuestion}\n renderText={TextQuestion}\n >\n {questions.map((question) => {\n return (\n <MatsuriFormsQuestion {...question} key={question.id} />\n );\n })}\n </MatsuriFormsQuestionProvider>\n </TextQuestionContext.Provider>\n <div>\n <Button\n type=\"submit\"\n color=\"primary\"\n variant=\"filled\"\n disabled={status === \"sending\"}\n fullWidth\n >\n 送信\n </Button>\n <Typography\n variant=\"caption\"\n style={{\n float: \"right\",\n }}\n >\n {status === \"sending\" ? \"送信中...\" : undefined}\n \n </Typography>\n </div>\n </form>\n )\n }\n {...props}\n />\n );\n};\n\ninterface FeedbackProviderProps {\n userId?: string;\n userName?: string;\n serviceName: string;\n datadogLogs?: {\n logger: Logger;\n };\n}\n\nexport const FeedbackProvider = ({\n children,\n ...modalProps\n}: PropsWithChildren<FeedbackProviderProps>) => {\n const [open] = useModal(FeedbackProviderModal, {\n enableClickOutside: true,\n disableClose: false,\n });\n return (\n <div>\n {children}\n <Portal>\n <Button\n style={{\n position: \"fixed\",\n bottom: 16,\n right: 16,\n }}\n onClick={() => {\n open(modalProps);\n }}\n type=\"button\"\n icon={<FeedbackIcon />}\n color=\"secondary\"\n variant=\"filled\"\n rounded\n />\n </Portal>\n </div>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AASA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAMA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAA4C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAG5C,MAAMG,SAAS,GAAGA,CAAA,KAAM;EACtB,OAAOC,UAAU,CAACC,kBAAkB,KAAK,YAAY,GACjD,4BAA4B,GAC5B,4BAA4B;AAClC,CAAC;AASD,MAAMC,mBAAmB,gBAAG,IAAAC,oBAAa,EAA2B,CAAC,CAAC,CAAC;AAEvE,MAAMC,YAAY,GAAIC,KAAoC,IAAK;EAC7D,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACL,mBAAmB,CAAC;EAC/C,oBACE,IAAAP,WAAA,CAAAa,GAAA;IACEC,KAAK,EAAEH,OAAO,CAACD,KAAK,CAACK,KAAK,CAAoC;IAC9DC,IAAI,EAAC,QAAQ;I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;QAAA,EAAa;MAAA,EACT;IAAA,EAGX;IAAA,GACG5E;EAAK,EACT;AAEN,CAAC;AAWM,MAAM6E,gBAAgB,GAAGA,CAAC;EAC/BnD,QAAQ;EACR,GAAGoD;AACqC,CAAC,KAAK;EAC9C,MAAM,CAACC,IAAI,CAAC,GAAG,IAAAC,mBAAQ,EAACxE,qBAAqB,EAAE;IAC7CyE,kBAAkB,EAAE,IAAI;IACxBC,YAAY,EAAE;EAChB,CAAC,CAAC;EACF,oBACE,IAAA5F,WAAA,CAAAsC,IAAA;IAAAF,QAAA,GACGA,QAAQ,eACT,IAAApC,WAAA,CAAAa,GAAA,EAACtB,UAAA,CAAAsG,MAAM;MAAAzD,QAAA,eACL,IAAApC,WAAA,CAAAa,GAAA,EAACtB,UAAA,CAAAqD,MAAM;QACLL,KAAK,EAAE;UACLuD,QAAQ,EAAE,OAAO;UACjBC,MAAM,EAAE,EAAE;UACVC,KAAK,EAAE;QACT,CAAE;QACFnD,OAAO,EAAEA,CAAA,KAAM;UACb4C,IAAI,CAACD,UAAU,CAAC;QAClB,CAAE;QACFxE,IAAI,EAAC,QAAQ;QACbiF,IAAI,eAAE,IAAAjG,WAAA,CAAAa,GAAA,EAACpB,SAAA,CAAAU,OAAY,KAAI;QACvBuC,KAAK,EAAC,WAAW;QACjBP,OAAO,EAAC,QAAQ;QAChB+D,OAAO;MAAA;IACP,EACK;EAAA,EACL;AAEV,CAAC;AAACC,OAAA,CAAAZ,gBAAA,GAAAA,gBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matsuri-forms.d.ts","sourceRoot":"","sources":["../src/endpoints/matsuri-forms.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzC,eAAO,MAAM,YAAY;;CAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matsuri-forms.js","names":["v1","matsuriForms"],"sources":["../src/endpoints/matsuri-forms.ts"],"sourcesContent":["/* eslint-disable */\nimport * as v1 from \"./matsuri-forms.v1\";\nexport const matsuriForms = { v1 };\n"],"mappings":"AAAA;AACA,OAAO,KAAKA,EAAE,MAAM,oBAAoB;AACxC,OAAO,IAAMC,YAAY,GAAG;EAAED;AAAG,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A function that returns the URL part common to the endpoints.
|
|
3
|
+
*/
|
|
4
|
+
export declare const root: () => string;
|
|
5
|
+
/**
|
|
6
|
+
* health check
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export declare const healthCheck: () => string;
|
|
10
|
+
/**
|
|
11
|
+
* DraftRevisionのフォーム情報を取得する
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare const formGet: ({ id }: {
|
|
15
|
+
id: string;
|
|
16
|
+
}) => string;
|
|
17
|
+
/**
|
|
18
|
+
* 特定のRevisionのフォーム情報を取得する
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare const formGetByRevision: ({ id, revision, }: {
|
|
22
|
+
id: string;
|
|
23
|
+
revision: string;
|
|
24
|
+
}) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Formを新規作成する
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare const formCreate: () => string;
|
|
30
|
+
/**
|
|
31
|
+
* ユーザーに紐づいたフォームを全件取得する
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare const formFindAll: () => string;
|
|
35
|
+
/**
|
|
36
|
+
* Formを更新する
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
export declare const formUpdate: ({ id }: {
|
|
40
|
+
id: string;
|
|
41
|
+
}) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Formのシート機能を有効化する
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
export declare const formActivateSheetFeature: ({ id }: {
|
|
47
|
+
id: string;
|
|
48
|
+
}) => string;
|
|
49
|
+
/**
|
|
50
|
+
* Formの公開ステータスをPrivateに変更する
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
export declare const formPublishStatusChangeToPrivate: ({ id }: {
|
|
54
|
+
id: string;
|
|
55
|
+
}) => string;
|
|
56
|
+
/**
|
|
57
|
+
* FormのContentを更新する
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
export declare const formsCreateNewRevision: ({ id }: {
|
|
61
|
+
id: string;
|
|
62
|
+
}) => string;
|
|
63
|
+
/**
|
|
64
|
+
* Form内容を確定し公開する
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export declare const formPublish: ({ id }: {
|
|
68
|
+
id: string;
|
|
69
|
+
}) => string;
|
|
70
|
+
/**
|
|
71
|
+
* 質問を作成する
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
export declare const formQuestionCreate: ({ formId }: {
|
|
75
|
+
formId: string;
|
|
76
|
+
}) => string;
|
|
77
|
+
/**
|
|
78
|
+
* 質問を挿入する
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
export declare const formQuestionInsert: ({ formId }: {
|
|
82
|
+
formId: string;
|
|
83
|
+
}) => string;
|
|
84
|
+
/**
|
|
85
|
+
* 質問を削除する
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
export declare const formQuestionDelete: ({ formId }: {
|
|
89
|
+
formId: string;
|
|
90
|
+
}) => string;
|
|
91
|
+
/**
|
|
92
|
+
* 質問を更新する
|
|
93
|
+
*
|
|
94
|
+
*/
|
|
95
|
+
export declare const formQuestionUpdate: ({ formId, questionId, }: {
|
|
96
|
+
formId: string;
|
|
97
|
+
questionId: string;
|
|
98
|
+
}) => string;
|
|
99
|
+
/**
|
|
100
|
+
* 回答を取得
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
export declare const submissionGet: ({ formId }: {
|
|
104
|
+
formId: string;
|
|
105
|
+
}) => string;
|
|
106
|
+
/**
|
|
107
|
+
* 回答を作成
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
export declare const submissionCreate: () => string;
|
|
111
|
+
/**
|
|
112
|
+
* ゲストがフォームの情報を取得する
|
|
113
|
+
*
|
|
114
|
+
*/
|
|
115
|
+
export declare const guestFormGet: ({ formId }: {
|
|
116
|
+
formId: string;
|
|
117
|
+
}) => string;
|
|
118
|
+
/**
|
|
119
|
+
* Googleのトークンでサインインする
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
export declare const signInWithGoogle: () => string;
|
|
123
|
+
/**
|
|
124
|
+
* Googleのトークンでサインアップする
|
|
125
|
+
*
|
|
126
|
+
*/
|
|
127
|
+
export declare const signUpWithGoogle: () => string;
|
|
128
|
+
export declare const matsuriForms_v1: {
|
|
129
|
+
healthCheck: () => string;
|
|
130
|
+
formGet: ({ id }: {
|
|
131
|
+
id: string;
|
|
132
|
+
}) => string;
|
|
133
|
+
formGetByRevision: ({ id, revision, }: {
|
|
134
|
+
id: string;
|
|
135
|
+
revision: string;
|
|
136
|
+
}) => string;
|
|
137
|
+
formCreate: () => string;
|
|
138
|
+
formFindAll: () => string;
|
|
139
|
+
formUpdate: ({ id }: {
|
|
140
|
+
id: string;
|
|
141
|
+
}) => string;
|
|
142
|
+
formActivateSheetFeature: ({ id }: {
|
|
143
|
+
id: string;
|
|
144
|
+
}) => string;
|
|
145
|
+
formPublishStatusChangeToPrivate: ({ id }: {
|
|
146
|
+
id: string;
|
|
147
|
+
}) => string;
|
|
148
|
+
formsCreateNewRevision: ({ id }: {
|
|
149
|
+
id: string;
|
|
150
|
+
}) => string;
|
|
151
|
+
formPublish: ({ id }: {
|
|
152
|
+
id: string;
|
|
153
|
+
}) => string;
|
|
154
|
+
formQuestionCreate: ({ formId }: {
|
|
155
|
+
formId: string;
|
|
156
|
+
}) => string;
|
|
157
|
+
formQuestionInsert: ({ formId }: {
|
|
158
|
+
formId: string;
|
|
159
|
+
}) => string;
|
|
160
|
+
formQuestionDelete: ({ formId }: {
|
|
161
|
+
formId: string;
|
|
162
|
+
}) => string;
|
|
163
|
+
formQuestionUpdate: ({ formId, questionId, }: {
|
|
164
|
+
formId: string;
|
|
165
|
+
questionId: string;
|
|
166
|
+
}) => string;
|
|
167
|
+
submissionGet: ({ formId }: {
|
|
168
|
+
formId: string;
|
|
169
|
+
}) => string;
|
|
170
|
+
submissionCreate: () => string;
|
|
171
|
+
guestFormGet: ({ formId }: {
|
|
172
|
+
formId: string;
|
|
173
|
+
}) => string;
|
|
174
|
+
signInWithGoogle: () => string;
|
|
175
|
+
signUpWithGoogle: () => string;
|
|
176
|
+
};
|
|
177
|
+
//# sourceMappingURL=matsuri-forms.v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matsuri-forms.v1.d.ts","sourceRoot":"","sources":["../src/endpoints/matsuri-forms.v1.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,IAAI,cAoBhB,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,WAAW,cAYvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO;QAAkB,MAAM;YAY3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB;QAIxB,MAAM;cACA,MAAM;YAajB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,cAYtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,cAYvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU;QAAkB,MAAM;YAY9C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB;QAAkB,MAAM;YAY5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gCAAgC;QAAkB,MAAM;YAYpE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB;QAAkB,MAAM;YAY1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW;QAAkB,MAAM;YAY/C,CAAC;AAEF;;;GAGG;A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