@revenexx/studio-integrations 3.0.2 → 3.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @revenexx/studio-integrations
2
2
 
3
+ ## 3.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 0ae03e4: A connection test the service refuses because a secret was left blank while the server or another setting changed no longer reads as a failed connection: the credential's detail view marks the secret's field with the reason and puts the cursor there, as it does for a refused save. The service no longer sends a stored secret to a server it was not entered for, so the secret has to be entered again.
8
+
9
+ A save that makes the service drop a credential's consent (other settings on an OAuth credential) now says that the credential has to be reconnected, and no longer runs a connection test that could only fail.
10
+
3
11
  ## 3.0.2
4
12
 
5
13
  ### Patch Changes
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@revenexx/studio-integrations",
3
3
  "configKey": "studioIntegrations",
4
- "version": "3.0.2",
4
+ "version": "3.0.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "unknown"
@@ -134,6 +134,12 @@ async function runTest() {
134
134
  const payload = buildConfigPayload();
135
135
  const edited = credentialEditDiffers(fieldsOf(props.type), payload, props.credential.public_config ?? {});
136
136
  const result = await test(props.credential.id, edited ? payload : void 0);
137
+ if (result.refusal) {
138
+ if (opening !== viewOpening) return;
139
+ saveRefusal.value = result.refusal;
140
+ void focusFirstRefusedField();
141
+ return;
142
+ }
137
143
  if (result.recorded !== false) {
138
144
  await load(true);
139
145
  emit("changed");
@@ -156,11 +162,13 @@ async function save() {
156
162
  const payload = buildConfigPayload();
157
163
  const edited = credentialEditDiffers(fieldsOf(props.type), payload, props.credential.public_config ?? {});
158
164
  try {
159
- await update(id, { name: form.name.trim(), config: payload });
165
+ const wasConnected = props.credential.status !== "needs_reauth";
166
+ const updated = await update(id, { name: form.name.trim(), config: payload });
167
+ const lostConsent = wasConnected && updated.status === "needs_reauth";
160
168
  emit("changed");
161
169
  emit("update:open", false);
162
- toast.success(t("integration.credentials.toast.updated"));
163
- if (edited) void testSaved(id);
170
+ toast.success(t(lostConsent ? "integration.credentials.toast.updatedReconnect" : "integration.credentials.toast.updated"));
171
+ if (edited && !lostConsent) void testSaved(id);
164
172
  } catch (e) {
165
173
  saveRefusal.value = e;
166
174
  void focusFirstRefusedField();
@@ -1,4 +1,5 @@
1
1
  import type { Credential } from '../types/integrations.js';
2
+ import { IntegrationsApiError } from '../utils/apiError.js';
2
3
  /**
3
4
  * Typed, per-tenant credential instances, backed by the Integrations service
4
5
  * (`/api/v1/credentials`). Secret field values are NEVER returned — the list
@@ -32,6 +33,12 @@ export interface CredentialTestResult {
32
33
  * test of an edit that tried values other than the stored ones (PO-535).
33
34
  */
34
35
  recorded?: boolean;
36
+ /**
37
+ * The refusal the service answered instead of testing, held as it arrived: values it
38
+ * would not try as given — a stored secret kept for a changed server (PO-765). A form
39
+ * marks the fields it names, as it does for a refused save.
40
+ */
41
+ refusal?: IntegrationsApiError;
35
42
  }
36
43
  export declare function useIntegrationsCredentials(): {
37
44
  credentials: any;
@@ -65,7 +65,8 @@ export function useIntegrationsCredentials() {
65
65
  );
66
66
  return res?.ok === false ? res : { ok: true, message: res?.message, recorded: res?.recorded };
67
67
  } catch (e) {
68
- return { ok: false, error: errorReason(e, t("integration.credentials.error.testFailed")) };
68
+ const refusal = e instanceof IntegrationsApiError && e.status === 422 ? e : void 0;
69
+ return { ok: false, error: errorReason(e, t("integration.credentials.error.testFailed")), refusal };
69
70
  }
70
71
  }
71
72
  async function oauthAuthorizeUrl(id) {
@@ -198,7 +198,7 @@
198
198
  "integration.credentials.list.action.reconnect.aria": "{name} erneut verbinden",
199
199
  "integration.credentials.list.dialog.action.back": "Zurück",
200
200
  "integration.credentials.list.dialog.description.create": "Wählen Sie einen Typ und geben Sie die Zugangsdaten ein.",
201
- "integration.credentials.list.dialog.description.edit": "Aktualisieren Sie die Zugangsdaten. Lassen Sie Secret-Felder leer, um den aktuellen Wert zu behalten.",
201
+ "integration.credentials.list.dialog.description.edit": "Aktualisieren Sie die Zugangsdaten. Lassen Sie Secret-Felder leer, um den aktuellen Wert zu behalten — das geht nicht, wenn sich der Server oder eine andere Angabe ändert.",
202
202
  "integration.credentials.list.dialog.field.name.placeholder": "z. B. Produktions-SMTP",
203
203
  "integration.credentials.list.empty": "Noch keine Zugangsdaten — mit „{action}“ das erste System verbinden.",
204
204
  "integration.credentials.list.head.title": "Zugangsdaten · Revenexx Cockpit",
@@ -294,6 +294,7 @@
294
294
  "integration.credentials.toast.created": "Zugangsdaten erstellt",
295
295
  "integration.credentials.toast.deleted": "Zugangsdaten gelöscht",
296
296
  "integration.credentials.toast.updated": "Zugangsdaten aktualisiert",
297
+ "integration.credentials.toast.updatedReconnect": "Zugangsdaten aktualisiert — verbinden Sie sie neu, um sie wieder zu nutzen",
297
298
  "integration.credentials.typePicker.empty": "Kein Zugangsdatentyp entspricht „{query}“.",
298
299
  "integration.credentials.typePicker.search.aria": "Nach einer App suchen",
299
300
  "integration.credentials.typePicker.search.placeholder": "Nach einer App suchen…",
@@ -198,7 +198,7 @@
198
198
  "integration.credentials.list.action.reconnect.aria": "Reconnect {name}",
199
199
  "integration.credentials.list.dialog.action.back": "Back",
200
200
  "integration.credentials.list.dialog.description.create": "Pick a type and fill in its access data.",
201
- "integration.credentials.list.dialog.description.edit": "Update the credential. Leave secret fields blank to keep the current value.",
201
+ "integration.credentials.list.dialog.description.edit": "Update the credential. Leave secret fields blank to keep the current value — not possible when the server or any other setting changes.",
202
202
  "integration.credentials.list.dialog.field.name.placeholder": "e.g. Production SMTP",
203
203
  "integration.credentials.list.empty": "No credentials yet — hit “{action}” to connect your first system.",
204
204
  "integration.credentials.list.head.title": "Credentials · Revenexx Cockpit",
@@ -294,6 +294,7 @@
294
294
  "integration.credentials.toast.created": "Credential created",
295
295
  "integration.credentials.toast.deleted": "Credential deleted",
296
296
  "integration.credentials.toast.updated": "Credential updated",
297
+ "integration.credentials.toast.updatedReconnect": "Credential updated — reconnect it to use it again",
297
298
  "integration.credentials.typePicker.empty": "No credential type matches “{query}”.",
298
299
  "integration.credentials.typePicker.search.aria": "Search for an app",
299
300
  "integration.credentials.typePicker.search.placeholder": "Search for an app…",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenexx/studio-integrations",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "type": "module",
5
5
  "description": "Integration Studio (core: workflows, node editor, runs, schedules, credentials, secrets, audit) as a standalone, publishable Nuxt module.",
6
6
  "repository": {