diff --git a/config/routes.ts b/config/routes.ts
index 1a1b385f..da0fbff4 100644
--- a/config/routes.ts
+++ b/config/routes.ts
@@ -95,6 +95,10 @@ export default [
path: paths.INFO,
component: "./pages/PersonalInfo",
},
+ {
+ path: `${paths.CREDENTIALS}/:editId?`,
+ component: "./pages/Credentials",
+ },
],
},
{
diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index dbaf1451..a02f1dc5 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -110,10 +110,15 @@
"find": "Find",
"edit_teams": "Edit teams",
"roles_and_access": "Roles and access",
- "sql_api": "SQL API"
+ "sql_api": "SQL API",
+ "credentials": "Credentials",
+ "shared": "Shared",
+ "private": "Private",
+ "specific_users": "Specific users"
},
"form": {
"labels": {
+ "access_type": "Access type",
"data_source": "Data source",
"name": "Name",
"db_name": "Database Name",
@@ -149,6 +154,7 @@
"new_password": "New Password",
"old_password": "Old Password",
"team_member": "Team member",
+ "team_members": "Team members",
"auth_token": "Auth Token",
"json": "JSON",
"body": "Body",
@@ -157,6 +163,10 @@
},
"placeholders": {
"name": "Name",
+ "choose_access_type": "Choose access type",
+ "choose_data_source": "Choose data source",
+ "choose_team_members": "Choose team members",
+ "login": "Login",
"use_ssl": "I want use SSL",
"attach_file_credentials": "Attach the file credentials, please",
"schema": "schema",
diff --git a/public/locales/en/settings.json b/public/locales/en/settings.json
index 9c214ccd..ae67dc54 100644
--- a/public/locales/en/settings.json
+++ b/public/locales/en/settings.json
@@ -60,6 +60,23 @@
"attach_btn": "Attach SQL API"
}
},
+ "credentials": {
+ "title": "Manage Credentials",
+ "action": "Create now",
+ "created": "Credentials created",
+ "updated": "Credentials updated",
+ "deleted": "Credentials deleted",
+ "not_found": {
+ "title": "You have no Credentials",
+ "text": "Click \"Create Credentials\" to add one",
+ "create_btn": "Create Credentials"
+ },
+ "shared_access_type_description": "This credential will be available to all team members.",
+ "specific_users_access_type_description": "This credential will be available to the selected team members.",
+ "member_already_used": "One or more members already have access to this datasource. Please remove them from other credentials of this datasource.",
+ "member_has_access": "You already have access to this datasource. Please remove other credentials of this datasource or contact your administrator.",
+ "no_rights": "You don't have rights to delete this credential. Please contact your administrator."
+ },
"roles_and_access": {
"manage_roles": "Manage roles",
"create_now": "Create now",
diff --git a/src/assets/credentials.svg b/src/assets/credentials.svg
new file mode 100644
index 00000000..463fea71
--- /dev/null
+++ b/src/assets/credentials.svg
@@ -0,0 +1,11 @@
+
\ No newline at end of file
diff --git a/src/components/ApiSetup/index.tsx b/src/components/ApiSetup/index.tsx
index 745cbb72..103c0c5a 100644
--- a/src/components/ApiSetup/index.tsx
+++ b/src/components/ApiSetup/index.tsx
@@ -103,7 +103,6 @@ const ApiSetup: FC = ({
connection = CONNECTION_DEFAULT,
host = connectionUrls[CONNECTION_DEFAULT],
user = initialValue?.db_username,
- password = initialValue?.password,
database = initialValue?.db,
}) => {
const [hostname, port] = host.split(":");
@@ -117,7 +116,7 @@ const ApiSetup: FC = ({
return `psql --host=${hostname} ${psqlPortOption} --username=${user} --dbname=${database}`;
},
- [initialValue?.password, initialValue?.db_username, initialValue?.db]
+ [initialValue?.db_username, initialValue?.db]
);
const onDownload = () => {
diff --git a/src/components/CredentialCard/index.module.less b/src/components/CredentialCard/index.module.less
new file mode 100644
index 00000000..7adb880f
--- /dev/null
+++ b/src/components/CredentialCard/index.module.less
@@ -0,0 +1,50 @@
+.btn {
+ padding: 0;
+ color: var(--color-primary);
+ span {
+ font-size: 12px;
+ }
+}
+
+.list {
+ padding: 0;
+ list-style: none;
+}
+
+.listItem {
+ display: flex;
+ gap: 5px;
+ align-items: center;
+ justify-content: space-between;
+ padding: 0;
+ font-size: 12px;
+ font-family: var(--font-manrope);
+ &:not(:last-child) {
+ margin-bottom: 12px;
+ }
+}
+
+.label {
+ font-weight: 500;
+ white-space: nowrap;
+ opacity: 0.5;
+}
+
+.value {
+ display: flex;
+ align-items: center;
+ font-weight: 600;
+}
+
+.paragraph {
+ margin-bottom: 0 !important;
+ &:extend(.value);
+}
+
+.deleteItem {
+ padding: 0 !important;
+}
+
+.deleteText {
+ padding: 5px 12px;
+}
diff --git a/src/components/CredentialCard/index.tsx b/src/components/CredentialCard/index.tsx
new file mode 100644
index 00000000..43002d5b
--- /dev/null
+++ b/src/components/CredentialCard/index.tsx
@@ -0,0 +1,179 @@
+import React from "react";
+import { SettingOutlined } from "@ant-design/icons";
+import { Card, Typography, Dropdown } from "antd";
+import { useTranslation } from "react-i18next";
+import cx from "classnames";
+
+import Button from "@/components/Button";
+import ConfirmModal from "@/components/ConfirmModal";
+import formatTime from "@/utils/helpers/formatTime";
+import type { CredentialsInfo } from "@/types/credential";
+import DataSourceTag from "@/components/DataSourceTag";
+import CurrentUserStore from "@/stores/CurrentUserStore";
+import { Roles } from "@/types/team";
+
+import styles from "./index.module.less";
+
+import type { ItemType } from "antd/lib/menu/hooks/useItems";
+import type { FC } from "react";
+
+const { Paragraph } = Typography;
+
+interface CredentialCardProps {
+ credential: CredentialsInfo;
+ onEdit?: (id: string) => void;
+ onDelete?: (id: string) => void;
+}
+
+const CredentialCard: FC = ({
+ credential,
+ onEdit = () => {},
+ onDelete = () => {},
+}) => {
+ const { t } = useTranslation(["common"]);
+ const { currentUser, currentTeam } = CurrentUserStore();
+ const { id, username, updatedAt, createdAt, user, dataSource } = credential;
+
+ const isMember = currentTeam?.role === Roles.member;
+ const isOwner = currentUser?.id === credential.user.id;
+ const canDelete = !isMember || (isMember && isOwner);
+
+ return (
+
+
id && onEdit(id)}
+ >
+
+ {user?.displayName}
+
+
+ }
+ extra={
+ canDelete && (
+ id && onEdit(id),
+ },
+ {
+ key: "delete",
+ className: styles.deleteItem,
+ label: (
+ id && onDelete(id)}
+ >
+ {t("common:words.delete")}
+
+ ),
+ },
+ ],
+ }}
+ >
+
+
+ )
+ }
+ >
+
+ -
+ {t("common:words.type")}
+
+
+
+ {dataSource?.name && (
+ -
+
+ {t("common:form.labels.data_source")}
+
+
+ {dataSource.name}
+
+
+ )}
+
+ {username && (
+ -
+ {t("common:words.login")}
+
+ {username}
+
+
+ )}
+
+ -
+ {t("common:words.updated_at")}
+
+ {formatTime(updatedAt)}{" "}
+
+
+
+ -
+ {t("common:words.created_at")}
+
+ {formatTime(createdAt)}{" "}
+
+
+
+
+
+ );
+};
+
+export default CredentialCard;
diff --git a/src/components/CredentialsForm/index.module.less b/src/components/CredentialsForm/index.module.less
new file mode 100644
index 00000000..03945fcb
--- /dev/null
+++ b/src/components/CredentialsForm/index.module.less
@@ -0,0 +1,4 @@
+.form {
+ max-width: 400px;
+ margin: 0 auto;
+}
\ No newline at end of file
diff --git a/src/components/CredentialsForm/index.tsx b/src/components/CredentialsForm/index.tsx
new file mode 100644
index 00000000..266d61cb
--- /dev/null
+++ b/src/components/CredentialsForm/index.tsx
@@ -0,0 +1,165 @@
+import { Form, Row, Col, Alert } from "antd";
+import { useTranslation } from "react-i18next";
+import { useForm } from "react-hook-form";
+
+import Input from "@/components/Input";
+import Button from "@/components/Button";
+import type { CredentialsFormType } from "@/types/credential";
+import type { DataSourceInfo } from "@/types/dataSource";
+import { Roles, type Member } from "@/types/team";
+import { Access_Types_Enum } from "@/graphql/generated";
+import CurrentUserStore from "@/stores/CurrentUserStore";
+
+interface CredentialsFormProps {
+ initialValue?: CredentialsFormType;
+ allMembers?: Member[];
+ dataSources?: DataSourceInfo[];
+ onSubmit?: (data: CredentialsFormType) => void;
+}
+
+const CredentialsForm: React.FC = ({
+ initialValue,
+ allMembers,
+ dataSources,
+ onSubmit = () => {},
+}) => {
+ const { currentUser, currentTeam } = CurrentUserStore();
+ const { t } = useTranslation(["common", "settings"]);
+ const { control, handleSubmit, watch } = useForm({
+ values: initialValue,
+ });
+
+ const accessType = watch("accessType") || Access_Types_Enum.SpecificUsers;
+ const isSpecificUsers = accessType === Access_Types_Enum.SpecificUsers;
+
+ const accessTypeMessage = {
+ [Access_Types_Enum.Shared]: t(
+ "settings:credentials.shared_access_type_description"
+ ),
+ [Access_Types_Enum.SpecificUsers]: t(
+ "settings:credentials.specific_users_access_type_description"
+ ),
+ };
+
+ const isMember = currentTeam?.role === Roles.member;
+ const isOwner = currentUser?.id === initialValue?.userId;
+ const canEdit = !initialValue || (isMember && isOwner) || !isMember;
+
+ return (
+
+ );
+};
+
+export default CredentialsForm;
diff --git a/src/components/DataSourceFormBody/index.tsx b/src/components/DataSourceFormBody/index.tsx
index 931c88da..1dcda3b1 100644
--- a/src/components/DataSourceFormBody/index.tsx
+++ b/src/components/DataSourceFormBody/index.tsx
@@ -81,16 +81,23 @@ const DataSourceFormBody: FC = ({
case 1:
if (curDataSource) {
const initialValue = formState?.step1 || formData?.step1;
+ let fields =
+ dataSourceForms[
+ Object.keys(dataSourceForms).find(
+ (f) => f === curDataSource?.value
+ ) ?? "default"
+ ];
+
+ if (!isOnboarding) {
+ fields = fields.filter(
+ (f) => f.label !== "password" && f.label !== "user"
+ );
+ }
+
return (
f === curDataSource?.value
- ) ?? "default"
- ]
- }
+ fields={fields}
loading={loading}
isOnboarding={isOnboarding}
initialValue={initialValue}
diff --git a/src/components/NoCredentials/index.stories.tsx b/src/components/NoCredentials/index.stories.tsx
index 2ea03efa..7d71a668 100644
--- a/src/components/NoCredentials/index.stories.tsx
+++ b/src/components/NoCredentials/index.stories.tsx
@@ -5,7 +5,7 @@ import NoCredentials from ".";
import type { StoryFn, Meta } from "@storybook/react";
export default {
- title: "Components/Settings/SQLApi/NoCredentials",
+ title: "Components/Settings/Credentials/NoCredentials",
component: NoCredentials,
} as Meta;
diff --git a/src/components/NoCredentials/index.test.tsx b/src/components/NoCredentials/index.test.tsx
index dc9cd723..68577aab 100644
--- a/src/components/NoCredentials/index.test.tsx
+++ b/src/components/NoCredentials/index.test.tsx
@@ -1,36 +1,36 @@
import { describe, test, expect, vi } from "vitest";
import { render, screen } from "@testing-library/react";
-import NoCredentials from "./";
+import NoCredentials from ".";
describe("NoCredentials", () => {
test("renders the component correctly", () => {
- render( {}} />);
+ render( {}} />);
});
test("displays the correct title", () => {
- render( {}} />);
- const titleElement = screen.getByText("sql_api.not_found.title");
+ render( {}} />);
+ const titleElement = screen.getByText("credentials.not_found.title");
expect(titleElement).toBeInTheDocument();
});
test("displays the correct text", () => {
- render( {}} />);
- const textElement = screen.getByText("sql_api.not_found.text");
+ render( {}} />);
+ const textElement = screen.getByText("credentials.not_found.text");
expect(textElement).toBeInTheDocument();
});
- test("renders the attach button when edit permission is true", () => {
- render( {}} editPermission />);
- const attachButton = screen.getByText("sql_api.not_found.attach_btn");
- expect(attachButton).toBeInTheDocument();
+ test("renders the create button", () => {
+ render( {}} />);
+ const createButton = screen.getByText("credentials.not_found.create_btn");
+ expect(createButton).toBeInTheDocument();
});
- test("calls the onAttach function when attach button is clicked", () => {
+ test("calls the onCreate function when create button is clicked", () => {
const mockOnAttach = vi.fn();
- render();
- const attachButton = screen.getByText("sql_api.not_found.attach_btn");
- attachButton.click();
+ render();
+ const createButton = screen.getByText("credentials.not_found.create_btn");
+ createButton.click();
expect(mockOnAttach).toHaveBeenCalled();
});
});
diff --git a/src/components/NoCredentials/index.tsx b/src/components/NoCredentials/index.tsx
index efa36e7c..4ad0d3e4 100644
--- a/src/components/NoCredentials/index.tsx
+++ b/src/components/NoCredentials/index.tsx
@@ -1,7 +1,7 @@
import { Typography } from "antd";
import { useTranslation } from "react-i18next";
-import NoCredentialsImg from "@/assets/no-credentials.png";
+import NoSqlCredentialsImg from "@/assets/no-credentials.png";
import Button from "@/components/Button";
import styles from "./index.module.less";
@@ -11,25 +11,19 @@ import type { FC } from "react";
const { Title, Text } = Typography;
interface NoCredentialsProps {
- editPermission?: boolean;
- onAttach: () => void;
+ onCreate: () => void;
}
-const NoCredentials: FC = ({
- editPermission,
- onAttach = () => {},
-}) => {
+const NoCredentials: FC = ({ onCreate = () => {} }) => {
const { t } = useTranslation(["settings", "common"]);
return (
-

-
{t("sql_api.not_found.title")}
-
{t("sql_api.not_found.text")}
- {editPermission && (
-
- )}
+

+
{t("credentials.not_found.title")}
+
{t("credentials.not_found.text")}
+
);
};
diff --git a/src/components/NoSqlCredentials/index.module.less b/src/components/NoSqlCredentials/index.module.less
new file mode 100644
index 00000000..5f4afe26
--- /dev/null
+++ b/src/components/NoSqlCredentials/index.module.less
@@ -0,0 +1,23 @@
+.wrapper {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ max-height: 100vh;
+ text-align: center;
+}
+
+.img {
+ max-width: 100%;
+}
+
+.text {
+ margin-bottom: var(--gap-base);
+}
+
+.btn {
+ padding: 13px 16px;
+ overflow: visible;
+}
diff --git a/src/components/NoSqlCredentials/index.stories.tsx b/src/components/NoSqlCredentials/index.stories.tsx
new file mode 100644
index 00000000..60ea936a
--- /dev/null
+++ b/src/components/NoSqlCredentials/index.stories.tsx
@@ -0,0 +1,18 @@
+import RootLayout from "@/layouts/RootLayout";
+
+import NoSqlCredentials from ".";
+
+import type { StoryFn, Meta } from "@storybook/react";
+
+export default {
+ title: "Components/Settings/SQLApi/NoSqlCredentials",
+ component: NoSqlCredentials,
+} as Meta;
+
+const Template: StoryFn = (args) => (
+
+
+
+);
+
+export const Default = Template.bind({});
diff --git a/src/components/NoSqlCredentials/index.test.tsx b/src/components/NoSqlCredentials/index.test.tsx
new file mode 100644
index 00000000..ea6985b0
--- /dev/null
+++ b/src/components/NoSqlCredentials/index.test.tsx
@@ -0,0 +1,36 @@
+import { describe, test, expect, vi } from "vitest";
+import { render, screen } from "@testing-library/react";
+
+import NoSqlCredentials from ".";
+
+describe("NoSqlCredentials", () => {
+ test("renders the component correctly", () => {
+ render( {}} />);
+ });
+
+ test("displays the correct title", () => {
+ render( {}} />);
+ const titleElement = screen.getByText("sql_api.not_found.title");
+ expect(titleElement).toBeInTheDocument();
+ });
+
+ test("displays the correct text", () => {
+ render( {}} />);
+ const textElement = screen.getByText("sql_api.not_found.text");
+ expect(textElement).toBeInTheDocument();
+ });
+
+ test("renders the attach button when edit permission is true", () => {
+ render( {}} editPermission />);
+ const attachButton = screen.getByText("sql_api.not_found.attach_btn");
+ expect(attachButton).toBeInTheDocument();
+ });
+
+ test("calls the onAttach function when attach button is clicked", () => {
+ const mockOnAttach = vi.fn();
+ render();
+ const attachButton = screen.getByText("sql_api.not_found.attach_btn");
+ attachButton.click();
+ expect(mockOnAttach).toHaveBeenCalled();
+ });
+});
diff --git a/src/components/NoSqlCredentials/index.tsx b/src/components/NoSqlCredentials/index.tsx
new file mode 100644
index 00000000..f27c9ea2
--- /dev/null
+++ b/src/components/NoSqlCredentials/index.tsx
@@ -0,0 +1,37 @@
+import { Typography } from "antd";
+import { useTranslation } from "react-i18next";
+
+import NoSqlCredentialsImg from "@/assets/no-credentials.png";
+import Button from "@/components/Button";
+
+import styles from "./index.module.less";
+
+import type { FC } from "react";
+
+const { Title, Text } = Typography;
+
+interface NoSqlCredentialsProps {
+ editPermission?: boolean;
+ onAttach: () => void;
+}
+
+const NoSqlCredentials: FC = ({
+ editPermission,
+ onAttach = () => {},
+}) => {
+ const { t } = useTranslation(["settings", "common"]);
+ return (
+
+

+
{t("sql_api.not_found.title")}
+
{t("sql_api.not_found.text")}
+ {editPermission && (
+
+ )}
+
+ );
+};
+
+export default NoSqlCredentials;
diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts
index e94484ab..22c3cb3c 100644
--- a/src/graphql/generated.ts
+++ b/src/graphql/generated.ts
@@ -478,6 +478,174 @@ export type Access_Lists_Updates = {
where: Access_Lists_Bool_Exp;
};
+/** columns and relationships of "access_types" */
+export type Access_Types = {
+ __typename?: "access_types";
+ access_type: Scalars["String"]["output"];
+ /** An array relationship */
+ credentials: Array;
+ /** An aggregate relationship */
+ credentials_aggregate: Credentials_Aggregate;
+};
+
+/** columns and relationships of "access_types" */
+export type Access_TypesCredentialsArgs = {
+ distinct_on?: InputMaybe>;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ order_by?: InputMaybe>;
+ where?: InputMaybe;
+};
+
+/** columns and relationships of "access_types" */
+export type Access_TypesCredentials_AggregateArgs = {
+ distinct_on?: InputMaybe>;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ order_by?: InputMaybe>;
+ where?: InputMaybe;
+};
+
+/** aggregated selection of "access_types" */
+export type Access_Types_Aggregate = {
+ __typename?: "access_types_aggregate";
+ aggregate?: Maybe;
+ nodes: Array;
+};
+
+/** aggregate fields of "access_types" */
+export type Access_Types_Aggregate_Fields = {
+ __typename?: "access_types_aggregate_fields";
+ count: Scalars["Int"]["output"];
+ max?: Maybe;
+ min?: Maybe;
+};
+
+/** aggregate fields of "access_types" */
+export type Access_Types_Aggregate_FieldsCountArgs = {
+ columns?: InputMaybe>;
+ distinct?: InputMaybe;
+};
+
+/** Boolean expression to filter rows from the table "access_types". All fields are combined with a logical 'AND'. */
+export type Access_Types_Bool_Exp = {
+ _and?: InputMaybe>;
+ _not?: InputMaybe;
+ _or?: InputMaybe>;
+ access_type?: InputMaybe;
+ credentials?: InputMaybe;
+ credentials_aggregate?: InputMaybe;
+};
+
+/** unique or primary key constraints on table "access_types" */
+export enum Access_Types_Constraint {
+ /** unique or primary key constraint on columns "access_type" */
+ AccessTypesPkey = "access_types_pkey",
+}
+
+export enum Access_Types_Enum {
+ Shared = "shared",
+ SpecificUsers = "specific_users",
+}
+
+/** Boolean expression to compare columns of type "access_types_enum". All fields are combined with logical 'AND'. */
+export type Access_Types_Enum_Comparison_Exp = {
+ _eq?: InputMaybe;
+ _in?: InputMaybe>;
+ _is_null?: InputMaybe;
+ _neq?: InputMaybe;
+ _nin?: InputMaybe>;
+};
+
+/** input type for inserting data into table "access_types" */
+export type Access_Types_Insert_Input = {
+ access_type?: InputMaybe;
+ credentials?: InputMaybe;
+};
+
+/** aggregate max on columns */
+export type Access_Types_Max_Fields = {
+ __typename?: "access_types_max_fields";
+ access_type?: Maybe;
+};
+
+/** aggregate min on columns */
+export type Access_Types_Min_Fields = {
+ __typename?: "access_types_min_fields";
+ access_type?: Maybe;
+};
+
+/** response of any mutation on the table "access_types" */
+export type Access_Types_Mutation_Response = {
+ __typename?: "access_types_mutation_response";
+ /** number of rows affected by the mutation */
+ affected_rows: Scalars["Int"]["output"];
+ /** data from the rows affected by the mutation */
+ returning: Array;
+};
+
+/** input type for inserting object relation for remote table "access_types" */
+export type Access_Types_Obj_Rel_Insert_Input = {
+ data: Access_Types_Insert_Input;
+ /** upsert condition */
+ on_conflict?: InputMaybe;
+};
+
+/** on_conflict condition type for table "access_types" */
+export type Access_Types_On_Conflict = {
+ constraint: Access_Types_Constraint;
+ update_columns?: Array;
+ where?: InputMaybe;
+};
+
+/** Ordering options when selecting data from "access_types". */
+export type Access_Types_Order_By = {
+ access_type?: InputMaybe;
+ credentials_aggregate?: InputMaybe;
+};
+
+/** primary key columns input for table: access_types */
+export type Access_Types_Pk_Columns_Input = {
+ access_type: Scalars["String"]["input"];
+};
+
+/** select columns of table "access_types" */
+export enum Access_Types_Select_Column {
+ /** column name */
+ AccessType = "access_type",
+}
+
+/** input type for updating data in table "access_types" */
+export type Access_Types_Set_Input = {
+ access_type?: InputMaybe;
+};
+
+/** Streaming cursor of the table "access_types" */
+export type Access_Types_Stream_Cursor_Input = {
+ /** Stream column input with initial value */
+ initial_value: Access_Types_Stream_Cursor_Value_Input;
+ /** cursor ordering */
+ ordering?: InputMaybe;
+};
+
+/** Initial value of the column from where the streaming should start */
+export type Access_Types_Stream_Cursor_Value_Input = {
+ access_type?: InputMaybe;
+};
+
+/** update columns of table "access_types" */
+export enum Access_Types_Update_Column {
+ /** column name */
+ AccessType = "access_type",
+}
+
+export type Access_Types_Updates = {
+ /** sets the columns of the filtered rows to the given values */
+ _set?: InputMaybe;
+ /** filter the rows which have to be updated */
+ where: Access_Types_Bool_Exp;
+};
+
/** columns and relationships of "alerts" */
export type Alerts = {
__typename?: "alerts";
@@ -2036,6 +2204,174 @@ export type Auth_Migrations_Variance_Fields = {
id?: Maybe;
};
+/** columns and relationships of "auth_options" */
+export type Auth_Options = {
+ __typename?: "auth_options";
+ auth: Scalars["String"]["output"];
+ /** An array relationship */
+ datasources: Array;
+ /** An aggregate relationship */
+ datasources_aggregate: Datasources_Aggregate;
+};
+
+/** columns and relationships of "auth_options" */
+export type Auth_OptionsDatasourcesArgs = {
+ distinct_on?: InputMaybe>;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ order_by?: InputMaybe>;
+ where?: InputMaybe;
+};
+
+/** columns and relationships of "auth_options" */
+export type Auth_OptionsDatasources_AggregateArgs = {
+ distinct_on?: InputMaybe>;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ order_by?: InputMaybe>;
+ where?: InputMaybe;
+};
+
+/** aggregated selection of "auth_options" */
+export type Auth_Options_Aggregate = {
+ __typename?: "auth_options_aggregate";
+ aggregate?: Maybe;
+ nodes: Array;
+};
+
+/** aggregate fields of "auth_options" */
+export type Auth_Options_Aggregate_Fields = {
+ __typename?: "auth_options_aggregate_fields";
+ count: Scalars["Int"]["output"];
+ max?: Maybe;
+ min?: Maybe;
+};
+
+/** aggregate fields of "auth_options" */
+export type Auth_Options_Aggregate_FieldsCountArgs = {
+ columns?: InputMaybe>;
+ distinct?: InputMaybe;
+};
+
+/** Boolean expression to filter rows from the table "auth_options". All fields are combined with a logical 'AND'. */
+export type Auth_Options_Bool_Exp = {
+ _and?: InputMaybe>;
+ _not?: InputMaybe;
+ _or?: InputMaybe>;
+ auth?: InputMaybe;
+ datasources?: InputMaybe;
+ datasources_aggregate?: InputMaybe;
+};
+
+/** unique or primary key constraints on table "auth_options" */
+export enum Auth_Options_Constraint {
+ /** unique or primary key constraint on columns "auth" */
+ AuthOptionsPkey = "auth_options_pkey",
+}
+
+export enum Auth_Options_Enum {
+ Private = "private",
+ Shared = "shared",
+}
+
+/** Boolean expression to compare columns of type "auth_options_enum". All fields are combined with logical 'AND'. */
+export type Auth_Options_Enum_Comparison_Exp = {
+ _eq?: InputMaybe;
+ _in?: InputMaybe>;
+ _is_null?: InputMaybe;
+ _neq?: InputMaybe;
+ _nin?: InputMaybe>;
+};
+
+/** input type for inserting data into table "auth_options" */
+export type Auth_Options_Insert_Input = {
+ auth?: InputMaybe;
+ datasources?: InputMaybe;
+};
+
+/** aggregate max on columns */
+export type Auth_Options_Max_Fields = {
+ __typename?: "auth_options_max_fields";
+ auth?: Maybe;
+};
+
+/** aggregate min on columns */
+export type Auth_Options_Min_Fields = {
+ __typename?: "auth_options_min_fields";
+ auth?: Maybe;
+};
+
+/** response of any mutation on the table "auth_options" */
+export type Auth_Options_Mutation_Response = {
+ __typename?: "auth_options_mutation_response";
+ /** number of rows affected by the mutation */
+ affected_rows: Scalars["Int"]["output"];
+ /** data from the rows affected by the mutation */
+ returning: Array;
+};
+
+/** input type for inserting object relation for remote table "auth_options" */
+export type Auth_Options_Obj_Rel_Insert_Input = {
+ data: Auth_Options_Insert_Input;
+ /** upsert condition */
+ on_conflict?: InputMaybe;
+};
+
+/** on_conflict condition type for table "auth_options" */
+export type Auth_Options_On_Conflict = {
+ constraint: Auth_Options_Constraint;
+ update_columns?: Array;
+ where?: InputMaybe;
+};
+
+/** Ordering options when selecting data from "auth_options". */
+export type Auth_Options_Order_By = {
+ auth?: InputMaybe;
+ datasources_aggregate?: InputMaybe;
+};
+
+/** primary key columns input for table: auth_options */
+export type Auth_Options_Pk_Columns_Input = {
+ auth: Scalars["String"]["input"];
+};
+
+/** select columns of table "auth_options" */
+export enum Auth_Options_Select_Column {
+ /** column name */
+ Auth = "auth",
+}
+
+/** input type for updating data in table "auth_options" */
+export type Auth_Options_Set_Input = {
+ auth?: InputMaybe;
+};
+
+/** Streaming cursor of the table "auth_options" */
+export type Auth_Options_Stream_Cursor_Input = {
+ /** Stream column input with initial value */
+ initial_value: Auth_Options_Stream_Cursor_Value_Input;
+ /** cursor ordering */
+ ordering?: InputMaybe;
+};
+
+/** Initial value of the column from where the streaming should start */
+export type Auth_Options_Stream_Cursor_Value_Input = {
+ auth?: InputMaybe;
+};
+
+/** update columns of table "auth_options" */
+export enum Auth_Options_Update_Column {
+ /** column name */
+ Auth = "auth",
+}
+
+export type Auth_Options_Updates = {
+ /** sets the columns of the filtered rows to the given values */
+ _set?: InputMaybe;
+ /** filter the rows which have to be updated */
+ where: Auth_Options_Bool_Exp;
+};
+
/** columns and relationships of "auth.providers" */
export type Auth_Providers = {
__typename?: "auth_providers";
@@ -2576,9 +2912,31 @@ export type Auth_Roles_Updates = {
/** columns and relationships of "branch_statuses" */
export type Branch_Statuses = {
__typename?: "branch_statuses";
+ /** An array relationship */
+ branches: Array;
+ /** An aggregate relationship */
+ branches_aggregate: Branches_Aggregate;
status: Scalars["String"]["output"];
};
+/** columns and relationships of "branch_statuses" */
+export type Branch_StatusesBranchesArgs = {
+ distinct_on?: InputMaybe>;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ order_by?: InputMaybe>;
+ where?: InputMaybe;
+};
+
+/** columns and relationships of "branch_statuses" */
+export type Branch_StatusesBranches_AggregateArgs = {
+ distinct_on?: InputMaybe>;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ order_by?: InputMaybe>;
+ where?: InputMaybe;
+};
+
/** aggregated selection of "branch_statuses" */
export type Branch_Statuses_Aggregate = {
__typename?: "branch_statuses_aggregate";
@@ -2605,6 +2963,8 @@ export type Branch_Statuses_Bool_Exp = {
_and?: InputMaybe>;
_not?: InputMaybe;
_or?: InputMaybe>;
+ branches?: InputMaybe;
+ branches_aggregate?: InputMaybe;
status?: InputMaybe;
};
@@ -2631,6 +2991,7 @@ export type Branch_Statuses_Enum_Comparison_Exp = {
/** input type for inserting data into table "branch_statuses" */
export type Branch_Statuses_Insert_Input = {
+ branches?: InputMaybe;
status?: InputMaybe;
};
@@ -2671,6 +3032,7 @@ export type Branch_Statuses_On_Conflict = {
/** Ordering options when selecting data from "branch_statuses". */
export type Branch_Statuses_Order_By = {
+ branches_aggregate?: InputMaybe;
status?: InputMaybe;
};
@@ -3061,17 +3423,315 @@ export type Citext_Comparison_Exp = {
_similar?: InputMaybe;
};
-/** fields of action: "create_events" */
-export type Create_Events = {
- __typename?: "create_events";
- /** the time at which this action was created */
- created_at: Scalars["timestamptz"]["output"];
- /** errors related to the invocation */
- errors?: Maybe;
- /** the unique id of an action */
- id: Scalars["uuid"]["output"];
- /** the output fields of this action */
- output: Events_Create_Mutation_Response;
+/** fields of action: "create_events" */
+export type Create_Events = {
+ __typename?: "create_events";
+ /** the time at which this action was created */
+ created_at: Scalars["timestamptz"]["output"];
+ /** errors related to the invocation */
+ errors?: Maybe;
+ /** the unique id of an action */
+ id: Scalars["uuid"]["output"];
+ /** the output fields of this action */
+ output: Events_Create_Mutation_Response;
+};
+
+/** columns and relationships of "credentials" */
+export type Credentials = {
+ __typename?: "credentials";
+ /** An object relationship */
+ accessTypeByAccessType: Access_Types;
+ access_type: Access_Types_Enum;
+ created_at: Scalars["timestamptz"]["output"];
+ /** An object relationship */
+ datasource: Datasources;
+ datasource_id: Scalars["uuid"]["output"];
+ id: Scalars["uuid"]["output"];
+ /** An array relationship */
+ member_credentials: Array;
+ /** An aggregate relationship */
+ member_credentials_aggregate: Member_Credentials_Aggregate;
+ password?: Maybe;
+ updated_at: Scalars["timestamptz"]["output"];
+ /** An object relationship */
+ user: Users;
+ user_id: Scalars["uuid"]["output"];
+ username: Scalars["String"]["output"];
+};
+
+/** columns and relationships of "credentials" */
+export type CredentialsMember_CredentialsArgs = {
+ distinct_on?: InputMaybe>;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ order_by?: InputMaybe>;
+ where?: InputMaybe;
+};
+
+/** columns and relationships of "credentials" */
+export type CredentialsMember_Credentials_AggregateArgs = {
+ distinct_on?: InputMaybe>;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ order_by?: InputMaybe>;
+ where?: InputMaybe;
+};
+
+/** aggregated selection of "credentials" */
+export type Credentials_Aggregate = {
+ __typename?: "credentials_aggregate";
+ aggregate?: Maybe;
+ nodes: Array;
+};
+
+export type Credentials_Aggregate_Bool_Exp = {
+ count?: InputMaybe;
+};
+
+export type Credentials_Aggregate_Bool_Exp_Count = {
+ arguments?: InputMaybe>;
+ distinct?: InputMaybe;
+ filter?: InputMaybe;
+ predicate: Int_Comparison_Exp;
+};
+
+/** aggregate fields of "credentials" */
+export type Credentials_Aggregate_Fields = {
+ __typename?: "credentials_aggregate_fields";
+ count: Scalars["Int"]["output"];
+ max?: Maybe;
+ min?: Maybe;
+};
+
+/** aggregate fields of "credentials" */
+export type Credentials_Aggregate_FieldsCountArgs = {
+ columns?: InputMaybe>;
+ distinct?: InputMaybe;
+};
+
+/** order by aggregate values of table "credentials" */
+export type Credentials_Aggregate_Order_By = {
+ count?: InputMaybe;
+ max?: InputMaybe;
+ min?: InputMaybe;
+};
+
+/** input type for inserting array relation for remote table "credentials" */
+export type Credentials_Arr_Rel_Insert_Input = {
+ data: Array;
+ /** upsert condition */
+ on_conflict?: InputMaybe;
+};
+
+/** Boolean expression to filter rows from the table "credentials". All fields are combined with a logical 'AND'. */
+export type Credentials_Bool_Exp = {
+ _and?: InputMaybe>;
+ _not?: InputMaybe;
+ _or?: InputMaybe>;
+ accessTypeByAccessType?: InputMaybe;
+ access_type?: InputMaybe;
+ created_at?: InputMaybe;
+ datasource?: InputMaybe;
+ datasource_id?: InputMaybe;
+ id?: InputMaybe;
+ member_credentials?: InputMaybe;
+ member_credentials_aggregate?: InputMaybe;
+ password?: InputMaybe;
+ updated_at?: InputMaybe;
+ user?: InputMaybe;
+ user_id?: InputMaybe;
+ username?: InputMaybe;
+};
+
+/** unique or primary key constraints on table "credentials" */
+export enum Credentials_Constraint {
+ /** unique or primary key constraint on columns "id" */
+ CredentialsPkey = "credentials_pkey",
+}
+
+/** input type for inserting data into table "credentials" */
+export type Credentials_Insert_Input = {
+ accessTypeByAccessType?: InputMaybe;
+ access_type?: InputMaybe;
+ created_at?: InputMaybe;
+ datasource?: InputMaybe;
+ datasource_id?: InputMaybe;
+ id?: InputMaybe;
+ member_credentials?: InputMaybe;
+ password?: InputMaybe;
+ updated_at?: InputMaybe;
+ user?: InputMaybe;
+ user_id?: InputMaybe;
+ username?: InputMaybe;
+};
+
+/** aggregate max on columns */
+export type Credentials_Max_Fields = {
+ __typename?: "credentials_max_fields";
+ created_at?: Maybe;
+ datasource_id?: Maybe;
+ id?: Maybe;
+ password?: Maybe;
+ updated_at?: Maybe;
+ user_id?: Maybe;
+ username?: Maybe;
+};
+
+/** order by max() on columns of table "credentials" */
+export type Credentials_Max_Order_By = {
+ created_at?: InputMaybe;
+ datasource_id?: InputMaybe;
+ id?: InputMaybe;
+ password?: InputMaybe;
+ updated_at?: InputMaybe;
+ user_id?: InputMaybe;
+ username?: InputMaybe;
+};
+
+/** aggregate min on columns */
+export type Credentials_Min_Fields = {
+ __typename?: "credentials_min_fields";
+ created_at?: Maybe;
+ datasource_id?: Maybe;
+ id?: Maybe;
+ password?: Maybe;
+ updated_at?: Maybe;
+ user_id?: Maybe;
+ username?: Maybe;
+};
+
+/** order by min() on columns of table "credentials" */
+export type Credentials_Min_Order_By = {
+ created_at?: InputMaybe;
+ datasource_id?: InputMaybe;
+ id?: InputMaybe;
+ password?: InputMaybe;
+ updated_at?: InputMaybe;
+ user_id?: InputMaybe;
+ username?: InputMaybe;
+};
+
+/** response of any mutation on the table "credentials" */
+export type Credentials_Mutation_Response = {
+ __typename?: "credentials_mutation_response";
+ /** number of rows affected by the mutation */
+ affected_rows: Scalars["Int"]["output"];
+ /** data from the rows affected by the mutation */
+ returning: Array;
+};
+
+/** input type for inserting object relation for remote table "credentials" */
+export type Credentials_Obj_Rel_Insert_Input = {
+ data: Credentials_Insert_Input;
+ /** upsert condition */
+ on_conflict?: InputMaybe;
+};
+
+/** on_conflict condition type for table "credentials" */
+export type Credentials_On_Conflict = {
+ constraint: Credentials_Constraint;
+ update_columns?: Array;
+ where?: InputMaybe;
+};
+
+/** Ordering options when selecting data from "credentials". */
+export type Credentials_Order_By = {
+ accessTypeByAccessType?: InputMaybe;
+ access_type?: InputMaybe;
+ created_at?: InputMaybe;
+ datasource?: InputMaybe;
+ datasource_id?: InputMaybe;
+ id?: InputMaybe;
+ member_credentials_aggregate?: InputMaybe;
+ password?: InputMaybe;
+ updated_at?: InputMaybe;
+ user?: InputMaybe;
+ user_id?: InputMaybe;
+ username?: InputMaybe;
+};
+
+/** primary key columns input for table: credentials */
+export type Credentials_Pk_Columns_Input = {
+ id: Scalars["uuid"]["input"];
+};
+
+/** select columns of table "credentials" */
+export enum Credentials_Select_Column {
+ /** column name */
+ AccessType = "access_type",
+ /** column name */
+ CreatedAt = "created_at",
+ /** column name */
+ DatasourceId = "datasource_id",
+ /** column name */
+ Id = "id",
+ /** column name */
+ Password = "password",
+ /** column name */
+ UpdatedAt = "updated_at",
+ /** column name */
+ UserId = "user_id",
+ /** column name */
+ Username = "username",
+}
+
+/** input type for updating data in table "credentials" */
+export type Credentials_Set_Input = {
+ access_type?: InputMaybe;
+ created_at?: InputMaybe;
+ datasource_id?: InputMaybe;
+ id?: InputMaybe;
+ password?: InputMaybe;
+ updated_at?: InputMaybe;
+ user_id?: InputMaybe;
+ username?: InputMaybe;
+};
+
+/** Streaming cursor of the table "credentials" */
+export type Credentials_Stream_Cursor_Input = {
+ /** Stream column input with initial value */
+ initial_value: Credentials_Stream_Cursor_Value_Input;
+ /** cursor ordering */
+ ordering?: InputMaybe;
+};
+
+/** Initial value of the column from where the streaming should start */
+export type Credentials_Stream_Cursor_Value_Input = {
+ access_type?: InputMaybe;
+ created_at?: InputMaybe;
+ datasource_id?: InputMaybe;
+ id?: InputMaybe;
+ password?: InputMaybe;
+ updated_at?: InputMaybe;
+ user_id?: InputMaybe;
+ username?: InputMaybe;
+};
+
+/** update columns of table "credentials" */
+export enum Credentials_Update_Column {
+ /** column name */
+ AccessType = "access_type",
+ /** column name */
+ CreatedAt = "created_at",
+ /** column name */
+ DatasourceId = "datasource_id",
+ /** column name */
+ Id = "id",
+ /** column name */
+ Password = "password",
+ /** column name */
+ UpdatedAt = "updated_at",
+ /** column name */
+ UserId = "user_id",
+ /** column name */
+ Username = "username",
+}
+
+export type Credentials_Updates = {
+ /** sets the columns of the filtered rows to the given values */
+ _set?: InputMaybe;
+ /** filter the rows which have to be updated */
+ where: Credentials_Bool_Exp;
};
/** ordering argument of a cursor */
@@ -3682,18 +4342,23 @@ export type Dataschemas_Updates = {
/** columns and relationships of "datasources" */
export type Datasources = {
__typename?: "datasources";
+ auth: Auth_Options_Enum;
+ /** An object relationship */
+ auth_option: Auth_Options;
/** An array relationship */
branches: Array;
/** An aggregate relationship */
branches_aggregate: Branches_Aggregate;
created_at: Scalars["timestamptz"]["output"];
/** An array relationship */
+ credentials: Array;
+ /** An aggregate relationship */
+ credentials_aggregate: Credentials_Aggregate;
+ /** An array relationship */
dataschemas: Array;
/** An aggregate relationship */
dataschemas_aggregate: Dataschemas_Aggregate;
db_params: Scalars["jsonb"]["output"];
- /** A computed field, executes function "hide_password" */
- db_params_computed?: Maybe