nucleus-core-ts 0.9.806 → 0.9.808
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/fe/components/IntegrationsPage/components/ConnectionAuthFields.js +10 -8
- package/dist/fe/components/IntegrationsPage/components/ConnectionForm.js +1 -1
- package/dist/fe/components/IntegrationsPage/components/ConnectionOauthFields.js +15 -13
- package/dist/fe/components/IntegrationsPage/components/ConnectionTest.js +7 -5
- package/dist/fe/components/IntegrationsPage/components/CredentialFields.js +8 -6
- package/dist/fe/components/IntegrationsPage/components/CredentialSlotRow.js +3 -1
- package/dist/fe/components/IntegrationsPage/components/EndpointForm.js +6 -4
- package/dist/fe/components/IntegrationsPage/components/EndpointList.js +3 -3
- package/dist/fe/components/IntegrationsPage/components/FieldMappingRow.js +1 -1
- package/dist/fe/components/IntegrationsPage/components/RunsTab.js +1 -1
- package/dist/fe/components/IntegrationsPage/text/index.d.ts +44 -0
- package/dist/fe/components/IntegrationsPage/text/index.js +44 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useLabels } from '../text/context';
|
|
3
4
|
import { integrationsPageTheme } from '../theme';
|
|
4
5
|
import { AUTH_TYPE_OPTIONS, authTypeHint, toAuthType } from './authOptions';
|
|
5
6
|
import { ConnectionOauthFields } from './ConnectionOauthFields';
|
|
@@ -16,15 +17,16 @@ import { Field } from './Primitives';
|
|
|
16
17
|
* because they are written and never read back.
|
|
17
18
|
*/ const theme = integrationsPageTheme;
|
|
18
19
|
export function ConnectionAuthFields(props) {
|
|
20
|
+
const labels = useLabels();
|
|
19
21
|
const { draft, disabled, onChange } = props;
|
|
20
22
|
return /*#__PURE__*/ _jsxs("section", {
|
|
21
|
-
"aria-label":
|
|
23
|
+
"aria-label": labels.auth.sectionLabel,
|
|
22
24
|
className: "flex flex-col gap-3",
|
|
23
25
|
children: [
|
|
24
26
|
/*#__PURE__*/ _jsx(Field, {
|
|
25
27
|
hint: authTypeHint(draft.authType),
|
|
26
28
|
htmlFor: "connection-auth-type",
|
|
27
|
-
label:
|
|
29
|
+
label: labels.auth.type,
|
|
28
30
|
children: /*#__PURE__*/ _jsx("select", {
|
|
29
31
|
"aria-describedby": describedBy('connection-auth-type', true, false),
|
|
30
32
|
className: theme.field.input,
|
|
@@ -44,9 +46,9 @@ export function ConnectionAuthFields(props) {
|
|
|
44
46
|
})
|
|
45
47
|
}),
|
|
46
48
|
usesHeaderName(draft.authType) ? /*#__PURE__*/ _jsx(Field, {
|
|
47
|
-
hint:
|
|
49
|
+
hint: labels.auth.headerNameHint,
|
|
48
50
|
htmlFor: "connection-auth-header",
|
|
49
|
-
label:
|
|
51
|
+
label: labels.auth.headerName,
|
|
50
52
|
children: /*#__PURE__*/ _jsx("input", {
|
|
51
53
|
"aria-describedby": describedBy('connection-auth-header', true, false),
|
|
52
54
|
className: theme.field.input,
|
|
@@ -55,15 +57,15 @@ export function ConnectionAuthFields(props) {
|
|
|
55
57
|
onChange: (event)=>onChange({
|
|
56
58
|
authHeaderName: event.target.value
|
|
57
59
|
}),
|
|
58
|
-
placeholder:
|
|
60
|
+
placeholder: labels.auth.headerNamePlaceholder,
|
|
59
61
|
type: "text",
|
|
60
62
|
value: draft.authHeaderName
|
|
61
63
|
})
|
|
62
64
|
}) : null,
|
|
63
65
|
usesQueryParam(draft.authType) ? /*#__PURE__*/ _jsx(Field, {
|
|
64
|
-
hint:
|
|
66
|
+
hint: labels.auth.queryParamHint,
|
|
65
67
|
htmlFor: "connection-auth-query",
|
|
66
|
-
label:
|
|
68
|
+
label: labels.auth.queryParam,
|
|
67
69
|
children: /*#__PURE__*/ _jsx("input", {
|
|
68
70
|
"aria-describedby": describedBy('connection-auth-query', true, false),
|
|
69
71
|
className: theme.field.input,
|
|
@@ -72,7 +74,7 @@ export function ConnectionAuthFields(props) {
|
|
|
72
74
|
onChange: (event)=>onChange({
|
|
73
75
|
authQueryParam: event.target.value
|
|
74
76
|
}),
|
|
75
|
-
placeholder:
|
|
77
|
+
placeholder: labels.auth.queryParamPlaceholder,
|
|
76
78
|
type: "text",
|
|
77
79
|
value: draft.authQueryParam
|
|
78
80
|
})
|
|
@@ -106,7 +106,7 @@ export function ConnectionForm({ actions, source, loading = false, onSaved }) {
|
|
|
106
106
|
className: theme.button.primary,
|
|
107
107
|
disabled: saving,
|
|
108
108
|
type: "submit",
|
|
109
|
-
children: saving ?
|
|
109
|
+
children: saving ? labels.common.saving : source ? labels.connections.saveChanges : labels.connections.createSubmit
|
|
110
110
|
})
|
|
111
111
|
})
|
|
112
112
|
]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useLabels } from '../text/context';
|
|
3
4
|
import { integrationsPageTheme } from '../theme';
|
|
4
5
|
import { CLIENT_AUTH_OPTIONS, GRANT_TYPE_OPTIONS, toClientAuth, toGrantType } from './authOptions';
|
|
5
6
|
import { usesOauth } from './connectionDraft';
|
|
@@ -13,14 +14,15 @@ import { Field } from './Primitives';
|
|
|
13
14
|
* place instead of at every field.
|
|
14
15
|
*/ const theme = integrationsPageTheme;
|
|
15
16
|
export function ConnectionOauthFields({ draft, errors, disabled, onChange }) {
|
|
17
|
+
const labels = useLabels();
|
|
16
18
|
if (!usesOauth(draft.authType)) return null;
|
|
17
19
|
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
18
20
|
children: [
|
|
19
21
|
/*#__PURE__*/ _jsx(Field, {
|
|
20
22
|
error: errors.tokenUrl,
|
|
21
|
-
hint:
|
|
23
|
+
hint: labels.auth.tokenUrlHint,
|
|
22
24
|
htmlFor: "connection-token-url",
|
|
23
|
-
label:
|
|
25
|
+
label: labels.auth.tokenUrl,
|
|
24
26
|
children: /*#__PURE__*/ _jsx("input", {
|
|
25
27
|
"aria-describedby": describedBy('connection-token-url', true, Boolean(errors.tokenUrl)),
|
|
26
28
|
className: theme.field.input,
|
|
@@ -29,15 +31,15 @@ export function ConnectionOauthFields({ draft, errors, disabled, onChange }) {
|
|
|
29
31
|
onChange: (event)=>onChange({
|
|
30
32
|
tokenUrl: event.target.value
|
|
31
33
|
}),
|
|
32
|
-
placeholder:
|
|
34
|
+
placeholder: labels.auth.tokenUrlPlaceholder,
|
|
33
35
|
type: "text",
|
|
34
36
|
value: draft.tokenUrl
|
|
35
37
|
})
|
|
36
38
|
}),
|
|
37
39
|
/*#__PURE__*/ _jsx(Field, {
|
|
38
|
-
hint:
|
|
40
|
+
hint: labels.auth.grantTypeHint,
|
|
39
41
|
htmlFor: "connection-grant-type",
|
|
40
|
-
label:
|
|
42
|
+
label: labels.auth.grantType,
|
|
41
43
|
children: /*#__PURE__*/ _jsx("select", {
|
|
42
44
|
"aria-describedby": describedBy('connection-grant-type', true, false),
|
|
43
45
|
className: theme.field.input,
|
|
@@ -58,7 +60,7 @@ export function ConnectionOauthFields({ draft, errors, disabled, onChange }) {
|
|
|
58
60
|
}),
|
|
59
61
|
/*#__PURE__*/ _jsx(Field, {
|
|
60
62
|
htmlFor: "connection-client-id",
|
|
61
|
-
label:
|
|
63
|
+
label: labels.auth.clientId,
|
|
62
64
|
children: /*#__PURE__*/ _jsx("input", {
|
|
63
65
|
className: theme.field.input,
|
|
64
66
|
disabled: disabled,
|
|
@@ -66,14 +68,14 @@ export function ConnectionOauthFields({ draft, errors, disabled, onChange }) {
|
|
|
66
68
|
onChange: (event)=>onChange({
|
|
67
69
|
oauthClientId: event.target.value
|
|
68
70
|
}),
|
|
69
|
-
placeholder:
|
|
71
|
+
placeholder: labels.auth.clientIdPlaceholder,
|
|
70
72
|
type: "text",
|
|
71
73
|
value: draft.oauthClientId
|
|
72
74
|
})
|
|
73
75
|
}),
|
|
74
76
|
draft.oauthGrantType === 'password' ? /*#__PURE__*/ _jsx(Field, {
|
|
75
77
|
htmlFor: "connection-oauth-username",
|
|
76
|
-
label:
|
|
78
|
+
label: labels.auth.username,
|
|
77
79
|
children: /*#__PURE__*/ _jsx("input", {
|
|
78
80
|
autoComplete: "off",
|
|
79
81
|
className: theme.field.input,
|
|
@@ -82,15 +84,15 @@ export function ConnectionOauthFields({ draft, errors, disabled, onChange }) {
|
|
|
82
84
|
onChange: (event)=>onChange({
|
|
83
85
|
oauthUsername: event.target.value
|
|
84
86
|
}),
|
|
85
|
-
placeholder:
|
|
87
|
+
placeholder: labels.auth.usernamePlaceholder,
|
|
86
88
|
type: "text",
|
|
87
89
|
value: draft.oauthUsername
|
|
88
90
|
})
|
|
89
91
|
}) : null,
|
|
90
92
|
/*#__PURE__*/ _jsx(Field, {
|
|
91
|
-
hint:
|
|
93
|
+
hint: labels.auth.scopeHint,
|
|
92
94
|
htmlFor: "connection-scope",
|
|
93
|
-
label:
|
|
95
|
+
label: labels.auth.scope,
|
|
94
96
|
children: /*#__PURE__*/ _jsx("input", {
|
|
95
97
|
"aria-describedby": describedBy('connection-scope', true, false),
|
|
96
98
|
className: theme.field.input,
|
|
@@ -99,7 +101,7 @@ export function ConnectionOauthFields({ draft, errors, disabled, onChange }) {
|
|
|
99
101
|
onChange: (event)=>onChange({
|
|
100
102
|
oauthScope: event.target.value
|
|
101
103
|
}),
|
|
102
|
-
placeholder:
|
|
104
|
+
placeholder: labels.auth.scopePlaceholder,
|
|
103
105
|
type: "text",
|
|
104
106
|
value: draft.oauthScope
|
|
105
107
|
})
|
|
@@ -107,7 +109,7 @@ export function ConnectionOauthFields({ draft, errors, disabled, onChange }) {
|
|
|
107
109
|
/*#__PURE__*/ _jsx(Field, {
|
|
108
110
|
hint: "Where the client ID and secret go on the token request. A server accepts one or the other; if the token call comes back with an invalid-client error, try the other.",
|
|
109
111
|
htmlFor: "connection-client-auth",
|
|
110
|
-
label:
|
|
112
|
+
label: labels.auth.clientAuth,
|
|
111
113
|
children: /*#__PURE__*/ _jsx("select", {
|
|
112
114
|
"aria-describedby": describedBy('connection-client-auth', true, false),
|
|
113
115
|
className: theme.field.input,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useEffectEvent, useState } from 'react';
|
|
4
4
|
import { cn } from '../../../utils/cn';
|
|
5
|
+
import { useLabels } from '../text/context';
|
|
5
6
|
import { integrationsPageTheme } from '../theme';
|
|
6
7
|
import { errorText } from './formSupport';
|
|
7
8
|
import { Badge, Notice } from './Primitives';
|
|
@@ -15,6 +16,7 @@ import { CardSkeleton } from './Skeletons';
|
|
|
15
16
|
* sends the operator back to guessing.
|
|
16
17
|
*/ const theme = integrationsPageTheme;
|
|
17
18
|
export function ConnectionTest({ actions, source, loading = false }) {
|
|
19
|
+
const labels = useLabels();
|
|
18
20
|
const [testing, setTesting] = useState(false);
|
|
19
21
|
const [result, setResult] = useState(null);
|
|
20
22
|
// A result describes the connection it was run against. Leaving it up under
|
|
@@ -45,7 +47,7 @@ export function ConnectionTest({ actions, source, loading = false }) {
|
|
|
45
47
|
};
|
|
46
48
|
if (loading) return /*#__PURE__*/ _jsx(CardSkeleton, {});
|
|
47
49
|
return /*#__PURE__*/ _jsxs("section", {
|
|
48
|
-
"aria-label":
|
|
50
|
+
"aria-label": labels.auth.testHeading,
|
|
49
51
|
className: theme.card.wrapper,
|
|
50
52
|
children: [
|
|
51
53
|
/*#__PURE__*/ _jsxs("div", {
|
|
@@ -53,7 +55,7 @@ export function ConnectionTest({ actions, source, loading = false }) {
|
|
|
53
55
|
children: [
|
|
54
56
|
/*#__PURE__*/ _jsx("h2", {
|
|
55
57
|
className: theme.card.title,
|
|
56
|
-
children:
|
|
58
|
+
children: labels.auth.testHeading
|
|
57
59
|
}),
|
|
58
60
|
result ? /*#__PURE__*/ _jsx(Badge, {
|
|
59
61
|
tone: result.ok ? 'success' : 'danger',
|
|
@@ -76,13 +78,13 @@ export function ConnectionTest({ actions, source, loading = false }) {
|
|
|
76
78
|
children: "Save the connection first — there is nothing to call yet."
|
|
77
79
|
}),
|
|
78
80
|
result?.ok ? /*#__PURE__*/ _jsxs(Notice, {
|
|
79
|
-
title:
|
|
81
|
+
title: labels.auth.testOkTitle,
|
|
80
82
|
tone: "info",
|
|
81
83
|
children: [
|
|
82
84
|
/*#__PURE__*/ _jsx("p", {
|
|
83
85
|
children: /*#__PURE__*/ _jsx(Badge, {
|
|
84
86
|
tone: "success",
|
|
85
|
-
children:
|
|
87
|
+
children: labels.auth.testOkBadge
|
|
86
88
|
})
|
|
87
89
|
}),
|
|
88
90
|
result.detail ? /*#__PURE__*/ _jsx("p", {
|
|
@@ -92,7 +94,7 @@ export function ConnectionTest({ actions, source, loading = false }) {
|
|
|
92
94
|
]
|
|
93
95
|
}) : null,
|
|
94
96
|
result && !result.ok ? /*#__PURE__*/ _jsx(Notice, {
|
|
95
|
-
title:
|
|
97
|
+
title: labels.auth.testFailedTitle,
|
|
96
98
|
tone: "danger",
|
|
97
99
|
children: /*#__PURE__*/ _jsx("p", {
|
|
98
100
|
className: cn(theme.notice.body, 'whitespace-pre-wrap break-words font-mono'),
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useEffectEvent, useState } from 'react';
|
|
4
4
|
import { useIntegrationsStore } from '../store';
|
|
5
|
+
import { useLabels } from '../text/context';
|
|
5
6
|
import { integrationsPageTheme } from '../theme';
|
|
6
7
|
import { CredentialSlotRow } from './CredentialSlotRow';
|
|
7
8
|
import { hintFromResult, patchFor, slotsForSource, storedHint } from './credentialSlots';
|
|
@@ -18,6 +19,7 @@ import { CardSkeleton } from './Skeletons';
|
|
|
18
19
|
* button per field.
|
|
19
20
|
*/ const theme = integrationsPageTheme;
|
|
20
21
|
export function CredentialFields({ actions, source, loading = false }) {
|
|
22
|
+
const labels = useLabels();
|
|
21
23
|
const store = useIntegrationsStore();
|
|
22
24
|
const [values, setValues] = useState({});
|
|
23
25
|
const [hints, setHints] = useState({});
|
|
@@ -39,10 +41,10 @@ export function CredentialFields({ actions, source, loading = false }) {
|
|
|
39
41
|
if (loading) return /*#__PURE__*/ _jsx(CardSkeleton, {});
|
|
40
42
|
if (!source) {
|
|
41
43
|
return /*#__PURE__*/ _jsx(Notice, {
|
|
42
|
-
title:
|
|
44
|
+
title: labels.auth.saveFirstTitle,
|
|
43
45
|
tone: "info",
|
|
44
46
|
children: /*#__PURE__*/ _jsx("p", {
|
|
45
|
-
children:
|
|
47
|
+
children: labels.auth.saveFirstBody
|
|
46
48
|
})
|
|
47
49
|
});
|
|
48
50
|
}
|
|
@@ -114,21 +116,21 @@ export function CredentialFields({ actions, source, loading = false }) {
|
|
|
114
116
|
});
|
|
115
117
|
};
|
|
116
118
|
return /*#__PURE__*/ _jsxs("section", {
|
|
117
|
-
"aria-label":
|
|
119
|
+
"aria-label": labels.auth.credentialsHeading,
|
|
118
120
|
className: theme.card.wrapper,
|
|
119
121
|
children: [
|
|
120
122
|
/*#__PURE__*/ _jsx("div", {
|
|
121
123
|
className: theme.card.header,
|
|
122
124
|
children: /*#__PURE__*/ _jsx("h2", {
|
|
123
125
|
className: theme.card.title,
|
|
124
|
-
children:
|
|
126
|
+
children: labels.auth.credentialsHeading
|
|
125
127
|
})
|
|
126
128
|
}),
|
|
127
129
|
/*#__PURE__*/ _jsxs("div", {
|
|
128
130
|
className: theme.card.body,
|
|
129
131
|
children: [
|
|
130
132
|
/*#__PURE__*/ _jsx(Notice, {
|
|
131
|
-
title:
|
|
133
|
+
title: labels.auth.writeOnlyTitle,
|
|
132
134
|
tone: "info",
|
|
133
135
|
children: /*#__PURE__*/ _jsx("p", {
|
|
134
136
|
children: "A value typed here is stored and from then on only ever sent to the service. It is not returned to this screen, or to any other, no matter who asks — all that comes back is a masked hint. Leave a box empty to keep whatever is already stored."
|
|
@@ -163,7 +165,7 @@ export function CredentialFields({ actions, source, loading = false }) {
|
|
|
163
165
|
disabled: busy,
|
|
164
166
|
onClick: handleSave,
|
|
165
167
|
type: "button",
|
|
166
|
-
children: busy ?
|
|
168
|
+
children: busy ? labels.common.saving : labels.auth.saveCredentials
|
|
167
169
|
})
|
|
168
170
|
}) : null
|
|
169
171
|
]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from '../../../utils/cn';
|
|
4
|
+
import { useLabels } from '../text/context';
|
|
4
5
|
import { integrationsPageTheme } from '../theme';
|
|
5
6
|
import { slotHint, slotLabel } from './credentialSlots';
|
|
6
7
|
import { describedBy } from './formSupport';
|
|
@@ -15,6 +16,7 @@ import { Badge, Field } from './Primitives';
|
|
|
15
16
|
* accident, roughly once.
|
|
16
17
|
*/ const theme = integrationsPageTheme;
|
|
17
18
|
export function CredentialSlotRow({ slot, source, value, maskedHint, disabled, onChange, onClear }) {
|
|
19
|
+
const labels = useLabels();
|
|
18
20
|
const id = `credential-${slot}`;
|
|
19
21
|
const label = slotLabel(slot, source);
|
|
20
22
|
const stored = maskedHint !== null && maskedHint.length > 0;
|
|
@@ -42,7 +44,7 @@ export function CredentialSlotRow({ slot, source, value, maskedHint, disabled, o
|
|
|
42
44
|
children: [
|
|
43
45
|
/*#__PURE__*/ _jsx(Badge, {
|
|
44
46
|
tone: stored ? 'success' : 'neutral',
|
|
45
|
-
children: stored ?
|
|
47
|
+
children: stored ? labels.auth.stored : labels.auth.notSet
|
|
46
48
|
}),
|
|
47
49
|
stored ? /*#__PURE__*/ _jsx("span", {
|
|
48
50
|
className: cn(theme.field.hint, 'truncate font-mono'),
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useEffectEvent, useState } from 'react';
|
|
4
4
|
import { useIntegrationsStore } from '../store';
|
|
5
|
+
import { useLabels } from '../text/context';
|
|
5
6
|
import { integrationsPageTheme } from '../theme';
|
|
6
7
|
import { EndpointFormFields } from './EndpointFormFields';
|
|
7
8
|
import { formatJsonObject, parseJsonObject } from './jsonObjectField';
|
|
@@ -17,6 +18,7 @@ import { pathParamNames } from './pathParams';
|
|
|
17
18
|
* a list page arriving in the background.
|
|
18
19
|
*/ const theme = integrationsPageTheme;
|
|
19
20
|
export function EndpointForm({ sourceId, endpoint, actions, onSaved, onDeleted, onCancel }) {
|
|
21
|
+
const labels = useLabels();
|
|
20
22
|
const store = useIntegrationsStore();
|
|
21
23
|
const [saving, setSaving] = useState(false);
|
|
22
24
|
const [deleting, setDeleting] = useState(false);
|
|
@@ -123,7 +125,7 @@ export function EndpointForm({ sourceId, endpoint, actions, onSaved, onDeleted,
|
|
|
123
125
|
className: theme.card.header,
|
|
124
126
|
children: /*#__PURE__*/ _jsx("h3", {
|
|
125
127
|
className: theme.card.title,
|
|
126
|
-
children: endpoint ?
|
|
128
|
+
children: endpoint ? labels.endpoints.editTitle : labels.endpoints.newTitle
|
|
127
129
|
})
|
|
128
130
|
}),
|
|
129
131
|
/*#__PURE__*/ _jsxs("div", {
|
|
@@ -163,20 +165,20 @@ export function EndpointForm({ sourceId, endpoint, actions, onSaved, onDeleted,
|
|
|
163
165
|
disabled: busy,
|
|
164
166
|
onClick: remove,
|
|
165
167
|
type: "button",
|
|
166
|
-
children: deleting ?
|
|
168
|
+
children: deleting ? labels.common.deleting : labels.common.delete
|
|
167
169
|
}) : null,
|
|
168
170
|
/*#__PURE__*/ _jsx("button", {
|
|
169
171
|
className: theme.button.secondary,
|
|
170
172
|
disabled: busy,
|
|
171
173
|
onClick: onCancel,
|
|
172
174
|
type: "button",
|
|
173
|
-
children:
|
|
175
|
+
children: labels.common.cancel
|
|
174
176
|
}),
|
|
175
177
|
/*#__PURE__*/ _jsx("button", {
|
|
176
178
|
className: theme.button.primary,
|
|
177
179
|
disabled: busy || !canSave,
|
|
178
180
|
type: "submit",
|
|
179
|
-
children: saving ?
|
|
181
|
+
children: saving ? labels.common.saving : labels.endpoints.save
|
|
180
182
|
})
|
|
181
183
|
]
|
|
182
184
|
})
|
|
@@ -107,7 +107,7 @@ export function EndpointList({ sourceId, actions, onNewEndpoint, onSelect, reloa
|
|
|
107
107
|
}),
|
|
108
108
|
/*#__PURE__*/ _jsx("p", {
|
|
109
109
|
className: theme.header.subtitle,
|
|
110
|
-
children: list.total === 1 ?
|
|
110
|
+
children: list.total === 1 ? labels.endpoints.countOne : labels.endpoints.countMany(list.total)
|
|
111
111
|
})
|
|
112
112
|
]
|
|
113
113
|
}),
|
|
@@ -117,7 +117,7 @@ export function EndpointList({ sourceId, actions, onNewEndpoint, onSelect, reloa
|
|
|
117
117
|
className: theme.button.primary,
|
|
118
118
|
onClick: handleNew,
|
|
119
119
|
type: "button",
|
|
120
|
-
children:
|
|
120
|
+
children: labels.endpoints.create
|
|
121
121
|
})
|
|
122
122
|
})
|
|
123
123
|
]
|
|
@@ -153,7 +153,7 @@ export function EndpointList({ sourceId, actions, onNewEndpoint, onSelect, reloa
|
|
|
153
153
|
}) : null,
|
|
154
154
|
!firstLoad && list.items.length === 0 && !list.error ? /*#__PURE__*/ _jsx("p", {
|
|
155
155
|
className: theme.list.empty,
|
|
156
|
-
children: search.length > 0 ?
|
|
156
|
+
children: search.length > 0 ? labels.endpoints.emptySearch(search) : labels.endpoints.empty
|
|
157
157
|
}) : null,
|
|
158
158
|
list.items.length > 0 ? /*#__PURE__*/ _jsx("ul", {
|
|
159
159
|
className: theme.list.wrapper,
|
|
@@ -63,7 +63,7 @@ export function FieldMappingRow({ row, index, sourceListId, targetFields, isFirs
|
|
|
63
63
|
children: [
|
|
64
64
|
/*#__PURE__*/ _jsx("option", {
|
|
65
65
|
value: "",
|
|
66
|
-
children:
|
|
66
|
+
children: labels.mappings.notSet
|
|
67
67
|
}),
|
|
68
68
|
targetFields.map((field)=>/*#__PURE__*/ _jsx("option", {
|
|
69
69
|
value: field,
|
|
@@ -28,7 +28,7 @@ export function RunsTab({ actions, onSubscribeProgress }) {
|
|
|
28
28
|
}) : /*#__PURE__*/ _jsx(Notice, {
|
|
29
29
|
tone: "info",
|
|
30
30
|
title: labels.runs.chooseMappingTitle,
|
|
31
|
-
children:
|
|
31
|
+
children: labels.runs.chooseMappingBody
|
|
32
32
|
}),
|
|
33
33
|
/*#__PURE__*/ _jsx(RunHistory, {
|
|
34
34
|
actions: actions,
|
|
@@ -62,6 +62,8 @@ export type IntegrationsLabels = {
|
|
|
62
62
|
newTitle: string;
|
|
63
63
|
enabledBadge: string;
|
|
64
64
|
disabledBadge: string;
|
|
65
|
+
saveChanges: string;
|
|
66
|
+
createSubmit: string;
|
|
65
67
|
};
|
|
66
68
|
runs: {
|
|
67
69
|
/** The one-line summary above the buttons. */
|
|
@@ -225,6 +227,48 @@ export type IntegrationsLabels = {
|
|
|
225
227
|
fallbackPlaceholder: string;
|
|
226
228
|
save: string;
|
|
227
229
|
};
|
|
230
|
+
/** Authentication, its credentials, and whether the service answers. */
|
|
231
|
+
auth: {
|
|
232
|
+
sectionLabel: string;
|
|
233
|
+
type: string;
|
|
234
|
+
headerName: string;
|
|
235
|
+
headerNameHint: string;
|
|
236
|
+
headerNamePlaceholder: string;
|
|
237
|
+
queryParam: string;
|
|
238
|
+
queryParamHint: string;
|
|
239
|
+
queryParamPlaceholder: string;
|
|
240
|
+
tokenUrl: string;
|
|
241
|
+
tokenUrlHint: string;
|
|
242
|
+
tokenUrlPlaceholder: string;
|
|
243
|
+
grantType: string;
|
|
244
|
+
grantTypeHint: string;
|
|
245
|
+
clientId: string;
|
|
246
|
+
clientIdPlaceholder: string;
|
|
247
|
+
username: string;
|
|
248
|
+
usernamePlaceholder: string;
|
|
249
|
+
scope: string;
|
|
250
|
+
scopeHint: string;
|
|
251
|
+
scopePlaceholder: string;
|
|
252
|
+
clientAuth: string;
|
|
253
|
+
clientAuthHint: string;
|
|
254
|
+
credentialsHeading: string;
|
|
255
|
+
saveFirstTitle: string;
|
|
256
|
+
saveFirstBody: string;
|
|
257
|
+
writeOnlyTitle: string;
|
|
258
|
+
writeOnlyBody: string;
|
|
259
|
+
saveCredentials: string;
|
|
260
|
+
notSet: string;
|
|
261
|
+
stored: string;
|
|
262
|
+
clear: string;
|
|
263
|
+
testHeading: string;
|
|
264
|
+
testRun: string;
|
|
265
|
+
testOkTitle: string;
|
|
266
|
+
testOkBadge: string;
|
|
267
|
+
testFailedTitle: string;
|
|
268
|
+
testNotReachable: string;
|
|
269
|
+
testSaveFirst: string;
|
|
270
|
+
testCalls: (url: string) => string;
|
|
271
|
+
};
|
|
228
272
|
/** The long form of each write mode, for the picker. */
|
|
229
273
|
writeModeFull: {
|
|
230
274
|
upsert: string;
|
|
@@ -55,7 +55,9 @@
|
|
|
55
55
|
editTitle: 'Connection',
|
|
56
56
|
newTitle: 'New connection',
|
|
57
57
|
enabledBadge: 'Enabled',
|
|
58
|
-
disabledBadge: 'Off'
|
|
58
|
+
disabledBadge: 'Off',
|
|
59
|
+
saveChanges: 'Save changes',
|
|
60
|
+
createSubmit: 'Create connection'
|
|
59
61
|
},
|
|
60
62
|
runs: {
|
|
61
63
|
summary: (target, writeMode, missing)=>`Writes into ${target} · ${writeMode} · missing rows: ${missing}`,
|
|
@@ -215,6 +217,47 @@
|
|
|
215
217
|
fallbackPlaceholder: 'Used when the source is empty',
|
|
216
218
|
save: 'Save mapping'
|
|
217
219
|
},
|
|
220
|
+
auth: {
|
|
221
|
+
sectionLabel: 'Authentication',
|
|
222
|
+
type: 'How we prove who we are',
|
|
223
|
+
headerName: 'Header name',
|
|
224
|
+
headerNameHint: 'Empty means Authorization. Set it when the service reads the credential from a header of its own.',
|
|
225
|
+
headerNamePlaceholder: 'X-Api-Key',
|
|
226
|
+
queryParam: 'Query parameter',
|
|
227
|
+
queryParamHint: 'Use this instead of a header when the key belongs in the query string. Fill in one or the other, not both.',
|
|
228
|
+
queryParamPlaceholder: 'api_key',
|
|
229
|
+
tokenUrl: 'Token address',
|
|
230
|
+
tokenUrlHint: 'The full URL the token is fetched from. Same rule as the base URL: any scheme, http included.',
|
|
231
|
+
tokenUrlPlaceholder: 'https://api.example.com/oauth/token',
|
|
232
|
+
grantType: 'Grant type',
|
|
233
|
+
grantTypeHint: "Client credentials calls as the application. Password calls as a named user and needs that user's name and password.",
|
|
234
|
+
clientId: 'Client ID',
|
|
235
|
+
clientIdPlaceholder: 'integration-client',
|
|
236
|
+
username: 'User name',
|
|
237
|
+
usernamePlaceholder: 'service-account',
|
|
238
|
+
scope: 'Scope',
|
|
239
|
+
scopeHint: 'Space-separated. Leave it empty to take whatever the token endpoint grants by default.',
|
|
240
|
+
scopePlaceholder: 'read:records',
|
|
241
|
+
clientAuth: 'Client authentication',
|
|
242
|
+
clientAuthHint: 'Where the client ID and secret go on the token request. A server accepts one or the other; if the token call comes back with an invalid-client error, try the other.',
|
|
243
|
+
credentialsHeading: 'Credentials',
|
|
244
|
+
saveFirstTitle: 'Save the connection first',
|
|
245
|
+
saveFirstBody: 'Secrets are stored against a saved connection, so there is somewhere to put them.',
|
|
246
|
+
writeOnlyTitle: 'Written once, never read back',
|
|
247
|
+
writeOnlyBody: 'A value typed here is stored and from then on only ever sent to the service. It is not returned to this screen, or to any other, no matter who asks — all that comes back is a masked hint. Leave a box empty to keep whatever is already stored.',
|
|
248
|
+
saveCredentials: 'Save credentials',
|
|
249
|
+
notSet: 'Not set',
|
|
250
|
+
stored: 'Stored',
|
|
251
|
+
clear: 'Clear',
|
|
252
|
+
testHeading: 'Does it answer?',
|
|
253
|
+
testRun: 'Test the connection',
|
|
254
|
+
testOkTitle: 'Connection succeeded',
|
|
255
|
+
testOkBadge: 'Reachable',
|
|
256
|
+
testFailedTitle: 'Connection failed',
|
|
257
|
+
testNotReachable: 'Not reachable',
|
|
258
|
+
testSaveFirst: 'Save the connection first — there is nothing to call yet.',
|
|
259
|
+
testCalls: (url)=>`Calls ${url} with the settings and credentials as they are stored right now.`
|
|
260
|
+
},
|
|
218
261
|
writeModeFull: {
|
|
219
262
|
upsert: 'Upsert — update what matches, insert the rest',
|
|
220
263
|
append: 'Append — insert every fetched record',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nucleus-core-ts",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.808",
|
|
4
4
|
"description": "Production-ready, enterprise-grade TypeScript framework for building multi-tenant APIs",
|
|
5
5
|
"author": "Hidayet Can Özcan <hidayetcan@gmail.com>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|