@workos-inc/widgets 1.20.1 → 1.20.2-next.1792082022643
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 +6 -0
- package/dist/cjs/admin-portal-audit-log-streaming.client.cjs +1 -1
- package/dist/cjs/admin-portal-domain-verification.client.cjs +2 -2
- package/dist/cjs/admin-portal-sso-connection.client.cjs +2 -2
- package/dist/cjs/api/api-provider.cjs +1 -1
- package/dist/cjs/api/client-graphql/client.cjs +1 -1
- package/dist/cjs/api/client-graphql/generated.cjs.map +1 -1
- package/dist/cjs/api/client-graphql/generated.d.cts +4 -4
- package/dist/cjs/api-keys.client.cjs +1 -1
- package/dist/cjs/index.cjs +11 -11
- package/dist/cjs/lib/add-mfa-dialog.cjs +4 -4
- package/dist/cjs/lib/admin-portal-audit-log-streaming.cjs +6 -6
- package/dist/cjs/lib/admin-portal-domain-verification.cjs +4 -4
- package/dist/cjs/lib/admin-portal-sso-connection.cjs +6 -6
- package/dist/cjs/lib/api/me.cjs +1 -1
- package/dist/cjs/lib/api/pipes.cjs +1 -1
- package/dist/cjs/lib/api-keys/api-key-details-card.cjs +1 -1
- package/dist/cjs/lib/api-keys/api-key-expiration.cjs +2 -2
- package/dist/cjs/lib/api-keys/api-keys-search.cjs +3 -3
- package/dist/cjs/lib/api-keys/api-keys-table.cjs +2 -2
- package/dist/cjs/lib/api-keys/api-keys.cjs +1 -1
- package/dist/cjs/lib/api-keys/create-api-key.cjs +2 -2
- package/dist/cjs/lib/change-email-dialog.cjs +3 -3
- package/dist/cjs/lib/change-password-dialog.cjs +2 -2
- package/dist/cjs/lib/copy-button.cjs +1 -1
- package/dist/cjs/lib/copy-text.cjs +1 -1
- package/dist/cjs/lib/data-integration-icon.cjs +2 -2
- package/dist/cjs/lib/data-list.cjs +3 -3
- package/dist/cjs/lib/delete-domain-dialog.cjs +1 -1
- package/dist/cjs/lib/delete-user-dialog.cjs +1 -1
- package/dist/cjs/lib/directory-sync.cjs +6 -6
- package/dist/cjs/lib/domain-item.cjs +1 -1
- package/dist/cjs/lib/edit-user-profile-dialog.cjs +2 -2
- package/dist/cjs/lib/edit-user-role-dialog.cjs +1 -1
- package/dist/cjs/lib/elements/alert-dialog.cjs +1 -1
- package/dist/cjs/lib/elements/dialog.cjs +1 -1
- package/dist/cjs/lib/elements/dropdown-menu.cjs +3 -3
- package/dist/cjs/lib/elements/select.cjs +4 -4
- package/dist/cjs/lib/elements.cjs +4 -4
- package/dist/cjs/lib/elevated-access.cjs +3 -3
- package/dist/cjs/lib/form.cjs +1 -1
- package/dist/cjs/lib/generic-error.cjs +2 -2
- package/dist/cjs/lib/icon-panel.cjs +1 -1
- package/dist/cjs/lib/invite-user-dialog.cjs +1 -1
- package/dist/cjs/lib/logout-all-sessions-dialog.cjs +3 -3
- package/dist/cjs/lib/logout-dialog.cjs +3 -3
- package/dist/cjs/lib/marker.cjs +3 -3
- package/dist/cjs/lib/name-server-icon.cjs +1 -1
- package/dist/cjs/lib/organization-switcher.cjs +3 -3
- package/dist/cjs/lib/otp-input.cjs +1 -1
- package/dist/cjs/lib/pipes-admin.cjs +8 -8
- package/dist/cjs/lib/pipes-connections.cjs +4 -4
- package/dist/cjs/lib/pipes-credential-attribution.cjs +1 -1
- package/dist/cjs/lib/pipes.cjs +9 -9
- package/dist/cjs/lib/provider-icon.cjs +2 -2
- package/dist/cjs/lib/resend-invite-dialog.cjs +1 -1
- package/dist/cjs/lib/reset-mfa-dialog.cjs +3 -3
- package/dist/cjs/lib/revoke-invite-dialog.cjs +1 -1
- package/dist/cjs/lib/save-button.cjs +1 -1
- package/dist/cjs/lib/searchable-select-list.cjs +1 -1
- package/dist/cjs/lib/set-password-dialog.cjs +3 -3
- package/dist/cjs/lib/status.cjs +3 -3
- package/dist/cjs/lib/use-widgets-invalidator.cjs +1 -1
- package/dist/cjs/lib/user-api-keys/create-user-api-key.cjs +2 -2
- package/dist/cjs/lib/user-api-keys/user-api-key-details-card.cjs +1 -1
- package/dist/cjs/lib/user-api-keys/user-api-keys-search.cjs +2 -2
- package/dist/cjs/lib/user-api-keys/user-api-keys-table.cjs +2 -2
- package/dist/cjs/lib/user-api-keys/user-api-keys.cjs +1 -1
- package/dist/cjs/lib/user-profile.cjs +3 -3
- package/dist/cjs/lib/user-security.cjs +3 -3
- package/dist/cjs/lib/user-sessions.cjs +4 -4
- package/dist/cjs/lib/users-management.cjs +4 -4
- package/dist/cjs/lib/users-search.cjs +3 -3
- package/dist/cjs/lib/view-dns-record-dialog.cjs +3 -3
- package/dist/cjs/organization-switcher.client.cjs +1 -1
- package/dist/cjs/users-management.client.cjs +1 -1
- package/dist/cjs/workos-widgets.client.cjs +6 -6
- package/dist/esm/admin-portal-audit-log-streaming.client.js +1 -1
- package/dist/esm/admin-portal-domain-verification.client.js +2 -2
- package/dist/esm/admin-portal-sso-connection.client.js +2 -2
- package/dist/esm/api/api-provider.js +1 -1
- package/dist/esm/api/client-graphql/client.js +1 -1
- package/dist/esm/api/client-graphql/generated.d.ts +4 -4
- package/dist/esm/api/client-graphql/generated.js.map +1 -1
- package/dist/esm/api-keys.client.js +1 -1
- package/dist/esm/index.js +11 -11
- package/dist/esm/lib/add-mfa-dialog.js +4 -4
- package/dist/esm/lib/admin-portal-audit-log-streaming.js +6 -6
- package/dist/esm/lib/admin-portal-domain-verification.js +4 -4
- package/dist/esm/lib/admin-portal-sso-connection.js +6 -6
- package/dist/esm/lib/api/me.js +1 -1
- package/dist/esm/lib/api/pipes.js +1 -1
- package/dist/esm/lib/api-keys/api-key-details-card.js +1 -1
- package/dist/esm/lib/api-keys/api-key-expiration.js +2 -2
- package/dist/esm/lib/api-keys/api-keys-search.js +2 -2
- package/dist/esm/lib/api-keys/api-keys-table.js +2 -2
- package/dist/esm/lib/api-keys/api-keys.js +1 -1
- package/dist/esm/lib/api-keys/create-api-key.js +2 -2
- package/dist/esm/lib/change-email-dialog.js +3 -3
- package/dist/esm/lib/change-password-dialog.js +2 -2
- package/dist/esm/lib/copy-button.js +1 -1
- package/dist/esm/lib/copy-text.js +1 -1
- package/dist/esm/lib/data-integration-icon.js +1 -1
- package/dist/esm/lib/data-list.js +2 -2
- package/dist/esm/lib/delete-domain-dialog.js +1 -1
- package/dist/esm/lib/delete-user-dialog.js +1 -1
- package/dist/esm/lib/directory-sync.js +6 -6
- package/dist/esm/lib/domain-item.js +1 -1
- package/dist/esm/lib/edit-user-profile-dialog.js +2 -2
- package/dist/esm/lib/edit-user-role-dialog.js +1 -1
- package/dist/esm/lib/elements/alert-dialog.js +1 -1
- package/dist/esm/lib/elements/dialog.js +1 -1
- package/dist/esm/lib/elements/dropdown-menu.js +2 -2
- package/dist/esm/lib/elements/select.d.ts +1 -1
- package/dist/esm/lib/elements/select.js +3 -3
- package/dist/esm/lib/elements.d.ts +1 -1
- package/dist/esm/lib/elements.js +3 -3
- package/dist/esm/lib/elevated-access.js +3 -3
- package/dist/esm/lib/form.js +1 -1
- package/dist/esm/lib/generic-error.d.ts +1 -1
- package/dist/esm/lib/generic-error.js +2 -2
- package/dist/esm/lib/icon-panel.js +1 -1
- package/dist/esm/lib/invite-user-dialog.js +1 -1
- package/dist/esm/lib/logout-all-sessions-dialog.js +3 -3
- package/dist/esm/lib/logout-dialog.js +3 -3
- package/dist/esm/lib/marker.d.ts +1 -1
- package/dist/esm/lib/marker.js +2 -2
- package/dist/esm/lib/name-server-icon.js +1 -1
- package/dist/esm/lib/organization-switcher.js +3 -3
- package/dist/esm/lib/otp-input.d.ts +1 -1
- package/dist/esm/lib/otp-input.js +1 -1
- package/dist/esm/lib/pipes-admin.js +18 -18
- package/dist/esm/lib/pipes-admin.js.map +1 -1
- package/dist/esm/lib/pipes-connections.js +4 -4
- package/dist/esm/lib/pipes-credential-attribution.js +1 -1
- package/dist/esm/lib/pipes.js +27 -27
- package/dist/esm/lib/pipes.js.map +1 -1
- package/dist/esm/lib/provider-icon.js +1 -1
- package/dist/esm/lib/resend-invite-dialog.js +1 -1
- package/dist/esm/lib/reset-mfa-dialog.js +3 -3
- package/dist/esm/lib/revoke-invite-dialog.js +1 -1
- package/dist/esm/lib/save-button.js +1 -1
- package/dist/esm/lib/searchable-select-list.js +1 -1
- package/dist/esm/lib/set-password-dialog.js +3 -3
- package/dist/esm/lib/status.js +2 -2
- package/dist/esm/lib/use-widgets-invalidator.js +1 -1
- package/dist/esm/lib/user-api-keys/create-user-api-key.js +2 -2
- package/dist/esm/lib/user-api-keys/user-api-key-details-card.js +1 -1
- package/dist/esm/lib/user-api-keys/user-api-keys-search.js +1 -1
- package/dist/esm/lib/user-api-keys/user-api-keys-table.js +2 -2
- package/dist/esm/lib/user-api-keys/user-api-keys.js +1 -1
- package/dist/esm/lib/user-profile.js +3 -3
- package/dist/esm/lib/user-security.js +3 -3
- package/dist/esm/lib/user-sessions.js +4 -4
- package/dist/esm/lib/users-management.js +4 -4
- package/dist/esm/lib/users-search.js +2 -2
- package/dist/esm/lib/view-dns-record-dialog.js +3 -3
- package/dist/esm/organization-switcher.client.js +1 -1
- package/dist/esm/users-management.client.js +1 -1
- package/dist/esm/workos-widgets.client.d.ts +1 -1
- package/dist/esm/workos-widgets.client.js +5 -5
- package/package.json +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipes-admin.js","names":["TextField","Dialog.Root","Dialog.Content","Dialog.Title","Dialog.Close","Button","AlertDialog.Root","AlertDialog.Content","AlertDialog.Title","AlertDialog.Description","AlertDialog.Cancel","CardList.Item","DropdownMenu.Root","DropdownMenu.Trigger","IconButton","DropdownMenu.Content","DropdownMenu.Item","CardList.Root","Skeleton"],"sources":["../../../src/lib/pipes-admin.tsx"],"sourcesContent":["\"use client\";\nimport { Callout, Card, Flex, Switch, Text, Tooltip } from \"@radix-ui/themes\";\nimport * as React from \"react\";\nimport { useEffect, useState } from \"react\";\nimport {\n DotsHorizontalIcon,\n ExternalLinkIcon,\n InfoCircledIcon,\n} from \"@radix-ui/react-icons\";\nimport * as CardList from \"./card-list.js\";\nimport { CopyText } from \"./copy-text.js\";\nimport { DataIntegrationIcon } from \"./data-integration-icon.js\";\nimport { ProviderIcon } from \"./provider-icon.js\";\nimport {\n AlertDialog,\n Button,\n Dialog,\n DropdownMenu,\n IconButton,\n Label,\n PasswordField,\n Skeleton,\n TextField,\n} from \"./elements.js\";\nimport { IconPanel } from \"./icon-panel.js\";\nimport { SearchableSelectList } from \"./searchable-select-list.js\";\nimport { Status } from \"./status.js\";\nimport type {\n DataInstallation,\n DataIntegrationConfiguration,\n OrganizationDataIntegration,\n} from \"./api/types.js\";\nimport {\n type ConnectionWithCapabilities,\n dataIntegrationConfigurationsQueryKey,\n myDataIntegrationsQueryKeys,\n organizationDataIntegrationsQueryKey,\n type OrganizationDataIntegrationWithCapabilities,\n sharedDataConnectionsQueryKey,\n useDataIntegrationConfigurations,\n useOrganizationDataIntegrations,\n} from \"./api/pipes.js\";\nimport { useClientGraphqlMutation } from \"../api/client-graphql/hooks.js\";\nimport type {\n DataProviderConfigEntryInput,\n SetDataProviderConfigurationMutation,\n SetOrganizationDataProviderConfigurationMutation,\n} from \"../api/client-graphql/generated.js\";\nimport { ApiError } from \"../api/errors.js\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { GenericError } from \"./generic-error.js\";\nimport {\n ApiKeyDialog,\n ClientCredentialsDialog,\n ConnectDialog,\n ConnectionFailedStatus,\n ConnectionOwner,\n PipesEmptyItem,\n PipesSection,\n getUnpinnedInstallationFields,\n useAddConnectionFlow,\n useOpenDataIntegrationAuthorizeUrl,\n} from \"./pipes.js\";\nimport {\n ADD_CONNECTION,\n AddConnectionButtonLabel,\n ConnectAnotherAccountMenuLabel,\n ConnectionCountStatus,\n type ConnectionTarget,\n canRenameConnections,\n getConnectionLabel,\n getConnectionTarget,\n RenameConnectionDialog,\n RenameMenuLabel,\n} from \"./pipes-connections.js\";\nimport { usePermissions } from \"./use-permissions.js\";\nimport { getWidgetDomProps } from \"./utils/widget-dom-props.js\";\nimport { WidgetRootDomProps, WidgetRootState } from \"./widget-types.js\";\nimport { Translation } from \"./i18n/translation.js\";\nimport { useTranslation } from \"./i18n/use-translation.js\";\nimport { buildRedactedSecret, isRedactedSecret } from \"./redacted-secret.js\";\n\nfunction RedirectUriField({ value }: { value: string }) {\n const translate = useTranslation();\n\n const copyLabel = translate({\n defaultMessage: \"Copy redirect URI\",\n id: \"xqfxBC\",\n description: \"Accessible label for the copy redirect URI button\",\n });\n\n return (\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"Redirect URI\"\n id=\"lgEaUA\"\n description=\"Label for the read-only OAuth redirect URI field\"\n />\n </Label>\n <CopyText value={value} label={copyLabel} />\n </Flex>\n );\n}\n\n/**\n * The configuration surface the credentials dialog edits. Structurally shared\n * by the user-policy configuration (`/configurations`) and the organization\n * configuration nested in an organization-owned integration (`/organization`).\n */\ntype ConfigurableIntegration = Pick<\n DataIntegrationConfiguration,\n | \"id\"\n | \"name\"\n | \"description\"\n | \"slug\"\n | \"authMethods\"\n | \"enabled\"\n | \"scopes\"\n | \"defaultScopes\"\n | \"availableScopes\"\n | \"credentials\"\n | \"configFields\"\n | \"config\"\n>;\n\n/** The fields the credentials dialog writes; absent fields are left as they are. */\ninterface ConfigurationPayload {\n enabled: boolean;\n scopes?: string[];\n clientId?: string;\n clientSecret?: string;\n config?: Record<string, string>;\n}\n\nfunction toConfigEntries(\n config: Record<string, string> | undefined,\n): DataProviderConfigEntryInput[] | undefined {\n return config\n ? Object.entries(config).map(([name, value]) => ({ name, value }))\n : undefined;\n}\n\ntype SetConfigurationResult =\n | SetDataProviderConfigurationMutation[\"setDataProviderConfiguration\"]\n | SetOrganizationDataProviderConfigurationMutation[\"setOrganizationDataProviderConfiguration\"];\n\nfunction unwrapConfiguration(\n result: SetConfigurationResult,\n): Extract<\n SetConfigurationResult,\n { __typename: \"DataProviderConfiguration\" }\n> {\n switch (result.__typename) {\n case \"DataProviderConfiguration\":\n return result;\n case \"DataProviderConfigInvalid\":\n throw new ApiError({\n message: result.message,\n status: 400,\n queryType: \"mutation\",\n });\n }\n}\n\n/**\n * Saves a configuration for its owner. The user-policy write governs what\n * members may connect on their own, so it refreshes the member list; the\n * organization write changes the organization's own connection, so it\n * refreshes the shared lanes instead.\n */\nfunction useUpsertConfiguration(\n owner: ConnectionOwner,\n integration: Pick<ConfigurableIntegration, \"id\" | \"slug\">,\n onSuccess: () => void,\n): {\n mutate: (payload: ConfigurationPayload) => void;\n isError: boolean;\n isPending: boolean;\n} {\n const queryClient = useQueryClient();\n const toInput = (payload: ConfigurationPayload) => ({\n dataProviderId: integration.id,\n enabled: payload.enabled,\n scopes: payload.scopes,\n clientId: payload.clientId,\n clientSecret: payload.clientSecret,\n config: toConfigEntries(payload.config),\n });\n const user = useClientGraphqlMutation({\n mutationFn: async (sdk, payload: ConfigurationPayload) => {\n const { setDataProviderConfiguration } =\n await sdk.SetDataProviderConfiguration({ input: toInput(payload) });\n return unwrapConfiguration(setDataProviderConfiguration);\n },\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: dataIntegrationConfigurationsQueryKey,\n });\n // Saving a configuration can change which providers/scopes are available\n // in the user connection list, so refresh that list too.\n for (const queryKey of myDataIntegrationsQueryKeys) {\n queryClient.invalidateQueries({ queryKey });\n }\n onSuccess();\n },\n });\n const organization = useClientGraphqlMutation({\n mutationFn: async (sdk, payload: ConfigurationPayload) => {\n const { setOrganizationDataProviderConfiguration } =\n await sdk.SetOrganizationDataProviderConfiguration({\n input: toInput(payload),\n });\n return unwrapConfiguration(setOrganizationDataProviderConfiguration);\n },\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: organizationDataIntegrationsQueryKey,\n });\n queryClient.invalidateQueries({\n queryKey: sharedDataConnectionsQueryKey,\n });\n onSuccess();\n },\n });\n\n if (owner === \"organization\") {\n return {\n mutate: organization.mutate,\n isError: organization.isError,\n isPending: organization.isPending,\n };\n }\n return {\n mutate: user.mutate,\n isError: user.isError,\n isPending: user.isPending,\n };\n}\n\nfunction OrgCredentialsDialog({\n integration,\n open,\n onOpenChange,\n owner = \"user\",\n}: {\n integration: ConfigurableIntegration;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n owner?: ConnectionOwner;\n}) {\n const credentials = integration.credentials;\n const hasCredentials = credentials.hasCredentials;\n const isOrgCredentials = credentials.credentialsType === \"organization\";\n\n // Seeded once on mount; the dialog is only mounted while open (see\n // OrgCredentialsButton), so each open starts from the current configuration.\n // `enabled`/`scopes` on the configuration are the effective values\n // (the org override when present, else the developer default).\n const redactedSecret = buildRedactedSecret(credentials.redactedClientSecret);\n const [clientId, setClientId] = useState(credentials.client_id ?? \"\");\n const [clientSecret, setClientSecret] = useState(redactedSecret);\n const [enabled, setEnabled] = useState(integration.enabled);\n const [scopes, setScopes] = useState<string[]>(integration.scopes ?? []);\n // Organization credentials are entered first, then scopes (two-step wizard);\n // shared/custom providers only narrow scopes, so they get a single view.\n const [step, setStep] = useState<\"credentials\" | \"scopes\">(\"credentials\");\n const [clientIdError, setClientIdError] = useState<string | null>(null);\n const [clientSecretError, setClientSecretError] = useState<string | null>(\n null,\n );\n\n // Provider-declared `integration`-scope config fields are configured here, but\n // only for `organization` credentials: the API rejects per-org config for\n // shared/custom creds (those are set on the root integration instead). The\n // `installation`-scope pins are deferred from this UI for now (they're\n // collected in the connect modal instead). `secret` fields are excluded: they\n // are rejected server-side, and seeding a masked secret can't be round-tripped\n // safely under the config-replace write.\n const configFields = isOrgCredentials\n ? (integration.configFields ?? [])\n .filter((field) => field.scope === \"integration\" && !field.secret)\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0))\n : [];\n const [configValues, setConfigValues] = useState<Record<string, string>>(\n () => {\n const seed: Record<string, string> = {};\n for (const field of integration.configFields ?? []) {\n if (field.scope !== \"integration\") continue;\n // Never seed a `secret` field from the response: the value may be\n // redacted, and re-submitting the mask would clobber the stored secret.\n if (field.secret) continue;\n const value = integration.config?.[field.key];\n if (typeof value === \"string\") {\n seed[field.key] = value;\n }\n }\n return seed;\n },\n );\n const [configErrors, setConfigErrors] = useState<\n Record<string, string | null>\n >({});\n\n const {\n mutate: upsertOverride,\n isError,\n isPending,\n } = useUpsertConfiguration(owner, integration, () => onOpenChange(false));\n\n const translate = useTranslation();\n\n // Selectable scope pool: organization credentials can request the provider's\n // full catalog; shared/custom can only (re)select within the developer's\n // configured defaults. The current effective selection is always included so\n // it stays toggleable, and the defaults are included so a previously removed\n // default can be re-added.\n const defaultScopes = integration.defaultScopes;\n const effectiveScopes = integration.scopes ?? [];\n const scopePool = isOrgCredentials\n ? [\n ...new Set([\n ...effectiveScopes,\n ...defaultScopes,\n ...integration.availableScopes,\n ]),\n ]\n : [...new Set([...effectiveScopes, ...defaultScopes])];\n // Developer-configured scopes the admin has unselected — named in the warning.\n const removedDefaultScopes = defaultScopes.filter(\n (scope) => !scopes.includes(scope),\n );\n\n const enabledLabel = translate({\n defaultMessage: \"Enable\",\n id: \"hkhtrS\",\n description: \"Label for the enable toggle\",\n });\n const enableTooltip = translate({\n defaultMessage:\n \"Allow this integration to be connected in your organization.\",\n id: \"7ItyG3\",\n description: \"Tooltip explaining the enable toggle\",\n });\n\n const clientIdPlaceholder = translate({\n defaultMessage: \"Enter your {providerName} Client ID\",\n id: \"pAUj4e\",\n description: \"Placeholder for the OAuth client ID input\",\n values: { providerName: integration.name },\n });\n const clientSecretPlaceholder = translate({\n defaultMessage: \"Enter your {providerName} Client Secret\",\n id: \"WoFO8+\",\n description: \"Placeholder for the OAuth client secret input\",\n values: { providerName: integration.name },\n });\n const scopeSearchPlaceholder = translate({\n defaultMessage: \"Search scopes\",\n id: \"fjuuw1\",\n description: \"Placeholder for the scope override search input\",\n });\n const scopeEmptyLabel = translate({\n defaultMessage: \"No scopes found\",\n id: \"OSyQvz\",\n description: \"Empty state for the scope override search\",\n });\n const configRequiredMessage = translate({\n defaultMessage: \"This field is required\",\n id: \"B2HvfC\",\n description:\n \"Validation error shown when a required configuration field is left empty\",\n });\n const configPatternMessage = translate({\n defaultMessage: \"Enter a valid value.\",\n id: \"2XWaGz\",\n description:\n \"Validation error shown when a configuration field value does not match the expected format\",\n });\n const secretRequiredMessage = translate({\n defaultMessage: \"Enter a new Client Secret to change the Client ID.\",\n id: \"O+5rxK\",\n description:\n \"Validation error when changing client id without a new secret\",\n });\n\n // Validate the integration-scope config fields against their descriptors.\n const validateConfigFields = (): boolean => {\n const nextErrors: Record<string, string | null> = {};\n let valid = true;\n for (const field of configFields) {\n const value = (configValues[field.key] ?? \"\").trim();\n if (field.required && !value) {\n nextErrors[field.key] = configRequiredMessage;\n valid = false;\n continue;\n }\n if (value && field.pattern) {\n let matches = true;\n try {\n matches = new RegExp(field.pattern).test(value);\n } catch {\n // Ignore invalid descriptor patterns client-side; the API validates.\n matches = true;\n }\n if (!matches) {\n nextErrors[field.key] = configPatternMessage;\n valid = false;\n continue;\n }\n }\n nextErrors[field.key] = null;\n }\n setConfigErrors(nextErrors);\n return valid;\n };\n\n // Secret descriptor keys are never round-tripped: if the API ever returned a\n // secret as a redacted mask, copying it into the replacement payload would\n // overwrite the stored value. (Secret config fields are rejected server-side\n // today, so this is defensive.)\n const secretConfigKeys = new Set(\n (integration.configFields ?? [])\n .filter((field) => field.secret)\n .map((field) => field.key),\n );\n\n const buildConfigPayload = () => {\n // Preserve existing config keys this UI doesn't render (e.g. installation\n // pins, deferred for now) so saving org settings never drops them.\n const config: Record<string, string> = {};\n for (const [key, value] of Object.entries(integration.config ?? {})) {\n if (typeof value === \"string\" && !secretConfigKeys.has(key)) {\n config[key] = value;\n }\n }\n // Overlay the edited integration-scope fields; an emptied field clears it.\n for (const field of configFields) {\n const value = (configValues[field.key] ?? \"\").trim();\n if (value) {\n config[field.key] = value;\n } else {\n delete config[field.key];\n }\n }\n return config;\n };\n\n // Validate organization credentials before advancing to the scopes step. The\n // secret field is pre-filled with a redacted placeholder for an existing\n // secret; if untouched, keep the stored secret. Since client_id and\n // client_secret travel together, changing the id requires a new secret.\n const validateCredentials = (): boolean => {\n setClientIdError(null);\n setClientSecretError(null);\n const trimmedId = clientId.trim();\n const secretUnchanged = hasCredentials && isRedactedSecret(clientSecret);\n let valid = true;\n if (!trimmedId) {\n setClientIdError(configRequiredMessage);\n valid = false;\n }\n if (secretUnchanged) {\n // Existing secret kept: only re-entry is required when the id changes.\n if (trimmedId && trimmedId !== (credentials.client_id ?? \"\")) {\n setClientSecretError(secretRequiredMessage);\n valid = false;\n }\n } else if (!clientSecret.trim()) {\n setClientSecretError(configRequiredMessage);\n valid = false;\n }\n return valid;\n };\n\n // API-key integrations have no OAuth credentials or scopes to configure;\n // the only override is the enabled toggle.\n const isApiKeyOnly = !(integration.authMethods ?? [\"oauth\"]).includes(\n \"oauth\",\n );\n\n const handleSubmit = () => {\n // Org-cred config fields were validated on the way to the scopes step; the\n // other surfaces submit directly from this view, so validate here.\n if (!isOrgCredentials && !validateConfigFields()) {\n return;\n }\n const configPayload =\n configFields.length > 0 ? { config: buildConfigPayload() } : undefined;\n\n if (isApiKeyOnly) {\n upsertOverride({ enabled, ...configPayload });\n return;\n }\n if (!isOrgCredentials) {\n // shared/custom: enable + (possibly narrowed) scopes only.\n upsertOverride({ enabled, scopes, ...configPayload });\n return;\n }\n // Credentials were validated on the way to the scopes step.\n const secretUnchanged = hasCredentials && isRedactedSecret(clientSecret);\n if (secretUnchanged) {\n upsertOverride({ enabled, scopes, ...configPayload });\n return;\n }\n upsertOverride({\n enabled,\n clientId: clientId.trim(),\n clientSecret: clientSecret.trim(),\n scopes,\n ...configPayload,\n });\n };\n\n const showCredentialsStep =\n !isApiKeyOnly && isOrgCredentials && step === \"credentials\";\n const showScopesStep =\n !isApiKeyOnly && (!isOrgCredentials || step === \"scopes\");\n\n // Disable Save when nothing differs from the seeded override state. Same\n // length + one-way subset means equal scope sets. Credential fields only\n // exist for organization credentials; a \"changed\" secret is a freshly typed\n // value (not the redacted placeholder), so focusing the field doesn't count.\n const initialScopes = integration.scopes ?? [];\n const scopesChanged =\n scopes.length !== initialScopes.length ||\n scopes.some((scope) => !initialScopes.includes(scope));\n const enabledChanged = enabled !== integration.enabled;\n const credentialsChanged =\n isOrgCredentials &&\n (clientId.trim() !== (credentials.client_id ?? \"\") ||\n (clientSecret.trim() !== \"\" && !isRedactedSecret(clientSecret)));\n const configChanged = configFields.some((field) => {\n const current = (configValues[field.key] ?? \"\").trim();\n // Trim both sides so an existing value with incidental surrounding\n // whitespace doesn't read as a pending change on open.\n const original =\n typeof integration.config?.[field.key] === \"string\"\n ? (integration.config[field.key] as string).trim()\n : \"\";\n return current !== original;\n });\n const hasPendingChanges =\n enabledChanged || scopesChanged || credentialsChanged || configChanged;\n\n // Gate the primary button on required fields being populated (matches the\n // ApiKeyDialog / change-email patterns). A redacted secret placeholder counts\n // as populated, so editing an existing config isn't blocked.\n const requiredConfigMissing = configFields.some(\n (field) => field.required && !(configValues[field.key] ?? \"\").trim(),\n );\n const credentialsMissing =\n isOrgCredentials && (!clientId.trim() || !clientSecret.trim());\n const nextDisabled = credentialsMissing || requiredConfigMissing;\n\n const enableToggle = (\n <Flex align=\"center\" gap=\"2\">\n <Switch\n checked={enabled}\n onCheckedChange={setEnabled}\n aria-label={enabledLabel}\n />\n <Text size=\"2\" weight=\"bold\">\n <Translation\n defaultMessage=\"Enable\"\n id=\"hkhtrS\"\n description=\"Label for the enable toggle\"\n />\n </Text>\n <Tooltip content={enableTooltip}>\n <InfoCircledIcon aria-hidden style={{ color: \"var(--gray-9)\" }} />\n </Tooltip>\n </Flex>\n );\n\n const configFieldsSection =\n configFields.length > 0\n ? configFields.map((field) => {\n const fieldId = `pipes-admin-config-${field.key}`;\n const errorId = `${fieldId}-error`;\n const descriptionId = `${fieldId}-description`;\n const error = configErrors[field.key];\n const Control = field.secret ? PasswordField : TextField;\n const describedBy =\n [field.description ? descriptionId : null, error ? errorId : null]\n .filter(Boolean)\n .join(\" \") || undefined;\n return (\n <Flex key={field.key} direction=\"column\" gap=\"1\">\n <Label htmlFor={fieldId}>{field.label}</Label>\n {field.description ? (\n <Text color=\"gray\" size=\"2\" id={descriptionId} mb=\"1\">\n {field.description}\n </Text>\n ) : null}\n <Control\n id={fieldId}\n value={configValues[field.key] ?? \"\"}\n placeholder={field.example}\n autoComplete=\"off\"\n required={field.required || undefined}\n aria-invalid={!!error || undefined}\n aria-describedby={describedBy}\n onChange={(event) => {\n setConfigValues((prev) => ({\n ...prev,\n [field.key]: event.target.value,\n }));\n if (error) {\n setConfigErrors((prev) => ({\n ...prev,\n [field.key]: null,\n }));\n }\n }}\n />\n {error ? (\n <Text color=\"red\" size=\"2\" id={errorId}>\n {error}\n </Text>\n ) : null}\n </Flex>\n );\n })\n : null;\n\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content>\n <Dialog.Title size=\"3\" weight=\"bold\">\n <Translation\n defaultMessage=\"Configure {integrationName} for your organization\"\n id=\"ep4eY4\"\n description=\"Title of the organization credentials dialog\"\n values={{ integrationName: integration.name }}\n />\n </Dialog.Title>\n {integration.description && (\n <Text size=\"2\" color=\"gray\" mb=\"4\" as=\"p\">\n {integration.description}\n </Text>\n )}\n\n {isError && (\n <Callout.Root my=\"3\" color=\"red\" role=\"alert\">\n <Callout.Text>\n <Translation\n defaultMessage=\"We couldn't save these settings. Please check the values and try again.\"\n id=\"zr1ZFZ\"\n description=\"Error message when saving organization settings fails\"\n />\n </Callout.Text>\n </Callout.Root>\n )}\n\n <Flex direction=\"column\" gap=\"4\" mt=\"2\">\n {isApiKeyOnly && (\n <>\n {enableToggle}\n {configFieldsSection}\n </>\n )}\n\n {showCredentialsStep && (\n <>\n {enableToggle}\n\n <RedirectUriField value={credentials.redirectUri} />\n\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"{providerName} Client ID\"\n id=\"Ew2Xew\"\n description=\"Label for the OAuth client ID input\"\n values={{ providerName: integration.name }}\n />\n </Label>\n <TextField\n value={clientId}\n autoComplete=\"off\"\n placeholder={clientIdPlaceholder}\n aria-invalid={!!clientIdError || undefined}\n aria-describedby={\n clientIdError ? \"pipes-admin-client-id-error\" : undefined\n }\n onChange={(event) => {\n setClientId(event.target.value);\n setClientIdError(null);\n }}\n />\n {clientIdError ? (\n <Text color=\"red\" size=\"2\" id=\"pipes-admin-client-id-error\">\n {clientIdError}\n </Text>\n ) : null}\n </Flex>\n\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"{providerName} Client Secret\"\n id=\"hZK/jR\"\n description=\"Label for the OAuth client secret input\"\n values={{ providerName: integration.name }}\n />\n </Label>\n <PasswordField\n value={clientSecret}\n autoComplete=\"off\"\n // The mask is what's shown, so render it as text: a password\n // input would re-bullet its last four digits away.\n type={isRedactedSecret(clientSecret) ? \"text\" : undefined}\n placeholder={clientSecretPlaceholder}\n aria-invalid={!!clientSecretError || undefined}\n aria-describedby={\n clientSecretError\n ? \"pipes-admin-client-secret-error\"\n : undefined\n }\n onChange={(event) => {\n setClientSecret(event.target.value);\n setClientSecretError(null);\n }}\n onFocus={() => {\n if (isRedactedSecret(clientSecret)) {\n setClientSecret(\"\");\n }\n }}\n onBlur={() => {\n if (clientSecret === \"\") {\n setClientSecret(redactedSecret);\n }\n }}\n />\n {clientSecretError ? (\n <Text\n color=\"red\"\n size=\"2\"\n id=\"pipes-admin-client-secret-error\"\n >\n {clientSecretError}\n </Text>\n ) : null}\n </Flex>\n\n {configFieldsSection}\n </>\n )}\n\n {showScopesStep && (\n <>\n {!isOrgCredentials && enableToggle}\n\n {!isOrgCredentials && configFieldsSection}\n\n {scopePool.length > 0 && (\n <Flex direction=\"column\" gap=\"2\">\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"Allowed scopes\"\n id=\"kNy90T\"\n description=\"Label for the scope override picker\"\n />\n </Label>\n <Text size=\"1\" color=\"gray\">\n <Translation\n defaultMessage=\"Selected scopes may be requested by your app. Users still authorize access during their own OAuth flow.\"\n id=\"E2nzZd\"\n description=\"Helper text for the scope override picker\"\n />\n </Text>\n </Flex>\n <SearchableSelectList\n options={scopePool}\n selected={scopes}\n getKey={(scope) => scope}\n getLabel={(scope) => scope}\n onChange={setScopes}\n searchPlaceholder={scopeSearchPlaceholder}\n emptyLabel={scopeEmptyLabel}\n />\n {removedDefaultScopes.length > 0 && (\n <Callout.Root color=\"amber\" role=\"status\">\n <Callout.Icon>\n <InfoCircledIcon />\n </Callout.Icon>\n <Callout.Text>\n <Translation\n defaultMessage=\"You removed developer-configured scopes: {scopes}. This may break this integration.\"\n id=\"1nCuju\"\n description=\"Warning naming the developer-configured scopes the admin removed\"\n values={{ scopes: removedDefaultScopes.join(\", \") }}\n />\n </Callout.Text>\n </Callout.Root>\n )}\n </Flex>\n )}\n </>\n )}\n </Flex>\n\n <Flex justify=\"end\" gap=\"3\" mt=\"5\">\n <Dialog.Close>\n <Button variant=\"secondary\">\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </Dialog.Close>\n {showCredentialsStep ? (\n <Button\n type=\"button\"\n disabled={nextDisabled}\n onClick={() => {\n // Run both so each surfaces its own errors before advancing.\n const credentialsValid = validateCredentials();\n const configValid = validateConfigFields();\n if (credentialsValid && configValid) {\n setStep(\"scopes\");\n }\n }}\n >\n <Translation\n defaultMessage=\"Next\"\n id=\"VlKGPx\"\n description=\"Button to advance to the scopes step\"\n />\n </Button>\n ) : (\n <>\n {isOrgCredentials && !isApiKeyOnly && (\n <Button\n variant=\"secondary\"\n type=\"button\"\n onClick={() => setStep(\"credentials\")}\n >\n <Translation\n defaultMessage=\"Back\"\n id=\"bnFIEs\"\n description=\"Button to return to the credentials step\"\n />\n </Button>\n )}\n <Button\n type=\"button\"\n disabled={\n isPending || !hasPendingChanges || requiredConfigMissing\n }\n loading={isPending}\n onClick={handleSubmit}\n >\n <Translation\n defaultMessage=\"Save\"\n id=\"MVKPfz\"\n description=\"Button to save organization settings\"\n />\n </Button>\n </>\n )}\n </Flex>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n\nfunction OrgCredentialsButton({\n integration,\n}: {\n integration: DataIntegrationConfiguration;\n}) {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n {open && (\n <OrgCredentialsDialog\n integration={integration}\n open={open}\n onOpenChange={setOpen}\n />\n )}\n <Button variant=\"secondary\" onClick={() => setOpen(true)}>\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n </Button>\n </>\n );\n}\n\n/**\n * Integrations the current viewer can manage at the organization level. Backed\n * by React Query, so calling it from multiple components doesn't trigger extra\n * fetches. Surfaces errors so the caller can render an error state rather than\n * a misleadingly empty list: a denied permission (`usePermissions` throws\n * `IncorrectPermissionsError`) and a failed configurations fetch both flow\n * through `error`.\n */\nfunction useManageableIntegrations(): {\n data: DataIntegrationConfiguration[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n} {\n const permission = usePermissions(\"widgets:pipes:manage\");\n const configurations = useDataIntegrationConfigurations({\n enabled: permission.isSuccess,\n });\n\n if (permission.isError) {\n return {\n data: [],\n isLoading: false,\n isError: true,\n error: permission.error,\n };\n }\n if (configurations.isError) {\n return {\n data: [],\n isLoading: false,\n isError: true,\n error: configurations.error,\n };\n }\n\n if (!permission.isSuccess || !configurations.isSuccess) {\n return {\n data: [],\n isLoading: permission.isLoading || configurations.isLoading,\n isError: false,\n error: null,\n };\n }\n\n // All manageable providers (not just organization-credential ones): the\n // tabbed \"Organization settings\" list covers every available provider.\n return {\n data: configurations.data,\n isLoading: false,\n isError: false,\n error: null,\n };\n}\n\n/**\n * Integrations the organization owns and shares with everyone, with the\n * organization's configuration and the actions the server allows on them.\n * Gated on the same manage permission as provider settings, but cached\n * separately so the two sections resolve independently. Like the member\n * widget, a failed attempt drops the section rather than leaving skeletons up\n * for the whole retry sequence.\n */\nfunction useOrganizationOwnedIntegrations(): {\n data: OrganizationDataIntegrationWithCapabilities[];\n isLoading: boolean;\n} {\n const permission = usePermissions(\"widgets:pipes:manage\");\n const organization = useOrganizationDataIntegrations({\n enabled: permission.isSuccess,\n });\n\n if (organization.isSuccess) {\n return { data: organization.data, isLoading: false };\n }\n return {\n data: [],\n isLoading:\n permission.isLoading ||\n (permission.isSuccess &&\n organization.isPending &&\n organization.failureCount === 0),\n };\n}\n\n/**\n * The organization-owned integration's configuration, in the shape the\n * credentials dialog edits. Provider metadata sits on the integration; the\n * organization's settings sit under `configuration`.\n */\nfunction toConfigurableIntegration(\n integration: OrganizationDataIntegration,\n): ConfigurableIntegration {\n const { configuration } = integration;\n return {\n id: integration.id,\n name: integration.name,\n description: integration.description,\n slug: integration.slug,\n authMethods: integration.authMethods ?? [\"oauth\"],\n enabled: configuration.enabled,\n scopes: configuration.scopes,\n defaultScopes: configuration.defaultScopes,\n availableScopes: configuration.availableScopes,\n credentials: configuration.credentials,\n configFields: configuration.configFields,\n config: configuration.config,\n };\n}\n\nfunction DisconnectSharedConnectionDialog({\n integrationName,\n installationId,\n open,\n onOpenChange,\n onSuccess,\n}: {\n integrationName: string;\n installationId: string;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** Called after the connection is removed. */\n onSuccess?: () => void;\n}) {\n const queryClient = useQueryClient();\n const {\n mutate: deleteInstallation,\n error,\n reset,\n isPending,\n } = useClientGraphqlMutation({\n mutationFn: (sdk, id: string) =>\n sdk.DeleteOrganizationDataProviderConnection({ id }),\n onSuccess: () => {\n onOpenChange(false);\n queryClient.invalidateQueries({\n queryKey: organizationDataIntegrationsQueryKey,\n });\n queryClient.invalidateQueries({\n queryKey: sharedDataConnectionsQueryKey,\n });\n onSuccess?.();\n },\n });\n\n useEffect(() => {\n if (open) {\n reset();\n }\n }, [open, reset]);\n\n return (\n <AlertDialog.Root open={open} onOpenChange={onOpenChange}>\n <AlertDialog.Content style={{ width: \"80vw\", maxWidth: \"520px\" }}>\n <AlertDialog.Title>\n <Translation\n defaultMessage=\"Disconnect shared connection\"\n id=\"Xy5Xq1\"\n description=\"Dialog title for disconnecting an organization-owned connection\"\n />\n </AlertDialog.Title>\n {error && (\n <Callout.Root my=\"5\" color=\"red\" role=\"alert\">\n <Callout.Text>\n <Translation\n defaultMessage=\"An error occurred while disconnecting this connection. Please refresh the page and try again.\"\n id=\"q0Yb2E\"\n description=\"Error message when disconnecting an organization-owned connection fails\"\n />\n </Callout.Text>\n </Callout.Root>\n )}\n <AlertDialog.Description>\n <Translation\n defaultMessage=\"Are you sure you want to disconnect the {integrationName} account your organization shares with everyone? Members will lose access to it.\"\n id=\"mS2v8L\"\n description=\"Confirmation message for disconnecting an organization-owned connection\"\n values={{\n integrationName: (\n <Text as=\"span\" weight=\"bold\">\n {integrationName}\n </Text>\n ),\n }}\n />\n </AlertDialog.Description>\n <Flex gap=\"3\" justify=\"end\" mt=\"5\">\n <AlertDialog.Cancel>\n <Button variant=\"secondary\">\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </AlertDialog.Cancel>\n <Button\n variant=\"destructive\"\n disabled={isPending}\n loading={isPending}\n onClick={() => deleteInstallation(installationId)}\n >\n <Translation\n defaultMessage=\"Disconnect\"\n id=\"vMVXQh\"\n description=\"Button to disconnect an account\"\n />\n </Button>\n </Flex>\n </AlertDialog.Content>\n </AlertDialog.Root>\n );\n}\n\ntype SharedConnectionAuthMethod = DataInstallation[\"auth_method\"];\n\ninterface AdminRowAction {\n key: string;\n label: React.ReactNode;\n onSelect: () => void;\n /** Rendered as the row's single button; everything else goes in the overflow. */\n promoted?: boolean;\n destructive?: boolean;\n external?: boolean;\n}\n\n/**\n * The sectioned admin row grammar: status inline beside the name, the\n * connector description as the only second line, at most one promoted action\n * and the rest behind an overflow menu.\n *\n * A `nested` row is one connection under its provider's row: no icon, named by\n * `name` in regular weight, and indented to the provider's text column.\n */\nfunction AdminRow({\n integration,\n name = integration.name,\n nested = false,\n status,\n description = nested ? null : integration.description,\n dimmed = false,\n actions,\n}: {\n integration: DataIntegrationConfiguration | OrganizationDataIntegration;\n name?: string;\n nested?: boolean;\n status?: React.ReactNode;\n description?: React.ReactNode;\n dimmed?: boolean;\n actions: AdminRowAction[];\n}) {\n const translate = useTranslation();\n const actionsTitle = translate({\n defaultMessage: \"More actions\",\n id: \"eR4kYp\",\n description: \"Accessible title for a provider row's overflow actions menu\",\n });\n const promoted = actions.find((action) => action.promoted);\n const overflow = actions.filter((action) => action !== promoted);\n\n return (\n <CardList.Item nested={nested}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"4\">\n <Flex gap=\"4\" align=\"center\" style={dimmed ? { opacity: 0.6 } : {}}>\n {!nested && (\n <IconPanel color=\"panel\">\n <DataIntegrationIcon integration={integration} size=\"2\" />\n </IconPanel>\n )}\n <Flex direction=\"column\" gap=\"1\">\n <Flex align=\"center\" gap=\"2\" wrap=\"wrap\">\n <Text\n size=\"2\"\n weight={nested ? \"regular\" : \"bold\"}\n color={dimmed ? \"gray\" : undefined}\n >\n {name}\n </Text>\n {status}\n </Flex>\n {description && (\n <Text size=\"2\" color=\"gray\">\n {description}\n </Text>\n )}\n </Flex>\n </Flex>\n {(promoted || overflow.length > 0) && (\n <Flex align=\"center\" gap=\"2\" flexShrink=\"0\">\n {promoted && (\n <Button\n variant={promoted.destructive ? \"destructive\" : \"secondary\"}\n onClick={promoted.onSelect}\n >\n {promoted.label}\n </Button>\n )}\n {overflow.length > 0 && (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger>\n <IconButton title={actionsTitle}>\n <DotsHorizontalIcon />\n </IconButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">\n {overflow.map((action) => (\n <DropdownMenu.Item\n key={action.key}\n variant={action.destructive ? \"destructive\" : undefined}\n onClick={action.onSelect}\n >\n {action.external ? (\n <Flex\n gap=\"4\"\n width=\"100%\"\n justify=\"between\"\n align=\"center\"\n >\n {action.label}\n <ExternalLinkIcon aria-hidden />\n </Flex>\n ) : (\n action.label\n )}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n )}\n </Flex>\n )}\n </Flex>\n </CardList.Item>\n );\n}\n\nfunction ConnectedViaStatus({\n method,\n}: {\n method: SharedConnectionAuthMethod;\n}) {\n return (\n <Status state=\"success\">\n {method === \"api_key\" ? (\n <Translation\n defaultMessage=\"Connected via API key\"\n id=\"jQLTNe\"\n description=\"Status text for a connection established with an API key\"\n />\n ) : method === \"client_credentials\" ? (\n <Translation\n defaultMessage=\"Connected via client credentials\"\n id=\"hQKIrx\"\n description=\"Status text for a connection established with client credentials\"\n />\n ) : (\n <Translation\n defaultMessage=\"Connected via OAuth\"\n id=\"pJcK_M\"\n description=\"Status text for a connection established with OAuth\"\n />\n )}\n </Status>\n );\n}\n\nfunction DisabledForOrganizationStatus() {\n return (\n <Status state=\"neutral\">\n <Translation\n defaultMessage=\"Disabled for your organization\"\n id=\"uH2sNc\"\n description=\"Status for a provider the organization has disabled\"\n />\n </Status>\n );\n}\n\n/**\n * How the organization connects an account to a provider: OAuth when the\n * server reports its credentials configured (mirroring how it grants\n * canConnect), then client credentials, then an API key. Adding another\n * account uses the same method.\n */\nfunction getOrganizationConnectMethod(\n integration: OrganizationDataIntegration,\n): SharedConnectionAuthMethod {\n const authMethods = integration.authMethods ?? [];\n return authMethods.includes(\"oauth\") && integration.configuration.configured\n ? \"oauth\"\n : authMethods.includes(\"client_credentials\")\n ? \"client_credentials\"\n : authMethods.includes(\"api_key\")\n ? \"api_key\"\n : \"oauth\";\n}\n\n/** The order the organization's add action picks a method in. */\nconst ORGANIZATION_ADD_METHOD_ORDER: SharedConnectionAuthMethod[] = [\n \"oauth\",\n \"client_credentials\",\n \"api_key\",\n];\n\n/**\n * How the organization can connect another account right now, per the server:\n *\n * - an explicit `Add`, with the first method `addConnectionMethods` allows;\n * - otherwise, while accounts exist but the compatibility slot is empty\n * (`canConnect` stays true at the cap or with additional creation off), an\n * untargeted Connect that refills that slot;\n * - otherwise nothing, and the row offers no add at all.\n */\nfunction getOrganizationAddAction(\n integration: OrganizationDataIntegrationWithCapabilities,\n): {\n method: SharedConnectionAuthMethod;\n target: ConnectionTarget | undefined;\n} | null {\n const { capabilities } = integration;\n const addMethod = capabilities.canAddConnection\n ? ORGANIZATION_ADD_METHOD_ORDER.find((method) =>\n capabilities.addConnectionMethods.includes(method),\n )\n : undefined;\n if (addMethod) {\n return { method: addMethod, target: ADD_CONNECTION };\n }\n if (capabilities.canConnect && integration.connected_accounts.length > 0) {\n return {\n method: getOrganizationConnectMethod(integration),\n target: undefined,\n };\n }\n return null;\n}\n\nfunction DisabledStatus({\n configuration,\n}: {\n configuration: OrganizationDataIntegration[\"configuration\"];\n}) {\n return configuration.disabledSource === \"developer\" ? (\n <Status state=\"neutral\">\n <Translation\n defaultMessage=\"Disabled by developer\"\n id=\"k2Jd9W\"\n description=\"Status text for a shared connection the developer has disabled\"\n />\n </Status>\n ) : (\n <DisabledForOrganizationStatus />\n );\n}\n\n/**\n * One shared account's state. While the provider is disabled nothing about\n * the account matters: a row standing for a single account says the provider\n * is disabled, and a nested row says nothing, leaving that to its provider\n * row rather than reporting an account state that contradicts it.\n */\nfunction SharedConnectionAdminStatus({\n integration,\n account,\n method,\n nested,\n connectionFailed,\n}: {\n integration: OrganizationDataIntegrationWithCapabilities;\n account: DataInstallation | undefined;\n method: SharedConnectionAuthMethod;\n nested: boolean;\n /** The last OAuth handoff on the organization's behalf failed. */\n connectionFailed: boolean;\n}) {\n const { configuration } = integration;\n\n if (!configuration.enabled) {\n return nested ? null : <DisabledStatus configuration={configuration} />;\n }\n if (connectionFailed) {\n return <ConnectionFailedStatus />;\n }\n if (!account) {\n return null;\n }\n return account.state === \"connected\" ? (\n <ConnectedViaStatus method={method} />\n ) : (\n <Status state=\"warning\">\n <Translation\n defaultMessage=\"Needs attention\"\n id=\"pL5wGd\"\n description=\"Status for a shared connection that stopped working and needs the admin to fix it\"\n />\n </Status>\n );\n}\n\n/**\n * An organization-owned connection row. Actions are offered strictly per the\n * server's `capabilities`: Configure edits the organization's own credentials\n * and scopes; Connect / Reauthorize run the OAuth flow on the organization's\n * behalf (or open the credential dialog for api_key / client_credentials\n * providers); Disconnect removes the shared account. The fix for a broken\n * connection and the first Connect are promoted; everything else overflows.\n *\n * `account` is the one shared account the row stands for — undefined before\n * anything is connected. A `nested` row is one of several accounts under its\n * provider's row, which then owns the provider-level Configure.\n */\nfunction SharedConnectionAccountRow({\n integration,\n account,\n nested = false,\n onAddConnection,\n onRepairStart,\n}: {\n integration: OrganizationDataIntegrationWithCapabilities;\n account: ConnectionWithCapabilities | undefined;\n nested?: boolean;\n /**\n * Starts another account from the provider row that owns the add (and\n * shows its result); a row standing alone runs its own.\n */\n onAddConnection?: (\n method: SharedConnectionAuthMethod,\n target: ConnectionTarget | undefined,\n ) => void;\n /** Lets the provider row retire a failed add once a repair starts. */\n onRepairStart?: () => void;\n}) {\n const [configureOpen, setConfigureOpen] = useState(false);\n const [connectOpen, setConnectOpen] = useState(false);\n const [renameOpen, setRenameOpen] = useState(false);\n const [disconnectOpen, setDisconnectOpen] = useState(false);\n // Connect / Reauthorize on the organization's behalf, targeting this\n // account (or, before one exists, the compatibility slot).\n const { openAuthorizeUrl, connectionError, clearConnectionError } =\n useOpenDataIntegrationAuthorizeUrl(\n integration,\n \"organization\",\n getConnectionTarget(account),\n );\n const addConnection = useAddConnectionFlow(integration, \"organization\");\n // A row standing alone also shows how its own add went.\n const connectionFailed =\n connectionError !== null ||\n (onAddConnection === undefined && addConnection.connectionError !== null);\n // The row (and its provider) reports the latest attempt: starting a repair\n // retires a failed add's status, and starting an add retires a failed\n // repair's, so a success never sits under a stale failure.\n const retireAddFailure = onRepairStart ?? addConnection.clearConnectionError;\n const startRepair = (config?: Record<string, string>) => {\n retireAddFailure();\n return openAuthorizeUrl(config);\n };\n // A saved API key or client credentials leaves nothing failed to report.\n const clearFailures = () => {\n clearConnectionError();\n retireAddFailure();\n };\n const startAdd = (\n method: SharedConnectionAuthMethod,\n target: ConnectionTarget | undefined,\n ) => {\n clearConnectionError();\n (onAddConnection ?? addConnection.start)(method, target);\n };\n const { capabilities, configuration } = integration;\n // A connected account fixes the method; otherwise it's the one Connect uses.\n const method: SharedConnectionAuthMethod =\n account?.auth_method ?? getOrganizationConnectMethod(integration);\n const needsAttention = account !== undefined && account.state !== \"connected\";\n const label = account\n ? getConnectionLabel(integration.name, account)\n : integration.name;\n\n // An account's repair follows its own capabilities. The provider-level flags\n // only describe the compatibility slot, so they're a fallback for a server\n // that doesn't report per-connection capabilities.\n const repairCapabilities = account?.capabilities ?? capabilities;\n const showConnect = account\n ? method === \"oauth\"\n ? repairCapabilities.canReauthorize\n : repairCapabilities.canUpdateCredentials\n : capabilities.canConnect;\n const showDisconnect = account !== undefined && capabilities.canDisconnect;\n // A developer-disabled provider leaves the organization nothing to manage\n // but removing the account, and naming waits for multiple connections.\n const showRename =\n account !== undefined &&\n configuration.disabledSource !== \"developer\" &&\n canRenameConnections(integration);\n // A broken account's menu stays on fixing it (D21), so adding another is\n // only offered beside a working one.\n const addAction =\n account !== undefined && !needsAttention\n ? getOrganizationAddAction(integration)\n : null;\n\n const connectLabel = !account ? (\n <Translation\n defaultMessage=\"Connect\"\n id=\"quvdFp\"\n description=\"Button to connect an integration\"\n />\n ) : method === \"api_key\" ? (\n needsAttention ? (\n <Translation\n defaultMessage=\"Update API key\"\n id=\"E7pMj/\"\n description=\"Menu option to update the API key for a needs-reauthorization installation\"\n />\n ) : (\n <Translation\n defaultMessage=\"Rotate API key\"\n id=\"kR7pQz\"\n description=\"Menu option to rotate an organization-owned API key\"\n />\n )\n ) : method === \"client_credentials\" ? (\n <Translation\n defaultMessage=\"Update client credentials\"\n id=\"vB8dLq\"\n description=\"Menu option to update an organization-owned integration's client credentials\"\n />\n ) : (\n <Translation\n defaultMessage=\"Reauthorize\"\n id=\"0E29F1\"\n description=\"Menu option to reauthorize an integration\"\n trailingSpace\n />\n );\n\n const actions: AdminRowAction[] = [];\n if (showConnect) {\n actions.push({\n key: \"connect\",\n label: connectLabel,\n onSelect: () => setConnectOpen(true),\n promoted: !account || needsAttention,\n external: method === \"oauth\",\n });\n }\n if (capabilities.canConfigure && !nested) {\n actions.push({\n key: \"configure\",\n label: (\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n ),\n onSelect: () => setConfigureOpen(true),\n promoted: !account && !showConnect && configuration.enabled,\n });\n }\n if (showRename) {\n actions.push({\n key: \"rename\",\n label: <RenameMenuLabel />,\n onSelect: () => setRenameOpen(true),\n });\n }\n if (addAction) {\n actions.push({\n key: \"connect-another\",\n label: <ConnectAnotherAccountMenuLabel />,\n onSelect: () => startAdd(addAction.method, addAction.target),\n external: addAction.method === \"oauth\",\n });\n }\n if (showDisconnect) {\n actions.push({\n key: \"disconnect\",\n label: (\n <Translation\n defaultMessage=\"Disconnect\"\n id=\"vMVXQh\"\n description=\"Button to disconnect an account\"\n />\n ),\n onSelect: () => setDisconnectOpen(true),\n destructive: true,\n });\n }\n\n const needsOrganizationCredentials =\n configuration.enabled &&\n !account &&\n configuration.credentials.credentialsType === \"organization\" &&\n !configuration.configured;\n\n return (\n <>\n {addConnection.dialogs}\n {configureOpen && (\n <OrgCredentialsDialog\n integration={toConfigurableIntegration(integration)}\n owner=\"organization\"\n open={configureOpen}\n onOpenChange={setConfigureOpen}\n />\n )}\n {method === \"api_key\" ? (\n connectOpen && (\n <ApiKeyDialog\n integration={integration}\n installation={account}\n owner=\"organization\"\n open={connectOpen}\n onOpenChange={setConnectOpen}\n onSuccess={clearFailures}\n />\n )\n ) : method === \"client_credentials\" ? (\n connectOpen && (\n <ClientCredentialsDialog\n integration={integration}\n installation={account}\n fields={getUnpinnedInstallationFields(integration)}\n owner=\"organization\"\n open={connectOpen}\n onOpenChange={setConnectOpen}\n onSuccess={clearFailures}\n />\n )\n ) : (\n <ConnectDialog\n integration={integration}\n fields={getUnpinnedInstallationFields(integration)}\n open={connectOpen}\n onOpenChange={setConnectOpen}\n onConnect={startRepair}\n />\n )}\n {account && renameOpen && (\n <RenameConnectionDialog\n integrationName={integration.name}\n installation={account}\n owner=\"organization\"\n open={renameOpen}\n onOpenChange={setRenameOpen}\n />\n )}\n {account && (\n <DisconnectSharedConnectionDialog\n integrationName={label}\n installationId={account.id}\n open={disconnectOpen}\n onOpenChange={setDisconnectOpen}\n onSuccess={clearConnectionError}\n />\n )}\n <AdminRow\n integration={integration}\n name={nested ? label : integration.name}\n nested={nested}\n status={\n <SharedConnectionAdminStatus\n integration={integration}\n account={account}\n method={method}\n nested={nested}\n connectionFailed={connectionFailed}\n />\n }\n description={\n nested ? null : needsOrganizationCredentials ? (\n <Translation\n defaultMessage=\"Enter your organization's OAuth client to make this connectable.\"\n id=\"rQ8mVz\"\n description=\"Second line of a shared connection row whose organization OAuth credentials have not been entered yet\"\n />\n ) : (\n integration.description\n )\n }\n dimmed={!configuration.enabled}\n actions={actions}\n />\n </>\n );\n}\n\n/**\n * A provider the organization shares several accounts of: the provider row\n * counts them and owns the provider-level actions (adding another account,\n * Configure), and each account follows as its own nested row.\n */\nfunction SharedConnectionAdminGroup({\n integration,\n}: {\n integration: OrganizationDataIntegrationWithCapabilities;\n}) {\n const [configureOpen, setConfigureOpen] = useState(false);\n const addConnection = useAddConnectionFlow(integration, \"organization\");\n const { capabilities, configuration } = integration;\n const addAction = getOrganizationAddAction(integration);\n\n const actions: AdminRowAction[] = [];\n if (addAction) {\n actions.push({\n key: \"add\",\n label: <AddConnectionButtonLabel />,\n onSelect: () => addConnection.start(addAction.method, addAction.target),\n promoted: true,\n external: addAction.method === \"oauth\",\n });\n }\n if (capabilities.canConfigure) {\n actions.push({\n key: \"configure\",\n label: (\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n ),\n onSelect: () => setConfigureOpen(true),\n promoted: !configuration.enabled,\n });\n }\n\n return (\n <>\n {addConnection.dialogs}\n {configureOpen && (\n <OrgCredentialsDialog\n integration={toConfigurableIntegration(integration)}\n owner=\"organization\"\n open={configureOpen}\n onOpenChange={setConfigureOpen}\n />\n )}\n <AdminRow\n integration={integration}\n status={\n !configuration.enabled ? (\n <DisabledStatus configuration={configuration} />\n ) : addConnection.connectionError ? (\n <ConnectionFailedStatus />\n ) : (\n <ConnectionCountStatus\n count={integration.connected_accounts.length}\n />\n )\n }\n dimmed={!configuration.enabled}\n actions={actions}\n />\n {integration.connected_accounts.map((account) => (\n <SharedConnectionAccountRow\n key={account.id}\n integration={integration}\n account={account}\n nested\n onAddConnection={addConnection.start}\n onRepairStart={addConnection.clearConnectionError}\n />\n ))}\n </>\n );\n}\n\n/** An organization-owned provider: one row, or a group once it has several. */\nfunction SharedConnectionAdminItem({\n integration,\n}: {\n integration: OrganizationDataIntegrationWithCapabilities;\n}) {\n return integration.connected_accounts.length > 1 ? (\n <SharedConnectionAdminGroup integration={integration} />\n ) : (\n <SharedConnectionAccountRow\n integration={integration}\n account={integration.connected_accounts[0]}\n />\n );\n}\n\n/**\n * A provider settings row in the sectioned view: the policy governing what\n * members may connect on their own. Configure is the only action; the status\n * only speaks up when something keeps members from connecting.\n */\nfunction ProviderSettingsItem({\n integration,\n}: {\n integration: DataIntegrationConfiguration;\n}) {\n const [configureOpen, setConfigureOpen] = useState(false);\n const available = isIntegrationAvailable(integration);\n const dimmed = !integration.enabled;\n\n return (\n <>\n {configureOpen && (\n <OrgCredentialsDialog\n integration={integration}\n open={configureOpen}\n onOpenChange={setConfigureOpen}\n />\n )}\n <AdminRow\n integration={integration}\n status={\n !integration.enabled ? (\n <DisabledForOrganizationStatus />\n ) : !available ? (\n <Status state=\"neutral\">\n <Translation\n defaultMessage=\"Not configured\"\n id=\"gV7bXe\"\n description=\"Status for a provider whose organization credentials have not been entered yet\"\n />\n </Status>\n ) : null\n }\n dimmed={dimmed}\n actions={[\n {\n key: \"configure\",\n label: (\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n ),\n onSelect: () => setConfigureOpen(true),\n promoted: true,\n },\n ]}\n />\n </>\n );\n}\n\n/**\n * Returns whether an integration is currently available to members of the\n * organization. All credential types require the effective `enabled` state to\n * be on; organization credentials additionally require a stored credential\n * pair.\n */\nfunction isIntegrationAvailable(\n integration: DataIntegrationConfiguration,\n): boolean {\n // API-key integrations have no org-level OAuth credentials; availability is\n // governed solely by the enabled toggle.\n if (!(integration.authMethods ?? [\"oauth\"]).includes(\"oauth\")) {\n return integration.enabled;\n }\n const credentials = integration.credentials;\n // `enabled` is the effective state (org override when present, else the\n // developer default). Organization credentials additionally require a stored\n // credential pair before the provider can be connected.\n if (credentials.credentialsType === \"organization\") {\n return credentials.hasCredentials && integration.enabled;\n }\n return integration.enabled;\n}\n\nfunction getWidgetRootDomProps(\n state: WidgetRootState,\n domProps: WidgetRootDomProps,\n) {\n return getWidgetDomProps({\n ...domProps,\n isWidgetRoot: true,\n widgetId: \"pipes-admin\",\n widgetState: state,\n });\n}\n\ninterface PipesAdminProps extends WidgetRootDomProps {\n integrations: DataIntegrationConfiguration[];\n}\n\n/**\n * IT-admin organization configuration list: every manageable provider with its\n * availability status and a Configure action (credentials + scope overrides).\n * Presentational — the client wrapper fetches via `useManageableIntegrations`.\n */\nconst PipesAdmin: React.FC<PipesAdminProps> = ({\n integrations,\n ...domProps\n}) => {\n return (\n <CardList.Root {...getWidgetRootDomProps(\"resolved\", domProps)}>\n <PipesAdminItems integrations={integrations} />\n </CardList.Root>\n );\n};\n\n/** Provider settings rows: availability status and a Configure action each. */\nfunction PipesAdminItems({\n integrations,\n}: {\n integrations: DataIntegrationConfiguration[];\n}) {\n return (\n <>\n {integrations.map((integration) => {\n const available = isIntegrationAvailable(integration);\n\n return (\n <CardList.Item key={integration.id}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"2\">\n <Flex gap=\"4\" align=\"center\">\n <IconPanel color=\"panel\">\n <DataIntegrationIcon integration={integration} size=\"2\" />\n </IconPanel>\n <Text size=\"2\" weight=\"bold\">\n {integration.name}\n </Text>\n </Flex>\n <Flex align=\"center\" gap=\"4\">\n <Status state={available ? \"success\" : \"neutral\"}>\n {available ? (\n <Translation\n defaultMessage=\"Available\"\n id=\"SytbAY\"\n description=\"Status when an org connection is available to members\"\n />\n ) : (\n <Translation\n defaultMessage=\"Disabled\"\n id=\"O4SGtP\"\n description=\"Status when an org connection is disabled\"\n />\n )}\n </Status>\n <OrgCredentialsButton integration={integration} />\n </Flex>\n </Flex>\n </CardList.Item>\n );\n })}\n </>\n );\n}\n\ninterface PipesAdminSectionsProps extends PipesAdminProps {\n /**\n * Organization-owned integrations, as returned by the organization\n * endpoint. Empty while loading, when the organization owns nothing, and\n * when the request failed.\n */\n sharedIntegrations: OrganizationDataIntegrationWithCapabilities[];\n /** Renders the shared section as skeleton rows while it resolves. */\n isSharedLoading?: boolean;\n /** Names the owning organization in the shared section's description. */\n organizationName?: string;\n}\n\n/**\n * The sectioned administrator experience: the connections the organization\n * owns and shares with everyone, then the provider settings governing what\n * members may connect on their own. The two lanes come from different\n * endpoints and are never merged — the same provider can legitimately appear\n * in both, once as the organization's own account and once as the policy for\n * members' personal accounts.\n *\n * The shared section is omitted when the organization owns nothing or the\n * request failed, leaving provider settings on their own.\n */\nconst PipesAdminSections: React.FC<PipesAdminSectionsProps> = ({\n integrations,\n sharedIntegrations,\n isSharedLoading,\n organizationName,\n ...domProps\n}) => {\n return (\n <Flex\n direction=\"column\"\n gap=\"5\"\n {...getWidgetRootDomProps(\"resolved\", domProps)}\n >\n {(isSharedLoading || sharedIntegrations.length > 0) && (\n <PipesSection\n title={\n <Translation\n defaultMessage=\"Shared connections\"\n id=\"Fcd-bK\"\n description=\"Heading for the section listing connections the organization owns\"\n />\n }\n description={\n organizationName ? (\n <Translation\n defaultMessage=\"Accounts {organizationName} owns and shares with everyone.\"\n id=\"7U8P0v\"\n description=\"Description of the shared connections section, naming the organization\"\n values={{ organizationName }}\n />\n ) : (\n <Translation\n defaultMessage=\"Accounts your organization owns and shares with everyone.\"\n id=\"72FEZi\"\n description=\"Description of the shared connections section when the organization name is unknown\"\n />\n )\n }\n >\n <CardList.Root>\n {isSharedLoading ? (\n <PipesAdminSkeletonItems count={2} />\n ) : (\n sharedIntegrations.map((integration) => (\n <SharedConnectionAdminItem\n key={integration.id}\n integration={integration}\n />\n ))\n )}\n </CardList.Root>\n </PipesSection>\n )}\n <PipesSection\n title={\n <Translation\n defaultMessage=\"Provider settings\"\n id=\"Zq7Lr3\"\n description=\"Heading for the section of provider settings governing members' own connections\"\n />\n }\n description={\n <Translation\n defaultMessage=\"What members of this organization can connect to, and with which scopes.\"\n id=\"c3Vb8N\"\n description=\"Description of the provider settings section\"\n />\n }\n >\n <CardList.Root>\n {integrations.length > 0 ? (\n integrations.map((integration) => (\n <ProviderSettingsItem\n key={integration.id}\n integration={integration}\n />\n ))\n ) : (\n <PipesEmptyItem isFiltered={false} />\n )}\n </CardList.Root>\n </PipesSection>\n </Flex>\n );\n};\n\nfunction PipesAdminSkeletonItems({ count }: { count: number }) {\n return Array.from({ length: count }).map((_, index) => (\n <CardList.Item key={index}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"2\">\n <Flex gap=\"4\" align=\"center\">\n <Skeleton>\n <IconPanel>\n <ProviderIcon provider=\"google\" size=\"2\" />\n </IconPanel>\n </Skeleton>\n <Skeleton>\n <Text size=\"2\" weight=\"bold\">\n <Translation\n defaultMessage=\"Google Drive\"\n id=\"g11OOu\"\n description=\"Placeholder text for loading state\"\n />\n </Text>\n </Skeleton>\n </Flex>\n <Skeleton>\n <Button variant=\"secondary\" disabled>\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n </Button>\n </Skeleton>\n </Flex>\n </CardList.Item>\n ));\n}\n\ninterface PipesAdminLoadingProps extends WidgetRootDomProps {\n count: number;\n}\n\nconst PipesAdminLoading: React.FC<PipesAdminLoadingProps> = ({\n count,\n ...domProps\n}) => {\n return (\n <CardList.Root {...getWidgetRootDomProps(\"loading\", domProps)}>\n <PipesAdminSkeletonItems count={count} />\n </CardList.Root>\n );\n};\n\ninterface PipesAdminErrorProps extends WidgetRootDomProps {\n error: unknown;\n}\n\nconst PipesAdminError: React.FC<PipesAdminErrorProps> = ({\n error,\n ...domProps\n}) => {\n return (\n <Card size=\"2\" {...getWidgetRootDomProps(\"error\", domProps)}>\n <GenericError error={error} />\n </Card>\n );\n};\n\nexport type {\n PipesAdminProps,\n PipesAdminSectionsProps,\n PipesAdminLoadingProps,\n PipesAdminErrorProps,\n};\nexport {\n PipesAdmin,\n PipesAdminSections,\n PipesAdminLoading,\n PipesAdminError,\n useManageableIntegrations,\n useOrganizationOwnedIntegrations,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA,SAAS,iBAAiB,EAAE,SAA4B;CAGtD,MAAM,YAFY,eAEA,CAAA,CAAU;EAC1B,gBAAgB;EAChB,IAAI;EACJ,aAAa;CACf,CAAC;CAED,OACE,qBAAC,MAAD;EAAM,WAAU;EAAS,KAAI;EAA7B,UAAA,CACE,oBAAC,OAAD,EAAA,UACE,oBAAC,aAAD;GACE,gBAAe;GACf,IAAG;GACH,aAAY;EACb,CAAA,EACI,CAAA,GACP,oBAAC,UAAD;GAAiB;GAAO,OAAO;EAAY,CAAA,CACvC;;AAEV;AAgCA,SAAS,gBACP,QAC4C;CAC5C,OAAO,SACH,OAAO,QAAQ,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,YAAY;EAAE;EAAM;CAAM,EAAE,IAC/D;AACN;AAMA,SAAS,oBACP,QAIA;CACA,QAAQ,OAAO,YAAf;EACE,KAAK,6BACH,OAAO;EACT,KAAK,6BACH,MAAM,IAAI,SAAS;GACjB,SAAS,OAAO;GAChB,QAAQ;GACR,WAAW;EACb,CAAC;CACL;AACF;;;;;;;AAQA,SAAS,uBACP,OACA,aACA,WAKA;CACA,MAAM,cAAc,eAAe;CACnC,MAAM,WAAW,aAAmC;EAClD,gBAA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BAAuD,EAC3D,OACA,GAAG,eACC;CACJ,OACE,oBAACY,MAAD;EAAe,GAAI,sBAAsB,WAAW,QAAQ;EAC1D,UAAA,oBAAC,yBAAD,EAAgC,MAAQ,CAAA;CAC3B,CAAA;AAEnB;AAMA,MAAM,mBAAmD,EACvD,OACA,GAAG,eACC;CACJ,OACE,oBAAC,MAAD;EAAM,MAAK;EAAI,GAAI,sBAAsB,SAAS,QAAQ;EACxD,UAAA,oBAAC,cAAD,EAAqB,MAAQ,CAAA;CACzB,CAAA;AAEV"}
|
|
1
|
+
{"version":3,"file":"pipes-admin.js","names":["TextField","Dialog.Root","Dialog.Content","Dialog.Title","Dialog.Close","Button","AlertDialog.Root","AlertDialog.Content","AlertDialog.Title","AlertDialog.Description","AlertDialog.Cancel","CardList.Item","DropdownMenu.Root","DropdownMenu.Trigger","IconButton","DropdownMenu.Content","DropdownMenu.Item","CardList.Root","Skeleton"],"sources":["../../../src/lib/pipes-admin.tsx"],"sourcesContent":["\"use client\";\nimport { Callout, Card, Flex, Switch, Text, Tooltip } from \"@radix-ui/themes\";\nimport * as React from \"react\";\nimport { useEffect, useState } from \"react\";\nimport {\n DotsHorizontalIcon,\n ExternalLinkIcon,\n InfoCircledIcon,\n} from \"@radix-ui/react-icons\";\nimport * as CardList from \"./card-list.js\";\nimport { CopyText } from \"./copy-text.js\";\nimport { DataIntegrationIcon } from \"./data-integration-icon.js\";\nimport { ProviderIcon } from \"./provider-icon.js\";\nimport {\n AlertDialog,\n Button,\n Dialog,\n DropdownMenu,\n IconButton,\n Label,\n PasswordField,\n Skeleton,\n TextField,\n} from \"./elements.js\";\nimport { IconPanel } from \"./icon-panel.js\";\nimport { SearchableSelectList } from \"./searchable-select-list.js\";\nimport { Status } from \"./status.js\";\nimport type {\n DataInstallation,\n DataIntegrationConfiguration,\n OrganizationDataIntegration,\n} from \"./api/types.js\";\nimport {\n type ConnectionWithCapabilities,\n dataIntegrationConfigurationsQueryKey,\n myDataIntegrationsQueryKeys,\n organizationDataIntegrationsQueryKey,\n type OrganizationDataIntegrationWithCapabilities,\n sharedDataConnectionsQueryKey,\n useDataIntegrationConfigurations,\n useOrganizationDataIntegrations,\n} from \"./api/pipes.js\";\nimport { useClientGraphqlMutation } from \"../api/client-graphql/hooks.js\";\nimport type {\n DataProviderConfigEntryInput,\n SetDataProviderConfigurationMutation,\n SetOrganizationDataProviderConfigurationMutation,\n} from \"../api/client-graphql/generated.js\";\nimport { ApiError } from \"../api/errors.js\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { GenericError } from \"./generic-error.js\";\nimport {\n ApiKeyDialog,\n ClientCredentialsDialog,\n ConnectDialog,\n ConnectionFailedStatus,\n ConnectionOwner,\n PipesEmptyItem,\n PipesSection,\n getUnpinnedInstallationFields,\n useAddConnectionFlow,\n useOpenDataIntegrationAuthorizeUrl,\n} from \"./pipes.js\";\nimport {\n ADD_CONNECTION,\n AddConnectionButtonLabel,\n ConnectAnotherAccountMenuLabel,\n ConnectionCountStatus,\n type ConnectionTarget,\n canRenameConnections,\n getConnectionLabel,\n getConnectionTarget,\n RenameConnectionDialog,\n RenameMenuLabel,\n} from \"./pipes-connections.js\";\nimport { usePermissions } from \"./use-permissions.js\";\nimport { getWidgetDomProps } from \"./utils/widget-dom-props.js\";\nimport { WidgetRootDomProps, WidgetRootState } from \"./widget-types.js\";\nimport { Translation } from \"./i18n/translation.js\";\nimport { useTranslation } from \"./i18n/use-translation.js\";\nimport { buildRedactedSecret, isRedactedSecret } from \"./redacted-secret.js\";\n\nfunction RedirectUriField({ value }: { value: string }) {\n const translate = useTranslation();\n\n const copyLabel = translate({\n defaultMessage: \"Copy redirect URI\",\n id: \"xqfxBC\",\n description: \"Accessible label for the copy redirect URI button\",\n });\n\n return (\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"Redirect URI\"\n id=\"lgEaUA\"\n description=\"Label for the read-only OAuth redirect URI field\"\n />\n </Label>\n <CopyText value={value} label={copyLabel} />\n </Flex>\n );\n}\n\n/**\n * The configuration surface the credentials dialog edits. Structurally shared\n * by the user-policy configuration (`/configurations`) and the organization\n * configuration nested in an organization-owned integration (`/organization`).\n */\ntype ConfigurableIntegration = Pick<\n DataIntegrationConfiguration,\n | \"id\"\n | \"name\"\n | \"description\"\n | \"slug\"\n | \"authMethods\"\n | \"enabled\"\n | \"scopes\"\n | \"defaultScopes\"\n | \"availableScopes\"\n | \"credentials\"\n | \"configFields\"\n | \"config\"\n>;\n\n/** The fields the credentials dialog writes; absent fields are left as they are. */\ninterface ConfigurationPayload {\n enabled: boolean;\n scopes?: string[];\n clientId?: string;\n clientSecret?: string;\n config?: Record<string, string>;\n}\n\nfunction toConfigEntries(\n config: Record<string, string> | undefined,\n): DataProviderConfigEntryInput[] | undefined {\n return config\n ? Object.entries(config).map(([name, value]) => ({ name, value }))\n : undefined;\n}\n\ntype SetConfigurationResult =\n | SetDataProviderConfigurationMutation[\"setDataProviderConfiguration\"]\n | SetOrganizationDataProviderConfigurationMutation[\"setOrganizationDataProviderConfiguration\"];\n\nfunction unwrapConfiguration(\n result: SetConfigurationResult,\n): Extract<\n SetConfigurationResult,\n { __typename: \"DataProviderConfiguration\" }\n> {\n switch (result.__typename) {\n case \"DataProviderConfiguration\":\n return result;\n case \"DataProviderConfigInvalid\":\n throw new ApiError({\n message: result.message,\n status: 400,\n queryType: \"mutation\",\n });\n }\n}\n\n/**\n * Saves a configuration for its owner. The user-policy write governs what\n * members may connect on their own, so it refreshes the member list; the\n * organization write changes the organization's own connection, so it\n * refreshes the shared lanes instead.\n */\nfunction useUpsertConfiguration(\n owner: ConnectionOwner,\n integration: Pick<ConfigurableIntegration, \"id\" | \"slug\">,\n onSuccess: () => void,\n): {\n mutate: (payload: ConfigurationPayload) => void;\n isError: boolean;\n isPending: boolean;\n} {\n const queryClient = useQueryClient();\n const toInput = (payload: ConfigurationPayload) => ({\n dataProviderId: integration.id,\n enabled: payload.enabled,\n scopes: payload.scopes,\n clientId: payload.clientId,\n clientSecret: payload.clientSecret,\n config: toConfigEntries(payload.config),\n });\n const user = useClientGraphqlMutation({\n mutationFn: async (sdk, payload: ConfigurationPayload) => {\n const { setDataProviderConfiguration } =\n await sdk.SetDataProviderConfiguration({ input: toInput(payload) });\n return unwrapConfiguration(setDataProviderConfiguration);\n },\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: dataIntegrationConfigurationsQueryKey,\n });\n // Saving a configuration can change which providers/scopes are available\n // in the user connection list, so refresh that list too.\n for (const queryKey of myDataIntegrationsQueryKeys) {\n queryClient.invalidateQueries({ queryKey });\n }\n onSuccess();\n },\n });\n const organization = useClientGraphqlMutation({\n mutationFn: async (sdk, payload: ConfigurationPayload) => {\n const { setOrganizationDataProviderConfiguration } =\n await sdk.SetOrganizationDataProviderConfiguration({\n input: toInput(payload),\n });\n return unwrapConfiguration(setOrganizationDataProviderConfiguration);\n },\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: organizationDataIntegrationsQueryKey,\n });\n queryClient.invalidateQueries({\n queryKey: sharedDataConnectionsQueryKey,\n });\n onSuccess();\n },\n });\n\n if (owner === \"organization\") {\n return {\n mutate: organization.mutate,\n isError: organization.isError,\n isPending: organization.isPending,\n };\n }\n return {\n mutate: user.mutate,\n isError: user.isError,\n isPending: user.isPending,\n };\n}\n\nfunction OrgCredentialsDialog({\n integration,\n open,\n onOpenChange,\n owner = \"user\",\n}: {\n integration: ConfigurableIntegration;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n owner?: ConnectionOwner;\n}) {\n const credentials = integration.credentials;\n const hasCredentials = credentials.hasCredentials;\n const isOrgCredentials = credentials.credentialsType === \"organization\";\n\n // Seeded once on mount; the dialog is only mounted while open (see\n // OrgCredentialsButton), so each open starts from the current configuration.\n // `enabled`/`scopes` on the configuration are the effective values\n // (the org override when present, else the developer default).\n const redactedSecret = buildRedactedSecret(credentials.redactedClientSecret);\n const [clientId, setClientId] = useState(credentials.client_id ?? \"\");\n const [clientSecret, setClientSecret] = useState(redactedSecret);\n const [enabled, setEnabled] = useState(integration.enabled);\n const [scopes, setScopes] = useState<string[]>(integration.scopes ?? []);\n // Organization credentials are entered first, then scopes (two-step wizard);\n // shared/custom providers only narrow scopes, so they get a single view.\n const [step, setStep] = useState<\"credentials\" | \"scopes\">(\"credentials\");\n const [clientIdError, setClientIdError] = useState<string | null>(null);\n const [clientSecretError, setClientSecretError] = useState<string | null>(\n null,\n );\n\n // Provider-declared `integration`-scope config fields are configured here, but\n // only for `organization` credentials: the API rejects per-org config for\n // shared/custom creds (those are set on the root integration instead). The\n // `installation`-scope pins are deferred from this UI for now (they're\n // collected in the connect modal instead). `secret` fields are excluded: they\n // are rejected server-side, and seeding a masked secret can't be round-tripped\n // safely under the config-replace write.\n const configFields = isOrgCredentials\n ? (integration.configFields ?? [])\n .filter((field) => field.scope === \"integration\" && !field.secret)\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0))\n : [];\n const [configValues, setConfigValues] = useState<Record<string, string>>(\n () => {\n const seed: Record<string, string> = {};\n for (const field of integration.configFields ?? []) {\n if (field.scope !== \"integration\") continue;\n // Never seed a `secret` field from the response: the value may be\n // redacted, and re-submitting the mask would clobber the stored secret.\n if (field.secret) continue;\n const value = integration.config?.[field.key];\n if (typeof value === \"string\") {\n seed[field.key] = value;\n }\n }\n return seed;\n },\n );\n const [configErrors, setConfigErrors] = useState<\n Record<string, string | null>\n >({});\n\n const {\n mutate: upsertOverride,\n isError,\n isPending,\n } = useUpsertConfiguration(owner, integration, () => onOpenChange(false));\n\n const translate = useTranslation();\n\n // Selectable scope pool: organization credentials can request the provider's\n // full catalog; shared/custom can only (re)select within the developer's\n // configured defaults. The current effective selection is always included so\n // it stays toggleable, and the defaults are included so a previously removed\n // default can be re-added.\n const defaultScopes = integration.defaultScopes;\n const effectiveScopes = integration.scopes ?? [];\n const scopePool = isOrgCredentials\n ? [\n ...new Set([\n ...effectiveScopes,\n ...defaultScopes,\n ...integration.availableScopes,\n ]),\n ]\n : [...new Set([...effectiveScopes, ...defaultScopes])];\n // Developer-configured scopes the admin has unselected — named in the warning.\n const removedDefaultScopes = defaultScopes.filter(\n (scope) => !scopes.includes(scope),\n );\n\n const enabledLabel = translate({\n defaultMessage: \"Enable\",\n id: \"hkhtrS\",\n description: \"Label for the enable toggle\",\n });\n const enableTooltip = translate({\n defaultMessage:\n \"Allow this integration to be connected in your organization.\",\n id: \"7ItyG3\",\n description: \"Tooltip explaining the enable toggle\",\n });\n\n const clientIdPlaceholder = translate({\n defaultMessage: \"Enter your {providerName} Client ID\",\n id: \"pAUj4e\",\n description: \"Placeholder for the OAuth client ID input\",\n values: { providerName: integration.name },\n });\n const clientSecretPlaceholder = translate({\n defaultMessage: \"Enter your {providerName} Client Secret\",\n id: \"WoFO8+\",\n description: \"Placeholder for the OAuth client secret input\",\n values: { providerName: integration.name },\n });\n const scopeSearchPlaceholder = translate({\n defaultMessage: \"Search scopes\",\n id: \"fjuuw1\",\n description: \"Placeholder for the scope override search input\",\n });\n const scopeEmptyLabel = translate({\n defaultMessage: \"No scopes found\",\n id: \"OSyQvz\",\n description: \"Empty state for the scope override search\",\n });\n const configRequiredMessage = translate({\n defaultMessage: \"This field is required\",\n id: \"B2HvfC\",\n description:\n \"Validation error shown when a required configuration field is left empty\",\n });\n const configPatternMessage = translate({\n defaultMessage: \"Enter a valid value.\",\n id: \"2XWaGz\",\n description:\n \"Validation error shown when a configuration field value does not match the expected format\",\n });\n const secretRequiredMessage = translate({\n defaultMessage: \"Enter a new Client Secret to change the Client ID.\",\n id: \"O+5rxK\",\n description:\n \"Validation error when changing client id without a new secret\",\n });\n\n // Validate the integration-scope config fields against their descriptors.\n const validateConfigFields = (): boolean => {\n const nextErrors: Record<string, string | null> = {};\n let valid = true;\n for (const field of configFields) {\n const value = (configValues[field.key] ?? \"\").trim();\n if (field.required && !value) {\n nextErrors[field.key] = configRequiredMessage;\n valid = false;\n continue;\n }\n if (value && field.pattern) {\n let matches = true;\n try {\n matches = new RegExp(field.pattern).test(value);\n } catch {\n // Ignore invalid descriptor patterns client-side; the API validates.\n matches = true;\n }\n if (!matches) {\n nextErrors[field.key] = configPatternMessage;\n valid = false;\n continue;\n }\n }\n nextErrors[field.key] = null;\n }\n setConfigErrors(nextErrors);\n return valid;\n };\n\n // Secret descriptor keys are never round-tripped: if the API ever returned a\n // secret as a redacted mask, copying it into the replacement payload would\n // overwrite the stored value. (Secret config fields are rejected server-side\n // today, so this is defensive.)\n const secretConfigKeys = new Set(\n (integration.configFields ?? [])\n .filter((field) => field.secret)\n .map((field) => field.key),\n );\n\n const buildConfigPayload = () => {\n // Preserve existing config keys this UI doesn't render (e.g. installation\n // pins, deferred for now) so saving org settings never drops them.\n const config: Record<string, string> = {};\n for (const [key, value] of Object.entries(integration.config ?? {})) {\n if (typeof value === \"string\" && !secretConfigKeys.has(key)) {\n config[key] = value;\n }\n }\n // Overlay the edited integration-scope fields; an emptied field clears it.\n for (const field of configFields) {\n const value = (configValues[field.key] ?? \"\").trim();\n if (value) {\n config[field.key] = value;\n } else {\n delete config[field.key];\n }\n }\n return config;\n };\n\n // Validate organization credentials before advancing to the scopes step. The\n // secret field is pre-filled with a redacted placeholder for an existing\n // secret; if untouched, keep the stored secret. Since client_id and\n // client_secret travel together, changing the id requires a new secret.\n const validateCredentials = (): boolean => {\n setClientIdError(null);\n setClientSecretError(null);\n const trimmedId = clientId.trim();\n const secretUnchanged = hasCredentials && isRedactedSecret(clientSecret);\n let valid = true;\n if (!trimmedId) {\n setClientIdError(configRequiredMessage);\n valid = false;\n }\n if (secretUnchanged) {\n // Existing secret kept: only re-entry is required when the id changes.\n if (trimmedId && trimmedId !== (credentials.client_id ?? \"\")) {\n setClientSecretError(secretRequiredMessage);\n valid = false;\n }\n } else if (!clientSecret.trim()) {\n setClientSecretError(configRequiredMessage);\n valid = false;\n }\n return valid;\n };\n\n // API-key integrations have no OAuth credentials or scopes to configure;\n // the only override is the enabled toggle.\n const isApiKeyOnly = !(integration.authMethods ?? [\"oauth\"]).includes(\n \"oauth\",\n );\n\n const handleSubmit = () => {\n // Org-cred config fields were validated on the way to the scopes step; the\n // other surfaces submit directly from this view, so validate here.\n if (!isOrgCredentials && !validateConfigFields()) {\n return;\n }\n const configPayload =\n configFields.length > 0 ? { config: buildConfigPayload() } : undefined;\n\n if (isApiKeyOnly) {\n upsertOverride({ enabled, ...configPayload });\n return;\n }\n if (!isOrgCredentials) {\n // shared/custom: enable + (possibly narrowed) scopes only.\n upsertOverride({ enabled, scopes, ...configPayload });\n return;\n }\n // Credentials were validated on the way to the scopes step.\n const secretUnchanged = hasCredentials && isRedactedSecret(clientSecret);\n if (secretUnchanged) {\n upsertOverride({ enabled, scopes, ...configPayload });\n return;\n }\n upsertOverride({\n enabled,\n clientId: clientId.trim(),\n clientSecret: clientSecret.trim(),\n scopes,\n ...configPayload,\n });\n };\n\n const showCredentialsStep =\n !isApiKeyOnly && isOrgCredentials && step === \"credentials\";\n const showScopesStep =\n !isApiKeyOnly && (!isOrgCredentials || step === \"scopes\");\n\n // Disable Save when nothing differs from the seeded override state. Same\n // length + one-way subset means equal scope sets. Credential fields only\n // exist for organization credentials; a \"changed\" secret is a freshly typed\n // value (not the redacted placeholder), so focusing the field doesn't count.\n const initialScopes = integration.scopes ?? [];\n const scopesChanged =\n scopes.length !== initialScopes.length ||\n scopes.some((scope) => !initialScopes.includes(scope));\n const enabledChanged = enabled !== integration.enabled;\n const credentialsChanged =\n isOrgCredentials &&\n (clientId.trim() !== (credentials.client_id ?? \"\") ||\n (clientSecret.trim() !== \"\" && !isRedactedSecret(clientSecret)));\n const configChanged = configFields.some((field) => {\n const current = (configValues[field.key] ?? \"\").trim();\n // Trim both sides so an existing value with incidental surrounding\n // whitespace doesn't read as a pending change on open.\n const original =\n typeof integration.config?.[field.key] === \"string\"\n ? (integration.config[field.key] as string).trim()\n : \"\";\n return current !== original;\n });\n const hasPendingChanges =\n enabledChanged || scopesChanged || credentialsChanged || configChanged;\n\n // Gate the primary button on required fields being populated (matches the\n // ApiKeyDialog / change-email patterns). A redacted secret placeholder counts\n // as populated, so editing an existing config isn't blocked.\n const requiredConfigMissing = configFields.some(\n (field) => field.required && !(configValues[field.key] ?? \"\").trim(),\n );\n const credentialsMissing =\n isOrgCredentials && (!clientId.trim() || !clientSecret.trim());\n const nextDisabled = credentialsMissing || requiredConfigMissing;\n\n const enableToggle = (\n <Flex align=\"center\" gap=\"2\">\n <Switch\n checked={enabled}\n onCheckedChange={setEnabled}\n aria-label={enabledLabel}\n />\n <Text size=\"2\" weight=\"bold\">\n <Translation\n defaultMessage=\"Enable\"\n id=\"hkhtrS\"\n description=\"Label for the enable toggle\"\n />\n </Text>\n <Tooltip content={enableTooltip}>\n <InfoCircledIcon aria-hidden style={{ color: \"var(--gray-9)\" }} />\n </Tooltip>\n </Flex>\n );\n\n const configFieldsSection =\n configFields.length > 0\n ? configFields.map((field) => {\n const fieldId = `pipes-admin-config-${field.key}`;\n const errorId = `${fieldId}-error`;\n const descriptionId = `${fieldId}-description`;\n const error = configErrors[field.key];\n const Control = field.secret ? PasswordField : TextField;\n const describedBy =\n [field.description ? descriptionId : null, error ? errorId : null]\n .filter(Boolean)\n .join(\" \") || undefined;\n return (\n <Flex key={field.key} direction=\"column\" gap=\"1\">\n <Label htmlFor={fieldId}>{field.label}</Label>\n {field.description ? (\n <Text color=\"gray\" size=\"2\" id={descriptionId} mb=\"1\">\n {field.description}\n </Text>\n ) : null}\n <Control\n id={fieldId}\n value={configValues[field.key] ?? \"\"}\n placeholder={field.example}\n autoComplete=\"off\"\n required={field.required || undefined}\n aria-invalid={!!error || undefined}\n aria-describedby={describedBy}\n onChange={(event) => {\n setConfigValues((prev) => ({\n ...prev,\n [field.key]: event.target.value,\n }));\n if (error) {\n setConfigErrors((prev) => ({\n ...prev,\n [field.key]: null,\n }));\n }\n }}\n />\n {error ? (\n <Text color=\"red\" size=\"2\" id={errorId}>\n {error}\n </Text>\n ) : null}\n </Flex>\n );\n })\n : null;\n\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content>\n <Dialog.Title size=\"3\" weight=\"bold\">\n <Translation\n defaultMessage=\"Configure {integrationName} for your organization\"\n id=\"ep4eY4\"\n description=\"Title of the organization credentials dialog\"\n values={{ integrationName: integration.name }}\n />\n </Dialog.Title>\n {integration.description && (\n <Text size=\"2\" color=\"gray\" mb=\"4\" as=\"p\">\n {integration.description}\n </Text>\n )}\n\n {isError && (\n <Callout.Root my=\"3\" color=\"red\" role=\"alert\">\n <Callout.Text>\n <Translation\n defaultMessage=\"We couldn't save these settings. Please check the values and try again.\"\n id=\"zr1ZFZ\"\n description=\"Error message when saving organization settings fails\"\n />\n </Callout.Text>\n </Callout.Root>\n )}\n\n <Flex direction=\"column\" gap=\"4\" mt=\"2\">\n {isApiKeyOnly && (\n <>\n {enableToggle}\n {configFieldsSection}\n </>\n )}\n\n {showCredentialsStep && (\n <>\n {enableToggle}\n\n <RedirectUriField value={credentials.redirectUri} />\n\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"{providerName} Client ID\"\n id=\"Ew2Xew\"\n description=\"Label for the OAuth client ID input\"\n values={{ providerName: integration.name }}\n />\n </Label>\n <TextField\n value={clientId}\n autoComplete=\"off\"\n placeholder={clientIdPlaceholder}\n aria-invalid={!!clientIdError || undefined}\n aria-describedby={\n clientIdError ? \"pipes-admin-client-id-error\" : undefined\n }\n onChange={(event) => {\n setClientId(event.target.value);\n setClientIdError(null);\n }}\n />\n {clientIdError ? (\n <Text color=\"red\" size=\"2\" id=\"pipes-admin-client-id-error\">\n {clientIdError}\n </Text>\n ) : null}\n </Flex>\n\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"{providerName} Client Secret\"\n id=\"hZK/jR\"\n description=\"Label for the OAuth client secret input\"\n values={{ providerName: integration.name }}\n />\n </Label>\n <PasswordField\n value={clientSecret}\n autoComplete=\"off\"\n // The mask is what's shown, so render it as text: a password\n // input would re-bullet its last four digits away.\n type={isRedactedSecret(clientSecret) ? \"text\" : undefined}\n placeholder={clientSecretPlaceholder}\n aria-invalid={!!clientSecretError || undefined}\n aria-describedby={\n clientSecretError\n ? \"pipes-admin-client-secret-error\"\n : undefined\n }\n onChange={(event) => {\n setClientSecret(event.target.value);\n setClientSecretError(null);\n }}\n onFocus={() => {\n if (isRedactedSecret(clientSecret)) {\n setClientSecret(\"\");\n }\n }}\n onBlur={() => {\n if (clientSecret === \"\") {\n setClientSecret(redactedSecret);\n }\n }}\n />\n {clientSecretError ? (\n <Text\n color=\"red\"\n size=\"2\"\n id=\"pipes-admin-client-secret-error\"\n >\n {clientSecretError}\n </Text>\n ) : null}\n </Flex>\n\n {configFieldsSection}\n </>\n )}\n\n {showScopesStep && (\n <>\n {!isOrgCredentials && enableToggle}\n\n {!isOrgCredentials && configFieldsSection}\n\n {scopePool.length > 0 && (\n <Flex direction=\"column\" gap=\"2\">\n <Flex direction=\"column\" gap=\"1\">\n <Label>\n <Translation\n defaultMessage=\"Allowed scopes\"\n id=\"kNy90T\"\n description=\"Label for the scope override picker\"\n />\n </Label>\n <Text size=\"1\" color=\"gray\">\n <Translation\n defaultMessage=\"Selected scopes may be requested by your app. Users still authorize access during their own OAuth flow.\"\n id=\"E2nzZd\"\n description=\"Helper text for the scope override picker\"\n />\n </Text>\n </Flex>\n <SearchableSelectList\n options={scopePool}\n selected={scopes}\n getKey={(scope) => scope}\n getLabel={(scope) => scope}\n onChange={setScopes}\n searchPlaceholder={scopeSearchPlaceholder}\n emptyLabel={scopeEmptyLabel}\n />\n {removedDefaultScopes.length > 0 && (\n <Callout.Root color=\"amber\" role=\"status\">\n <Callout.Icon>\n <InfoCircledIcon />\n </Callout.Icon>\n <Callout.Text>\n <Translation\n defaultMessage=\"You removed developer-configured scopes: {scopes}. This may break this integration.\"\n id=\"1nCuju\"\n description=\"Warning naming the developer-configured scopes the admin removed\"\n values={{ scopes: removedDefaultScopes.join(\", \") }}\n />\n </Callout.Text>\n </Callout.Root>\n )}\n </Flex>\n )}\n </>\n )}\n </Flex>\n\n <Flex justify=\"end\" gap=\"3\" mt=\"5\">\n <Dialog.Close>\n <Button variant=\"secondary\">\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </Dialog.Close>\n {showCredentialsStep ? (\n <Button\n type=\"button\"\n disabled={nextDisabled}\n onClick={() => {\n // Run both so each surfaces its own errors before advancing.\n const credentialsValid = validateCredentials();\n const configValid = validateConfigFields();\n if (credentialsValid && configValid) {\n setStep(\"scopes\");\n }\n }}\n >\n <Translation\n defaultMessage=\"Next\"\n id=\"VlKGPx\"\n description=\"Button to advance to the scopes step\"\n />\n </Button>\n ) : (\n <>\n {isOrgCredentials && !isApiKeyOnly && (\n <Button\n variant=\"secondary\"\n type=\"button\"\n onClick={() => setStep(\"credentials\")}\n >\n <Translation\n defaultMessage=\"Back\"\n id=\"bnFIEs\"\n description=\"Button to return to the credentials step\"\n />\n </Button>\n )}\n <Button\n type=\"button\"\n disabled={\n isPending || !hasPendingChanges || requiredConfigMissing\n }\n loading={isPending}\n onClick={handleSubmit}\n >\n <Translation\n defaultMessage=\"Save\"\n id=\"MVKPfz\"\n description=\"Button to save organization settings\"\n />\n </Button>\n </>\n )}\n </Flex>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n\nfunction OrgCredentialsButton({\n integration,\n}: {\n integration: DataIntegrationConfiguration;\n}) {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n {open && (\n <OrgCredentialsDialog\n integration={integration}\n open={open}\n onOpenChange={setOpen}\n />\n )}\n <Button variant=\"secondary\" onClick={() => setOpen(true)}>\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n </Button>\n </>\n );\n}\n\n/**\n * Integrations the current viewer can manage at the organization level. Backed\n * by React Query, so calling it from multiple components doesn't trigger extra\n * fetches. Surfaces errors so the caller can render an error state rather than\n * a misleadingly empty list: a denied permission (`usePermissions` throws\n * `IncorrectPermissionsError`) and a failed configurations fetch both flow\n * through `error`.\n */\nfunction useManageableIntegrations(): {\n data: DataIntegrationConfiguration[];\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n} {\n const permission = usePermissions(\"widgets:pipes:manage\");\n const configurations = useDataIntegrationConfigurations({\n enabled: permission.isSuccess,\n });\n\n if (permission.isError) {\n return {\n data: [],\n isLoading: false,\n isError: true,\n error: permission.error,\n };\n }\n if (configurations.isError) {\n return {\n data: [],\n isLoading: false,\n isError: true,\n error: configurations.error,\n };\n }\n\n if (!permission.isSuccess || !configurations.isSuccess) {\n return {\n data: [],\n isLoading: permission.isLoading || configurations.isLoading,\n isError: false,\n error: null,\n };\n }\n\n // All manageable providers (not just organization-credential ones): the\n // tabbed \"Organization settings\" list covers every available provider.\n return {\n data: configurations.data,\n isLoading: false,\n isError: false,\n error: null,\n };\n}\n\n/**\n * Integrations the organization owns and shares with everyone, with the\n * organization's configuration and the actions the server allows on them.\n * Gated on the same manage permission as provider settings, but cached\n * separately so the two sections resolve independently. Like the member\n * widget, a failed attempt drops the section rather than leaving skeletons up\n * for the whole retry sequence.\n */\nfunction useOrganizationOwnedIntegrations(): {\n data: OrganizationDataIntegrationWithCapabilities[];\n isLoading: boolean;\n} {\n const permission = usePermissions(\"widgets:pipes:manage\");\n const organization = useOrganizationDataIntegrations({\n enabled: permission.isSuccess,\n });\n\n if (organization.isSuccess) {\n return { data: organization.data, isLoading: false };\n }\n return {\n data: [],\n isLoading:\n permission.isLoading ||\n (permission.isSuccess &&\n organization.isPending &&\n organization.failureCount === 0),\n };\n}\n\n/**\n * The organization-owned integration's configuration, in the shape the\n * credentials dialog edits. Provider metadata sits on the integration; the\n * organization's settings sit under `configuration`.\n */\nfunction toConfigurableIntegration(\n integration: OrganizationDataIntegration,\n): ConfigurableIntegration {\n const { configuration } = integration;\n return {\n id: integration.id,\n name: integration.name,\n description: integration.description,\n slug: integration.slug,\n authMethods: integration.authMethods ?? [\"oauth\"],\n enabled: configuration.enabled,\n scopes: configuration.scopes,\n defaultScopes: configuration.defaultScopes,\n availableScopes: configuration.availableScopes,\n credentials: configuration.credentials,\n configFields: configuration.configFields,\n config: configuration.config,\n };\n}\n\nfunction DisconnectSharedConnectionDialog({\n integrationName,\n installationId,\n open,\n onOpenChange,\n onSuccess,\n}: {\n integrationName: string;\n installationId: string;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** Called after the connection is removed. */\n onSuccess?: () => void;\n}) {\n const queryClient = useQueryClient();\n const {\n mutate: deleteInstallation,\n error,\n reset,\n isPending,\n } = useClientGraphqlMutation({\n mutationFn: (sdk, id: string) =>\n sdk.DeleteOrganizationDataProviderConnection({ id }),\n onSuccess: () => {\n onOpenChange(false);\n queryClient.invalidateQueries({\n queryKey: organizationDataIntegrationsQueryKey,\n });\n queryClient.invalidateQueries({\n queryKey: sharedDataConnectionsQueryKey,\n });\n onSuccess?.();\n },\n });\n\n useEffect(() => {\n if (open) {\n reset();\n }\n }, [open, reset]);\n\n return (\n <AlertDialog.Root open={open} onOpenChange={onOpenChange}>\n <AlertDialog.Content style={{ width: \"80vw\", maxWidth: \"520px\" }}>\n <AlertDialog.Title>\n <Translation\n defaultMessage=\"Disconnect shared connection\"\n id=\"Xy5Xq1\"\n description=\"Dialog title for disconnecting an organization-owned connection\"\n />\n </AlertDialog.Title>\n {error && (\n <Callout.Root my=\"5\" color=\"red\" role=\"alert\">\n <Callout.Text>\n <Translation\n defaultMessage=\"An error occurred while disconnecting this connection. Please refresh the page and try again.\"\n id=\"q0Yb2E\"\n description=\"Error message when disconnecting an organization-owned connection fails\"\n />\n </Callout.Text>\n </Callout.Root>\n )}\n <AlertDialog.Description>\n <Translation\n defaultMessage=\"Are you sure you want to disconnect the {integrationName} account your organization shares with everyone? Members will lose access to it.\"\n id=\"mS2v8L\"\n description=\"Confirmation message for disconnecting an organization-owned connection\"\n values={{\n integrationName: (\n <Text as=\"span\" weight=\"bold\">\n {integrationName}\n </Text>\n ),\n }}\n />\n </AlertDialog.Description>\n <Flex gap=\"3\" justify=\"end\" mt=\"5\">\n <AlertDialog.Cancel>\n <Button variant=\"secondary\">\n <Translation\n defaultMessage=\"Cancel\"\n id=\"hHNj31\"\n description=\"Cancel button text\"\n />\n </Button>\n </AlertDialog.Cancel>\n <Button\n variant=\"destructive\"\n disabled={isPending}\n loading={isPending}\n onClick={() => deleteInstallation(installationId)}\n >\n <Translation\n defaultMessage=\"Disconnect\"\n id=\"vMVXQh\"\n description=\"Button to disconnect an account\"\n />\n </Button>\n </Flex>\n </AlertDialog.Content>\n </AlertDialog.Root>\n );\n}\n\ntype SharedConnectionAuthMethod = DataInstallation[\"auth_method\"];\n\ninterface AdminRowAction {\n key: string;\n label: React.ReactNode;\n onSelect: () => void;\n /** Rendered as the row's single button; everything else goes in the overflow. */\n promoted?: boolean;\n destructive?: boolean;\n external?: boolean;\n}\n\n/**\n * The sectioned admin row grammar: status inline beside the name, the\n * connector description as the only second line, at most one promoted action\n * and the rest behind an overflow menu.\n *\n * A `nested` row is one connection under its provider's row: no icon, named by\n * `name` in regular weight, and indented to the provider's text column.\n */\nfunction AdminRow({\n integration,\n name = integration.name,\n nested = false,\n status,\n description = nested ? null : integration.description,\n dimmed = false,\n actions,\n}: {\n integration: DataIntegrationConfiguration | OrganizationDataIntegration;\n name?: string;\n nested?: boolean;\n status?: React.ReactNode;\n description?: React.ReactNode;\n dimmed?: boolean;\n actions: AdminRowAction[];\n}) {\n const translate = useTranslation();\n const actionsTitle = translate({\n defaultMessage: \"More actions\",\n id: \"eR4kYp\",\n description: \"Accessible title for a provider row's overflow actions menu\",\n });\n const promoted = actions.find((action) => action.promoted);\n const overflow = actions.filter((action) => action !== promoted);\n\n return (\n <CardList.Item nested={nested}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"4\">\n <Flex gap=\"4\" align=\"center\" style={dimmed ? { opacity: 0.6 } : {}}>\n {!nested && (\n <IconPanel color=\"panel\">\n <DataIntegrationIcon integration={integration} size=\"2\" />\n </IconPanel>\n )}\n <Flex direction=\"column\" gap=\"1\">\n <Flex align=\"center\" gap=\"2\" wrap=\"wrap\">\n <Text\n size=\"2\"\n weight={nested ? \"regular\" : \"bold\"}\n color={dimmed ? \"gray\" : undefined}\n >\n {name}\n </Text>\n {status}\n </Flex>\n {description && (\n <Text size=\"2\" color=\"gray\">\n {description}\n </Text>\n )}\n </Flex>\n </Flex>\n {(promoted || overflow.length > 0) && (\n <Flex align=\"center\" gap=\"2\" flexShrink=\"0\">\n {promoted && (\n <Button\n variant={promoted.destructive ? \"destructive\" : \"secondary\"}\n onClick={promoted.onSelect}\n >\n {promoted.label}\n </Button>\n )}\n {overflow.length > 0 && (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger>\n <IconButton title={actionsTitle}>\n <DotsHorizontalIcon />\n </IconButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">\n {overflow.map((action) => (\n <DropdownMenu.Item\n key={action.key}\n variant={action.destructive ? \"destructive\" : undefined}\n onClick={action.onSelect}\n >\n {action.external ? (\n <Flex\n gap=\"4\"\n width=\"100%\"\n justify=\"between\"\n align=\"center\"\n >\n {action.label}\n <ExternalLinkIcon aria-hidden />\n </Flex>\n ) : (\n action.label\n )}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n )}\n </Flex>\n )}\n </Flex>\n </CardList.Item>\n );\n}\n\nfunction ConnectedViaStatus({\n method,\n}: {\n method: SharedConnectionAuthMethod;\n}) {\n return (\n <Status state=\"success\">\n {method === \"api_key\" ? (\n <Translation\n defaultMessage=\"Connected via API key\"\n id=\"jQLTNe\"\n description=\"Status text for a connection established with an API key\"\n />\n ) : method === \"client_credentials\" ? (\n <Translation\n defaultMessage=\"Connected via client credentials\"\n id=\"hQKIrx\"\n description=\"Status text for a connection established with client credentials\"\n />\n ) : (\n <Translation\n defaultMessage=\"Connected via OAuth\"\n id=\"pJcK_M\"\n description=\"Status text for a connection established with OAuth\"\n />\n )}\n </Status>\n );\n}\n\nfunction DisabledForOrganizationStatus() {\n return (\n <Status state=\"neutral\">\n <Translation\n defaultMessage=\"Disabled for your organization\"\n id=\"uH2sNc\"\n description=\"Status for a provider the organization has disabled\"\n />\n </Status>\n );\n}\n\n/**\n * How the organization connects an account to a provider: OAuth when the\n * server reports its credentials configured (mirroring how it grants\n * canConnect), then client credentials, then an API key. Adding another\n * account uses the same method.\n */\nfunction getOrganizationConnectMethod(\n integration: OrganizationDataIntegration,\n): SharedConnectionAuthMethod {\n const authMethods = integration.authMethods ?? [];\n return authMethods.includes(\"oauth\") && integration.configuration.configured\n ? \"oauth\"\n : authMethods.includes(\"client_credentials\")\n ? \"client_credentials\"\n : authMethods.includes(\"api_key\")\n ? \"api_key\"\n : \"oauth\";\n}\n\n/** The order the organization's add action picks a method in. */\nconst ORGANIZATION_ADD_METHOD_ORDER: SharedConnectionAuthMethod[] = [\n \"oauth\",\n \"client_credentials\",\n \"api_key\",\n];\n\n/**\n * How the organization can connect another account right now, per the server:\n *\n * - an explicit `Add`, with the first method `addConnectionMethods` allows;\n * - otherwise, while accounts exist but the compatibility slot is empty\n * (`canConnect` stays true at the cap or with additional creation off), an\n * untargeted Connect that refills that slot;\n * - otherwise nothing, and the row offers no add at all.\n */\nfunction getOrganizationAddAction(\n integration: OrganizationDataIntegrationWithCapabilities,\n): {\n method: SharedConnectionAuthMethod;\n target: ConnectionTarget | undefined;\n} | null {\n const { capabilities } = integration;\n const addMethod = capabilities.canAddConnection\n ? ORGANIZATION_ADD_METHOD_ORDER.find((method) =>\n capabilities.addConnectionMethods.includes(method),\n )\n : undefined;\n if (addMethod) {\n return { method: addMethod, target: ADD_CONNECTION };\n }\n if (capabilities.canConnect && integration.connected_accounts.length > 0) {\n return {\n method: getOrganizationConnectMethod(integration),\n target: undefined,\n };\n }\n return null;\n}\n\nfunction DisabledStatus({\n configuration,\n}: {\n configuration: OrganizationDataIntegration[\"configuration\"];\n}) {\n return configuration.disabledSource === \"developer\" ? (\n <Status state=\"neutral\">\n <Translation\n defaultMessage=\"Disabled by developer\"\n id=\"k2Jd9W\"\n description=\"Status text for a shared connection the developer has disabled\"\n />\n </Status>\n ) : (\n <DisabledForOrganizationStatus />\n );\n}\n\n/**\n * One shared account's state. While the provider is disabled nothing about\n * the account matters: a row standing for a single account says the provider\n * is disabled, and a nested row says nothing, leaving that to its provider\n * row rather than reporting an account state that contradicts it.\n */\nfunction SharedConnectionAdminStatus({\n integration,\n account,\n method,\n nested,\n connectionFailed,\n}: {\n integration: OrganizationDataIntegrationWithCapabilities;\n account: DataInstallation | undefined;\n method: SharedConnectionAuthMethod;\n nested: boolean;\n /** The last OAuth handoff on the organization's behalf failed. */\n connectionFailed: boolean;\n}) {\n const { configuration } = integration;\n\n if (!configuration.enabled) {\n return nested ? null : <DisabledStatus configuration={configuration} />;\n }\n if (connectionFailed) {\n return <ConnectionFailedStatus />;\n }\n if (!account) {\n return null;\n }\n return account.state === \"connected\" ? (\n <ConnectedViaStatus method={method} />\n ) : (\n <Status state=\"warning\">\n <Translation\n defaultMessage=\"Needs attention\"\n id=\"pL5wGd\"\n description=\"Status for a shared connection that stopped working and needs the admin to fix it\"\n />\n </Status>\n );\n}\n\n/**\n * An organization-owned connection row. Actions are offered strictly per the\n * server's `capabilities`: Configure edits the organization's own credentials\n * and scopes; Connect / Reauthorize run the OAuth flow on the organization's\n * behalf (or open the credential dialog for api_key / client_credentials\n * providers); Disconnect removes the shared account. The fix for a broken\n * connection and the first Connect are promoted; everything else overflows.\n *\n * `account` is the one shared account the row stands for — undefined before\n * anything is connected. A `nested` row is one of several accounts under its\n * provider's row, which then owns the provider-level Configure.\n */\nfunction SharedConnectionAccountRow({\n integration,\n account,\n nested = false,\n onAddConnection,\n onRepairStart,\n}: {\n integration: OrganizationDataIntegrationWithCapabilities;\n account: ConnectionWithCapabilities | undefined;\n nested?: boolean;\n /**\n * Starts another account from the provider row that owns the add (and\n * shows its result); a row standing alone runs its own.\n */\n onAddConnection?: (\n method: SharedConnectionAuthMethod,\n target: ConnectionTarget | undefined,\n ) => void;\n /** Lets the provider row retire a failed add once a repair starts. */\n onRepairStart?: () => void;\n}) {\n const [configureOpen, setConfigureOpen] = useState(false);\n const [connectOpen, setConnectOpen] = useState(false);\n const [renameOpen, setRenameOpen] = useState(false);\n const [disconnectOpen, setDisconnectOpen] = useState(false);\n // Connect / Reauthorize on the organization's behalf, targeting this\n // account (or, before one exists, the compatibility slot).\n const { openAuthorizeUrl, connectionError, clearConnectionError } =\n useOpenDataIntegrationAuthorizeUrl(\n integration,\n \"organization\",\n getConnectionTarget(account),\n );\n const addConnection = useAddConnectionFlow(integration, \"organization\");\n // A row standing alone also shows how its own add went.\n const connectionFailed =\n connectionError !== null ||\n (onAddConnection === undefined && addConnection.connectionError !== null);\n // The row (and its provider) reports the latest attempt: starting a repair\n // retires a failed add's status, and starting an add retires a failed\n // repair's, so a success never sits under a stale failure.\n const retireAddFailure = onRepairStart ?? addConnection.clearConnectionError;\n const startRepair = (config?: Record<string, string>) => {\n retireAddFailure();\n return openAuthorizeUrl(config);\n };\n // A saved API key or client credentials leaves nothing failed to report.\n const clearFailures = () => {\n clearConnectionError();\n retireAddFailure();\n };\n const startAdd = (\n method: SharedConnectionAuthMethod,\n target: ConnectionTarget | undefined,\n ) => {\n clearConnectionError();\n (onAddConnection ?? addConnection.start)(method, target);\n };\n const { capabilities, configuration } = integration;\n // A connected account fixes the method; otherwise it's the one Connect uses.\n const method: SharedConnectionAuthMethod =\n account?.auth_method ?? getOrganizationConnectMethod(integration);\n const needsAttention = account !== undefined && account.state !== \"connected\";\n const label = account\n ? getConnectionLabel(integration.name, account)\n : integration.name;\n\n // An account's repair follows its own capabilities. The provider-level flags\n // only describe the compatibility slot, so they're a fallback for a server\n // that doesn't report per-connection capabilities.\n const repairCapabilities = account?.capabilities ?? capabilities;\n const showConnect = account\n ? method === \"oauth\"\n ? repairCapabilities.canReauthorize\n : repairCapabilities.canUpdateCredentials\n : capabilities.canConnect;\n const showDisconnect = account !== undefined && capabilities.canDisconnect;\n // A developer-disabled provider leaves the organization nothing to manage\n // but removing the account, and naming waits for multiple connections.\n const showRename =\n account !== undefined &&\n configuration.disabledSource !== \"developer\" &&\n canRenameConnections(integration);\n // A broken account's menu stays on fixing it (D21), so adding another is\n // only offered beside a working one.\n const addAction =\n account !== undefined && !needsAttention\n ? getOrganizationAddAction(integration)\n : null;\n\n const connectLabel = !account ? (\n <Translation\n defaultMessage=\"Connect\"\n id=\"quvdFp\"\n description=\"Button to connect an integration\"\n />\n ) : method === \"api_key\" ? (\n needsAttention ? (\n <Translation\n defaultMessage=\"Update API key\"\n id=\"E7pMj/\"\n description=\"Menu option to update the API key for a needs-reauthorization installation\"\n />\n ) : (\n <Translation\n defaultMessage=\"Rotate API key\"\n id=\"kR7pQz\"\n description=\"Menu option to rotate an organization-owned API key\"\n />\n )\n ) : method === \"client_credentials\" ? (\n <Translation\n defaultMessage=\"Update client credentials\"\n id=\"vB8dLq\"\n description=\"Menu option to update an organization-owned integration's client credentials\"\n />\n ) : (\n <Translation\n defaultMessage=\"Reauthorize\"\n id=\"0E29F1\"\n description=\"Menu option to reauthorize an integration\"\n trailingSpace\n />\n );\n\n const actions: AdminRowAction[] = [];\n if (showConnect) {\n actions.push({\n key: \"connect\",\n label: connectLabel,\n onSelect: () => setConnectOpen(true),\n promoted: !account || needsAttention,\n external: method === \"oauth\",\n });\n }\n if (capabilities.canConfigure && !nested) {\n actions.push({\n key: \"configure\",\n label: (\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n ),\n onSelect: () => setConfigureOpen(true),\n promoted: !account && !showConnect && configuration.enabled,\n });\n }\n if (showRename) {\n actions.push({\n key: \"rename\",\n label: <RenameMenuLabel />,\n onSelect: () => setRenameOpen(true),\n });\n }\n if (addAction) {\n actions.push({\n key: \"connect-another\",\n label: <ConnectAnotherAccountMenuLabel />,\n onSelect: () => startAdd(addAction.method, addAction.target),\n external: addAction.method === \"oauth\",\n });\n }\n if (showDisconnect) {\n actions.push({\n key: \"disconnect\",\n label: (\n <Translation\n defaultMessage=\"Disconnect\"\n id=\"vMVXQh\"\n description=\"Button to disconnect an account\"\n />\n ),\n onSelect: () => setDisconnectOpen(true),\n destructive: true,\n });\n }\n\n const needsOrganizationCredentials =\n configuration.enabled &&\n !account &&\n configuration.credentials.credentialsType === \"organization\" &&\n !configuration.configured;\n\n return (\n <>\n {addConnection.dialogs}\n {configureOpen && (\n <OrgCredentialsDialog\n integration={toConfigurableIntegration(integration)}\n owner=\"organization\"\n open={configureOpen}\n onOpenChange={setConfigureOpen}\n />\n )}\n {method === \"api_key\" ? (\n connectOpen && (\n <ApiKeyDialog\n integration={integration}\n installation={account}\n owner=\"organization\"\n open={connectOpen}\n onOpenChange={setConnectOpen}\n onSuccess={clearFailures}\n />\n )\n ) : method === \"client_credentials\" ? (\n connectOpen && (\n <ClientCredentialsDialog\n integration={integration}\n installation={account}\n fields={getUnpinnedInstallationFields(integration)}\n owner=\"organization\"\n open={connectOpen}\n onOpenChange={setConnectOpen}\n onSuccess={clearFailures}\n />\n )\n ) : (\n <ConnectDialog\n integration={integration}\n fields={getUnpinnedInstallationFields(integration)}\n open={connectOpen}\n onOpenChange={setConnectOpen}\n onConnect={startRepair}\n />\n )}\n {account && renameOpen && (\n <RenameConnectionDialog\n integrationName={integration.name}\n installation={account}\n owner=\"organization\"\n open={renameOpen}\n onOpenChange={setRenameOpen}\n />\n )}\n {account && (\n <DisconnectSharedConnectionDialog\n integrationName={label}\n installationId={account.id}\n open={disconnectOpen}\n onOpenChange={setDisconnectOpen}\n onSuccess={clearConnectionError}\n />\n )}\n <AdminRow\n integration={integration}\n name={nested ? label : integration.name}\n nested={nested}\n status={\n <SharedConnectionAdminStatus\n integration={integration}\n account={account}\n method={method}\n nested={nested}\n connectionFailed={connectionFailed}\n />\n }\n description={\n nested ? null : needsOrganizationCredentials ? (\n <Translation\n defaultMessage=\"Enter your organization's OAuth client to make this connectable.\"\n id=\"rQ8mVz\"\n description=\"Second line of a shared connection row whose organization OAuth credentials have not been entered yet\"\n />\n ) : (\n integration.description\n )\n }\n dimmed={!configuration.enabled}\n actions={actions}\n />\n </>\n );\n}\n\n/**\n * A provider the organization shares several accounts of: the provider row\n * counts them and owns the provider-level actions (adding another account,\n * Configure), and each account follows as its own nested row.\n */\nfunction SharedConnectionAdminGroup({\n integration,\n}: {\n integration: OrganizationDataIntegrationWithCapabilities;\n}) {\n const [configureOpen, setConfigureOpen] = useState(false);\n const addConnection = useAddConnectionFlow(integration, \"organization\");\n const { capabilities, configuration } = integration;\n const addAction = getOrganizationAddAction(integration);\n\n const actions: AdminRowAction[] = [];\n if (addAction) {\n actions.push({\n key: \"add\",\n label: <AddConnectionButtonLabel />,\n onSelect: () => addConnection.start(addAction.method, addAction.target),\n promoted: true,\n external: addAction.method === \"oauth\",\n });\n }\n if (capabilities.canConfigure) {\n actions.push({\n key: \"configure\",\n label: (\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n ),\n onSelect: () => setConfigureOpen(true),\n promoted: !configuration.enabled,\n });\n }\n\n return (\n <>\n {addConnection.dialogs}\n {configureOpen && (\n <OrgCredentialsDialog\n integration={toConfigurableIntegration(integration)}\n owner=\"organization\"\n open={configureOpen}\n onOpenChange={setConfigureOpen}\n />\n )}\n <AdminRow\n integration={integration}\n status={\n !configuration.enabled ? (\n <DisabledStatus configuration={configuration} />\n ) : addConnection.connectionError ? (\n <ConnectionFailedStatus />\n ) : (\n <ConnectionCountStatus\n count={integration.connected_accounts.length}\n />\n )\n }\n dimmed={!configuration.enabled}\n actions={actions}\n />\n {integration.connected_accounts.map((account) => (\n <SharedConnectionAccountRow\n key={account.id}\n integration={integration}\n account={account}\n nested\n onAddConnection={addConnection.start}\n onRepairStart={addConnection.clearConnectionError}\n />\n ))}\n </>\n );\n}\n\n/** An organization-owned provider: one row, or a group once it has several. */\nfunction SharedConnectionAdminItem({\n integration,\n}: {\n integration: OrganizationDataIntegrationWithCapabilities;\n}) {\n return integration.connected_accounts.length > 1 ? (\n <SharedConnectionAdminGroup integration={integration} />\n ) : (\n <SharedConnectionAccountRow\n integration={integration}\n account={integration.connected_accounts[0]}\n />\n );\n}\n\n/**\n * A provider settings row in the sectioned view: the policy governing what\n * members may connect on their own. Configure is the only action; the status\n * only speaks up when something keeps members from connecting.\n */\nfunction ProviderSettingsItem({\n integration,\n}: {\n integration: DataIntegrationConfiguration;\n}) {\n const [configureOpen, setConfigureOpen] = useState(false);\n const available = isIntegrationAvailable(integration);\n const dimmed = !integration.enabled;\n\n return (\n <>\n {configureOpen && (\n <OrgCredentialsDialog\n integration={integration}\n open={configureOpen}\n onOpenChange={setConfigureOpen}\n />\n )}\n <AdminRow\n integration={integration}\n status={\n !integration.enabled ? (\n <DisabledForOrganizationStatus />\n ) : !available ? (\n <Status state=\"neutral\">\n <Translation\n defaultMessage=\"Not configured\"\n id=\"gV7bXe\"\n description=\"Status for a provider whose organization credentials have not been entered yet\"\n />\n </Status>\n ) : null\n }\n dimmed={dimmed}\n actions={[\n {\n key: \"configure\",\n label: (\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n ),\n onSelect: () => setConfigureOpen(true),\n promoted: true,\n },\n ]}\n />\n </>\n );\n}\n\n/**\n * Returns whether an integration is currently available to members of the\n * organization. All credential types require the effective `enabled` state to\n * be on; organization credentials additionally require a stored credential\n * pair.\n */\nfunction isIntegrationAvailable(\n integration: DataIntegrationConfiguration,\n): boolean {\n // API-key integrations have no org-level OAuth credentials; availability is\n // governed solely by the enabled toggle.\n if (!(integration.authMethods ?? [\"oauth\"]).includes(\"oauth\")) {\n return integration.enabled;\n }\n const credentials = integration.credentials;\n // `enabled` is the effective state (org override when present, else the\n // developer default). Organization credentials additionally require a stored\n // credential pair before the provider can be connected.\n if (credentials.credentialsType === \"organization\") {\n return credentials.hasCredentials && integration.enabled;\n }\n return integration.enabled;\n}\n\nfunction getWidgetRootDomProps(\n state: WidgetRootState,\n domProps: WidgetRootDomProps,\n) {\n return getWidgetDomProps({\n ...domProps,\n isWidgetRoot: true,\n widgetId: \"pipes-admin\",\n widgetState: state,\n });\n}\n\ninterface PipesAdminProps extends WidgetRootDomProps {\n integrations: DataIntegrationConfiguration[];\n}\n\n/**\n * IT-admin organization configuration list: every manageable provider with its\n * availability status and a Configure action (credentials + scope overrides).\n * Presentational — the client wrapper fetches via `useManageableIntegrations`.\n */\nconst PipesAdmin: React.FC<PipesAdminProps> = ({\n integrations,\n ...domProps\n}) => {\n return (\n <CardList.Root {...getWidgetRootDomProps(\"resolved\", domProps)}>\n <PipesAdminItems integrations={integrations} />\n </CardList.Root>\n );\n};\n\n/** Provider settings rows: availability status and a Configure action each. */\nfunction PipesAdminItems({\n integrations,\n}: {\n integrations: DataIntegrationConfiguration[];\n}) {\n return (\n <>\n {integrations.map((integration) => {\n const available = isIntegrationAvailable(integration);\n\n return (\n <CardList.Item key={integration.id}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"2\">\n <Flex gap=\"4\" align=\"center\">\n <IconPanel color=\"panel\">\n <DataIntegrationIcon integration={integration} size=\"2\" />\n </IconPanel>\n <Text size=\"2\" weight=\"bold\">\n {integration.name}\n </Text>\n </Flex>\n <Flex align=\"center\" gap=\"4\">\n <Status state={available ? \"success\" : \"neutral\"}>\n {available ? (\n <Translation\n defaultMessage=\"Available\"\n id=\"SytbAY\"\n description=\"Status when an org connection is available to members\"\n />\n ) : (\n <Translation\n defaultMessage=\"Disabled\"\n id=\"O4SGtP\"\n description=\"Status when an org connection is disabled\"\n />\n )}\n </Status>\n <OrgCredentialsButton integration={integration} />\n </Flex>\n </Flex>\n </CardList.Item>\n );\n })}\n </>\n );\n}\n\ninterface PipesAdminSectionsProps extends PipesAdminProps {\n /**\n * Organization-owned integrations, as returned by the organization\n * endpoint. Empty while loading, when the organization owns nothing, and\n * when the request failed.\n */\n sharedIntegrations: OrganizationDataIntegrationWithCapabilities[];\n /** Renders the shared section as skeleton rows while it resolves. */\n isSharedLoading?: boolean;\n /** Names the owning organization in the shared section's description. */\n organizationName?: string;\n}\n\n/**\n * The sectioned administrator experience: the connections the organization\n * owns and shares with everyone, then the provider settings governing what\n * members may connect on their own. The two lanes come from different\n * endpoints and are never merged — the same provider can legitimately appear\n * in both, once as the organization's own account and once as the policy for\n * members' personal accounts.\n *\n * The shared section is omitted when the organization owns nothing or the\n * request failed, leaving provider settings on their own.\n */\nconst PipesAdminSections: React.FC<PipesAdminSectionsProps> = ({\n integrations,\n sharedIntegrations,\n isSharedLoading,\n organizationName,\n ...domProps\n}) => {\n return (\n <Flex\n direction=\"column\"\n gap=\"5\"\n {...getWidgetRootDomProps(\"resolved\", domProps)}\n >\n {(isSharedLoading || sharedIntegrations.length > 0) && (\n <PipesSection\n title={\n <Translation\n defaultMessage=\"Shared connections\"\n id=\"Fcd-bK\"\n description=\"Heading for the section listing connections the organization owns\"\n />\n }\n description={\n organizationName ? (\n <Translation\n defaultMessage=\"Accounts {organizationName} owns and shares with everyone.\"\n id=\"7U8P0v\"\n description=\"Description of the shared connections section, naming the organization\"\n values={{ organizationName }}\n />\n ) : (\n <Translation\n defaultMessage=\"Accounts your organization owns and shares with everyone.\"\n id=\"72FEZi\"\n description=\"Description of the shared connections section when the organization name is unknown\"\n />\n )\n }\n >\n <CardList.Root>\n {isSharedLoading ? (\n <PipesAdminSkeletonItems count={2} />\n ) : (\n sharedIntegrations.map((integration) => (\n <SharedConnectionAdminItem\n key={integration.id}\n integration={integration}\n />\n ))\n )}\n </CardList.Root>\n </PipesSection>\n )}\n <PipesSection\n title={\n <Translation\n defaultMessage=\"Provider settings\"\n id=\"Zq7Lr3\"\n description=\"Heading for the section of provider settings governing members' own connections\"\n />\n }\n description={\n <Translation\n defaultMessage=\"What members of this organization can connect to, and with which scopes.\"\n id=\"c3Vb8N\"\n description=\"Description of the provider settings section\"\n />\n }\n >\n <CardList.Root>\n {integrations.length > 0 ? (\n integrations.map((integration) => (\n <ProviderSettingsItem\n key={integration.id}\n integration={integration}\n />\n ))\n ) : (\n <PipesEmptyItem isFiltered={false} />\n )}\n </CardList.Root>\n </PipesSection>\n </Flex>\n );\n};\n\nfunction PipesAdminSkeletonItems({ count }: { count: number }) {\n return Array.from({ length: count }).map((_, index) => (\n <CardList.Item key={index}>\n <Flex direction=\"row\" justify=\"between\" align=\"center\" gap=\"2\">\n <Flex gap=\"4\" align=\"center\">\n <Skeleton>\n <IconPanel>\n <ProviderIcon provider=\"google\" size=\"2\" />\n </IconPanel>\n </Skeleton>\n <Skeleton>\n <Text size=\"2\" weight=\"bold\">\n <Translation\n defaultMessage=\"Google Drive\"\n id=\"g11OOu\"\n description=\"Placeholder text for loading state\"\n />\n </Text>\n </Skeleton>\n </Flex>\n <Skeleton>\n <Button variant=\"secondary\" disabled>\n <Translation\n defaultMessage=\"Configure\"\n id=\"ADidi3\"\n description=\"Button to configure organization credentials\"\n />\n </Button>\n </Skeleton>\n </Flex>\n </CardList.Item>\n ));\n}\n\ninterface PipesAdminLoadingProps extends WidgetRootDomProps {\n count: number;\n}\n\nconst PipesAdminLoading: React.FC<PipesAdminLoadingProps> = ({\n count,\n ...domProps\n}) => {\n return (\n <CardList.Root {...getWidgetRootDomProps(\"loading\", domProps)}>\n <PipesAdminSkeletonItems count={count} />\n </CardList.Root>\n );\n};\n\ninterface PipesAdminErrorProps extends WidgetRootDomProps {\n error: unknown;\n}\n\nconst PipesAdminError: React.FC<PipesAdminErrorProps> = ({\n error,\n ...domProps\n}) => {\n return (\n <Card size=\"2\" {...getWidgetRootDomProps(\"error\", domProps)}>\n <GenericError error={error} />\n </Card>\n );\n};\n\nexport type {\n PipesAdminProps,\n PipesAdminSectionsProps,\n PipesAdminLoadingProps,\n PipesAdminErrorProps,\n};\nexport {\n PipesAdmin,\n PipesAdminSections,\n PipesAdminLoading,\n PipesAdminError,\n useManageableIntegrations,\n useOrgan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
+
import { useClientGraphqlMutation } from "../api/client-graphql/hooks.js";
|
|
2
4
|
import { useTranslation } from "./i18n/use-translation.js";
|
|
3
5
|
import { Close, Content as DialogContent, Description as DialogDescription, Root, Title } from "./elements/dialog.js";
|
|
4
6
|
import { Button as Button$1, Label, TextField as TextField$1 } from "./elements.js";
|
|
5
|
-
import { Status } from "./status.js";
|
|
6
7
|
import { Translation } from "./i18n/translation.js";
|
|
7
|
-
import {
|
|
8
|
-
import { useClientGraphqlMutation } from "../api/client-graphql/hooks.js";
|
|
8
|
+
import { Status } from "./status.js";
|
|
9
9
|
import { useInvalidateConnections } from "./api/pipes.js";
|
|
10
|
-
import { useEffect, useState } from "react";
|
|
11
10
|
import { Callout, Flex, Text } from "@radix-ui/themes";
|
|
11
|
+
import { useEffect, useState } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/lib/pipes-connections.tsx
|
|
14
14
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useTranslation } from "./i18n/use-translation.js";
|
|
3
2
|
import { getAuthenticatedUserId, getClaims } from "../api/claims.js";
|
|
4
3
|
import { useApi } from "../api/api-provider.js";
|
|
4
|
+
import { useTranslation } from "./i18n/use-translation.js";
|
|
5
5
|
import { createContext, useContext } from "react";
|
|
6
6
|
//#region src/lib/pipes-credential-attribution.tsx
|
|
7
7
|
const PipesCredentialUserIdContext = createContext(void 0);
|