@jini-ai/integrations 0.7.3-next.2 → 0.7.4
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 +7 -0
- package/README.md +1 -0
- package/dist/api-connections/bundled-client-namespace.d.ts +24 -0
- package/dist/api-connections/bundled-client-namespace.js +22 -0
- package/dist/api-connections/connect.d.ts +2 -10
- package/dist/api-connections/connect.js +1 -1
- package/dist/api-connections/contribution.d.ts +71 -0
- package/dist/api-connections/contribution.js +69 -0
- package/dist/api-connections/form-delivery-connection.d.ts +68 -0
- package/dist/api-connections/form-delivery-connection.js +73 -0
- package/dist/api-connections/hosted-mcp/contracts.d.ts +4 -171
- package/dist/api-connections/hosted-mcp/index.d.ts +2 -0
- package/dist/api-connections/hosted-mcp/oauth-row-writes.d.ts +3 -1
- package/dist/api-connections/hosted-mcp/oauth-row-writes.js +6 -3
- package/dist/api-connections/hosted-mcp/shared-sign-in.d.ts +2 -1
- package/dist/api-connections/hosted-mcp/sign-in-configuration.js +1 -1
- package/dist/api-connections/hosted-mcp/sign-in-discovery.js +1 -1
- package/dist/api-connections/hosted-mcp/sign-in-flow.d.ts +9 -3
- package/dist/api-connections/hosted-mcp/sign-in-flow.js +6 -6
- package/dist/api-connections/hosted-mcp/sign-in-provider.d.ts +16 -4
- package/dist/api-connections/hosted-mcp/sign-in-provider.js +3 -3
- package/dist/api-connections/hosted-mcp/sign-in-status.d.ts +13 -2
- package/dist/api-connections/hosted-mcp/sign-in-status.js +17 -4
- package/dist/api-connections/hosted-mcp/sign-in.d.ts +1 -1
- package/dist/api-connections/hosted-mcp/sign-in.js +28 -30
- package/dist/api-connections/shared-api.d.ts +87 -0
- package/dist/api-connections/shared-api.js +135 -0
- package/dist/api-connections/shared-oauth-disconnect.d.ts +73 -0
- package/dist/api-connections/shared-oauth-disconnect.js +41 -0
- package/dist/api-connections/shared-owner.d.ts +107 -0
- package/dist/api-connections/shared-owner.js +79 -0
- package/dist/api-connections/vault-stores.d.ts +110 -0
- package/dist/api-connections/vault-stores.js +202 -0
- package/dist/credentialed-http/auth-schemes.d.ts +2 -9
- package/dist/credentialed-http/tools/index.d.ts +30 -0
- package/dist/credentialed-http/tools/index.js +19 -0
- package/dist/credentialed-http/tools/tool-registrations.js +0 -1
- package/dist/custom-credentials/agent-tools.d.ts +79 -0
- package/dist/custom-credentials/agent-tools.js +98 -0
- package/dist/custom-credentials/card-token.d.ts +15 -0
- package/dist/custom-credentials/card-token.js +35 -0
- package/dist/custom-credentials/credential-ports.d.ts +70 -0
- package/dist/custom-credentials/credential-ports.js +41 -0
- package/dist/custom-credentials/credential-recovery.d.ts +20 -0
- package/dist/custom-credentials/credential-recovery.js +22 -0
- package/dist/custom-credentials/credentialed-request.d.ts +83 -0
- package/dist/custom-credentials/credentialed-request.js +93 -0
- package/dist/custom-credentials/custom-credential-create-ui.d.ts +106 -0
- package/dist/custom-credentials/custom-credential-create-ui.js +136 -0
- package/dist/custom-credentials/custom-credential-set-token-ui.d.ts +84 -0
- package/dist/custom-credentials/custom-credential-set-token-ui.js +104 -0
- package/dist/custom-credentials/delete-request-confirmation-ui.d.ts +33 -0
- package/dist/custom-credentials/delete-request-confirmation-ui.js +35 -0
- package/dist/custom-credentials/provider-settings-card.d.ts +109 -0
- package/dist/custom-credentials/provider-settings-card.js +166 -0
- package/dist/custom-credentials/write-files-validation.d.ts +102 -0
- package/dist/custom-credentials/write-files-validation.js +202 -0
- package/dist/media-providers/catalog-projection.d.ts +29 -0
- package/dist/media-providers/catalog-projection.js +45 -0
- package/dist/media-providers/catalog.d.ts +6 -3
- package/dist/media-providers/catalog.js +4 -3
- package/dist/media-providers/configurable-catalog.d.ts +9 -0
- package/dist/media-providers/configurable-catalog.js +70 -0
- package/dist/media-providers/dispatch/builtin-vendors.js +0 -2
- package/dist/media-providers/dispatch/credentials.d.ts +4 -1
- package/dist/media-providers/dispatch/credentials.js +3 -2
- package/dist/media-providers/dispatch/engine.d.ts +1 -1
- package/dist/media-providers/dispatch/engine.js +17 -5
- package/dist/media-providers/dispatch/index.d.ts +3 -2
- package/dist/media-providers/dispatch/index.js +2 -2
- package/dist/media-providers/dispatch/media-provider-registry.d.ts +23 -4
- package/dist/media-providers/dispatch/media-provider-registry.js +26 -11
- package/dist/media-providers/dispatch/media-wire.d.ts +14 -0
- package/dist/media-providers/dispatch/media-wire.js +22 -0
- package/dist/media-providers/dispatch/node.d.ts +5 -0
- package/dist/media-providers/dispatch/node.js +5 -1
- package/dist/media-providers/dispatch/openai-compatible.d.ts +3 -1
- package/dist/media-providers/dispatch/openai-compatible.js +1 -1
- package/dist/media-providers/dispatch/operation-runtime.js +5 -4
- package/dist/media-providers/dispatch/outbound.d.ts +28 -3
- package/dist/media-providers/dispatch/outbound.js +10 -3
- package/dist/media-providers/dispatch/providers/custom-image.js +1 -1
- package/dist/media-providers/dispatch/providers/imagerouter.js +1 -1
- package/dist/media-providers/dispatch/providers/nanobanana.js +1 -1
- package/dist/media-providers/dispatch/providers/openrouter.js +1 -1
- package/dist/media-providers/dispatch/ssrf-guard.js +2 -2
- package/dist/media-providers/dispatch/types.d.ts +13 -4
- package/dist/media-providers/dispatch/vendor-adapter.js +2 -2
- package/dist/media-providers/index.d.ts +2 -0
- package/dist/media-providers/providers.d.ts +9 -5
- package/dist/media-providers/providers.js +9 -12
- package/dist/media-providers/sqlite-task-store.d.ts +4 -4
- package/dist/media-providers/task-store.d.ts +1 -1
- package/dist/media-providers/task-store.js +1 -1
- package/dist/media-providers/types.d.ts +0 -36
- package/dist/media-providers/ui-defaults.js +0 -4
- package/dist/react/admin-credentials/AdminByokKeyPanel.d.ts +130 -0
- package/dist/react/admin-credentials/AdminByokKeyPanel.js +115 -0
- package/dist/react/admin-credentials/byok-footer-status.d.ts +37 -0
- package/dist/react/admin-credentials/byok-footer-status.js +25 -0
- package/dist/react/credentials/OtherCredentialsSection.d.ts +36 -0
- package/dist/react/credentials/OtherCredentialsSection.hooks.d.ts +55 -0
- package/dist/react/credentials/OtherCredentialsSection.hooks.js +26 -0
- package/dist/react/credentials/OtherCredentialsSection.js +120 -0
- package/dist/react/credentials/access-token-forms.d.ts +219 -0
- package/dist/react/credentials/access-token-forms.js +114 -0
- package/dist/react/credentials/credential-copy.d.ts +17 -0
- package/dist/react/credentials/credential-copy.js +7 -0
- package/dist/react/credentials/other-credential-stores.d.ts +115 -0
- package/dist/react/credentials/other-credential-stores.js +76 -0
- package/dist/react/site-key/SiteKeyRecoveryCard.d.ts +16 -0
- package/dist/react/site-key/SiteKeyRecoveryCard.js +36 -0
- package/dist/react/site-key/SiteKeyTab.d.ts +100 -0
- package/dist/react/site-key/SiteKeyTab.js +127 -0
- package/dist/react/site-key/hooks/use-site-key-recovery.hooks.d.ts +77 -0
- package/dist/react/site-key/hooks/use-site-key-recovery.hooks.js +126 -0
- package/dist/react/site-key/hooks/use-site-key.hooks.d.ts +120 -0
- package/dist/react/site-key/hooks/use-site-key.hooks.js +95 -0
- package/dist/react/webhooks/IntegrationDeliveries.d.ts +41 -0
- package/dist/react/webhooks/IntegrationDeliveries.js +24 -0
- package/dist/react/webhooks/Integrations.d.ts +73 -0
- package/dist/react/webhooks/Integrations.js +97 -0
- package/dist/react/webhooks/hooks/use-integration-deliveries.hooks.d.ts +59 -0
- package/dist/react/webhooks/hooks/use-integration-deliveries.hooks.js +11 -0
- package/dist/react/webhooks/hooks/use-integrations.hooks.d.ts +119 -0
- package/dist/react/webhooks/hooks/use-integrations.hooks.js +129 -0
- package/dist/react/webhooks/rules.d.ts +118 -0
- package/dist/react/webhooks/rules.js +103 -0
- package/dist/saved-requests/execute.js +2 -3
- package/dist/saved-requests/types.d.ts +4 -1
- package/dist/secrets/index.d.ts +3 -0
- package/dist/secrets/index.js +3 -0
- package/dist/secrets/ports.d.ts +25 -0
- package/dist/secrets/ports.js +2 -0
- package/dist/secrets/types.d.ts +10 -0
- package/dist/secrets/types.js +2 -0
- package/dist/vendor-credentials/abort-guarded-repo.d.ts +14 -0
- package/dist/vendor-credentials/abort-guarded-repo.js +41 -0
- package/dist/vendor-credentials/project-scope.d.ts +43 -0
- package/dist/vendor-credentials/project-scope.js +32 -0
- package/dist/vendor-credentials/vault-adapter.d.ts +157 -0
- package/dist/vendor-credentials/vault-adapter.js +220 -0
- package/dist/web-screenshot/capture-files.d.ts +44 -0
- package/dist/web-screenshot/capture-files.js +62 -0
- package/dist/web-screenshot/capture-retention.d.ts +157 -0
- package/dist/web-screenshot/capture-retention.js +134 -0
- package/dist/web-screenshot/capture-root-file-lock.d.ts +20 -0
- package/dist/web-screenshot/capture-root-file-lock.js +15 -0
- package/dist/web-screenshot/desktop-page-capture.d.ts +37 -0
- package/dist/web-screenshot/desktop-page-capture.js +62 -0
- package/dist/web-screenshot/own-site-opener.d.ts +40 -0
- package/dist/web-screenshot/own-site-opener.js +27 -0
- package/dist/web-screenshot/screenshot-image.d.ts +11 -0
- package/dist/web-screenshot/screenshot-image.js +12 -0
- package/dist/web-screenshot/web-screenshot.d.ts +188 -0
- package/dist/web-screenshot/web-screenshot.js +329 -0
- package/dist/webhooks/delivery.d.ts +16 -0
- package/dist/webhooks/delivery.js +41 -1
- package/dist/webhooks/ports.d.ts +1 -29
- package/dist/webhooks/signing.keyring.d.ts +1 -1
- package/dist/webhooks/site/delivery.d.ts +60 -0
- package/dist/webhooks/site/delivery.js +45 -0
- package/dist/webhooks/site/http.memory.d.ts +51 -0
- package/dist/webhooks/site/http.memory.js +28 -0
- package/dist/webhooks/site/repo.memory.d.ts +136 -0
- package/dist/webhooks/site/repo.memory.js +215 -0
- package/dist/webhooks/site/seal-aad-invariant.d.ts +26 -0
- package/dist/webhooks/site/seal-aad-invariant.js +61 -0
- package/dist/webhooks/site/seal-aad-invariant.node.d.ts +42 -0
- package/dist/webhooks/site/seal-aad-invariant.node.js +52 -0
- package/dist/webhooks/site/signing.d.ts +28 -0
- package/dist/webhooks/site/signing.js +27 -0
- package/dist/webhooks/site/signing.keyring.d.ts +29 -0
- package/dist/webhooks/site/signing.keyring.js +30 -0
- package/dist/webhooks/site/subscriptions.d.ts +118 -0
- package/dist/webhooks/site/subscriptions.js +98 -0
- package/dist/webhooks/sql/index.d.ts +4 -0
- package/dist/webhooks/sql/index.js +2 -0
- package/dist/webhooks/sql/repo.rows.d.ts +47 -0
- package/dist/webhooks/sql/repo.rows.js +2 -0
- package/dist/webhooks/sql/webhook-repo.d.ts +152 -0
- package/dist/webhooks/sql/webhook-repo.js +308 -0
- package/dist/webhooks/subscriptions.d.ts +3 -1
- package/dist/webhooks/subscriptions.js +4 -1
- package/dist/webhooks/tools/tool-handlers.js +2 -1
- package/dist/webhooks/types.d.ts +6 -10
- package/package.json +517 -12
- package/dist/media-providers/dispatch/providers/grok.d.ts +0 -55
- package/dist/media-providers/dispatch/providers/grok.js +0 -116
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { AdminSiteKeyStartFreshPreview, AdminSiteKeyStatus, SiteKeyPort } from "@jini-ai/core/contracts/site/site-key";
|
|
2
|
+
import type { Translate } from "@jini-ai/core/text";
|
|
3
|
+
import type { SiteKeyGenerateFailure } from "./use-site-key.hooks.js";
|
|
4
|
+
type Empty = Record<string, never>;
|
|
5
|
+
/**
|
|
6
|
+
* @file The Site key tab's last-resort recovery for a locked site (server:
|
|
7
|
+
* `routes/system/site-key.ts`'s `import` / `start-fresh`): "Paste your old site key" and "Start
|
|
8
|
+
* fresh" with one typed confirmation. All state and copy live here; `SiteKeyTab.tsx` only renders.
|
|
9
|
+
*
|
|
10
|
+
* The pasted token is cleared from state as soon as it is accepted. Refusals show the server's own
|
|
11
|
+
* plain sentence (`body.detail`), which always says whether anything changed.
|
|
12
|
+
*/
|
|
13
|
+
/** The exact phrase "Start fresh" needs typed — the server checks the same string. */
|
|
14
|
+
export declare const START_FRESH_CONFIRMATION = "START FRESH";
|
|
15
|
+
export type SiteKeyRecoveryPort = Pick<SiteKeyPort, "importSiteKey" | "previewStartFresh" | "startFresh">;
|
|
16
|
+
export interface SiteKeyRecoveryController {
|
|
17
|
+
siteKey: string;
|
|
18
|
+
setSiteKey: (value: string) => void;
|
|
19
|
+
unlocking: boolean;
|
|
20
|
+
unlockError: string | null;
|
|
21
|
+
/** No-op for an empty paste or while a request is in flight. */
|
|
22
|
+
unlock: () => Promise<void>;
|
|
23
|
+
/** `loading` while the preview is fetched; `confirm` once it is shown. */
|
|
24
|
+
startFreshStep: "closed" | "loading" | "confirm";
|
|
25
|
+
preview: AdminSiteKeyStartFreshPreview | null;
|
|
26
|
+
openStartFresh: () => Promise<void>;
|
|
27
|
+
cancelStartFresh: () => void;
|
|
28
|
+
confirmText: string;
|
|
29
|
+
setConfirmText: (value: string) => void;
|
|
30
|
+
canConfirmStartFresh: boolean;
|
|
31
|
+
startingFresh: boolean;
|
|
32
|
+
startFreshError: string | null;
|
|
33
|
+
/** No-op unless {@link canConfirmStartFresh}. */
|
|
34
|
+
startFresh: () => Promise<void>;
|
|
35
|
+
/** What the last successful recovery did, in plain words; `null` before one. */
|
|
36
|
+
resultMessage: string | null;
|
|
37
|
+
t: Translate;
|
|
38
|
+
}
|
|
39
|
+
/** Whether the tab should offer recovery: saved credentials need a key that is not in place.
|
|
40
|
+
* @complexity O(1). */
|
|
41
|
+
export declare function isSiteKeyLocked({ status, generateError }: {
|
|
42
|
+
status: AdminSiteKeyStatus | undefined;
|
|
43
|
+
generateError: SiteKeyGenerateFailure | null;
|
|
44
|
+
}, _optional?: Record<string, never>): boolean;
|
|
45
|
+
/** The status card's note for a locked site — replaces "A key is created automatically…", which
|
|
46
|
+
* is not true there (boot refuses to mint over saved credentials). `null` when not locked.
|
|
47
|
+
* @complexity O(1). */
|
|
48
|
+
export declare function siteKeyLockedNote({ status, generateError, t }: {
|
|
49
|
+
status: AdminSiteKeyStatus | undefined;
|
|
50
|
+
generateError: SiteKeyGenerateFailure | null;
|
|
51
|
+
t: Translate;
|
|
52
|
+
}, _optional?: Record<string, never>): string | null;
|
|
53
|
+
/**
|
|
54
|
+
* @param required - The recovery port, translator, and status refresh callback.
|
|
55
|
+
* @param required.onRecovered - re-reads the tab's status after a successful recovery.
|
|
56
|
+
*/
|
|
57
|
+
export declare function useSiteKeyRecovery({ port, t, onRecovered, describeApiError, readApiRefusal, copy }: {
|
|
58
|
+
port: SiteKeyRecoveryPort;
|
|
59
|
+
t: Translate;
|
|
60
|
+
onRecovered: (() => Promise<void> | void) | undefined;
|
|
61
|
+
describeApiError: (required: {
|
|
62
|
+
e: unknown;
|
|
63
|
+
fallback: string;
|
|
64
|
+
}, options?: Empty) => string;
|
|
65
|
+
readApiRefusal: (required: {
|
|
66
|
+
error: unknown;
|
|
67
|
+
}, options?: Empty) => {
|
|
68
|
+
code: string | undefined;
|
|
69
|
+
message: string;
|
|
70
|
+
detail: string | undefined;
|
|
71
|
+
} | null;
|
|
72
|
+
copy: {
|
|
73
|
+
unknownError: string;
|
|
74
|
+
};
|
|
75
|
+
}, _optional?: Record<string, never>): SiteKeyRecoveryController;
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=use-site-key-recovery.hooks.d.ts.map
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @file The Site key tab's last-resort recovery for a locked site (server:
|
|
4
|
+
* `routes/system/site-key.ts`'s `import` / `start-fresh`): "Paste your old site key" and "Start
|
|
5
|
+
* fresh" with one typed confirmation. All state and copy live here; `SiteKeyTab.tsx` only renders.
|
|
6
|
+
*
|
|
7
|
+
* The pasted token is cleared from state as soon as it is accepted. Refusals show the server's own
|
|
8
|
+
* plain sentence (`body.detail`), which always says whether anything changed.
|
|
9
|
+
*/
|
|
10
|
+
/** The exact phrase "Start fresh" needs typed — the server checks the same string. */
|
|
11
|
+
export const START_FRESH_CONFIRMATION = "START FRESH";
|
|
12
|
+
/** Whether the tab should offer recovery: saved credentials need a key that is not in place.
|
|
13
|
+
* @complexity O(1). */
|
|
14
|
+
export function isSiteKeyLocked({ status, generateError }, _optional = {}) {
|
|
15
|
+
if (generateError?.kind === "locked")
|
|
16
|
+
return true;
|
|
17
|
+
return status?.state === "missing-with-data" || status?.state === "mismatch";
|
|
18
|
+
}
|
|
19
|
+
/** The status card's note for a locked site — replaces "A key is created automatically…", which
|
|
20
|
+
* is not true there (boot refuses to mint over saved credentials). `null` when not locked.
|
|
21
|
+
* @complexity O(1). */
|
|
22
|
+
export function siteKeyLockedNote({ status, generateError, t }, _optional = {}) {
|
|
23
|
+
return isSiteKeyLocked({ status, generateError }) ? t("Your credentials need their original site key — use the card above.") : null;
|
|
24
|
+
}
|
|
25
|
+
/** The server's own sentence for a refusal, else the shared fallback. @complexity O(1). */
|
|
26
|
+
function recoveryErrorMessage({ err, t, describeApiError, readApiRefusal, copy }, _optional = {}) {
|
|
27
|
+
const refusal = readApiRefusal({ error: err }, {});
|
|
28
|
+
if (refusal && typeof refusal.detail === "string")
|
|
29
|
+
return refusal.detail;
|
|
30
|
+
return describeApiError({ e: err, fallback: t(copy.unknownError) });
|
|
31
|
+
}
|
|
32
|
+
function unlockedMessage({ resealed, t }, _optional = {}) {
|
|
33
|
+
const base = t("Unlocked. Your saved credentials work again.");
|
|
34
|
+
return resealed > 0 ? `${base} ${t("{count} saved since were moved over.").replace("{count}", () => String(resealed))}` : base;
|
|
35
|
+
}
|
|
36
|
+
function startedFreshMessage(affectedWebhooks, t) {
|
|
37
|
+
const base = t("Done. Re-enter any credentials that were removed.");
|
|
38
|
+
if (affectedWebhooks.length === 0)
|
|
39
|
+
return base;
|
|
40
|
+
const names = affectedWebhooks.map((webhook) => `${webhook.label} (${webhook.targetUrl})`).join(", ");
|
|
41
|
+
return `${base} ${t("Update these webhooks' receivers with their new signing secret:")} ${names}.`;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @param required - The recovery port, translator, and status refresh callback.
|
|
45
|
+
* @param required.onRecovered - re-reads the tab's status after a successful recovery.
|
|
46
|
+
*/
|
|
47
|
+
export function useSiteKeyRecovery({ port, t, onRecovered, describeApiError, readApiRefusal, copy }, _optional = {}) {
|
|
48
|
+
const [siteKey, setSiteKey] = useState("");
|
|
49
|
+
const [unlocking, setUnlocking] = useState(false);
|
|
50
|
+
const [unlockError, setUnlockError] = useState(null);
|
|
51
|
+
const [startFreshStep, setStartFreshStep] = useState("closed");
|
|
52
|
+
const [preview, setPreview] = useState(null);
|
|
53
|
+
const [confirmText, setConfirmText] = useState("");
|
|
54
|
+
const [startingFresh, setStartingFresh] = useState(false);
|
|
55
|
+
const [startFreshError, setStartFreshError] = useState(null);
|
|
56
|
+
const [resultMessage, setResultMessage] = useState(null);
|
|
57
|
+
const canConfirmStartFresh = confirmText === START_FRESH_CONFIRMATION && !startingFresh;
|
|
58
|
+
async function unlock() {
|
|
59
|
+
const pasted = siteKey.trim();
|
|
60
|
+
if (pasted === "" || unlocking)
|
|
61
|
+
return;
|
|
62
|
+
setUnlocking(true);
|
|
63
|
+
setUnlockError(null);
|
|
64
|
+
try {
|
|
65
|
+
const result = await port.importSiteKey({ siteKey: pasted });
|
|
66
|
+
setSiteKey("");
|
|
67
|
+
setResultMessage(unlockedMessage({ resealed: result.resealed, t }));
|
|
68
|
+
await onRecovered?.();
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
setUnlockError(recoveryErrorMessage({ err, t, describeApiError, readApiRefusal, copy }));
|
|
72
|
+
}
|
|
73
|
+
finally {
|
|
74
|
+
setUnlocking(false);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const { openStartFresh, cancelStartFresh, startFresh } = createSiteKeyStartFreshActions({
|
|
78
|
+
port, t, onRecovered, describeApiError, readApiRefusal, copy, confirmText, canConfirmStartFresh,
|
|
79
|
+
setStartFreshStep, setStartFreshError, setPreview, setConfirmText, setStartingFresh, setResultMessage,
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
siteKey, setSiteKey, unlocking, unlockError, unlock,
|
|
83
|
+
startFreshStep, preview, openStartFresh, cancelStartFresh, confirmText, setConfirmText, canConfirmStartFresh,
|
|
84
|
+
startingFresh, startFreshError, startFresh, resultMessage, t,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function createSiteKeyStartFreshActions({ port, t, onRecovered, describeApiError, readApiRefusal, copy, confirmText, canConfirmStartFresh, setStartFreshStep, setStartFreshError, setPreview, setConfirmText, setStartingFresh, setResultMessage }, _optional = {}) {
|
|
88
|
+
async function openStartFresh() {
|
|
89
|
+
setStartFreshStep("loading");
|
|
90
|
+
setStartFreshError(null);
|
|
91
|
+
try {
|
|
92
|
+
setPreview(await port.previewStartFresh());
|
|
93
|
+
}
|
|
94
|
+
catch (err) {
|
|
95
|
+
setPreview(null);
|
|
96
|
+
setStartFreshError(recoveryErrorMessage({ err, t, describeApiError, readApiRefusal, copy }));
|
|
97
|
+
}
|
|
98
|
+
setStartFreshStep("confirm");
|
|
99
|
+
}
|
|
100
|
+
function cancelStartFresh() {
|
|
101
|
+
setStartFreshStep("closed");
|
|
102
|
+
setConfirmText("");
|
|
103
|
+
setStartFreshError(null);
|
|
104
|
+
}
|
|
105
|
+
async function startFresh() {
|
|
106
|
+
if (!canConfirmStartFresh)
|
|
107
|
+
return;
|
|
108
|
+
setStartingFresh(true);
|
|
109
|
+
setStartFreshError(null);
|
|
110
|
+
try {
|
|
111
|
+
const result = await port.startFresh({ confirm: confirmText });
|
|
112
|
+
setStartFreshStep("closed");
|
|
113
|
+
setConfirmText("");
|
|
114
|
+
setResultMessage(startedFreshMessage(result.affectedWebhooks, t));
|
|
115
|
+
await onRecovered?.();
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
setStartFreshError(recoveryErrorMessage({ err, t, describeApiError, readApiRefusal, copy }));
|
|
119
|
+
}
|
|
120
|
+
finally {
|
|
121
|
+
setStartingFresh(false);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return { openStartFresh, cancelStartFresh, startFresh };
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=use-site-key-recovery.hooks.js.map
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { AdminSiteKeyStatus, SiteKeyPort } from "@jini-ai/core/contracts/site/site-key";
|
|
2
|
+
import type { FetchQueryAdapter } from "@jini-ai/core/fetch";
|
|
3
|
+
import type { Translate } from "@jini-ai/core/text";
|
|
4
|
+
type Empty = Record<string, never>;
|
|
5
|
+
/**
|
|
6
|
+
* @file The Site key tab's controller — status + reveal + generate, no update/delete/rotate
|
|
7
|
+
* (see `SiteKeyTab.tsx`'s own header for why a rotate/replace flow is deliberately not built).
|
|
8
|
+
*
|
|
9
|
+
* ## Reveal is ONE mechanism, not two
|
|
10
|
+
*
|
|
11
|
+
* An earlier brief had generate show its new value once, at creation, with a "will not be shown
|
|
12
|
+
* again" warning, and every other read stay fingerprint-only. The owner superseded that ("i want
|
|
13
|
+
* that token to be visible to admins or else when it breaks they have no idea whats going on"),
|
|
14
|
+
* so this controller does not build a second, generate-specific reveal path — `reveal()` is the
|
|
15
|
+
* one way this tab ever shows a key value, usable at any time a key is active, including
|
|
16
|
+
* immediately after a successful `generate()` (which does NOT auto-populate `revealedHex` — the
|
|
17
|
+
* operator clicks Reveal same as any other time, consistent with "never shown on page load, only
|
|
18
|
+
* behind an explicit action" applying uniformly rather than making creation a special case).
|
|
19
|
+
*
|
|
20
|
+
* `revealedHex` is local state, not derived from `status`: the value exists nowhere else in this
|
|
21
|
+
* controller (`AdminSiteKeyStatus` never carries it — see that type's own doc), and clearing it
|
|
22
|
+
* (`hideRevealed`) only ever removes it from THIS state, never from the server.
|
|
23
|
+
*/
|
|
24
|
+
export interface SiteKeyController {
|
|
25
|
+
/** `undefined` until the first status read settles (success or failure). */
|
|
26
|
+
status: AdminSiteKeyStatus | undefined;
|
|
27
|
+
loadError: string | null;
|
|
28
|
+
revealing: boolean;
|
|
29
|
+
revealError: string | null;
|
|
30
|
+
/** The revealed key value, or `null` before the first reveal / after {@link hideRevealed}. */
|
|
31
|
+
revealedHex: string | null;
|
|
32
|
+
/** No-op when nothing is active to reveal. */
|
|
33
|
+
reveal: () => Promise<void>;
|
|
34
|
+
hideRevealed: () => void;
|
|
35
|
+
generating: boolean;
|
|
36
|
+
/** The classified failure (see {@link SiteKeyGenerateFailure}) — `SiteKeyTab.tsx` renders the
|
|
37
|
+
* server's own sentence for `"locked"`/`"refused"`, fixed copy for `"already-exists"`, and wraps
|
|
38
|
+
* `detail` in "Couldn't generate a key: …" only for `"generic"`. Kept as the classification
|
|
39
|
+
* itself, not a pre-rendered string, so a known refusal never reads as a genuine failure. */
|
|
40
|
+
generateError: SiteKeyGenerateFailure | null;
|
|
41
|
+
/** No-op (and leaves `generateError` alone) unless `status.source === "none"` — the tab's own
|
|
42
|
+
* Generate control is hidden outside that state (sol packet-3 finding 3-1), this is a second,
|
|
43
|
+
* defensive guard against a stale click. */
|
|
44
|
+
generate: () => Promise<void>;
|
|
45
|
+
/** Re-reads the status (after a recovery); clears a stale generate refusal. */
|
|
46
|
+
refresh: () => Promise<void>;
|
|
47
|
+
t: Translate;
|
|
48
|
+
}
|
|
49
|
+
/** Classifies a rejected generate call against the 409 codes `POST .../generate` sends
|
|
50
|
+
* (`lib/api.ts`'s `generateSiteKey` doc) — same "check `e.code ?? e.message`" shape
|
|
51
|
+
* `rules.ts`'s `classifyAccessTokenSubmitError` documents for Tier 1, reimplemented locally
|
|
52
|
+
* rather than imported: this tab has no other reason to depend on that file's provider-catalog
|
|
53
|
+
* tables.
|
|
54
|
+
* - `locked`: saved credentials need a key that is not here (`KEY_DEPENDENT_DATA`, `KEY_MISMATCH`)
|
|
55
|
+
* — the tab offers the recovery screen.
|
|
56
|
+
* - `refused`: nothing was changed for another reason (`KEY_INVALID`, `SITE_META_UNREADABLE`).
|
|
57
|
+
* - `already-exists`: production only, a key file appeared mid-request.
|
|
58
|
+
* `detail` is the server's own plain-words sentence (`body.detail`). @complexity O(1). */
|
|
59
|
+
export type SiteKeyGenerateFailure = {
|
|
60
|
+
kind: "locked";
|
|
61
|
+
code: "KEY_DEPENDENT_DATA" | "KEY_MISMATCH";
|
|
62
|
+
detail: string;
|
|
63
|
+
} | {
|
|
64
|
+
kind: "refused";
|
|
65
|
+
code: "KEY_INVALID" | "SITE_META_UNREADABLE";
|
|
66
|
+
detail: string;
|
|
67
|
+
} | {
|
|
68
|
+
kind: "already-exists";
|
|
69
|
+
} | {
|
|
70
|
+
kind: "generic";
|
|
71
|
+
detail: string;
|
|
72
|
+
};
|
|
73
|
+
export declare function classifySiteKeyGenerateError({ e, t, describeApiError, readApiRefusal, copy }: {
|
|
74
|
+
e: unknown;
|
|
75
|
+
t: Translate;
|
|
76
|
+
describeApiError: (required: {
|
|
77
|
+
e: unknown;
|
|
78
|
+
fallback: string;
|
|
79
|
+
}, options?: Empty) => string;
|
|
80
|
+
readApiRefusal: (required: {
|
|
81
|
+
error: unknown;
|
|
82
|
+
}, options?: Empty) => {
|
|
83
|
+
code: string | undefined;
|
|
84
|
+
message: string;
|
|
85
|
+
detail: string | undefined;
|
|
86
|
+
} | null;
|
|
87
|
+
copy: {
|
|
88
|
+
unknownError: string;
|
|
89
|
+
};
|
|
90
|
+
}, _optional?: Record<string, never>): SiteKeyGenerateFailure;
|
|
91
|
+
export declare function useSiteKey({ port, t, locale, queryHooks: { useFetchQuery, useFetchMutation, useCachedLoader }, describeApiError, readApiRefusal, copy }: {
|
|
92
|
+
port: SiteKeyPort;
|
|
93
|
+
t: Translate;
|
|
94
|
+
locale: string;
|
|
95
|
+
queryHooks: Pick<FetchQueryAdapter, "useFetchQuery" | "useFetchMutation" | "useCachedLoader">;
|
|
96
|
+
describeApiError: (required: {
|
|
97
|
+
e: unknown;
|
|
98
|
+
fallback: string;
|
|
99
|
+
}, options?: Empty) => string;
|
|
100
|
+
readApiRefusal: (required: {
|
|
101
|
+
error: unknown;
|
|
102
|
+
}, options?: Empty) => {
|
|
103
|
+
code: string | undefined;
|
|
104
|
+
message: string;
|
|
105
|
+
detail: string | undefined;
|
|
106
|
+
} | null;
|
|
107
|
+
copy: {
|
|
108
|
+
siteKeyLoadErrorMessage: (required: {
|
|
109
|
+
locale: string;
|
|
110
|
+
error: string;
|
|
111
|
+
}, options?: Empty) => string;
|
|
112
|
+
siteKeyRevealErrorMessage: (required: {
|
|
113
|
+
locale: string;
|
|
114
|
+
error: string;
|
|
115
|
+
}, options?: Empty) => string;
|
|
116
|
+
unknownError: string;
|
|
117
|
+
};
|
|
118
|
+
}, _optional?: Record<string, never>): SiteKeyController;
|
|
119
|
+
export {};
|
|
120
|
+
//# sourceMappingURL=use-site-key.hooks.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { useCallback, useMemo, useState } from "react";
|
|
2
|
+
/** Keep the server's public detail when present, including an intentionally empty string. */
|
|
3
|
+
function siteKeyGenerateDetail({ error, refusal, t, describeApiError, copy }) {
|
|
4
|
+
return typeof refusal.detail === "string" ? refusal.detail : describeApiError({ e: error, fallback: t(copy.unknownError) });
|
|
5
|
+
}
|
|
6
|
+
export function classifySiteKeyGenerateError({ e, t, describeApiError, readApiRefusal, copy }, _optional = {}) {
|
|
7
|
+
const refusal = readApiRefusal({ error: e }, {});
|
|
8
|
+
if (!refusal)
|
|
9
|
+
return { kind: "generic", detail: describeApiError({ e, fallback: t(copy.unknownError) }) };
|
|
10
|
+
const marker = refusal.code ?? refusal.message;
|
|
11
|
+
const detail = siteKeyGenerateDetail({ error: e, refusal, t, describeApiError, copy });
|
|
12
|
+
if (marker === "KEY_DEPENDENT_DATA" || marker === "KEY_MISMATCH")
|
|
13
|
+
return { kind: "locked", code: marker, detail };
|
|
14
|
+
if (marker === "KEY_INVALID" || marker === "SITE_META_UNREADABLE")
|
|
15
|
+
return { kind: "refused", code: marker, detail };
|
|
16
|
+
if (marker === "ALREADY_EXISTS")
|
|
17
|
+
return { kind: "already-exists" };
|
|
18
|
+
return { kind: "generic", detail: describeApiError({ e, fallback: t(copy.unknownError) }) };
|
|
19
|
+
}
|
|
20
|
+
export function useSiteKey({ port, t, locale, queryHooks: { useFetchQuery, useFetchMutation, useCachedLoader }, describeApiError, readApiRefusal, copy }, _optional = {}) {
|
|
21
|
+
const { siteKeyLoadErrorMessage, unknownError: UNKNOWN_ERROR } = copy;
|
|
22
|
+
const key = useMemo(() => ["site-key", "status"], []);
|
|
23
|
+
const fetchStatus = useCallback(async () => {
|
|
24
|
+
try {
|
|
25
|
+
return await port.status();
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
throw new Error(siteKeyLoadErrorMessage({ locale, error: describeApiError({ e: error, fallback: t(UNKNOWN_ERROR) }) }));
|
|
29
|
+
}
|
|
30
|
+
}, [port, locale, t]);
|
|
31
|
+
const query = useFetchQuery({ key, fetch: fetchStatus }, { staleTime: 0 });
|
|
32
|
+
const loader = useCachedLoader({ key, fetch: fetchStatus }, { staleTime: 0 });
|
|
33
|
+
const status = query.data;
|
|
34
|
+
const loadError = query.error?.message ?? null;
|
|
35
|
+
const generateKey = useFetchMutation({ run: () => port.generate() }, { invalidates: [["site-key"]] });
|
|
36
|
+
const [revealing, setRevealing] = useState(false);
|
|
37
|
+
const [revealError, setRevealError] = useState(null);
|
|
38
|
+
const [revealedHex, setRevealedHex] = useState(null);
|
|
39
|
+
const [generating, setGenerating] = useState(false);
|
|
40
|
+
const [generateError, setGenerateError] = useState(null);
|
|
41
|
+
const { reveal, hideRevealed } = createSiteKeyRevealActions({ status, revealing, port, locale, t, copy, describeApiError, setRevealing, setRevealError, setRevealedHex });
|
|
42
|
+
async function generate() {
|
|
43
|
+
if (status?.source !== "none" || generating)
|
|
44
|
+
return;
|
|
45
|
+
setGenerating(true);
|
|
46
|
+
setGenerateError(null);
|
|
47
|
+
try {
|
|
48
|
+
const result = await generateKey.mutate({ input: {} });
|
|
49
|
+
// Every success (`already-active`, `recovered`, `created`) leaves a key that matches the
|
|
50
|
+
// `.site-meta.json` stamp — the server refuses with a 409 rather than leave a mismatch.
|
|
51
|
+
loader.replace({ value: { active: true, source: "file", fingerprint: result.fingerprint, keyFilePath: result.keyFilePath, runtimeMode: result.runtimeMode, state: "active" } });
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
setGenerateError(classifySiteKeyGenerateError({ e: err, t, describeApiError, readApiRefusal, copy }));
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
setGenerating(false);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async function refresh() {
|
|
61
|
+
query.refetch();
|
|
62
|
+
try {
|
|
63
|
+
await loader.load();
|
|
64
|
+
setGenerateError(null);
|
|
65
|
+
setRevealedHex(null);
|
|
66
|
+
}
|
|
67
|
+
catch { /* The shared status query owns the existing load-error channel. */ }
|
|
68
|
+
}
|
|
69
|
+
return { status, loadError, revealing, revealError, revealedHex, reveal, hideRevealed, generating, generateError, generate, refresh, t };
|
|
70
|
+
}
|
|
71
|
+
function createSiteKeyRevealActions({ status, revealing, port, locale, t, copy, describeApiError, setRevealing, setRevealError, setRevealedHex }, _optional = {}) {
|
|
72
|
+
const { siteKeyRevealErrorMessage, unknownError: UNKNOWN_ERROR } = copy;
|
|
73
|
+
async function reveal() {
|
|
74
|
+
if (!status?.active || revealing)
|
|
75
|
+
return;
|
|
76
|
+
setRevealing(true);
|
|
77
|
+
setRevealError(null);
|
|
78
|
+
try {
|
|
79
|
+
const result = await port.reveal();
|
|
80
|
+
if (result.hex)
|
|
81
|
+
setRevealedHex(result.hex);
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
setRevealError(siteKeyRevealErrorMessage({ locale, error: describeApiError({ e: err, fallback: t(UNKNOWN_ERROR) }) }));
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
setRevealing(false);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function hideRevealed() {
|
|
91
|
+
setRevealedHex(null);
|
|
92
|
+
}
|
|
93
|
+
return { reveal, hideRevealed };
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=use-site-key.hooks.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from "react";
|
|
2
|
+
import type { AdminWebhookDeliveryResponse } from "@jini-ai/core/contracts/site/cms-integrations";
|
|
3
|
+
import type { IntegrationDeliveriesController } from "./hooks/use-integration-deliveries.hooks.js";
|
|
4
|
+
/**
|
|
5
|
+
* @file The webhook delivery-log screen — markup only.
|
|
6
|
+
*
|
|
7
|
+
* State and API calls live in `hooks/use-integration-deliveries.hooks.ts`; the timestamp
|
|
8
|
+
* derivation lives in `rules.ts`. What stays here is what actually renders: column definitions
|
|
9
|
+
* and the empty state.
|
|
10
|
+
*/
|
|
11
|
+
type Empty = Record<string, never>;
|
|
12
|
+
export interface IntegrationDeliveriesProps {
|
|
13
|
+
subscriptionId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Dependency injection seam for tests — see `Integrations.tsx`'s `useIntegrationsHook` for the
|
|
16
|
+
* house convention this follows.
|
|
17
|
+
*/
|
|
18
|
+
useIntegrationDeliveriesHook: (required: {
|
|
19
|
+
subscriptionId: string;
|
|
20
|
+
}, options?: Empty) => IntegrationDeliveriesController;
|
|
21
|
+
kit: {
|
|
22
|
+
DataTable: ComponentType<{
|
|
23
|
+
rows: readonly AdminWebhookDeliveryResponse[];
|
|
24
|
+
rowKey: (row: AdminWebhookDeliveryResponse, index: number) => string;
|
|
25
|
+
empty: ReactNode;
|
|
26
|
+
columns: readonly {
|
|
27
|
+
key: string;
|
|
28
|
+
header?: ReactNode;
|
|
29
|
+
headerLabel?: string;
|
|
30
|
+
cell: (row: AdminWebhookDeliveryResponse, index: number) => ReactNode;
|
|
31
|
+
}[];
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
ServerLabel: ComponentType<{
|
|
35
|
+
value: string;
|
|
36
|
+
}>;
|
|
37
|
+
viewerTimeZone: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function IntegrationDeliveries({ subscriptionId, useIntegrationDeliveriesHook, kit: { DataTable }, ServerLabel, viewerTimeZone, }: IntegrationDeliveriesProps): import("react").JSX.Element;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=IntegrationDeliveries.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { displayTimestamp } from "./rules.js";
|
|
3
|
+
export function IntegrationDeliveries({ subscriptionId, useIntegrationDeliveriesHook, kit: { DataTable }, ServerLabel, viewerTimeZone, }) {
|
|
4
|
+
const { deliveries, error, t } = useIntegrationDeliveriesHook({ subscriptionId });
|
|
5
|
+
if (error)
|
|
6
|
+
return _jsx("div", { className: "notice error", children: error });
|
|
7
|
+
if (!deliveries)
|
|
8
|
+
return _jsx("div", { className: "notice", children: t({ key: "Loading delivery log…" }) });
|
|
9
|
+
return (_jsxs("div", { className: "page", children: [_jsx("a", { href: "/admin/addons/integrations?tab=webhooks", children: t({ key: "← Integrations" }) }), _jsx("div", { className: "page-header", children: _jsxs("div", { className: "page-header-text", children: [_jsx("p", { className: "page-kicker", children: t({ key: "Integrations" }) }), _jsx("h1", { className: "page-title", children: t({ key: "Delivery log" }) }), _jsx("p", { className: "page-description", children: t({ key: "Every delivery attempt logged for this webhook subscription." }) })] }) }), _jsx(DataTable, { rows: deliveries, rowKey: (delivery) => delivery.id, empty: _jsx("div", { className: "card", children: _jsx("div", { className: "empty-state", children: _jsx("p", { children: t({ key: "No deliveries yet for this subscription." }) }) }) }), columns: [
|
|
10
|
+
{
|
|
11
|
+
key: "status",
|
|
12
|
+
header: t({ key: "Status" }),
|
|
13
|
+
cell: (delivery) => (_jsx("span", { className: `status status-delivery-${delivery.status}`, children: _jsx(ServerLabel, { value: delivery.status }) })),
|
|
14
|
+
},
|
|
15
|
+
{ key: "attempts", header: t({ key: "Attempts" }), cell: (delivery) => delivery.attempts },
|
|
16
|
+
{
|
|
17
|
+
key: "last-response",
|
|
18
|
+
header: t({ key: "Last response" }),
|
|
19
|
+
cell: (delivery) => (_jsxs(_Fragment, { children: [delivery.lastResponseStatus ?? "—", delivery.lastError ? _jsx("div", { className: "save-error", children: delivery.lastError }) : null] })),
|
|
20
|
+
},
|
|
21
|
+
{ key: "timestamp", header: t({ key: "Timestamp" }), cell: (delivery) => displayTimestamp({ delivery, viewerTimeZone }, {}) },
|
|
22
|
+
] })] }));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=IntegrationDeliveries.js.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from "react";
|
|
2
|
+
import type { AdminWebhookSubscriptionResponse } from "@jini-ai/core/contracts/site/cms-integrations";
|
|
3
|
+
import { integrationRowMenuItems } from "./rules.js";
|
|
4
|
+
import type { IntegrationsController } from "./hooks/use-integrations.hooks.js";
|
|
5
|
+
/**
|
|
6
|
+
* @file The Integrations list screen — markup only.
|
|
7
|
+
*
|
|
8
|
+
* State and API calls live in `hooks/use-integrations.hooks.ts`; the row-menu logic lives in
|
|
9
|
+
* `rules.ts`. What stays here is what actually renders: the create form, column definitions, and
|
|
10
|
+
* the confirm copy.
|
|
11
|
+
*
|
|
12
|
+
* `rules.ts`'s row-menu item labels ("Pause"/"Resume"/"Delete") stay English — see
|
|
13
|
+
* `integrations-i18n.tsx`'s file header for why that's a deliberate scope boundary, not an
|
|
14
|
+
* oversight.
|
|
15
|
+
*/
|
|
16
|
+
type Empty = Record<string, never>;
|
|
17
|
+
export interface IntegrationsProps {
|
|
18
|
+
/**
|
|
19
|
+
* Dependency injection seam for tests — the same convention `@jini-ai/ui`'s `CustomSelect` uses
|
|
20
|
+
* for `useCustomSelect`, and `features/posts/Posts.tsx`'s `usePostsHook`.
|
|
21
|
+
*
|
|
22
|
+
* The host supplies the real hook. A test supplies a stub and drives this component through any state without
|
|
23
|
+
* module mocking or a fake `fetch`.
|
|
24
|
+
*/
|
|
25
|
+
useIntegrationsHook: () => IntegrationsController;
|
|
26
|
+
kit: {
|
|
27
|
+
DataTable: ComponentType<{
|
|
28
|
+
rows: readonly AdminWebhookSubscriptionResponse[];
|
|
29
|
+
rowKey: (row: AdminWebhookSubscriptionResponse, index: number) => string;
|
|
30
|
+
empty: ReactNode;
|
|
31
|
+
columns: readonly {
|
|
32
|
+
key: string;
|
|
33
|
+
header?: ReactNode;
|
|
34
|
+
headerLabel?: string;
|
|
35
|
+
cell: (row: AdminWebhookSubscriptionResponse, index: number) => ReactNode;
|
|
36
|
+
}[];
|
|
37
|
+
}>;
|
|
38
|
+
RowMenu: ComponentType<{
|
|
39
|
+
items: ReturnType<typeof integrationRowMenuItems>;
|
|
40
|
+
triggerLabel: string;
|
|
41
|
+
agentHandle: string;
|
|
42
|
+
}>;
|
|
43
|
+
ConfirmDialog: ComponentType<{
|
|
44
|
+
open: boolean;
|
|
45
|
+
agentHandle: string;
|
|
46
|
+
title: string;
|
|
47
|
+
body: ReactNode;
|
|
48
|
+
confirmLabel: string;
|
|
49
|
+
destructive: boolean;
|
|
50
|
+
pending: boolean;
|
|
51
|
+
onConfirm: () => void;
|
|
52
|
+
onCancel: () => void;
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
ServerLabel: ComponentType<{
|
|
56
|
+
value: string;
|
|
57
|
+
}>;
|
|
58
|
+
translate: (required: {
|
|
59
|
+
locale: string;
|
|
60
|
+
key: string;
|
|
61
|
+
}, options?: Empty) => string;
|
|
62
|
+
actionsForWebhookLabel: (required: {
|
|
63
|
+
locale: string;
|
|
64
|
+
label: string;
|
|
65
|
+
}, options?: Empty) => string;
|
|
66
|
+
deleteWebhookBody: (required: {
|
|
67
|
+
locale: string;
|
|
68
|
+
label: string;
|
|
69
|
+
}, options?: Empty) => ReactNode;
|
|
70
|
+
}
|
|
71
|
+
export declare function Integrations({ useIntegrationsHook, kit, ServerLabel, translate, actionsForWebhookLabel, deleteWebhookBody }: IntegrationsProps): import("react").JSX.Element;
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=Integrations.d.ts.map
|