diff --git a/.gitignore b/.gitignore index dbf9efd3..30bf2351 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,13 @@ node_modules __pycache__/ -scripts +/scripts/* +!/scripts/connector_capabilities.json +!/scripts/production_providers.json +!/scripts/dashboard_provider_names.json +!/scripts/production_filter_keys.json +!/scripts/connector_pages/ +!/scripts/generate_connector_pages.py +!/scripts/test_connector_pages.py .nvmrc # mintlify-hygiene CLI (downloaded via install script) diff --git a/AGENTS.mdx b/AGENTS.mdx index 9b390e8e..0f894235 100644 --- a/AGENTS.mdx +++ b/AGENTS.mdx @@ -1,5 +1,5 @@ --- -title: "HydraDB Agent Integration Guide" +title: "Complete Agent Integration Guide" description: "The one page an AI coding agent reads before writing a HydraDB v2 integration: rules, API contracts, and runnable examples." --- @@ -9,7 +9,7 @@ This is the complete, maintained agent guide. Continue with the sections below; 1. **`POST /databases`** (`client.databases.create()`): Create an isolated database. Creation is asynchronous. 2. **`GET /databases/status`** (`client.databases.status()`): Poll until `infra.ready_for_ingestion` is true before you ingest or query. -3. **`POST /context/ingest`** (`client.context.ingest()`): Ingest files, app sources, or memories with `type="knowledge"` or `type="memory"`. Indexing is asynchronous. +3. **`POST /context/ingest`** (`client.context.ingest()`): Ingest files or memories with `type="knowledge"` or `type="memory"`. Indexing is asynchronous. 4. **`GET /context/status`** (`client.context.status()`): Poll by `ids` until `indexing_status` is `completed` before you query. `graph_creation` means the source is becoming searchable while its graph builds, but a query sent the moment it appears can still miss the source. `errored` means indexing failed: read `error_code` and `error_message`. Details in [7. Context status and lifecycle](#7-context-status-and-lifecycle). 5. **`POST /query`** (`client.query()`): Retrieve chunks with `type: "knowledge"`, `"memory"`, or `"all"`. 6. **`POST /feedback`** (`client.feedback.submit()`): Tell us when a query did not give you what you needed, and once the task is done, how the context held up. See [Sending feedback](#sending-feedback). @@ -60,7 +60,7 @@ Raw HTTP responses are wrapped: - `metadata`: schema-aligned fields, declared at database creation; the fast filter path. Filter on them with top-level `metadata_filters` keys. - `additional_metadata`: free-form fields; anything not in the `metadata` schema. Filter on them with `metadata_filters.additional_metadata`. -- Set both per source on `/context/ingest`: on each `document_metadata[]` item (file uploads), each `app_knowledge[]` item, or each memory item. There is no top-level `metadata` or `additional_metadata` form field. +- Set both per source on `/context/ingest`: on each `document_metadata[]` item (file uploads) or each memory item. There is no top-level `metadata` or `additional_metadata` form field. Schema fields, placement, and filter operators are in [10. Metadata guide](#10-metadata-guide). @@ -76,6 +76,8 @@ Schema fields, placement, and filter operators are in [10. Metadata guide](#10-m - A query with no `acl`, `[]`, or `["*"]` is not filtered: it returns everything in scope, including sources restricted to other people. - Derive `acl` from your authenticated session, never from client input. See [Access control](#access-control). - Do not turn on a connector's `enforce_acl` for an application that serves many users through one API key. With `enforce_acl` on, HydraDB ignores the request's `acl` for that connector's content and uses the email of whoever created the API key, so every user sees what the key's creator may see. Leave it off and send `acl` yourself. +- Under `enforce_acl`, the identity comes from authentication: an API key or pasted-key MCP uses the key creator's email, and MCP OAuth and the dashboard use the signed-in user. A request `acl` still scopes content from non-enforced connectors. +- If you send `acl` and an enforced connector ignores it, a successful response includes one `meta.warnings` entry with code `acl_ignored_by_connector_enforcement`. Treat it as a signal that your `acl` did not apply to that content. ### Sending feedback @@ -197,7 +199,7 @@ Scoping rules are in [Do not mix scopes accidentally](#do-not-mix-scopes-acciden ### Knowledge -Knowledge is the documents, app sources, and facts your AI reasons over: PDFs, Markdown, CSVs, Slack threads, Notion pages, Gmail threads, tickets, webpages, and so on. Ingest and query it with `type: "knowledge"`. +Knowledge is the documents and facts your AI reasons over: PDFs, Markdown, and CSVs you upload, plus Slack threads, Notion pages, Gmail threads, tickets, and other content that [connectors](#connectors) sync from your apps. Ingest and query it with `type: "knowledge"`. - It can be private: restrict sources with `acl` (see [Access control](#access-control)). - Mutability is explicit: re-ingest with the same ID and `upsert: true`, edit metadata in place with `PATCH /context/{id}/metadata`, or delete. @@ -220,9 +222,9 @@ HydraDB builds a graph of entity/relation triplets from ingested content. When ` Graph context augments the result; it does not replace `chunks`. -### Forceful relations +### Explicit relations -Forceful relations are links you declare between sources at ingest: +Explicit relations are links you declare between sources at ingest: ```json { @@ -234,14 +236,14 @@ Forceful relations are links you declare between sources at ingest: ``` - Use `ids`. -- Declare `relations` on `document_metadata[]` and `app_knowledge[]` items. They link knowledge sources; memory items do not take `relations`. -- A query pulls the related chunks into `additional_context` only in `mode: "thinking"` with `query_forceful_relations: true` (the default). +- Declare `relations` on `document_metadata[]` items. They link knowledge sources; memory items do not take `relations`. +- A query pulls the related chunks into `data.additional_graph_context` only in `mode: "thinking"` with `query_explicit_relations: true` (the default). The legacy response alias `data.additional_context` contains the same map. ### Access control A source's `acl` lists who may retrieve it; a query's `acl` says who is asking. The query-side rule is in [Send `acl` on user queries](#send-acl-on-user-queries). -- Set `acl` on `app_knowledge[]` items at ingest, or on any existing source with `PATCH /context/{id}/metadata`, where it replaces the stored list. +- Set `acl` on any existing source with `PATCH /context/{id}/metadata`, where it replaces the stored list. - Connectors copy permissions from Slack, Google Drive, GitHub, Confluence, Jira, and other providers on every sync. - Principals: an email (`grace@acme.com`), `domain:acme.com`, `group::`, or `__public__`. - On a query, the caller's email also matches its `domain:` principal and `__public__` automatically. Group membership is never derived from an email; send `group:` principals yourself. @@ -251,7 +253,7 @@ Example: a source with `"acl": ["grace@acme.com"]` comes back for a query with ` ### Connectors -Connectors sync context from 70 apps, including Slack, Gmail, Google Drive, Notion, Jira, Confluence, GitHub, Linear, HubSpot, and Zendesk, into a database on a schedule, with no ingestion code. Prefer a connector over hand-written `app_knowledge` ingestion when the app is in the catalog; `GET /connectors/providers` lists it. +Connectors sync context from 70+ apps, including Slack, Gmail, Google Drive, Notion, Jira, Confluence, GitHub, Linear, HubSpot, and Zendesk, into a database on a schedule, with no ingestion code. Indexing is permission-aware: for providers with `acl_supported: true`, each synced source carries the provider's own access rules. App content reaches HydraDB through connectors; `GET /connectors/providers` lists the catalog. Setup is four calls, made once: @@ -308,6 +310,26 @@ Rules: - Every synced source carries `connector_id` and `provider` in `metadata`, and `connector_id` and `resource_id` in `additional_metadata`; filter on them to scope a query. - `custom_instructions` on the connector or one resource tells HydraDB how to read its documents, from the next sync on. +### Bring Your Own Graph (BYOG) + +To build and query your own graph in Cypher, for example when migrating from Neo4j or another Cypher-compatible store, use the `/byog` endpoints instead of `/context/ingest`: + +| Endpoint | Purpose | +| --- | --- | +| `POST /byog/databases` | Create a database; ready immediately. Returns `409` if the name exists | +| `POST /byog/query` | Run Cypher against one `collection`, with user data in `params` | +| `GET /byog/collections` | List a database's graph collections | +| `DELETE /byog/collections` | Drop one collection | +| `DELETE /byog/databases` | Drop a database | + +- Each collection is an isolated graph, created on first write. Reading one that does not exist yet returns zero rows. +- Pass user data through `params`, never by building it into the query string. +- Procedure calls (`CALL db.*`, `CALL apoc.*`) and `LOAD CSV` are not supported. +- Limits: 256 KiB request body (`413`), 8 s for reads and 30 s for writes (`400` on timeout). Rows beyond the result-set cap are silently dropped, so paginate large reads. +- Agents can run the same Cypher through the HydraDB MCP graph tools: `hydradb_graph_query`, `hydradb_graph_collections`, and `hydradb_graph_admin`. + +Full guide: `https://docs.hydradb.com/essentials/v2/bring-your-own-graph`. + --- ## 3. Installation and client setup @@ -352,7 +374,7 @@ SDK naming: - Python methods and fields are snake_case: `databases.get_metadata_schema()`, `page_size`, `query_by`. - TypeScript methods and fields are camelCase: `databases.getMetadataSchema()`, `pageSize`, `queryBy`. -- Values passed as JSON strings (`memories`, `app_knowledge`, `document_metadata`) keep snake_case keys inside the stringified payload in both SDKs, because that is raw wire data. +- Values passed as JSON strings (`memories`, `document_metadata`) keep snake_case keys inside the stringified payload in both SDKs, because that is raw wire data. --- @@ -554,7 +576,6 @@ The collections, stats, and delete routes also take `database` as a query parame | `upsert` | default `true`; replaces existing sources with the same ID | | `documents` | binary file uploads for knowledge | | `document_metadata` | JSON-stringified array, one item per uploaded file; see [Knowledge from files](#knowledge-from-files) | -| `app_knowledge` | JSON-stringified object/array of pre-extracted app sources | | `memories` | JSON-stringified array of memory items | ### Knowledge from files @@ -571,7 +592,7 @@ Use for files HydraDB should parse. Supported extensions: | Plain text | `.txt` `.md` `.markdown` `.json` | - Any other extension, including source code (`.py`, `.ts`, `.go`), `.html`, and `.zip`, is rejected. The request still returns `202`; the rejected file comes back in `data.results` with `status: "failed"` and `error_code: "E1002"`, and has no status record to poll. Check every result item before polling. -- To ingest source code, upload it with `.txt` added to the filename (`auth.py.txt`) and keep the real path in `additional_metadata`, or send its text as an app source. +- To ingest source code, upload it with `.txt` added to the filename (`auth.py.txt`) and keep the real path in `additional_metadata`. - The `Content-Type` of the part is used only when the filename has no extension. ```python @@ -601,62 +622,6 @@ with open("policy.pdf", "rb") as f: | `additional_metadata` | free-form fields for this file (max 1 KiB compact JSON) | | `relations` | relations you declare to other sources, e.g. `{ "ids": [...] }` | -### Knowledge from app sources - -Use `app_knowledge` when you already extracted the text from Slack, Gmail, Jira, Linear, Zendesk, Notion, Confluence, Salesforce, webpages, and so on. - -```ts -await client.context.ingest({ - type: "knowledge", - database: "acme_corp", - appKnowledge: JSON.stringify([ - { - id: "slack_C123_1715012345_000100", - title: "Pricing discussion - Slack #product", - kind: "message", - provider: "slack", - external_id: "1715012345.000100", - url: "https://slack.com/archives/C123/p1715012345000100", - timestamp: "2025-01-15T12:30:00Z", - fields: { - kind: "message", - body: "We agreed on three tiers: Starter, Pro, and Enterprise.", - author: "alice", - thread_id: "1715012345.000100", - created_at: "2025-01-15T12:30:00Z", - }, - metadata: { - channel: "product", - workspace: "acme", - }, - additional_metadata: { - slack_ts: "1715012345.000100", - }, - relations: { - ids: ["slack_thread_root_001"], - }, - } - ]), -}); -``` - -Recommended app-source fields: - -| Field | Why send it | -|---|---| -| `id` | stable HydraDB ID and upsert key | -| `title` | readable result/citation title | -| `kind` | what the record is: `email`, `message`, `ticket`, `knowledge_base`, `comment`, `meeting`, or `custom` | -| `provider`, `external_id` | the app it came from and its ID there | -| `fields` | the record's content and structure for that kind, such as `body`, `author`, and `thread_id`; `fields.kind` must equal `kind` | -| `metadata` | fast filters such as channel, project, region, workspace | -| `additional_metadata` | provider IDs, status, assignee, timestamps | -| `url` | citation / navigation link | -| `timestamp` | freshness and chronology | -| `relations.ids` | thread, parent/child, linked issue, related source expansion | - -Kinds in OpenAPI are `email`, `message`, `ticket`, `knowledge_base`, `comment`, `meeting`, and `custom`. An older shape with `type` and `content.text` in place of `kind` and `fields` is still accepted; do not use it in new code. See [Context](https://docs.hydradb.com/essentials/v2/context.md) for the keys each kind takes in `fields`. At minimum provide a stable `id`, `kind`, `fields`, and the `metadata` you filter on. - ### Memories Use `type="memory"` and a JSON-stringified `memories` array. @@ -691,8 +656,7 @@ Memory item fields: | `text` | raw text or Markdown; required unless `user_assistant_pairs` provided | | `user_assistant_pairs` | dialogue pairs `{ user, assistant }`; useful for implied preferences | | `is_markdown` | preserve Markdown structure during chunking | -| `infer` | `true`: the input is raw signal and HydraDB extracts the durable preference or fact. `false`: the memory is already structured and is stored verbatim | -| `custom_instructions` | guide inference when `infer: true` | +| `infer` | defaults to `true` when omitted: HydraDB extracts the durable preference or fact. Explicit `false` stores the memory verbatim | | `user_name` | helps inference | | `metadata` | schema-aligned fields, as an object (do not stringify it again inside `memories`). `tenant_metadata` is not read on memory items. | | `additional_metadata` | free-form fields; keep as objects | @@ -770,7 +734,7 @@ Headers: `X-HydraDB-Delivery-ID`, `X-HydraDB-Event`, and `X-HydraDB-Signature` w Signature scheme: -``` +```text X-HydraDB-Signature: sha256= digest = HMAC-SHA256(key = signing_secret, message = raw request body bytes) @@ -804,21 +768,21 @@ Rules: |---|---|---| | `database` | string | required | | `collection` | string/null | the collection the context was saved in; default collection if omitted | -| `collections` | list of collection IDs | query several collections at once; every listed collection must exist | +| `collections` | list of collection IDs, or an object of weights | query up to 100 collections at once; every listed collection must exist. Send weights, such as `{"user_alex": 2, "company_docs": 1}`, to rank one collection over another | | `query` | string | required | -| `type` | `knowledge`, `memory`, `all` | store selector for knowledge, memories, or both | +| `type` | `knowledge`, `memory`, `all` | defaults to `all`, searching knowledge and memories; choose a type to narrow it | | `acl` | list of principals | who is asking; see [Send `acl` on user queries](#send-acl-on-user-queries) | | `query_by` | `hybrid`, `text` | default `hybrid` (semantic + BM25); `text` is BM25 keyword/phrase search | | `operator` | `or`, `and`, `phrase` | only for `query_by: "text"` | -| `mode` | `fast`, `thinking`, `auto` | applies to hybrid; omitted means `auto`, which picks fast or thinking per query (thinking when unsure). `fast` is low latency. `thinking` adds query expansion, reranking, richer graph traversal, and forceful-relation expansion; it improves quality but adds latency | +| `mode` | `fast`, `thinking`, `auto` | applies to hybrid; omitted means `auto`, which picks fast or thinking per query (thinking when unsure). `fast` is low latency. `thinking` adds query expansion, reranking, richer graph traversal, and explicit-relation expansion; it improves quality but adds latency | | `max_results` | integer/null | default 10; max 250 | | `alpha` | `0.0` to `1.0`, or `auto` | hybrid weight; `1.0` semantic, `0.0` BM25 | -| `recency_bias` | `0.0` to `1.0` | boost newer content; omitted means `0.4`, send `0` to disable | +| `recency_bias` | `0.0` to `1.0` | boost newer content; omitted means `0.6`, send `0` to disable | | `graph_context` | boolean | default true; include graph slice; `false` only takes effect in fast mode, thinking always includes it | -| `query_forceful_relations` | boolean | only effective in `thinking` mode | -| `additional_context` | string | short factual hint; not a hard filter | +| `query_explicit_relations` | boolean | default true; returns explicitly related chunks in `data.additional_graph_context`; only effective in `thinking` mode | +| `additional_graph_context` | string | short factual hint that sharpens retrieval; not a hard filter | | `metadata_filters` | object | deterministic filters before/around ranking | -| `query_apps` | boolean | app-aware retrieval lane for app sources; still searches the full selected knowledge scope; defaults to `true` on `/query`, send `false` to disable | +| `query_apps` | boolean | app-aware retrieval lane for content synced by connectors; still searches the full selected knowledge scope; defaults to `true` on `/query`, send `false` to disable | `type: "all"` reads both stores from the same scope. When shared knowledge lives in its own collection, send `collections: ["", ""]`. @@ -832,7 +796,7 @@ Rules: | User preferences only | `type: "memory"`, include `collection`, `query_by: "hybrid"` | | Exact keyword / phrase | `type: "knowledge"`, `query_by: "text"`, `operator: "phrase"` | | Recent operational updates | `query_by: "hybrid"`, `recency_bias: 0.6-0.8`, metadata filter to doc type/status | -| App search | `type: "knowledge"`, `query_by: "hybrid"`, `mode: "thinking"`, `query_apps: true`; still searches non-app knowledge too | +| App search | `type: "knowledge"`, `query_by: "hybrid"`, `mode: "thinking"`, `query_apps: true`; still searches uploaded files too | ### Query examples @@ -919,23 +883,26 @@ The successful `data` object / SDK return is a `RetrievalResult`: "chunk_relations": [], "chunk_id_to_group_ids": {} }, - "additional_context": {} + "additional_graph_context": {}, + "llm_prompt": "..." } ``` Each chunk's `id` is the ID of the source it came from, and `source_title` is that source's title: cite with these. The public result has no `sources` array. +`llm_prompt` is the result rendered as Markdown for a model, with the ranked results numbered `[1]`, `[2]`, and so on. + Use `chunks` as the primary LLM context. Preserve server order, which is the ranking; do not re-sort unless you have a deliberate reranking step. --- ## 9. Turning query results into LLM prompts -- Do not pass raw result JSON to the LLM if token budget matters. Use the SDK formatting helper to produce a compact context string: `build_string(result)` from `hydra_db.helpers` (Python) or `buildString(result)` from `@hydradb/sdk/helpers` (TypeScript). +- Do not pass raw result JSON to the LLM if token budget matters. Use the SDK formatting helper to produce a compact context string: `build_string(result)` from `hydra_db.helpers` (Python) or `buildString(result)` from `@hydradb/sdk/helpers` (TypeScript). Both return `data.llm_prompt`, which numbers the ranked results `[1]`, `[2]`, and so on; ask the model to cite by those numbers. - Include a grounding instruction: answer only from the provided context, and say when the context is insufficient. - Start with `max_results: 10`; reduce it for tight context windows. - Use graph context only when it helps the question. -- Use `additional_context` to attach forcefully related chunks by `chunk_uuid` / `extra_context_ids`. +- Use `data.additional_graph_context` to attach explicitly related chunks by `chunk_uuid` / `extra_context_ids`. It is a response map, separate from the request's `additional_graph_context` string hint. The legacy `data.additional_context` response alias contains the same map. - For personalized answers, `type: "all"` is simplest: one result set already merges knowledge and memories. Python: @@ -1039,7 +1006,14 @@ Field options: | `data_type` | friendly names like `string`, `integer`, `float`, `boolean`, or backend types like `VARCHAR`, `INT*`, `JSON` | | `enable_dense_embedding` | semantically embed `VARCHAR` field | | `enable_sparse_embedding` | BM25 index `VARCHAR` field | -| `max_length` | max string length | +| `max_length` | max string length; default `1024`, maximum `65535`, and it cannot be raised after the field is created | + +Schema limits: + +- Up to 32 fields and 6 embedding flags per database. Embedding flags are valid only on `VARCHAR` fields. +- Field names are unique, case-insensitively. +- `ARRAY` is not a supported `data_type` and is rejected with `400`. For a multi-value field, store the values as one comma-joined `VARCHAR` and filter for a member with `contains`. +- Values must match their declared type, and undeclared `metadata` keys are rejected on ingest. ### Where metadata belongs @@ -1054,6 +1028,7 @@ Rules: - Plan hot filter fields before the first ingest. `PATCH /databases/{database}/metadata-schema` can add fields later, but cannot rename, retype, or reflag existing ones, and rejects `enable_dense_embedding` / `enable_sparse_embedding` (declare those at database creation). Changing an existing field definition requires a new database and re-ingestion. - Top-level `metadata_filters` keys must be declared in the metadata schema. They support `equals`, `contains`, and `contains_any`. Range and fuzzy matching belong in the query or a downstream reranker. +- Inside `metadata_filters.additional_metadata`, use bare values or arrays, not operators. An operator there, or a misspelled operator anywhere, does not error: it returns `200` with no results. - To change metadata on an indexed source, call `PATCH /context/{id}/metadata` (merges keys), or re-ingest with the same `id` and `upsert: true`. - Do not rename metadata keys without re-ingesting the affected sources. @@ -1229,7 +1204,7 @@ try { Most integrations follow the same architecture: 1. Create a database with a metadata schema for hot filters. -2. Ingest shared knowledge and app sources with stable IDs. +2. Upload shared knowledge with stable IDs, and connect apps with connectors. 3. Ingest user and session memories with `collection`. 4. Poll status or use webhooks. 5. Query with `type: "knowledge"`, `"memory"`, or `"all"`. @@ -1254,7 +1229,7 @@ Section 1, critical rules: Sections 2 to 7, ingestion and lifecycle: - [ ] Uploading a file with an unsupported extension, such as source code, and polling an ID that was rejected with `E1002`. -- [ ] Hand-writing `app_knowledge` ingestion for an app a connector already syncs. +- [ ] Writing your own ingestion for an app instead of using a connector. - [ ] Editing an existing connector resource with `POST /connectors/{id}/resources`, which returns `409` and changes nothing. - [ ] Querying right after database creation without polling readiness. - [ ] Querying right after ingestion without polling `context.status` or using webhooks. @@ -1268,7 +1243,8 @@ Sections 8 to 10, query and metadata: - [ ] Using undeclared `metadata` keys in `metadata_filters`. - [ ] Using `operator` without `query_by: "text"`. -- [ ] Expecting `query_forceful_relations` to work in `mode: "fast"`. +- [ ] Expecting `query_explicit_relations` to work in `mode: "fast"`. +- [ ] Putting operators inside `metadata_filters.additional_metadata`, or misspelling an operator, which silently returns no results. - [ ] Setting `graph_context: false` and expecting graph fields. - [ ] Reading `data.sources`, which the public result does not return; cite from each chunk's `id` and `source_title`. - [ ] Re-sorting chunks before prompting without a deliberate reranker. @@ -1292,7 +1268,7 @@ Every method is on the client: `client.` in both SDKs. Return shapes are | Databases | `databases.collections()` | `databases.collections()` | `GET /databases/collections` | List active collections | | Databases | `databases.delete_collection()` | `databases.deleteCollection()` | `DELETE /databases/collections` | Delete a collection | | Databases | `databases.delete()` | `databases.delete()` | `DELETE /databases` | Delete a database and all its data | -| Context | `context.ingest()` | `context.ingest()` | `POST /context/ingest` | Ingest files, app sources, or memories | +| Context | `context.ingest()` | `context.ingest()` | `POST /context/ingest` | Ingest files or memories | | Context | `context.status()` | `context.status()` | `GET /context/status` | Check indexing status | | Context | `context.list()` | `context.list()` | `POST /context/list` | Browse knowledge or memories | | Context | `context.inspect()` | `context.inspect()` | `GET /context/inspect` | Original content or a presigned URL | @@ -1377,64 +1353,6 @@ curl -s -X POST 'https://api.hydradb.com/query' \ | jq '.data.chunks' ``` -### 15.2 Raw HTTP: ingest app-source knowledge - -The raw HTTP form of [Knowledge from app sources](#knowledge-from-app-sources). `app_knowledge` must be a JSON string in multipart form data. - -```bash -curl -s -X POST 'https://api.hydradb.com/context/ingest' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -F "type=knowledge" \ - -F "database=acme_corp" \ - -F 'app_knowledge=[ - { - "id": "slack_C123_1715012345_000100", - "title": "Pricing discussion - Slack #product", - "kind": "message", - "provider": "slack", - "external_id": "1715012345.000100", - "url": "https://slack.com/archives/C123/p1715012345000100", - "timestamp": "2025-01-15T12:30:00Z", - "fields": { - "kind": "message", - "body": "We agreed on three tiers: Starter at $29, Pro at $79, Enterprise at $199.", - "author": "alice", - "thread_id": "1715012345.000100", - "created_at": "2025-01-15T12:30:00Z" - }, - "metadata": { - "channel": "product", - "workspace": "acme" - }, - "additional_metadata": { - "slack_ts": "1715012345.000100" - }, - "relations": { - "ids": ["slack_thread_root_001"] - } - } - ]' -``` - -Query it with app-aware retrieval: - -```bash -curl -s -X POST 'https://api.hydradb.com/query' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "database": "acme_corp", - "query": "What pricing tiers did product agree on?", - "type": "knowledge", - "query_by": "hybrid", - "mode": "thinking", - "query_apps": true, - "graph_context": true - }' | jq '.data.chunks' -``` - --- ## 16. Navigation and support diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ff6b5e2..686ff957 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -175,8 +175,8 @@ Use one term per concept. Literal field names, SDK identifiers, and error codes | collection | sub-tenant, namespace | | | context | data | Everything stored: knowledge and memories. | | source | item, object, doc | One stored unit with an `id`. "Document" and "file" are for uploaded files only. | -| app source | app knowledge, app record | The request field is `app_knowledge`. | -| kind | class | The type of an app source, set in `kind`. | +| app source | app knowledge, app record | A record a connector synced from an app. Use it only on connector pages; other pages say "content synced by connectors". | +| kind | class | The type of an app source, such as `message` or `ticket`. | | chunk | passage, snippet | Gloss once per page if needed: "chunks (passages of a source)". | | query | recall, search request | The operation behind `POST /query`. "Search" is fine as a plain verb. | | ingest | add, push, load | "Upload" for files only. "Sync" for connectors only. | diff --git a/README.md b/README.md index f33c8fe2..6d67d472 100644 --- a/README.md +++ b/README.md @@ -46,11 +46,14 @@ python .github/verify_v2_public_contract.py python -m unittest discover -s .github -p 'test_v2_schema_types.py' python scripts/verify_agents_endpoints.py python scripts/generate_llms_index.py --check +python scripts/generate_connector_pages.py --check pnpm mintlify validate ``` When adding or removing a documentation page, regenerate the complete agent index with `python scripts/generate_llms_index.py`. Mintlify serves the root `llms.txt`; `llms-full.txt` remains Mintlify-generated. These local contract tests don't prove live indexing or authenticated vendor workflows. +Connector capability pages are generated with `python scripts/generate_connector_pages.py` from `scripts/connector_capabilities.json`. The snapshot records the application and dashboard source commits, the export checksum, and the proven provider aliases. Refresh it from the public provider descriptions and source-backed dashboard setup guidance, not marketing labels or guessed object types. Keep empty object-type lists when the descriptor does not enumerate them, then register any new pages in `docs.json`. + ## Content Structure ``` diff --git a/api-reference/v2/endpoint/byog-create-database.mdx b/api-reference/v2/endpoint/byog-create-database.mdx new file mode 100644 index 00000000..1116ac38 --- /dev/null +++ b/api-reference/v2/endpoint/byog-create-database.mdx @@ -0,0 +1,63 @@ +--- +title: "Create Graph Database" +description: "Create a database for a graph you manage yourself." +openapi: "api-reference/v2/openapi.json POST /byog/databases" +--- + +Create a database before writing your graph. An existing name returns `409`. The response reports `status: "ready"` or `status: "provisioning"`; wait for [Database Status](/api-reference/v2/endpoint/database-status) to report readiness before querying a database that is still provisioning. + + + +```python Python SDK +response = client.byog.create_database( + database="crm", +) +print(response.data) +``` + +```typescript TypeScript SDK +const response = await client.byog.createDatabase({ + database: "crm", +}); +console.log(response.data); +``` + + +```bash cURL +curl -X POST 'https://api.hydradb.com/byog/databases' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{"database": "crm"}' +``` + + + + + +```json 200 +{ + "success": true, + "data": { + "database": "crm", + "status": "ready", + "cluster": "shared" + }, + "error": null, + "meta": { + "request_id": "req_byog_example", + "latency_ms": 12.3 + } +} +``` + + + + +Graph collections are created on their first write through [Query Graph](/api-reference/v2/endpoint/byog-query). An existing database created through the standard database API can also hold graph collections. + +## Related resources + +- [Query Graph](/api-reference/v2/endpoint/byog-query) +- [Delete Graph Database](/api-reference/v2/endpoint/byog-delete-database) +- [Bring Your Own Graph](/essentials/v2/bring-your-own-graph) diff --git a/api-reference/v2/endpoint/byog-delete-collection.mdx b/api-reference/v2/endpoint/byog-delete-collection.mdx new file mode 100644 index 00000000..afbc76c9 --- /dev/null +++ b/api-reference/v2/endpoint/byog-delete-collection.mdx @@ -0,0 +1,67 @@ +--- +title: "Delete Graph Collection" +description: "Delete one graph collection and all of its content." +openapi: "api-reference/v2/openapi.json DELETE /byog/collections" +--- + +Delete a collection from a graph you manage. Deleting a collection that does not exist also succeeds. This endpoint does not delete a managed context collection. + + + Deleting a graph collection removes all of its nodes and relations. This cannot be undone. + + + + +```python Python SDK +response = client.byog.delete_collection( + database="crm", + collection="contacts", +) +print(response.data) +``` + +```typescript TypeScript SDK +const response = await client.byog.deleteCollection({ + database: "crm", + collection: "contacts", +}); +console.log(response.data); +``` + + +```bash cURL +curl -X DELETE 'https://api.hydradb.com/byog/collections' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{"database": "crm", "collection": "contacts"}' +``` + + + + + +```json 200 +{ + "success": true, + "data": { + "database": "crm", + "collection": "contacts", + "deleted": true + }, + "error": null, + "meta": { + "request_id": "req_byog_example", + "latency_ms": 12.3 + } +} +``` + + + + +## Related resources + +- [List Graph Collections](/api-reference/v2/endpoint/byog-list-collections) +- [Delete Graph Database](/api-reference/v2/endpoint/byog-delete-database) +- [Bring Your Own Graph](/essentials/v2/bring-your-own-graph) diff --git a/api-reference/v2/endpoint/byog-delete-database.mdx b/api-reference/v2/endpoint/byog-delete-database.mdx new file mode 100644 index 00000000..6606c708 --- /dev/null +++ b/api-reference/v2/endpoint/byog-delete-database.mdx @@ -0,0 +1,68 @@ +--- +title: "Delete Graph Database" +description: "Remove graph collections and a BYOG-created database." +openapi: "api-reference/v2/openapi.json DELETE /byog/databases" +--- + +Delete all graph collections in a database. If the database was created through [Create Graph Database](/api-reference/v2/endpoint/byog-create-database), the database is deleted too. For a database created through the standard database API, only its graph collections are removed: `data.deleted` is `false` and the database remains. + + + This removes the graph collections and their content permanently. Check the database name before sending the request. + + + + +```python Python SDK +response = client.byog.delete_database( + database="crm", +) +print(response.data) +``` + +```typescript TypeScript SDK +const response = await client.byog.deleteDatabase({ + database: "crm", +}); +console.log(response.data); +``` + + +```bash cURL +curl -X DELETE 'https://api.hydradb.com/byog/databases' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{"database": "crm"}' +``` + + + + + +```json 200 +{ + "success": true, + "data": { + "database": "crm", + "deleted": true, + "deleted_collections": [ + "contacts" + ], + "cluster": "shared" + }, + "error": null, + "meta": { + "request_id": "req_byog_example", + "latency_ms": 12.3 + } +} +``` + + + + +## Related resources + +- [Create Graph Database](/api-reference/v2/endpoint/byog-create-database) +- [List Graph Collections](/api-reference/v2/endpoint/byog-list-collections) +- [Delete Database](/api-reference/v2/endpoint/delete-database): delete a standard database diff --git a/api-reference/v2/endpoint/byog-list-collections.mdx b/api-reference/v2/endpoint/byog-list-collections.mdx new file mode 100644 index 00000000..f331dafa --- /dev/null +++ b/api-reference/v2/endpoint/byog-list-collections.mdx @@ -0,0 +1,62 @@ +--- +title: "List Graph Collections" +description: "List the graph collections within a database." +openapi: "api-reference/v2/openapi.json GET /byog/collections" +--- + +List collections for a graph you manage. An unknown database returns `404`. This endpoint does not list managed context collections. + + + +```python Python SDK +response = client.byog.list_collections( + database="crm", +) +print(response.data) +``` + +```typescript TypeScript SDK +const response = await client.byog.listCollections({ + database: "crm", +}); +console.log(response.data); +``` + + +```bash cURL +curl 'https://api.hydradb.com/byog/collections?database=crm' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" +``` + + + + + +```json 200 +{ + "success": true, + "data": { + "database": "crm", + "collections": [ + "contacts" + ] + }, + "error": null, + "meta": { + "request_id": "req_byog_example", + "latency_ms": 12.3 + } +} +``` + + + + +The response's `data.collections` is a list of collection names. Use a name as `collection` on [Query Graph](/api-reference/v2/endpoint/byog-query). + +## Related resources + +- [Query Graph](/api-reference/v2/endpoint/byog-query) +- [Delete Graph Collection](/api-reference/v2/endpoint/byog-delete-collection) +- [Bring Your Own Graph](/essentials/v2/bring-your-own-graph) diff --git a/api-reference/v2/endpoint/byog-query-managed.mdx b/api-reference/v2/endpoint/byog-query-managed.mdx new file mode 100644 index 00000000..bf0b32f1 --- /dev/null +++ b/api-reference/v2/endpoint/byog-query-managed.mdx @@ -0,0 +1,69 @@ +--- +title: "Query Managed Graph" +description: "Run read-only Cypher against a managed context graph." +openapi: "api-reference/v2/openapi.json POST /byog" +--- + +Read the managed graph for one database and collection with Cypher. This endpoint rejects writes and schema changes. To read or write a graph you manage yourself, use [Query Graph](/api-reference/v2/endpoint/byog-query). + + + +```python Python SDK +response = client.byog.query_managed( + database="acme_corp", + collection="company_docs", + type="knowledge", + query="MATCH (n) RETURN n LIMIT 10", +) +print(response.data) +``` + +```typescript TypeScript SDK +const response = await client.byog.queryManaged({ + database: "acme_corp", + collection: "company_docs", + type: "knowledge", + query: "MATCH (n) RETURN n LIMIT 10", +}); +console.log(response.data); +``` + + +```bash cURL +curl -X POST 'https://api.hydradb.com/byog' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collection": "company_docs", + "type": "knowledge", + "query": "MATCH (n) RETURN n LIMIT 10" + }' +``` + + + + + +```json 200 +{ + "success": true, + "data": [], + "error": null, + "meta": { + "request_id": "req_byog_example", + "latency_ms": 12.3 + } +} +``` + + + + +Use the same collection as ingestion. `type` selects `knowledge` (the default) or `memory`; this endpoint does not accept `all`. The response's `data` is a list of result rows and can be empty. + +## Related resources + +- [Query Graph](/api-reference/v2/endpoint/byog-query): read and write your own graph +- [Bring Your Own Graph](/essentials/v2/bring-your-own-graph) diff --git a/api-reference/v2/endpoint/byog-query.mdx b/api-reference/v2/endpoint/byog-query.mdx new file mode 100644 index 00000000..2a9391f1 --- /dev/null +++ b/api-reference/v2/endpoint/byog-query.mdx @@ -0,0 +1,80 @@ +--- +title: "Query Graph" +description: "Run Cypher reads and writes against a graph you manage." +openapi: "api-reference/v2/openapi.json POST /byog/query" +--- + +Run Cypher against one graph collection in an existing database. A collection is created on its first write; reading a collection that does not exist returns no rows. This does not change the graph HydraDB extracts from managed context. + + + +```python Python SDK +response = client.byog.query( + database="crm", + collection="contacts", + query="CREATE (p:Person {name: $name}) RETURN p", + params={"name":"Alice"}, +) +print(response.data) +``` + +```typescript TypeScript SDK +const response = await client.byog.query({ + database: "crm", + collection: "contacts", + query: "CREATE (p:Person {name: $name}) RETURN p", + params: {"name":"Alice"}, +}); +console.log(response.data); +``` + + +```bash cURL +curl -X POST 'https://api.hydradb.com/byog/query' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "crm", + "collection": "contacts", + "query": "CREATE (p:Person {name: $name}) RETURN p", + "params": {"name": "Alice"} + }' +``` + + + + + +```json 200 +{ + "success": true, + "data": [ + { + "p": { + "id": 0, + "labels": [ + "Person" + ], + "name": "Alice" + } + } + ], + "error": null, + "meta": { + "request_id": "req_byog_example", + "latency_ms": 12.3 + } +} +``` + + + + +Pass user-supplied values through `params`, not by inserting them into the query string. The response's `data` is a list of result rows. For supported Cypher and migration examples, see [Bring Your Own Graph](/essentials/v2/bring-your-own-graph#supported-cypher). + +## Related resources + +- [Create Graph Database](/api-reference/v2/endpoint/byog-create-database): create the database first +- [List Graph Collections](/api-reference/v2/endpoint/byog-list-collections) +- [Query Managed Graph](/api-reference/v2/endpoint/byog-query-managed): read-only managed context diff --git a/api-reference/v2/endpoint/context-overview.mdx b/api-reference/v2/endpoint/context-overview.mdx index 45a51afd..4f1dd082 100644 --- a/api-reference/v2/endpoint/context-overview.mdx +++ b/api-reference/v2/endpoint/context-overview.mdx @@ -3,7 +3,7 @@ title: "Context: Overview" description: "Ingest, inspect, and manage knowledge and memories." --- -Context is everything you store in HydraDB: knowledge and memories. Each stored unit is a **source** (an uploaded document, an app source, or a memory). Ingestion returns an `id` for each source, and the other endpoints in this group take that `id`. +Context is everything you store in HydraDB: knowledge and memories. Each stored unit is a **source** (an uploaded document, a record a connector synced, or a memory). Ingestion returns an `id` for each source, and the other endpoints in this group take that `id`. ## Endpoint references @@ -11,7 +11,7 @@ SDK methods are listed by their Python names. The TypeScript SDK uses the same n | Endpoint | SDK method | Purpose | | --- | --- | --- | -| [`POST /context/ingest`](/api-reference/v2/endpoint/ingest-context) | `context.ingest` | Ingest documents, app sources, or memories. Asynchronous: sources are queued for indexing. | +| [`POST /context/ingest`](/api-reference/v2/endpoint/ingest-context) | `context.ingest` | Ingest documents or memories. Asynchronous: sources are queued for indexing. | | [`GET /context/status`](/api-reference/v2/endpoint/source-status) | `context.status` | Poll indexing progress | | [`POST /context/list`](/api-reference/v2/endpoint/list-context) | `context.list` | Browse stored sources or memories | | [`GET /context/inspect`](/api-reference/v2/endpoint/fetch-content) | `context.inspect` | Inspect original source content | @@ -22,15 +22,12 @@ SDK methods are listed by their Python names. The TypeScript SDK uses the same n ## Choose an ingest payload -`POST /context/ingest` accepts three payloads. `type` picks the store, and within `type=knowledge` you pick the payload shape: +`POST /context/ingest` accepts two payloads. `type` picks the store and the payload that goes with it: | To ingest | Send | Guide | | :-- | :-- | :-- | | PDFs, DOCX, CSVs, and other documents HydraDB should parse | `type=knowledge` and `documents` | [Context](/essentials/v2/context) | -| Slack messages, Notion pages, Gmail threads, or web pages with pre-extracted text | `type=knowledge` and `app_knowledge` | [Context](/essentials/v2/context#send-app-sources) | -| User preferences, conversation history, or inline notes | `type=memory` and `memories` | [Context](/essentials/v2/context#2-save-memories) | - -You can send `documents` and `app_knowledge` in the same request. +| User preferences, conversation history, or inline notes | `type=memory` and `memories` | [Context](/essentials/v2/context#ingesting-memory) | ## Typical call sequence @@ -48,7 +45,7 @@ flowchart LR SI([POST /context/ingest]) end - B -- Documents / app sources --> SI + B -- Documents --> SI B -- User memories --> SI SI --> Q([queued]) @@ -76,10 +73,10 @@ flowchart LR ## Key concepts -- **Knowledge and memories:** Knowledge is the documents, app sources, and facts your AI uses. Memories are preferences, decisions, and past conversations. Both live in a collection, and `type: "all"` on `POST /query` searches both from the same scope. -- **IDs:** `/context/ingest` returns an ID for each source. To assign your own, set `id` in the `document_metadata`, `app_knowledge`, or `memories` item. Use IDs to poll status, inspect content, and delete context. +- **Knowledge and memories:** Knowledge is the documents, content synced from your apps, and facts your AI uses. Memories are preferences, decisions, and past conversations. Both live in a collection, and `type: "all"` on `POST /query` searches both from the same scope. +- **IDs:** `/context/ingest` returns an ID for each source. To assign your own, set `id` in the `document_metadata` or `memories` item. Use IDs to poll status, inspect content, and delete context. - **Metadata:** [Metadata Filters](/essentials/v2/metadata) covers metadata fields, ingestion, updates, and filtering. -- **Forceful relations:** Links you declare between sources with `relations.ids`. In `thinking` mode, a query returns the linked sources in `additional_context` alongside the matching chunks. Set relations on the same `document_metadata` item as the file's metadata: +- **Deterministic relations:** Links you declare between sources with `relations.ids`. In `thinking` mode, a query returns the linked sources in `data.additional_graph_context` alongside the matching chunks. Set relations on the same `document_metadata` item as the file's metadata: ```python Python SDK import json @@ -100,7 +97,7 @@ with open("runbook.pdf", "rb") as f: ## Related -- [Knowledge: forceful relations](/essentials/v2/context#6-link-sources-that-belong-together): linking sources at ingestion -- [Context](/essentials/v2/context#2-save-memories): memories and knowledge, and when to use which +- [Knowledge: deterministic relations](/essentials/v2/context#6-link-sources-that-belong-together): linking sources at ingestion +- [Context](/essentials/v2/context#ingesting-memory): memories and knowledge, and when to use which - [Metadata Filters](/essentials/v2/metadata): schema-backed and free-form metadata - [Query: Overview](/api-reference/v2/endpoint/query-overview): retrieve ingested context diff --git a/api-reference/v2/endpoint/create-database.mdx b/api-reference/v2/endpoint/create-database.mdx index 816ef93d..acbe559a 100644 --- a/api-reference/v2/endpoint/create-database.mdx +++ b/api-reference/v2/endpoint/create-database.mdx @@ -116,7 +116,7 @@ curl -X POST 'https://api.hydradb.com/databases' \ | Name | Description | | --- | --- | | | Account-scoped database identifier. Use a stable ID up to 255 characters of lowercase letters, digits, `-`, and `_`; anything else, including uppercase or spaces, returns `400`. | -| | Database-level metadata fields. See the [schema field reference](/essentials/v2/metadata#schema-field-reference) for field options. | +| | Database-level metadata fields. See the [schema field reference](/essentials/v2/metadata#schema-fields) for field options. | ## Metadata schema rules diff --git a/api-reference/v2/endpoint/get-connector-status.mdx b/api-reference/v2/endpoint/get-connector-status.mdx index 4b01f282..7eba2356 100644 --- a/api-reference/v2/endpoint/get-connector-status.mdx +++ b/api-reference/v2/endpoint/get-connector-status.mdx @@ -82,7 +82,7 @@ For each resource, `status` is the result of its last sync. When a resource fail `acl_warning` on a resource means HydraDB could not read that resource's ACL from the provider. If you set an ACL on the resource, yours still applies. If you did not, its sources are readable by everyone until the next successful read. Set one with [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource) to restrict it in the meantime. - `page_acl_warning` means restrictions on some individual pages, for example in Confluence, could not be read, so those pages are readable by everyone until a later sync reads them. See [Query](/essentials/v2/query#6-query-on-behalf-of-a-user). + `page_acl_warning` means restrictions on some individual pages, for example in Confluence, could not be read, so those pages are readable by everyone until a later sync reads them. See [Query](/essentials/v2/query#6-as-an-admin-you-can-query-the-app-on-behalf-of-a-user).
diff --git a/api-reference/v2/endpoint/ingest-context.mdx b/api-reference/v2/endpoint/ingest-context.mdx index 270b0a32..fbbdbb75 100644 --- a/api-reference/v2/endpoint/ingest-context.mdx +++ b/api-reference/v2/endpoint/ingest-context.mdx @@ -1,6 +1,6 @@ --- title: "Ingest Context" -description: "Store documents, app sources, and memories for your AI." +description: "Store documents and memories for your AI." openapi: "api-reference/v2/openapi.json POST /context/ingest" --- @@ -11,8 +11,7 @@ Ingest context into a database in one multipart request. Ingestion is asynchrono | Payload | Send | Use for | | --- | --- | --- | | Documents | `type: "knowledge"` and `documents` | Binary uploads that HydraDB should parse: PDFs, Office and iWork files, spreadsheets, images, and plain text. See [Supported file formats](#supported-file-formats). | -| App sources | `type: "knowledge"` and `app_knowledge` | Text and metadata your application has already extracted from an app (Slack threads, Notion pages, emails, tickets). See [Context](/essentials/v2/context#send-app-sources). | -| Memories | `type: "memory"` and `memories` | Preferences, decisions, inferred behavior traits, and past conversations your agent should remember in future sessions. See [Context](/essentials/v2/context#2-save-memories). | +| Memories | `type: "memory"` and `memories` | Preferences, decisions, inferred behavior traits, and past conversations your agent should remember in future sessions. See [Context](/essentials/v2/context#ingesting-memory). | @@ -59,14 +58,13 @@ curl -X POST 'https://api.hydradb.com/context/ingest' \ | | Use singular `"memory"` when ingesting memories. (default=`"knowledge"`) | | | Target database. | | | Collection to write to. A new name creates the collection automatically. Omit it to use the default collection. List existing collections with [List Collections](/api-reference/v2/endpoint/list-collections). | -| | Replace existing sources with the same ID. Set to `false` to error on conflict: a document or app source whose ID exists comes back `failed` with `error_code: "E9003"`. (default=`true`) | +| | Replace existing sources with the same ID. Set to `false` to error on conflict: a document whose ID exists comes back `failed` with `error_code: "E9003"`. (default=`true`) | | | Binary uploads, **knowledge only**. Required when `type=knowledge` and you want HydraDB to parse documents. Omit when ingesting memories. See [Supported file formats](#supported-file-formats). (default=`[]`) | | | One entry per file in `documents`, in the same order. The counts must match, or the request returns `400`. If omitted, documents index with inferred defaults such as filename/title. See [item fields](#examples-and-item-fields). | -| | Pre-extracted source objects (Slack, Notion, web pages, etc.), **knowledge only**. See [item fields](#examples-and-item-fields). | | | Map of source ID to your own entities and relations. Replaces LLM graph extraction for each keyed source. Works for `type=knowledge` and `type=memory`. See the "Bring your own graph" example in [item fields](#examples-and-item-fields) and the [Bring Your Own Graph](/essentials/v2/bring-your-own-graph#using-byog-without-cypher) guide. | | | Memory items, **memory only**. Required and non-empty when `type=memory`. The form field is plural `memories`, even though `type` is singular `memory`. See [item fields](#examples-and-item-fields). | -- **Multipart, not JSON:** This endpoint uses `multipart/form-data`. Stringify all JSON arrays (`document_metadata`, `app_knowledge`, `memories`) before placing them in the form field. A body that is neither a form nor JSON returns `415`. +- **Multipart, not JSON:** This endpoint uses `multipart/form-data`. Stringify all JSON arrays (`document_metadata`, `memories`) before placing them in the form field. A body that is neither a form nor JSON returns `415`. - **`202 Accepted` means queued, not indexed:** A successful response only confirms your sources were accepted, not that they are ready to query. Before querying, poll [`GET /context/status`](/api-reference/v2/endpoint/source-status) with the returned IDs until each source reaches `graph_creation` (searchable), `completed`, or `errored`. Alternatively, register a webhook for `indexing.status_changed` events (see [Webhooks](/api-reference/v2/endpoint/webhooks-overview)). - **Memory and knowledge:** Use `type: "memory"` for memory ingestion, listing, and deletion. Use `type: "all"` on `POST /query` when results should combine both. @@ -107,7 +105,7 @@ Files with no readable text fail with [`E2002`](/api-reference/v2/error-response | `.heic` `.heif` `.avif` | Export the photo as JPEG or PDF | | `.svg` `.ico` | Export as PNG or JPEG | | `.html` `.htm` `.xml` | Save the page as PDF | -| `.eml` `.msg` | Save the message as PDF, or send it as an app source | +| `.eml` `.msg` | Save the message as PDF, or sync the mailbox with a [connector](/essentials/v2/connectors) | | `.epub` `.wpd` | Convert to PDF or DOCX | | `.zip` | Upload the files individually | @@ -144,7 +142,7 @@ Files rejected with `E1002` have no ingestion status record. Handle the format e ## Shared item fields -Items in `document_metadata`, `app_knowledge`, and `memories` share three fields. The per-type tables under [Examples and item fields](#examples-and-item-fields) list only what differs. +Items in `document_metadata` and `memories` share three fields. The per-type tables under [Examples and item fields](#examples-and-item-fields) list only what differs. | Field | Description | | --- | --- | @@ -152,7 +150,7 @@ Items in `document_metadata`, `app_knowledge`, and `memories` share three fields | | Database-schema fields for filtering and search. Keys must be declared in `database_metadata_schema`. Send an object, for example `{ "department": "legal" }`. At most 16 KiB. (default=`{}`) | | | Free-form per-source fields for display or bookkeeping, sent as an object. To filter on these at query time, nest them under `metadata_filters.additional_metadata`. At most 1 KiB. (default=`{}`) | -See [Metadata Filters](/essentials/v2/metadata#2-the-two-layers) for choosing metadata fields and filtering on them, and [metadata size limits](/essentials/v2/metadata#stored-metadata) for how HydraDB measures the caps. +See [Metadata Filters](/essentials/v2/metadata#overview---two-layers) for choosing metadata fields and filtering on them, and [metadata size limits](/essentials/v2/metadata#size-caps) for how HydraDB measures the caps. ## Examples and item fields @@ -213,14 +211,14 @@ See [Metadata Filters](/essentials/v2/metadata#2-the-two-layers) for choosing me | | Optional. If set, becomes the `id` for this document. See [shared item fields](#shared-item-fields). | | | See [shared item fields](#shared-item-fields). | | | See [shared item fields](#shared-item-fields). | - | | Forceful relations (links you declare between sources). Shape: `{ "ids": ["...", "..."] }`. Linked sources come back in `additional_context` on `mode: "thinking"` queries. | + | | Deterministic relations (links you declare between sources). Shape: `{ "ids": ["...", "..."] }`. Linked sources come back in `data.additional_graph_context` on `mode: "thinking"` queries. | | | Run model enrichment on this file. (default=`false`) | | | How this content came to be known: `assertion`, `record`, `said`, `done`, `third_party`, or `inferred`. Any other value returns `400`. | | | A stable handle for who or what the content is about. | Those seven, plus the deprecated aliases `source_id` and `file_id` (for `id`) and `document_metadata` (for `additional_metadata`), are the only keys accepted. Anything else (including `title`, `type`, `url` and `timestamp`) is rejected with a `400` naming the unsupported key, rather than being silently dropped. - In particular, a document's **title is derived, not settable**. It defaults to the uploaded filename and is returned as `source_title` on query results and `title` on `/context/list`. It cannot be overridden at ingest, and [`PATCH /context/{id}/metadata`](/api-reference/v2/endpoint/update-source-metadata) only merges `additional_metadata` and `database_metadata`. Use `additional_metadata` for your own display fields, or ingest through `app_knowledge`, whose items carry an explicit `title`. + In particular, a document's **title is derived, not settable**. It defaults to the uploaded filename and is returned as `source_title` on query results and `title` on `/context/list`. It cannot be overridden at ingest, and [`PATCH /context/{id}/metadata`](/api-reference/v2/endpoint/update-source-metadata) only merges `additional_metadata` and `database_metadata`. Use `additional_metadata` for your own display fields. @@ -292,92 +290,6 @@ curl -X POST 'https://api.hydradb.com/context/ingest' \ - - - - ```python Python SDK - import json - - client.context.ingest( - type="knowledge", - database="acme_corp", - collection="team_docs", - app_knowledge=json.dumps([ - { - "id": "slack_thread_001", - "title": "Pricing discussion", - "kind": "message", - "provider": "slack", - "external_id": "1716213600.000100", - "fields": {"kind": "message", "body": "We agreed on three tiers...", "author": "alice"}, - "metadata": {"channel": "product"}, - } - ]), - ) - ``` - - ```typescript TypeScript SDK - await client.context.ingest({ - type: "knowledge", - database: "acme_corp", - collection: "team_docs", - appKnowledge: JSON.stringify([ - { - id: "slack_thread_001", - title: "Pricing discussion", - kind: "message", - provider: "slack", - external_id: "1716213600.000100", - fields: { kind: "message", body: "We agreed on three tiers...", author: "alice" }, - metadata: { channel: "product" }, - }, - ]), - }); - ``` - - ```bash cURL - curl -X POST 'https://api.hydradb.com/context/ingest' \ - -H "Authorization: Bearer " \ - -H "API-Version: 2" \ - -F "type=knowledge" \ - -F "database=acme_corp" \ - -F "collection=team_docs" \ - -F 'app_knowledge=[ - { - "id": "slack_thread_001", - "title": "Pricing discussion", - "kind": "message", - "provider": "slack", - "external_id": "1716213600.000100", - "fields": { "kind": "message", "body": "We agreed on three tiers...", "author": "alice" }, - "metadata": { "channel": "product" } - } - ]' - ``` - - - - | Field | Description | - | --- | --- | - | | Required. Send an empty string to have one generated upstream. See [shared item fields](#shared-item-fields). | - | | Optional. If sent, must match the form-level `database`. | - | | Optional. If sent, must match the form-level `collection`. | - | | Short title or subject shown in query results. | - | | Optional long-form description. | - | | Canonical URL or reference link. | - | | ISO-8601 timestamp (creation or last-updated). | - | | App object kind: `email`, `message`, `ticket`, `knowledge_base`, `comment`, `meeting`, or `custom`. Selects the parser for `fields`. | - | | App namespace such as `slack`, `gmail`, `jira`, or `notion`. | - | | The provider's ID for this exact item. Enables exact lookup and relation resolution. | - | | App-native content and structure (`body`, `description`, `title`, or `data`, by `kind`). `fields.kind` must match `kind`. See [Context](/essentials/v2/context#send-app-sources). | - | | Older generic payload, `{ "text": "..." }`. Prefer `kind` and `fields`, which let app-aware retrieval see authors, threads, and parents. | - | | See [shared item fields](#shared-item-fields). | - | | See [shared item fields](#shared-item-fields). | - | | Optional related attachments. (default=`[]`) | - | | Relations to other sources: `{ "ids": [...] }` as on `document_metadata` items, or the typed `[{ "predicate", "target" }]` list described in [Context](/essentials/v2/context#6-link-sources-that-belong-together). | - | | Principals allowed to retrieve this source. Omit to leave it unrestricted. A malformed principal rejects the whole request with `400`. See [Query](/essentials/v2/query#6-query-on-behalf-of-a-user). | - - @@ -438,8 +350,7 @@ curl -X POST 'https://api.hydradb.com/context/ingest' \ | | Raw text or markdown content. Required unless `user_assistant_pairs` is provided. | | | Conversation pairs `{ user, assistant }`. Required unless `text` is provided. | | | Treat `text` as markdown for chunking. (default=`false`) | - | | When `true`, HydraDB extracts the underlying preference from raw signal, using earlier context to improve accuracy. When `false`, it stores the text verbatim. (default=`false`) | - | | Guides extraction when `infer: true`. Ignored when `infer: false`. | + | | Enable additional memory enrichment. Explicit `false` skips that enrichment; ingestion, indexing, and entity/graph extraction may still run. (default=`true`) | | | The user's name. Feeds inference. (default=`"User"`) | | | See [shared item fields](#shared-item-fields). | | | See [shared item fields](#shared-item-fields). | @@ -581,7 +492,7 @@ curl -X POST 'https://api.hydradb.com/context/ingest' \ | Field | Description | | --- | --- | - | | Top-level key: a `document_metadata` id or `app_knowledge` item id for `type=knowledge`, or a memory `id` for `type=memory`. Value is that source's graph. A key matching no source returns `400`. | + | | Top-level key: a `document_metadata` id for `type=knowledge`, or a memory `id` for `type=memory`. Value is that source's graph. A key matching no source returns `400`. | | | Map keyed by a caller-local id; each value is an entity. The key is only a handle for `relations` to reference. It is not stored. | | | Entity name. Normalized (lowercased) server-side so it matches at query time. At most 256 chars. | | | Entity type (e.g. `PERSON`, `POLICY`). Stored as supplied. | diff --git a/api-reference/v2/endpoint/list-context.mdx b/api-reference/v2/endpoint/list-context.mdx index e73bc872..3a089916 100644 --- a/api-reference/v2/endpoint/list-context.mdx +++ b/api-reference/v2/endpoint/list-context.mdx @@ -4,9 +4,9 @@ description: "Page through knowledge sources or memories, with optional filters. openapi: "api-reference/v2/openapi.json POST /context/list" --- -Page through the sources stored in one database and collection, for example to find IDs or audit what was ingested. `type` selects what to list: `knowledge` (the default: documents and app sources), `memory`, or `all` for both. +Page through the sources stored in one database and collection, for example to find IDs or audit what was ingested. `type` selects what to list: `knowledge` (the default: documents and content synced by connectors), `memory`, or `all` for both. -Narrow results with `ids` and `filters`, and return only the fields you need with `include_fields`. See [Metadata Filters](/essentials/v2/metadata#7-list-sources-with-metadata-filters) for the metadata workflow. +Narrow results with `ids` and `filters`, and return only the fields you need with `include_fields`. See [Metadata Filters](/essentials/v2/metadata#list-contextlist) for the metadata workflow. diff --git a/api-reference/v2/endpoint/query-overview.mdx b/api-reference/v2/endpoint/query-overview.mdx index 00cb8636..3f1cf2ca 100644 --- a/api-reference/v2/endpoint/query-overview.mdx +++ b/api-reference/v2/endpoint/query-overview.mdx @@ -29,7 +29,7 @@ H([query_by: hybrid]) T([query_by: text]) Q --> S -S -- "Documents / files / app sources" --> M +S -- "Documents / files / synced content" --> M S -- "User memories" --> M S -- "Both" --> M M -- "Best overall relevance" --> H @@ -46,7 +46,7 @@ These parameters shape most queries. [Query](/api-reference/v2/endpoint/query#re | Parameter | Values | Use it for | |---|---|---| -| | `"knowledge"`, `"memory"`, `"all"` | Choose what to query. Use `"knowledge"` for shared documents and app sources, `"memory"` for memories, and `"all"` when an answer should use both. | +| | `"knowledge"`, `"memory"`, `"all"` | Defaults to `"all"`, searching knowledge and memories. Use `"knowledge"` for shared documents and content synced by connectors, or `"memory"` for memories only. | | | `"hybrid"`, `"text"` | Choose the matching method. Use `"hybrid"` by default and `"text"` for exact terms or phrases. | | | `"fast"`, `"thinking"`, `"auto"` | Choose a single pass with `"fast"`, broader retrieval with `"thinking"`, or automatic routing with `"auto"`. Defaults to `"auto"`. | | | integer | Limit the returned chunks. Defaults to `10` for one collection. Maximum `250`. | @@ -54,7 +54,7 @@ These parameters shape most queries. [Query](/api-reference/v2/endpoint/query#re | | object | Narrow results by metadata. Top-level keys filter schema-backed fields. Free-form fields go under `additional_metadata`. | | | `string[]` or weighted object | Search up to 100 existing collections. A list weights them equally. An object assigns relative weights, such as `{ "workspace_42": 2, "user_alex": 1 }`. | | | boolean | Include entity and relation context with the chunks. On by default; set `false` with `mode: "fast"` for chunk-only responses (`thinking` always includes it). | -| | boolean | Improves app-source matching within knowledge queries. Enabled by default. The query still searches all selected knowledge. | +| | boolean | Improves matching of content synced by connectors within knowledge queries. Enabled by default. The query still searches all selected knowledge. | ## Recommended configurations @@ -75,7 +75,7 @@ Each pattern is a complete request body. [Query](/api-reference/v2/endpoint/quer -Answer questions from files, tickets, pages, or other app sources. +Answer questions from files, or from tickets, pages, and other content synced by connectors. ```json { @@ -177,4 +177,4 @@ The response also includes ranked `data.chunks[]` with source IDs and titles, pl - [Query](/api-reference/v2/endpoint/query): every request and response field - [Query guide](/essentials/v2/query): retrieval modes, ranking, and tuning - [Metadata Filters](/essentials/v2/metadata): filter with schema-backed and free-form metadata -- [Query](/essentials/v2/query#5-add-relationships): graph context and forceful relations +- [Query](/essentials/v2/query#5-understanding-relationships-in-your-context): graph context and deterministic relations diff --git a/api-reference/v2/endpoint/query.mdx b/api-reference/v2/endpoint/query.mdx index ac7351fa..add2d0fb 100644 --- a/api-reference/v2/endpoint/query.mdx +++ b/api-reference/v2/endpoint/query.mdx @@ -148,7 +148,7 @@ curl -X POST 'https://api.hydradb.com/query' \ "policy_main_chunk_3": ["p_0"] } }, - "additional_context": { + "additional_graph_context": { "pref-tone": { "chunk_uuid": "pref-tone", "id": "mem_user_alex_tone", @@ -179,7 +179,7 @@ curl -X POST 'https://api.hydradb.com/query' \ "chunk_relations": [], "chunk_id_to_group_ids": {} }, - "additional_context": {} + "additional_graph_context": {} }, "error": null, "meta": { @@ -225,21 +225,24 @@ By default, `data.llm_prompt` contains the question and matching context as Mark | | Exact source titles, matched case-insensitively. Matches any listed title, then intersects with `ids` if both are sent. | | | Principals for the caller, used to filter sources by ACL. Omitting `acl`, sending `[]`, or sending `["*"]` disables caller-supplied filtering. For enforced connectors, the authenticated caller is used instead; see [ACL enforcement](/essentials/v2/connectors#enforce-acl). | | | Omit for the result object with `llm_prompt`. `"structured"` leaves out the prompt string. `"markdown"` returns the prompt string directly as `data`. | -| | What to query. `"all"` runs knowledge and memory in parallel over the same scope and merges by `relevancy_score`. (default=`"knowledge"`) | +| | What to query. `"all"` runs knowledge and memory in parallel over the same scope and merges by `relevancy_score`. (default=`"all"`) | | | Retrieval method. See [Query methods](#decision-matrix). (default=`"hybrid"`) | -| | Applies to knowledge queries only. Adds app-aware retrieval for messages, threads, and linked app sources. It still searches all selected knowledge, rather than only app sources. Send `false` to disable app-aware retrieval. (default=`true`) | +| | Applies to knowledge queries only. Adds app-aware retrieval for messages, threads, and linked records synced by connectors. It still searches all selected knowledge, rather than only synced content. Send `false` to disable app-aware retrieval. (default=`true`) | | | BM25 operator for `query_by: "text"`. `"and"` or `"phrase"` with any other `query_by` returns `400`. (default=`"or"`) | | | Retrieval pipeline. Applies to `hybrid` only; ignored for `text`. `"auto"` scores the query before retrieval and resolves it to `"fast"` or `"thinking"`, defaulting to `"thinking"` when the signal is inconclusive. (default=`"auto"`) | +| | When the collection holds spreadsheets and the question is tabular, returns the SQL statement HydraDB ran in `tabular_data.sql`. It carries no row data. Applies in thinking mode only. (default=`false`) | | | Maximum chunks to return, from `1` to `250`. Defaults to `10` for a single collection. See [multi-collection defaults](#querying-multiple-collections) when searching several collections. Counts chunks, not bytes or model tokens. | | | Hybrid weight (`1.0` = pure semantic, `0.0` = pure BM25). Applies to `query_by: "hybrid"` only. `"auto"` currently resolves to `0.8`. (default=`0.8`) | -| | Boost newer content. Omitted applies a mild `0.4` tilt; send `0` to turn it off. (default=`0.4`) | +| | Boost newer content. Omitted applies a `0.6` tilt; send `0` to turn it off. (default=`0.6`) | | | When `true`, includes the entity and relation graph slice in the response under `graph_context`. Set to `false` when you only need ranked chunks. Relations you supplied via [Bring Your Own Graph](/essentials/v2/bring-your-own-graph#using-byog-without-cypher) appear here identically to extracted ones. (default=`true`). **`false` only takes effect in `fast` mode: `thinking`, and `auto` when it resolves to thinking, always include the graph slice.** | -| | Pull sources linked by forceful relations (links you declare between sources) into `additional_context`. **Only takes effect when `mode` resolves to `"thinking"`;** silently skipped in `fast` mode, and under `mode: "auto"` whether it takes effect depends on the automatic routing decision. (default=`true`) | -| | Request-time hint to guide retrieval (for example, "user is on the billing page"). This is different from the response `additional_context` map. (default=`null`) | +| | Pull deterministically linked sources (links you declare at ingestion) into `data.additional_graph_context`. **Only takes effect when `mode` resolves to `"thinking"`;** silently skipped in `fast` mode, and under `mode: "auto"` whether it takes effect depends on the automatic routing decision. (default=`true`) | +| | A request-time hint to guide retrieval (for example, "user is on the billing page"), not a filter. This is different from the response map `data.additional_graph_context` of linked sources. (default=`null`) | | | Filter schema-backed metadata with top-level keys and free-form fields under `additional_metadata`. See [Metadata filters](#metadata-filters). Each list holds at most 500 values, and the whole object is capped at 64 KiB of compact JSON, measured after operator objects are reduced to their values; over either returns `400`. (default=`null`) | To tune `alpha`, `recency_bias`, and `max_results` for your content, see the [Query guide](/essentials/v2/query). +Legacy request aliases remain accepted: `follow_forceful_relations` and `query_forceful_relations` for `query_explicit_relations`, and `additional_context` for the string hint `additional_graph_context`. Prefer the canonical names. When several are sent, precedence is `query_explicit_relations` > `follow_forceful_relations` > `query_forceful_relations`, and `additional_graph_context` > `additional_context`. Explicit `false` and an empty canonical hint are preserved. In the response, the legacy `data.additional_context` alias contains the same linked-source map as `data.additional_graph_context`; neither response map is the request hint. + ### Querying multiple collections Use `collections` to search several collections in one request. The field accepts a list or a weighted object: @@ -285,7 +288,7 @@ Top-level `metadata_filters` keys filter schema-backed `metadata`. Keys under `a } ``` -See [Metadata Filters](/essentials/v2/metadata#3-filter-operators) for operators and examples. Filters narrow results. They do not replace the caller's `acl` or connector ACL enforcement. Declare frequently filtered fields in `database_metadata_schema`. +See [Metadata Filters](/essentials/v2/metadata#operators) for operators and examples. Filters narrow results. They do not replace the caller's `acl` or connector ACL enforcement. Declare frequently filtered fields in `database_metadata_schema`. ### Decision matrix @@ -293,7 +296,7 @@ See [Metadata Filters](/essentials/v2/metadata#3-filter-operators) for operators | Value | Queries | Best for | |---|---|---| - | `"knowledge"` *(default)* | Knowledge documents, files, and app sources, plus app-aware retrieval unless `query_apps` is `false` | Document Q&A, RAG context. | + | `"knowledge"` *(default)* | Documents, files, and content synced by connectors, plus app-aware retrieval unless `query_apps` is `false` | Document Q&A, RAG context. | | `"memory"` | Memories | Personalization and user preferences. | | `"all"` | Both, merged in one ranked result set | Personalized answers grounded in both shared and user-specific context. | @@ -311,7 +314,7 @@ See [Metadata Filters](/essentials/v2/metadata#3-filter-operators) for operators | Mode | Behavior | When to use | |---|---|---| | `"fast"` | Single query pass | Real-time chat, autocomplete, simple lookups. | - | `"thinking"` | Multi-query expansion + reranking + forceful-relation context | Complex queries, customer-facing answers, anything where quality matters. | + | `"thinking"` | Multi-query expansion + reranking + deterministic linked-source context | Complex queries, customer-facing answers, anything where quality matters. | | `"auto"` *(default if `mode` is omitted)* | Scores the query before retrieval and routes to `"fast"` or `"thinking"`; defaults to `"thinking"` when the signal is inconclusive. | Mixed or unpredictable query traffic where you do not want to pick a mode per request. | The response does not report which pipeline `"auto"` resolved to, so budget latency as thinking-level in the worst case. Set `mode` to `"fast"` or `"thinking"` when you need a predictable pipeline. @@ -540,16 +543,17 @@ result = client.query( Common codes: `400 INVALID_INPUT` (empty `query`, `operator: "and"` or `"phrase"` without `query_by: "text"`, a malformed filter operator, or a listed collection that does not exist), `400 VALIDATION_ERROR` (a metadata filter that does not fit the declared field type), `404 DATABASE_NOT_FOUND`, `422 TENANT_INFRA_NOT_READY` (the database is still provisioning; poll [Database Status](/api-reference/v2/endpoint/database-status) until `ready_for_ingestion` is `true`), `500 INTERNAL_ERROR`. See [Error Responses](/api-reference/v2/error-responses) for the full list. -`400` also covers oversized filters: a `metadata_filters` list above 500 values, or a `metadata_filters` object above 64 KiB of compact JSON. The message names the offending key or reports the actual byte count. See [Filter size limits](/essentials/v2/metadata#filter-size-limits). +`400` also covers oversized filters: a `metadata_filters` list above 500 values, or a `metadata_filters` object above 64 KiB of compact JSON. The message names the offending key or reports the actual byte count. See [Filter size limits](/essentials/v2/metadata#size-caps). ## Common mistakes -- **`query_forceful_relations` requires `mode` to resolve to `"thinking"`:** In `fast` mode the flag is silently skipped. The server does not error or warn; `additional_context` is empty. Under `mode: "auto"` this depends on that request's routing decision, not on what you asked for. +- **`query_explicit_relations` requires `mode` to resolve to `"thinking"`:** In `fast` mode the flag is silently skipped. The server does not error or warn; `data.additional_graph_context` is empty. Under `mode: "auto"` this depends on that request's routing decision, not on what you asked for. - **Relation `timestamp` is a Unix epoch float here:** In the `graph_context` slice returned by `/query` (and in the passthrough relations returned by [List Context](/api-reference/v2/endpoint/list-context) with `include_fields: ["relations"]`), each relation's `timestamp` is a Unix epoch value in seconds (a float, for example `1778573640.0`). The dedicated [Context Relations](/api-reference/v2/endpoint/source-relations) endpoint returns the same field as an ISO-8601 string instead. Normalize before comparing relation timestamps across endpoints. - **Use the right metadata namespace:** Filter schema-backed fields at the top level of `metadata_filters` and free-form fields under `additional_metadata`. See [Metadata filters](#metadata-filters). - **Check indexing first:** New sources are not searchable until [Ingestion Status](/api-reference/v2/endpoint/source-status) reports them indexed. +- **Table answers need thinking mode:** `tabular_data` is computed only when `mode` resolves to `"thinking"`. In `fast` mode a question about a spreadsheet returns the ranked chunks and no `tabular_data`. Read `tabular_data.records` (keyed, typed values) and cite `tabular_data.sources`; see [Ask questions over spreadsheets](/essentials/v2/query#ask-questions-over-spreadsheets). - **Collection scope:** If you omit `collection`, HydraDB queries the default collection, and a query that names a collection does not read the default one. Use [List Collections](/api-reference/v2/endpoint/list-collections) to discover available IDs.
diff --git a/api-reference/v2/endpoint/source-status.mdx b/api-reference/v2/endpoint/source-status.mdx index 5605b76b..35e79def 100644 --- a/api-reference/v2/endpoint/source-status.mdx +++ b/api-reference/v2/endpoint/source-status.mdx @@ -1,10 +1,10 @@ --- title: "Ingestion Status" -description: "Check whether ingested documents, app sources, or memories are ready to query." +description: "Check whether ingested documents or memories are ready to query." openapi: "api-reference/v2/openapi.json GET /context/status" --- -Ingestion is asynchronous. Call this endpoint with the IDs returned by [Ingest Context](/api-reference/v2/endpoint/ingest-context) to learn when each document, app source, or memory is ready to query. +Ingestion is asynchronous. Call this endpoint with the IDs returned by [Ingest Context](/api-reference/v2/endpoint/ingest-context) to learn when each document or memory is ready to query. To be notified instead of polling, register a webhook for `indexing.status_changed` events. HydraDB sends a `POST` to your endpoint when a source reaches a terminal state (`completed` or `errored`). See [Webhooks](/api-reference/v2/endpoint/webhooks-overview) for setup and receiver examples. diff --git a/api-reference/v2/endpoint/subgraph.mdx b/api-reference/v2/endpoint/subgraph.mdx index 73fab044..8e3fc5b0 100644 --- a/api-reference/v2/endpoint/subgraph.mdx +++ b/api-reference/v2/endpoint/subgraph.mdx @@ -6,7 +6,7 @@ description: "Retrieve the thread, parent and child sources, and declared links Use this endpoint when a query result needs more context, such as the replies to a Slack message. Pass an `id` returned by [Query](/api-reference/v2/endpoint/query), [List Context](/api-reference/v2/endpoint/list-context), or [Ingest Context](/api-reference/v2/endpoint/ingest-context) to retrieve the starting source, the sources connected to it, and their relationships. -The endpoint follows threads, parent-child relationships, and forceful relations (links you declare between sources). For relationships extracted from text, such as service dependencies, use [Inspecting Context Relations](/api-reference/v2/endpoint/source-relations). +The endpoint follows threads, parent-child relationships, and deterministic relations (links you declare between sources). For relationships extracted from text, such as service dependencies, use [Inspecting Context Relations](/api-reference/v2/endpoint/source-relations). diff --git a/api-reference/v2/endpoint/update-connector-resource.mdx b/api-reference/v2/endpoint/update-connector-resource.mdx index cc602478..c00fa961 100644 --- a/api-reference/v2/endpoint/update-connector-resource.mdx +++ b/api-reference/v2/endpoint/update-connector-resource.mdx @@ -56,7 +56,7 @@ The response includes `custom_instructions` and `acl` only when the request set `resource_id` in the path is the id from [List Connector Resources](/api-reference/v2/endpoint/connector-resources), for example a Slack channel id or a Supabase `schema.table` name. URL-encode it if it contains spaces or other reserved characters. - `custom_instructions` replaces connector-level instructions for this resource. Send `""` to inherit the connector's instructions again. Changes affect future syncs. See [Custom ingestion instructions](/essentials/v2/connectors#custom-ingestion-instructions). -- `acl` changes access immediately, including for already-synced sources. Use `["__public__"]` for public access or `[]` to deny everyone. An ACL captured from the provider may replace it on the next sync. See [Query](/essentials/v2/query#6-query-on-behalf-of-a-user). +- `acl` changes access immediately, including for already-synced sources. Use `["__public__"]` for public access or `[]` to deny everyone. An ACL captured from the provider may replace it on the next sync. See [Query](/essentials/v2/query#6-as-an-admin-you-can-query-the-app-on-behalf-of-a-user). ## Errors diff --git a/api-reference/v2/endpoint/update-connector.mdx b/api-reference/v2/endpoint/update-connector.mdx index 9b04b95f..e4a912bf 100644 --- a/api-reference/v2/endpoint/update-connector.mdx +++ b/api-reference/v2/endpoint/update-connector.mdx @@ -65,7 +65,7 @@ HydraDB validates every field before saving, so invalid input changes nothing. C - `custom_instructions` applies to resources without their own instructions. Send `""` to clear it. Changes affect future syncs. See [Custom ingestion instructions](/essentials/v2/connectors#custom-ingestion-instructions). - `sync_interval_seconds` reschedules the next sync. Stay within the returned `min_sync_interval_seconds` and `max_sync_interval_seconds`, or send `0` for the provider default. - `credentials` reconnects the existing connector. Send the provider's complete credential set. Resources and saved sync positions are preserved. -- `enforce_acl` enables or disables ACL enforcement for this connector. Send `true` to enforce the captured ACL for the authenticated caller on every content read, or `false` to return to opt-in request `acl` filtering. Existing connectors remain `false` until an owner or writer enables it. The change takes effect on the next content request for already-synced sources and does not require re-ingestion. Only workspace owners and writers in a signed-in dashboard session can set it, and `true` requires the provider to report `acl_supported: true`. API-key-authenticated requests cannot set it. See [ACL on synced content](/essentials/v2/connectors#enforce-acl) and [Query](/essentials/v2/query#6-query-on-behalf-of-a-user). +- `enforce_acl` enables or disables ACL enforcement for this connector. Send `true` to enforce the captured ACL for the authenticated caller on every content read, or `false` to return to opt-in request `acl` filtering. Existing connectors remain `false` until an owner or writer enables it. The change takes effect on the next content request for already-synced sources and does not require re-ingestion. Only workspace owners and writers in a signed-in dashboard session can set it, and `true` requires the provider to report `acl_supported: true`. API-key-authenticated requests cannot set it. See [ACL on synced content](/essentials/v2/connectors#enforce-acl) and [Query](/essentials/v2/query#6-as-an-admin-you-can-query-the-app-on-behalf-of-a-user). To enable enforcement later, send this field in a `PATCH` request, or use **Enforce ACL** in the dashboard's connector settings: diff --git a/api-reference/v2/endpoint/update-source-metadata.mdx b/api-reference/v2/endpoint/update-source-metadata.mdx index 99edf7ca..39819dd4 100644 --- a/api-reference/v2/endpoint/update-source-metadata.mdx +++ b/api-reference/v2/endpoint/update-source-metadata.mdx @@ -4,7 +4,7 @@ description: "Merge database metadata and additional metadata into one existing openapi: "api-reference/v2/openapi.json PATCH /context/{id}/metadata" --- -Update one existing source's metadata or ACL without re-ingesting its content. Changes also apply to the indexed chunks used by Query and List Context. See [Metadata Filters](/essentials/v2/metadata#6-update-metadata-without-re-ingesting) for the metadata workflow. +Update one existing source's metadata or ACL without re-ingesting its content. Changes also apply to the indexed chunks used by Query and List Context. See [Metadata Filters](/essentials/v2/metadata#edit-in-place-patch-contextidmetadata) for the metadata workflow. ```http PATCH /context/{id}/metadata @@ -133,7 +133,7 @@ curl -X PATCH 'https://api.hydradb.com/context/policy_main/metadata' \ ## How updates apply - Metadata keys included in the request are added or overwritten. Omitted keys keep their existing values. -- Sending `acl` replaces the entire stored ACL, so send the complete new list. `[]` or `null` revokes access for everyone. Omit `acl` to keep the stored list. See [Query](/essentials/v2/query#6-query-on-behalf-of-a-user). +- Sending `acl` replaces the entire stored ACL, so send the complete new list. `[]` or `null` revokes access for everyone. Omit `acl` to keep the stored list. See [Query](/essentials/v2/query#6-as-an-admin-you-can-query-the-app-on-behalf-of-a-user). - Sending `acl_inherit: true` removes the source's own ACL and immediately uses its connector resource permissions. This can widen access. Later connector syncs can replace the ACL because ACL writes use last-writer-wins behavior. See [Restore resource permissions](/essentials/v2/connectors#restore-resource-permissions). - The source must already exist. This endpoint does not create sources. - The endpoint edits one source at a time. Bulk metadata edits are not supported. @@ -158,7 +158,7 @@ A `200` response can still report an incomplete edit: ### Size limits -`database_metadata` is capped at **16 KiB**. `additional_metadata` is capped at **1 KiB**. See [metadata size limits](/essentials/v2/metadata#stored-metadata) for how HydraDB measures these caps. +`database_metadata` is capped at **16 KiB**. `additional_metadata` is capped at **1 KiB**. See [metadata size limits](/essentials/v2/metadata#size-caps) for how HydraDB measures these caps. Limits apply to the request payload, before merging with stored metadata. An oversized request returns `400` with the actual and maximum sizes: diff --git a/api-reference/v2/endpoint/webhooks-overview.mdx b/api-reference/v2/endpoint/webhooks-overview.mdx index 1643a0b7..2c806c17 100644 --- a/api-reference/v2/endpoint/webhooks-overview.mdx +++ b/api-reference/v2/endpoint/webhooks-overview.mdx @@ -113,7 +113,7 @@ A test delivery is synthetic: nothing was ingested, so there is no database name |---|---| | `event` | Event type. Currently `indexing.status_changed`. | | `delivery_id` | Stable ID for this event. Store it to deduplicate retries. | -| `id` | The document, memory, or app source ID you supplied during ingestion. | +| `id` | The document or memory ID you supplied during ingestion, or the ID of a source a connector synced. | | `database` | The name of the database you ingested into: the value you sent as `database` (or `tenant_id`) on the ingest request. Empty only for sources ingested before this field existed; read `tenant_id` if you need a scope that is always set. | | `collection` | Collection scope for the indexed source. | | `status` | Terminal indexing status. Usually `completed` or `errored`. | diff --git a/api-reference/v2/error-responses.mdx b/api-reference/v2/error-responses.mdx index 9b21840b..048db19d 100644 --- a/api-reference/v2/error-responses.mdx +++ b/api-reference/v2/error-responses.mdx @@ -217,7 +217,7 @@ Database creation is asynchronous, and a query sent before provisioning finishes Common causes: - `document_metadata` length does not match the `documents` array length. -- `app_knowledge`, `memories`, or `document_metadata` was sent as an object instead of a JSON-stringified multipart field. +- `memories` or `document_metadata` was sent as an object instead of a JSON-stringified multipart field. - A memory item has neither `text` nor `user_assistant_pairs`. - A typed metadata value does not match the database metadata schema. diff --git a/api-reference/v2/index.mdx b/api-reference/v2/index.mdx index 226aa258..f22fec63 100644 --- a/api-reference/v2/index.mdx +++ b/api-reference/v2/index.mdx @@ -10,7 +10,7 @@ Use this reference to look up request fields and response formats. If you are ne Create a database, ingest context, wait for indexing, then query it. 1. [Create Database](/api-reference/v2/endpoint/create-database): `POST /databases`. Isolates context for a customer, environment, or product. Creation runs in the background, so poll [Database Status](/api-reference/v2/endpoint/database-status) until `ready_for_ingestion` is `true`. -2. [Ingest Context](/api-reference/v2/endpoint/ingest-context): `POST /context/ingest`. Files, app sources, or memories, in one multipart request. +2. [Ingest Context](/api-reference/v2/endpoint/ingest-context): `POST /context/ingest`. Files or memories, in one multipart request. 3. [Ingestion Status](/api-reference/v2/endpoint/source-status): `GET /context/status`. Poll the returned IDs until `indexing_status` is `completed`, or [register a webhook](/api-reference/v2/endpoint/webhooks-overview) instead. 4. [Query](/api-reference/v2/endpoint/query): `POST /query`. Retrieve the context your model needs, from knowledge, memories, or both. diff --git a/api-reference/v2/openapi.json b/api-reference/v2/openapi.json index 0fcf13ca..b6b9d576 100644 --- a/api-reference/v2/openapi.json +++ b/api-reference/v2/openapi.json @@ -427,6 +427,27 @@ "title": "FetchV2SourceFetchResponse", "type": "object" }, + "github_com_hydradb_hydradb-application_internal_connectors_providers_gmail.CalendarBinding": { + "properties": { + "calendar_id": { + "description": "Google Calendar ID of the selected calendar resource this Gmail resource is linked to.", + "example": "alice@example.com", + "type": "string" + }, + "connector_id": { + "description": "Connector this resource belongs to.", + "example": "gcal", + "type": "string" + }, + "resource_id": { + "description": "Resource identifier from the Discover endpoint.", + "example": "alice@example.com", + "type": "string" + } + }, + "title": "GithubComHydradbHydradbApplicationInternalConnectorsProvidersGmailCalendarBinding", + "type": "object" + }, "github_com_hydradb_hydradb-application_internal_service.MetadataEditResult": { "properties": { "acl_updated": { @@ -1153,6 +1174,207 @@ "title": "GraphTripletWithEvidence", "type": "object" }, + "handler.BYOGCRUDCollectionRequest": { + "properties": { + "collection": { + "default": "default", + "description": "Graph collection to delete. Defaults to `default`.", + "example": "main", + "type": "string" + }, + "database": { + "description": "Database that holds the graph collection. Required.", + "example": "acme_corp", + "type": "string" + } + }, + "required": [ + "database" + ], + "title": "HandlerByogcrudCollectionRequest", + "type": "object" + }, + "handler.BYOGCRUDDatabaseRequest": { + "properties": { + "database": { + "description": "Database to create or delete. Required.", + "example": "acme_corp", + "type": "string" + } + }, + "required": [ + "database" + ], + "title": "HandlerByogcrudDatabaseRequest", + "type": "object" + }, + "handler.BYOGCRUDQueryRequest": { + "properties": { + "collection": { + "default": "default", + "description": "Graph collection to query. Defaults to `default`; created on its first write.", + "example": "main", + "type": "string" + }, + "database": { + "description": "Database whose graph to query. Create it before querying. Required.", + "example": "acme_corp", + "type": "string" + }, + "params": { + "additionalProperties": {}, + "description": "Named Cypher parameters. Pass user values here instead of interpolating them into the query.", + "type": "object" + }, + "query": { + "description": "Cypher read, write or supported schema statement. Required.", + "example": "MATCH (n) RETURN n LIMIT 10", + "type": "string" + } + }, + "required": [ + "database", + "query" + ], + "title": "HandlerByogcrudQueryRequest", + "type": "object" + }, + "handler.BYOGCollectionDeleted": { + "properties": { + "collection": { + "description": "Graph collection deleted.", + "example": "team_docs", + "type": "string" + }, + "database": { + "description": "Database that held the deleted graph collection.", + "example": "acme_corp", + "type": "string" + }, + "deleted": { + "description": "`true` after deletion, including when the graph collection was already absent.", + "example": true, + "type": "boolean" + } + }, + "title": "HandlerByogCollectionDeleted", + "type": "object" + }, + "handler.BYOGCollections": { + "properties": { + "collections": { + "description": "Names of graph collections, sorted alphabetically. Empty when no write has created a collection.", + "example": [ + "team_docs", + "engineering" + ], + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": false + }, + "database": { + "description": "Database whose graph collections were listed.", + "example": "acme_corp", + "type": "string" + } + }, + "title": "HandlerByogCollections", + "type": "object" + }, + "handler.BYOGDatabaseCreated": { + "properties": { + "cluster": { + "description": "Placement of the database's graph storage.", + "type": "string" + }, + "database": { + "description": "Name of the database created.", + "example": "acme_corp", + "type": "string" + }, + "status": { + "description": "`ready` when queries can run, or `provisioning` while the database is being prepared.", + "enum": [ + "ready", + "provisioning" + ], + "example": "ready", + "type": "string" + } + }, + "title": "HandlerByogDatabaseCreated", + "type": "object" + }, + "handler.BYOGDatabaseDeleted": { + "properties": { + "cluster": { + "description": "Placement of the deleted graph storage.", + "type": "string" + }, + "database": { + "description": "Database whose graph data was deleted.", + "example": "acme_corp", + "type": "string" + }, + "deleted": { + "description": "`true` when the BYOG database itself was deleted. `false` for a managed database, whose managed content is preserved.", + "example": true, + "type": "boolean" + }, + "deleted_collections": { + "description": "Graph collections deleted from the database.", + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": false + } + }, + "title": "HandlerByogDatabaseDeleted", + "type": "object" + }, + "handler.BYOGRequest": { + "properties": { + "collection": { + "description": "Collection to read. Defaults to the database's default collection.", + "example": "main", + "type": "string" + }, + "database": { + "description": "Database whose managed graph to read. Required.", + "example": "acme_corp", + "type": "string" + }, + "params": { + "additionalProperties": {}, + "description": "Named Cypher parameters. Pass user values here instead of interpolating them into the query.", + "type": "object" + }, + "query": { + "description": "Read-only Cypher query. Node patterns are scoped to the requested database and collection.", + "example": "MATCH (n) RETURN n LIMIT 10", + "type": "string" + }, + "type": { + "default": "knowledge", + "description": "Corpus to read, `knowledge` or `memory`. Defaults to `knowledge`.", + "enum": [ + "knowledge", + "memory" + ], + "example": "knowledge", + "type": "string" + } + }, + "required": [ + "database", + "query" + ], + "title": "HandlerByogRequest", + "type": "object" + }, "handler.Envelope-feedback_SubmitResponse": { "properties": { "data": { @@ -1652,21 +1874,14 @@ "title": "HandlerEnvelopeGraphSourceSubgraphResponse", "type": "object" }, - "handler.Envelope-ingestion_V2BatchProcessingStatus": { + "handler.Envelope-handler_BYOGCollectionDeleted": { "properties": { "data": { - "$ref": "#/components/schemas/ingestion.V2BatchProcessingStatus", + "$ref": "#/components/schemas/handler.BYOGCollectionDeleted", "example": { - "statuses": [ - { - "error_code": "", - "error_message": "", - "id": "HydraDoc1234", - "indexing_status": "completed", - "message": "Source processed successfully.", - "success": true - } - ] + "collection": "team_docs", + "database": "acme_corp", + "deleted": true } }, "error": { @@ -1711,31 +1926,19 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeIngestionV2BatchProcessingStatus", + "title": "HandlerEnvelopeHandlerByogCollectionDeleted", "type": "object" }, - "handler.Envelope-ingestion_V2IngestResponse": { + "handler.Envelope-handler_BYOGCollections": { "properties": { "data": { - "$ref": "#/components/schemas/ingestion.V2IngestResponse", + "$ref": "#/components/schemas/handler.BYOGCollections", "example": { - "failed_count": 0, - "generation_started_at_ms": 1, - "message": "Success", - "results": [ - { - "error": null, - "error_code": null, - "filename": "policy.pdf", - "id": "HydraDoc1234", - "infer": true, - "relations_created": 5, - "status": "queued", - "title": "Project Phoenix Overview" - } + "collections": [ + "team_docs", + "engineering" ], - "success": true, - "success_count": 2 + "database": "acme_corp" } }, "error": { @@ -1780,78 +1983,72 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeIngestionV2IngestResponse", + "title": "HandlerEnvelopeHandlerByogCollections", "type": "object" }, - "handler.Envelope-list_V2ListResponse": { + "handler.Envelope-handler_BYOGDatabaseCreated": { "properties": { "data": { - "$ref": "#/components/schemas/list.V2ListResponse", + "$ref": "#/components/schemas/handler.BYOGDatabaseCreated", "example": { - "message": "Success", - "pagination": { - "has_next": true, - "has_previous": false, - "page": 1, - "page_size": 50, - "total": 128, - "total_pages": 3 + "database": "acme_corp", + "status": "ready" + } + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/handler.apiError", + "title": "HandlerApiError" }, - "sources": [ + { + "title": "No error", + "type": "null" + } + ], + "description": "Error details on failure, or null on success.", + "example": null + }, + "meta": { + "$ref": "#/components/schemas/handler.responseMeta", + "example": { + "collection": "team_docs", + "database": "acme_corp", + "latency_ms": 12.3, + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "source_type": "file", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "warnings": [ { - "additional_metadata": { - "author": "ada", - "doc_version": 3 - }, - "app_external_id": "C0123456789", - "app_kind": "slack", - "app_provider": "slack", - "collection": "team_docs", - "comments_truncated": true, - "database": "acme_corp", - "description": "Internal overview of the Project Phoenix rollout.", - "id": "HydraDoc1234", - "metadata": { - "department": "finance", - "priority": 7 - }, - "note": "Superseded by the Q3 rollout plan.", - "sub_tenant_id": "team_docs", - "tenant_id": "acme_corp", - "timestamp": "2026-07-02T10:00:00Z", - "title": "Project Phoenix Overview", - "type": "knowledge" - } - ], - "success": true, - "total": 128, - "user_memories": [ - { - "additional_metadata": { - "author": "ada", - "doc_version": 3 - }, - "app_external_id": "C0123456789", - "app_kind": "slack", - "app_provider": "slack", - "collection": "team_docs", - "database": "acme_corp", - "description": "Internal overview of the Project Phoenix rollout.", - "memory_id": "memory_1234", - "metadata": { - "department": "finance", - "priority": 7 - }, - "note": "Superseded by the Q3 rollout plan.", - "sub_tenant_id": "team_docs", - "tenant_id": "acme_corp", - "timestamp": "2026-07-02T10:00:00Z", - "title": "Project Phoenix Overview", - "type": "knowledge" + "code": "acl_ignored_by_connector_enforcement", + "collections": [ + "team_docs", + "engineering" + ], + "message": "This connector enforces ACL, so the request's acl was ignored." } ] } }, + "success": { + "description": "Whether the request succeeded.", + "example": true, + "type": "boolean" + } + }, + "title": "HandlerEnvelopeHandlerByogDatabaseCreated", + "type": "object" + }, + "handler.Envelope-handler_BYOGDatabaseDeleted": { + "properties": { + "data": { + "$ref": "#/components/schemas/handler.BYOGDatabaseDeleted", + "example": { + "database": "acme_corp", + "deleted": true + } + }, "error": { "anyOf": [ { @@ -1894,174 +2091,19 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeListV2ListResponse", + "title": "HandlerEnvelopeHandlerByogDatabaseDeleted", "type": "object" }, - "handler.Envelope-search_V2RetrievalResult": { + "handler.Envelope-handler_BYOGQueryRows": { "properties": { "data": { - "description": "Query results: the structured object by default, or a single string rendering of the same results when the request set response_format to markdown.", - "example": { - "chunks": [ - { - "additional_metadata": { - "author": "ada", - "doc_version": 3 - }, - "chunk_content": "HydraDB supports hybrid retrieval across knowledge and memories.", - "chunk_metadata": { - "row_end": 1, - "row_start": 1 - }, - "chunk_uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", - "collection": "team_docs", - "extra_context_ids": [ - "HydraEmbeddings123_2", - "HydraEmbeddings123_3" - ], - "id": "HydraDoc1234", - "layout": "text", - "metadata": { - "department": "finance", - "priority": 7 - }, - "relevancy_score": 0.87, - "source_last_updated_time": "2026-07-02T12:30:00Z", - "source_title": "Project Phoenix Overview", - "source_type": "file", - "source_upload_time": "2026-07-02T10:00:00Z", - "sub_tenant_id": "team_docs" - } - ], - "code_search": { - "duration_ms": 0.5, - "repos": [ - { - "duration_ms": 0.5, - "error": "", - "status": "completed", - "truncated": true, - "unsigned": true - } - ], - "status": "completed" - }, - "graph_context": { - "chunk_id_to_group_ids": { - "HydraEmbeddings123_0": [ - "grp_1234" - ] - }, - "chunk_relations": [ - { - "combined_context": "Acme Corp deploys HydraDB: Acme Corp deploys HydraDB in production for context retrieval.", - "group_id": "grp_1234", - "relevancy_score": 0.87, - "source_chunk_ids": [ - "HydraEmbeddings123_0", - "HydraEmbeddings123_1" - ], - "triplets": [ - { - "relation": { - "canonical_predicate": "works_at", - "context": "Ada works at Acme Corp.", - "raw_predicate": "works at", - "source_entity_id": "entity_1a2b", - "target_entity_id": "entity_3c4d" - }, - "source": { - "entity_id": "entity_1a2b", - "name": "Ada", - "type": "person" - }, - "target": { - "entity_id": "entity_3c4d", - "name": "Acme Corp", - "type": "organization" - } - } - ] - } - ], - "query_paths": [ - { - "combined_context": "Acme Corp deploys HydraDB: Acme Corp deploys HydraDB in production for context retrieval.", - "group_id": "grp_1234", - "relevancy_score": 0.87, - "source_chunk_ids": [ - "HydraEmbeddings123_0", - "HydraEmbeddings123_1" - ], - "triplets": [ - { - "relation": { - "canonical_predicate": "works_at", - "context": "Ada works at Acme Corp.", - "raw_predicate": "works at", - "source_entity_id": "entity_1a2b", - "target_entity_id": "entity_3c4d" - }, - "source": { - "entity_id": "entity_1a2b", - "name": "Ada", - "type": "person" - }, - "target": { - "entity_id": "entity_3c4d", - "name": "Acme Corp", - "type": "organization" - } - } - ] - } - ] - }, - "tabular_data": null, - "temporal_duration": { - "approximate": true, - "days": 1, - "from": { - "chunk_id": "HydraEmbeddings123_0", - "event_end": 1, - "event_start": 1, - "observed_at": 1, - "relationship_id": "rel_1234", - "source_id": "HydraDoc1234", - "status": "completed" - }, - "pairing_confidence": 0.5, - "to": { - "chunk_id": "HydraEmbeddings123_0", - "event_end": 1, - "event_start": 1, - "observed_at": 1, - "relationship_id": "rel_1234", - "source_id": "HydraDoc1234", - "status": "completed" - } - }, - "temporal_facts": [ - { - "chunk_id": "HydraEmbeddings123_0", - "event_end": 1, - "event_start": 1, - "observed_at": 1, - "relationship_id": "rel_1234", - "source_id": "HydraDoc1234", - "status": "completed" - } - ] + "description": "Rows selected by the Cypher query. Each row maps the returned column names to their values. Empty when the query returns no rows.", + "items": { + "additionalProperties": {}, + "type": "object" }, - "oneOf": [ - { - "$ref": "#/components/schemas/search.V2RetrievalResult" - }, - { - "description": "String rendering of the results, returned when the request set response_format to markdown.", - "type": "string" - } - ] + "type": "array", + "uniqueItems": false }, "error": { "anyOf": [ @@ -2105,25 +2147,24 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeSearchV2RetrievalResult", + "title": "HandlerEnvelopeHandlerByogQueryRows", "type": "object" }, - "handler.Envelope-sources_MemoryDeleteResponse": { + "handler.Envelope-ingestion_V2BatchProcessingStatus": { "properties": { "data": { - "$ref": "#/components/schemas/sources.MemoryDeleteResponse", + "$ref": "#/components/schemas/ingestion.V2BatchProcessingStatus", "example": { - "deleted_count": 1, - "message": "Success", - "results": [ + "statuses": [ { - "deleted": true, - "error": "", - "id": "HydraDoc1234" + "error_code": "", + "error_message": "", + "id": "HydraDoc1234", + "indexing_status": "completed", + "message": "Source processed successfully.", + "success": true } - ], - "success": true, - "user_memory_deleted": 1 + ] } }, "error": { @@ -2168,85 +2209,31 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeSourcesMemoryDeleteResponse", + "title": "HandlerEnvelopeIngestionV2BatchProcessingStatus", "type": "object" }, - "handler.Envelope-tenants_InfraStatusResponseV2": { + "handler.Envelope-ingestion_V2IngestResponse": { "properties": { "data": { - "$ref": "#/components/schemas/tenants.InfraStatusResponseV2", + "$ref": "#/components/schemas/ingestion.V2IngestResponse", "example": { - "database": "acme_corp", - "infra": { - "graph_status": true, - "ready_for_ingestion": true, - "scheduler_status": true, - "vectorstore_status": { - "knowledge": true, - "memories": true - } - }, + "failed_count": 0, + "generation_started_at_ms": 1, "message": "Success", - "org_id": "org_1a2b3c", - "tenant_id": "acme_corp" - } - }, - "error": { - "anyOf": [ - { - "$ref": "#/components/schemas/handler.apiError", - "title": "HandlerApiError" - }, - { - "title": "No error", - "type": "null" - } - ], - "description": "Error details on failure, or null on success.", - "example": null - }, - "meta": { - "$ref": "#/components/schemas/handler.responseMeta", - "example": { - "collection": "team_docs", - "database": "acme_corp", - "latency_ms": 12.3, - "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", - "source_type": "file", - "sub_tenant_id": "team_docs", - "tenant_id": "acme_corp", - "warnings": [ + "results": [ { - "code": "acl_ignored_by_connector_enforcement", - "collections": [ - "team_docs", - "engineering" - ], - "message": "This connector enforces ACL, so the request's acl was ignored." + "error": null, + "error_code": null, + "filename": "policy.pdf", + "id": "HydraDoc1234", + "infer": true, + "relations_created": 5, + "status": "queued", + "title": "Project Phoenix Overview" } - ] - } - }, - "success": { - "description": "Whether the request succeeded.", - "example": true, - "type": "boolean" - } - }, - "title": "HandlerEnvelopeTenantsInfraStatusResponseV2", - "type": "object" - }, - "handler.Envelope-tenants_SubTenantDeleteResponse": { - "properties": { - "data": { - "$ref": "#/components/schemas/tenants.SubTenantDeleteResponse", - "example": { - "collection": "team_docs", - "database": "acme_corp", - "message": "Success", - "status": "completed", - "sub_tenant_id": "team_docs", - "tenant_id": "acme_corp" + ], + "success": true, + "success_count": 2 } }, "error": { @@ -2291,137 +2278,78 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeTenantsSubTenantDeleteResponse", + "title": "HandlerEnvelopeIngestionV2IngestResponse", "type": "object" }, - "handler.Envelope-tenants_SubTenantIdsResponse": { + "handler.Envelope-list_V2ListResponse": { "properties": { "data": { - "$ref": "#/components/schemas/tenants.SubTenantIdsResponse", + "$ref": "#/components/schemas/list.V2ListResponse", "example": { - "collections": [ - "team_docs", - "engineering" - ], "message": "Success", - "sub_tenant_ids": [ - "team_docs", - "engineering" - ] - } - }, - "error": { - "anyOf": [ - { - "$ref": "#/components/schemas/handler.apiError", - "title": "HandlerApiError" + "pagination": { + "has_next": true, + "has_previous": false, + "page": 1, + "page_size": 50, + "total": 128, + "total_pages": 3 }, - { - "title": "No error", - "type": "null" - } - ], - "description": "Error details on failure, or null on success.", - "example": null - }, - "meta": { - "$ref": "#/components/schemas/handler.responseMeta", - "example": { - "collection": "team_docs", - "database": "acme_corp", - "latency_ms": 12.3, - "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", - "source_type": "file", - "sub_tenant_id": "team_docs", - "tenant_id": "acme_corp", - "warnings": [ + "sources": [ { - "code": "acl_ignored_by_connector_enforcement", - "collections": [ - "team_docs", - "engineering" - ], - "message": "This connector enforces ACL, so the request's acl was ignored." + "additional_metadata": { + "author": "ada", + "doc_version": 3 + }, + "app_external_id": "C0123456789", + "app_kind": "slack", + "app_provider": "slack", + "collection": "team_docs", + "comments_truncated": true, + "database": "acme_corp", + "description": "Internal overview of the Project Phoenix rollout.", + "id": "HydraDoc1234", + "metadata": { + "department": "finance", + "priority": 7 + }, + "note": "Superseded by the Q3 rollout plan.", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "timestamp": "2026-07-02T10:00:00Z", + "title": "Project Phoenix Overview", + "type": "knowledge" } - ] - } - }, - "success": { - "description": "Whether the request succeeded.", - "example": true, - "type": "boolean" - } - }, - "title": "HandlerEnvelopeTenantsSubTenantIdsResponse", - "type": "object" - }, - "handler.Envelope-tenants_TenantCreateAcceptedResponse": { - "properties": { - "data": { - "$ref": "#/components/schemas/tenants.TenantCreateAcceptedResponse", - "example": { - "database": "acme_corp", - "message": "Success", - "status": "completed", - "tenant_id": "acme_corp" - } - }, - "error": { - "anyOf": [ - { - "$ref": "#/components/schemas/handler.apiError", - "title": "HandlerApiError" - }, - { - "title": "No error", - "type": "null" - } - ], - "description": "Error details on failure, or null on success.", - "example": null - }, - "meta": { - "$ref": "#/components/schemas/handler.responseMeta", - "example": { - "collection": "team_docs", - "database": "acme_corp", - "latency_ms": 12.3, - "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", - "source_type": "file", - "sub_tenant_id": "team_docs", - "tenant_id": "acme_corp", - "warnings": [ + ], + "success": true, + "total": 128, + "user_memories": [ { - "code": "acl_ignored_by_connector_enforcement", - "collections": [ - "team_docs", - "engineering" - ], - "message": "This connector enforces ACL, so the request's acl was ignored." + "additional_metadata": { + "author": "ada", + "doc_version": 3 + }, + "app_external_id": "C0123456789", + "app_kind": "slack", + "app_provider": "slack", + "collection": "team_docs", + "database": "acme_corp", + "description": "Internal overview of the Project Phoenix rollout.", + "memory_id": "memory_1234", + "metadata": { + "department": "finance", + "priority": 7 + }, + "note": "Superseded by the Q3 rollout plan.", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "timestamp": "2026-07-02T10:00:00Z", + "title": "Project Phoenix Overview", + "type": "knowledge" } ] } }, - "success": { - "description": "Whether the request succeeded.", - "example": true, - "type": "boolean" - } - }, - "title": "HandlerEnvelopeTenantsTenantCreateAcceptedResponse", - "type": "object" - }, - "handler.Envelope-tenants_TenantDeleteResponse": { - "properties": { - "data": { - "$ref": "#/components/schemas/tenants.TenantDeleteResponse", - "example": { - "database": "acme_corp", - "message": "Success", - "status": "completed", - "tenant_id": "acme_corp" - } - }, "error": { "anyOf": [ { @@ -2464,38 +2392,225 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeTenantsTenantDeleteResponse", + "title": "HandlerEnvelopeListV2ListResponse", "type": "object" }, - "handler.Envelope-tenants_TenantIdsResponse": { + "handler.Envelope-search_V2RetrievalResult": { "properties": { "data": { - "$ref": "#/components/schemas/tenants.TenantIdsResponse", + "description": "Query results: the structured object by default, or a single string rendering of the same results when the request set response_format to markdown.", "example": { - "databases": [ - "acme_corp", - "research_kb" - ], - "failed_databases": [ + "chunks": [ { - "database": "acme_corp", - "error": "", - "tenant_id": "acme_corp" + "additional_metadata": { + "author": "ada", + "doc_version": 3 + }, + "chunk_content": "HydraDB supports hybrid retrieval across knowledge and memories.", + "chunk_metadata": { + "row_end": 1, + "row_start": 1 + }, + "chunk_uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", + "collection": "team_docs", + "extra_context_ids": [ + "HydraEmbeddings123_2", + "HydraEmbeddings123_3" + ], + "id": "HydraDoc1234", + "layout": "text", + "metadata": { + "department": "finance", + "priority": 7 + }, + "relevancy_score": 0.87, + "source_last_updated_time": "2026-07-02T12:30:00Z", + "source_title": "Project Phoenix Overview", + "source_type": "file", + "source_upload_time": "2026-07-02T10:00:00Z", + "sub_tenant_id": "team_docs" + }, + { + "chunk_content": "| region | revenue |\n| East | 97500 |\n| West | 85860 |", + "chunk_uuid": "sales_2026_chunk_0001", + "id": "sales_2026", + "relevancy_score": 0.88, + "source_title": "sales_2026.csv" } ], - "failed_tenant_ids": [ + "code_search": { + "duration_ms": 0.5, + "repos": [ + { + "duration_ms": 0.5, + "error": "", + "status": "completed", + "truncated": true, + "unsigned": true + } + ], + "status": "completed" + }, + "graph_context": { + "chunk_id_to_group_ids": { + "HydraEmbeddings123_0": [ + "grp_1234" + ] + }, + "chunk_relations": [ + { + "combined_context": "Acme Corp deploys HydraDB: Acme Corp deploys HydraDB in production for context retrieval.", + "group_id": "grp_1234", + "relevancy_score": 0.87, + "source_chunk_ids": [ + "HydraEmbeddings123_0", + "HydraEmbeddings123_1" + ], + "triplets": [ + { + "relation": { + "canonical_predicate": "works_at", + "context": "Ada works at Acme Corp.", + "raw_predicate": "works at", + "source_entity_id": "entity_1a2b", + "target_entity_id": "entity_3c4d" + }, + "source": { + "entity_id": "entity_1a2b", + "name": "Ada", + "type": "person" + }, + "target": { + "entity_id": "entity_3c4d", + "name": "Acme Corp", + "type": "organization" + } + } + ] + } + ], + "query_paths": [ + { + "combined_context": "Acme Corp deploys HydraDB: Acme Corp deploys HydraDB in production for context retrieval.", + "group_id": "grp_1234", + "relevancy_score": 0.87, + "source_chunk_ids": [ + "HydraEmbeddings123_0", + "HydraEmbeddings123_1" + ], + "triplets": [ + { + "relation": { + "canonical_predicate": "works_at", + "context": "Ada works at Acme Corp.", + "raw_predicate": "works at", + "source_entity_id": "entity_1a2b", + "target_entity_id": "entity_3c4d" + }, + "source": { + "entity_id": "entity_1a2b", + "name": "Ada", + "type": "person" + }, + "target": { + "entity_id": "entity_3c4d", + "name": "Acme Corp", + "type": "organization" + } + } + ] + } + ] + }, + "tabular_data": { + "answer_type": "computed", + "citations": { + "constants": [], + "rows": [ + { + "chunk_id": "sales_2026_chunk_0001", + "collection": "sales", + "source_id": "sales_2026" + } + ] + }, + "columns": [ + { + "kind": "string", + "name": "region", + "type": "VARCHAR" + }, + { + "kind": "integer", + "name": "total_revenue", + "type": "HUGEINT" + } + ], + "records": [ + { + "region": "East", + "total_revenue": 97500 + }, + { + "region": "West", + "total_revenue": 85860 + } + ], + "sources": [ + { + "collection": "sales", + "id": "sales_2026", + "title": "sales_2026.csv", + "version": "9181604be39c" + } + ], + "status": "ok", + "truncated": false + }, + "temporal_duration": { + "approximate": true, + "days": 1, + "from": { + "chunk_id": "HydraEmbeddings123_0", + "event_end": 1, + "event_start": 1, + "observed_at": 1, + "relationship_id": "rel_1234", + "source_id": "HydraDoc1234", + "status": "completed" + }, + "pairing_confidence": 0.5, + "to": { + "chunk_id": "HydraEmbeddings123_0", + "event_end": 1, + "event_start": 1, + "observed_at": 1, + "relationship_id": "rel_1234", + "source_id": "HydraDoc1234", + "status": "completed" + } + }, + "temporal_facts": [ { - "database": "acme_corp", - "error": "", - "tenant_id": "acme_corp" + "chunk_id": "HydraEmbeddings123_0", + "event_end": 1, + "event_start": 1, + "observed_at": 1, + "relationship_id": "rel_1234", + "source_id": "HydraDoc1234", + "status": "completed" } - ], - "message": "Success", - "tenant_ids": [ - "acme_corp", - "research_kb" ] - } + }, + "oneOf": [ + { + "$ref": "#/components/schemas/search.V2RetrievalResult" + }, + { + "description": "String rendering of the results, returned when the request set response_format to markdown.", + "type": "string" + } + ] }, "error": { "anyOf": [ @@ -2539,26 +2654,25 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeTenantsTenantIdsResponse", + "title": "HandlerEnvelopeSearchV2RetrievalResult", "type": "object" }, - "handler.Envelope-tenants_TenantMetadataSchemaResponse": { + "handler.Envelope-sources_MemoryDeleteResponse": { "properties": { "data": { - "$ref": "#/components/schemas/tenants.TenantMetadataSchemaResponse", + "$ref": "#/components/schemas/sources.MemoryDeleteResponse", "example": { - "database": "acme_corp", - "fields": [ + "deleted_count": 1, + "message": "Success", + "results": [ { - "data_type": "VARCHAR", - "enable_dense_embedding": true, - "enable_match": true, - "enable_sparse_embedding": false, - "max_length": 256, - "name": "category" + "deleted": true, + "error": "", + "id": "HydraDoc1234" } ], - "tenant_id": "acme_corp" + "success": true, + "user_memory_deleted": 1 } }, "error": { @@ -2603,22 +2717,26 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeTenantsTenantMetadataSchemaResponse", + "title": "HandlerEnvelopeSourcesMemoryDeleteResponse", "type": "object" }, - "handler.Envelope-tenants_TenantStatsResponse": { + "handler.Envelope-tenants_InfraStatusResponseV2": { "properties": { "data": { - "$ref": "#/components/schemas/tenants.TenantStatsResponse", + "$ref": "#/components/schemas/tenants.InfraStatusResponseV2", "example": { "database": "acme_corp", - "knowledge_collection": { - "row_count": 1280 - }, - "memory_collection": { - "row_count": 1280 + "infra": { + "graph_status": true, + "ready_for_ingestion": true, + "scheduler_status": true, + "vectorstore_status": { + "knowledge": true, + "memories": true + } }, "message": "Success", + "org_id": "org_1a2b3c", "tenant_id": "acme_corp" } }, @@ -2664,29 +2782,20 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeTenantsTenantStatsResponse", + "title": "HandlerEnvelopeTenantsInfraStatusResponseV2", "type": "object" }, - "handler.Envelope-webhooks_DeliveryItem": { + "handler.Envelope-tenants_SubTenantDeleteResponse": { "properties": { "data": { - "$ref": "#/components/schemas/webhooks.DeliveryItem", + "$ref": "#/components/schemas/tenants.SubTenantDeleteResponse", "example": { - "attempts": 1, "collection": "team_docs", - "created_at": "2026-07-02T10:00:00Z", "database": "acme_corp", - "delivery_id": "dlv_9f8e7d6c", - "doc_id": "HydraDoc1234", - "error_code": null, - "error_message": null, - "event_at": "2026-07-02T10:00:00Z", - "event_type": "indexing.status_changed", - "indexing_status": "completed", - "status": "delivered", + "message": "Success", + "status": "completed", "sub_tenant_id": "team_docs", - "tenant_id": "tenant_1234", - "updated_at": "2026-07-02T10:00:05Z" + "tenant_id": "acme_corp" } }, "error": { @@ -2731,35 +2840,23 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeWebhooksDeliveryItem", + "title": "HandlerEnvelopeTenantsSubTenantDeleteResponse", "type": "object" }, - "handler.Envelope-webhooks_DeliveryListResponse": { + "handler.Envelope-tenants_SubTenantIdsResponse": { "properties": { "data": { - "$ref": "#/components/schemas/webhooks.DeliveryListResponse", + "$ref": "#/components/schemas/tenants.SubTenantIdsResponse", "example": { - "count": 12, - "deliveries": [ - { - "attempts": 1, - "collection": "team_docs", - "created_at": "2026-07-02T10:00:00Z", - "database": "acme_corp", - "delivery_id": "dlv_9f8e7d6c", - "doc_id": "HydraDoc1234", - "error_code": null, - "error_message": null, - "event_at": "2026-07-02T10:00:00Z", - "event_type": "indexing.status_changed", - "indexing_status": "completed", - "status": "delivered", - "sub_tenant_id": "team_docs", - "tenant_id": "tenant_1234", - "updated_at": "2026-07-02T10:00:05Z" - } + "collections": [ + "team_docs", + "engineering" ], - "next_cursor": null + "message": "Success", + "sub_tenant_ids": [ + "team_docs", + "engineering" + ] } }, "error": { @@ -2804,17 +2901,18 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeWebhooksDeliveryListResponse", + "title": "HandlerEnvelopeTenantsSubTenantIdsResponse", "type": "object" }, - "handler.Envelope-webhooks_RetryResponse": { + "handler.Envelope-tenants_TenantCreateAcceptedResponse": { "properties": { "data": { - "$ref": "#/components/schemas/webhooks.RetryResponse", + "$ref": "#/components/schemas/tenants.TenantCreateAcceptedResponse", "example": { - "delivery_id": "dlv_9f8e7d6c", + "database": "acme_corp", "message": "Success", - "queued": true + "status": "completed", + "tenant_id": "acme_corp" } }, "error": { @@ -2859,17 +2957,18 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeWebhooksRetryResponse", + "title": "HandlerEnvelopeTenantsTenantCreateAcceptedResponse", "type": "object" }, - "handler.Envelope-webhooks_SigningSecretResponse": { + "handler.Envelope-tenants_TenantDeleteResponse": { "properties": { "data": { - "$ref": "#/components/schemas/webhooks.SigningSecretResponse", + "$ref": "#/components/schemas/tenants.TenantDeleteResponse", "example": { - "generated": true, + "database": "acme_corp", "message": "Success", - "signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY" + "status": "completed", + "tenant_id": "acme_corp" } }, "error": { @@ -2914,16 +3013,37 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeWebhooksSigningSecretResponse", + "title": "HandlerEnvelopeTenantsTenantDeleteResponse", "type": "object" }, - "handler.Envelope-webhooks_WebhookDeleteResponse": { + "handler.Envelope-tenants_TenantIdsResponse": { "properties": { "data": { - "$ref": "#/components/schemas/webhooks.WebhookDeleteResponse", + "$ref": "#/components/schemas/tenants.TenantIdsResponse", "example": { - "deleted": true, - "message": "Success" + "databases": [ + "acme_corp", + "research_kb" + ], + "failed_databases": [ + { + "database": "acme_corp", + "error": "", + "tenant_id": "acme_corp" + } + ], + "failed_tenant_ids": [ + { + "database": "acme_corp", + "error": "", + "tenant_id": "acme_corp" + } + ], + "message": "Success", + "tenant_ids": [ + "acme_corp", + "research_kb" + ] } }, "error": { @@ -2968,20 +3088,26 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeWebhooksWebhookDeleteResponse", + "title": "HandlerEnvelopeTenantsTenantIdsResponse", "type": "object" }, - "handler.Envelope-webhooks_WebhookGetResponse": { + "handler.Envelope-tenants_TenantMetadataSchemaResponse": { "properties": { "data": { - "$ref": "#/components/schemas/webhooks.WebhookGetResponse", + "$ref": "#/components/schemas/tenants.TenantMetadataSchemaResponse", "example": { - "event_types": [ - "indexing.status_changed" + "database": "acme_corp", + "fields": [ + { + "data_type": "VARCHAR", + "enable_dense_embedding": true, + "enable_match": true, + "enable_sparse_embedding": false, + "max_length": 256, + "name": "category" + } ], - "registered": true, - "signing_secret_configured": true, - "url": "https://example.com/webhooks/hydradb" + "tenant_id": "acme_corp" } }, "error": { @@ -3026,22 +3152,23 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeWebhooksWebhookGetResponse", + "title": "HandlerEnvelopeTenantsTenantMetadataSchemaResponse", "type": "object" }, - "handler.Envelope-webhooks_WebhookRegisterResponse": { + "handler.Envelope-tenants_TenantStatsResponse": { "properties": { "data": { - "$ref": "#/components/schemas/webhooks.WebhookRegisterResponse", + "$ref": "#/components/schemas/tenants.TenantStatsResponse", "example": { - "event_types": [ - "indexing.status_changed" - ], + "database": "acme_corp", + "knowledge_collection": { + "row_count": 1280 + }, + "memory_collection": { + "row_count": 1280 + }, "message": "Success", - "registered": true, - "signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY", - "signing_secret_configured": true, - "url": "https://example.com/webhooks/hydradb" + "tenant_id": "acme_corp" } }, "error": { @@ -3086,17 +3213,29 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeWebhooksWebhookRegisterResponse", + "title": "HandlerEnvelopeTenantsTenantStatsResponse", "type": "object" }, - "handler.Envelope-webhooks_WebhookTestResponse": { + "handler.Envelope-webhooks_DeliveryItem": { "properties": { "data": { - "$ref": "#/components/schemas/webhooks.WebhookTestResponse", + "$ref": "#/components/schemas/webhooks.DeliveryItem", "example": { - "delivered": true, - "message": "Success", - "status_code": 200 + "attempts": 1, + "collection": "team_docs", + "created_at": "2026-07-02T10:00:00Z", + "database": "acme_corp", + "delivery_id": "dlv_9f8e7d6c", + "doc_id": "HydraDoc1234", + "error_code": null, + "error_message": null, + "event_at": "2026-07-02T10:00:00Z", + "event_type": "indexing.status_changed", + "indexing_status": "completed", + "status": "delivered", + "sub_tenant_id": "team_docs", + "tenant_id": "tenant_1234", + "updated_at": "2026-07-02T10:00:05Z" } }, "error": { @@ -3141,335 +3280,745 @@ "type": "boolean" } }, - "title": "HandlerEnvelopeWebhooksWebhookTestResponse", + "title": "HandlerEnvelopeWebhooksDeliveryItem", "type": "object" }, - "handler.ErrorDetail": { + "handler.Envelope-webhooks_DeliveryListResponse": { "properties": { - "deprecated": { - "description": "Whether this response concerns a deprecated field or route.", - "example": true, - "type": "boolean" - }, - "deprecated_field": { - "description": "The deprecated field name.", - "example": "tenant_id", - "type": "string" - }, - "deprecated_since": { - "description": "API version that deprecated the conflicting selector.", - "example": "2.0.1", - "type": "string" - }, - "error_code": { - "description": "Machine-readable error classification code.", - "example": "VALIDATION_ERROR", - "type": "string" - }, - "message": { - "description": "Human-readable description of the error.", - "example": "Request validation failed", - "type": "string" + "data": { + "$ref": "#/components/schemas/webhooks.DeliveryListResponse", + "example": { + "count": 12, + "deliveries": [ + { + "attempts": 1, + "collection": "team_docs", + "created_at": "2026-07-02T10:00:00Z", + "database": "acme_corp", + "delivery_id": "dlv_9f8e7d6c", + "doc_id": "HydraDoc1234", + "error_code": null, + "error_message": null, + "event_at": "2026-07-02T10:00:00Z", + "event_type": "indexing.status_changed", + "indexing_status": "completed", + "status": "delivered", + "sub_tenant_id": "team_docs", + "tenant_id": "tenant_1234", + "updated_at": "2026-07-02T10:00:05Z" + } + ], + "next_cursor": null + } }, - "preferred_field": { - "description": "The canonical replacement for the deprecated field.", - "example": "database", - "type": "string" + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/handler.apiError", + "title": "HandlerApiError" + }, + { + "title": "No error", + "type": "null" + } + ], + "description": "Error details on failure, or null on success.", + "example": null }, - "retry_after_seconds": { - "description": "Seconds to wait before retrying deletion of context that is still indexing.", - "example": 1, - "type": "integer" + "meta": { + "$ref": "#/components/schemas/handler.responseMeta", + "example": { + "collection": "team_docs", + "database": "acme_corp", + "latency_ms": 12.3, + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "source_type": "file", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "warnings": [ + { + "code": "acl_ignored_by_connector_enforcement", + "collections": [ + "team_docs", + "engineering" + ], + "message": "This connector enforces ACL, so the request's acl was ignored." + } + ] + } }, - "retryable": { - "description": "Whether retrying this failed query can succeed. Present for search workflow failures.", + "success": { + "description": "Whether the request succeeded.", "example": true, "type": "boolean" - }, - "success": { - "deprecated": true, - "description": "Deprecated: always `false`. Read the HTTP status, then `error.code` and `error.message`.", - "example": false, - "type": "boolean", - "x-deprecated": "true" } }, - "title": "HandlerErrorDetail", + "title": "HandlerEnvelopeWebhooksDeliveryListResponse", "type": "object" }, - "handler.ErrorEnvelope-sources_MemoryDeleteResponse": { + "handler.Envelope-webhooks_RetryResponse": { "properties": { "data": { - "$ref": "#/components/schemas/sources.MemoryDeleteResponse", + "$ref": "#/components/schemas/webhooks.RetryResponse", "example": { - "deleted_count": 1, + "delivery_id": "dlv_9f8e7d6c", "message": "Success", - "results": [ + "queued": true + } + }, + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/handler.apiError", + "title": "HandlerApiError" + }, + { + "title": "No error", + "type": "null" + } + ], + "description": "Error details on failure, or null on success.", + "example": null + }, + "meta": { + "$ref": "#/components/schemas/handler.responseMeta", + "example": { + "collection": "team_docs", + "database": "acme_corp", + "latency_ms": 12.3, + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "source_type": "file", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "warnings": [ { - "deleted": true, - "error": "", - "id": "HydraDoc1234" + "code": "acl_ignored_by_connector_enforcement", + "collections": [ + "team_docs", + "engineering" + ], + "message": "This connector enforces ACL, so the request's acl was ignored." } - ], - "success": true, - "user_memory_deleted": 1 + ] } }, - "detail": { - "$ref": "#/components/schemas/handler.ErrorDetail", + "success": { + "description": "Whether the request succeeded.", + "example": true, + "type": "boolean" + } + }, + "title": "HandlerEnvelopeWebhooksRetryResponse", + "type": "object" + }, + "handler.Envelope-webhooks_SigningSecretResponse": { + "properties": { + "data": { + "$ref": "#/components/schemas/webhooks.SigningSecretResponse", "example": { - "deprecated": true, - "deprecated_field": "tenant_id", - "deprecated_since": "2.0.1", - "error_code": "VALIDATION_ERROR", - "message": "Request validation failed", - "preferred_field": "database", - "retry_after_seconds": 1, - "retryable": true + "generated": true, + "message": "Success", + "signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY" } }, "error": { - "$ref": "#/components/schemas/handler.apiError", - "description": "Error message, empty string on success.", - "example": { - "code": "DATABASE_NOT_FOUND", - "message": "Database not found" - } + "anyOf": [ + { + "$ref": "#/components/schemas/handler.apiError", + "title": "HandlerApiError" + }, + { + "title": "No error", + "type": "null" + } + ], + "description": "Error details on failure, or null on success.", + "example": null }, "meta": { - "$ref": "#/components/schemas/handler.ErrorMeta", + "$ref": "#/components/schemas/handler.responseMeta", "example": { + "collection": "team_docs", + "database": "acme_corp", "latency_ms": 12.3, - "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d" + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "source_type": "file", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "warnings": [ + { + "code": "acl_ignored_by_connector_enforcement", + "collections": [ + "team_docs", + "engineering" + ], + "message": "This connector enforces ACL, so the request's acl was ignored." + } + ] } }, "success": { "description": "Whether the request succeeded.", - "example": false, + "example": true, "type": "boolean" } }, - "title": "HandlerErrorEnvelopeSourcesMemoryDeleteResponse", + "title": "HandlerEnvelopeWebhooksSigningSecretResponse", "type": "object" }, - "handler.ErrorMeta": { + "handler.Envelope-webhooks_WebhookDeleteResponse": { "properties": { - "api_version": { - "description": "Version of the API that served the request, for example `2.0.1`.", - "type": "string" + "data": { + "$ref": "#/components/schemas/webhooks.WebhookDeleteResponse", + "example": { + "deleted": true, + "message": "Success" + } }, - "latency_ms": { - "description": "Server-side processing time in milliseconds.", - "example": 12.3, - "type": "number" + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/handler.apiError", + "title": "HandlerApiError" + }, + { + "title": "No error", + "type": "null" + } + ], + "description": "Error details on failure, or null on success.", + "example": null }, - "request_id": { - "description": "Unique identifier for this request, useful for support and tracing.", - "example": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", - "type": "string" + "meta": { + "$ref": "#/components/schemas/handler.responseMeta", + "example": { + "collection": "team_docs", + "database": "acme_corp", + "latency_ms": 12.3, + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "source_type": "file", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "warnings": [ + { + "code": "acl_ignored_by_connector_enforcement", + "collections": [ + "team_docs", + "engineering" + ], + "message": "This connector enforces ACL, so the request's acl was ignored." + } + ] + } + }, + "success": { + "description": "Whether the request succeeded.", + "example": true, + "type": "boolean" } }, - "title": "HandlerErrorMeta", + "title": "HandlerEnvelopeWebhooksWebhookDeleteResponse", "type": "object" }, - "handler.ErrorResponse": { + "handler.Envelope-webhooks_WebhookGetResponse": { "properties": { "data": { - "description": "Always `null` on this error response.", - "type": "null" - }, - "detail": { - "$ref": "#/components/schemas/handler.ErrorDetail", - "description": "Structured error detail with code, message, and deprecation hints.", + "$ref": "#/components/schemas/webhooks.WebhookGetResponse", "example": { - "deprecated": true, - "deprecated_field": "tenant_id", - "deprecated_since": "2.0.1", - "error_code": "VALIDATION_ERROR", - "message": "Request validation failed", - "preferred_field": "database", - "retry_after_seconds": 1, - "retryable": true + "event_types": [ + "indexing.status_changed" + ], + "registered": true, + "signing_secret_configured": true, + "url": "https://example.com/webhooks/hydradb" } }, "error": { - "$ref": "#/components/schemas/handler.apiError", - "description": "Error message, empty string on success.", - "example": { - "code": "DATABASE_NOT_FOUND", - "message": "Database not found" - } + "anyOf": [ + { + "$ref": "#/components/schemas/handler.apiError", + "title": "HandlerApiError" + }, + { + "title": "No error", + "type": "null" + } + ], + "description": "Error details on failure, or null on success.", + "example": null }, "meta": { - "$ref": "#/components/schemas/handler.ErrorMeta", + "$ref": "#/components/schemas/handler.responseMeta", "example": { + "collection": "team_docs", + "database": "acme_corp", "latency_ms": 12.3, - "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d" + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "source_type": "file", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "warnings": [ + { + "code": "acl_ignored_by_connector_enforcement", + "collections": [ + "team_docs", + "engineering" + ], + "message": "This connector enforces ACL, so the request's acl was ignored." + } + ] } }, "success": { "description": "Whether the request succeeded.", - "example": false, + "example": true, "type": "boolean" } }, - "title": "HandlerErrorResponse", + "title": "HandlerEnvelopeWebhooksWebhookGetResponse", "type": "object" }, - "handler.ResponseWarning": { + "handler.Envelope-webhooks_WebhookRegisterResponse": { "properties": { - "code": { - "description": "Code identifies the warning type, such as acl_ignored_by_connector_enforcement.", - "example": "acl_ignored_by_connector_enforcement", - "type": "string" + "data": { + "$ref": "#/components/schemas/webhooks.WebhookRegisterResponse", + "example": { + "event_types": [ + "indexing.status_changed" + ], + "message": "Success", + "registered": true, + "signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY", + "signing_secret_configured": true, + "url": "https://example.com/webhooks/hydradb" + } }, - "collections": { - "description": "Collections the warning is about, such as the collections a multi-collection query skipped because they are being deleted.", - "example": [ - "team_docs", - "engineering" + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/handler.apiError", + "title": "HandlerApiError" + }, + { + "title": "No error", + "type": "null" + } ], - "items": { - "type": "string" - }, - "type": "array", - "uniqueItems": false + "description": "Error details on failure, or null on success.", + "example": null }, - "message": { - "description": "Human-readable explanation of the warning.", - "example": "This connector enforces ACL, so the request's acl was ignored.", - "type": "string" + "meta": { + "$ref": "#/components/schemas/handler.responseMeta", + "example": { + "collection": "team_docs", + "database": "acme_corp", + "latency_ms": 12.3, + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "source_type": "file", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "warnings": [ + { + "code": "acl_ignored_by_connector_enforcement", + "collections": [ + "team_docs", + "engineering" + ], + "message": "This connector enforces ACL, so the request's acl was ignored." + } + ] + } + }, + "success": { + "description": "Whether the request succeeded.", + "example": true, + "type": "boolean" } }, - "title": "HandlerResponseWarning", + "title": "HandlerEnvelopeWebhooksWebhookRegisterResponse", "type": "object" }, - "handler.apiError": { + "handler.Envelope-webhooks_WebhookTestResponse": { "properties": { - "code": { - "description": "Machine-readable error code (e.g. `DATABASE_NOT_FOUND`).", - "example": "DATABASE_NOT_FOUND", - "type": "string" + "data": { + "$ref": "#/components/schemas/webhooks.WebhookTestResponse", + "example": { + "delivered": true, + "message": "Success", + "status_code": 200 + } }, - "details": { - "additionalProperties": { - "type": "string" - }, - "description": "Extra facts about the error, as string pairs. Omitted when there are none.", - "type": "object" + "error": { + "anyOf": [ + { + "$ref": "#/components/schemas/handler.apiError", + "title": "HandlerApiError" + }, + { + "title": "No error", + "type": "null" + } + ], + "description": "Error details on failure, or null on success.", + "example": null }, - "message": { - "description": "Human-readable description of the error.", - "example": "Database not found", - "type": "string" + "meta": { + "$ref": "#/components/schemas/handler.responseMeta", + "example": { + "collection": "team_docs", + "database": "acme_corp", + "latency_ms": 12.3, + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "source_type": "file", + "sub_tenant_id": "team_docs", + "tenant_id": "acme_corp", + "warnings": [ + { + "code": "acl_ignored_by_connector_enforcement", + "collections": [ + "team_docs", + "engineering" + ], + "message": "This connector enforces ACL, so the request's acl was ignored." + } + ] + } }, - "param": { - "description": "The request field that caused the error. Omitted when no single field is at fault.", - "type": "string" + "success": { + "description": "Whether the request succeeded.", + "example": true, + "type": "boolean" } }, - "title": "HandlerApiError", + "title": "HandlerEnvelopeWebhooksWebhookTestResponse", "type": "object" }, - "handler.catalogConnector": { + "handler.ErrorDetail": { "properties": { - "acl_description": { - "description": "One-line summary of which provider permissions are captured as document access rules.", - "type": "string" - }, - "acl_supported": { - "description": "True when the provider captures ACLs and supports per-connector enforcement.", + "deprecated": { + "description": "Whether this response concerns a deprecated field or route.", "example": true, "type": "boolean" }, - "category": { - "description": "Display grouping for the provider, such as `Communication`.", + "deprecated_field": { + "description": "The deprecated field name.", + "example": "tenant_id", "type": "string" }, - "is_alpha": { - "description": "True when the connector is in alpha.", - "example": true, - "type": "boolean" + "deprecated_since": { + "description": "API version that deprecated the conflicting selector.", + "example": "2.0.1", + "type": "string" }, - "is_beta": { - "description": "True when the connector is in beta.", - "example": true, - "type": "boolean" + "error_code": { + "description": "Machine-readable error classification code.", + "example": "VALIDATION_ERROR", + "type": "string" }, - "moveit_support": { - "description": "Which sync engine serves the provider. Informational: you connect every provider the same way, and `credential_schema` already reflects it.", - "example": true, - "type": "boolean" + "message": { + "description": "Human-readable description of the error.", + "example": "Request validation failed", + "type": "string" }, - "provider": { - "description": "External provider being synced (e.g. `slack`, `github`, `linear`, `notion`, `gmail`).", - "example": "slack", + "preferred_field": { + "description": "The canonical replacement for the deprecated field.", + "example": "database", "type": "string" }, - "rank": { - "description": "Catalog display order; lower ranks appear first. `null` when unranked.", - "type": [ - "integer", - "null" - ] + "retry_after_seconds": { + "description": "Seconds to wait before retrying deletion of context that is still indexing.", + "example": 1, + "type": "integer" }, - "supported": { - "description": "Whether the provider can be connected. Only supported providers are listed, so this is always `true`.", + "retryable": { + "description": "Whether retrying this failed query can succeed. Present for search workflow failures.", "example": true, "type": "boolean" }, - "webhook_support": { - "description": "True when the provider's data arrives by inbound webhook instead of scheduled polling. `credential_schema` already describes what to send.", - "example": true, - "type": "boolean" + "success": { + "deprecated": true, + "description": "Deprecated: always `false`. Read the HTTP status, then `error.code` and `error.message`.", + "example": false, + "type": "boolean", + "x-deprecated": "true" } }, - "title": "HandlerCatalogConnector", + "title": "HandlerErrorDetail", "type": "object" }, - "handler.configureReq": { + "handler.ErrorEnvelope-sources_MemoryDeleteResponse": { "properties": { - "full_visibility_roles": { - "description": "HubSpot only. HubSpot roles whose members can see every record; requires the `all` resource. Omit to keep the setting, send `[]` to clear it. Unknown roles fail the request.", - "items": { - "type": "string" - }, - "type": "array", - "uniqueItems": false - }, - "lookback_days": { - "description": "Days of history the first sync fetches. Default `30`. Above `30`, some providers fetch older history in background chunks and the response reports `backfill: true`.", - "example": 30, - "type": "integer" + "data": { + "$ref": "#/components/schemas/sources.MemoryDeleteResponse", + "example": { + "deleted_count": 1, + "message": "Success", + "results": [ + { + "deleted": true, + "error": "", + "id": "HydraDoc1234" + } + ], + "success": true, + "user_memory_deleted": 1 + } }, - "resources": { - "description": "Resources to activate for this connector, each one entry from the Discover endpoint.", - "example": [ - { - "additional_metadata": { - "author": "ada", - "doc_version": 3 - }, - "collection": "team_docs", - "database": "acme_corp", - "metadata": { - "department": "finance", - "priority": 7 - }, - "name": "general", - "resource_id": "C0123456789", - "resource_type": "channel" - } - ], - "items": { - "$ref": "#/components/schemas/handler.resourceMapping" - }, - "type": "array", - "uniqueItems": false + "detail": { + "$ref": "#/components/schemas/handler.ErrorDetail", + "example": { + "deprecated": true, + "deprecated_field": "tenant_id", + "deprecated_since": "2.0.1", + "error_code": "VALIDATION_ERROR", + "message": "Request validation failed", + "preferred_field": "database", + "retry_after_seconds": 1, + "retryable": true + } }, - "table_configs": { - "description": "Per-table replication settings for table-syncing connectors (currently BigQuery), applied from the first sync. Other connectors return `400`.", - "items": { + "error": { + "$ref": "#/components/schemas/handler.apiError", + "description": "Error message, empty string on success.", + "example": { + "code": "DATABASE_NOT_FOUND", + "message": "Database not found" + } + }, + "meta": { + "$ref": "#/components/schemas/handler.ErrorMeta", + "example": { + "latency_ms": 12.3, + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d" + } + }, + "success": { + "description": "Whether the request succeeded.", + "example": false, + "type": "boolean" + } + }, + "title": "HandlerErrorEnvelopeSourcesMemoryDeleteResponse", + "type": "object" + }, + "handler.ErrorMeta": { + "properties": { + "api_version": { + "description": "Version of the API that served the request, for example `2.0.1`.", + "type": "string" + }, + "latency_ms": { + "description": "Server-side processing time in milliseconds.", + "example": 12.3, + "type": "number" + }, + "request_id": { + "description": "Unique identifier for this request, useful for support and tracing.", + "example": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "type": "string" + } + }, + "title": "HandlerErrorMeta", + "type": "object" + }, + "handler.ErrorResponse": { + "properties": { + "data": { + "description": "Always `null` on this error response.", + "type": "null" + }, + "detail": { + "$ref": "#/components/schemas/handler.ErrorDetail", + "description": "Structured error detail with code, message, and deprecation hints.", + "example": { + "deprecated": true, + "deprecated_field": "tenant_id", + "deprecated_since": "2.0.1", + "error_code": "VALIDATION_ERROR", + "message": "Request validation failed", + "preferred_field": "database", + "retry_after_seconds": 1, + "retryable": true + } + }, + "error": { + "$ref": "#/components/schemas/handler.apiError", + "description": "Error message, empty string on success.", + "example": { + "code": "DATABASE_NOT_FOUND", + "message": "Database not found" + } + }, + "meta": { + "$ref": "#/components/schemas/handler.ErrorMeta", + "example": { + "latency_ms": 12.3, + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d" + } + }, + "success": { + "description": "Whether the request succeeded.", + "example": false, + "type": "boolean" + } + }, + "title": "HandlerErrorResponse", + "type": "object" + }, + "handler.ResponseWarning": { + "properties": { + "code": { + "description": "Stable code, including `inference_enabled_by_default` for omitted infer and `enrichment_enabled_by_default` for omitted enrich on accepted contexts.", + "example": "acl_ignored_by_connector_enforcement", + "type": "string" + }, + "collections": { + "description": "The collections the warning is about, when applicable.", + "example": [ + "team_docs", + "engineering" + ], + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": false + }, + "message": { + "description": "Human-readable notice with the accepted affected-context count and opt-out for implicit ingest defaults.", + "example": "This connector enforces ACL, so the request's acl was ignored.", + "type": "string" + } + }, + "title": "HandlerResponseWarning", + "type": "object" + }, + "handler.apiError": { + "properties": { + "code": { + "description": "Machine-readable error code (e.g. `DATABASE_NOT_FOUND`).", + "example": "DATABASE_NOT_FOUND", + "type": "string" + }, + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Extra facts about the error, as string pairs. Omitted when there are none.", + "type": "object" + }, + "message": { + "description": "Human-readable description of the error.", + "example": "Database not found", + "type": "string" + }, + "param": { + "description": "The request field that caused the error. Omitted when no single field is at fault.", + "type": "string" + } + }, + "title": "HandlerApiError", + "type": "object" + }, + "handler.catalogConnector": { + "properties": { + "acl_description": { + "description": "One-line summary of which provider permissions are captured as document access rules.", + "type": "string" + }, + "acl_supported": { + "description": "True when the provider captures ACLs and supports per-connector enforcement.", + "example": true, + "type": "boolean" + }, + "category": { + "description": "Display grouping for the provider, such as `Communication`.", + "type": "string" + }, + "is_alpha": { + "description": "True when the connector is in alpha.", + "example": true, + "type": "boolean" + }, + "is_beta": { + "description": "True when the connector is in beta.", + "example": true, + "type": "boolean" + }, + "moveit_support": { + "description": "Which sync engine serves the provider. Informational: you connect every provider the same way, and `credential_schema` already reflects it.", + "example": true, + "type": "boolean" + }, + "provider": { + "description": "External provider being synced (e.g. `slack`, `github`, `linear`, `notion`, `gmail`).", + "example": "slack", + "type": "string" + }, + "rank": { + "description": "Catalog display order; lower ranks appear first. `null` when unranked.", + "type": [ + "integer", + "null" + ] + }, + "supported": { + "description": "Whether the provider can be connected. Only supported providers are listed, so this is always `true`.", + "example": true, + "type": "boolean" + }, + "webhook_support": { + "description": "True when the provider's data arrives by inbound webhook instead of scheduled polling. `credential_schema` already describes what to send.", + "example": true, + "type": "boolean" + } + }, + "title": "HandlerCatalogConnector", + "type": "object" + }, + "handler.configureReq": { + "properties": { + "full_visibility_roles": { + "description": "HubSpot only. HubSpot roles whose members can see every record; requires the `all` resource. Omit to keep the setting, send `[]` to clear it. Unknown roles fail the request.", + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": false + }, + "lookback_days": { + "description": "Days of history the first sync fetches. Default `30`. Above `30`, some providers fetch older history in background chunks and the response reports `backfill: true`.", + "example": 30, + "type": "integer" + }, + "resources": { + "description": "Resources to activate for this connector, each one entry from the Discover endpoint.", + "example": [ + { + "additional_metadata": { + "author": "ada", + "doc_version": 3 + }, + "collection": "team_docs", + "database": "acme_corp", + "metadata": { + "department": "finance", + "priority": 7 + }, + "name": "general", + "resource_id": "C0123456789", + "resource_type": "channel" + } + ], + "items": { + "$ref": "#/components/schemas/handler.resourceMapping" + }, + "type": "array", + "uniqueItems": false + }, + "table_configs": { + "description": "Per-table replication settings for table-syncing connectors (currently BigQuery), applied from the first sync. Other connectors return `400`.", + "items": { "$ref": "#/components/schemas/handler.tableConfigEntry" }, "type": "array", @@ -4146,7 +4695,7 @@ "type": "string" }, "page_acl_warning": { - "description": "Set when page-level restrictions in this resource (for example Confluence pages) could not be resolved, so those pages are readable by everyone. Clears after a clean full sync.", + "description": "Set when pages or files in this resource have permissions that could not be read: they are readable by everyone, or hidden from everyone on a connector that enforces ACLs in fail-closed mode.", "type": "string" }, "page_acl_warning_at": { @@ -4442,6 +4991,11 @@ "type": "array", "uniqueItems": false }, + "acl_inherit": { + "description": "Set to `true` to remove the context's own ACL and use its connector resource permissions again. Rejected without connector resource attribution. Do not send `acl` too.", + "example": true, + "type": "boolean" + }, "additional_metadata": { "additionalProperties": {}, "description": "Free-form values merged into the context's `additional_metadata`. At most 1 KiB as compact JSON.", @@ -4885,6 +5439,9 @@ }, "type": "object" }, + "calendar_binding": { + "$ref": "#/components/schemas/github_com_hydradb_hydradb-application_internal_connectors_providers_gmail.CalendarBinding" + }, "collection_override": { "description": "Routes objects synced from this resource into a specific collection. Empty means the connector's collection.", "type": "string" @@ -5161,6 +5718,9 @@ }, "type": "object" }, + "calendar_binding": { + "$ref": "#/components/schemas/github_com_hydradb_hydradb-application_internal_connectors_providers_gmail.CalendarBinding" + }, "collection": { "description": "Routes objects synced from this resource into a specific collection. Overrides the connector-level `collection`; empty means the connector's collection.", "example": "team_docs", @@ -5340,7 +5900,7 @@ "x-deprecated": "true" }, "warnings": { - "description": "Notices about parts of the request that were skipped while it still succeeded, for example collections being deleted. Absent when nothing was skipped.", + "description": "Non-fatal notices, including ignored ACLs, skipped collections, and implicit ingest inference or enrichment defaults. Absent when no notice applies. Existing notices and request IDs are preserved.", "example": [ { "code": "acl_ignored_by_connector_enforcement", @@ -5752,7 +6312,7 @@ "$ref": "#/components/schemas/list.SourceFieldFilters" } ], - "description": "Match on built-in fields: `title` (case-insensitive prefix), `type`, `description`, `url`, `timestamp` and `app_*` fields. Pair `app_external_id` or `app_parent_id` with `app_provider`.", + "description": "Match on built-in fields: `title` (normalized prefix), `type`, `description`, `url`, `timestamp` and `app_*` fields. Pair `app_external_id` or `app_parent_id` with `app_provider`.", "example": { "app_external_id": "C0123456789", "app_kind": "slack", @@ -5802,7 +6362,7 @@ "type": "string" }, "title": { - "description": "Case-insensitive title prefix.", + "description": "Title prefix after normalization: Unicode NFKC, invisible and decorative characters removed, lowercase, spaces collapsed and trimmed, known final file extensions removed.", "example": "Project Phoenix Overview", "type": "string" }, @@ -6727,8 +7287,15 @@ "uniqueItems": false }, "additional_context": { - "description": "Optional context string prepended to the query to improve retrieval relevance.", - "example": "The user is a senior engineer onboarding to the platform.", + "deprecated": true, + "description": "Deprecated: use `additional_graph_context` for the retrieval hint.", + "example": "The user is on the billing page.", + "type": "string", + "x-deprecated": "true" + }, + "additional_graph_context": { + "description": "Short factual hint that guides retrieval, for example `the user is on the billing page`. It is not a filter.", + "example": "The user is on the billing page.", "type": "string" }, "alpha": { @@ -6798,6 +7365,13 @@ ], "x-preferred": true }, + "context": { + "deprecated": true, + "description": "Deprecated: use `additional_graph_context`. Used only when both other hint names are absent.", + "example": "Ada joined Acme Corp in 2024 as a staff engineer.", + "type": "string", + "x-deprecated": "true" + }, "database": { "description": "The database to query. Formerly `tenant_id`, which is still accepted.", "example": "acme_corp", @@ -6869,14 +7443,23 @@ "description": "Retrieval method to use for the query.", "example": "hybrid" }, - "query_forceful_relations": { + "query_explicit_relations": { "default": true, - "description": "In thinking mode, follow relations declared at ingestion and return their chunks in `additional_context`.", + "description": "Follow the deterministic source links declared at ingestion and return their linked contexts. Defaults to `true`; `false` skips them.", "example": true, "type": "boolean" }, + "query_forceful_relations": { + "default": true, + "deprecated": true, + "description": "Deprecated: use `query_explicit_relations`. The canonical switch takes precedence when both are sent.", + "example": true, + "type": "boolean", + "x-deprecated": "true" + }, "recency_bias": { - "description": "Recency boost for ranking, from `0.0` to `1.0`. Default `0.4`; `0` disables it. It never buries a clearly more relevant result.", + "default": 0.6, + "description": "Recency boost for ranking, from `0.0` to `1.0`. Default `0.6`; `0` disables it. It never buries a clearly more relevant result.", "example": 0.2, "type": "number" }, @@ -6957,7 +7540,7 @@ "x-deprecated": "true" }, "titles": { - "description": "Exact document titles to search within, matched case-insensitively and ORed. Intersected with `ids` when both are sent.", + "description": "Exact document titles to search within, ORed. Titles are normalized like `source_fields.title`, then matched exactly. Intersected with `ids` when both are sent.", "items": { "type": "string" }, @@ -6970,8 +7553,8 @@ "$ref": "#/components/schemas/search.SourceType" } ], - "default": "knowledge", - "description": "Context to search, `knowledge`, `memory` or `all`." + "default": "all", + "description": "Context to search, `knowledge`, `memory` or `all`. Omit it to search everything." } }, "title": "SearchQueryRequest", @@ -7126,6 +7709,7 @@ "type": "object" }, "search.TabularColumn": { + "description": "One result column: its name, SQL type and the JSON kind of its values in `records`.", "properties": { "kind": { "description": "JSON kind of the column's values in `records`: `integer`, `number`, `decimal` (a string, to keep precision), `boolean`, `date`, `time`, `timestamp` or `string`.", @@ -7157,6 +7741,7 @@ "type": "object" }, "search.TabularConstant": { + "description": "One literal the SQL took from the question or from a passage, with the chunk it came from.", "properties": { "chunk_id": { "description": "Chunk the value was taken from; absent when the question stated it.", @@ -7318,6 +7903,7 @@ "type": "object" }, "search.TabularError": { + "description": "Why the table query failed, with a stable code; the text answer stands.", "properties": { "code": { "description": "Stable code identifying why the table query failed.", @@ -7630,7 +8216,16 @@ "additionalProperties": { "$ref": "#/components/schemas/search.V2Chunk" }, - "description": "Map of chunk IDs to related content declared at ingestion.", + "deprecated": true, + "description": "Deprecated: use `additional_graph_context`. The same map of chunk IDs to linked contexts.", + "type": "object", + "x-deprecated": "true" + }, + "additional_graph_context": { + "additionalProperties": { + "$ref": "#/components/schemas/search.V2Chunk" + }, + "description": "Map of chunk IDs to linked contexts declared at ingestion. Separate from the request's factual hint of the same name.", "type": "object" }, "alias_expansions": { @@ -8741,176 +9336,888 @@ "example": true, "type": "boolean" }, - "message": { - "description": "Human-readable result message.", - "example": "Success", - "type": "string" - } + "message": { + "description": "Human-readable result message.", + "example": "Success", + "type": "string" + } + }, + "title": "WebhooksWebhookDeleteResponse", + "type": "object" + }, + "webhooks.WebhookGetResponse": { + "properties": { + "event_types": { + "description": "Event types to subscribe to (e.g. `[\"indexing.status_changed\"]`).", + "example": [ + "indexing.status_changed" + ], + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": false + }, + "registered": { + "description": "Whether a webhook is registered for this API key.", + "example": true, + "type": "boolean" + }, + "signing_secret_configured": { + "description": "Whether a signing secret has been configured for payload verification.", + "example": true, + "type": "boolean" + }, + "url": { + "description": "Registered webhook URL, or null when none is registered.", + "example": "https://example.com/webhooks/hydradb", + "type": [ + "string", + "null" + ] + } + }, + "title": "WebhooksWebhookGetResponse", + "type": "object" + }, + "webhooks.WebhookRegisterRequest": { + "properties": { + "event_types": { + "description": "Event types to subscribe to (e.g. `[\"indexing.status_changed\"]`).", + "example": [ + "indexing.status_changed" + ], + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": false + }, + "generate_signing_secret": { + "description": "Generate a signing secret in this request. It is returned once and cannot be retrieved later. Cannot be combined with `signing_secret`.", + "example": true, + "type": "boolean" + }, + "signing_secret": { + "description": "Secret, at least 16 characters, that signs deliveries: `X-HydraDB-Signature: sha256=\u003chex\u003e` is the HMAC-SHA256 of the raw body. Omit it to keep any existing secret.", + "example": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY", + "type": "string" + }, + "url": { + "description": "Endpoint URL to deliver webhook events to.", + "example": "https://example.com/webhooks/hydradb", + "type": "string" + } + }, + "title": "WebhooksWebhookRegisterRequest", + "type": "object" + }, + "webhooks.WebhookRegisterResponse": { + "properties": { + "event_types": { + "description": "Event types to subscribe to (e.g. `[\"indexing.status_changed\"]`).", + "example": [ + "indexing.status_changed" + ], + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": false + }, + "message": { + "description": "Human-readable result message.", + "example": "Success", + "type": "string" + }, + "registered": { + "description": "Whether a webhook is registered for this API key.", + "example": true, + "type": "boolean" + }, + "signing_secret": { + "description": "Secret that signs deliveries: `X-HydraDB-Signature: sha256=\u003chex\u003e` is the HMAC-SHA256 of the raw request body keyed by it.", + "example": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY", + "type": "string" + }, + "signing_secret_configured": { + "description": "Whether a signing secret has been configured for payload verification.", + "example": true, + "type": "boolean" + }, + "url": { + "description": "Registered endpoint URL that receives webhook event deliveries.", + "example": "https://example.com/webhooks/hydradb", + "type": "string" + } + }, + "title": "WebhooksWebhookRegisterResponse", + "type": "object" + }, + "webhooks.WebhookTestResponse": { + "properties": { + "delivered": { + "description": "Whether the test delivery was accepted by the endpoint.", + "example": true, + "type": "boolean" + }, + "message": { + "description": "Human-readable result message.", + "example": "Success", + "type": "string" + }, + "status_code": { + "description": "HTTP status from the test request, or null when no response was received.", + "example": 200, + "type": [ + "integer", + "null" + ] + } + }, + "title": "WebhooksWebhookTestResponse", + "type": "object" + } + }, + "securitySchemes": { + "BearerAuth": { + "bearerFormat": "API key", + "description": "Send your API key as Authorization: Bearer \u003cyour_api_key\u003e.", + "scheme": "bearer", + "type": "http" + } + } + }, + "externalDocs": { + "description": "", + "url": "" + }, + "info": { + "contact": { + "email": "support@hydradb.com", + "name": "HydraDB Support" + }, + "description": "The HydraDB API: ingest context, query it, and manage databases, connectors and webhooks.", + "license": { + "name": "Proprietary" + }, + "title": "HydraDB Application API", + "version": "0.1.0" + }, + "openapi": "3.1.0", + "paths": { + "/byog": { + "post": { + "description": "Run read-only Cypher against a managed graph. Every node pattern is scoped to the requested database and collection. Use POST /byog/query for a graph you manage yourself.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.BYOGRequest" + } + } + }, + "description": "Read-only Cypher request", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.Envelope-handler_BYOGQueryRows" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "413": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + } + }, + "security": [ + { + "BearerAuth": [] + } + ], + "summary": "Read a managed graph with Cypher", + "tags": [ + "byog" + ], + "x-fern-sdk-group-name": "byog", + "x-fern-sdk-method-name": "queryManaged" + } + }, + "/byog/collections": { + "delete": { + "description": "Delete one graph collection and all its nodes and relationships. Succeeds when the collection is already absent; the database must exist.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.BYOGCRUDCollectionRequest" + } + } + }, + "description": "Graph collection to delete", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.Envelope-handler_BYOGCollectionDeleted" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "413": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + } + }, + "security": [ + { + "BearerAuth": [] + } + ], + "summary": "Delete a graph collection", + "tags": [ + "byog" + ], + "x-fern-sdk-group-name": "byog", + "x-fern-sdk-method-name": "deleteCollection" + }, + "get": { + "description": "List the graph collections created by writes in a database. Returns an empty list when none exist, and 404 when the database does not exist.", + "parameters": [ + { + "description": "Database whose graph collections to list", + "example": "acme_corp", + "in": "query", + "name": "database", + "required": true, + "schema": { + "example": "acme_corp", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.Envelope-handler_BYOGCollections" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + } + }, + "security": [ + { + "BearerAuth": [] + } + ], + "summary": "List graph collections", + "tags": [ + "byog" + ], + "x-fern-sdk-group-name": "byog", + "x-fern-sdk-method-name": "listCollections" + } + }, + "/byog/databases": { + "delete": { + "description": "Delete the database's graph collections. A database created through BYOG is deleted too; a managed database keeps its managed content. Retry a failed deletion to finish cleanup.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.BYOGCRUDDatabaseRequest" + } + } + }, + "description": "Database whose graph data to delete", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.Envelope-handler_BYOGDatabaseDeleted" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "413": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + } + }, + "security": [ + { + "BearerAuth": [] + } + ], + "summary": "Delete a graph database", + "tags": [ + "byog" + ], + "x-fern-sdk-group-name": "byog", + "x-fern-sdk-method-name": "deleteDatabase" + }, + "post": { + "description": "Create a database for a graph you manage yourself. The response reports whether it is ready or still provisioning. An existing name returns 409.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.BYOGCRUDDatabaseRequest" + } + } + }, + "description": "Database to create", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.Envelope-handler_BYOGDatabaseCreated" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "413": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" + } + }, + "security": [ + { + "BearerAuth": [] + } + ], + "summary": "Create a graph database", + "tags": [ + "byog" + ], + "x-fern-sdk-group-name": "byog", + "x-fern-sdk-method-name": "createDatabase" + } + }, + "/byog/query": { + "post": { + "description": "Run Cypher reads, writes or supported schema statements against your graph. The database must already exist; a collection is created on its first write.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.BYOGCRUDQueryRequest" + } + } + }, + "description": "Cypher request", + "required": true }, - "title": "WebhooksWebhookDeleteResponse", - "type": "object" - }, - "webhooks.WebhookGetResponse": { - "properties": { - "event_types": { - "description": "Event types to subscribe to (e.g. `[\"indexing.status_changed\"]`).", - "example": [ - "indexing.status_changed" - ], - "items": { - "type": "string" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.Envelope-handler_BYOGQueryRows" + } + } }, - "type": "array", - "uniqueItems": false - }, - "registered": { - "description": "Whether a webhook is registered for this API key.", - "example": true, - "type": "boolean" - }, - "signing_secret_configured": { - "description": "Whether a signing secret has been configured for payload verification.", - "example": true, - "type": "boolean" + "description": "OK" }, - "url": { - "description": "Registered webhook URL, or null when none is registered.", - "example": "https://example.com/webhooks/hydradb", - "type": [ - "string", - "null" - ] - } - }, - "title": "WebhooksWebhookGetResponse", - "type": "object" - }, - "webhooks.WebhookRegisterRequest": { - "properties": { - "event_types": { - "description": "Event types to subscribe to (e.g. `[\"indexing.status_changed\"]`).", - "example": [ - "indexing.status_changed" - ], - "items": { - "type": "string" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } }, - "type": "array", - "uniqueItems": false + "description": "Bad Request" }, - "generate_signing_secret": { - "description": "Generate a signing secret in this request. It is returned once and cannot be retrieved later. Cannot be combined with `signing_secret`.", - "example": true, - "type": "boolean" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" }, - "signing_secret": { - "description": "Secret, at least 16 characters, that signs deliveries: `X-HydraDB-Signature: sha256=\u003chex\u003e` is the HMAC-SHA256 of the raw body. Omit it to keep any existing secret.", - "example": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY", - "type": "string" + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" }, - "url": { - "description": "Endpoint URL to deliver webhook events to.", - "example": "https://example.com/webhooks/hydradb", - "type": "string" - } - }, - "title": "WebhooksWebhookRegisterRequest", - "type": "object" - }, - "webhooks.WebhookRegisterResponse": { - "properties": { - "event_types": { - "description": "Event types to subscribe to (e.g. `[\"indexing.status_changed\"]`).", - "example": [ - "indexing.status_changed" - ], - "items": { - "type": "string" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } }, - "type": "array", - "uniqueItems": false + "description": "Bad Request" }, - "message": { - "description": "Human-readable result message.", - "example": "Success", - "type": "string" + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" }, - "registered": { - "description": "Whether a webhook is registered for this API key.", - "example": true, - "type": "boolean" + "413": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" }, - "signing_secret": { - "description": "Secret that signs deliveries: `X-HydraDB-Signature: sha256=\u003chex\u003e` is the HMAC-SHA256 of the raw request body keyed by it.", - "example": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY", - "type": "string" + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" }, - "signing_secret_configured": { - "description": "Whether a signing secret has been configured for payload verification.", - "example": true, - "type": "boolean" + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" }, - "url": { - "description": "Registered endpoint URL that receives webhook event deliveries.", - "example": "https://example.com/webhooks/hydradb", - "type": "string" + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/handler.ErrorResponse" + } + } + }, + "description": "Bad Request" } }, - "title": "WebhooksWebhookRegisterResponse", - "type": "object" - }, - "webhooks.WebhookTestResponse": { - "properties": { - "delivered": { - "description": "Whether the test delivery was accepted by the endpoint.", - "example": true, - "type": "boolean" - }, - "message": { - "description": "Human-readable result message.", - "example": "Success", - "type": "string" - }, - "status_code": { - "description": "HTTP status from the test request, or null when no response was received.", - "example": 200, - "type": [ - "integer", - "null" - ] + "security": [ + { + "BearerAuth": [] } - }, - "title": "WebhooksWebhookTestResponse", - "type": "object" - } - }, - "securitySchemes": { - "BearerAuth": { - "bearerFormat": "API key", - "description": "Send your API key as Authorization: Bearer \u003cyour_api_key\u003e.", - "scheme": "bearer", - "type": "http" + ], + "summary": "Query a graph you manage", + "tags": [ + "byog" + ], + "x-fern-sdk-group-name": "byog", + "x-fern-sdk-method-name": "query" } - } - }, - "externalDocs": { - "description": "", - "url": "" - }, - "info": { - "contact": { - "email": "support@hydradb.com", - "name": "HydraDB Support" - }, - "description": "The HydraDB API: ingest context, query it, and manage databases, connectors and webhooks.", - "license": { - "name": "Proprietary" }, - "title": "HydraDB Application API", - "version": "0.1.0" - }, - "openapi": "3.1.0", - "paths": { "/connectors": { "get": { "description": "List all connectors for the authenticated org, optionally filtered by provider.", @@ -10265,7 +11572,7 @@ "type": "string" }, "memories": { - "description": "Memories to ingest, encoded as a JSON array. Use `type=memory`.", + "description": "Memories as JSON for `type=memory`. Omitted infer may emit `inference_enabled_by_default`. False skips additional memory enrichment, not entity/graph processing.", "title": "memories", "type": "string" }, @@ -10313,12 +11620,94 @@ "202": { "content": { "application/json": { + "examples": { + "enrichment_enabled_by_default": { + "summary": "Accepted context with omitted enrich", + "value": { + "data": { + "failed_count": 0, + "generation_started_at_ms": 1794807761774, + "message": "Context queued for ingestion successfully. Ingestion is asynchronous: this 202 means the sources were accepted and queued, not indexed. Poll GET /context/status?database=\u003cdatabase\u003e\u0026id=\u003csource_id\u003e until each source's indexing_status reaches a terminal state (completed or errored) before querying. See https://docs.hydradb.com/api-reference/v2/endpoint/source-status for usage details. ", + "results": [ + { + "error": null, + "error_code": null, + "id": "example-context", + "infer": true, + "status": "queued", + "title": null + } + ], + "success": true, + "success_count": 1 + }, + "error": null, + "meta": { + "api_version": "2.0.1", + "collection": "docs", + "database": "crm", + "latency_ms": null, + "request_id": "ingest-warning-request", + "source_type": "memory", + "sub_tenant_id": "docs", + "tenant_id": "crm", + "warnings": [ + { + "code": "enrichment_enabled_by_default", + "message": "Enrichment is enabled by default for 1 accepted item because enrich was omitted. Set enrich to false on an item or on the request to disable enrichment." + } + ] + }, + "success": true + } + }, + "inference_enabled_by_default": { + "summary": "Accepted memory with omitted infer", + "value": { + "data": { + "failed_count": 0, + "generation_started_at_ms": 1794807761771, + "message": "Memories queued for ingestion successfully. Ingestion is asynchronous: this 202 means the sources were accepted and queued, not indexed. Poll GET /context/status?database=\u003cdatabase\u003e\u0026id=\u003csource_id\u003e until each source's indexing_status reaches a terminal state (completed or errored) before querying. See https://docs.hydradb.com/api-reference/v2/endpoint/source-status for usage details. ", + "results": [ + { + "error": null, + "error_code": null, + "id": "example-memory", + "infer": true, + "status": "queued", + "title": null + } + ], + "success": true, + "success_count": 1 + }, + "error": null, + "meta": { + "api_version": "2.0.1", + "collection": "docs", + "database": "crm", + "latency_ms": null, + "request_id": "ingest-warning-request", + "source_type": "memory", + "sub_tenant_id": "docs", + "tenant_id": "crm", + "warnings": [ + { + "code": "inference_enabled_by_default", + "message": "Inference is enabled by default for 1 accepted item because infer was omitted. Set infer to false on an item to disable inference for that item." + } + ] + }, + "success": true + } + } + }, "schema": { "$ref": "#/components/schemas/handler.Envelope-ingestion_V2IngestResponse" } } }, - "description": "Accepted" + "description": "Accepted and queued, not indexed. meta.warnings contains one inference_enabled_by_default notice for accepted legacy memory items whose infer was omitted, or one enrichment_enabled_by_default notice for accepted contexts whose item and request enrich were omitted. Notices count only accepted affected items. Explicit true or false, including inherited request-level enrich, produces no default notice; an explicit item value wins. Existing warnings, request IDs and result counts are unchanged. Poll GET /context/status for processing status." }, "400": { "content": { diff --git a/api-reference/v2/sdks.mdx b/api-reference/v2/sdks.mdx index 9949b865..c1b65963 100644 --- a/api-reference/v2/sdks.mdx +++ b/api-reference/v2/sdks.mdx @@ -18,6 +18,8 @@ npm install @hydradb/sdk@^2.1.7 ``` +BYOG SDK examples require Python `hydradb-sdk` 2.1.8 and TypeScript `@hydradb/sdk` 2.1.9 or later. Until those versions are available in your package registry, use the cURL examples on the BYOG endpoint pages. + ## Client setup @@ -57,14 +59,14 @@ The REST API and the Python SDK use snake_case. The TypeScript SDK uses camelCas In TypeScript: - **Typed fields are camelCase only.** Use `client.context.list({ database: "...", pageSize: 50 })`. The SDK sends `page_size` to the API and drops unrecognized typed fields, including a caller-supplied `page_size`. -- **JSON strings and free-form maps are sent as written.** Inside JSON strings (`documentMetadata`, `memories`, `appKnowledge`) and free-form maps (`metadataFilters`, and in Python a connector resource update's `request`), use REST field names such as `additional_metadata` or `custom_instructions`, and preserve your own metadata keys. +- **JSON strings and free-form maps are sent as written.** Inside JSON strings (`documentMetadata`, `memories`) and free-form maps (`metadataFilters`, and in Python a connector resource update's `request`), use REST field names such as `additional_metadata` or `custom_instructions`, and preserve your own metadata keys. - **Response fields are camelCase and optional in the types.** Read them as `status.data?.infra?.readyForIngestion`. `database` and `collection` are the current field names. The former names, `tenant_id` and `sub_tenant_id`, are still accepted as deprecated aliases. See [Databases and Collections](/essentials/v2/databases-and-collections#7-migrating-from-the-legacy-tenant-and-sub-tenant-fields). ## Method reference -Methods are grouped under one namespace per API group: `client.context`, `client.databases`, `client.connectors`, `client.webhooks`, and `client.feedback`. `client.query()` and `client.list_providers()` sit on the client itself. The tables use the Python method names. TypeScript uses camelCase for multi-word ones (`list_resources()` is `listResources()`). +Methods are grouped under one namespace per API group: `client.context`, `client.databases`, `client.connectors`, `client.webhooks`, `client.feedback`, and `client.byog`. `client.query()` and `client.list_providers()` sit on the client itself. The tables use the Python method names. TypeScript uses camelCase for multi-word ones (`list_resources()` is `listResources()`). ### Context @@ -146,6 +148,17 @@ The legacy `/tenants/*` paths remain available as deprecated aliases of `/databa | `client.webhooks.set_signing_secret()` | `POST /webhooks/indexing/signing-secret` | | `client.webhooks.clear_signing_secret()` | `DELETE /webhooks/indexing/signing-secret` | +### Bring Your Own Graph + +| Python method | Endpoint | +| --- | --- | +| `client.byog.query_managed(...)` | [POST /byog](/api-reference/v2/endpoint/byog-query-managed) | +| `client.byog.query(...)` | [POST /byog/query](/api-reference/v2/endpoint/byog-query) | +| `client.byog.create_database(...)` | [POST /byog/databases](/api-reference/v2/endpoint/byog-create-database) | +| `client.byog.delete_database(...)` | [DELETE /byog/databases](/api-reference/v2/endpoint/byog-delete-database) | +| `client.byog.list_collections(...)` | [GET /byog/collections](/api-reference/v2/endpoint/byog-list-collections) | +| `client.byog.delete_collection(...)` | [DELETE /byog/collections](/api-reference/v2/endpoint/byog-delete-collection) | + ## Common calls These examples show the SDK call shape for each step of an integration, in both languages. The [Quickstart](/get-started/v2/quickstart) explains the flow end to end. @@ -208,7 +221,7 @@ while (true) { ### Ingest knowledge -Upload files, ingest app sources, or do both in one call. `document_metadata` is a JSON string with one entry per file: +Upload files. `document_metadata` is a JSON string with one entry per file: ```python Python SDK @@ -262,7 +275,6 @@ const result = await client.context.ingest({ ``` -For app sources (Slack, Notion, Gmail, webpages), pass `app_knowledge` instead of `documents`, or pass both in one request. See [Ingest Context](/api-reference/v2/endpoint/ingest-context). ### Ingest memories diff --git a/connector-logos.css b/connector-logos.css new file mode 100644 index 00000000..5092bcbe --- /dev/null +++ b/connector-logos.css @@ -0,0 +1,106 @@ +/* Generated by scripts/generate_connector_pages.py. Each connector page shows its logo before the title. */ +html[data-current-path*="/essentials/v2/connectors/"] #page-title::before { + display: inline-block; + width: 1.1em; + height: 1.1em; + margin-right: 0.35em; + vertical-align: -0.19em; + background-position: center; + background-repeat: no-repeat; + background-size: 70%; + background-color: rgba(0, 0, 0, 0.04); + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.09); + border-radius: 0.22em; +} +html.dark[data-current-path*="/essentials/v2/connectors/"] #page-title::before { + background-color: rgba(255, 255, 255, 0.05); + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09); +} +html[data-current-path$="/essentials/v2/connectors/airtable"] #page-title::before { content: ""; background-image: url("/images/connectors/airtable.svg"); } +html[data-current-path$="/essentials/v2/connectors/asana"] #page-title::before { content: ""; background-image: url("/images/connectors/asana.svg"); } +html[data-current-path$="/essentials/v2/connectors/attio"] #page-title::before { content: ""; background-image: url("/images/connectors/attio-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/attio"] #page-title::before { background-image: url("/images/connectors/attio-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/avoma"] #page-title::before { content: ""; background-image: url("/images/connectors/avoma.svg"); } +html[data-current-path$="/essentials/v2/connectors/bamboohr"] #page-title::before { content: ""; background-image: url("/images/connectors/bamboohr.svg"); } +html[data-current-path$="/essentials/v2/connectors/bigquery"] #page-title::before { content: ""; background-image: url("/images/connectors/bigquery.svg"); } +html[data-current-path$="/essentials/v2/connectors/bookstack"] #page-title::before { content: ""; background-image: url("/images/connectors/bookstack.svg"); } +html[data-current-path$="/essentials/v2/connectors/calendly"] #page-title::before { content: ""; background-image: url("/images/connectors/calendly.svg"); } +html[data-current-path$="/essentials/v2/connectors/clickup"] #page-title::before { content: ""; background-image: url("/images/connectors/clickup.svg"); } +html[data-current-path$="/essentials/v2/connectors/confluence"] #page-title::before { content: ""; background-image: url("/images/connectors/confluence.svg"); } +html[data-current-path$="/essentials/v2/connectors/contentful"] #page-title::before { content: ""; background-image: url("/images/connectors/contentful.svg"); } +html[data-current-path$="/essentials/v2/connectors/copper"] #page-title::before { content: ""; background-image: url("/images/connectors/copper-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/copper"] #page-title::before { background-image: url("/images/connectors/copper-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/datadog"] #page-title::before { content: ""; background-image: url("/images/connectors/datadog-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/datadog"] #page-title::before { background-image: url("/images/connectors/datadog-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/discord"] #page-title::before { content: ""; background-image: url("/images/connectors/discord.svg"); } +html[data-current-path$="/essentials/v2/connectors/dropbox"] #page-title::before { content: ""; background-image: url("/images/connectors/dropbox.svg"); } +html[data-current-path$="/essentials/v2/connectors/figma"] #page-title::before { content: ""; background-image: url("/images/connectors/figma.svg"); } +html[data-current-path$="/essentials/v2/connectors/fireflies"] #page-title::before { content: ""; background-image: url("/images/connectors/fireflies.svg"); } +html[data-current-path$="/essentials/v2/connectors/freshdesk"] #page-title::before { content: ""; background-image: url("/images/connectors/freshdesk.svg"); } +html[data-current-path$="/essentials/v2/connectors/github"] #page-title::before { content: ""; background-image: url("/images/connectors/github-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/github"] #page-title::before { background-image: url("/images/connectors/github-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/gitlab"] #page-title::before { content: ""; background-image: url("/images/connectors/gitlab.svg"); } +html[data-current-path$="/essentials/v2/connectors/gmail"] #page-title::before { content: ""; background-image: url("/images/connectors/gmail.svg"); } +html[data-current-path$="/essentials/v2/connectors/gong"] #page-title::before { content: ""; background-image: url("/images/connectors/gong-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/gong"] #page-title::before { background-image: url("/images/connectors/gong-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/googleads"] #page-title::before { content: ""; background-image: url("/images/connectors/googleads.svg"); } +html[data-current-path$="/essentials/v2/connectors/google-calendar"] #page-title::before { content: ""; background-image: url("/images/connectors/google-calendar.svg"); } +html[data-current-path$="/essentials/v2/connectors/google-drive"] #page-title::before { content: ""; background-image: url("/images/connectors/google-drive.svg"); } +html[data-current-path$="/essentials/v2/connectors/google-search-console"] #page-title::before { content: ""; background-image: url("/images/connectors/google-search-console.svg"); } +html[data-current-path$="/essentials/v2/connectors/granola"] #page-title::before { content: ""; background-image: url("/images/connectors/granola.svg"); } +html[data-current-path$="/essentials/v2/connectors/greenhouse"] #page-title::before { content: ""; background-image: url("/images/connectors/greenhouse.svg"); } +html[data-current-path$="/essentials/v2/connectors/guru"] #page-title::before { content: ""; background-image: url("/images/connectors/guru-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/guru"] #page-title::before { background-image: url("/images/connectors/guru-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/helpscout"] #page-title::before { content: ""; background-image: url("/images/connectors/helpscout.svg"); } +html[data-current-path$="/essentials/v2/connectors/hubspot"] #page-title::before { content: ""; background-image: url("/images/connectors/hubspot.svg"); } +html[data-current-path$="/essentials/v2/connectors/intercom"] #page-title::before { content: ""; background-image: url("/images/connectors/intercom.svg"); } +html[data-current-path$="/essentials/v2/connectors/jira"] #page-title::before { content: ""; background-image: url("/images/connectors/jira.svg"); } +html[data-current-path$="/essentials/v2/connectors/klaviyo"] #page-title::before { content: ""; background-image: url("/images/connectors/klaviyo-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/klaviyo"] #page-title::before { background-image: url("/images/connectors/klaviyo-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/launchdarkly"] #page-title::before { content: ""; background-image: url("/images/connectors/launchdarkly-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/launchdarkly"] #page-title::before { background-image: url("/images/connectors/launchdarkly-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/lever"] #page-title::before { content: ""; background-image: url("/images/connectors/lever-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/lever"] #page-title::before { background-image: url("/images/connectors/lever-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/linear"] #page-title::before { content: ""; background-image: url("/images/connectors/linear.svg"); } +html[data-current-path$="/essentials/v2/connectors/loom"] #page-title::before { content: ""; background-image: url("/images/connectors/loom.svg"); } +html[data-current-path$="/essentials/v2/connectors/mailchimp"] #page-title::before { content: ""; background-image: url("/images/connectors/mailchimp.svg"); } +html[data-current-path$="/essentials/v2/connectors/microsoft-teams"] #page-title::before { content: ""; background-image: url("/images/connectors/microsoft-teams.svg"); } +html[data-current-path$="/essentials/v2/connectors/mixpanel"] #page-title::before { content: ""; background-image: url("/images/connectors/mixpanel.svg"); } +html[data-current-path$="/essentials/v2/connectors/monday"] #page-title::before { content: ""; background-image: url("/images/connectors/monday.svg"); } +html[data-current-path$="/essentials/v2/connectors/notion"] #page-title::before { content: ""; background-image: url("/images/connectors/notion-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/notion"] #page-title::before { background-image: url("/images/connectors/notion-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/okta"] #page-title::before { content: ""; background-image: url("/images/connectors/okta.svg"); } +html[data-current-path$="/essentials/v2/connectors/outlook"] #page-title::before { content: ""; background-image: url("/images/connectors/outlook.svg"); } +html[data-current-path$="/essentials/v2/connectors/pagerduty"] #page-title::before { content: ""; background-image: url("/images/connectors/pagerduty.svg"); } +html[data-current-path$="/essentials/v2/connectors/pardot"] #page-title::before { content: ""; background-image: url("/images/connectors/pardot-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/pardot"] #page-title::before { background-image: url("/images/connectors/pardot-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/pipedrive"] #page-title::before { content: ""; background-image: url("/images/connectors/pipedrive-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/pipedrive"] #page-title::before { background-image: url("/images/connectors/pipedrive-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/posthog"] #page-title::before { content: ""; background-image: url("/images/connectors/posthog.svg"); } +html[data-current-path$="/essentials/v2/connectors/quickbooks"] #page-title::before { content: ""; background-image: url("/images/connectors/quickbooks.svg"); } +html[data-current-path$="/essentials/v2/connectors/recurly"] #page-title::before { content: ""; background-image: url("/images/connectors/recurly-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/recurly"] #page-title::before { background-image: url("/images/connectors/recurly-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/sendgrid"] #page-title::before { content: ""; background-image: url("/images/connectors/sendgrid.svg"); } +html[data-current-path$="/essentials/v2/connectors/sentry"] #page-title::before { content: ""; background-image: url("/images/connectors/sentry-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/sentry"] #page-title::before { background-image: url("/images/connectors/sentry-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/servicenow"] #page-title::before { content: ""; background-image: url("/images/connectors/servicenow.svg"); } +html[data-current-path$="/essentials/v2/connectors/sharepoint"] #page-title::before { content: ""; background-image: url("/images/connectors/sharepoint.svg"); } +html[data-current-path$="/essentials/v2/connectors/shortcut"] #page-title::before { content: ""; background-image: url("/images/connectors/shortcut.svg"); } +html[data-current-path$="/essentials/v2/connectors/slack"] #page-title::before { content: ""; background-image: url("/images/connectors/slack.svg"); } +html[data-current-path$="/essentials/v2/connectors/smartsheet"] #page-title::before { content: ""; background-image: url("/images/connectors/smartsheet-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/smartsheet"] #page-title::before { background-image: url("/images/connectors/smartsheet-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/stripe"] #page-title::before { content: ""; background-image: url("/images/connectors/stripe.svg"); } +html[data-current-path$="/essentials/v2/connectors/supabase"] #page-title::before { content: ""; background-image: url("/images/connectors/supabase.svg"); } +html[data-current-path$="/essentials/v2/connectors/coda"] #page-title::before { content: ""; background-image: url("/images/connectors/coda.svg"); } +html[data-current-path$="/essentials/v2/connectors/surveymonkey"] #page-title::before { content: ""; background-image: url("/images/connectors/surveymonkey.svg"); } +html[data-current-path$="/essentials/v2/connectors/twilio"] #page-title::before { content: ""; background-image: url("/images/connectors/twilio.svg"); } +html[data-current-path$="/essentials/v2/connectors/twitter"] #page-title::before { content: ""; background-image: url("/images/connectors/twitter-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/twitter"] #page-title::before { background-image: url("/images/connectors/twitter-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/typeform"] #page-title::before { content: ""; background-image: url("/images/connectors/typeform-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/typeform"] #page-title::before { background-image: url("/images/connectors/typeform-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/wrike"] #page-title::before { content: ""; background-image: url("/images/connectors/wrike.svg"); } +html[data-current-path$="/essentials/v2/connectors/xero"] #page-title::before { content: ""; background-image: url("/images/connectors/xero.svg"); } +html[data-current-path$="/essentials/v2/connectors/zendesk"] #page-title::before { content: ""; background-image: url("/images/connectors/zendesk-light.svg"); } +html.dark[data-current-path$="/essentials/v2/connectors/zendesk"] #page-title::before { background-image: url("/images/connectors/zendesk-dark.svg"); } +html[data-current-path$="/essentials/v2/connectors/zoho-crm"] #page-title::before { content: ""; background-image: url("/images/connectors/zoho-crm.svg"); } +html[data-current-path$="/essentials/v2/connectors/zoom"] #page-title::before { content: ""; background-image: url("/images/connectors/zoom.svg"); } diff --git a/cookbooks/v2/chief-of-staff.mdx b/cookbooks/v2/chief-of-staff.mdx index b91aafac..59639263 100644 --- a/cookbooks/v2/chief-of-staff.mdx +++ b/cookbooks/v2/chief-of-staff.mdx @@ -6,7 +6,7 @@ description: "An assistant that tracks decisions and commitments across meetings import Setup from "/snippets/cookbook-setup.mdx"; -A chief of staff remembers what was decided, who committed to what, and what has changed since. This cookbook builds one from two types of context: meetings and email as knowledge, and the decisions drawn from them as memories that HydraDB keeps current. +A chief of staff remembers what was decided, who committed to what, and what has changed since. This cookbook builds one from two types of context: email and chat as knowledge, and the decisions drawn from them as memories that HydraDB keeps current. | Benchmark | Result | What it shows here | | --- | --- | --- | @@ -22,8 +22,9 @@ Work records go in one collection. The executive's own decisions and commitments ```python chief_of_staff.py import json +import os -from hydra import answer, client, create_database, source_ids, wait_indexed +from hydra import answer, client, connect, create_database, source_ids, wait_indexed DATABASE = "acme_corp" RECORDS, EXECUTIVE = "work_records", "exec_dana" @@ -31,60 +32,40 @@ RECORDS, EXECUTIVE = "work_records", "exec_dana" create_database(DATABASE) ``` -## 2. Ingest meetings and email as knowledge +## 2. Connect email and chat as knowledge -Meetings and email are [app sources](/essentials/v2/context#send-app-sources). The `meeting` and `email` kinds keep participants, senders, and dates, which is what lets a query answer "what did Priya agree to on the September call". +Where the work happened is already written down in email and chat. A [connector](/essentials/v2/connectors) syncs each app into the records collection and keeps senders, participants, threads, and dates, which is what lets a query answer "what did Priya agree to in September". + +Slack carries its own permissions over. Gmail does not, so the mailbox gets an `acl` naming the executive: without it, anyone who queries the records collection could read their mail. `lookback_days` sets how much history the first sync fetches; the default is 30. Above 30, some providers fetch the older history in the background, so it can keep arriving after `connect` returns. ```python chief_of_staff.py -records = [ - { - "id": "gong_call_0912", - "title": "Q4 planning call", - "kind": "meeting", - "provider": "gong", - "external_id": "call_0912", - "timestamp": "2026-09-12T16:00:00Z", - "fields": { - "kind": "meeting", - "title": "Q4 planning call", - "body": "Dana: we launch the EU region on November 3. Priya: I will " - "have the data residency review done by October 15.", - "host": "Dana Okafor", - "participants": [{"name": "Priya Shah", "email": "priya@acme.com"}], - "started_at": "2026-09-12T16:00:00Z", - }, - }, - { - "id": "gmail_msg_1002", - "title": "EU launch date", - "kind": "email", - "provider": "gmail", - "external_id": "msg_1002", - "timestamp": "2026-10-02T09:30:00Z", - "fields": { - "kind": "email", - "subject": "EU launch date", - "body": "Legal needs two more weeks. Moving the EU launch to November 17.", - "from": "dana@acme.com", - "to": ["leadership@acme.com"], - "thread_id": "thread_eu_launch", - "created_at": "2026-10-02T09:30:00Z", - }, - }, -] - -result = client.context.ingest( - type="knowledge", - database=DATABASE, - collection=RECORDS, - app_knowledge=json.dumps(records), +EXECUTIVE_EMAIL = os.environ["EXECUTIVE_EMAIL"] + +# Each provider has its own credentials: client.list_providers(id="gmail") +# returns the shape. The second argument names the account, so a second +# mailbox or workspace gets its own connector. +connect( + "gmail", + EXECUTIVE_EMAIL, + DATABASE, + RECORDS, + credentials=json.loads(os.environ["GMAIL_CREDENTIALS"]), + acl=[EXECUTIVE_EMAIL], + lookback_days=365, +) +connect( + "slack", + os.environ["SLACK_WORKSPACE_ID"], + DATABASE, + RECORDS, + credentials={"access_token": os.environ["SLACK_TOKEN"]}, + lookback_days=365, ) -wait_indexed(DATABASE, RECORDS, source_ids(result)) ``` ## 3. Save decisions as memories -After each meeting or thread, save what was decided as a [memory](/essentials/v2/context#2-save-memories). With `infer: true`, HydraDB extracts the facts and checks them against what the collection already holds, so the October change to the launch date is reconciled with the September decision instead of sitting beside it. +After each meeting or thread, save what was decided as a [memory](/essentials/v2/context#ingesting-memory). With `infer: true`, HydraDB extracts the facts and checks them against what the collection already holds, so the October change to the launch date is reconciled with the September decision instead of sitting beside it. ```python chief_of_staff.py def remember(text): @@ -104,7 +85,7 @@ remember("2026-10-02: Moved the EU launch to November 17 because legal needs two ## 4. Ask what is current -Query both collections at once with `type: "all"`. `recency_bias` favors newer context, and `thinking` mode reranks, so the current launch date ranks above the one it replaced. +Query both collections at once with `type: "all"`, as the executive. `acl` keeps the brief to what this person may see: their own mail, and the Slack channels they belong to. `recency_bias` favors newer context, and `thinking` mode reranks, so the current launch date ranks above the one it replaced. ```python chief_of_staff.py def brief(question): @@ -115,6 +96,7 @@ def brief(question): type="all", mode="thinking", recency_bias=0.6, + acl=[EXECUTIVE_EMAIL], ) return answer(question, result, "When facts conflict, the most recent one is current. " "Name the owner and due date of each commitment.") @@ -125,15 +107,15 @@ print(brief("When is the EU launch, and what is still open before it?")) ## Run it +Set `GMAIL_CREDENTIALS`, `SLACK_TOKEN`, `SLACK_WORKSPACE_ID`, and `EXECUTIVE_EMAIL`, replace the two sample decisions and the question with your own, and run: + ```bash python chief_of_staff.py ``` -The answer should give November 17, note that the date moved from November 3, and list Priya's data residency review as the open commitment. - -## Use real data +With the sample decisions, the answer gives November 17, notes that the date moved from November 3, and lists Priya's data residency review as the open commitment. It adds whatever your email and chat say on the subject. -Connect the calendar, meeting, and email apps with [connectors](/essentials/v2/connectors) in place of step 2. Keep step 3 in your application: decide what counts as a decision, and save it when the meeting ends. +Keep step 3 in your application: decide what counts as a decision, and save it when the meeting or thread ends. ## Common mistakes @@ -143,6 +125,6 @@ Connect the calendar, meeting, and email apps with [connectors](/essentials/v2/c ## Next steps -- [Context](/essentials/v2/context#2-save-memories): when to use `infer`, and how to update or delete a memory. +- [Context](/essentials/v2/context#ingesting-memory): when to use `infer`, and how to update or delete a memory. - [Query](/essentials/v2/query): `recency_bias` and `mode`. - [Build your own personal assistant](/cookbooks/v2/personal-assistant): the same memory, for one person's life outside work. diff --git a/cookbooks/v2/competitive-intelligence.mdx b/cookbooks/v2/competitive-intelligence.mdx index 2a32406d..1e740532 100644 --- a/cookbooks/v2/competitive-intelligence.mdx +++ b/cookbooks/v2/competitive-intelligence.mdx @@ -20,6 +20,7 @@ Competitor signals go stale fast: a pricing page changes, and last quarter's ver Declare the fields you will filter on when you create the database. [Metadata filters](/essentials/v2/metadata) work only on declared fields. ```python intel.py +import io import json from hydra import answer, client, create_database, source_ids, wait_indexed @@ -42,20 +43,19 @@ create_database(DATABASE, schema=[text_field("competitor"), text_field("signal") ## 2. Ingest signals with stable IDs -Send each page as an [app source](/essentials/v2/context#send-app-sources) with the competitor and signal type in `metadata`. Build the `id` from the page, not from the day you fetched it: ingesting the same `id` again replaces the stored version, because `upsert` defaults to `true`. +Upload each page as a small Markdown file, with the competitor and signal type in `metadata`. Build the `id` from the page, not from the day you fetched it: ingesting the same `id` again replaces the stored version, because `upsert` defaults to `true`. ```python intel.py def signal(source_id, competitor, kind_of_signal, title, body, fetched_at, url): + text = f"# {title}\n\nFetched {fetched_at} from {url}\n\n{body}\n" return { - "id": source_id, - "title": title, - "kind": "knowledge_base", - "provider": "web", - "external_id": source_id, - "url": url, - "timestamp": fetched_at, - "fields": {"kind": "knowledge_base", "title": title, "body": body, "updated_at": fetched_at}, - "metadata": {"competitor": competitor, "signal": kind_of_signal}, + # The stored title comes from the filename, so name the file by its id. + "file": (f"{source_id}.md", io.BytesIO(text.encode()), "text/markdown"), + "metadata": { + "id": source_id, + "metadata": {"competitor": competitor, "signal": kind_of_signal}, + "additional_metadata": {"url": url, "fetched_at": fetched_at}, + }, } @@ -64,12 +64,12 @@ def ingest(signals): type="knowledge", database=DATABASE, collection=COLLECTION, - app_knowledge=json.dumps(signals), + documents=[s["file"] for s in signals], + document_metadata=json.dumps([s["metadata"] for s in signals]), ) # A source must finish indexing before the same id is ingested again. wait_indexed(DATABASE, COLLECTION, source_ids(result)) - ingest([ signal("northwind_pricing", "northwind", "pricing", "Northwind pricing", "Team plan: $20 per seat per month. Annual billing only.", @@ -107,7 +107,7 @@ def ask(competitor, question): max_results=8, metadata_filters={"competitor": {"equals": competitor}}, ) - return answer(question, result, "Cite the source title and its date for every claim.") + return answer(question, result, "Cite the page title and the date it was fetched for every claim.") print(ask("northwind", "What does the Team plan cost?")) diff --git a/cookbooks/v2/cursor.mdx b/cookbooks/v2/cursor.mdx index 89c46ce5..a38e89bb 100644 --- a/cookbooks/v2/cursor.mdx +++ b/cookbooks/v2/cursor.mdx @@ -95,7 +95,7 @@ def search_code(question): context = { "chunks": data.get("chunks") or [], "graph_context": data.get("graph_context") or {}, - "additional_context": data.get("additional_context") or {}, + "additional_graph_context": data.get("additional_graph_context") or data.get("additional_context") or {}, } for chunk in context["chunks"]: chunk["path"] = (chunk.get("additional_metadata") or {}).get("path", chunk.get("source_title")) @@ -164,5 +164,5 @@ Indexing a few hundred files takes a few minutes. The answer should name specifi ## Next steps - [Query: API Reference](/api-reference/v2/endpoint/query): the fields of `graph_context`. -- [Context](/essentials/v2/context#send-app-sources): add pull requests and Slack threads, so the assistant can answer why code was written the way it was. +- [Connectors](/essentials/v2/connectors): sync pull requests from GitHub and threads from Slack, so the assistant can answer why code was written the way it was. - [Claude Code](/plugins/claude-code) and [Cursor](/plugins/cursor) plugins: give an existing coding agent HydraDB memory without building your own. diff --git a/cookbooks/v2/glean.mdx b/cookbooks/v2/glean.mdx index d3cd1713..2f4c81a3 100644 --- a/cookbooks/v2/glean.mdx +++ b/cookbooks/v2/glean.mdx @@ -1,12 +1,12 @@ --- title: "Build your own Glean" sidebarTitle: "Company Brain" -description: "Company search across Slack, Jira, and Notion that respects each person's permissions and cites its sources." +description: "Company search across Slack, Jira, and Confluence that respects each person's permissions and cites its sources." --- import Setup from "/snippets/cookbook-setup.mdx"; -Company search answers a question from everything the company has written, and shows each person only what they are allowed to see. This cookbook builds it with three ideas: one collection for all company knowledge, an ACL on each source, and the asker's identity on every query. +Company search answers a question from everything the company has written, and shows each person only what they are allowed to see. This cookbook builds it with three ideas: one collection for all company knowledge, connectors that sync each app along with its permissions, and the asker's identity on every query. | Benchmark | Result | What it shows here | | --- | --- | --- | @@ -21,79 +21,43 @@ Put everything in one collection so a single query searches all of it. Separate ```python glean.py import json +import os -from hydra import answer, client, create_database, source_ids, wait_indexed +from hydra import answer, client, connect, create_database DATABASE, COLLECTION = "acme_corp", "company" create_database(DATABASE) ``` -## 2. Ingest sources from each app +## 2. Connect each app -Send records your code already holds as [app sources](/essentials/v2/context#send-app-sources). `kind` tells HydraDB what the record is, `fields` carries its content, and `acl` lists who may see it. The samples include an outdated wiki page and the Slack message that replaced it, and a ticket only the finance lead can see. +A [connector](/essentials/v2/connectors) syncs one app account into the collection and keeps it in sync on a schedule. For Slack, Jira, Confluence, and the other providers [that capture permissions](/essentials/v2/connectors#examples-of-what-each-provider-captures), it also copies the app's permissions into each source's ACL, so a private Slack channel stays private in search. `connect` from `hydra.py` makes the connector calls: create, discover, configure, and status. ```python glean.py -sources = [ - { - "id": "notion_pricing_2025", - "title": "Pricing (2025)", - "kind": "knowledge_base", - "provider": "notion", - "external_id": "page_pricing_2025", - "url": "https://notion.so/acme/pricing-2025", - "timestamp": "2025-03-01T09:00:00Z", - "fields": { - "kind": "knowledge_base", - "title": "Pricing (2025)", - "body": "Pro is $79 per seat per month. Enterprise is $199.", - "updated_at": "2025-03-01T09:00:00Z", - }, - "acl": ["domain:acme.com"], - }, - { - "id": "slack_C01_1788000000_000100", - "title": "Pricing change - Slack #product", - "kind": "message", - "provider": "slack", - "external_id": "1788000000.000100", - "timestamp": "2026-09-01T10:00:00Z", - "fields": { - "kind": "message", - "body": "Decision: from October 1, 2026, Pro moves from $79 to $89 per seat.", - "author": "alice@acme.com", - "thread_id": "1788000000.000100", - "created_at": "2026-09-01T10:00:00Z", - }, - "acl": ["domain:acme.com"], - }, - { - "id": "jira_FIN_42", - "title": "FIN-42: Enterprise discount floor", - "kind": "ticket", - "provider": "jira", - "external_id": "FIN-42", - "timestamp": "2026-09-03T15:00:00Z", - "fields": { - "kind": "ticket", - "title": "Enterprise discount floor", - "description": "Do not discount Enterprise below $150 per seat without CFO approval.", - "status": "open", - "assignee": "grace@acme.com", - }, - "acl": ["grace@acme.com"], - }, -] - -result = client.context.ingest( - type="knowledge", - database=DATABASE, - collection=COLLECTION, - app_knowledge=json.dumps(sources), +connect( + "slack", + os.environ["SLACK_WORKSPACE_ID"], + DATABASE, + COLLECTION, + credentials={"access_token": os.environ["SLACK_TOKEN"]}, ) -wait_indexed(DATABASE, COLLECTION, source_ids(result)) + +# Add one call per app, all pointing at the same collection. Each provider has +# its own credentials: client.list_providers(id="jira") returns the shape. +for provider in ("jira", "confluence"): + variable = f"{provider.upper()}_CREDENTIALS" + if variable in os.environ: + site = os.environ[f"{provider.upper()}_SITE"] # For example acme.atlassian.net. + connect(provider, site, DATABASE, COLLECTION, credentials=json.loads(os.environ[variable])) ``` +The first time it runs for an account, `connect` syncs every channel, page, or project the credentials can reach, and the last 30 days of each. To sync only some, pass a shorter `resources` list to [`configure`](/api-reference/v2/endpoint/configure-connector). To fetch more history, pass `lookback_days`. + + +A provider that does not capture permissions, such as Notion or Gmail, syncs its content with no ACL, so every asker could retrieve it. `connect` refuses such a provider unless you pass `acl` to set who may read what it syncs. It also stops if a provider's permissions could not be read, because that content would be readable by everyone until the next successful sync. + + ## 3. Query as the person asking Send the signed-in user's identity as `acl`. Take it from your session on the server, never from the client: a query without `acl` returns everything in scope. The other settings are the ones the EnterpriseRAG-Bench run used: hybrid matching, `thinking` mode, and 12 results. @@ -125,51 +89,29 @@ def ask(question, user_email): print(f" - {title} ({source_id})") -ask("What does Pro cost per seat?", "bob@acme.com") -ask("How far can we discount Enterprise?", "bob@acme.com") -ask("How far can we discount Enterprise?", "grace@acme.com") +ask("What did we decide about pricing?", "bob@acme.com") +ask("What did we decide about pricing?", "grace@acme.com") ``` ## Run it +Set `SLACK_TOKEN` and `SLACK_WORKSPACE_ID`, and optionally `JIRA_CREDENTIALS` with `JIRA_SITE`, and `CONFLUENCE_CREDENTIALS` with `CONFLUENCE_SITE`. Replace the two emails with people in your workspace, and run: + ```bash python glean.py ``` -The first answer should give $89 and cite the Slack decision alongside the older page. The second should say it does not know, because the ticket is restricted to Grace. The third should give the $150 floor and cite FIN-42. - -## Use real data - -Replace step 2 with [connectors](/essentials/v2/connectors): HydraDB then syncs each app on a schedule and copies its permissions into each source's ACL. Create one connector per app, all pointing at the same collection. - -```python connect.py -from hydra import client - -connector = client.connectors.create( - provider="slack", - database="acme_corp", - collection="company", - provider_account_scope="T12345ACME", - credentials={"access_token": "xoxp-..."}, -) -found = client.connectors.discover(connector.connector_id) -client.connectors.configure( - connector.connector_id, - resources=[ - {"resource_id": r.id, "resource_type": r.resource_type, "name": r.name} - for r in found.resources - ], -) -``` +The first run waits for the first sync, which takes a few minutes. Each answer cites the Slack messages and pages it came from. If the decision was made in a private channel, only the person who is a member of that channel gets it; the other is told the context does not say. Keep sending `acl` on every query, and leave [`enforce_acl`](/essentials/v2/connectors#enforce-acl) off for this application. With `enforce_acl` on, HydraDB ignores the request's `acl` and uses the identity of whoever created the API key, so every user of your application would see what the key's creator can see. Enforcement fits a caller who authenticates as themselves, such as a user signed in through MCP OAuth. ## Common mistakes - **Turning on `enforce_acl` behind one API key:** every query then runs with the key creator's permissions, not the asker's. +- **Connecting a provider that captures no permissions:** its content is synced unrestricted and reaches every asker. Pass `acl` to `connect` for it. - **Querying without `acl`:** the query returns restricted sources to everyone. Send the user's identity on every query. - **One collection per app or team:** a query that names one collection does not read the others. Keep one collection and narrow with [metadata filters](/essentials/v2/metadata). -- **Group permissions:** an email matches its `domain:` principal automatically, but not groups. Send `group:` principals yourself. See [Query](/essentials/v2/query#6-query-on-behalf-of-a-user). +- **Group permissions:** an email matches its `domain:` principal automatically, but not groups. Send `group:` principals yourself. See [Query](/essentials/v2/query#6-as-an-admin-you-can-query-the-app-on-behalf-of-a-user). ## Next steps diff --git a/cookbooks/v2/index.mdx b/cookbooks/v2/index.mdx index 7782a051..2e4a9e2a 100644 --- a/cookbooks/v2/index.mdx +++ b/cookbooks/v2/index.mdx @@ -59,9 +59,9 @@ The mapping is ours. These reports measure retrieval, answer accuracy, or genera Every cookbook follows the same five steps, which are the whole HydraDB loop: 1. Create a database. -2. Ingest context with [`POST /context/ingest`](/api-reference/v2/endpoint/ingest-context). +2. Bring in context: connect an app with a [connector](/essentials/v2/connectors), or upload files and save memories with [`POST /context/ingest`](/api-reference/v2/endpoint/ingest-context). 3. Wait for indexing. 4. Query with [`POST /query`](/api-reference/v2/endpoint/query). 5. Pass the result to a model. -Each cookbook ingests a few sample sources, so it runs with a HydraDB API key and an OpenAI API key. The exception is Cursor, which indexes a repository you point it at. To use your own data, replace the samples or connect the app with a [connector](/essentials/v2/connectors). New to HydraDB? Start with the [Quickstart](/get-started/v2/quickstart). +Competitive intelligence and customer support run on sample data, with a HydraDB API key and an OpenAI API key. Glean, AI Chief of Staff, and the personal assistant connect your own Slack or Gmail account, so they also need that app's credentials. Cursor indexes a repository you point it at. New to HydraDB? Start with the [Quickstart](/get-started/v2/quickstart). diff --git a/cookbooks/v2/personal-assistant.mdx b/cookbooks/v2/personal-assistant.mdx index af0f3a80..90ffa57b 100644 --- a/cookbooks/v2/personal-assistant.mdx +++ b/cookbooks/v2/personal-assistant.mdx @@ -21,9 +21,11 @@ A personal assistant has two jobs: remember what a person tells it, across sessi Each user's context lives in their own collection, named by their user ID. Nothing one user saves can appear in another user's query. ```python assistant.py +import io import json +import os -from hydra import answer, client, create_database, source_ids, wait_indexed +from hydra import answer, client, connect, create_database, source_ids, wait_indexed DATABASE = "assistant" USER = "user_maya" @@ -33,7 +35,7 @@ create_database(DATABASE) ## 2. Remember each session -When a session ends, save its turns as a [memory](/essentials/v2/context#2-save-memories). Send the dialogue as `user_assistant_pairs` with `infer: true`: HydraDB extracts the preferences and facts, including ones that are implied, and reconciles them with what it already holds. Saving session by session is how the LongMemEval run ingested its conversations. +When a session ends, save its turns as a [memory](/essentials/v2/context#ingesting-memory). Send the dialogue as `user_assistant_pairs` with `infer: true`: HydraDB extracts the preferences and facts, including ones that are implied, and reconciles them with what it already holds. Saving session by session is how the LongMemEval run ingested its conversations. ```python assistant.py def remember_session(turns): @@ -62,52 +64,51 @@ remember_session([ ## 3. Add the person's email and photos -Email and media are knowledge, saved in the same collection. Send an email as an `email` app source. Send a photo or video as a `custom` app source: put the caption and any text read from the image in `fields.body`, and the date and place in `fields.data`. This mirrors the ATM-Bench setup, where every item is text plus its timestamp, location, and tags. +Email and media are knowledge, saved in the same collection. A [connector](/essentials/v2/connectors) syncs the person's mailbox; `lookback_days` sets how far back the first sync reaches. Above 30, the older mail may be fetched in the background and keep arriving after `connect` returns. Photos and videos have no text to search, so caption each one with a vision model in your application, then upload the caption, any text read from the image, and the date and place as a small file. This mirrors the ATM-Bench setup, where every item is text plus its timestamp, location, and tags. ```python assistant.py -items = [ - { - "id": "gmail_msg_771", - "title": "Your booking at The Lighthouse, Whitstable", - "kind": "email", - "provider": "gmail", - "external_id": "msg_771", - "timestamp": "2026-06-14T08:12:00Z", - "fields": { - "kind": "email", - "subject": "Your booking at The Lighthouse, Whitstable", - "body": "Two nights, June 20 to 22. Total paid: 312 GBP.", - "from": "bookings@thelighthouse.example", - "created_at": "2026-06-14T08:12:00Z", - }, - }, - { - "id": "photo_2026_06_21_0934", - "title": "Photo: oyster stall, Whitstable harbour", - "kind": "custom", - "provider": "photos", - "external_id": "IMG_0934", - "timestamp": "2026-06-21T12:40:00Z", - "fields": { - "kind": "custom", - "body": "A blue oyster stall on the harbour wall. Sign reads 'Wheelers'.", - "data": {"taken_at": "2026-06-21", "place": "Whitstable", "tags": "harbour, food, sea"}, - }, - }, -] - -result = client.context.ingest( - type="knowledge", - database=DATABASE, - collection=USER, - app_knowledge=json.dumps(items), +USER_EMAIL = os.environ["USER_EMAIL"] + +# Each provider has its own credentials: client.list_providers(id="gmail") +# returns the shape. Use this user's own credentials and collection. Gmail +# carries no permissions over, so acl restricts the mailbox to its owner. +connect( + "gmail", + USER_EMAIL, + DATABASE, + USER, + credentials=json.loads(os.environ["GMAIL_CREDENTIALS"]), + acl=[USER_EMAIL], + lookback_days=365, +) + + +def add_photo(photo_id, caption, taken_at, place): + text = f"# Photo taken {taken_at} in {place}\n\n{caption}\n" + result = client.context.ingest( + type="knowledge", + database=DATABASE, + collection=USER, + documents=[(f"{photo_id}.md", io.BytesIO(text.encode()), "text/markdown")], + document_metadata=json.dumps([{ + "id": photo_id, + "additional_metadata": {"taken_at": taken_at, "place": place}, + }]), + ) + wait_indexed(DATABASE, USER, source_ids(result)) + + +add_photo( + "photo_2026_06_21_0934", + "A blue oyster stall on the harbour wall. Sign reads 'Wheelers'.", + "2026-06-21", + "Whitstable", ) -wait_indexed(DATABASE, USER, source_ids(result)) ``` ## 4. Answer from memories and items together -`type: "all"` searches the user's memories and knowledge in one call. +`type: "all"` searches the user's memories and knowledge in one call. `acl` is the user's own email, so the query returns only what this person may see. ```python assistant.py def ask(question): @@ -117,34 +118,33 @@ def ask(question): query=question, type="all", mode="thinking", + acl=[USER_EMAIL], ) return answer(question, result, "When facts conflict, the most recent one is current.") print(ask("Suggest somewhere for a team dinner near my office.")) -print(ask("How much did I pay for the place in Whitstable?")) +print(ask("What bookings or trips do I have coming up?")) print(ask("What was the name on that oyster stall?")) ``` ## Run it +Set `GMAIL_CREDENTIALS` and `USER_EMAIL`, and run: + ```bash python assistant.py ``` -The first answer should suggest vegetarian options near King's Cross, not Shoreditch. The second should give 312 GBP from the booking email. The third should give "Wheelers" from the photo. - -## Use real data - -Connect Gmail and Google Drive with [connectors](/essentials/v2/connectors) to keep email and files in sync, with each user's connector pointing at that user's collection. For photos and video, caption them with a vision model in your application, then ingest them as in step 3. +The first answer suggests vegetarian options near King's Cross, not Shoreditch. The second comes from the person's own email. The third gives "Wheelers" from the photo caption. ## Common mistakes - **Saving a transcript with `infer: false`:** that stores the dialogue word for word, and the preference inside it is harder to find. Use `infer: true` for raw conversation. - **Forgetting `collection` on the query:** a query without it reads the default collection, which holds nothing for this user. -- **Ingesting images without text:** queries match text. Put a caption, any text in the image, and the date and place into the app source. +- **Ingesting images without text:** queries match text. Put a caption, any text in the image, and the date and place into the file you upload. ## Next steps -- [Context](/essentials/v2/context#2-save-memories): `infer`, `custom_instructions`, and deleting a memory. +- [Context](/essentials/v2/context#ingesting-memory): `infer`, per-user scope, and deleting a memory. - [Build your own AI Chief of Staff](/cookbooks/v2/chief-of-staff): the same memory, applied to meetings and commitments. diff --git a/cookbooks/v2/support-agent.mdx b/cookbooks/v2/support-agent.mdx index d2feb26a..ebb53314 100644 --- a/cookbooks/v2/support-agent.mdx +++ b/cookbooks/v2/support-agent.mdx @@ -63,7 +63,7 @@ wait_indexed(DATABASE, HELP_CENTER, source_ids(result)) ## 3. Remember each conversation -When a conversation ends, save it as a [memory](/essentials/v2/context#2-save-memories) in that customer's collection. With `infer: true`, HydraDB extracts what matters: the customer's plan, what they asked for, what they were told. +When a conversation ends, save it as a [memory](/essentials/v2/context#ingesting-memory) in that customer's collection. With `infer: true`, HydraDB extracts what matters: the customer's plan, what they asked for, what they were told. ```python support.py def remember(customer_id, turns): @@ -125,7 +125,7 @@ The billing answer should combine both sources: the refund was requested on Sept ## Use real data -Sync the public help center into the shared collection with a [connector](/essentials/v2/connectors). Put only public content there: every customer's query reads that collection, and it is not filtered by `acl`. A customer's past tickets are private, so ingest each one into that customer's collection as a `ticket` [app source](/essentials/v2/context#send-app-sources). Keep step 3 in your application, called when a conversation closes. If each of your customers is a company with its own private knowledge, give each company its own database. See [Databases and Collections](/essentials/v2/databases-and-collections). +Sync the public help center into the shared collection with a [connector](/essentials/v2/connectors). Put only public content there: every customer's query reads that collection, and it is not filtered by `acl`. A customer's past tickets are private, so save each one as a memory in that customer's collection, as step 3 does for conversations. Keep step 3 in your application, called when a conversation closes. If each of your customers is a company with its own private knowledge, give each company its own database. See [Databases and Collections](/essentials/v2/databases-and-collections). ## Common mistakes @@ -136,6 +136,6 @@ Sync the public help center into the shared collection with a [connector](/essen ## Next steps -- [Context](/essentials/v2/context#2-save-memories): `infer` and conversation input. +- [Context](/essentials/v2/context#ingesting-memory): `infer` and conversation input. - [Databases and Collections](/essentials/v2/databases-and-collections): scoping patterns for B2C and B2B. - [Query](/essentials/v2/query#7-use-the-results): combining knowledge and memories in a prompt. diff --git a/docs.json b/docs.json index 8858e0bb..3e1b952a 100644 --- a/docs.json +++ b/docs.json @@ -22,7 +22,7 @@ }, "favicon": "/favicon.png", "markdown": { - "instructions": "AGENTS.md is HydraDB's maintained agent guide. Read https://docs.hydradb.com/AGENTS.md once, then use its content. /llms.txt and /llms-full.txt redirect to the same guide; they are not separate documentation indexes. If the guide is already loaded, continue with it instead of fetching either alias or reloading the guide." + "instructions": "AGENTS.md is HydraDB's maintained agent guide. Read https://docs.hydradb.com/AGENTS.md once, then use its content. /llms.txt carries the same guide; it is not a separate documentation index. If the guide is already loaded, continue with it instead of fetching /llms.txt or reloading the guide." }, "contextual": { "options": [ @@ -71,20 +71,137 @@ "essentials/v2/context", "essentials/v2/connectors", "essentials/v2/query", - "essentials/v2/bring-your-own-graph" + "essentials/v2/byog-overview" ] }, - { - "group": "Tools and Integrations", - "public": true, - "pages": [ - "plugins/cli", - "plugins/mcp", - "plugins/ecosystem" - ] - }, - { - "group": "For Agents", + { + "group": "Tools and Integrations", + "public": true, + "pages": [ + "plugins/cli", + "plugins/mcp", + "plugins/ecosystem" + ] + }, + { + "group": "Connector catalog", + "public": true, + "pages": [ + "essentials/v2/connector-providers", + { + "group": "Messaging & email", + "pages": [ + "essentials/v2/connectors/slack", + "essentials/v2/connectors/gmail", + "essentials/v2/connectors/outlook", + "essentials/v2/connectors/microsoft-teams", + "essentials/v2/connectors/discord", + "essentials/v2/connectors/sendgrid", + "essentials/v2/connectors/twilio", + "essentials/v2/connectors/twitter" + ] + }, + { + "group": "Tickets & project management", + "pages": [ + "essentials/v2/connectors/jira", + "essentials/v2/connectors/linear", + "essentials/v2/connectors/asana", + "essentials/v2/connectors/clickup", + "essentials/v2/connectors/monday", + "essentials/v2/connectors/smartsheet", + "essentials/v2/connectors/wrike", + "essentials/v2/connectors/shortcut" + ] + }, + { + "group": "Docs & cloud storage", + "pages": [ + "essentials/v2/connectors/confluence", + "essentials/v2/connectors/notion", + "essentials/v2/connectors/google-drive", + "essentials/v2/connectors/dropbox", + "essentials/v2/connectors/sharepoint", + "essentials/v2/connectors/bookstack", + "essentials/v2/connectors/airtable", + "essentials/v2/connectors/guru", + "essentials/v2/connectors/coda", + "essentials/v2/connectors/contentful", + "essentials/v2/connectors/figma" + ] + }, + { + "group": "Meetings & calendar", + "pages": [ + "essentials/v2/connectors/google-calendar", + "essentials/v2/connectors/zoom", + "essentials/v2/connectors/calendly", + "essentials/v2/connectors/fireflies", + "essentials/v2/connectors/granola", + "essentials/v2/connectors/loom", + "essentials/v2/connectors/avoma" + ] + }, + { + "group": "Engineering", + "pages": [ + "essentials/v2/connectors/github", + "essentials/v2/connectors/gitlab", + "essentials/v2/connectors/sentry", + "essentials/v2/connectors/datadog", + "essentials/v2/connectors/pagerduty", + "essentials/v2/connectors/supabase", + "essentials/v2/connectors/launchdarkly", + "essentials/v2/connectors/okta" + ] + }, + { + "group": "Marketing & analytics", + "pages": [ + "essentials/v2/connectors/posthog", + "essentials/v2/connectors/mixpanel", + "essentials/v2/connectors/bigquery", + "essentials/v2/connectors/google-search-console", + "essentials/v2/connectors/googleads", + "essentials/v2/connectors/mailchimp", + "essentials/v2/connectors/klaviyo", + "essentials/v2/connectors/pardot", + "essentials/v2/connectors/typeform", + "essentials/v2/connectors/surveymonkey" + ] + }, + { + "group": "HR & finance", + "pages": [ + "essentials/v2/connectors/stripe", + "essentials/v2/connectors/quickbooks", + "essentials/v2/connectors/xero", + "essentials/v2/connectors/recurly", + "essentials/v2/connectors/bamboohr", + "essentials/v2/connectors/greenhouse", + "essentials/v2/connectors/lever" + ] + }, + { + "group": "CRM & support", + "pages": [ + "essentials/v2/connectors/hubspot", + "essentials/v2/connectors/zendesk", + "essentials/v2/connectors/intercom", + "essentials/v2/connectors/gong", + "essentials/v2/connectors/pipedrive", + "essentials/v2/connectors/freshdesk", + "essentials/v2/connectors/servicenow", + "essentials/v2/connectors/attio", + "essentials/v2/connectors/zoho-crm", + "essentials/v2/connectors/helpscout", + "essentials/v2/connectors/copper" + ] + } + ] + }, + { + "group": "For Agents", "public": true, "pages": [ "AGENTS" @@ -135,15 +252,6 @@ "api-reference/v2/endpoint/delete-source" ] }, - { - "group": "Query", - "public": true, - "pages": [ - "api-reference/v2/endpoint/query-overview", - "api-reference/v2/endpoint/query", - "api-reference/v2/endpoint/submit-feedback" - ] - }, { "group": "Connectors", "public": true, @@ -160,7 +268,16 @@ ] }, { - "group": "Webhooks", + "group": "Query", + "public": true, + "pages": [ + "api-reference/v2/endpoint/query-overview", + "api-reference/v2/endpoint/query", + "api-reference/v2/endpoint/submit-feedback" + ] + }, + { + "group": "Webhooks", "public": true, "pages": [ "api-reference/v2/endpoint/webhooks-overview", @@ -172,9 +289,22 @@ "api-reference/v2/endpoint/get-webhook-delivery", "api-reference/v2/endpoint/retry-webhook-delivery", "api-reference/v2/endpoint/set-webhook-signing-secret", - "api-reference/v2/endpoint/disable-webhook-signing" - ] - } + "api-reference/v2/endpoint/disable-webhook-signing" + ] + }, + { + "group": "Bring Your Own Graph", + "public": true, + "pages": [ + "essentials/v2/bring-your-own-graph", + "api-reference/v2/endpoint/byog-query-managed", + "api-reference/v2/endpoint/byog-create-database", + "api-reference/v2/endpoint/byog-query", + "api-reference/v2/endpoint/byog-list-collections", + "api-reference/v2/endpoint/byog-delete-collection", + "api-reference/v2/endpoint/byog-delete-database" + ] + } ] }, { @@ -309,6 +439,17 @@ ] } ] + }, + { + "version": "Archive", + "hidden": true, + "pages": [ + "essentials/v2/bring-your-own-graph-2", + "essentials/v2/metadata-2", + "essentials/v2/connectors-2", + "essentials/v2/connectors-3", + "essentials/v2/query-2" + ] } ] }, @@ -602,7 +743,7 @@ }, { "source": "/essentials/v2/app-sources", - "destination": "/essentials/v2/context#send-app-sources", + "destination": "/essentials/v2/connectors", "permanent": true }, { diff --git a/essentials/v2/bring-your-own-graph-2.mdx b/essentials/v2/bring-your-own-graph-2.mdx new file mode 100644 index 00000000..14c28c1f --- /dev/null +++ b/essentials/v2/bring-your-own-graph-2.mdx @@ -0,0 +1,706 @@ +--- +title: "Bring Your Own Graph (BYOG) (copy)" +description: "Build your graph from scratch in Cypher. Considering switching to HydraDB from a different graph store? Read this guide." +--- + +If you are moving from an existing graph database, start at [Migrate from Neo4j or another Cypher-compatible database](#migrate-from-neo4j-or-another-cypher-compatible-database). To bring your own entities and relations without writing Cypher, attach them to a source at ingest: see section [Use BYOG without Cypher](#use-byog-without-cypher). + +## Quickstart + +Agents can run the Cypher through the [HydraDB MCP](/plugins/mcp) graph tools (`hydradb_graph_query`, `hydradb_graph_collections`, `hydradb_graph_admin`). Create a database, write two nodes, and read them back: + +```bash +# Every request needs your HydraDB API key + +BASE=https://api.hydradb.com +KEY="your-api-key" + +# 1. Create a database (ready immediately) +curl -X POST "$BASE/byog/databases" \ + -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \ + -d '{"database": "crm"}' + +# 2. Write data - the collection is created on first write +curl -X POST "$BASE/byog/query" \ + -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \ + -d '{ + "database": "crm", + "collection": "contacts", + "query": "UNWIND $rows AS row CREATE (p:Person) SET p = row RETURN count(p) AS created", + "params": {"rows": [{"name": "Alice", "role": "admin"}, + {"name": "Bob", "role": "analyst"}]} + }' + +# 3. Read it back +curl -X POST "$BASE/byog/query" \ + -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \ + -d '{ + "database": "crm", + "collection": "contacts", + "query": "MATCH (p:Person) RETURN p.name AS name, p.role AS role ORDER BY name" + }' +``` + +## More about endpoints: + +### `POST /byog/databases`: create a database + +A database groups your collections. Creating a database here makes it ready immediately; a database created with the standard `POST /databases` can also hold graph collections. Creating a name that already exists returns `409`. + + + +```bash Request +curl -X POST "$BASE/byog/databases" \ + -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \ + -d '{"database": "crm"}' +``` + +```json Response +{ + "success": true, + "data": { "database": "crm", "status": "ready", "cluster": "shared" }, + "error": null, + "meta": { "request_id": "9280b5f7-…", "api_version": "2.0.1", "latency_ms": 90.8 } +} +``` + + + +### `POST /byog/query`: run Cypher + + + +```bash Request +curl -X POST "$BASE/byog/query" \ + -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \ + -d '{ + "database": "crm", + "collection": "contacts", + "query": "CREATE (n:Person {name: $name}) RETURN n", + "params": {"name": "Alice"} + }' +``` + +```json Response +{ + "success": true, + "data": [ + { "n": { "id": 0, "labels": ["Person"], "name": "Alice" } } + ], + "error": null, + "meta": { "request_id": "0f345406-…", "api_version": "2.0.1", "latency_ms": 142.4 } +} +``` + + + +- Each collection is an isolated graph. A query runs against one collection and cannot see data in any other. +- Collections are created automatically on the first write. Reading a collection that does not exist yet returns zero rows. +- Pass user data through `params` instead of building it into the query string. +- Collection names can use letters, digits, `_` and `-`, must start with a letter or digit, and can be up to 64 characters long. + +### `GET /byog/collections`: list collections + +An unknown database returns `404`. + + + +```bash Request +curl "$BASE/byog/collections?database=crm" \ + -H "Authorization: Bearer $KEY" +``` + +```json Response +{ + "success": true, + "data": { "database": "crm", "collections": ["contacts", "sample"] }, + "error": null, + "meta": { "request_id": "d4744632-…", "api_version": "2.0.1", "latency_ms": 55.6 } +} +``` + + + +### `DELETE /byog/collections`: drop one collection + +Drops the collection and all its data. Deleting a collection that does not exist also succeeds. + + + +```bash Request +curl -X DELETE "$BASE/byog/collections" \ + -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \ + -d '{"database": "crm", "collection": "contacts"}' +``` + +```json Response +{ + "success": true, + "data": { "database": "crm", "collection": "contacts", "deleted": true }, + "error": null, + "meta": { "request_id": "d7b2b080-…", "api_version": "2.0.1", "latency_ms": 131.1 } +} +``` + + + +### `DELETE /byog/databases`: drop a database + +Drops the graph collections and, if created through `POST /byog/databases`, the database itself. For a database created through the standard database API, the graph collections are dropped, `deleted` is `false`, and the database stays. Use the standard `DELETE /databases` to remove that database. + + + +```bash Request +curl -X DELETE "$BASE/byog/databases" \ + -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \ + -d '{"database": "crm"}' +``` + +```json Response +{ + "success": true, + "data": { + "database": "crm", + "cluster": "shared", + "deleted": true, + "deleted_collections": ["contacts", "sample"] + }, + "error": null, + "meta": { "request_id": "1ba6ecb8-…", "api_version": "2.0.1", "latency_ms": 130.8 } +} +``` + + + +## Supported Cypher + +All of openCypher is supported except server-side procedures and file loading. + +### Modeling and CRUD + +- Create, read, update and delete: `CREATE`, `MATCH`, `MERGE`, `SET`, `REMOVE`, `DELETE` / `DETACH DELETE` +- Pattern matching, `WHERE` filters, aggregation, `ORDER BY` / `SKIP` / `LIMIT` +- `UNWIND` and `WITH` pipelines +- Indexes: `CREATE INDEX FOR (n:Label) ON (n.prop)` +- `CALL { ... }` subqueries + +### Graph traversal and exploration + +- **Multi-hop patterns:** chain relationships in one `MATCH`: `MATCH (a:Person)-[:KNOWS]->(b)-[:WORKS_AT]->(c:Company) RETURN c.name`. +- **Variable-length traversal:** follow a relationship a bounded or unbounded number of hops with `*`: `MATCH (a:Person {name:$n})-[:KNOWS*1..4]->(reach) RETURN DISTINCT reach.name`. +- **Neighborhood expansion:** a node's edges and neighbors in any direction: `MATCH (p:Person {name:$n})-[r]-(nbr) RETURN type(r) AS rel, nbr.name AS neighbor`. +- **Path finding:** `shortestPath` returns the full path (nodes and edges in traversal order), not only the endpoints. +- **Directed, typed, filtered traversal:** outgoing (`->`), incoming (`<-`) or either (`-`) edges, filtered by relationship type and by node or edge properties anywhere along the walk. + +### Not supported + +These are rejected with `400` before the query runs; nothing is executed, and retrying the same query fails the same way: + +- **Procedure calls:** `CALL some.procedure(...)`, including `db.*` and `apoc.*`. `CALL { ... }` subqueries are supported. +- **`LOAD CSV`:** send data through `params` instead. + +### Dialect notes + +- **Existence checks** are bare pattern predicates: `MATCH (p:Person) WHERE (p)-[:KNOWS]->() RETURN p.name AS name`. The `EXISTS { ... }` block form and the `exists()` function are not accepted. +- **`shortestPath`** goes in a `RETURN` or `WITH` clause (not `MATCH p = …`) and the traversal must be directed. + +## Common Cypher queries + +Each query runs against the sample graph that the first one loads. + +### Load the sample graph + +Five people, two companies, and the `KNOWS` / `WORKS_AT` edges between them. + +```cypher +CREATE (alice:Person {ext_id: "u1", name: "Alice", role: "admin"}), + (bob:Person {ext_id: "u2", name: "Bob", role: "analyst"}), + (carol:Person {ext_id: "u3", name: "Carol", role: "engineer"}), + (dan:Person {ext_id: "u4", name: "Dan", role: "engineer"}), + (eve:Person {ext_id: "u5", name: "Eve", role: "designer"}), + (acme:Company {ext_id: "c1", name: "Acme", sector: "fintech"}), + (globex:Company {ext_id: "c2", name: "Globex", sector: "retail"}), + (alice)-[:KNOWS {since: 2020}]->(bob), + (bob)-[:KNOWS {since: 2021}]->(carol), + (carol)-[:KNOWS {since: 2022}]->(dan), + (alice)-[:KNOWS {since: 2023}]->(eve), + (bob)-[:WORKS_AT]->(acme), + (carol)-[:WORKS_AT]->(acme), + (dan)-[:WORKS_AT]->(globex) +RETURN count(*) AS created +``` + + + ```json + [{"created": 1}] + ``` + + +### Upsert a node on your own key + +Updates Alice's role, or creates her if `u1` does not exist. + +```cypher +MERGE (p:Person {ext_id: "u1"}) +SET p.role = "owner" +RETURN p.ext_id AS id, p.name AS name, p.role AS role +``` + + + ```json + [{"id": "u1", "name": "Alice", "role": "owner"}] + ``` + + +### Connect two existing nodes + +Eve starts working at Acme. + +```cypher +MATCH (a:Person {ext_id: "u5"}), (b:Company {ext_id: "c1"}) +MERGE (a)-[w:WORKS_AT]->(b) +SET w.since = 2024 +RETURN a.name AS person, type(w) AS rel, b.name AS company, w.since AS since +``` + + + ```json + [{"company": "Acme", "person": "Eve", "rel": "WORKS_AT", "since": 2024}] + ``` + + +### Expand a node's neighborhood + +Every relationship on Bob, in any direction, and the node on the other end. + +```cypher +MATCH (p:Person {name: "Bob"})-[r]-(nbr) +RETURN type(r) AS rel, labels(nbr) AS kind, nbr.name AS neighbor +ORDER BY rel, neighbor +``` + + + ```json + [ + {"kind": ["Person"], "neighbor": "Alice", "rel": "KNOWS"}, + {"kind": ["Person"], "neighbor": "Carol", "rel": "KNOWS"}, + {"kind": ["Company"], "neighbor": "Acme", "rel": "WORKS_AT"} + ] + ``` + + +### Multi-hop expansion + +Everyone up to 3 hops from Alice along outgoing `KNOWS` edges. + +```cypher +MATCH (a:Person {name: "Alice"})-[:KNOWS*1..3]->(reach:Person) +WHERE reach.name <> "Alice" +RETURN DISTINCT reach.name AS name +ORDER BY name +``` + + + ```json + [ + {"name": "Bob"}, + {"name": "Carol"}, + {"name": "Dan"}, + {"name": "Eve"} + ] + ``` + + +### Shortest path between two nodes + +Returns the whole path (nodes and edges in order), not only the endpoints. + +```cypher +MATCH (a:Person {name: "Alice"}), (b:Person {name: "Carol"}) +RETURN shortestPath((a)-[:KNOWS*..8]->(b)) AS path +``` + + + ```json + [ + { + "path": { + "edges": [ + { + "id": 0, + "relation": "KNOWS", + "since": 2020, + "source_node_id": 0, + "target_node_id": 1 + }, + { + "id": 1, + "relation": "KNOWS", + "since": 2021, + "source_node_id": 1, + "target_node_id": 2 + } + ], + "nodes": [ + { + "ext_id": "u1", + "id": 0, + "labels": [ + "Person" + ], + "name": "Alice", + "role": "owner" + }, + { + "ext_id": "u2", + "id": 1, + "labels": [ + "Person" + ], + "name": "Bob", + "role": "analyst" + }, + { + "ext_id": "u3", + "id": 2, + "labels": [ + "Person" + ], + "name": "Carol", + "role": "engineer" + } + ] + } + } + ] + ``` + + +### Filtered, typed traversal + +Who does Alice know that works at a fintech company? + +```cypher +MATCH (a:Person {name: "Alice"})-[:KNOWS]->(f:Person)-[:WORKS_AT]->(c:Company) +WHERE c.sector = "fintech" +RETURN f.name AS person, c.name AS company +ORDER BY person +``` + + + ```json + [ + {"company": "Acme", "person": "Bob"}, + {"company": "Acme", "person": "Eve"} + ] + ``` + + +### Aggregate + +Headcount per company, largest first. + +```cypher +MATCH (p:Person)-[:WORKS_AT]->(c:Company) +RETURN c.name AS company, count(p) AS headcount +ORDER BY headcount DESC +``` + + + ```json + [ + {"company": "Acme", "headcount": 3}, + {"company": "Globex", "headcount": 1} + ] + ``` + + +### Index a property you filter on + +Speeds up lookups by `ext_id`. + +```cypher +CREATE INDEX FOR (n:Person) ON (n.ext_id) +``` + + + ```json + [] + ``` + + +### Delete a node and its edges + +Removes Eve and every relationship attached to her. + +```cypher +MATCH (p:Person {ext_id: "u5"}) +DETACH DELETE p +RETURN count(*) AS deleted +``` + + + ```json + [{"deleted": 1}] + ``` + + +## Response format + +Rows come back in `data`: one object per result row, keyed by your `RETURN` aliases: + +```json +{ + "success": true, + "data": [ + { "name": "Alice", "role": "admin" }, + { "name": "Bob", "role": "analyst" } + ], + "error": null, + "meta": { "request_id": "9be86a4e-…", "latency_ms": 12.4 } +} +``` + +- **Alias every column you read:** `RETURN n.name AS name`. An unaliased column is keyed by its expression text (`"n.name"`). +- A write with no `RETURN` succeeds with `data: []`. + +What each kind of value looks like inside a row: + +| You return | Example | Row in `data` | +| --- | --- | --- | +| Scalar | `RETURN p.name AS name` | `{"name": "Alice"}` | +| Node | `RETURN p` | `{"p": {"id": 0, "labels": ["Person"], "name": "Alice"}}` | +| Relationship | `RETURN k` | `{"k": {"id": 7, "relation": "KNOWS", "source_node_id": 0, "target_node_id": 1, "since": 2020}}` | +| Path | `RETURN shortestPath(...) AS path` | `{"path": {"nodes": [...], "edges": [...]}}` | +| List / map | `RETURN collect(p.name) AS names` | `{"names": ["Alice", "Bob"]}` | + +- Nodes and relationships are flat objects: their properties plus the keys in the table. A stored property with one of those names (`id`, `labels`, `relation`, `source_node_id`, `target_node_id`) is hidden in the response; alias it (`RETURN n.id AS my_id`). +- `id` is internal: it can be reused after deletes and does not survive an export and re-import. Key your data on a property you own, such as `ext_id` or `email`. +- Integers are 64-bit. Values beyond 2⁵³ lose precision in languages that parse JSON numbers as doubles; return them as strings. + +## Use results in your code + +### A minimal client + +Wrap the endpoint once. A success puts rows in `data`; the client reads an error from `detail`. + +```python +import requests + +class HydraGraph: + def __init__(self, base_url, api_key, database, collection="default"): + self.base, self.db, self.col = base_url, database, collection + self.headers = {"Authorization": f"Bearer {api_key}"} + + def query(self, cypher, params=None): + r = requests.post(f"{self.base}/byog/query", headers=self.headers, json={ + "database": self.db, "collection": self.col, + "query": cypher, "params": params or {}, + }) + body = r.json() + if not r.ok: + err = body.get("detail", {}) + raise RuntimeError(f"{r.status_code} {err.get('error_code')}: {err.get('message')}") + return body["data"] # always a list of row dicts + +g = HydraGraph("https://api.hydradb.com", "", "crm", "contacts") +``` + +```typescript +async function query(cypher: string, params: object = {}): Promise[]> { + const res = await fetch(`${BASE}/byog/query`, { + method: "POST", + headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" }, + body: JSON.stringify({ database: "crm", collection: "contacts", query: cypher, params }), + }); + const body = await res.json(); + if (!res.ok) throw new Error(`${res.status} ${body.detail?.error_code}: ${body.detail?.message}`); + return body.data; // always an array of row objects +} +``` + +### Read rows + +```python +# Scalars - project and alias exactly what you need. +rows = g.query("MATCH (p:Person) RETURN p.name AS name, p.role AS role ORDER BY name") +names = [r["name"] for r in rows] # ["Alice", "Bob"] + +# Nodes - one flat object: properties plus id and labels. +alice = g.query("MATCH (p:Person {name: $n}) RETURN p", {"n": "Alice"})[0]["p"] +props = {k: v for k, v in alice.items() if k not in ("id", "labels")} + +# Relationships - project both ends in the same query. +for row in g.query("MATCH (a:Person)-[k:KNOWS]->(b:Person) " + "RETURN a.name AS a, b.name AS b, k.since AS since"): + print(f'{row["a"]} knows {row["b"]} since {row["since"]}') + +# Paths - nodes and edges in traversal order. +path = g.query("MATCH (a:Person {name:$x}), (b:Person {name:$y}) " + "RETURN shortestPath((a)-[*..6]->(b)) AS path", + {"x": "Alice", "y": "Bob"})[0]["path"] +hops = [n["name"] for n in path["nodes"]] # ["Alice", ..., "Bob"] +``` + +### Pagination + +Result sets past the deployment cap are silently truncated, so page any read that could be large. A stable `ORDER BY` keeps pages consistent: + +```python +def all_rows(cypher_body, page=500, params=None): + offset = 0 + while True: + rows = g.query(f"{cypher_body} SKIP $offset LIMIT $limit", + {**(params or {}), "offset": offset, "limit": page}) + yield from rows + if len(rows) < page: + return + offset += page + +people = list(all_rows("MATCH (p:Person) RETURN p.name AS name ORDER BY name")) +``` + +### Bulk loading + +Chunk rows to stay inside the 256 KiB body cap and the 30 s write budget; `MERGE` on your own key makes the load re-runnable after a failure: + +```python +def load(rows, chunk=500): + for i in range(0, len(rows), chunk): + g.query(""" + UNWIND $rows AS row + MERGE (n:Person {ext_id: row.ext_id}) + SET n += row + """, {"rows": rows[i:i+chunk]}) +``` + +## Errors and limits + +### Errors + +Errors come back with `success: false` and the reason in `error` (also mirrored in `detail`): + +```json +{ + "success": false, + "data": null, + "error": { "code": "DATABASE_ALREADY_EXISTS", "message": "database 'crm' already exists" }, + "detail": { "success": false, "error_code": "DATABASE_ALREADY_EXISTS", "message": "database 'crm' already exists" } +} +``` + +| Status | Meaning | +| --- | --- | +| `400` | Invalid request (missing fields, bad collection name), unsupported construct, **Cypher errors** (the compiler's message is passed through so you can fix the query), or **query timeout** | +| `403` | Missing or invalid API key | +| `404` | Unknown database; create it with `POST /byog/databases` | +| `409` | `POST /byog/databases` with a name that already exists | +| `413` | Request body over 256 KiB | +| `429` | Rate limit exceeded; back off and retry | +| `500` | Server error. Retry reads with backoff; retry writes only when they are idempotent | + +Decide whether to retry by status: + +- **`400`:** do not retry unchanged; it fails identically. The message says what to fix, either your Cypher or a query that needs `LIMIT` or an index (budget timeout). +- **`429` and `500`:** transient; retry with backoff. Writes built on `MERGE`, as in [Bulk loading](#bulk-loading), are safe to retry. Bare `CREATE` batches are not idempotent, so a retried chunk can duplicate nodes. + +### Limits and timeouts + +| Limit | Value | On exceeding | +| --- | --- | --- | +| Request body | 256 KiB | `413` | +| Read query execution | 8 s | `400`: "query exceeded the execution time budget; simplify it, add LIMIT, or create an index" | +| Write query execution | 30 s | same `400` | +| Result set size | deployment-configured cap; rows beyond it are **silently dropped** | no error; paginate | + +A query counts as a **write** (and gets the larger budget) when it contains any write clause: `CREATE`, `MERGE`, `SET`, `DELETE`, `REMOVE`, `FOREACH`. + +To stay inside these limits: + +- **Paginate anything potentially large:** see [Pagination](#pagination). Without an `ORDER BY`, rows dropped at the result-set cap are arbitrary. +- **Chunk bulk imports:** see [Bulk loading](#bulk-loading). +- **Create indexes** for properties you filter on: `CREATE INDEX FOR (n:Person) ON (n.name)`. A slow read usually needs one. + +## Migrate from Neo4j or another Cypher-compatible database + +Most application Cypher from Neo4j, Memgraph, or any other Cypher-compatible database ports directly. The differences you are most likely to notice: + +- Procedure calls (for example Neo4j's `CALL db.*` and `CALL apoc.*`) and `LOAD CSV` are [not supported](#not-supported). The equivalents of a procedure are either plain Cypher or not part of the supported surface. Instead of `LOAD CSV`, batch data in through `params`. +- Existence checks and `shortestPath` take a different form: see [Dialect notes](#dialect-notes). +- Internal node IDs are not portable; migrate using your own key properties, for example `UNWIND $rows AS row MERGE (n:Person {ext_id: row.ext_id}) SET n += row`. + +Migrate one collection at a time: export a graph, replay it into one collection, and verify the counts. + +This script reads from Neo4j with the official driver and writes to HydraDB with the [`HydraGraph` client](#a-minimal-client). Any source you can read nodes and relationships from works the same way. It loads nodes first, then relationships matched on your own key. Cypher does not allow a relationship type as a parameter, so it writes one batch per type. It copies `Person` nodes and `KNOWS` relationships; repeat both steps for every other label and relationship type in your graph, and compare each count: + +```python +from neo4j import GraphDatabase + +src = GraphDatabase.driver("neo4j://localhost:7687", auth=("neo4j", "")) +g = HydraGraph("https://api.hydradb.com", "", "crm", "contacts") + +def batches(rows, n=500): + for i in range(0, len(rows), n): + yield rows[i:i + n] + +# Index the key first so the relationship MATCH below stays fast. +g.query("CREATE INDEX FOR (n:Person) ON (n.ext_id)") + +with src.session() as s: + # 1. Nodes, keyed on a property you own. + people = [r["p"] for r in s.run("MATCH (p:Person) RETURN properties(p) AS p")] + for chunk in batches(people): + g.query("UNWIND $rows AS row MERGE (n:Person {ext_id: row.ext_id}) SET n += row", + {"rows": chunk}) + + # 2. Relationships, one type at a time. + knows = s.run(""" + MATCH (a:Person)-[k:KNOWS]->(b:Person) + RETURN a.ext_id AS src, b.ext_id AS dst, properties(k) AS props + """).data() + for chunk in batches(knows): + g.query(""" + UNWIND $rows AS row + MATCH (a:Person {ext_id: row.src}), (b:Person {ext_id: row.dst}) + MERGE (a)-[k:KNOWS]->(b) + SET k += row.props + """, {"rows": chunk}) + +# 3. Verify counts match. +print(g.query("MATCH (p:Person) RETURN count(p) AS people")) +``` + + + +## Use BYOG without Cypher + +To use your own entities and relations for a source instead of the ones HydraDB extracts, pass a `graph_payload` on [`POST /context/ingest`](/api-reference/v2/endpoint/ingest-context). It is a JSON map keyed by source ID (a `document_metadata` `id`, an `app_knowledge` `id`, or a memory `id`): + +```bash +curl -X POST 'https://api.hydradb.com/context/ingest' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -F "type=knowledge" \ + -F "database=acme_corp" \ + -F "documents=@/path/to/billing-policy.pdf" \ + -F 'document_metadata=[{ "id": "billing-policy-doc" }]' \ + -F 'graph_payload={ + "billing-policy-doc": { + "entities": { + "alice": { "name": "Alice Carter", "type": "PERSON", "namespace": "employees" }, + "billing": { "name": "Billing Policy", "type": "POLICY", "namespace": "policies" } + }, + "relations": [ + { "source": "alice", "target": "billing", "predicate": "OWNS", + "context": "Alice Carter owns the billing policy.", "temporal_details": "since 2021" } + ] + } + }' +``` + +- **Replaces extraction:** HydraDB skips extraction for each keyed source; the source is still chunked and embedded. Relations appear in `/query` `graph_context` tagged `origin: "byog"`, with no query-side changes. +- **Persists across re-ingest:** re-ingesting without a `graph_payload` re-applies the stored graph; sending a new one replaces it. +- **Limits:** at most 5,000 entities, 10,000 relations, and 500 relations per entity; oversized payloads return `400`. A key matching no source in the request is rejected with `400`. +- **Whole-graph only:** there are no per-triple updates, and relations link to their best-matching chunk even when the match is weak. + +See the [`graph_payload` field reference](/api-reference/v2/endpoint/ingest-context) for the full shape. diff --git a/essentials/v2/bring-your-own-graph.mdx b/essentials/v2/bring-your-own-graph.mdx index 25ab8e17..00d54ec0 100644 --- a/essentials/v2/bring-your-own-graph.mdx +++ b/essentials/v2/bring-your-own-graph.mdx @@ -1,17 +1,9 @@ --- -title: "Bring Your Own Graph (BYOG)" -description: "Read and write your own graph in HydraDB with Cypher, or attach your own entities and relations at ingest." +title: "Bring Your Own Graph" +description: "Complete guide to build a graph from scratch in Cypher. Considering switching to HydraDB from a different graph store? Read this guide." --- -Bring Your Own Graph (BYOG) lets you use Cypher to read and write data in -[HydraDB's core graph database](https://github.com/hydra-db/hydradb), which -HydraDB hosts and scales in its cloud. - -If you are moving from an existing graph database, start at -[Migrate from Neo4j or another Cypher-compatible database](#migrate-from-neo4j-or-another-cypher-compatible-database). -To bring your own entities and relations without writing Cypher, attach -them to a source at ingest: see -[Use BYOG without Cypher](#use-byog-without-cypher). +If you are moving from an existing graph database, start at [Migrate from Neo4j or another Cypher-compatible database](#migrate-from-neo4j-or-another-cypher-compatible-database). To bring your own entities and relations without writing Cypher, attach them to a source at ingest: see section [Use BYOG without Cypher](#use-byog-without-cypher). ## Quickstart @@ -21,7 +13,7 @@ Create a database, write two nodes, and read them back: BASE=https://api.hydradb.com KEY="your-api-key" -# 1. Create a database (ready immediately) +# 1. Create a database (check the returned status before querying) curl -X POST "$BASE/byog/databases" \ -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \ -d '{"database": "crm"}' @@ -54,7 +46,7 @@ graph tools (`hydradb_graph_query`, `hydradb_graph_collections`, `hydradb_graph_ Every request needs your HydraDB API key: -``` +```text Authorization: Bearer ``` @@ -66,9 +58,7 @@ do not exist, and `MATCH (n) RETURN n` returns only your own nodes. ### `POST /byog/databases`: create a database -A database groups your collections. Creating a database here makes it ready -immediately; a database created with the standard `POST /databases` can also -hold graph collections. Creating a name that already exists returns `409`. +A database groups your collections. Check the returned `status`: `ready` means you can query it now; `provisioning` means you need to wait for [Database Status](/api-reference/v2/endpoint/database-status) to report readiness. A database created with the standard `POST /databases` can also hold graph collections. Creating a name that already exists returns `409`. ```bash Request @@ -760,8 +750,7 @@ print(g.query("MATCH (p:Person) RETURN count(p) AS people")) To use your own entities and relations for a source instead of the ones HydraDB extracts, pass a `graph_payload` on [`POST /context/ingest`](/api-reference/v2/endpoint/ingest-context). It is a -JSON map keyed by source ID (a `document_metadata` `id`, an `app_knowledge` -`id`, or a memory `id`): +JSON map keyed by source ID (a `document_metadata` `id` or a memory `id`): ```bash curl -X POST 'https://api.hydradb.com/context/ingest' \ diff --git a/essentials/v2/byog-overview.mdx b/essentials/v2/byog-overview.mdx new file mode 100644 index 00000000..b5e149ea --- /dev/null +++ b/essentials/v2/byog-overview.mdx @@ -0,0 +1,118 @@ +--- +title: "Bring Your Own Graph (BYOG): Cypher Graph Database API" +sidebarTitle: "Bring Your Own Graph" +description: "Run openCypher queries on HydraDB or attach your own entities and relations at ingest. Migrate from Neo4j or Memgraph with a few API calls." +keywords: ["bring your own graph", "BYOG", "openCypher API", "Cypher graph database", "migrate from Neo4j", "Memgraph migration", "knowledge graph for AI agents", "graph_payload", "HydraDB"] +"og:title": "Bring Your Own Graph (BYOG) | HydraDB Docs" +"og:description": "Use your own graph in HydraDB: write openCypher directly or attach entities and relations at ingest. Includes Neo4j migration." +--- + +**Bring Your Own Graph (BYOG)** lets you use your own entities and relations in HydraDB instead of relying only on what HydraDB extracts. You can write **openCypher** queries against an isolated graph, or attach a graph to your ingested sources with no Cypher at all. + +This page is an overview of how BYOG works. For the complete guide with every endpoint, example query, response format, and error code, head over to the [BYOG API reference](/essentials/v2/bring-your-own-graph). + +## Two ways to bring your own graph + + + + Run openCypher over a REST API. Best for modeling data yourself or migrating from Neo4j or Memgraph. + + + Pass a `graph_payload` to `/context/ingest`. Best for adding known entities and relations to documents and memories. + + + +## Core concepts + +- **Database:** the top-level container for your graph collections, visible only to your organization. +- **Collection:** an isolated graph inside a database. Each query runs against one collection and cannot see another. Collections are created on first write. +- **Your own keys:** internal node `id`s can be reused after deletes and don't survive export or import. Key your data on a property you own, such as `ext_id`, and `MERGE` on it. +- **Parameters:** pass data through `params`, never by building it into the query string. + +## Quickstart: create a graph with Cypher + +```bash +# 1. Create a database +curl -X POST "https://api.hydradb.com/byog/databases" \ + -H "Authorization: Bearer $HYDRADB_API_KEY" -H "API-Version: 2" -H "Content-Type: application/json" \ + -d '{"database": "crm"}' + +# 2. Write nodes (the collection is created on first write) +curl -X POST "https://api.hydradb.com/byog/query" \ + -H "Authorization: Bearer $HYDRADB_API_KEY" -H "API-Version: 2" -H "Content-Type: application/json" \ + -d '{ + "database": "crm", + "collection": "contacts", + "query": "UNWIND $rows AS row MERGE (p:Person {ext_id: row.ext_id}) SET p += row RETURN count(p) AS written", + "params": {"rows": [{"ext_id": "u1", "name": "Alice"}, {"ext_id": "u2", "name": "Bob"}]} + }' +``` + +Rows come back in `data`, one object per row, keyed by your `RETURN` aliases. Always alias the columns you read. + + +Check the `status` returned when you create a database. `ready` means you can query immediately. `provisioning` means you should wait for [Database Status](/api-reference/v2/endpoint/database-status) to report readiness. + + +## Supported Cypher and dialect differences + +HydraDB supports all of openCypher except server-side procedures (`CALL db.*`, `CALL apoc.*`) and `LOAD CSV`. Send data through `params` instead. + +- **Existence checks** use bare pattern predicates: `WHERE (p)-[:KNOWS]->()`. The `EXISTS { }` block is not accepted. +- **`shortestPath`** goes in a `RETURN` or `WITH` clause, and the traversal must be directed. + +## Add a knowledge graph without Cypher + +To replace extraction with your own entities and relations for a source, pass `graph_payload` to [`POST /context/ingest`](/api-reference/v2/endpoint/ingest-context), keyed by source ID: + +```json +{ + "billing-policy-doc": { + "entities": { + "alice": { "name": "Alice Carter", "type": "PERSON", "namespace": "employees" }, + "billing": { "name": "Billing Policy", "type": "POLICY", "namespace": "policies" } + }, + "relations": [ + { "source": "alice", "target": "billing", "predicate": "OWNS" } + ] + } +} +``` + +HydraDB skips extraction for that source (it's still chunked and embedded). Your relations appear in `/query` `graph_context` tagged `origin: "byog"`, and the payload persists across re-ingests. + +## Migrate from Neo4j or Memgraph + +Most application Cypher ports directly. Migrate one collection at a time: load nodes first, then relationships matched on your own key, then compare counts. See the [full Neo4j migration script](/essentials/v2/bring-your-own-graph#migrate-from-neo4j-or-another-cypher-compatible-database). + +## Limits + +Request bodies are capped at 256 KiB. Reads time out at 8 s and writes at 30 s. Result sets beyond the deployment cap are silently truncated, so paginate large reads with `ORDER BY`, `SKIP` and `LIMIT`. Index any property you filter on. + +## FAQ + + + + BYOG lets you supply your own graph to HydraDB, either by querying it with openCypher or by attaching entities and relations to sources at ingest. + + + Yes. HydraDB supports openCypher over a REST API, except procedure calls and `LOAD CSV`. + + + Yes. Export nodes and relationships, then replay them into a collection using `MERGE` on your own key. + + + Yes. Agents can run the same Cypher through the [HydraDB MCP](/plugins/mcp) graph tools. + + + +## Next steps + + + + Endpoints, common Cypher queries, response format, and error codes. + + + Full `graph_payload` field reference. + + diff --git a/essentials/v2/connector-providers.mdx b/essentials/v2/connector-providers.mdx new file mode 100644 index 00000000..e003ed65 --- /dev/null +++ b/essentials/v2/connector-providers.mdx @@ -0,0 +1,171 @@ +--- +title: "Connector catalog" +sidebarTitle: "Catalog" +description: "Every app HydraDB can sync, grouped by what it is for." +--- + +Pick an app to see what it syncs and what it needs. The setup steps every connector shares are in the [connectors guide](/essentials/v2/connectors). + +## Messaging & email + + + + + + + + + + } href="/essentials/v2/connectors/twitter" horizontal /> + + +## Tickets & project management + + + + + + + + } href="/essentials/v2/connectors/smartsheet" horizontal /> + + + + +## Docs & cloud storage + + + + } href="/essentials/v2/connectors/notion" horizontal /> + + + + + + } href="/essentials/v2/connectors/guru" horizontal /> + + + + + +## Meetings & calendar + + + + + + + + + + + +## Engineering + + + } href="/essentials/v2/connectors/github" horizontal /> + + } href="/essentials/v2/connectors/sentry" horizontal /> + } href="/essentials/v2/connectors/datadog" horizontal /> + + + } href="/essentials/v2/connectors/launchdarkly" horizontal /> + + + +## Marketing & analytics + + + + + + + + + } href="/essentials/v2/connectors/klaviyo" horizontal /> + } href="/essentials/v2/connectors/pardot" horizontal /> + } href="/essentials/v2/connectors/typeform" horizontal /> + + + +## HR & finance + + + + + + } href="/essentials/v2/connectors/recurly" horizontal /> + + + } href="/essentials/v2/connectors/lever" horizontal /> + + +## CRM & support + + + + } href="/essentials/v2/connectors/zendesk" horizontal /> + + } href="/essentials/v2/connectors/gong" horizontal /> + } href="/essentials/v2/connectors/pipedrive" horizontal /> + + + } href="/essentials/v2/connectors/attio" horizontal /> + + + } href="/essentials/v2/connectors/copper" horizontal /> + + +## How to read a connector page + +Every page has the same sections, in this order: + +- **Permissions:** whether the app's own permissions decide who can read an item. +- **Before you connect:** the credentials and steps the app needs. +- **Keeping in sync:** how history, edits and deletions arrive. +- **What gets synced:** what one document is, and each attribute HydraDB keeps. +- **How it fits into the graph:** the class of each item and the connections it gets. +- **Not synced:** what does not come across. + +### Attribute labels + + + +- **Searchable text:** part of the text a query matches. +- **Query filter:** a key you can filter a query on, typed exactly as shown. +- **Result date:** the date shown for the result. HydraDB uses it, among other signals, when it ranks results by date. +- **Graph connection:** links the item to another item in the knowledge graph. +- **Graph identity:** names a person or group, and the graph attaches the item to them. +- **Access rule:** decides who can read the item. +- **Stored only:** kept on the item and shown when you inspect it. A query does not match it and cannot filter on it. + +An attribute without the Searchable text label says so in its description. + + + +### Graph classes + + + +Similar items from different apps share a class. Each connector page says which details its items carry. + +- **Email:** an email message, with its sender, recipients, subject and thread. +- **Message:** a chat or conversation message, with its author and thread. +- **Ticket:** an issue, task or support ticket, with its workflow and ownership details. +- **Page:** a page, article or other document-style content. +- **Contact:** a person or organization record. +- **Comment:** a comment that belongs to another item or thread. +- **Meeting:** a meeting or calendar event. +- **Record:** a record that fits none of the other classes. +- **Container:** a project, channel, folder or space that holds other items. +- **Iteration:** a sprint, cycle or release with dates, a state and a goal. + +HydraDB also finds people, organizations, projects and other named things in the text of every item. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + + + +## Related + +- [Connectors](/essentials/v2/connectors): shared setup and sync workflow +- [Several accounts from one provider](/essentials/v2/connectors#6-connect-several-accounts-from-one-provider): keep two accounts of the same app apart +- [List connector providers](/api-reference/v2/endpoint/list-connector-providers): availability and credential fields for your deployment diff --git a/essentials/v2/connectors-2.mdx b/essentials/v2/connectors-2.mdx new file mode 100644 index 00000000..da6b3d93 --- /dev/null +++ b/essentials/v2/connectors-2.mdx @@ -0,0 +1,662 @@ +--- +title: "Connectors (copy)" +description: "Connect Slack, GitHub, Notion, or any of 70 apps, and HydraDB keeps their data synced into your database." +--- + +HydraDB syncs data from 70 apps into your database without ingestion code on your side. You connect an account once, choose which resources (channels, repositories, pages) to sync, and HydraDB keeps them indexed as searchable [app sources](/essentials/v2/context#send-app-sources). The catalog includes Slack, Gmail, Google Drive, Notion, Jira, Confluence, GitHub, Linear, HubSpot, Zendesk, Supabase, Microsoft Teams, Outlook, Zoom, Gong, and Fireflies. It grows often; call [`GET /connectors/providers`](/api-reference/v2/endpoint/list-connector-providers) for the current list. + +If an app is not in the catalog, or you already have your own integration, ingest its data yourself as [app sources](/essentials/v2/context#send-app-sources). + + + +## 1. Set up a connector + +Setting up a connector takes four calls, made once. The example connects one Slack workspace; every provider uses the same calls, and only the credentials and resource types change. Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript examples. + +### Step 1: Pick a provider + +[`GET /connectors/providers`](/api-reference/v2/endpoint/list-connector-providers) returns the catalog; use an entry's `provider` value in the next call. With `?id={provider}`, it describes one provider, including `credential_schema`, the credentials it needs. + + + + + ```python Python SDK + catalog = client.list_providers() + slack = client.list_providers(id="slack") + ``` + + ```typescript TypeScript SDK + const catalog = await client.listProviders(); + const slack = await client.listProviders({ id: "slack" }); + ``` + + ```bash cURL + curl 'https://api.hydradb.com/connectors/providers' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" + + curl 'https://api.hydradb.com/connectors/providers?id=slack' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" + ``` + + + + A catalog entry looks like this: + + ```json + { + "providers": [ + { + "provider": "slack", + "category": "Communication", + "supported": true, + "webhook_support": false, + "rank": 2 + } + ] + } + ``` + + `webhook_support` is `true` for providers whose data arrives by webhook instead of scheduled syncs, such as Supabase. + + +### Step 2: Create the connector + +[`POST /connectors`](/api-reference/v2/endpoint/create-connector) stores the credentials for one provider account and says which database and collection the synced data goes to. Nothing syncs yet. + + + + + ```python Python SDK + connector = client.connectors.create( + provider="slack", + name="acme-engineering", + database="acme_corp", + collection="company_docs", + provider_account_scope="T12345ACME", + credentials={"access_token": "xoxp-..."}, + ) + connector_id = connector.connector_id + ``` + + ```typescript TypeScript SDK + const connector = await client.connectors.create({ + provider: "slack", + name: "acme-engineering", + database: "acme_corp", + collection: "company_docs", + providerAccountScope: "T12345ACME", + credentials: { access_token: "xoxp-..." }, + }); + const connectorId = connector.connectorId!; + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/connectors' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "provider": "slack", + "name": "acme-engineering", + "database": "acme_corp", + "collection": "company_docs", + "provider_account_scope": "T12345ACME", + "credentials": { "access_token": "xoxp-..." } + }' + ``` + + + + The response returns the new connector: + + ```json + { + "connector_id": "{connector_id}", + "provider": "slack", + "name": "acme-engineering", + "database": "acme_corp", + "collection": "company_docs", + "provider_account_scope": "T12345ACME", + "lifecycle": "pending_setup", + "sync_status": "idle", + "sync_interval_seconds": 3600, + "message": "Connector created. Configure resources to start syncing; the first scheduled sync runs in about 5 minutes." + } + ``` + + Keep `connector_id`: every later call uses it. + + +### Step 3: Discover what the credentials can reach + +[`GET /connectors/{id}/discover`](/api-reference/v2/endpoint/discover-connector-resources) asks Slack which channels the token can see; for GitHub it returns repositories, and for Notion it returns pages and databases. Each entry has an `id`, a `name`, and a `resource_type`, which you pass to the next call. Providers that sync a whole account return one entry with `id` `all`. + + + + + ```python Python SDK + found = client.connectors.discover(connector_id) + for resource in found.resources: + print(resource.id, resource.name, resource.resource_type) + ``` + + ```typescript TypeScript SDK + const found = await client.connectors.discover({ id: connectorId }); + for (const resource of found.resources ?? []) { + console.log(resource.id, resource.name, resource.resourceType); + } + ``` + + ```bash cURL + curl 'https://api.hydradb.com/connectors/{id}/discover' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" + ``` + + + + ```json + { + "provider": "slack", + "resources": [ + { "id": "C_GENERAL", "name": "general", "resource_type": "channel" }, + { "id": "C_ENG", "name": "engineering", "resource_type": "channel" } + ] + } + ``` + + For providers with many resources, page with `limit` (1 to 100) and `cursor`, and keep going while `has_more` is `true`. + + +### Step 4: Configure the resources to sync + +[`POST /connectors/{id}/configure`](/api-reference/v2/endpoint/configure-connector) activates the resources you choose and starts the first sync right away. The example keeps both channels in the connector's collection and tags each with a `department`, so one query searches both and a filter can narrow to one. + + + + + ```python Python SDK + result = client.connectors.configure( + connector_id, + lookback_days=30, + resources=[ + { + "resource_id": "C_GENERAL", + "resource_type": "channel", + "name": "general", + "metadata": {"department": "all-hands"}, + "additional_metadata": {"internal_label": "general-slack"}, + }, + { + "resource_id": "C_ENG", + "resource_type": "channel", + "name": "engineering", + "metadata": {"department": "engineering"}, + }, + ], + ) + print(result.configured) + ``` + + ```typescript TypeScript SDK + const result = await client.connectors.configure({ + id: connectorId, + lookbackDays: 30, + resources: [ + { + resourceId: "C_GENERAL", + resourceType: "channel", + name: "general", + metadata: { department: "all-hands" }, + additionalMetadata: { internal_label: "general-slack" }, + }, + { + resourceId: "C_ENG", + resourceType: "channel", + name: "engineering", + metadata: { department: "engineering" }, + }, + ], + }); + console.log(result.configured); + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/connectors/{id}/configure' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "lookback_days": 30, + "resources": [ + { + "resource_id": "C_GENERAL", + "resource_type": "channel", + "name": "general", + "metadata": { "department": "all-hands" }, + "additional_metadata": { "internal_label": "general-slack" } + }, + { + "resource_id": "C_ENG", + "resource_type": "channel", + "name": "engineering", + "metadata": { "department": "engineering" } + } + ] + }' + ``` + + + + ```json + { + "connector_id": "{connector_id}", + "configured": 2, + "backfill": false, + "first_sync_at": "2026-06-01T13:00:00Z", + "message": "First sync is running. Data usually appears within a few minutes; the connector reports lifecycle 'ingesting' until data has synced." + } + ``` + + `configured` is the number of resources saved. A `warnings` list names resources that were saved but returned no records when HydraDB tested them; they stay configured and index nothing until they have data. + + +### What each property means + +| Property | Call | What it is | +| --- | --- | --- | +| `provider` | create | A `provider` value from the catalog, such as `slack`, `github`, or `notion`. | +| `name` | create | A label for this connector. Optional, and it cannot be changed later. | +| `database`, `collection` | create | Where synced data goes. `database` must already exist. Each resource can route somewhere else with its own `collection` or `database`. | +| `provider_account_scope` | create | Which external account this connector belongs to, such as a Slack workspace id. It is part of the deduplication key of every synced source, so sources from two accounts never overwrite each other. [Set it per provider](#set-the-account-scope-per-provider). | +| `credentials` | create | The provider's credentials, in the shape of its `credential_schema`. Credentials that do not match the schema are rejected with `422`. | +| `custom_instructions` | create, configure | Guidance for how synced documents are interpreted, for the whole connector or for one resource. See [section 4](#4-custom-ingestion-instructions). | +| `sync_interval_seconds` | create | How often scheduled syncs run. Omit it for the provider default, one hour for most providers. | +| `enforce_acl` | create, update | Whether reads from this connector always enforce ACL for the authenticated caller. Optional and `false` by default. Only workspace owners and writers can set it, and enabling it requires a provider with `acl_supported`. See [ACL enforcement](#enforce-acl). | +| `lookback_days` | configure | How much history the first sync fetches (default `30`). After that, each sync fetches only what is new. Above 30, some providers fetch the older history in the background and the response reports `backfill: true`. | +| `resource_id`, `resource_type`, `name` | configure | The `id`, `resource_type`, and `name` of an entry from discover. Send all three every time you list a resource. | +| `metadata` | configure | Fields merged into the database metadata of every source from this resource. Declare the ones you filter on in your database's [metadata schema](/essentials/v2/metadata). | +| `additional_metadata` | configure | Free-form fields merged into the additional metadata of every source from this resource. No schema needed. | +| `acl` | configure | Your own rule for who can read this resource's sources. Omitted means unrestricted. See [Set your own rule on a resource](#set-your-own-rule-on-a-resource). | + + + +### Set the account scope per provider + +- **Slack:** the workspace id, which starts with `T`. Open Slack in a browser: it is the `T...` segment of `app.slack.com/client/T.../`. +- **GitHub:** the organization or user login from your GitHub URL, as in `github.com/my-github-org`. +- **Linear:** the workspace name shown in Settings, under Workspace. +- **Notion:** the workspace name shown at the top of Settings, under Workspace. +- **Gmail:** leave it empty. To scope queries to one mailbox, filter on `account_email` in `additional_metadata` instead. + + + +### Linear workspace documents + +Linear documents do not belong to one team or project, so they sync as one always-present resource. Discovery returns it alongside the teams and projects, and you configure it like any other resource. Each document is indexed as a `knowledge_base` app source. Its Markdown body is searchable, and files uploaded to it (hosted on `uploads.linear.app`) are downloaded, parsed, and indexed too. Links to external URLs are kept as metadata, not fetched. + + + + + ```json Discover entry + { + "id": "linear_workspace", + "name": "Workspace Documents", + "resource_type": "linear_workspace" + } + ``` + + ```json Configure entry + { + "resource_id": "linear_workspace", + "resource_type": "linear_workspace", + "name": "Workspace Documents" + } + ``` + + + + The documents go to the connector's collection; add `collection` to route them elsewhere. In the dashboard, tick "Workspace Documents" in the resource list, the same way you tick a team or project. + + +## 2. Check that it is syncing + +Data usually appears within a few minutes of configure. [`GET /connectors/{id}/status`](/api-reference/v2/endpoint/get-connector-status) reports the connector and each resource in one call. + + + + + ```python Python SDK + status = client.connectors.status(connector_id) + print(status.status, status.lifecycle) + ``` + + ```typescript TypeScript SDK + const status = await client.connectors.status({ id: connectorId }); + console.log(status.status, status.lifecycle); + ``` + + ```bash cURL + curl 'https://api.hydradb.com/connectors/{id}/status' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" + ``` + + + + +`status` is the overall health, such as `healthy`, `degraded`, or `failed`, and `lifecycle` is what the connector is doing: `ingesting` until the first sync lands data, then `active`. Each resource reports its own result, with an `action` when it failed. [Get Connector Status](/api-reference/v2/endpoint/get-connector-status) explains every value. + +From then on, HydraDB syncs every active resource every `sync_interval_seconds` (one hour by default). Each sync fetches only what changed since the resource's saved position (its cursor) and ingests it as app sources. Call [`POST /connectors/{id}/sync`](/api-reference/v2/endpoint/sync-connector) when you need data sooner; a `202` means the sync was started, not that it finished. + +Once `lifecycle` is `active`, query the data with [`POST /query`](/api-reference/v2/endpoint/query) like any other knowledge. [Section 5](#5-filter-on-what-hydradb-writes) shows how to scope a query to one connector or one channel. + + + +## 3. Change a connector after setup + +Use the call that matches what you want to change. The update calls change only the fields you send. + +- **One resource's instructions or ACL:** [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource), `PATCH /connectors/{id}/resources/{resource_id}`. +- **The connector's instructions, sync interval, or credentials:** [Update Connector](/api-reference/v2/endpoint/update-connector), `PATCH /connectors/{id}`. Sending `credentials` reconnects the connector after a token expired or was revoked; it keeps its id, resources, and sync positions. +- **Which resources sync, and their collection or metadata:** call [Configure Connector](/api-reference/v2/endpoint/configure-connector) again. Resources you leave out are not touched. For each resource you list, send `name` and `resource_type` again, because omitted values are cleared. Its sync position, instructions, and ACL are kept. +- **Stop syncing a resource:** [Delete Connector Resource](/api-reference/v2/endpoint/delete-connector-resource). +- **Stop syncing for a while:** [Pause Connector](/api-reference/v2/endpoint/pause-connector), then [Resume Connector](/api-reference/v2/endpoint/resume-connector). Each resource resumes from its saved position, so nothing created in the meantime is skipped. +- **Remove the connector:** [Delete Connector](/api-reference/v2/endpoint/delete-connector). + + + `POST /connectors/{id}/resources` adds new resources only. On a `resource_id` that already exists, it returns `409` and changes nothing. To edit a resource, use configure or `PATCH /connectors/{id}/resources/{resource_id}`. + + + + +## 4. Custom ingestion instructions + +A custom ingestion instruction is free text that a connector reads at sync time and includes when it extracts entities and relationships from every document it syncs. Use one to explain what the documents do not spell out: a product rename, what a channel is for, or what an internal term means. + +Suppose your product was renamed from _Aurora_ to _Nimbus_. Years of Slack threads and Confluence pages mention only the old name, so a search for "Nimbus" misses them. One instruction on the connector fixes that at ingestion time, with no reconnection. + + + + + ```python Python SDK + client.connectors.update( + connector_id, + custom_instructions=( + "Aurora was renamed to Nimbus in January 2025; they are the same product. " + "Index all Aurora content under the canonical name Nimbus and record Aurora as a former name." + ), + ) + ``` + + ```typescript TypeScript SDK + await client.connectors.update({ + id: connectorId, + customInstructions: + "Aurora was renamed to Nimbus in January 2025; they are the same product. " + + "Index all Aurora content under the canonical name Nimbus and record Aurora as a former name.", + }); + ``` + + ```bash cURL + curl -X PATCH 'https://api.hydradb.com/connectors/{id}' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "custom_instructions": "Aurora was renamed to Nimbus in January 2025; they are the same product. Index all Aurora content under the canonical name Nimbus and record Aurora as a former name." + }' + ``` + + + + +From the next sync, documents that mention only Aurora are extracted under the Nimbus entity, with alias links to the old name, so new-name queries reach old-name documents through the context graph. The same works for focus ("prioritize decisions, owners, and deadlines; ignore social chatter"), interpretation ("threads in this workspace are incident retros; extract root cause and remediation"), and vocabulary ("SEV1 and SEV2 are incident severities, not product names"). An instruction can also be set when you create the connector, or from the dashboard's **Instructions** button. + +**Connector default and resource override:** an instruction on the connector applies to every resource without one of its own. An instruction on a resource, such as one Slack channel or one Jira project, **replaces** the connector default for that resource's documents rather than adding to it. Set a resource's instruction with `custom_instructions` in configure, or afterwards on its own: + + + + + ```python Python SDK + client.connectors.update_resource_acl( + connector_id, + "C_INCIDENTS", + request={"custom_instructions": "These are incident retros; extract root cause, impact, and owner."}, + ) + + # Clear it, so the channel uses the connector default again. + client.connectors.update_resource_acl( + connector_id, "C_INCIDENTS", request={"custom_instructions": ""} + ) + ``` + + ```typescript TypeScript SDK + await client.connectors.updateResourceAcl({ + id: connectorId, + resourceId: "C_INCIDENTS", + customInstructions: "These are incident retros; extract root cause, impact, and owner.", + }); + + // Clear it, so the channel uses the connector default again. + await client.connectors.updateResourceAcl({ + id: connectorId, + resourceId: "C_INCIDENTS", + customInstructions: "", + }); + ``` + + ```bash cURL + curl -X PATCH 'https://api.hydradb.com/connectors/{id}/resources/C_INCIDENTS' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ "custom_instructions": "These are incident retros; extract root cause, impact, and owner." }' + + # Clear it, so the channel uses the connector default again. + curl -X PATCH 'https://api.hydradb.com/connectors/{id}/resources/C_INCIDENTS' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ "custom_instructions": "" }' + ``` + + + + In TypeScript (SDK 2.1.8 or later), `updateResourceAcl` takes `customInstructions` and `acl` as top-level fields. + + +An empty string clears an instruction; leaving the field out keeps it, so configuring again never strips a tuned resource. [`GET /connectors/{id}`](/api-reference/v2/endpoint/get-connector) returns the connector's instruction, and [`GET /connectors/{id}/resources`](/api-reference/v2/endpoint/connector-resources) returns each resource's, absent when the resource inherits. In the dashboard, the **Instructions** dialog lists both levels, each resource marked **override** or **inherits**. + +Before you write one: + +- **Future syncs only:** documents already indexed are not indexed again; each keeps the instruction it was ingested under. Set instructions before the first sync when you can. +- **Up to 4,000 characters:** longer values are rejected with `400`, and the stored value stays as it was. +- **Cost:** the text goes into the extraction prompt for every synced document, so a long instruction on a busy connector costs on every sync. Say what matters and stop. +- **Be explicit:** "X was renamed to Y; they are the same product; index under Y" works far better than vague guidance. Name the exact terms and keep unrelated rules in separate sentences. +- **Interpretation only:** instructions do not change which documents sync, where they are stored, or who can read them. Use resource selection, collections, and [ACLs](/essentials/v2/query#6-query-on-behalf-of-a-user) for those. + + + + + + + +## 5. Filter on what HydraDB writes + +Every source a connector syncs carries two metadata layers, the same two that [Metadata](/essentials/v2/metadata) describes for all context. + +`metadata` contains fields declared in your database's metadata schema. Filter them with top-level `metadata_filters` keys. HydraDB always writes `connector_id` and `provider` here for every synced source. Your own `metadata` from configure is merged first, so `connector_id` and `provider` win on conflict. + +`additional_metadata` contains free-form fields and needs no schema. HydraDB always writes `connector_id` and `resource_id` here, plus provider-native fields such as a Slack message timestamp, a GitHub issue number, or a Linear identifier. Your own `additional_metadata` from configure is merged first, so provider-generated fields win on conflict. + +This is the layer to filter on to scope a query to one connector, channel, repository, or table: + + + ```json Querying with a metadata filter + { + "database": "acme_corp", + "query": "deployment checklist", + "metadata_filters": { + "additional_metadata": { + "connector_id": "{connector_id}" + } + } + } + ``` + + Filter on `resource_id` the same way to scope to one channel, repository, or table. + + +To see which provider-native fields a connector writes, call [`GET /connectors/providers?id={provider}`](/api-reference/v2/endpoint/list-connector-providers). Its `filterable_fields` each carry the `filter_key` to use in `metadata_filters`. Its `searchable_fields` are combined into each document's searchable text, so you search them together, not one at a time. + +## 6. ACL on synced content + +For supported providers, HydraDB captures the provider's ACL on every sync, so you do not maintain a second access model. Capture and enforcement are separate: the connector's `enforce_acl` setting controls ACL enforcement on reads. [Query](/essentials/v2/query#6-query-on-behalf-of-a-user) explains principals and what a query's `acl` matches. To change a source's ACL, use [Update Source Metadata](/api-reference/v2/endpoint/update-source-metadata). + +`enforce_acl` is `false` by default. Omitting it on create leaves the new connector unenforced, and existing connectors remain unenforced until an owner or writer enables it. While it is `false`, access control is opt-in on each request: send the caller's identity in `acl` to filter content, and a request without `acl` is not filtered by caller identity. This holds for content from a non-enforced connector even when the same request also reads content from an enforced connector. MCP OAuth does not enforce caller identity for a non-enforced connector; send `acl` when that request needs caller filtering. + +### What each provider captures + +| Provider | ACL HydraDB captures | +| --- | --- | +| **Slack** | Public channels are visible workspace-wide; private channels only to their members, resolved to member emails. | +| **Google Drive** | Per-file sharing: user, group, domain, and public grants. ACL-only changes are picked up through the Drive changes feed, even when the file content does not change. | +| **GitHub** | Repository visibility. Private repos additionally capture the collaborator list when every collaborator has a visible public email; otherwise your resource rule governs. | +| **Confluence** | Space-level view ACLs, with groups expanded to member emails, plus per-page view restrictions. | +| **Jira** | Who holds Browse access per project, plus per-issue security levels. | + +Capture is also built for GitLab, Linear, Dropbox, Zendesk, PagerDuty, Typeform, Attio, LaunchDarkly, ServiceNow, Microsoft Teams, and Outlook, and is switched on per provider. The [provider catalog](/api-reference/v2/endpoint/list-connector-providers) reports capture support in `acl_supported` and summarizes it in `acl_description`. Check [Get Connector Status](/api-reference/v2/endpoint/get-connector-status) for an `acl_warning` after the first sync. For any other provider, [set your own rule on the resource](#set-your-own-rule-on-a-resource). + +### Google Drive files shared with a group + +This section applies only to Google Drive. No other connector expands groups this way or reports this check. + +A Drive file shared with a Google Group carries the grant `group:google:`. To let group members read it, HydraDB reads the group's members through the Google Workspace Directory API. That needs a Drive connection made by a Workspace admin with Directory access. + +When you connect Google Drive, HydraDB checks this access once. The connection check reports the result as `google_group_membership_resolves`, and the dashboard shows it as a notice: + +- `true`: group membership can be read. Members of a group can read the files shared with that group. +- `false`: group membership cannot be read. A file shared only through a group keeps its `group:google:` grant, which no caller matches, so the file stays restricted. With ACL enforcement on, group members cannot see it. A request `acl` sees it only if it names the group. The same applies to a group too large to expand. + +To fix `false`, reconnect Google Drive as a Workspace admin with Directory access. + +### Enforce ACL + +Set `enforce_acl` to `true` to make reads from this connector use the authenticated caller's identity against the ACL HydraDB captured. The provider must report `acl_supported: true` in [List Connector Providers](/api-reference/v2/endpoint/list-connector-providers). Set it on [`POST /connectors`](/api-reference/v2/endpoint/create-connector), or enable or change it later with [`PATCH /connectors/{id}`](/api-reference/v2/endpoint/update-connector). In the dashboard, an owner or writer can use the **Enforce ACL** control in the connector settings. A change takes effect on the next content request for already-synced sources and does not require re-ingestion. + +HydraDB decides which providers report `acl_supported`. If it stops reporting it for a provider, that provider's connectors stop enforcing within about a minute and keep their stored `enforce_acl` value. Enforcement resumes when support returns. + +Only workspace owners and writers can set or change `enforce_acl`; readers can view it. The API requires an owner or writer in a signed-in dashboard session: a request authenticated with an API key can create a connector with the default `false` value, but cannot choose or change the setting. + +When enforcement is enabled, HydraDB selects the identity from authentication rather than trusting a caller-supplied `acl`: + +- **API key or pasted-key MCP:** the email of the person who created the key. +- **MCP OAuth:** the signed-in user. +- **Dashboard:** the signed-in user. + +If a content-read request includes `acl`, HydraDB ignores it for content from connectors with enforcement enabled; the `acl` still scopes content from non-enforced connectors. A successful response includes exactly one machine-readable warning for the override in `meta.warnings`: + +```json +{ + "meta": { + "warnings": [ + { + "code": "acl_ignored_by_connector_enforcement", + "message": "This connector enforces ACL, so the request's acl was ignored." + } + ] + } +} +``` + +An API key stays tied to its creator. When a member is removed from the workspace, or leaves it, every API key they created in that workspace is revoked. Re-inviting them does not restore those keys; they create new ones. Another member must use a key created under their own account. + +### Set your own rule on a resource + +Every source synced from a resource inherits the resource's rule. Set it in `acl` at configure time, or afterwards on its own: + + + + + ```python Python SDK + client.connectors.update_resource_acl( + connector_id, "C_LEADERSHIP", request={"acl": ["grace@acme.com"]} + ) + ``` + + ```typescript TypeScript SDK + await client.connectors.updateResourceAcl({ + id: connectorId, + resourceId: "C_LEADERSHIP", + acl: ["grace@acme.com"], + }); + ``` + + ```bash cURL + curl -X PATCH 'https://api.hydradb.com/connectors/{id}/resources/C_LEADERSHIP' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ "acl": ["grace@acme.com"] }' + ``` + + + + +The change applies to already-synced sources on the next query, with no re-sync. A source's own ACL from the provider wins at the next sync. + +If HydraDB cannot read a resource ACL from the provider, [Get Connector Status](/api-reference/v2/endpoint/get-connector-status) reports an `acl_warning` until the next successful read. Your own resource rule still applies; a resource with no rule is readable by everyone. + +### Restore resource permissions + +To remove a source's own ACL and use its connector resource permissions again, send `acl_inherit: true` without `acl` to [Update Source Metadata](/api-reference/v2/endpoint/update-source-metadata). Use the ID of a source synced by a configured connector. Uploads and manually ingested sources have no connector resource to inherit from. + +```bash cURL +curl -X PATCH 'https://api.hydradb.com/context/confluence-page-9f62/metadata' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collection": "engineering", + "acl_inherit": true + }' +``` + +`acl` combined with `acl_inherit: true` is invalid. `acl_inherit: false` or an omitted `acl_inherit` is a no-op and can accompany `acl`. HydraDB rejects inheritance for uploads and sources without connector resource attribution. + + + Inheritance takes effect immediately and can widen access if the resource allows more people than the source's own ACL. The source then follows future permission changes from that resource. Provider-specific source permissions can replace the inherited state on a later sync because ACL writes use last-writer-wins behavior. + + +Deleting a connector resource rule does not widen access on its own. To open a restricted resource, set its ACL to `["__public__"]`. + + + + + +## 7. Connect several accounts of one provider + +One provider can have several connectors: two Slack workspaces, two GitHub organizations, or a personal and a work Gmail. Each is independent, with its own credentials and resources. Give each Slack, GitHub, Linear, or Notion connector a distinct `provider_account_scope`; otherwise sources from two accounts that share an external id overwrite each other in the same database and collection. Gmail has no account scope; tell mailboxes apart with `account_email`. + +All of them can sync into the same collection, so one query searches every account; filter on `connector_id` to narrow to one. If one account's data must never meet the others in a query, set `collection` per resource in [configure](#step-4-configure-the-resources-to-sync). + +## Common mistakes + +- **Editing an existing resource with `POST /connectors/{id}/resources`:** the call returns `409` and changes nothing. Use `PATCH /connectors/{id}/resources/{resource_id}` for instructions and ACLs, or configure again for routing and metadata. +- **Reconfiguring without `name` and `resource_type`:** omitted values are cleared. Send both every time you list a resource. +- **Expecting a resource instruction to add to the connector default:** the resource instruction replaces the connector default. Repeat anything from the default that the resource still needs. +- **Two accounts of one provider with the same `provider_account_scope`:** sources that share an external id overwrite each other. Set a distinct scope per account. +- **Filtering on a provider field as a top-level key:** provider-native fields live in `additional_metadata`. Use the `filter_key` from the provider description. +- **Querying before the first sync has landed:** `lifecycle` reads `ingesting` until then. Wait for `active`, or check `GET /connectors/{id}/status`. + +## Related + +- [Connectors API reference](/api-reference/v2/endpoint/connectors-overview): every endpoint, and which one changes what +- [Context](/essentials/v2/context#send-app-sources): the ingestion model synced sources use, and how to ingest from your own integration +- [Metadata](/essentials/v2/metadata): schema-backed and free-form metadata +- [Databases and Collections](/essentials/v2/databases-and-collections): routing resources to databases and collections +- [Query](/essentials/v2/query): querying connector-synced data diff --git a/essentials/v2/connectors-3.mdx b/essentials/v2/connectors-3.mdx new file mode 100644 index 00000000..5b77bf74 --- /dev/null +++ b/essentials/v2/connectors-3.mdx @@ -0,0 +1,694 @@ +--- +title: "Data Connectors (copy)" +description: "Connect Slack, GitHub, Notion, or any of the 70+ apps with RBAC aware indexing pipelines. HydraDB keeps app data synced into your database." +--- + +HydraDB syncs data from 70 apps into your database without ingestion code on your side. You connect an account once, choose which resources (channels, repositories, pages) to sync, and HydraDB keeps them indexed as searchable [app sources](/essentials/v2/context#send-app-sources). The catalog includes Slack, Gmail, Google Drive, Notion, Jira, Confluence, GitHub, Linear, HubSpot, Zendesk, Supabase, Microsoft Teams, Outlook, Zoom, Gong, and Fireflies. It grows often; call [`GET /connectors/providers`](/api-reference/v2/endpoint/list-connector-providers) for the current list. + +If an app is not in the catalog, or you already have your own integration, ingest its data yourself as [app sources](/essentials/v2/context#send-app-sources). + + + +## 1. Set up a connector + +Setting up a connector takes four calls, made once. The example connects one Slack workspace; every provider uses the same calls, and only the credentials and resource types change. Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript examples. + +### Step 1: Pick a provider + +[`GET /connectors/providers`](/api-reference/v2/endpoint/list-connector-providers) returns the catalog; use an entry's `provider` value in the next call. With `?id={provider}`, it describes one provider, including `credential_schema`, the credentials it needs. + + + + + ```python Python SDK + catalog = client.list_providers() + slack = client.list_providers(id="slack") + ``` + + ```typescript TypeScript SDK + const catalog = await client.listProviders(); + const slack = await client.listProviders({ id: "slack" }); + ``` + + ```bash cURL + curl 'https://api.hydradb.com/connectors/providers' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" + + curl 'https://api.hydradb.com/connectors/providers?id=slack' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" + ``` + + + + A catalog entry looks like this: + + ```json + { + "providers": [ + { + "provider": "slack", + "category": "Communication", + "supported": true, + "webhook_support": false, + "rank": 2 + } + ] + } + ``` + + `webhook_support` is `true` for providers whose data arrives by webhook instead of scheduled syncs, such as Supabase. + + +### Step 2: Create the connector + +[`POST /connectors`](/api-reference/v2/endpoint/create-connector) stores the credentials for one provider account and says which database and collection the synced data goes to. Nothing syncs yet. + + + + + ```python Python SDK + connector = client.connectors.create( + provider="slack", + name="acme-engineering", + database="acme_corp", + collection="company_docs", + provider_account_scope="T12345ACME", + credentials={"access_token": "xoxp-..."}, + ) + connector_id = connector.connector_id + ``` + + ```typescript TypeScript SDK + const connector = await client.connectors.create({ + provider: "slack", + name: "acme-engineering", + database: "acme_corp", + collection: "company_docs", + providerAccountScope: "T12345ACME", + credentials: { access_token: "xoxp-..." }, + }); + const connectorId = connector.connectorId!; + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/connectors' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "provider": "slack", + "name": "acme-engineering", + "database": "acme_corp", + "collection": "company_docs", + "provider_account_scope": "T12345ACME", + "credentials": { "access_token": "xoxp-..." } + }' + ``` + + + + The response returns the new connector: + + ```json + { + "connector_id": "{connector_id}", + "provider": "slack", + "name": "acme-engineering", + "database": "acme_corp", + "collection": "company_docs", + "provider_account_scope": "T12345ACME", + "lifecycle": "pending_setup", + "sync_status": "idle", + "sync_interval_seconds": 3600, + "message": "Connector created. Configure resources to start syncing; the first scheduled sync runs in about 5 minutes." + } + ``` + + Keep `connector_id`: every later call uses it. + + +### Step 3: Discover what the credentials can reach + +[`GET /connectors/{id}/discover`](/api-reference/v2/endpoint/discover-connector-resources) asks Slack which channels the token can see; for GitHub it returns repositories, and for Notion it returns pages and databases. Each entry has an `id`, a `name`, and a `resource_type`, which you pass to the next call. Providers that sync a whole account return one entry with `id` `all`. + + + + + ```python Python SDK + found = client.connectors.discover(connector_id) + for resource in found.resources: + print(resource.id, resource.name, resource.resource_type) + ``` + + ```typescript TypeScript SDK + const found = await client.connectors.discover({ id: connectorId }); + for (const resource of found.resources ?? []) { + console.log(resource.id, resource.name, resource.resourceType); + } + ``` + + ```bash cURL + curl 'https://api.hydradb.com/connectors/{id}/discover' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" + ``` + + + + ```json + { + "provider": "slack", + "resources": [ + { "id": "C_GENERAL", "name": "general", "resource_type": "channel" }, + { "id": "C_ENG", "name": "engineering", "resource_type": "channel" } + ] + } + ``` + + For providers with many resources, page with `limit` (1 to 100) and `cursor`, and keep going while `has_more` is `true`. + + +### Step 4: Configure the resources to sync + +[`POST /connectors/{id}/configure`](/api-reference/v2/endpoint/configure-connector) activates the resources you choose and starts the first sync right away. The example keeps both channels in the connector's collection and tags each with a `department`, so one query searches both and a filter can narrow to one. + + + + + ```python Python SDK + result = client.connectors.configure( + connector_id, + lookback_days=30, + resources=[ + { + "resource_id": "C_GENERAL", + "resource_type": "channel", + "name": "general", + "metadata": {"department": "all-hands"}, + "additional_metadata": {"internal_label": "general-slack"}, + }, + { + "resource_id": "C_ENG", + "resource_type": "channel", + "name": "engineering", + "metadata": {"department": "engineering"}, + }, + ], + ) + print(result.configured) + ``` + + ```typescript TypeScript SDK + const result = await client.connectors.configure({ + id: connectorId, + lookbackDays: 30, + resources: [ + { + resourceId: "C_GENERAL", + resourceType: "channel", + name: "general", + metadata: { department: "all-hands" }, + additionalMetadata: { internal_label: "general-slack" }, + }, + { + resourceId: "C_ENG", + resourceType: "channel", + name: "engineering", + metadata: { department: "engineering" }, + }, + ], + }); + console.log(result.configured); + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/connectors/{id}/configure' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "lookback_days": 30, + "resources": [ + { + "resource_id": "C_GENERAL", + "resource_type": "channel", + "name": "general", + "metadata": { "department": "all-hands" }, + "additional_metadata": { "internal_label": "general-slack" } + }, + { + "resource_id": "C_ENG", + "resource_type": "channel", + "name": "engineering", + "metadata": { "department": "engineering" } + } + ] + }' + ``` + + + + ```json + { + "connector_id": "{connector_id}", + "configured": 2, + "backfill": false, + "first_sync_at": "2026-06-01T13:00:00Z", + "message": "First sync is running. Data usually appears within a few minutes; the connector reports lifecycle 'ingesting' until data has synced." + } + ``` + + `configured` is the number of resources saved. A `warnings` list names resources that were saved but returned no records when HydraDB tested them; they stay configured and index nothing until they have data. + + +### What each property means + +| Property | Call | What it is | +| --- | --- | --- | +| `provider` | create | A `provider` value from the catalog, such as `slack`, `github`, or `notion`. | +| `name` | create | A label for this connector. Optional, and it cannot be changed later. | +| `database`, `collection` | create | Where synced data goes. `database` must already exist. Each resource can route somewhere else with its own `collection` or `database`. | +| `provider_account_scope` | create | Which external account this connector belongs to, such as a Slack workspace id. It is part of the deduplication key of every synced source, so sources from two accounts never overwrite each other. [Set it per provider](#set-the-account-scope-per-provider). | +| `credentials` | create | The provider's credentials, in the shape of its `credential_schema`. Credentials that do not match the schema are rejected with `422`. | +| `custom_instructions` | create, configure | Guidance for how synced documents are interpreted, for the whole connector or for one resource. See [section 4](#4-custom-ingestion-instructions). | +| `sync_interval_seconds` | create | How often scheduled syncs run. Omit it for the provider default, one hour for most providers. | +| `enforce_acl` | create, update | Whether reads from this connector always enforce ACL for the authenticated caller. Optional and `false` by default. Only workspace owners and writers can set it, and enabling it requires a provider with `acl_supported`. See [ACL enforcement](#enforce-acl). | +| `lookback_days` | configure | How much history the first sync fetches (default `30`). After that, each sync fetches only what is new. Above 30, some providers fetch the older history in the background and the response reports `backfill: true`. | +| `resource_id`, `resource_type`, `name` | configure | The `id`, `resource_type`, and `name` of an entry from discover. Send all three every time you list a resource. | +| `metadata` | configure | Fields merged into the database metadata of every source from this resource. Declare the ones you filter on in your database's [metadata schema](/essentials/v2/metadata). | +| `additional_metadata` | configure | Free-form fields merged into the additional metadata of every source from this resource. No schema needed. | +| `acl` | configure | Your own rule for who can read this resource's sources. Omitted means unrestricted. See [Set your own rule on a resource](#set-your-own-rule-on-a-resource). | + + + +### Set the account scope per provider + +- **Slack:** the workspace id, which starts with `T`. Open Slack in a browser: it is the `T...` segment of `app.slack.com/client/T.../`. +- **GitHub:** the organization or user login from your GitHub URL, as in `github.com/my-github-org`. +- **Linear:** the workspace name shown in Settings, under Workspace. +- **Notion:** the workspace name shown at the top of Settings, under Workspace. +- **Gmail:** leave it empty. To scope queries to one mailbox, filter on `account_email` in `additional_metadata` instead. + + + +### Linear workspace documents + +Linear documents do not belong to one team or project, so they sync as one always-present resource. Discovery returns it alongside the teams and projects, and you configure it like any other resource. Each document is indexed as a `knowledge_base` app source. Its Markdown body is searchable, and files uploaded to it (hosted on `uploads.linear.app`) are downloaded, parsed, and indexed too. Links to external URLs are kept as metadata, not fetched. + + + + + ```json Discover entry + { + "id": "linear_workspace", + "name": "Workspace Documents", + "resource_type": "linear_workspace" + } + ``` + + ```json Configure entry + { + "resource_id": "linear_workspace", + "resource_type": "linear_workspace", + "name": "Workspace Documents" + } + ``` + + + + The documents go to the connector's collection; add `collection` to route them elsewhere. In the dashboard, tick "Workspace Documents" in the resource list, the same way you tick a team or project. + + +## 2. Check that it is syncing + +Data usually appears within a few minutes of configure. [`GET /connectors/{id}/status`](/api-reference/v2/endpoint/get-connector-status) reports the connector and each resource in one call. + + + + + ```python Python SDK + status = client.connectors.status(connector_id) + print(status.status, status.lifecycle) + ``` + + ```typescript TypeScript SDK + const status = await client.connectors.status({ id: connectorId }); + console.log(status.status, status.lifecycle); + ``` + + ```bash cURL + curl 'https://api.hydradb.com/connectors/{id}/status' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" + ``` + + + + +`status` is the overall health, such as `healthy`, `degraded`, or `failed`, and `lifecycle` is what the connector is doing: `ingesting` until the first sync lands data, then `active`. Each resource reports its own result, with an `action` when it failed. [Get Connector Status](/api-reference/v2/endpoint/get-connector-status) explains every value. + +From then on, HydraDB syncs every active resource every `sync_interval_seconds` (one hour by default). Each sync fetches only what changed since the resource's saved position (its cursor) and ingests it as app sources. Call [`POST /connectors/{id}/sync`](/api-reference/v2/endpoint/sync-connector) when you need data sooner; a `202` means the sync was started, not that it finished. + +Once `lifecycle` is `active`, query the data with [`POST /query`](/api-reference/v2/endpoint/query) like any other knowledge. [Section 5](#5-filter-on-what-hydradb-writes) shows how to scope a query to one connector or one channel. + + + +## 3. Change a connector after setup + +Use the call that matches what you want to change. The update calls change only the fields you send. + +- **One resource's instructions or ACL:** [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource), `PATCH /connectors/{id}/resources/{resource_id}`. +- **The connector's instructions, sync interval, or credentials:** [Update Connector](/api-reference/v2/endpoint/update-connector), `PATCH /connectors/{id}`. Sending `credentials` reconnects the connector after a token expired or was revoked; it keeps its id, resources, and sync positions. +- **Which resources sync, and their collection or metadata:** call [Configure Connector](/api-reference/v2/endpoint/configure-connector) again. Resources you leave out are not touched. For each resource you list, send `name` and `resource_type` again, because omitted values are cleared. Its sync position, instructions, and ACL are kept. +- **Stop syncing a resource:** [Delete Connector Resource](/api-reference/v2/endpoint/delete-connector-resource). +- **Stop syncing for a while:** [Pause Connector](/api-reference/v2/endpoint/pause-connector), then [Resume Connector](/api-reference/v2/endpoint/resume-connector). Each resource resumes from its saved position, so nothing created in the meantime is skipped. +- **Remove the connector:** [Delete Connector](/api-reference/v2/endpoint/delete-connector). + + + `POST /connectors/{id}/resources` adds new resources only. On a `resource_id` that already exists, it returns `409` and changes nothing. To edit a resource, use configure or `PATCH /connectors/{id}/resources/{resource_id}`. + + + + +## 4. Custom ingestion instructions + +A custom ingestion instruction is free text that a connector reads at sync time and includes when it extracts entities and relationships from every document it syncs. Use one to explain what the documents do not spell out: a product rename, what a channel is for, or what an internal term means. + +Suppose your product was renamed from _Aurora_ to _Nimbus_. Years of Slack threads and Confluence pages mention only the old name, so a search for "Nimbus" misses them. One instruction on the connector fixes that at ingestion time, with no reconnection. + + + + + ```python Python SDK + client.connectors.update( + connector_id, + custom_instructions=( + "Aurora was renamed to Nimbus in January 2025; they are the same product. " + "Index all Aurora content under the canonical name Nimbus and record Aurora as a former name." + ), + ) + ``` + + ```typescript TypeScript SDK + await client.connectors.update({ + id: connectorId, + customInstructions: + "Aurora was renamed to Nimbus in January 2025; they are the same product. " + + "Index all Aurora content under the canonical name Nimbus and record Aurora as a former name.", + }); + ``` + + ```bash cURL + curl -X PATCH 'https://api.hydradb.com/connectors/{id}' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "custom_instructions": "Aurora was renamed to Nimbus in January 2025; they are the same product. Index all Aurora content under the canonical name Nimbus and record Aurora as a former name." + }' + ``` + + + + +From the next sync, documents that mention only Aurora are extracted under the Nimbus entity, with alias links to the old name, so new-name queries reach old-name documents through the context graph. The same works for focus ("prioritize decisions, owners, and deadlines; ignore social chatter"), interpretation ("threads in this workspace are incident retros; extract root cause and remediation"), and vocabulary ("SEV1 and SEV2 are incident severities, not product names"). An instruction can also be set when you create the connector, or from the dashboard's **Instructions** button. + +**Connector default and resource override:** an instruction on the connector applies to every resource without one of its own. An instruction on a resource, such as one Slack channel or one Jira project, **replaces** the connector default for that resource's documents rather than adding to it. Set a resource's instruction with `custom_instructions` in configure, or afterwards on its own: + + + + + ```python Python SDK + client.connectors.update_resource_acl( + connector_id, + "C_INCIDENTS", + request={"custom_instructions": "These are incident retros; extract root cause, impact, and owner."}, + ) + + # Clear it, so the channel uses the connector default again. + client.connectors.update_resource_acl( + connector_id, "C_INCIDENTS", request={"custom_instructions": ""} + ) + ``` + + ```typescript TypeScript SDK + await client.connectors.updateResourceAcl({ + id: connectorId, + resourceId: "C_INCIDENTS", + customInstructions: "These are incident retros; extract root cause, impact, and owner.", + }); + + // Clear it, so the channel uses the connector default again. + await client.connectors.updateResourceAcl({ + id: connectorId, + resourceId: "C_INCIDENTS", + customInstructions: "", + }); + ``` + + ```bash cURL + curl -X PATCH 'https://api.hydradb.com/connectors/{id}/resources/C_INCIDENTS' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ "custom_instructions": "These are incident retros; extract root cause, impact, and owner." }' + + # Clear it, so the channel uses the connector default again. + curl -X PATCH 'https://api.hydradb.com/connectors/{id}/resources/C_INCIDENTS' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ "custom_instructions": "" }' + ``` + + + + In TypeScript (SDK 2.1.8 or later), `updateResourceAcl` takes `customInstructions` and `acl` as top-level fields. + + +An empty string clears an instruction; leaving the field out keeps it, so configuring again never strips a tuned resource. [`GET /connectors/{id}`](/api-reference/v2/endpoint/get-connector) returns the connector's instruction, and [`GET /connectors/{id}/resources`](/api-reference/v2/endpoint/connector-resources) returns each resource's, absent when the resource inherits. In the dashboard, the **Instructions** dialog lists both levels, each resource marked **override** or **inherits**. + +Before you write one: + +- **Future syncs only:** documents already indexed are not indexed again; each keeps the instruction it was ingested under. Set instructions before the first sync when you can. +- **Up to 4,000 characters:** longer values are rejected with `400`, and the stored value stays as it was. +- **Cost:** the text goes into the extraction prompt for every synced document, so a long instruction on a busy connector costs on every sync. Say what matters and stop. +- **Be explicit:** "X was renamed to Y; they are the same product; index under Y" works far better than vague guidance. Name the exact terms and keep unrelated rules in separate sentences. +- **Interpretation only:** instructions do not change which documents sync, where they are stored, or who can read them. Use resource selection, collections, and [ACLs](/essentials/v2/query#6-query-on-behalf-of-a-user) for those. + + + + + + + +## 5. Filter on what HydraDB writes + +Every source a connector syncs carries two metadata layers, the same two that [Metadata](/essentials/v2/metadata) describes for all context. + +`metadata` contains fields declared in your database's metadata schema. Filter them with top-level `metadata_filters` keys. HydraDB always writes `connector_id` and `provider` here for every synced source. Your own `metadata` from configure is merged first, so `connector_id` and `provider` win on conflict. + +`additional_metadata` contains free-form fields and needs no schema. HydraDB always writes `connector_id` and `resource_id` here, plus provider-native fields such as a Slack message timestamp, a GitHub issue number, or a Linear identifier. Your own `additional_metadata` from configure is merged first, so provider-generated fields win on conflict. + +This is the layer to filter on to scope a query to one connector, channel, repository, or table: + + + ```json Querying with a metadata filter + { + "database": "acme_corp", + "query": "deployment checklist", + "metadata_filters": { + "additional_metadata": { + "connector_id": "{connector_id}" + } + } + } + ``` + + Filter on `resource_id` the same way to scope to one channel, repository, or table. + + +To see which provider-native fields a connector writes, call [`GET /connectors/providers?id={provider}`](/api-reference/v2/endpoint/list-connector-providers). Its `filterable_fields` each carry the `filter_key` to use in `metadata_filters`. Its `searchable_fields` are combined into each document's searchable text, so you search them together, not one at a time. + +## 6. ACL on synced content + +For supported providers, HydraDB captures the provider's ACL on every sync, so you do not maintain a second access model. Capture and enforcement are separate: the connector's `enforce_acl` setting controls ACL enforcement on reads. [Query](/essentials/v2/query#6-query-on-behalf-of-a-user) explains principals and what a query's `acl` matches. To change a source's ACL, use [Update Source Metadata](/api-reference/v2/endpoint/update-source-metadata). + +`enforce_acl` is `false` by default. Omitting it on create leaves the new connector unenforced, and existing connectors remain unenforced until an owner or writer enables it. While it is `false`, access control is opt-in on each request: send the caller's identity in `acl` to filter content, and a request without `acl` is not filtered by caller identity. This holds for content from a non-enforced connector even when the same request also reads content from an enforced connector. MCP OAuth does not enforce caller identity for a non-enforced connector; send `acl` when that request needs caller filtering. + +### What each provider captures + +| Provider | ACL HydraDB captures | +| --- | --- | +| **Slack** | Public channels are visible workspace-wide; private channels only to their members, resolved to member emails. | +| **Google Drive** | Per-file sharing: user, group, domain, and public grants. ACL-only changes are picked up through the Drive changes feed, even when the file content does not change. | +| **GitHub** | Repository visibility. Private repos additionally capture the collaborator list when every collaborator has a visible public email; otherwise your resource rule governs. | +| **Confluence** | Space-level view ACLs, with groups expanded to member emails, plus per-page view restrictions. | +| **Jira** | Who holds Browse access per project, plus per-issue security levels. | + +Capture is also built for GitLab, Linear, Dropbox, Zendesk, PagerDuty, Typeform, Attio, LaunchDarkly, ServiceNow, Microsoft Teams, and Outlook, and is switched on per provider. The [provider catalog](/api-reference/v2/endpoint/list-connector-providers) reports capture support in `acl_supported` and summarizes it in `acl_description`. Check [Get Connector Status](/api-reference/v2/endpoint/get-connector-status) for an `acl_warning` after the first sync. For any other provider, [set your own rule on the resource](#set-your-own-rule-on-a-resource). + +### Google Drive files shared with a group + +This section applies only to Google Drive. No other connector expands groups this way or reports this check. + +A Drive file shared with a Google Group carries the grant `group:google:`. To let group members read it, HydraDB reads the group's members through the Google Workspace Directory API. That needs a Drive connection made by a Workspace admin with Directory access. + +When you connect Google Drive, HydraDB checks this access once. The connection check reports the result as `google_group_membership_resolves`, and the dashboard shows it as a notice: + +- `true`: group membership can be read. Members of a group can read the files shared with that group. +- `false`: group membership cannot be read. A file shared only through a group keeps its `group:google:` grant, which no caller matches, so the file stays restricted. With ACL enforcement on, group members cannot see it. A request `acl` sees it only if it names the group. The same applies to a group too large to expand. + +To fix `false`, reconnect Google Drive as a Workspace admin with Directory access. + +### Enforce ACL + +Set `enforce_acl` to `true` to make reads from this connector use the authenticated caller's identity against the ACL HydraDB captured. The provider must report `acl_supported: true` in [List Connector Providers](/api-reference/v2/endpoint/list-connector-providers). Set it on [`POST /connectors`](/api-reference/v2/endpoint/create-connector), or enable or change it later with [`PATCH /connectors/{id}`](/api-reference/v2/endpoint/update-connector). In the dashboard, an owner or writer can use the **Enforce ACL** control in the connector settings. A change takes effect on the next content request for already-synced sources and does not require re-ingestion. + +HydraDB decides which providers report `acl_supported`. If it stops reporting it for a provider, that provider's connectors stop enforcing within about a minute and keep their stored `enforce_acl` value. Enforcement resumes when support returns. + +Only workspace owners and writers can set or change `enforce_acl`; readers can view it. The API requires an owner or writer in a signed-in dashboard session: a request authenticated with an API key can create a connector with the default `false` value, but cannot choose or change the setting. + +When enforcement is enabled, HydraDB selects the identity from authentication rather than trusting a caller-supplied `acl`: + +- **API key or pasted-key MCP:** the email of the person who created the key. +- **MCP OAuth:** the signed-in user. +- **Dashboard:** the signed-in user. + +If a content-read request includes `acl`, HydraDB ignores it for content from connectors with enforcement enabled; the `acl` still scopes content from non-enforced connectors. A successful response includes exactly one machine-readable warning for the override in `meta.warnings`: + +```json +{ + "meta": { + "warnings": [ + { + "code": "acl_ignored_by_connector_enforcement", + "message": "This connector enforces ACL, so the request's acl was ignored." + } + ] + } +} +``` + +An API key stays tied to its creator. When a member is removed from the workspace, or leaves it, every API key they created in that workspace is revoked. Re-inviting them does not restore those keys; they create new ones. Another member must use a key created under their own account. + +### Set your own rule on a resource + +Every source synced from a resource inherits the resource's rule. Set it in `acl` at configure time, or afterwards on its own: + + + + + ```python Python SDK + client.connectors.update_resource_acl( + connector_id, "C_LEADERSHIP", request={"acl": ["grace@acme.com"]} + ) + ``` + + ```typescript TypeScript SDK + await client.connectors.updateResourceAcl({ + id: connectorId, + resourceId: "C_LEADERSHIP", + acl: ["grace@acme.com"], + }); + ``` + + ```bash cURL + curl -X PATCH 'https://api.hydradb.com/connectors/{id}/resources/C_LEADERSHIP' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ "acl": ["grace@acme.com"] }' + ``` + + + + +The change applies to already-synced sources on the next query, with no re-sync. A source's own ACL from the provider wins at the next sync. + +If HydraDB cannot read a resource ACL from the provider, [Get Connector Status](/api-reference/v2/endpoint/get-connector-status) reports an `acl_warning` until the next successful read. Your own resource rule still applies; a resource with no rule is readable by everyone. + +### Restore resource permissions + +To remove a source's own ACL and use its connector resource permissions again, send `acl_inherit: true` without `acl` to [Update Source Metadata](/api-reference/v2/endpoint/update-source-metadata). Use the ID of a source synced by a configured connector. Uploads and manually ingested sources have no connector resource to inherit from. + +```bash cURL +curl -X PATCH 'https://api.hydradb.com/context/confluence-page-9f62/metadata' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collection": "engineering", + "acl_inherit": true + }' +``` + +`acl` combined with `acl_inherit: true` is invalid. `acl_inherit: false` or an omitted `acl_inherit` is a no-op and can accompany `acl`. HydraDB rejects inheritance for uploads and sources without connector resource attribution. + + + Inheritance takes effect immediately and can widen access if the resource allows more people than the source's own ACL. The source then follows future permission changes from that resource. Provider-specific source permissions can replace the inherited state on a later sync because ACL writes use last-writer-wins behavior. + + +Deleting a connector resource rule does not widen access on its own. To open a restricted resource, set its ACL to `["__public__"]`. + + + + + +## 7. Connect several accounts of one provider + +One provider can have several connectors: two Slack workspaces, two GitHub organizations, or a personal and a work Gmail. Each is independent, with its own credentials and resources. Give each Slack, GitHub, Linear, or Notion connector a distinct `provider_account_scope`; otherwise sources from two accounts that share an external id overwrite each other in the same database and collection. Gmail has no account scope; tell mailboxes apart with `account_email`. + +All of them can sync into the same collection, so one query searches every account; filter on `connector_id` to narrow to one. If one account's data must never meet the others in a query, set `collection` per resource in [configure](#step-4-configure-the-resources-to-sync). + +## Common mistakes + +- **Editing an existing resource with `POST /connectors/{id}/resources`:** the call returns `409` and changes nothing. Use `PATCH /connectors/{id}/resources/{resource_id}` for instructions and ACLs, or configure again for routing and metadata. +- **Reconfiguring without `name` and `resource_type`:** omitted values are cleared. Send both every time you list a resource. +- **Expecting a resource instruction to add to the connector default:** the resource instruction replaces the connector default. Repeat anything from the default that the resource still needs. +- **Two accounts of one provider with the same `provider_account_scope`:** sources that share an external id overwrite each other. Set a distinct scope per account. +- **Filtering on a provider field as a top-level key:** provider-native fields live in `additional_metadata`. Use the `filter_key` from the provider description. +- **Querying before the first sync has landed:** `lifecycle` reads `ingesting` until then. Wait for `active`, or check `GET /connectors/{id}/status`. + +## Related + +- [Connectors API reference](/api-reference/v2/endpoint/connectors-overview): every endpoint, and which one changes what +- [Context](/essentials/v2/context#send-app-sources): the ingestion model synced sources use, and how to ingest from your own integration +- [Metadata](/essentials/v2/metadata): schema-backed and free-form metadata +- [Databases and Collections](/essentials/v2/databases-and-collections): routing resources to databases and collections +- [Query](/essentials/v2/query): querying connector-synced data + +--- + +HydraDB syncs Slack, GitHub, Notion, and [70+ other apps](/api-reference/v2/endpoint/list-connector-providers) into your database as searchable app sources. No ingestion code needed. + +## Set up + +1. **Pick a provider:** `GET /connectors/providers`. Add `?id=slack` to see the credentials it needs. +2. **Create:** `POST /connectors` with credentials, a target database and collection, and `provider_account_scope`. +3. **Discover:** `GET /connectors/{id}/discover` lists the channels, repos, or pages the credentials can reach. +4. **Configure:** `POST /connectors/{id}/configure` with the resources to sync. The first sync starts immediately. + + + ...one end-to-end example... + + +## Change a connector + +| To change | Call | +| --- | --- | +| A resource's instructions or ACL | `PATCH /connectors/{id}/resources/{resource_id}` | +| Instructions, interval, or credentials | `PATCH /connectors/{id}` | +| Which resources sync, routing, metadata | `POST /connectors/{id}/configure` (resend `name` and `resource_type`) | +| Pause or remove | Pause, Resume, or Delete Connector | + +## Custom instructions + +Free text applied when extracting entities from synced documents, for example: "Aurora was renamed to Nimbus; index under Nimbus." + +- A resource instruction **replaces** the connector default. +- Applies to future syncs only. Maximum 4,000 characters. +- An empty string clears it. Omitting the field keeps it. diff --git a/essentials/v2/connectors.mdx b/essentials/v2/connectors.mdx index 29928ffa..c0b4508a 100644 --- a/essentials/v2/connectors.mdx +++ b/essentials/v2/connectors.mdx @@ -1,21 +1,25 @@ --- -title: "Connectors" -description: "Connect Slack, GitHub, Notion, or any of 70 apps, and HydraDB keeps their data synced into your database." +title: "Data Connectors" +description: "Connect Slack, GitHub, Notion, or any of the 70+ apps with RBAC aware indexing pipelines. HydraDB keeps app data synced into your database." --- -HydraDB syncs data from 70 apps into your database without ingestion code on your side. You connect an account once, choose which resources (channels, repositories, pages) to sync, and HydraDB keeps them indexed as searchable [app sources](/essentials/v2/context#send-app-sources). The catalog includes Slack, Gmail, Google Drive, Notion, Jira, Confluence, GitHub, Linear, HubSpot, Zendesk, Supabase, Microsoft Teams, Outlook, Zoom, Gong, and Fireflies. It grows often; call [`GET /connectors/providers`](/api-reference/v2/endpoint/list-connector-providers) for the current list. +Connect an app and choose which resources (channels, repositories, pages, etc) to sync. HydraDB keeps them synced into your database, with zero ingestion infrastructure and management required at your side. Connectors include Slack, Zoom, Supabase, Gmail, and many more. -If an app is not in the catalog, or you already have your own integration, ingest its data yourself as [app sources](/essentials/v2/context#send-app-sources). +## Overview + +You don't have to write or maintain ingestion code, infrastructure or organize data. On every sync, HydraDB parses the source, organizes it into a context graph, and tags it with metadata: the connector, the resource, and provider-native fields for eg a Slack message with timestamp or a GitHub issue number. -## 1. Set up a connector +## Setting up a connector -Setting up a connector takes four calls, made once. The example connects one Slack workspace; every provider uses the same calls, and only the credentials and resource types change. Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript examples. +The steps are the same for every provider; only the credentials and resource types change. Set up your [SDK client](/api-reference/v2/sdks#client-setup) first. ### Step 1: Pick a provider -[`GET /connectors/providers`](/api-reference/v2/endpoint/list-connector-providers) returns the catalog; use an entry's `provider` value in the next call. With `?id={provider}`, it describes one provider, including `credential_schema`, the credentials it needs. +Browse the [connector catalog](/essentials/v2/connector-providers) to see what each connector indexes and any provider-specific setup steps before creating a connection. + +[`GET /connectors/providers`](/api-reference/v2/endpoint/list-connector-providers) lists the providers you can connect. Add `?id={provider}` to see the credentials that provider needs (`credential_schema`). @@ -61,7 +65,7 @@ A catalog entry looks like this: ### Step 2: Create the connector -[`POST /connectors`](/api-reference/v2/endpoint/create-connector) stores the credentials for one provider account and says which database and collection the synced data goes to. Nothing syncs yet. +[`POST /connectors`](/api-reference/v2/endpoint/create-connector) saves the credentials and sets the database and collection the data goes to. Nothing syncs yet. Keep the `connector_id` it returns; every later call uses it. @@ -121,15 +125,13 @@ The response returns the new connector: } ``` -Keep `connector_id`: every later call uses it. - -### Step 3: Discover what the credentials can reach +### Step 3: Discover what you can sync from each connector -[`GET /connectors/{id}/discover`](/api-reference/v2/endpoint/discover-connector-resources) asks Slack which channels the token can see; for GitHub it returns repositories, and for Notion it returns pages and databases. Each entry has an `id`, a `name`, and a `resource_type`, which you pass to the next call. Providers that sync a whole account return one entry with `id` `all`. +[`GET /connectors/{id}/discover`](/api-reference/v2/endpoint/discover-connector-resources) lists the resources the credentials can see, such as channels, repositories, or pages. Each entry has an `id`, `name`, and `resource_type`, which you pass to the next call. If a provider has many resources, page with `limit` (1 to 100) and `cursor`, and keep going while `has_more` is `true`. - + ```python Python SDK @@ -160,13 +162,11 @@ curl 'https://api.hydradb.com/connectors/{id}/discover' \ } ``` -For providers with many resources, page with `limit` (1 to 100) and `cursor`, and keep going while `has_more` is `true`. - ### Step 4: Configure the resources to sync -[`POST /connectors/{id}/configure`](/api-reference/v2/endpoint/configure-connector) activates the resources you choose and starts the first sync right away. The example keeps both channels in the connector's collection and tags each with a `department`, so one query searches both and a filter can narrow to one. +[`POST /connectors/{id}/configure`](/api-reference/v2/endpoint/configure-connector) saves the resources you pick and starts the first sync right away. @@ -255,325 +255,119 @@ curl -X POST 'https://api.hydradb.com/connectors/{id}/configure' \ -### What each property means - -| Property | Call | What it is | -|---|---|---| -| `provider` | create | A `provider` value from the catalog, such as `slack`, `github`, or `notion`. | -| `name` | create | A label for this connector. Optional, and it cannot be changed later. | -| `database`, `collection` | create | Where synced data goes. `database` must already exist. Each resource can route somewhere else with its own `collection` or `database`. | -| `provider_account_scope` | create | Which external account this connector belongs to, such as a Slack workspace id. It is part of the deduplication key of every synced source, so sources from two accounts never overwrite each other. [Set it per provider](#set-the-account-scope-per-provider). | -| `credentials` | create | The provider's credentials, in the shape of its `credential_schema`. Credentials that do not match the schema are rejected with `422`. | -| `custom_instructions` | create, configure | Guidance for how synced documents are interpreted, for the whole connector or for one resource. See [section 4](#4-custom-ingestion-instructions). | -| `sync_interval_seconds` | create | How often scheduled syncs run. Omit it for the provider default, one hour for most providers. | -| `enforce_acl` | create, update | Whether reads from this connector always enforce ACL for the authenticated caller. Optional and `false` by default. Only workspace owners and writers can set it, and enabling it requires a provider with `acl_supported`. See [ACL enforcement](#enforce-acl). | -| `lookback_days` | configure | How much history the first sync fetches (default `30`). After that, each sync fetches only what is new. Above 30, some providers fetch the older history in the background and the response reports `backfill: true`. | -| `resource_id`, `resource_type`, `name` | configure | The `id`, `resource_type`, and `name` of an entry from discover. Send all three every time you list a resource. | -| `metadata` | configure | Fields merged into the database metadata of every source from this resource. Declare the ones you filter on in your database's [metadata schema](/essentials/v2/metadata). | -| `additional_metadata` | configure | Free-form fields merged into the additional metadata of every source from this resource. No schema needed. | -| `acl` | configure | Your own rule for who can read this resource's sources. Omitted means unrestricted. See [Set your own rule on a resource](#set-your-own-rule-on-a-resource). | - - - -### Set the account scope per provider - -- **Slack:** the workspace id, which starts with `T`. Open Slack in a browser: it is the `T...` segment of `app.slack.com/client/T.../`. -- **GitHub:** the organization or user login from your GitHub URL, as in `github.com/my-github-org`. -- **Linear:** the workspace name shown in Settings, under Workspace. -- **Notion:** the workspace name shown at the top of Settings, under Workspace. -- **Gmail:** leave it empty. To scope queries to one mailbox, filter on `account_email` in `additional_metadata` instead. - - - -### Linear workspace documents - -Linear documents do not belong to one team or project, so they sync as one always-present resource. Discovery returns it alongside the teams and projects, and you configure it like any other resource. Each document is indexed as a `knowledge_base` app source. Its Markdown body is searchable, and files uploaded to it (hosted on `uploads.linear.app`) are downloaded, parsed, and indexed too. Links to external URLs are kept as metadata, not fetched. - - - - -```json Discover entry -{ - "id": "linear_workspace", - "name": "Workspace Documents", - "resource_type": "linear_workspace" -} -``` -```json Configure entry -{ - "resource_id": "linear_workspace", - "resource_type": "linear_workspace", - "name": "Workspace Documents" -} -``` - - -The documents go to the connector's collection; add `collection` to route them elsewhere. In the dashboard, tick "Workspace Documents" in the resource list, the same way you tick a team or project. - - - -### Klaviyo audience links - -Klaviyo campaigns link to their configured included and excluded list or segment audiences through `targets` and `excludes`, respectively; these links describe audience configuration, not message delivery. Segments link to lists or segments referenced in their definitions through `related_to`; a reference in a negative rule does not assert positive membership. - -### Sentry project and team links - -Sentry issues link to their project through `part_of` and, when assigned to a team, to that team through `related_to`. Projects link to each owning team through `part_of`. These links use native Sentry project and team IDs, not display names, and are fully resolved only after the target is indexed in the same database and collection. - -Event-to-issue and user-assignee-to-member links are not provided. An event's numeric group ID does not identify the issue's short ID, and a user ID is distinct from an organization member ID. - -## 2. Check that it is syncing +### What does each property mean -Data usually appears within a few minutes of configure. [`GET /connectors/{id}/status`](/api-reference/v2/endpoint/get-connector-status) reports the connector and each resource in one call. - - - - -```python Python SDK -status = client.connectors.status(connector_id) -print(status.status, status.lifecycle) -``` -```typescript TypeScript SDK -const status = await client.connectors.status({ id: connectorId }); -console.log(status.status, status.lifecycle); -``` -```bash cURL -curl 'https://api.hydradb.com/connectors/{id}/status' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" -``` - +| Property | Set in | Meaning | +| --- | --- | --- | +| `provider` | create | Which app, such as `slack`. | +| `provider_account_scope` | create | A stable account identifier supplied by your application. Distinct accounts need distinct values to avoid collisions between matching external IDs in the same destination. The API does not derive or validate the native account identity. See [account scopes](#6-connect-several-accounts-from-one-provider). | +| `credentials` | create | The app's credentials, in the shape of its `credential_schema`. | +| `custom_instructions` | create, configure | How to interpret synced documents. See [section 4](#4-custom-ingestion-instructions). | +| `sync_interval_seconds` | create | How often it syncs. The default is 1 hour for most providers. | +| `enforce_acl` | create, update | Filter reads by the caller's identity. Defaults to `false`; enabling it requires `acl_supported: true`. Only signed-in human workspace owners and writers can supply this field, even `false`. API-key clients must omit it. See [Enforce ACL](#5-acl-native-rbac-awareness). | +| `lookback_days` | configure | How much history the first sync fetches. The default is 30 days. | +| `resource_id`, `resource_type`, `name` | configure | Copied from discover. Send all three every time you list a resource. | +| `acl` | configure | Who can read the ingested resource. By default ACLs are mirrored from the apps. If you omit it, anyone can read. | - + -`status` is the overall health, such as `healthy`, `degraded`, or `failed`, and `lifecycle` is what the connector is doing: `ingesting` until the first sync lands data, then `active`. Each resource reports its own result, with an `action` when it failed. [Get Connector Status](/api-reference/v2/endpoint/get-connector-status) explains every value. +## 2. Syncing -From then on, HydraDB syncs every active resource every `sync_interval_seconds` (one hour by default). Each sync fetches only what changed since the resource's saved position (its cursor) and ingests it as app sources. Call [`POST /connectors/{id}/sync`](/api-reference/v2/endpoint/sync-connector) when you need data sooner; a `202` means the sync was started, not that it finished. +[`GET /connectors/{id}/status`](/api-reference/v2/endpoint/get-connector-status) reports the connector and each resource. `lifecycle` reads as `ingesting` until the first sync ingests data fully, then it says `active`. Query the data once it's `active`. -Once `lifecycle` is `active`, query the data with [`POST /query`](/api-reference/v2/endpoint/query) like any other knowledge. [Section 5](#5-filter-on-what-hydradb-writes) shows how to scope a query to one connector or one channel. +After that, HydraDB syncs every `sync_interval_seconds` (1 hour by default). Call `POST /connectors/{id}/sync` to sync now, or change the interval with `PATCH /connectors/{id}`. -## 3. Change a connector after setup - -Use the call that matches what you want to change. The update calls change only the fields you send. +## 3. Making changes to setup -- **One resource's instructions or ACL:** [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource), `PATCH /connectors/{id}/resources/{resource_id}`. -- **The connector's instructions, sync interval, or credentials:** [Update Connector](/api-reference/v2/endpoint/update-connector), `PATCH /connectors/{id}`. Sending `credentials` reconnects the connector after a token expired or was revoked; it keeps its id, resources, and sync positions. -- **Which resources sync, and their collection or metadata:** call [Configure Connector](/api-reference/v2/endpoint/configure-connector) again. Resources you leave out are not touched. For each resource you list, send `name` and `resource_type` again, because omitted values are cleared. Its sync position, instructions, and ACL are kept. -- **Stop syncing a resource:** [Delete Connector Resource](/api-reference/v2/endpoint/delete-connector-resource). -- **Stop syncing for a while:** [Pause Connector](/api-reference/v2/endpoint/pause-connector), then [Resume Connector](/api-reference/v2/endpoint/resume-connector). Each resource resumes from its saved position, so nothing created in the meantime is skipped. -- **Remove the connector:** [Delete Connector](/api-reference/v2/endpoint/delete-connector). - - - `POST /connectors/{id}/resources` adds new resources only. On a `resource_id` that already exists, it returns `409` and changes nothing. To edit a resource, use configure or `PATCH /connectors/{id}/resources/{resource_id}`. - +| To change | Call | +| --- | --- | +| A resource's ACL rule | [`PATCH /connectors/{id}/resources/{resource_id}`](/api-reference/v2/endpoint/update-connector-resource) | +| Connector custom ingestion instructions, interval, or credentials | [`PATCH /connectors/{id}`](/api-reference/v2/endpoint/update-connector). Sending new credentials reconnects it and keeps its resources. | +| Stop syncing a resource. | [Delete Connector Resource](/api-reference/v2/endpoint/delete-connector-resource). You can also look into [Pause](/api-reference/v2/endpoint/pause-connector) or [Resume](/api-reference/v2/endpoint/resume-connector). Nothing created in the meantime is skipped. | +| Deleting the entire connector | [Delete Connector](/api-reference/v2/endpoint/delete-connector) | ## 4. Custom ingestion instructions -A custom ingestion instruction is free text that a connector reads at sync time and includes when it extracts entities and relationships from every document it syncs. Use one to explain what the documents do not spell out: a product rename, what a channel is for, or what an internal term means. - -Suppose your product was renamed from *Aurora* to *Nimbus*. Years of Slack threads and Confluence pages mention only the old name, so a search for "Nimbus" misses them. One instruction on the connector fixes that at ingestion time, with no reconnection. - - - - -```python Python SDK -client.connectors.update( - connector_id, - custom_instructions=( - "Aurora was renamed to Nimbus in January 2025; they are the same product. " - "Index all Aurora content under the canonical name Nimbus and record Aurora as a former name." - ), -) -``` -```typescript TypeScript SDK -await client.connectors.update({ - id: connectorId, - customInstructions: - "Aurora was renamed to Nimbus in January 2025; they are the same product. " + - "Index all Aurora content under the canonical name Nimbus and record Aurora as a former name.", -}); -``` -```bash cURL -curl -X PATCH 'https://api.hydradb.com/connectors/{id}' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "custom_instructions": "Aurora was renamed to Nimbus in January 2025; they are the same product. Index all Aurora content under the canonical name Nimbus and record Aurora as a former name." - }' -``` - - +Custom instructions tell HydraDB how to read your synced documents and what to look for. They change how documents are interpreted, not what gets ingested. For example: + +- "Aurora was renamed to Nimbus; they are the same product." +- "Customer support Slack threads contain typos and mix up accounts, so be careful when creating relationships." + +**Instructions apply to future syncs only.** Documents that are already indexed keep the instruction they were ingested under. + + + + + ```python Python SDK + client.connectors.update( + connector_id, + custom_instructions=( + "Aurora was renamed to Nimbus in January 2025; they are the same product. " + "Index all Aurora content under the canonical name Nimbus and record Aurora as a former name." + ), + ) + ``` + + ```typescript TypeScript SDK + await client.connectors.update({ + id: connectorId, + customInstructions: + "Aurora was renamed to Nimbus in January 2025; they are the same product. " + + "Index all Aurora content under the canonical name Nimbus and record Aurora as a former name.", + }); + ``` + + ```bash cURL + curl -X PATCH 'https://api.hydradb.com/connectors/{id}' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "custom_instructions": "Aurora was renamed to Nimbus in January 2025; they are the same product. Index all Aurora content under the canonical name Nimbus and record Aurora as a former name." + }' + ``` + + -From the next sync, documents that mention only Aurora are extracted under the Nimbus entity, with alias links to the old name, so new-name queries reach old-name documents through the context graph. The same works for focus ("prioritize decisions, owners, and deadlines; ignore social chatter"), interpretation ("threads in this workspace are incident retros; extract root cause and remediation"), and vocabulary ("SEV1 and SEV2 are incident severities, not product names"). An instruction can also be set when you create the connector, or from the dashboard's **Instructions** button. - -**Connector default and resource override:** an instruction on the connector applies to every resource without one of its own. An instruction on a resource, such as one Slack channel or one Jira project, **replaces** the connector default for that resource's documents rather than adding to it. Set a resource's instruction with `custom_instructions` in configure, or afterwards on its own: - - - - -```python Python SDK -client.connectors.update_resource_acl( - connector_id, - "C_INCIDENTS", - request={"custom_instructions": "These are incident retros; extract root cause, impact, and owner."}, -) - -# Clear it, so the channel uses the connector default again. -client.connectors.update_resource_acl( - connector_id, "C_INCIDENTS", request={"custom_instructions": ""} -) -``` -```typescript TypeScript SDK -await client.connectors.updateResourceAcl({ - id: connectorId, - resourceId: "C_INCIDENTS", - customInstructions: "These are incident retros; extract root cause, impact, and owner.", -}); - -// Clear it, so the channel uses the connector default again. -await client.connectors.updateResourceAcl({ - id: connectorId, - resourceId: "C_INCIDENTS", - customInstructions: "", -}); -``` -```bash cURL -curl -X PATCH 'https://api.hydradb.com/connectors/{id}/resources/C_INCIDENTS' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ "custom_instructions": "These are incident retros; extract root cause, impact, and owner." }' - -# Clear it, so the channel uses the connector default again. -curl -X PATCH 'https://api.hydradb.com/connectors/{id}/resources/C_INCIDENTS' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ "custom_instructions": "" }' -``` - - -In TypeScript (SDK 2.1.8 or later), `updateResourceAcl` takes `customInstructions` and `acl` as top-level fields. - - - -An empty string clears an instruction; leaving the field out keeps it, so configuring again never strips a tuned resource. [`GET /connectors/{id}`](/api-reference/v2/endpoint/get-connector) returns the connector's instruction, and [`GET /connectors/{id}/resources`](/api-reference/v2/endpoint/connector-resources) returns each resource's, absent when the resource inherits. In the dashboard, the **Instructions** dialog lists both levels, each resource marked **override** or **inherits**. - -Before you write one: - -- **Future syncs only:** documents already indexed are not indexed again; each keeps the instruction it was ingested under. Set instructions before the first sync when you can. -- **Up to 4,000 characters:** longer values are rejected with `400`, and the stored value stays as it was. -- **Cost:** the text goes into the extraction prompt for every synced document, so a long instruction on a busy connector costs on every sync. Say what matters and stop. -- **Be explicit:** "X was renamed to Y; they are the same product; index under Y" works far better than vague guidance. Name the exact terms and keep unrelated rules in separate sentences. -- **Interpretation only:** instructions do not change which documents sync, where they are stored, or who can read them. Use resource selection, collections, and [ACLs](/essentials/v2/query#6-query-on-behalf-of-a-user) for those. - -## 5. Filter on what HydraDB writes - -Every source a connector syncs carries two metadata layers, the same two that [Metadata](/essentials/v2/metadata) describes for all context. - -`metadata` contains fields declared in your database's metadata schema. Filter them with top-level `metadata_filters` keys. HydraDB always writes `connector_id` and `provider` here for every synced source. Your own `metadata` from configure is merged first, so `connector_id` and `provider` win on conflict. - -`additional_metadata` contains free-form fields and needs no schema. HydraDB always writes `connector_id` and `resource_id` here, plus provider-native fields such as a Slack message timestamp, a GitHub issue number, or a Linear identifier. Your own `additional_metadata` from configure is merged first, so provider-generated fields win on conflict. +## 5. ACL (native RBAC awareness) -This is the layer to filter on to scope a query to one connector, channel, repository, or table: - - - -```json Querying with a metadata filter -{ - "database": "acme_corp", - "query": "deployment checklist", - "metadata_filters": { - "additional_metadata": { - "connector_id": "{connector_id}" - } - } -} -``` - -Filter on `resource_id` the same way to scope to one channel, repository, or table. - - +Connectors capture provider permissions where the provider supports them. If permissions cannot be resolved, affected content without another valid ACL remains public with a persistent visible status warning. Existing valid private ACLs and revocations remain enforced. -To see which provider-native fields a connector writes, call [`GET /connectors/providers?id={provider}`](/api-reference/v2/endpoint/list-connector-providers). Its `filterable_fields` each carry the `filter_key` to use in `metadata_filters`. Its `searchable_fields` are combined into each document's searchable text, so you search them together, not one at a time. + -## 6. ACL on synced content +`enforce_acl: true` filters reads by the authenticated caller's identity and ignores any request `acl` for this connector's content. -For supported providers, HydraDB captures the provider's ACL on every sync, so you do not maintain a second access model. Capture and enforcement are separate: the connector's `enforce_acl` setting controls ACL enforcement on reads. [Query](/essentials/v2/query#6-query-on-behalf-of-a-user) explains principals and what a query's `acl` matches. To change a source's ACL, use [Update Source Metadata](/api-reference/v2/endpoint/update-source-metadata). +Only a signed-in human workspace owner or writer can supply `enforce_acl` on create or update. API-key clients must omit the field: even `false` invokes the same authorization guard and is rejected. To change the setting, sign in to the dashboard, open the connector's settings, and use **Enforce ACL**. Omission defaults to `false` on creation; enabling it requires a provider reporting `acl_supported: true`. -`enforce_acl` is `false` by default. Omitting it on create leaves the new connector unenforced, and existing connectors remain unenforced until an owner or writer enables it. While it is `false`, access control is opt-in on each request: send the caller's identity in `acl` to filter content, and a request without `acl` is not filtered by caller identity. This holds for content from a non-enforced connector even when the same request also reads content from an enforced connector. MCP OAuth does not enforce caller identity for a non-enforced connector; send `acl` when that request needs caller filtering. +### Examples of what each provider captures -### What each provider captures +- **Slack:** Public channels are visible workspace-wide; private channels only to their members. +- **Google Drive**: Per-file sharing: user, group, domain, and public grants. +- **Confluence:** Space view permissions and per-page restrictions. -| Provider | ACL HydraDB captures | -|---|---| -| **Slack** | Public channels are visible workspace-wide; private channels only to their members, resolved to member emails. | -| **Google Drive** | Per-file sharing: user, group, domain, and public grants. ACL-only changes are picked up through the Drive changes feed, even when the file content does not change. | -| **GitHub** | Repository visibility. Private repos additionally capture the collaborator list when every collaborator has a visible public email; otherwise your resource rule governs. | -| **Confluence** | Space-level view ACLs, with groups expanded to member emails, plus per-page view restrictions. | -| **Jira** | Who holds Browse access per project, plus per-issue security levels. | +and so forth. For other providers, check `acl_supported` in the [provider catalog](/api-reference/v2/endpoint/list-connector-providers). For a provider that does not capture permissions, [set your own rule on the resource](#set-your-own-rule-on-a-resource). -Capture is also built for GitLab, Linear, Dropbox, Zendesk, PagerDuty, Typeform, Attio, LaunchDarkly, ServiceNow, Microsoft Teams, and Outlook, and is switched on per provider. The [provider catalog](/api-reference/v2/endpoint/list-connector-providers) reports capture support in `acl_supported` and summarizes it in `acl_description`. Check [Get Connector Status](/api-reference/v2/endpoint/get-connector-status) for an `acl_warning` after the first sync. For any other provider, [set your own rule on the resource](#set-your-own-rule-on-a-resource). - -### Google Drive files shared with a group - -This section applies only to Google Drive. No other connector expands groups this way or reports this check. - -A Drive file shared with a Google Group carries the grant `group:google:`. To let group members read it, HydraDB reads the group's members through the Google Workspace Directory API. That needs a Drive connection made by a Workspace admin with Directory access. - -When you connect Google Drive, HydraDB checks this access once. The connection check reports the result as `google_group_membership_resolves`, and the dashboard shows it as a notice: - -- `true`: group membership can be read. Members of a group can read the files shared with that group. -- `false`: group membership cannot be read. A file shared only through a group keeps its `group:google:` grant, which no caller matches, so the file stays restricted. With ACL enforcement on, group members cannot see it. A request `acl` sees it only if it names the group. The same applies to a group too large to expand. - -To fix `false`, reconnect Google Drive as a Workspace admin with Directory access. - -### Enforce ACL - -Set `enforce_acl` to `true` to make reads from this connector use the authenticated caller's identity against the ACL HydraDB captured. The provider must report `acl_supported: true` in [List Connector Providers](/api-reference/v2/endpoint/list-connector-providers). Set it on [`POST /connectors`](/api-reference/v2/endpoint/create-connector), or enable or change it later with [`PATCH /connectors/{id}`](/api-reference/v2/endpoint/update-connector). In the dashboard, an owner or writer can use the **Enforce ACL** control in the connector settings. A change takes effect on the next content request for already-synced sources and does not require re-ingestion. - -HydraDB decides which providers report `acl_supported`. If it stops reporting it for a provider, that provider's connectors stop enforcing within about a minute and keep their stored `enforce_acl` value. Enforcement resumes when support returns. - -Only workspace owners and writers can set or change `enforce_acl`; readers can view it. The API requires an owner or writer in a signed-in dashboard session: a request authenticated with an API key can create a connector with the default `false` value, but cannot choose or change the setting. - -When enforcement is enabled, HydraDB selects the identity from authentication rather than trusting a caller-supplied `acl`: - -- **API key or pasted-key MCP:** the email of the person who created the key. -- **MCP OAuth:** the signed-in user. -- **Dashboard:** the signed-in user. - -If a content-read request includes `acl`, HydraDB ignores it for content from connectors with enforcement enabled; the `acl` still scopes content from non-enforced connectors. A successful response includes exactly one machine-readable warning for the override in `meta.warnings`: - -```json -{ - "meta": { - "warnings": [ - { - "code": "acl_ignored_by_connector_enforcement", - "message": "This connector enforces ACL, so the request's acl was ignored." - } - ] - } -} -``` - -An API key stays tied to its creator. When a member is removed from the workspace, or leaves it, every API key they created in that workspace is revoked. Re-inviting them does not restore those keys; they create new ones. Another member must use a key created under their own account. + + While `enforce_acl` is `false` (the default), a request without `acl` is **not** filtered by caller identity. Send identity in `acl`, or ask a signed-in human workspace owner or writer to enable **Enforce ACL** in the dashboard connector settings. Do not send `enforce_acl: false` as an API-key workaround. + ### Set your own rule on a resource -Every source synced from a resource inherits the resource's rule. Set it in `acl` at configure time, or afterwards on its own: +Send `acl` to [`PATCH /connectors/{id}/resources/{resource_id}`](/api-reference/v2/endpoint/update-connector-resource). It applies to already-synced sources on the next query, with no re-sync. + +- A source's own permissions from the provider replace your rule at the next sync. +- A resource with no rule is readable by everyone. - + ```python Python SDK @@ -599,13 +393,13 @@ curl -X PATCH 'https://api.hydradb.com/connectors/{id}/resources/C_LEADERSHIP' \ -The change applies to already-synced sources on the next query, with no re-sync. A source's own ACL from the provider wins at the next sync. - -If HydraDB cannot read a resource ACL from the provider, [Get Connector Status](/api-reference/v2/endpoint/get-connector-status) reports an `acl_warning` until the next successful read. Your own resource rule still applies; a resource with no rule is readable by everyone. - ### Restore resource permissions -To remove a source's own ACL and use its connector resource permissions again, send `acl_inherit: true` without `acl` to [Update Source Metadata](/api-reference/v2/endpoint/update-source-metadata). Use the ID of a source synced by a configured connector. Uploads and manually ingested sources have no connector resource to inherit from. + + This takes effect immediately, and it can widen access if the resource allows more people than the source's own ACL did. + + +Send `acl_inherit: true`, without `acl`, to [Update Source Metadata](/api-reference/v2/endpoint/update-source-metadata). The source goes back to following its resource's rule. ```bash cURL curl -X PATCH 'https://api.hydradb.com/context/confluence-page-9f62/metadata' \ @@ -619,36 +413,91 @@ curl -X PATCH 'https://api.hydradb.com/context/confluence-page-9f62/metadata' \ }' ``` -`acl` combined with `acl_inherit: true` is invalid. `acl_inherit: false` or an omitted `acl_inherit` is a no-op and can accompany `acl`. HydraDB rejects inheritance for uploads and sources without connector resource attribution. - - -Inheritance takes effect immediately and can widen access if the resource allows more people than the source's own ACL. The source then follows future permission changes from that resource. Provider-specific source permissions can replace the inherited state on a later sync because ACL writes use last-writer-wins behavior. - - -Deleting a connector resource rule does not widen access on its own. To open a restricted resource, set its ACL to `["__public__"]`. - -## 7. Connect several accounts of one provider - -One provider can have several connectors: two Slack workspaces, two GitHub organizations, or a personal and a work Gmail. Each is independent, with its own credentials and resources. Give each Slack, GitHub, Linear, or Notion connector a distinct `provider_account_scope`; otherwise sources from two accounts that share an external id overwrite each other in the same database and collection. Gmail has no account scope; tell mailboxes apart with `account_email`. - -All of them can sync into the same collection, so one query searches every account; filter on `connector_id` to narrow to one. If one account's data must never meet the others in a query, set `collection` per resource in [configure](#step-4-configure-the-resources-to-sync). - -## Common mistakes - -- **Editing an existing resource with `POST /connectors/{id}/resources`:** the call returns `409` and changes nothing. Use `PATCH /connectors/{id}/resources/{resource_id}` for instructions and ACLs, or configure again for routing and metadata. -- **Reconfiguring without `name` and `resource_type`:** omitted values are cleared. Send both every time you list a resource. -- **Expecting a resource instruction to add to the connector default:** the resource instruction replaces the connector default. Repeat anything from the default that the resource still needs. -- **Two accounts of one provider with the same `provider_account_scope`:** sources that share an external id overwrite each other. Set a distinct scope per account. -- **Filtering on a provider field as a top-level key:** provider-native fields live in `additional_metadata`. Use the `filter_key` from the provider description. -- **Querying before the first sync has landed:** `lifecycle` reads `ingesting` until then. Wait for `active`, or check `GET /connectors/{id}/status`. - -## Related - -- [Connectors API reference](/api-reference/v2/endpoint/connectors-overview): every endpoint, and which one changes what -- [Context](/essentials/v2/context#send-app-sources): the ingestion model synced sources use, and how to ingest from your own integration -- [Metadata](/essentials/v2/metadata): schema-backed and free-form metadata -- [Databases and Collections](/essentials/v2/databases-and-collections): routing resources to databases and collections -- [Query](/essentials/v2/query): querying connector-synced data +## 6. Connect several accounts from one provider + +Create one connector per account, each with that account's own credentials and resources. A connector does not combine several accounts' credentials. Give distinct accounts of the same scoped provider different `provider_account_scope` values; reusing a scope can cause sources with the same external ID to overwrite each other in a shared destination. + +For Slack, GitHub, Linear, and Notion, choose a stable account, workspace, or organization identifier and keep its mapping to the connector in your application. The API stores the supplied scope; it does not derive or validate the native account identity or reject duplicate scopes. These caller-provided examples illustrate distinct values, not required provider-specific syntax: + +| Provider | Account A example | Account B example | +| --- | --- | --- | +| `slack` | `slack-account-a` | `slack-account-b` | +| `github` | `github-account-a` | `github-account-b` | +| `linear` | `linear-account-a` | `linear-account-b` | +| `notion` | `notion-account-a` | `notion-account-b` | + +Several connectors can write to the same database and collection. Filter on `connector_id` to select one connector/account in a query. Database and collection routing choose where content lands; collection names do not authorize access. Apply the caller's authenticated scope and ACL rules to reads and mutations. + +## Advanced (mostly for agents) + + + + - `filterable_fields` each carry the `filter_key` to use in `metadata_filters`. + - `searchable_fields` are combined into each document's searchable text, so you search them together, not one at a time. + - `acl_supported` and `acl_description` report whether a provider's permissions are captured. Capture is also built for GitLab, Linear, Dropbox, Zendesk, PagerDuty, Typeform, Attio, LaunchDarkly, ServiceNow, Microsoft Teams, and Outlook, and is switched on per provider. + + + + - **Create:** a new connector starts with `lifecycle: pending_setup` and `sync_status: idle`. + - **Discover:** providers that sync a whole account return one entry with `id` `all`. + - **Backfill:** with `lookback_days` above 30, some providers fetch older history in the background and report `backfill: true`. + + + + - **Credentials:** credentials that don't match `credential_schema` are rejected with `422`. + - **Routing:** each resource can route to its own `collection` or `database`. + - **Account scope:** the supplied `provider_account_scope` is part of a synced source's identity. Distinct scopes keep matching external IDs from different accounts separate in the same destination; reusing a scope can cause overwrites. + + + + - **Status:** `status` is the overall health, such as `healthy`, `degraded`, or `failed`. Each resource reports its own result, with an `action` when it failed. See [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). + - **Incremental sync:** each sync fetches only what changed since the resource's saved position (its cursor). + - **Manual sync:** a `202` from `POST /connectors/{id}/sync` means the sync started, not that it finished. + - **Pause and resume:** after a pause, each resource resumes from its saved position. + - **Reconfiguring:** configuring again keeps each resource's sync position, instructions, and ACL. + + + + - **Length limit:** up to 4,000 characters. Longer values are rejected with `400`, and the stored value stays as it was. + - **Cost:** the text goes into the extraction prompt for every synced document, so keep it short. + - **Be explicit:** name the exact terms, and keep unrelated rules in separate sentences. + - **Checking instructions:** `GET /connectors/{id}` returns the connector's instruction. `GET /connectors/{id}/resources` returns each resource's, which is absent when the resource inherits. The dashboard's **Instructions** dialog marks each resource as **override** or **inherits**. + + + + - **`metadata`:** HydraDB writes `connector_id` and `provider` here, and they win over your own fields on conflict. + - **`additional_metadata`:** HydraDB writes `connector_id`, `resource_id`, and provider-native fields here, and provider-generated fields win over yours on conflict. + + + + - **Without enforcement:** while `enforce_acl` is `false`, the request `acl` still scopes this connector's content, even when the same request reads from enforced connectors. MCP OAuth doesn't enforce caller identity for non-enforced connectors. + - **Identity under enforcement:** + - API key or pasted-key MCP: the email of the person who created the key. + - MCP OAuth and the dashboard: the signed-in user. + - **Ignored `acl`:** when a request's `acl` is ignored because of enforcement, the response includes one warning: + ```json + { "meta": { "warnings": [{ "code": "acl_ignored_by_connector_enforcement", "message": "This connector enforces ACL, so the request's acl was ignored." }] } } + ``` + - **Support withdrawn:** if a provider stops reporting `acl_supported`, its connectors stop enforcing within about a minute and keep their stored setting. Enforcement resumes when support returns. + - **API key revocation:** when a member leaves or is removed from the workspace, every API key they created there is revoked. Re-inviting them doesn't restore those keys. + - **Read failures:** if HydraDB can't read a resource's permissions, Get Connector Status reports an `acl_warning` until the next successful read. + - **Opening a resource:** deleting a resource rule doesn't widen access. To open a restricted resource, set its ACL to `["__public__"]`. + - **Inheritance limits:** `acl` combined with `acl_inherit: true` is invalid. Uploads and manually ingested sources can't inherit. Provider permissions can replace inherited state on a later sync, because the last write wins. + + + + All connectors can sync into the same collection, so one query searches every account. If one account's data must never appear alongside the others in a query, set `collection` per resource in configure. + + + + - **Editing a resource with `POST /connectors/{id}/resources`:** it returns `409` and changes nothing. Use `PATCH /connectors/{id}/resources/{resource_id}` instead, or configure again. + - **Configuring again without `name` and `resource_type`:** omitted values are cleared. + - **Expecting a resource instruction to add to the connector default:** it replaces the default. + - **Two accounts with the same** `provider_account_scope`**:** their sources overwrite each other. + - **Filtering a provider field as a top-level key:** provider-native fields live in `additional_metadata`. Use the `filter_key` from the provider description. + - **Querying before `lifecycle` is `active`:** the first sync hasn't landed yet. + + diff --git a/essentials/v2/connectors/airtable.mdx b/essentials/v2/connectors/airtable.mdx new file mode 100644 index 00000000..86c91747 --- /dev/null +++ b/essentials/v2/connectors/airtable.mdx @@ -0,0 +1,171 @@ +--- +title: "Airtable" +description: "Sync rows from every table in the Airtable bases you choose, one document per row. Airtable permissions are not imported." +icon: "/images/connectors/airtable.svg" +--- + +Sync the rows of every table in the Airtable bases you select. Each row is one document, with its field values written as labelled lines of text. A linked-record field links the row to the rows it references. Attachment file names are searchable, and a file's text can be added when it can be downloaded and read. + +Airtable permissions are not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. You cannot pick single tables: every table in a selected base is synced. A row's date is when it was created, not when it was last edited. Rows deleted in Airtable stay in HydraDB. + + +Airtable is in beta. + + +## Permissions + + +Airtable permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Airtable base and workspace collaborators, sharing and interface permissions are not reproduced. Set an access rule on each base that must be restricted. +- Every synced row carries `additional_metadata.rbac_warning`, a notice that Airtable collaborators were not captured. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Airtable uses a personal access token. + + +An Airtable personal access token with the scopes below and access to the bases you want synced. + + +Personal access tokens do not refresh. To rotate one, create a replacement with the same scopes and bases, update the connector, check that the bases still list and sync, then revoke the old token. + +**Scopes for the token** + +- `data.records:read`: reads the rows of each table. +- `schema.bases:read`: lists bases, their tables and their fields. + +Scopes alone do not open a base. Add every base you want synced to the token. + +### Set it up + + + + In Airtable, create a personal access token with `data.records:read` and `schema.bases:read`. + + + Add every base you want synced to the token. + + + Paste the token as `token`. + + + HydraDB lists the bases the token can reach. Select the bases to sync. Every table in a selected base is synced. To reach rows older than 30 days, raise `lookback_days` when you select them. + + + +One connector reads the bases one personal access token can reach. + + + +Use provider `airtable` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected base reads back the window set by `lookback_days`, 30 days by default, measured by each row's last modified time. +- **New and changed items:** Each sync reads every table in the base and picks up the rows modified since the last sync. +- **Edits:** A modified row is sent again and replaces its document. A formula or rollup value that changes because of another table, or because time passed, does not count as a modification of the row. It stays out of date until the row itself is edited. +- **Deletions:** Deleted rows are not removed. A row deleted in Airtable stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + + +Give every field in a table a distinct name. Field names are lowercased and their spaces and punctuation simplified before they are written. Two fields whose names then match can overwrite each other, and a field whose name becomes `id` can replace the record id that identifies the row. + + +### Rows + +- **One document:** One row of a table in a selected base. +- **Title:** The row's field named `name`, `title` or `subject`. Otherwise the first non-empty field in alphabetical order, skipping linked-record fields. A row with none is titled `Airtable record` and its id. +- **Text:** The title, then one line per non-empty field in alphabetical order, as the field name in title case and its value. Lists are joined with commas. An object shows its name, title, text, file name, email or URL. An attachment field shows file names only. Linked-record fields are left out of the text, because they become graph connections. Numbers are written with at most six decimal places. Fields are searchable as text, not as separate filters. +- **Date:** When the row was created. Airtable rows carry no last-edited time. +- **Link back:** None. +- **Files:** Files in attachment fields are downloaded and read when they are hosted by Airtable, can be downloaded and are of a supported type. A file that is missing, too large or unsupported keeps only its name in the row text. + + +File names in the row text, plus the text read from each file that could be read. + + + +When the row was created. Used as the result date, so ranking by date reflects creation, not the last edit. Not searchable. + + + +The table as base id and table id joined by a colon. Limits a query to one table, and stays the same when the table is renamed. Not searchable. + + + +The table name. Limits a query to one table by name. Two tables can share a name, so use the id keys to tell them apart. Not searchable. + + + +Always `table`. Not searchable. + + + +The base id, which starts with `app`. Limits a query to one base. Not searchable. + + + +The table id. Limits a query to one table by id. Not searchable. + + + +A notice that Airtable collaborators were not captured. Present on every row. It neither grants nor denies access. Not searchable. + + + +Limits a query to this connector's rows. Not searchable. + + + +Always `airtable`. Not searchable. + + + +Each linked-record field links the row to the rows it references, across tables in the same base. The field is not kept as searchable text. Not searchable. + + +**Example searches** + +- Which rows in the Customers table are on the Enterprise plan? +- What is the status and owner of the Website relaunch project? +- Which tasks are linked to the Q3 Launch project? + +## How it fits into the graph + +- Rows use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Airtable creates** + +- A row to each row it references through a linked-record field, across tables in the same base. +- No links to items in other tools. + +**People and groups** + +- No people are attached. Collaborator, user and person fields are written as text, by name or email. + +**Found in the text** + +Every field value in the row's text, and the text read from attached files. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Bases you did not select. +- Rows last modified before the `lookback_days` window on the first sync. +- Comments on records and revision history. +- Base and workspace collaborators. +- Field types and field descriptions. +- A link back to the row in Airtable. +- Deletions: deleted rows stay in HydraDB. diff --git a/essentials/v2/connectors/asana.mdx b/essentials/v2/connectors/asana.mdx new file mode 100644 index 00000000..16c127ed --- /dev/null +++ b/essentials/v2/connectors/asana.mdx @@ -0,0 +1,278 @@ +--- +title: "Asana" +description: "Sync tasks, subtasks, comments and project overviews from the Asana projects you choose. Asana permissions are not imported." +icon: "/images/connectors/asana.svg" +--- + +Sync tasks, subtasks, comments and project overviews from the Asana projects you select. Each task and subtask is one document. Each comment on a task is its own document, linked to the task. Each project is one overview page. Tasks link to their parent task, their projects and the tasks they block or are blocked by. + +Asana permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. A task in two selected projects is stored once per project. Attachments, task activity other than comments, tags and custom fields are not synced. Items deleted in Asana stay in HydraDB. + +## Permissions + + +Asana permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Asana project privacy, project membership and per-task visibility are not reproduced. Set an access rule on each project that should be restricted. +- A task in two selected projects is stored as one copy per project, and each copy follows its own project's rule. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Asana uses a personal access token. It has no scopes to choose: it sees what its user sees. + + +An Asana personal access token. + + +Asana limits requests per token: 150 a minute on free domains and 1,500 on paid ones. A dedicated token keeps this connector from sharing that limit with other automations. To rotate it, create a new token, update the connector, check that a sync succeeds, then revoke the old token. Removing the token's user invalidates the token. + +### Set it up + + + + In Asana's Developer Console, under My apps, Personal access tokens, create a token. A dedicated integration user works best. Add that user to every project you plan to select. + + + Paste the token as `personal_access_token`. + + + HydraDB lists every non-archived project in every workspace the token can see. Select the projects to sync. + + + +One connector reads what one token's Asana user can see, across that user's workspaces. + + + +Use provider `asana` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A newly selected project reads back the window set by `lookback_days`, 30 days by default, measured on when tasks and projects were last modified. +- **New and changed items:** Each sync reads the tasks, subtasks and projects modified since the last sync. Comments are read again on every sync, without a time window. +- **Edits:** An edited task or project is picked up through its modified time and updates its document. An edited comment is picked up because comments are read again on every sync. +- **Deletions:** Tasks, comments and projects deleted in Asana stay searchable in HydraDB. +- A project that refuses access on the first request is skipped and reported, and its unread window is kept for a later sync. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Tasks and subtasks + +- **One document:** One task or subtask, as it appears in one selected project. Its comments are separate documents. +- **Title:** The task name, or `Asana task` and its id when the name is empty. +- **Text:** The task notes as plain text. A task with no notes gets a short summary instead: name, assignee, due date, status (`Open` or `Completed`) and projects. A subtask ends with a `Parent task` line that names its parent. The assignee, creation date, task key and parent are written as lines too. The title is searchable too. +- **Date:** When the task was last modified, or when it was created if there is no modification time. +- **Link back:** The task's Asana permalink. +- **Files:** Task attachments and their contents are not synced. + + +The selected project's id and the task's id. It keeps each project's copy of the task on its own document. + + + +The assigned user's display name, written as the `Assignee` line. The graph records that person as the assignee. + + + +Whether the task is done. Searchable as `Open` or `Completed` only in the summary of a task with no notes. It is not a filter. + + + +The due time, or the due date. Searchable only in the summary of a task with no notes. It is not a filter. + + + +When the task was created, written into the task details. Sets the result date only when there is no modification time. + + + +When the task was last modified. Sets the result date and decides when a sync picks the task up. Not searchable. + + + +For a subtask, its parent task, written as the `Parent` line. Links the subtask to its parent. + + + +Display names of people @mentioned in the task notes. The graph records each as mentioned by the task. The field itself is not searchable, but the notes are. + + + +The task's Asana id. Picks out one task, in every project it was synced from. Not searchable. + + + +The assigned user's Asana id. Limits a query to tasks assigned to one person. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `asana`. Not searchable. + + + + + +When the task was completed. + + + + +### Comments + +- **One document:** One comment on a task. A task in two selected projects has a copy of each comment per project. +- **Title:** `Comment by on `, leaving out whichever part is missing. +- **Text:** The comment as plain text, then a `Parent task` line that names the task. The author, the posting time and the task's key are written with it. +- **Date:** When the comment was posted. +- **Link back:** None. + + +The commenter's display name. The graph records the comment as written by that person. + + + +When the comment was posted, written as the `Created` line. + + + +The key of the task the comment is on. Links the comment to that task. + + + +Display names of people @mentioned in the comment. The graph records each as mentioned. The field itself is not searchable, but the comment text is. + + + +The comment's Asana id. Picks out one comment. Not searchable. + + + +The Asana id of the task. Returns every comment on one task. Not searchable. + + + +The commenter's Asana id. Limits a query to one person's comments. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `asana`. Not searchable. + + +### Projects + +- **One document:** One selected Asana project, as an overview page. +- **Title:** The project name, or `Asana project` and its id when the name is empty. +- **Text:** The project notes as plain text, then the title of the latest status update when Asana supplies one. A project with neither is written as `Project: `. The modification time is written as the `Updated` line. The title is searchable too. +- **Date:** When the project was last modified, or when it was created if there is no modification time. +- **Link back:** The project's Asana permalink. + + +When the project was last modified, written as the `Updated` line. Sets the result date. + + + +When the project was created. Sets the result date only when there is no modification time. Not searchable. + + + +The project's Asana id. Picks out one project. Not searchable. + + + +Always `project`. Keeps or leaves out project overview pages. Not searchable. + + + +The project owner's Asana id. Limits a query to projects owned by one person. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `asana`. Not searchable. + + + + + +The project owner's display name. The owner is not added to the graph as a person. + + + +Whether the project is completed. + + + +When the project was completed. + + + +The project due date. + + + +Always `project`. Filter on it with `additional_metadata.asana_kind`. + + + + +**Example searches** + +- What tasks are assigned to Priya in the Q3 Launch project? +- Which tasks are blocking the API migration task? +- What does the Q3 Launch project brief say? + +## How it fits into the graph + +- Tasks and subtasks use the Ticket class. +- Comments use the Comment class. +- Projects use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Asana creates** + +- A subtask to its parent task. +- A task to each project it belongs to. +- A task to each task it depends on, and to each task that depends on it. +- A comment to its task. +- No links to items in other tools. + +**People and groups** + +- The assignee of each task. +- The author of each comment. +- People @mentioned in task notes and comments. +- A project's owner is kept on the project but not added to the graph. + +**Found in the text** + +Task notes, comment text and project notes. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Projects you did not select. Archived projects are not listed for selection. +- Task activity other than comments, such as assignments and field changes. +- Task attachments and their contents. +- Sections, tags, custom fields and portfolios, including tag and custom-field values on tasks. +- Comment likes, task followers and start dates. +- Project status contents, apart from the latest status update's title. +- Comments on a nested subtask that does not appear in its project's task list. diff --git a/essentials/v2/connectors/attio.mdx b/essentials/v2/connectors/attio.mdx new file mode 100644 index 00000000..75695170 --- /dev/null +++ b/essentials/v2/connectors/attio.mdx @@ -0,0 +1,458 @@ +--- +title: "Attio" +description: "Sync Attio records and list entries from the objects and lists you choose, with notes, tasks, comments, meetings and call transcripts. Private list access carries over when Enforce ACL is on." +icon: "/images/connectors/attio-light.svg" +--- + +Sync records from the Attio objects you select, such as people, companies and deals, and entries from the lists you select. Notes, tasks, meetings and call transcripts sync for the whole workspace, and comments sync for the selected records and entries. Each item is one document. Notes, tasks, comments and list entries link to the record they belong to, and a transcript links to its meeting. + +An entry of a private Attio list can be restricted to the list's admins and directly granted members. Search applies this only when Enforce ACL is on. Object records, notes, tasks, meetings and transcripts carry no Attio restriction. Attio has no last-edited time, so results rank by when an item was created. Items deleted in Attio stay in HydraDB. + + +Attio is in beta. + + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Attio permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** An entry of a private list, and the comments on it, can be read by workspace admins and the members granted access to the list directly. An entry of a list open to the whole workspace, every object record and the comments on it can be read by everyone who can query the collection, unless you set an access rule. Notes, tasks, meetings and call transcripts do not take on a list's restriction. +- **How a person is identified:** A workspace member's email address. +- **When permissions cannot be read:** If HydraDB cannot read a list's settings or members, or the list's readers come out empty or too many, the connector reports a permission warning for that list. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Access granted only through a team cannot be read, so team members without a direct grant cannot read a private list's entries in HydraDB. +- Suspended members, and grants to people no longer in the workspace, are left out. +- Reading list access needs the `list_configuration:read` and `user_management:read` scopes. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Attio uses a workspace API key. An OAuth access token also works. + + +An Attio workspace API key, from Workspace settings, Developers, API keys, or an OAuth access token. + + +**Scopes for the API key** + +- `record_permission:read` +- `object_configuration:read` +- `list_entry:read` +- `list_configuration:read`: also needed to carry over private list access. +- `note:read` +- `task:read` +- `comment:read` +- `user_management:read`: also needed to carry over private list access. + +### Set it up + + + + In Attio, open Workspace settings, Developers, API keys. Create a key with the read scopes above. + + + Paste the key as `access_token`. + + + HydraDB lists the workspace's objects and lists. Select the ones to sync. Records and entries are read only from what you select. Notes, tasks and meetings are read for the whole workspace, including notes and tasks on records of objects you did not select. + + + +One connector reads one Attio workspace. + + + +Use provider `attio` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Selected objects and lists are read in full. Notes and tasks reach back the window set by `lookback_days`, 30 days by default, by creation time. Meetings are read from that point to 30 days ahead. +- **New and changed items:** By default, each selected object and list is read in full on every sync, and only items whose content changed are updated. Notes and tasks inside the window are read again on every sync. Comments are read through their records and entries, and transcripts through their meetings. +- **Edits:** A full read picks up edits. Notes, tasks and meetings outside the window are not read again, so later edits to them do not arrive. +- **Deletions:** Items deleted in Attio stay searchable in HydraDB. Items that fall outside the window stay in HydraDB. +- The shortest sync interval for Attio is 15 minutes. +- Attio's rate limit is shared with every other integration in your workspace. Reading large objects in full on every sync uses it each time. +- Through the API, you can choose to sync only new items: set `sync_mode` to `new_only` on an object or list resource when you configure the connector. Edits to older records and entries are then missed. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Attio item + + +On a record, the object's slug. On a list entry, the list's slug. On a note, task or comment, the record or entry it belongs to. Limits a query to one object, one list, or one record's items. Not set on meetings and transcripts. Not searchable. + + + +The readable name of the object, list or parent. Limits a query by that name. Not searchable. + + + +What the item hangs off: `attio_object` for records, `attio_list` for list entries, or the parent kind for notes, tasks and comments. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `attio`. Not searchable. + + +### People and companies + +- **One document:** One person or company record. +- **Title:** The record's name, full name, title, domain or email. Else its first filled-in attribute. Otherwise a title with the object and record id. +- **Text:** A header naming the object and record, then each attribute as a labeled line, in alphabetical order. An attribute with several values shows only its first current value, except emails and phones, which are all kept. The title is searchable too. +- **Date:** When the record was created in Attio. +- **Link back:** The record in the Attio web app. + + +The record's name. For a person, the graph treats the record as that person. + + + +Person for the people object, organization for companies. Decides whether the record stands for a person in the graph. + + + +The first current email address. Identifies the person in the graph. + + + +The other current email addresses. Connected to the same person in the graph. + + + +The current phone numbers, written as a `Phones` line. + + + +The current job title. + + + +The LinkedIn URL and X handle. Can identify the person in the graph. + + + +A person's current company name. + + + +The id of a person's company record. Links the person to that company as a member. + + + +The current owner's name. The graph records the owner of the record. + + + +The current owner's email. Identifies the owner in the graph. + + + +The current lifecycle value. + + + +The first current name, domain, LinkedIn and Twitter values, kept as their own fields as well as in the attribute lines. + + + +The Attio record id. Identifies the person in the graph, and keeps later syncs on the same document. + + + +The record's address in the Attio web app. Used as the link back. + + + +When the record was created in Attio. + + + +The Attio record id. Targets one record. Not searchable. + + + +The Attio object id. Limits a query to one object. Not searchable. + + +### Deals and other object records + +- **One document:** One record of a deals object or a custom object. +- **Title:** The record's name, full name, title, domain or email. Else its first filled-in attribute. Otherwise a title with the object and record id. +- **Text:** A header naming the object and record, then each attribute as a labeled line, in alphabetical order. An attribute with several values shows only its first current value. The title is searchable too. +- **Date:** When the record was created in Attio. +- **Link back:** The record in the Attio web app. + + +The first current email, name, domain, LinkedIn and Twitter values, kept as their own fields as well as in the attribute lines. + + + +When the record was created in Attio. Not searchable. + + + +The Attio record id. Targets one record. Not searchable. + + + +The Attio object id. Limits a query to one object. Not searchable. + + + + + +The object's slug. Filter on it with `additional_metadata.container_id`. + + + + +### List entries + +- **One document:** One entry in one selected list: a record's place and stage values in that list. +- **Title:** The list's name followed by `entry`. +- **Text:** The title, then each entry attribute as a labeled line, in alphabetical order, with the first current value of each. +- **Date:** When the entry was created. +- **Link back:** None. + + +The record the entry is for. Links the entry to that record. Not searchable. + + + +The Attio list entry id. Targets one entry. Not searchable. + + + +The record the entry is for. Returns every list entry, note, task and comment of one record. Not searchable. + + + +When the entry was created. Not searchable. + + + + + +The list's slug. Filter on it with `additional_metadata.container_id`. + + + + +### Notes + +- **One document:** One note. +- **Title:** `Comment by` and the author's name. Without an author, the first 80 characters of the text. +- **Text:** The note title, then its content as markdown, or plain text when there is no markdown. Then a `Tagged` line naming the records and members tagged in it. The author, the record it is on and its creation time are part of the text too. +- **Date:** When the note was created. +- **Link back:** None. + + +Who created the note. The graph records the note as written by that person. + + + +Workspace members tagged in the note. Their names stay in the text, and the graph records each as mentioned. Tagged records are not included. + + + +The record the note is on, written into the text as its id. Links the note to that record. + + + +The Attio note id. Targets one note. Not searchable. + + + +The meeting the note belongs to. Returns a meeting together with its transcript and notes. Not searchable. + + + +The record the note is on. Returns every list entry, note, task and comment of one record. Not searchable. + + + +When the note was created, written as a `Created` line. + + +### Tasks + +- **One document:** One task. +- **Title:** The task text on one line, cut near 80 characters at a word. Otherwise a title with the task id. +- **Text:** The title, the full task text when it is longer, a `Status` line with `Open` or `Completed`, the deadline and the assignees. The task's key, the record it is on and its creation time are part of the text too. +- **Date:** When the task was created. +- **Link back:** None. + + +`Open` or `Completed`, written as the `Status` line. Limits a query to open or completed tasks. + + + +The deadline, written as the `Deadline` line. Limits a query to a range of deadlines. + + + +Whether the task is done. Keeps only open or only completed tasks. Not searchable. + + + +The people assigned to the task, written into the text. They are not attached to the task as people. + + + +The record the task is linked to, written into the text. Places the task under that record in the graph. + + + +The Attio task id. Written into the text as part of the task's key. Targets one task. + + + +The record the task is on. Returns every list entry, note, task and comment of one record. Not searchable. + + + +When the task was created, written as a `Created` line. + + +### Comments + +- **One document:** One comment on a selected record or list entry. +- **Title:** `Comment by` and the author's name. Without an author, the first 80 characters of the text. +- **Text:** A header naming the author and what was commented on, the id of the record or entry when there is one, then the comment text. The creation time is part of the text too. +- **Date:** When the comment was created. +- **Link back:** None. + + +Who wrote the comment. The graph records the comment as written by that person. + + + +The record or list entry the comment is on, written into the text as its id. Links the comment to it. + + + +The discussion thread. Groups the comments of one discussion, so a reply can be read with the rest of its thread. Limits a query to one thread. Not searchable. + + + +The Attio comment id. Targets one comment. Not searchable. + + + +When the comment was resolved. Finds resolved or unresolved comments. Not searchable. + + + +The record the comment belongs to, when there is one. Returns every list entry, note, task and comment of one record. Not searchable. + + + +When the comment was created, written as a `Created` line. + + +### Meetings + +- **One document:** One calendar meeting. +- **Title:** The meeting title. Otherwise a title with the meeting id. +- **Text:** The title, the description, a `Starts` line and a `Participants` line. +- **Date:** When the meeting was created in Attio, not when it starts. +- **Link back:** None. + + +The participants' names or emails, written as the `Participants` line, where HydraDB can identify the people. Filters meetings by participant. + + + +The Attio meeting id. Returns a meeting together with its transcript and notes. Not searchable. + + + +When the meeting was created in Attio. Not searchable. + + +### Call transcripts + +- **One document:** One call recording's transcript. A recording with no transcribed speech is skipped. +- **Title:** The meeting title. Otherwise a title with the recording id. +- **Text:** A header naming the call and its speakers, then the full transcript text. +- **Date:** When the meeting was created in Attio. +- **Link back:** None. +- **Files:** The audio and video recording itself is not synced. Only the transcript text is. + + +The speakers' names, written in the header, where HydraDB can identify the people. Filters transcripts by speaker. + + + +The meeting the call belongs to. Links the transcript to that meeting. Not searchable. + + + +The Attio call recording id. Targets one transcript. Not searchable. + + + +The meeting the call belongs to. Returns a meeting together with its transcript and notes. Not searchable. + + + +When the meeting was created in Attio. Not searchable. + + +**Example searches** + +- What did we discuss with Acme on our last call? +- What open tasks are attached to this company? +- What notes mention the pricing objection? + +## How it fits into the graph + +- People and companies use the Contact class. +- Deals and other object records use the Page class. +- List entries use the Page class. +- Notes use the Comment class. +- Tasks use the Ticket class. +- Comments use the Comment class. +- Meetings use the Meeting class. +- Call transcripts use the Meeting class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Attio creates** + +- A note or task to the record it is on. +- A comment to the record or list entry it is on, and to its discussion thread. +- A list entry to its record. +- A call transcript to its meeting. +- A person to their company. +- No links to other tools. + +**People and groups** + +- A person record stands for that person, identified by name, email and handles. +- The owner of each person and company record. +- The author of each note and comment, and members tagged in a note. +- Task assignees, meeting participants and transcript speakers appear only in the text, where HydraDB can identify them. + +**Found in the text** + +Record and list entry attributes, note, task and comment text, meeting participants and transcript speech. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Records and entries from objects and lists you did not select. +- Email messages and email threads. +- Meetings outside the window, which runs from `lookback_days` ago to 30 days ahead. +- Notes and tasks created before the window. +- Earlier values of an attribute, and every value after the first, except emails and phones on people and companies. +- Files, and the audio and video of call recordings. diff --git a/essentials/v2/connectors/avoma.mdx b/essentials/v2/connectors/avoma.mdx new file mode 100644 index 00000000..d34669ac --- /dev/null +++ b/essentials/v2/connectors/avoma.mdx @@ -0,0 +1,268 @@ +--- +title: "Avoma" +description: "Sync the recorded meetings and scorecard reviews an Avoma API key can see, with summaries and full transcripts." +icon: "/images/connectors/avoma.svg" +--- + +Sync the recorded meetings and scorecard reviews an Avoma API key can see. Each meeting is one document with its details, Avoma's AI summary and the transcript, each line labelled with its speaker. Each answered scorecard review is its own document, linked to the meeting it reviews. + +Avoma permissions are not imported, so private meetings are visible to everyone who can query the collection unless you set an access rule. Changes are picked up only for a short time: 2 hours for meetings and 7 days for reviews. A transcript or summary that arrives after the 2-hour window is not picked up. Meetings deleted in Avoma stay in HydraDB. + +## Permissions + + +Avoma permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Private meetings that only some Avoma users can see are synced like any other meeting when the key has Organization scope. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + + +Create the API key with Organization scope to sync everyone's meetings. A key's scope cannot be changed after it is created, and a key with a narrower scope syncs only the meetings that scope allows. + + +### Credentials + +Avoma uses an API key. Only an Avoma admin can create one. + + +The whole Avoma API key exactly as issued: both parts, with the colon between them. + + +### Set it up + + + + Have an Avoma admin create an API key with Organization scope. + + + Paste the whole key as `api_key`, including both parts and the colon. + + + HydraDB lists one item for all the meetings and reviews the key can see. Select it. You cannot pick individual meetings. + + + +One connector reads the meetings its API key's scope allows in one Avoma organization. + + + +Use provider `avoma` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads meetings and reviews from the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads meetings by start time and reviews by creation time. It reaches 2 hours back for meetings and 7 days back for reviews, to pick up recent changes. +- **Edits:** Changes are picked up only inside those windows. A transcript or summary that arrives after the 2-hour window is not picked up. A review with no answers yet is skipped, and is picked up if it is answered within the 7 days. A change to a meeting does not update its reviews. +- **Deletions:** Meetings and reviews deleted in Avoma stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Avoma item + + +Limits a query to this connector's meetings and reviews. Not searchable. + + + +Always `avoma`. Not searchable. + + +### Meetings + +- **One document:** One meeting, with its summary and full transcript. +- **Title:** The meeting subject, or `Avoma meeting ` when it has none. +- **Text:** The title, then `Purpose`, `When`, `Organizer` and `Attendees` lines. Then Avoma's AI summary under `Summary`, and the transcript under `Transcript` as one `Speaker: text` line per segment. The title is searchable too. +- **Date:** When the meeting started, else when it was created. +- **Link back:** The meeting in Avoma's web app. +- **Files:** None. Recordings are not downloaded. + + +Avoma's AI summary, written under `Summary`. + + + +The meeting's purpose or template label, written as the `Purpose` line. + + + +The organizer's name or email, written as the `Organizer` line. The organizer is not attached to the meeting as a person in the graph. + + + +Attendee names, written as the `Attendees` line. Attendees are not attached to the meeting as people in the graph. + + + +When the meeting started, written as the `When` line. Sets the result date and decides which meetings each sync reads. + + + +The meeting's id. Picks out one meeting. The same key on scorecard reviews finds that meeting's reviews. Not searchable. + + + +The recording's id. Picks out a meeting by its recording. Not searchable. + + + +The organizer's email. Limits a query to meetings one person organized. Not searchable. + + + +How many attendees the meeting had. Limits a query by meeting size. Not searchable. + + + +The meeting's state, such as `completed` or `scheduled`. Limits a query to completed meetings, for example. Not searchable. + + + +The ids of the CRM records linked to the meeting in Avoma. Finds the meetings linked to one opportunity or account. They do not link the meeting to items from a CRM connector. Not searchable. + + + +The types of the linked CRM records. Limits a query to meetings linked to one kind of CRM record. Not searchable. + + + + + +When the meeting ended. + + + +The recorded meeting length, in seconds. + + + +The meeting's outcome label. + + + +Avoma's meeting type label. + + + +Whether the recording was still processing or complete when it was synced. + + + +Whether the transcript was included. + + + +Whether Avoma classed the meeting as a voice or video call. + + + +Whether Avoma classed the meeting as internal, meaning every attendee shares the organizer's domain. + + + + +### Scorecard reviews + +- **One document:** One scorecard review of one meeting. A review with no answers yet is skipped. +- **Title:** The scorecard template name, or `Scorecard review` when it has none, followed by the meeting subject when there is one. +- **Text:** The title, then `Meeting`, `Reviewed`, `Reviewer` and `Overall score` lines. Then each question in order, with its score, answer and reasoning. Avoma's citation markers are removed. The title is searchable too. +- **Date:** When the review was created, else when the meeting started. +- **Link back:** None. + + +The scorecard template's name, written in the title. + + + +The reviewed meeting's subject, written in the title and as the `Meeting` line. + + + +The person reviewed, written as the `Reviewed` line. + + + +The reviewer, written as the `Reviewer` line. For a review Avoma's AI wrote, this can be Avoma's AI email when there is no name. + + + +The overall score, written as the `Overall score` line. + + + +When the review was created. Sets the result date and decides which reviews each sync reads. Not searchable. + + + +The reviewed meeting's id. Fetches every review of one meeting, and links the review to that meeting. Not searchable. + + + +The review's id. Picks out one review. Not searchable. + + + +The scorecard template's id. Limits a query to one scorecard. Not searchable. + + + +The reviewed person's email. Finds every review of one person. Not searchable. + + + +The reviewer's email, or `ai@avoma.com` for a review Avoma's AI wrote. Separates human and AI reviews. Not searchable. + + + + + +Whether Avoma's AI wrote the review, worked out from the reviewer's email. + + + +How many answers the review returned. A question appears in the text only when it has question text. + + + + +**Example searches** + +- What did the customer say about budget on yesterday's discovery call? +- How did Sam score on the SPICED scorecard for the Globex demo? +- Summarize the last three calls with Acme. + +## How it fits into the graph + +- Meetings use the Page class. +- Scorecard reviews use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Avoma creates** + +- A scorecard review to the meeting it reviews. +- No links to other tools. Linked CRM records are kept as ids for filtering only. + +**People and groups** + +The connector does not attach organizers, attendees, speakers or reviewers to items as people. Their names are part of the text. + +**Found in the text** + +Each meeting's details, summary and transcript, and each review's text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Audio and video files. +- Meetings outside the API key's scope. +- Avoma meeting sharing permissions. +- A review's company name, deal names and modified time. +- Changes after the 2-hour window for meetings or the 7-day window for reviews. +- Deletions: meetings and reviews deleted in Avoma stay in HydraDB. diff --git a/essentials/v2/connectors/bamboohr.mdx b/essentials/v2/connectors/bamboohr.mdx new file mode 100644 index 00000000..8f3754a5 --- /dev/null +++ b/essentials/v2/connectors/bamboohr.mdx @@ -0,0 +1,189 @@ +--- +title: "BambooHR" +description: "Sync the BambooHR employee directory and time off. Each employee is one document linked to their manager, and each time-off request or who's-out entry is linked to its employee." +icon: "/images/connectors/bamboohr.svg" +--- + +Sync the BambooHR employee directory and time off. Each employee is one document with their job title, manager, department, division, location, work email, work phone and status, linked to their manager. Each time-off request and each who's-out entry is one document, linked to the employee it belongs to. + +BambooHR permissions are not imported, so every synced employee and absence is visible to everyone who can query the collection unless you set an access rule. HR data is often sensitive. Departed employees and cancelled absences stay in HydraDB. Compensation, employee files and custom fields are not synced. + +## Permissions + + +BambooHR permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +BambooHR uses an API key together with your company's subdomain. + + +A BambooHR API key. + + + +Your company's subdomain from its BambooHR address, for example `acme` for `acme.bamboohr.com`. + + +### Set it up + + + + Get a BambooHR API key. HydraDB syncs the employee directory and time off that this key can read. + + + Paste the key as `auth_token` and your company's subdomain as `subdomain`. + + + HydraDB lists one account-wide resource, All data. Select it to sync everything the key can read as one unit. + + + +One connector reads one BambooHR company, the one named by `subdomain`. + + + +Use provider `bamboohr` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads the whole employee directory the key can see. Time-off requests updated within the window set by `lookback_days`, 30 days by default, whatever the dates of the leave. Who's-out entries for the dates in that window. +- **New and changed items:** Each sync reads the whole directory again, time-off requests updated since the last sync, and who's-out entries for the dates the sync covers. Future absences are not guaranteed to appear as who's-out entries. +- **Edits:** A changed employee or time-off request replaces its document. A who's-out entry is read again only while its dates fall in the window a sync covers. +- **Deletions:** Not removed. A departed employee or a cancelled absence stays in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every BambooHR item + + +Limits a query to this connector's documents. Not searchable. + + + +Always `bamboohr`. Not searchable. + + +### Employees + +- **One document:** One employee in the directory the API key can read. +- **Title:** The employee's display name. Otherwise the first and last name. +- **Text:** The name, then `Job Title`, `Reports To`, `Department`, `Division`, `Location`, `Email`, `Phone` and `Status` lines. The title is searchable too. +- **Date:** None. The directory has no change time, so ranking by date cannot order employees. +- **Link back:** None. + + +The directory display name. Forms the title and the name in the text. + + + +The employee's first and last name. Used for the title and the name in the text only when there is no display name. + + + +The job title, in the `Job Title` line. + + + +The manager's name from the employee's latest job information, in the `Reports To` line. When the name matches an employee in the directory, links the employee to that manager. Two people with the same name can cause a wrong link or no link. + + + +Where the employee sits in the organisation, in the `Department`, `Division` and `Location` lines. + + + +The work email and work phone, in the `Email` and `Phone` lines. + + + +The employment status, in the `Status` line. + + + +The BambooHR employee id. Finds one employee. Not searchable. + + +### Time-off entries + +- **One document:** One time-off request, or one who's-out calendar entry. +- **Title:** The employee's name. +- **Text:** The employee's name, then `Type`, `Status`, `Start` and `End` lines. The title is searchable too. +- **Date:** The first day of the absence. +- **Link back:** None. + + +Links the absence to the employee it belongs to. Not searchable. + + + +The kind of time off, such as Vacation or Sick, in the `Type` line. + + + +The approval status, in the `Status` line. + + + +The first day of the absence, in the `Start` line. It is the result date. + + + +The last day of the absence, in the `End` line. + + + +The BambooHR time-off id. Finds one request or entry. Not searchable. + + + + + +When a time-off request was created. Who's-out entries have none. + + + + +**Example searches** + +- Who does Priya report to? +- Who works in the Finance department? +- What is Sam's work email and job title? + +## How it fits into the graph + +- Employees use the Record class. +- Time-off entries use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections BambooHR creates** + +- An employee to their manager, when the manager's name matches an employee in the directory. +- A time-off request or who's-out entry to its employee. +- No links to other tools. + +**People and groups** + +Employees and their managers, through the manager link. Departments, divisions and locations are not attached as groups. They are in the text only. + +**Found in the text** + +Each employee's directory lines and each absence's type and status. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Compensation, custom reports, photos, employee files and custom fields. +- Job history other than the latest manager. +- Time-off amounts, employee notes, per-day breakdowns and the actions allowed on a request. +- A guaranteed calendar of future absences. +- Deletions: departed employees and cancelled absences stay in HydraDB. diff --git a/essentials/v2/connectors/bigquery.mdx b/essentials/v2/connectors/bigquery.mdx new file mode 100644 index 00000000..399a98e3 --- /dev/null +++ b/essentials/v2/connectors/bigquery.mdx @@ -0,0 +1,279 @@ +--- +title: "BigQuery" +description: "Sync rows from the BigQuery tables you choose, one searchable document per row." +icon: "/images/connectors/bigquery.svg" +--- + +Sync rows from the BigQuery tables you select in one Google Cloud project. Each row is one document. Every non-empty column of the row becomes searchable text, including sensitive columns. + +BigQuery access controls are not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. Rows deleted in BigQuery stay in HydraDB. You choose, table by table, how new and changed rows are found: a timestamp column, BigQuery's change history, or a full read of the table on every sync. + + +BigQuery is in beta. + + +## Permissions + + +BigQuery permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- BigQuery dataset, table, row-level and column-level access controls are not reproduced. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + + +Set a primary key for every table you select. HydraDB updates a row's document by its key. If a table has no real unique key, different rows can be treated as the same document and replace each other. + + +### Credentials + +Use a service-account JSON key, a service-account email and private key, or a pre-issued OAuth client id, client secret and refresh token. Paste one complete credential set. HydraDB does not offer an interactive sign-in flow. The JSON key is the recommended option. + + +The service account's JSON key file, pasted whole. + + + + +**Service-account email and private key** + + +The service account's email. + + + +The service account's private key. + + +**OAuth client and refresh token** + + +An OAuth client id. + + + +An OAuth client secret. + + + +An OAuth refresh token you issued beforehand. A client id and secret alone cannot reach BigQuery, so this option needs all three fields. + + + + +**Connector settings** + + +The Google Cloud project to read. Required unless the key file already names a project. + + + +The BigQuery location to run query jobs in. + + + +Limits discovery and sync to these datasets. + + + + + +A timestamp column used to find changed rows, called the sync cursor, for every selected table that has it. A table's own settings override it. + + + +`appends` or `changes`, used for tables that have no cursor column. A table's own settings override it. + + + +Off by default. When on, column-partitioned tables sync incrementally on their partition column. + + + + +**What the service account needs** + +- `BigQuery Data Viewer`: role on the project. +- `BigQuery Job User`: role on the project. +- `https://www.googleapis.com/auth/bigquery`: scope, in the OAuth option. Google rejects query jobs under the read-only BigQuery scope. + +### Set it up + + + + In Google Cloud, create a service account. Give it the BigQuery Data Viewer and BigQuery Job User roles on the project, and download its JSON key. + + + Paste the key as `credentials_json`. Add `project_id` only if the key file does not name a project. To narrow which tables HydraDB lists, set `datasets`. + + + HydraDB lists the tables in the project, narrowed by `datasets` when you set it. Select the tables to sync. Each selected table becomes its own set of documents, one per row. + + + If the table has a timestamp column that changes on every insert and update, such as `updated_at`, make it the table's `replication_key`. This column is the table's sync cursor. If rows are only ever inserted, set `change_history` to `appends`. If rows are also updated and there is no such column, set `change_history` to `changes`. A table with none of these is read in full on every sync, which is expensive on large tables. + + + Run `ALTER TABLE dataset.table SET OPTIONS(enable_change_history=true)` once in BigQuery for that table. It changes no data. + + + Add `primary_keys` with the column or columns that identify one row, unless the table already has a primary key defined in BigQuery. + + + Through the API or SDK, send the per-table settings as `table_configs` on the same Configure Connector request that selects the tables. The dashboard collects them on the table-selection screen. + + + +One `table_configs` entry per table, for each way of finding changes. A table's own `change_history` overrides its cursor setting. Otherwise, a usable table or connector-wide cursor takes priority over the connector-wide `change_history` fallback. + + +```json Timestamp cursor +{ + "table": "sales.orders", + "replication_key": "updated_at", + "primary_keys": [ + "order_id" + ] +} +``` +```json Inserts only +{ + "table": "web.page_views", + "change_history": "appends", + "primary_keys": [ + "event_id" + ] +} +``` +```json Inserts and updates +{ + "table": "crm.accounts", + "change_history": "changes", + "primary_keys": [ + "account_id" + ] +} +``` +```json Changes only, skip existing rows +{ + "table": "crm.accounts", + "change_history": "changes", + "snapshot": "none", + "primary_keys": [ + "account_id" + ] +} +``` +```json Full read +{ + "table": "ref.countries", + "primary_keys": [ + "code" + ] +} +``` + + +One connector reads one Google Cloud project. + + + +Use provider `bigquery` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A table with a cursor column reads back the window set by `lookback_days`, 30 days by default. A change-history table starts capturing changes at its first sync, not when you create the connector, and then loads its existing rows in slices of 1,000 per sync. Set `snapshot` to `none` to skip existing rows, or to a number to load at most that many rows, in no particular order. With `none`, changes between creating the connector and its first sync are not recovered. While existing rows are loading, deleting rows in BigQuery can cause other rows to be missed. +- **New and changed items:** A cursor table picks up rows whose cursor value moved past the last sync. A `changes` table reads BigQuery's change history, about 11 minutes behind the current time. An `appends` table sees new rows only. A table with neither is read in full on every sync, and rows whose content did not change are skipped. +- **Edits:** An edited row updates the same document, as long as its key is unique. In `appends` mode, edits to existing rows are never seen. +- **Deletions:** Deleted rows are not removed. A row deleted in BigQuery stays searchable in HydraDB. +- BigQuery keeps change history for its time-travel window, 2 to 7 days. If a change-history table is not synced within that window, for example while the connector is paused, the table is skipped with an error on each sync until it is loaded again from the start. +- A dataset name containing `__` can display incorrectly as a table label. Which table a row belongs to is not affected. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Table rows + +- **One document:** One row of a selected table, as long as the table's key is unique. Rows that share a key replace one another. +- **Title:** The first non-empty column named `name`, `title`, `subject`, `summary` or `email`. Otherwise, the first non-empty, non-numeric scalar column in alphabetical column order is used. If there is none, the first numeric column is used. A row with none of these is titled with its table and row key. +- **Text:** The title on the first line. Then every non-empty column in alphabetical order, as `Column Name: value`: underscores become spaces and words are capitalised. Lists of scalar values are joined with commas. Nested records and lists of records are written as compact JSON. In change-history mode, each row also has `_change_type` and `_change_timestamp` columns, and both appear in the text. +- **Date:** The first recognised time column with an RFC3339 timestamp or epoch-seconds value sets the result date. The columns are checked in this order: `updated_at`, `modified_at`, `last_modified`, `updated`, `created_at`, `created`, `timestamp`, `event_time` and `inserted_at`. BigQuery DATETIME values have no time zone and do not set it. A row with none has no date. +- **Link back:** None. +- **Files:** None. Column values are kept as text only. + + +Every non-empty column is searchable as text. Columns are not individual query filters. A table name in a text query does not reliably select that table. Use `additional_metadata.container_name` or `additional_metadata.container_id`. + + + +The value of the first recognised time column, used as the result date. A sync cursor with another name does not set it. This attribute is not searchable, but a source column of the same name is part of the row text like any other column. + + + +The table as `dataset.table`. Limits a query to one table. Not searchable. + + + +The table as `dataset__table`, with two underscores. Another way to limit a query to one table. Not searchable. + + + +Always `table`. Not searchable. + + + +Limits a query to this connector's rows. Not searchable. + + + +Always `bigquery`. Limits a query to BigQuery rows. Not searchable. + + + + + +The table as `dataset.table`, so you can see where a result came from. + + + +The key the row was matched on. Together with the table, it decides which document a later sync updates. + + + + +**Example searches** + +- What does the `sales.orders` table say about order 10432? +- Which rows in `crm.accounts` mention Acme Corp? +- Which rows in `support.tickets` were updated most recently? + +## How it fits into the graph + +- Table rows use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections BigQuery creates** + +The connector creates no explicit links between rows or to other tools. A column containing another row's key does not create a link. Each row is grouped under its table. + +**People and groups** + +The connector does not explicitly attach rows to people. A column such as `email` or `user_id` is part of the row text only. It does not make the row a person in the graph. + +**Found in the text** + +The row text. Anything found there comes from reading the text, not from joining table keys. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Tables you did not select. +- Rows deleted in BigQuery: they stay in HydraDB. +- Updates to existing rows in tables set to `appends`. +- BigQuery dataset, table, row-level and column-level access controls. +- Table and column descriptions and other schema details. Only row values are kept. diff --git a/essentials/v2/connectors/bookstack.mdx b/essentials/v2/connectors/bookstack.mdx new file mode 100644 index 00000000..83b32be5 --- /dev/null +++ b/essentials/v2/connectors/bookstack.mdx @@ -0,0 +1,199 @@ +--- +title: "BookStack" +description: "Sync the pages, chapters and books of the BookStack books you choose, one document per item. BookStack permissions are not imported." +icon: "/images/connectors/bookstack.svg" +--- + +Sync the books you select from your BookStack instance. Each page is one document holding its text. Each chapter and each book is also one document, holding its description. Pages and chapters carry the id of their book and chapter, so a query can be limited to one book or chapter. + +BookStack permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Items carry no link back to BookStack. Images and files on pages are not synced, and items deleted in BookStack stay in HydraDB. + + +BookStack is in beta. + + +## Permissions + + +BookStack permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- BookStack page, chapter, book and role permissions are not applied. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +BookStack uses an API token, made of a token id and a token secret. + + +The root address of your BookStack instance. + + + +The BookStack API token id. + + + +The BookStack API token secret. + + +### Set it up + + + + In BookStack, create an API token and copy its id and secret. A page the token's user cannot read in full is synced with its title only. + + + Enter `base_url`, `token_id` and `token_secret`. + + + HydraDB lists the books in the instance. Select the books to sync. Their chapters and pages come with them. To reach items older than 30 days, raise `lookback_days` when you select them. + + + +One connector reads one BookStack instance, as one API token. + + + +Use provider `bookstack` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected book reads back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the books, chapters and pages updated since the last sync. +- **Edits:** An updated item is read again and replaces its document. A page's content is read again with it. +- **Deletions:** Deleted items are not removed. A page, chapter or book deleted in BookStack stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every BookStack item + + +When the item was last updated, written as the `Updated` line. Sets the result date. + + + +When the item was created. Sets the result date only when the update time is missing. Not searchable. + + + +`pages`, `chapters` or `books`. Limits a query to one kind of item. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `bookstack`. Not searchable. + + + + + +The BookStack user id of the item's owner. It does not restrict access. + + + +The owner's name, when it can be found. A search does not match it. + + + +The item's URL slug. + + + + +### Pages + +- **One document:** One BookStack page. +- **Title:** The page name. A page with no name is titled `BookStack page` and its id. +- **Text:** The page content as plain text, with its title and last-updated time. If the page's content could not be read, the title stands in for it. +- **Date:** When the page was last updated, else when it was created. +- **Link back:** None. +- **Files:** None. Images and files on pages are not synced. + + +The page's numeric BookStack id. Picks out one page. Not searchable. + + + +The id of the book that holds the page. Limits a query to one book. Not searchable. + + + +The id of the chapter that holds the page, when it is in one. Limits a query to one chapter. Not searchable. + + +### Chapters + +- **One document:** One chapter's name and description. Its pages are their own documents. +- **Title:** The chapter name. A chapter with no name is titled `BookStack chapter` and its id. +- **Text:** The chapter description, or the title when there is none, with the last-updated time. +- **Date:** When the chapter was last updated, else when it was created. +- **Link back:** None. + + +The chapter's numeric BookStack id. Picks out one chapter, and matches `additional_metadata.bookstack_chapter_id` on its pages. Not searchable. + + + +The id of the book that holds the chapter. Limits a query to one book. Not searchable. + + +### Books + +- **One document:** One book's name and description. Its chapters and pages are their own documents. +- **Title:** The book name. A book with no name is titled `BookStack book` and its id. +- **Text:** The book description, or the title when there is none, with the last-updated time. +- **Date:** When the book was last updated, else when it was created. +- **Link back:** None. + + +The book's numeric BookStack id. Picks out one book, and matches `additional_metadata.bookstack_book_id` on its chapters and pages. Not searchable. + + +**Example searches** + +- What does the runbook page say about restoring backups? +- Which pages in the Operations book mention VPN access? +- What is the Onboarding book about? + +## How it fits into the graph + +- Pages use the Page class. +- Chapters use the Page class. +- Books use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections BookStack creates** + +- No links between items. A page's book and chapter are kept as filters, not as graph links. +- No links to items in other tools. + +**People and groups** + +- No people are attached. The owner is kept with the item only. + +**Found in the text** + +The page text and the book and chapter descriptions. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Books you did not select. +- Items last updated before the `lookback_days` window on the first sync. +- Images and files attached to pages. +- Page revisions and comments. +- Shelves. +- BookStack permissions and roles. +- A link back to the item in BookStack. +- Deletions: deleted items stay in HydraDB. diff --git a/essentials/v2/connectors/calendly.mdx b/essentials/v2/connectors/calendly.mdx new file mode 100644 index 00000000..a1736a67 --- /dev/null +++ b/essentials/v2/connectors/calendly.mdx @@ -0,0 +1,180 @@ +--- +title: "Calendly" +description: "Sync the meetings booked through Calendly in your organization, one searchable document per meeting with its invitees and booking answers." +icon: "/images/connectors/calendly.svg" +--- + +Sync the meetings booked through Calendly in one organization. Each scheduled meeting is one document that combines its time, location, hosts and guests with the event type's description and every invitee's booking-form answers and cancellation reasons. + +Calendly permissions are not imported, so every synced meeting is visible to everyone who can query the collection unless you set an access rule. Canceled meetings stay in HydraDB, marked canceled, with their cancellation reasons. A change to only an invitee or an event type does not update a meeting's document until the meeting itself changes. + + +Calendly is in beta. + + +## Permissions + + +Calendly permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Calendly uses a personal access token and your organization's Calendly API URI. + + +A Calendly personal access token. + + + +Your organization's Calendly API URI, in the form `https://api.calendly.com/organizations//`. It limits the sync to that organization. + + +### Set it up + + + + Create a Calendly personal access token. + + + Find your own organization's API URI, in the form `https://api.calendly.com/organizations//`. + + + Paste the token as `auth_token` and the URI as `organization_url`. + + + HydraDB lists one item for the whole organization. Select it. You cannot pick individual meetings. + + + +One connector reads one Calendly organization. + + + +Use provider `calendly` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads meetings updated within the window set by `lookback_days`, 30 days by default. Meetings with no update time are read regardless. +- **New and changed items:** Each sync reads the meetings, invitees and event types updated since the last sync. +- **Edits:** A meeting whose update time changes is read again and rebuilt with its current event type and invitees. A change to only an invitee or an event type does not update the meeting's document until the meeting itself changes. +- **Deletions:** A canceled meeting stays in HydraDB with its status and any cancellation reasons. Meetings deleted in Calendly stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Meetings + +- **One document:** One scheduled meeting, with its invitees. +- **Title:** The meeting name, or `Calendly event ` when it has none. +- **Text:** The meeting name, a `Status` line, a `When` line with the start and end, a `Location` line, `Hosts` and `Guests` lines, and the event type's description. Then each invitee with name or email, status, cancellation reason and answered booking questions, then the meeting notes. The event type's name appears only when it has a description. The title is searchable too. +- **Date:** When the meeting was last updated, else when it starts. +- **Link back:** The meeting's join link, such as a Zoom or Google Meet link, not a Calendly page. It can be empty, for example for an in-person meeting. +- **Files:** None. + + +`active` or `canceled`, written as the `Status` line. + + + +When the meeting starts, written in the `When` line. Sets the result date when the meeting has no update time. + + + +When the meeting ends, written after the start in the `When` line when there is a start. + + + +Host names, or emails when there is no name, written as the `Hosts` line. Hosts are not attached to the meeting as people in the graph. + + + +The location type, such as `zoom` or `physical`, written as the `Location` line. + + + +The join link. Used as the link back, and written in the `Location` line when the meeting has a location type. + + + +The event type's name, written before its description when the description is not empty. To limit a query to one event type, filter on `additional_metadata.container_name`. + + + +When the meeting was last updated. Sets the result date and decides which meetings each sync reads. Not searchable. + + + +The meeting's Calendly API URI. Picks out one meeting. Not searchable. + + + +The event type's URI, also kept as `event_type`. Limits a query to meetings of one event type. It does not link meetings together. Not searchable. + + + +The event type's name. Limits a query to an event type by name. Not searchable under this key. + + + +Always `event_type`. Not searchable. + + + +Limits a query to this connector's meetings. Not searchable. + + + +Always `calendly`. Not searchable. + + + + + +When the meeting was booked, as distinct from when it takes place. + + + +How many invitees with a name or email were found when the document was built. + + + + +**Example searches** + +- Who booked a demo with us this week and what did they say they need? +- Why did invitees cancel their onboarding calls last month? +- Which meetings are booked under the Intro call event type? + +## How it fits into the graph + +- Meetings use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Calendly creates** + +No links between meetings or to other tools. The event type is a query filter, not a link. + +**People and groups** + +The connector does not attach hosts, guests or invitees to a meeting as people. Their names and emails are part of the meeting text. + +**Found in the text** + +The whole meeting text, including who booked, their booking answers and why they cancelled. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Routing forms, organization memberships and user records. +- Event types and bookings as documents of their own. +- Meetings last updated before the first sync's window. +- Calendly sharing permissions. +- Deletions: meetings deleted in Calendly stay in HydraDB. diff --git a/essentials/v2/connectors/clickup.mdx b/essentials/v2/connectors/clickup.mdx new file mode 100644 index 00000000..783d2cf0 --- /dev/null +++ b/essentials/v2/connectors/clickup.mdx @@ -0,0 +1,324 @@ +--- +title: "ClickUp" +description: "Sync every task, subtask and task comment from the ClickUp Workspaces you choose, plus one overview page per Workspace. ClickUp permissions are not imported." +icon: "/images/connectors/clickup.svg" +--- + +Sync every task and subtask, including closed and archived ones, from the ClickUp Workspaces you select. Each task is one document with its description, status, people, checklists, custom fields, and its list, folder and space names. Each comment is its own document, linked to its task. Each Workspace is one short overview page listing its members. + +ClickUp permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Task dependencies and linked tasks do not become links. Items deleted in ClickUp stay in HydraDB. + +## Permissions + + +ClickUp permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- ClickUp guest access and private Spaces, Lists and Tasks are not reproduced. Set an access rule on each Workspace that should be restricted. +- Every synced item carries a fixed note saying ClickUp visibility is not captured, in `additional_metadata.rbac_warning`. The note itself restricts nothing. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +ClickUp uses a personal API token. It has no scopes to choose: it sees what its user sees. + + +A ClickUp personal API token, which starts with `pk_`. + + +ClickUp limits requests per token by Workspace plan, starting at 100 a minute on Free, Unlimited and Business. To rotate the token, generate a new one, update the connector, check that HydraDB still lists your Workspaces and a sync succeeds, then revoke the old one. + +### Set it up + + + + In ClickUp, open your avatar, Settings, Apps, API Token, and generate a token. Use a dedicated account that can open every Workspace you plan to select. + + + Paste the token as `api_token`. + + + HydraDB lists every Workspace the token can see. Select the Workspaces to sync. Each selected Workspace syncs its tasks and subtasks, whether open, closed or archived. + + + +One connector reads what one token's ClickUp user can see. + + + +Use provider `clickup` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A newly selected Workspace reads back the window set by `lookback_days`, 30 days by default, measured on when tasks were last updated. The comments on those tasks are read in full, however old they are. Workspace overviews are read in full. +- **New and changed items:** Each sync reads the tasks updated since the last sync, whether open, closed or archived, and reads all comments on each of those tasks again. +- **Edits:** An edited task is picked up through its last-updated time and updates its document. A comment is read again only when its task is picked up. +- **Deletions:** Tasks and comments deleted in ClickUp stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every ClickUp item + + +Limits a query to this connector's items. Not searchable. + + + +Always `clickup`. Not searchable. + + + +A fixed note that ClickUp visibility is not captured and the item is open to everyone who can query the collection. It does not restrict access. Not searchable. + + +### Tasks + +- **One document:** One ClickUp task or subtask. Its comments are separate documents. +- **Title:** The task name, or `ClickUp task` and its id when the name is empty. +- **Text:** The task name, then the description as plain text when it differs from the name. Then `Status`, `Assignees`, `Priority`, `Tags`, `List`, `Folder` and `Space` lines, each checklist with its items marked `[ ]` or `[x]`, each custom field with a value as `name: value`, and one `Attachment` line per file name. The creator, the first assignee, the creation and closure dates, the task id and the parent are written into the task details too. The title is searchable too. +- **Date:** When the task was last updated, or when it was created if there is no update time. +- **Link back:** The task's page in ClickUp. +- **Files:** Files attached to the task are downloaded with the connector's token and read, and their text becomes searchable with the task. A file with no id or download address is skipped. A file that fails to download or is not a supported type keeps only its details. + + +The ClickUp task id. It keeps later syncs on the same document. + + + +The status label, written as the `Status` line. + + + +The priority label, written as the `Priority` line. + + + +Tag names, written as the `Tags` line. + + + +Every assignee's username, or email, written as the `Assignees` line. + + + +The first assignee's username, or email. The graph records that person as the assignee. Other assignees are only in the text. + + + +The first assignee's email, when available. Identifies the assignee in the graph. Not searchable. + + + +The creator's display name, or email. The graph records that person as the reporter. + + + +The creator's email, when available. Identifies the reporter in the graph. Not searchable. + + + +The names of the task's list, folder and space, written as `List`, `Folder` and `Space` lines. They are not filters, and they do not become items in the graph. + + + +Each checklist name and its items, marked done or not done. + + + +Each custom field that has a value, written as `name: value`. + + + +The text read from each attached file, searchable with the task. Each file name is also written as an `Attachment` line. + + + +When the task was created, written into the task details. Sets the result date only when there is no update time. + + + +When the task was closed, written into the task details. + + + +When the task was last updated. Sets the result date and decides when a sync picks the task up. Not searchable. + + + +The original times in milliseconds, as ClickUp sends them. They become `created_at`, `updated_at` and `resolved_at`. Not searchable. + + + +For a subtask, its parent task's id. Links the subtask to its parent. + + + +The ClickUp task id. Picks out one task. Not searchable. + + + + + +The creator's username, or email, and ClickUp id, as ClickUp sends them. The same person is searchable through `reporter`. + + + +The ClickUp ids of all assignees. + + + +The parent task id as ClickUp sends it. `parent_id` carries the searchable parent and the link. + + + +The due date. It is not written into the text. + + + +The due date in milliseconds, as ClickUp sends it. + + + +Dependency and linked-task references. They are not written into the text and do not become links. + + + +The Workspace id. + + + +The ids of the task's list, folder and space. + + + + +### Comments + +- **One document:** One comment on a task. +- **Title:** `Comment by on `, or `Comment on ` without an author. +- **Text:** A `Task` line with the task name and id, then the comment text. The author, the comment time and the task id are written with it. +- **Date:** When the comment was posted. +- **Link back:** The task's page in ClickUp. Comments have no link of their own. + + +The commenter's username, or email. The graph records the comment as written by that person. + + + +The commenter's email, when ClickUp returns it. Identifies the commenter in the graph. Not searchable. + + + +The name of the task, in the `Task` line, so a comment matches queries about its task. + + + +The id of the task the comment is on. Links the comment to that task. + + + +When the comment was posted, written as the `Created` line. + + + +The comment time in milliseconds, as ClickUp sends it. It becomes `created_at`. Not searchable. + + + +The ClickUp comment id. Picks out one comment. Not searchable. + + + +The id of the task. Returns every comment on one task. Not searchable. + + + + + +The commenter's ClickUp id. + + + +Whether the action assigned in the comment is resolved. + + + +The Workspace id. + + + + +### Workspace overviews + +- **One document:** One selected ClickUp Workspace. +- **Title:** The Workspace name, or `ClickUp workspace` and its id when the name is empty. +- **Text:** `ClickUp workspace:` and the name, then a `Members` line with member usernames or emails. The title is searchable too. +- **Date:** None. +- **Link back:** None. + + +Member display names, written as the `Members` line. Members are not added to the graph as people. + + + + + +The member details ClickUp returned. + + + +The Workspace color. + + + +The link to the Workspace avatar image. + + + + +**Example searches** + +- What is open and high priority in the Mobile list? +- Which checklist items are still open on the launch task? +- What did people say in the comments on the checkout redesign task? + +## How it fits into the graph + +- Tasks use the Ticket class. +- Comments use the Comment class. +- Workspace overviews use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections ClickUp creates** + +- A subtask to its parent task. +- A comment to its task. +- Task dependencies and linked tasks do not become links. +- No links to items in other tools. + +**People and groups** + +- The creator and the first assignee of each task. +- The author of each comment. +- Other assignees and Workspace members appear only in the text. + +**Found in the text** + +Task descriptions, checklist items, custom field values and comment text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Workspaces you did not select. +- Spaces, folders and lists as items of their own. Their names appear on tasks. +- Goals, time entries, tags as items of their own, custom field definitions and task templates. +- ClickUp visibility: guests, and private Spaces, Lists and Tasks. +- Comments marked deleted. +- Attached files with no usable id or download address. diff --git a/essentials/v2/connectors/coda.mdx b/essentials/v2/connectors/coda.mdx new file mode 100644 index 00000000..cda44adc --- /dev/null +++ b/essentials/v2/connectors/coda.mdx @@ -0,0 +1,218 @@ +--- +title: "Superhuman" +description: "Sync the Superhuman docs you choose: one document for each doc's details, one per page with its content, and one per table row. Superhuman permissions are not imported." +icon: "/images/connectors/coda.svg" +--- + +Sync the Superhuman docs you select. Each doc gives one document with its owner, workspace and folder, one document per page with the page's content, and one document per table row with its cell values. A page links to its parent page, or to its doc at the top level. Files in a row's attachment columns are downloaded when Superhuman hosts them. + +Superhuman permissions are not imported, so everything in the selected docs is visible to everyone who can query the collection unless you set an access rule. The first sync reaches only items updated in the last 30 days unless you raise `lookback_days`. Docs, pages and rows deleted in Superhuman stay in HydraDB. + + +Superhuman is in beta. + + +## Permissions + + +Superhuman permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Superhuman doc permissions are read but not applied. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Superhuman, formerly Coda, uses a Coda API token. The token belongs to an account, not to a workspace. + + +A Coda API token for the account whose docs you want synced. + + +### Set it up + + + + Create a Coda API token for the account whose docs you want synced. + + + Paste the token as `auth_token`. + + + HydraDB lists the docs the token can reach. Select the docs to sync. You select docs one by one: a whole workspace cannot be selected. To reach items older than 30 days, raise `lookback_days` when you select them. + + + +One connector reads the docs one account's token can reach. + + + +Use provider `coda` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected doc reads back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the docs, pages and rows updated since the last sync. A change to a page's content sends that page again. +- **Edits:** An edited doc, page or row is read again and replaces its document. +- **Deletions:** Deleted docs, pages and rows are not removed. They stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Superhuman item + + +When the doc, page or row was last updated, written as the `Updated` line. Sets the result date. + + + +When the item was created. Sets the result date only when the update time is missing. Not searchable. + + + +The doc id. Limits a query to one doc, with its pages and rows. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `coda`. Not searchable. + + +### Docs + +- **One document:** One doc's details. The doc's pages and table rows are their own documents. +- **Title:** The doc name. A doc with no name is titled `Coda doc` and its id. +- **Text:** The title, then `Owner`, `Workspace`, `Folder` and `Link` lines, leaving out empty ones. +- **Date:** When the doc was last updated, else when it was created. +- **Link back:** Opens the doc in Superhuman. + + +The name of the doc's owner, written as the `Owner` line, so a doc can be found by owner. The owner is not attached to the doc as a person in the graph. + + + +The workspace that holds the doc, written as the `Workspace` line. + + + +The doc's link, written as the `Link` line. + + +### Pages + +- **One document:** One page of a doc, with its content. +- **Title:** The page name. A page with no name is titled `Coda page` and its id. +- **Text:** The page's content as text, with its title and subtitle. A very large page can be cut short. +- **Date:** When the page was last updated, else when it was created. +- **Link back:** Opens the page in Superhuman. + + +The page subtitle, written as a `Subtitle` line. + + + +The page id. Picks out one page. Not searchable. + + + +The parent page, or the doc for a top-level page. Links the page to it, so a doc's page tree is connected. Not searchable. + + + + + +The id of the doc that holds the page. To limit a query to a doc, use `additional_metadata.coda_doc_id`. + + + +The page type: `canvas`, `embed` or `syncPage`. + + + +How many content elements were read from the page, blank ones included. Not a measure of how much text is searchable. + + + +True when the page's content was too large and was cut short. + + + + +### Table rows + +- **One document:** One row of a table. +- **Title:** The table name, a dash and the row name. A row with no name is titled by its table alone. When the table is not known, the row name alone, or `Coda row` and its id. +- **Text:** The title, a `Table` line when the table is known, then each non-empty cell as a labelled line, in column order. A column whose name is not known is labelled with its id and comes last. Money values show the amount and currency. Numbers are rounded to six decimal places. Cell values HydraDB cannot show as text are left out. A column that refers to another row is text, not a link. +- **Date:** When the row was last updated, else when it was created. +- **Link back:** Opens the row in Superhuman, or its table when the row has no link. +- **Files:** Files in attachment columns are downloaded so their text can be read, but only when they are hosted on coda.io or codahosted.io. Links to files elsewhere are dropped. + + +The row's table. Starts the title and is the `Table` line, so rows can be found by table. + + + +The table id. Limits a query to one table's rows. Not searchable. + + + +The row id. Picks out one row. Not searchable. + + + + + +The id of the doc that holds the row. + + + +The id of the row's table. + + + + +**Example searches** + +- What does the Q4 planning doc say about hiring? +- Which rows in the Roadmap table have status Blocked? +- Who owns the Team Rituals doc? + +## How it fits into the graph + +- Docs use the Page class. +- Pages use the Page class. +- Table rows use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Superhuman creates** + +- A page to its parent page, or to its doc for a top-level page. +- Rows are not linked to their table or doc in the graph. +- No links to items in other tools. + +**People and groups** + +- No people are attached. A doc owner's name is part of the doc's text only. + +**Found in the text** + +The doc details, page content and row cell values. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Docs you did not select. +- Items last updated before the `lookback_days` window on the first sync. +- Controls, formulas as definitions, and doc permissions. Formula results shown in row cells can still be searchable. +- Files in attachment columns that are not hosted on coda.io or codahosted.io. +- The rest of a very large page after it is cut short. +- Deletions: deleted docs, pages and rows stay in HydraDB. diff --git a/essentials/v2/connectors/confluence.mdx b/essentials/v2/connectors/confluence.mdx new file mode 100644 index 00000000..45f27127 --- /dev/null +++ b/essentials/v2/connectors/confluence.mdx @@ -0,0 +1,254 @@ +--- +title: "Confluence" +description: "Sync pages, blog posts and attached files from the Confluence Cloud spaces you choose. With Enforce ACL on, space permissions and page restrictions decide who can find each item." +icon: "/images/connectors/confluence.svg" +--- + +Sync pages, blog posts and their attached files from the Confluence Cloud spaces you select. Each page or blog post is one document, holding its text with the markup removed. Each attached file is its own document, linked to its page. Text from supported attachments is searchable when HydraDB can download and read the files. A page links to its parent page. + +Space permissions and page view restrictions, including those inherited from parent pages, restrict search when Enforce ACL is on. An attached file follows only its space's permissions until its page has synced, so at first it can have a wider audience than its restricted page. Comments are not synced. Pages and files deleted in Confluence stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Confluence permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Two levels apply. A space's view permissions decide who can read its pages, and a space open to all licensed users can be read by everyone who can query the collection. A page's own view restriction, and the restrictions of its restricted parent pages, narrow that further: a reader must meet every one of them. An attached file follows its page. +- **How a person is identified:** A user's email address. Confluence groups are turned into their members' email addresses. This works only when the site shows user email addresses. +- **When permissions cannot be read:** If HydraDB cannot read a space's permissions, or cannot resolve a page's restrictions, the connector reports a permission warning. A page restricted to a user whose email the site hides cannot be resolved. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Reading a space's permissions needs the Space admin permission on that space. +- A page whose restriction levels resolve to nobody, or have no reader in common, is hidden. +- A file attached to a restricted page follows the space's permissions until its page has synced. +- Space admins' access through their admin role is not recorded. +- A restriction change that does not edit the page is checked on later syncs, not the first one. A restriction removed from a page can wait until the page is next edited. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Confluence uses an Atlassian account email and an Atlassian API token. The token carries that user's own space permissions. + + +Your Confluence Cloud address, for example `https://your-domain.atlassian.net/wiki`. + + + +The Atlassian account email used to sign in. + + + +An Atlassian API token for that account. + + +**What the Atlassian account needs** + +- `View space`: required. Lists spaces and their pages. +- `View pages`: required. Reads page and blog post text. +- `Space admin`: optional, for search that follows Confluence permissions. Reads each space's permission list. +- `Browse users and groups`: optional, for search that follows Confluence permissions. Turns groups into their members' emails and users into emails. + +For search that follows Confluence permissions, the site must also show user email addresses. Turn this on in admin.atlassian.com, under Settings, User email visibility. + +### Set it up + + + + Use an Atlassian account that can view every space you want synced. For search that follows Confluence permissions, give it Space admin on each of those spaces, and make the site show user email addresses. + + + Create an Atlassian API token for that account. + + + Enter `base_url`, `email` and `api_token`. + + + HydraDB lists the site's spaces. Select the spaces to sync. Each selected space syncs on its own. + + + +One connector reads one Confluence Cloud site, as one Atlassian user. + + + +Use provider `confluence` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected space reads back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the pages, blog posts and files modified since the last sync, space by space. A newly uploaded file is picked up on its own, without a page edit. +- **Edits:** An edited page has a new version, so the next sync reads it again and updates its document. +- **Deletions:** Deleted pages and files are not removed. They stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Confluence item + + +When the page or file last changed, written as the `Updated` line. Sets the result date. + + + +For a page, its parent page, empty at the top of a space. For a file, the page or blog post it is attached to. Links the item to that page. Not searchable. + + + +The space key, for example `ENG`. Limits a query to one space. Not searchable. + + + +The space display name. Limits a query to one space by name. Not searchable. + + + +Always `space`. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `confluence`. Not searchable. + + + +The space's view permissions and the page's restrictions, including inherited ones. A file uses its page's. Together they decide who can read the item when Enforce ACL is on. Not searchable. + + + + + +The space display name. To limit a query to a space, use `additional_metadata.container_name`. + + + +The space key. To limit a query to a space, use `additional_metadata.container_id`. + + + + +### Pages and blog posts + +- **One document:** One page or one blog post. +- **Title:** The page or blog post title. One with no title is titled `Confluence content` and its id. +- **Text:** The page body with all markup removed. If that leaves nothing, the title is used. The title, author and last-updated time are searchable too. Attached files are separate documents. +- **Date:** The time of the page's current version. +- **Link back:** Opens the page in Confluence. + + +The creator's display name, or email if there is no name, written as the `Author` line. The graph records the page as written by that person. + + + +The creator's email, when Confluence shows it. Gives the author an email in the graph, so the same person is recognised across tools. Not searchable. + + + +People @mentioned in the page, as Confluence usernames or user keys, not display names. The graph records each as mentioned. Not searchable. + + + + + +`page` or `blogpost`. + + + +The Confluence status, for example `current`. + + + +When the page was created. + + + +The name or email of whoever made the current version. Not attached to the page as a person in the graph. + + + +That editor's email, when Confluence shows it. + + + + +### Attached files + +- **One document:** One file attached to a page or blog post. +- **Title:** The file name. A file with no name is titled `Confluence attachment` and its id. +- **Text:** The text read from the file. If no text can be read, the file name is still searchable. The last-modified time is searchable too. +- **Date:** When the file was last modified. +- **Link back:** Opens the file in Confluence. +- **Files:** Each file is downloaded with the connector's credentials. Text from supported attachments is searchable when HydraDB can download and read the files. Only files attached to pages or blog posts are kept. Space logos and template images are left out. + + +The id of the page the file is attached to. Finds every file on one page. Not searchable. + + + +The attachment id. Picks out one file. Not searchable. + + + +The file id, which stays the same across the file's versions. Matches a file across versions. Not searchable. + + + +The file's type, for example `application/pdf`. Limits a query to one file type. Not searchable. + + + + + +The file's type. + + + +When the file was uploaded. + + + +The size in bytes. + + + + +**Example searches** + +- What does the ENG space say about our deploy process? +- Who wrote the incident postmortem page for the March outage? +- What is in the PDFs attached to the Security Policy page? + +## How it fits into the graph + +- Pages and blog posts use the Page class. +- Attached files use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Confluence creates** + +- A page to its parent page. +- An attached file to its page or blog post. +- No links to items in other tools. A link to another page written in the page text does not become a connection. + +**People and groups** + +- The creator of each page and blog post. +- People @mentioned in a page, by Confluence username or user key. +- The editor of the current version is kept with the page but not attached as a person. + +**Found in the text** + +The page text and the text read from attached files. A file is read together with its page's title and text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Page comments and inline comments. +- Space logos and template images. +- Spaces the Atlassian account cannot view. +- Deletions: deleted pages and files stay in HydraDB. diff --git a/essentials/v2/connectors/contentful.mdx b/essentials/v2/connectors/contentful.mdx new file mode 100644 index 00000000..95bfc098 --- /dev/null +++ b/essentials/v2/connectors/contentful.mdx @@ -0,0 +1,174 @@ +--- +title: "Contentful" +description: "Sync entries, and pending task text on them, from the Contentful spaces you choose. Contentful permissions are not imported." +icon: "/images/connectors/contentful.svg" +--- + +Sync the entries of the Contentful spaces you select, from every environment of each space. Each entry in each environment is one document, with its text fields written as labelled lines. Task text on an entry is its own document, linked to the entry. + +Contentful permissions are not imported, so every synced entry is visible to everyone who can query the collection unless you set an access rule. Only one language is kept for each field, English (en-US) first. Assets, reference fields and authors are not synced, and entries deleted in Contentful stay in HydraDB. + +## Permissions + + +Contentful permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Contentful uses a Content Management API token. + + +A Contentful Content Management API token. + + + +The id of a Contentful space. Required, but the spaces synced are the ones you select. A space named here and not selected is not synced. + + +### Set it up + + + + In Contentful, create a Content Management API token. + + + Paste the token as `api_token` and enter a space id as `space_id`. + + + HydraDB lists the spaces the token can reach. Select the spaces to sync. To reach entries older than 30 days, raise `lookback_days` when you select them. + + + +One connector reads the spaces one Content Management API token can reach. + + + +Use provider `contentful` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected space reads back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the entries and tasks updated since the last sync. +- **Edits:** An edited entry is read again and replaces its document. +- **Deletions:** Deleted entries and tasks are not removed. They stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Contentful item + + +When the entry or task was last updated, written as the `Updated` line. Sets an entry's result date, and a task's when it has no creation time. + + + +The entry id. On an entry, picks out that entry. On a task, the entry it is on, so one key finds an entry and its tasks. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `contentful`. Not searchable. + + + + + +The space id. Keeps items from different spaces apart. There is no filter on it. + + + +The environment id, often `master`. Keeps the same entry in different environments apart. There is no filter on it. + + + + +### Entries + +- **One document:** One entry in one environment. +- **Title:** The first non-empty text in the entry's `title`, `name`, `heading` or `slug` field, checking en-US first and then other languages alphabetically. An entry with none is titled `Contentful entry` and its id. +- **Text:** The entry's text fields as labelled lines: `title`, `name`, `heading` and `slug` first, then other fields alphabetically. Each field uses its first non-empty value, en-US first, then other languages alphabetically. Rich text is flattened, and links keep their URLs in brackets. Numbers, true or false values and lists of text are included. Reference fields and embedded entries or assets are left out. If no field has text, the title stands in. +- **Date:** When the entry was last updated, else when it was created. +- **Link back:** Opens the entry's editor page in the Contentful web app. +- **Files:** None. Assets, such as images and files, are not synced. + + +When the entry was created. Sets the result date only when the update time is missing. Not searchable. + + +### Tasks + +- **One document:** One task on an entry. Tasks come from Contentful's pending-task list for the token, not from a complete task history. Tasks with no text are skipped. +- **Title:** `Contentful task` and the task id. +- **Text:** The task text, with `Created`, `Updated` and `Parent` lines. +- **Date:** When the task was created, else when it was last updated. +- **Link back:** None. + + +When the task was created, written as the `Created` line. Sets the result date. + + + +The entry the task is on, written as the `Parent` line. Links the task to its entry. + + + +The task id. Picks out one task. Not searchable. + + + + + +`active` or `resolved`. A query cannot match or filter on it. + + + + +**Example searches** + +- What does our Pricing FAQ entry say about enterprise discounts? +- Which blog post entries mention the 2026 conference? +- What task text is attached to the homepage hero entry? + +## How it fits into the graph + +- Entries use the Page class. +- Tasks use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Contentful creates** + +- A task to the entry it is on. +- Entries are not linked to the entries or assets they reference. +- No links to items in other tools. + +**People and groups** + +- No people are attached. No author, assignee or editor is recorded. + +**Found in the text** + +The entry's text fields and the task text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Spaces you did not select. +- Entries last updated before the `lookback_days` window on the first sync. +- Assets, such as images and files, and their text. +- Values of reference fields that point to other entries or assets. +- Other languages of a field once one language has a value. +- Content types, tags and taxonomy. +- Authors, assignees and editors. +- A complete task history. +- Deletions: deleted entries stay in HydraDB. diff --git a/essentials/v2/connectors/copper.mdx b/essentials/v2/connectors/copper.mdx new file mode 100644 index 00000000..779dcf7d --- /dev/null +++ b/essentials/v2/connectors/copper.mdx @@ -0,0 +1,271 @@ +--- +title: "Copper" +description: "Sync opportunities, leads, tasks, projects, people, companies and logged activities from one Copper account. Copper permissions are not imported." +icon: "/images/connectors/copper-light.svg" +--- + +Sync a whole Copper account: opportunities, leads, tasks, projects, people, companies, and the notes and logged interactions on them. Each record or activity is one document. An activity links to the record it is logged on. + +One account-wide resource covers everything the API key can read. Copper permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Records deleted in Copper stay in HydraDB. Activities with no text, such as stage changes, are skipped. + + +Copper is in beta. + + +## Permissions + + +Copper permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Copper uses an API key together with the email of the Copper user the key belongs to. + + +A Copper API key. + + + +The email of the Copper user the API key belongs to. + + +### Set it up + + + + In Copper, get an API key. Note the email of the Copper user it belongs to. + + + Paste the key as `api_key` and the user's email as `user_email`. + + + HydraDB lists one account-wide resource, All data. Select it to sync everything the key can read in the account. + + + +One connector reads one Copper account. + + + +Use provider `copper` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads records and activities modified since the last sync. +- **Edits:** An edited record is read again and updates its document. +- **Deletions:** Deleted records are not removed. A record deleted in Copper stays searchable in HydraDB. +- If the account does not have a Copper add-on feature enabled, the record type that needs it is skipped with a warning and the other types still sync. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Copper item + + +The Copper record id. Targets one record, and keeps later syncs on the same document. Tasks carry a `task:` prefix and projects a `project:` prefix, so include it when you filter on a task or project. Not searchable. + + + +The record type, such as `opportunities`, `people` or `activities_search`. Limits a query to one type. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `copper`. Not searchable. + + +### Opportunities, leads, tasks and projects + +- **One document:** One opportunity, lead, task or project. +- **Title:** The record's name. +- **Text:** The record's free-text details, then `Label: value` lines. Opportunities: `Name`, `Company`, `Status`, `Value` with its currency, `Close date` and `Assignee`. Leads: `Name`, `Company`, `Title`, `Status`, `Value`, `Email` and `Assignee`. Tasks: `Name`, `Status`, `Priority`, `Due date`, `Tags` and `Assignee`. Projects: `Name`, `Status`, `Company`, `Tags` and `Assignee`. The name is searchable too. +- **Date:** When the record was last modified, else when it was created. +- **Link back:** None. Use `additional_metadata.copper_id` to find the record in Copper. + + +The assigned user's name, or their email when the name is missing, written as the `Assignee` line. The graph records the record as assigned to that person. + + + +The Copper status, such as Open, Won, Lost or Completed, written as the `Status` line. + + + +An opportunity's or lead's value, written as the `Value` line. + + + +The related company's name on opportunities, leads and projects, written as the `Company` line. + + + +An opportunity's close date, written as the `Close date` line. + + + +A task's priority, written as the `Priority` line. + + + +A task's due time, written as the `Due date` line. + + + +When the record was created, written as a `Created` line. Used as the result date only when the modification time is missing. + + + +When the record was last modified. Not searchable. + + + + + +An opportunity's pipeline id. It is not turned into a name. + + + +An opportunity's stage id. It is not turned into a name. + + + +When a task was completed. It is not the result date. + + + +The record type. Filter on it with `additional_metadata.copper_object`. + + + + +### People and companies + +- **One document:** One person, or one company. +- **Title:** The person's or company's name. +- **Text:** The record's free-text details, then `Label: value` lines. People: `Name`, `Company`, `Title`, `Emails` and `Assignee`. Companies: `Name`, `Email domain` and `Assignee`. The name is searchable too. +- **Date:** When the record was last modified, else when it was created. +- **Link back:** None. Use `additional_metadata.copper_id` to find the record in Copper. + + +The owner's name, written as the `Assignee` line, where HydraDB can identify the person. It does not create an assignee relationship. + + + +A person's company, written as the `Company` line. + + + +A person's job title, written as the `Title` line. + + + +A company's email domain, written as the `Email domain` line, so a company can be found by its domain. + + + +When the record was last modified. Not searchable. + + + +When the record was created. Used as the result date only when the modification time is missing. Not searchable. + + + + + +`people` or `companies`. Filter on it with `additional_metadata.copper_object`. + + + + +### Activities + +- **One document:** One note or logged interaction that has text. Activities with no text, such as stage changes, are skipped. +- **Title:** `Comment by` and the name of the user who logged it. Without an author, the first 80 characters of the text. The activity type is not used as the title and is not searchable. +- **Text:** The activity's details text, with the author, the record it is logged on, and its created and updated times. +- **Date:** When the activity record was last modified, else when it was created. +- **Link back:** None. + + +The user who logged the activity, as a name. The graph records the activity as written by that person. + + + +The record the activity is logged on, written as a `Parent` line. Links the activity to that record when it is a person, lead, opportunity, company, project or task. + + + +The bare id of the record the activity is logged on, with no prefix. Returns every activity logged on one record. Not searchable. + + + +When the activity record was last modified, written as an `Updated` line. + + + +When the activity record was created, written as a `Created` line. Used as the result date only when the modification time is missing. + + + + + +When the activity happened. It is not the result date. + + + +The type of record the activity is logged on: person, lead, opportunity, company, project or task. + + + + +**Example searches** + +- Which opportunities for Acme are open and what are they worth? +- What was the last note logged on this lead? +- Which tasks are due this week and who owns them? + +## How it fits into the graph + +- Opportunities, leads, tasks and projects use the Ticket class. +- People and companies use the Record class. +- Activities use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Copper creates** + +- An activity to the person, lead, opportunity, company, project or task it is logged on. +- An opportunity to its company and its primary contact. +- A person to their company. +- A task or project to its related record, and a project to its company. +- A link is made only to record types this connector syncs. No links to other tools. + +**People and groups** + +- The assignee of each opportunity, lead, task and project. +- The author of each activity. +- The assignee of a person or company appears only in its text. + +**Found in the text** + +The free-text details of every record, the `Label: value` lines, and the text of notes and logged interactions. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Activities with no text, such as stage changes. +- Custom field values. +- Pipelines, stages, tags, lead statuses, loss reasons and other Copper settings, as documents of their own. +- Files attached to records. +- Deletions: deleted records stay in HydraDB. diff --git a/essentials/v2/connectors/datadog.mdx b/essentials/v2/connectors/datadog.mdx new file mode 100644 index 00000000..d85f0ce3 --- /dev/null +++ b/essentials/v2/connectors/datadog.mdx @@ -0,0 +1,324 @@ +--- +title: "Datadog" +description: "Sync monitors, dashboards, SLOs, notebooks and incidents from your Datadog organization, plus log, metric and SLO summaries. Only private incidents carry a Datadog restriction." +icon: "/images/connectors/datadog-light.svg" +--- + +Sync monitors with their runbook messages, dashboard summaries, SLO definitions, notebooks and incidents from one Datadog organization. Each is one document. Each sync also adds a log count for the sync window, and metric and SLO histories when you set their query or SLO id. + +Raw logs, traces, metric points and dashboard widgets are not synced. Only incidents carry a Datadog restriction: with Enforce ACL on, a private incident is hidden from everyone, including its participants. Items deleted in Datadog stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Datadog permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Only incidents carry a Datadog restriction. An incident Datadog marks private can be read by no one, not even its participants, because Datadog does not list them. Monitors, dashboards, SLOs, notebooks, log and metric summaries, and incidents visible to the organization follow the access rule you set on the resource. With no rule, everyone who can query the collection can read them. +- **How a person is identified:** No people are read. A private incident is closed to everyone. +- **When permissions cannot be read:** If Datadog reports an incident visibility HydraDB does not recognise, HydraDB makes no permission claim for that incident. It follows the access rule you set on its resource. With no rule, everyone who can query the collection can read it. +- With Enforce ACL off, private incidents are searchable like any other item. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Datadog uses an API key and an application key. The application key's scopes decide what syncs. + + +A Datadog API key, from Organization Settings, API Keys. It identifies your org. + + + +A Datadog application key, from Organization Settings, Application Keys. It is created without scopes, so edit it afterwards to add the scopes below. + + +**Connector settings** + + +Your Datadog site if it is not US1, for example `us5.datadoghq.com` or `datadoghq.eu`. + + + +A full logs query to count. Takes priority over `log_service`. + + + +One service name to narrow the log count. Ignored when `log_query` is set. + + + +A log measure to sum alongside the count, for example `@duration`. + + + +A metrics query to sync as a history. Leave it blank to skip metrics. + + + +An SLO id whose history to sync, labelled US. Every SLO id field reads from your configured site. + + + +An SLO id whose history to sync, labelled EU. + + + +An SLO id whose history to sync, labelled CA. + + +**Scopes to add to the application key** + +- `timeseries_query`: runs `metric_query`. +- `slos_read`: reads SLO history. +- `logs_read_data`: runs the log count. +- `monitors_read` +- `dashboards_read` +- `notebooks_read` +- `incident_read`: if Datadog refuses it on the first request, incidents are skipped and everything else syncs. + +An application key left without scopes has its owner's full permissions. Set exactly these scopes. Most refused reads fail the sync. + +### Set it up + + + + In Datadog, create an API key under Organization Settings, API Keys, and an application key under Organization Settings, Application Keys. + + + Open the new application key and edit its scopes to exactly the list above. + + + Paste the keys as `api_key` and `app_key`. Set `site` if your org is not on US1. + + + There is nothing to browse. Select the single All data resource. + + + Narrow the log count with `log_query` or `log_service`, and add `log_measure` for a sum. Left blank, logs are still counted across the default `main` index, normally as one total. Set `metric_query` and the SLO id fields to sync those histories. Left blank, they are skipped. + + + +One connector reads one Datadog organization on one site. + + + +Use provider `datadog` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Monitors, dashboards, SLOs, notebooks and incidents are read in full, whatever their age. The log count, metric history and SLO history cover the window set by `lookback_days`, 30 days by default. Each metric or SLO history document covers the month up to one day, not that day alone. +- **New and changed items:** Monitors, dashboards, SLOs, notebooks and incidents are read in full on every sync, and ones that did not change are skipped. Metric and SLO histories add documents as days pass. The log count is recalculated for each sync window. +- **Edits:** A changed monitor, dashboard, SLO, notebook or incident updates its document on the next sync. +- **Deletions:** Items deleted in Datadog stay searchable in HydraDB. Dashboards Datadog has marked as deleted are not synced. +- A changed log count can become a new document instead of replacing the old one, so earlier counts can stay searchable. +- An unknown metric can return an empty history. +- If HydraDB cannot read every incident, the sync fails instead of keeping a partial list. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Datadog item + + +The kind of record: `monitors`, `dashboards`, `slos`, `notebooks`, `incidents`, `aggregate_logs`, `metric_response_time`, `slo_history_us_prod`, `slo_history_eu_prod` or `slo_history_ca_prod`. Keeps only monitors, only incidents, and so on. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `datadog`. Not searchable. + + + + + +The kind of record, the same value as `additional_metadata.datadog_stream`. + + + + +### Monitors + +- **One document:** One monitor. +- **Title:** The monitor name, else `Datadog monitor`. +- **Text:** The name, then `Type`, `Status`, `Priority`, `Query`, `Tags`, `Created by` and `Modified` lines, then the monitor message, usually the runbook, word for word. The title is searchable too. +- **Date:** When the monitor was last modified. +- **Link back:** None. + + +When the monitor was last modified, written as the `Modified` line. + + + +Each `service:` tag links the monitor to that service, as `service:`, together with the SLOs and incidents of the same service. The tags themselves are searchable in the `Tags` line. Not searchable as links. + + + +A composite monitor links to each monitor in its query. Not searchable as links. + + +### Dashboards + +- **One document:** One dashboard summary, without its widgets. +- **Title:** The dashboard title, else `Datadog dashboard`. +- **Text:** The title, then `Description`, `Author`, `Layout`, `URL` and `Modified` lines. +- **Date:** When the dashboard was last modified. +- **Link back:** None. The dashboard's address is the searchable `URL` line. + + +When the dashboard was last modified, written as the `Modified` line. + + +### SLOs + +- **One document:** One SLO definition. +- **Title:** The SLO name, else `Datadog SLO`. +- **Text:** The name, then `Description`, `Type`, `Timeframe`, the target or per-timeframe thresholds, the `Numerator` and `Denominator` queries, and `Tags`. The title is searchable too. +- **Date:** When the SLO was last modified. +- **Link back:** None. + + +Links the SLO to each monitor it is built on. Not searchable. + + + +Each `service:` tag links the SLO to that service, as `service:`. Not searchable as links. + + + +When the SLO was last modified. Not searchable. + + +### Notebooks + +- **One document:** One notebook with its markdown cells. +- **Title:** The notebook name, else `Datadog notebook`. +- **Text:** The name, then `Author`, `Status` and `Modified` lines, then the text of every markdown cell. Graph cells add nothing. The title is searchable too. +- **Date:** When the notebook was last modified. +- **Link back:** None. + + +When the notebook was last modified, written as the `Modified` line. + + +### Incidents + +- **One document:** One declared incident, private ones included. +- **Title:** The incident title, else `Datadog incident`. +- **Text:** The title, then `Visibility`, `State`, `Severity`, `Customer impacted`, `Customer impact scope`, `Declared`, `Detected` and `Resolved` lines, and the incident's own fields, such as services and teams. +- **Date:** When the incident was last modified. +- **Link back:** None. +- **Files:** A postmortem notebook attached to the incident becomes a link to that notebook. Other attachments are not read. + + +`organization` or `private`, written as the `Visibility` line. With Enforce ACL on, a private incident is hidden from everyone. + + + +Links the incident to its postmortem notebook. Not searchable as a link. + + + +Each service named on the incident links it to that service, as `service:`. Not searchable as links. + + + +When the incident was last modified. Not searchable. + + +### Log counts + +- **One document:** One log count for the sync window, usually a single total. Individual log messages are not synced. +- **Title:** `Datadog log aggregate`, with the host and status added when present. +- **Text:** `Host`, `Status` and `Count` lines, and the sum of `log_measure` when set. The title is searchable too. +- **Date:** None. +- **Link back:** None. + + +The host and status the count is grouped by, in the title and text. Usually empty for the default total. + + +### Metric histories + +- **One document:** One window of `metric_query`. Only when `metric_query` is set. +- **Title:** `Datadog metric:` followed by the metric or query. +- **Text:** `Query` and `Window` lines, and one `Series` line per returned series with a summary of its points. The title is searchable too. +- **Date:** The end of the window. +- **Link back:** None. + + +The query, the metric name and the window. The window end is the result date. + + +### SLO histories + +- **One document:** One history window of an SLO id set in `slo_id_us`, `slo_id_eu` or `slo_id_ca`. +- **Title:** A `Datadog SLO` history title with the SLO name. +- **Text:** `SLO`, `Description`, `SLI Value`, `Target`, `Type`, `Tags`, `Creator`, `Window`, `Region` and `SLO Id` lines. The title is searchable too. +- **Date:** The end of the window. +- **Link back:** None. + + +The SLO id, written as the `SLO Id` line. Links the history window to the SLO's own record when it is synced. + + + +The measured value, the target and the region label. The region is a label only. + + + +The history period, written as the `Window` line. The window end is the result date. + + +**Example searches** + +- What is the runbook for the checkout latency monitor? +- Which SLOs are built on the api-errors monitor? +- What did the on-call write in the database migration notebook? + +## How it fits into the graph + +- Monitors use the Record class. +- Dashboards use the Record class. +- SLOs use the Record class. +- Notebooks use the Record class. +- Incidents use the Record class. +- Log counts use the Record class. +- Metric histories use the Record class. +- SLO histories use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Datadog creates** + +- An SLO to each monitor it is built on. +- A composite monitor to each monitor in its query. +- An incident to its postmortem notebook. +- An SLO history window to its SLO. +- Monitors, SLOs and incidents to their service, from `service:` tags and incident service fields. +- Dashboards are not linked to the monitors or SLOs they show, because widgets are not synced. +- Links reach only items this connector has synced, that are not deleted. No links to items in other tools. + +**People and groups** + +No one is attached as a person in the graph. Monitor creators and dashboard and notebook authors appear only in the text. + +**Found in the text** + +Monitor messages, notebook cells, descriptions and incident text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Dashboard widgets and graphs. +- Raw logs, traces, events and metric points beyond the log count, `metric_query` and the SLO ids you set. +- Log indexes other than `main`. +- Notebook graph cells. +- Incident timelines, to-dos and attachments other than postmortem notebook links. +- Synthetics, security signals, RUM and APM. +- Dashboards Datadog has marked as deleted. diff --git a/essentials/v2/connectors/discord.mdx b/essentials/v2/connectors/discord.mdx new file mode 100644 index 00000000..fe1341a8 --- /dev/null +++ b/essentials/v2/connectors/discord.mdx @@ -0,0 +1,249 @@ +--- +title: "Discord" +description: "Sync the messages a Discord bot can read in the servers you choose, one document per message. Discord channel and role permissions are not carried over." +icon: "/images/connectors/discord.svg" +--- + +Sync messages from the Discord servers you select: channel histories, including the text chat of voice and stage channels, and active and archived threads, including forum and media threads. Each message is one document. A reply is its own document and links to the message it answers. Text from PDF and DOCX attachments is searchable with the message when it can be read. + +Discord permissions are not imported, so private and role-restricted channels are visible to everyone who can query the collection unless you set an access rule on the server. Each sync reads the server's lookback window again, so edits inside it are picked up. Messages deleted in Discord stay in HydraDB. + +## Permissions + + +Discord permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Discord does not expose member email addresses, so roles and channel permissions cannot be matched to the people who query HydraDB. +- Private channels and role-restricted channels are not restricted in HydraDB. Set an access rule on the server if they must stay private. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Discord uses the token of a bot in your Discord application. What the bot can read comes from the permissions it is granted when you invite it. + + +The token of a bot in your Discord application. + + +**What the bot needs** + +- `bot`: OAuth2 scope, used when you invite the bot. +- `View Channels`: on each channel to sync. +- `Read Message History`: on each channel to sync. +- `Message Content Intent`: turned on under Bot, Privileged Gateway Intents. + +Without Message Content Intent, every sync fails rather than indexing empty messages. + +### Set it up + + + + In the Discord Developer Portal, create an application and a bot, and copy the bot token. + + + Under Bot, Privileged Gateway Intents, turn on Message Content Intent. HydraDB checks it and refuses to sync without it. + + + Invite the bot to each server with the OAuth2 scope `bot`. Grant View Channels and Read Message History on every channel to sync. + + + Paste the token as `bot_token`. + + + HydraDB lists every server the bot is a member of. Select the servers to sync. With no server selected, nothing is synced. + + + +One connector reads the servers one Discord bot has joined. + + + +Use provider `discord` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each server reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the server's lookback window again and updates messages by id. +- **Edits:** An edit is picked up while the message is still inside the server's lookback window. Edits to older messages are not. +- **Deletions:** Deleted messages are not removed. A message deleted in Discord stays searchable in HydraDB. +- A private archived thread is read only when the bot can see it or has joined it. Histories the bot cannot read are skipped with a warning. +- Through the API, you can choose to sync only new messages: set `sync_mode` to `new_only` on a server when you configure the connector. Edits to older messages are then missed, even inside the lookback window. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Discord item + + +The author's server nickname, else global display name, else username. On a message it is the From line, and the graph records the message as sent by that person. On a reply it is the Author line, and the graph records the reply as written by that person. + + + +When the message was sent, written as the Sent line on a message and the Created line on a reply. + + + +When the message was last edited, else when it was sent. Searchable on replies, as the Updated line. Not searchable on other messages. + + + +Display names of the users mentioned. Known mentions are written into the text as names. The graph records each as mentioned. A mention that cannot be resolved keeps its raw Discord syntax. + + + +Attachment file names, written after `Attachments:`. A message whose only content is a file of an unsupported type is still found by its file name. + + + +Text read from PDF and DOCX attachments, searchable with the message. + + + +Sticker names, written after `Stickers:`. + + + +The message this one replies to or forwards. Joins a reply to the message it answers, and a forward to its original. Not searchable as a link, though a reply's text ends with the parent message id. + + + +Loom share or embed links in the text or in embeds, up to 50 per message. Links the message to that Loom video. Not searchable as a link, though the link stays in the text. + + + +The message id. Picks out one message. Not searchable. + + + +The server id. Limits a query to one server. Not searchable. + + + +The channel or thread id. Limits a query to one channel or thread. Not searchable. + + + +The author's user or bot id. Limits a query to one author, even after a display name change. Not searchable. + + + +Discord's numeric message type. Includes or excludes message types. Not searchable. + + + +Whether the message was pinned when it was synced. Not searchable. + + + +Whether the message was sent as text-to-speech. Not searchable. + + + +Whether the message has at least one named attachment, even when the file text could not be read. Not searchable. + + + +A fixed note on every message that Discord permissions are not imported. An access rule you set on the server still applies. Not searchable. + + + +Limits a query to this connector's messages. Not searchable. + + + +Always `discord`. Not searchable. + + + + + +The channel or thread name, so you can see where a result came from. To limit a query to a channel, use `additional_metadata.discord_channel_id`. + + + +The server name. To limit a query to a server, use `additional_metadata.discord_server_id`. + + + +Whether Discord reports the message as edited. + + + +When Discord reports the message was last edited, empty if never. + + + + +### Messages + +- **One document:** One Discord message that is not a reply. A forwarded message is a message too. +- **Title:** `#channel` and the author's display name. Search matches the message text, not this title, so a channel name in a query does not limit results to that channel. +- **Text:** The message text, with user, role and channel mentions turned into names and custom emoji shown as `:name:`. Then embed titles, descriptions and fields, the poll question and answers, interactive component text and forwarded message text. Then `Attachments:` with file names and `Stickers:` with sticker names. The author is written as a From line and the time as a Sent line. A message with none of these is skipped. +- **Date:** When the message was last edited, else when it was sent. +- **Link back:** A discord.com link to the message, when the server and channel ids are known. +- **Files:** PDF and DOCX attachments up to 20 MiB are downloaded and read, and their text is searchable with the message. If reading fails, the message is still kept. Other files contribute only their names. + + +The selected server. An access rule you set on it governs its messages. Not searchable. + + +### Replies + +- **One document:** One message that replies to another message. +- **Title:** `#channel` and the author's display name. Search matches the reply text, not this title. +- **Text:** Built like a message's text, ending with `Reply to message:` and the parent message id. The author is written as an Author line, with Created and Updated lines. +- **Date:** When the reply was last edited, else when it was sent. +- **Link back:** A discord.com link to the reply, when the server and channel ids are known. +- **Files:** As for messages: PDF and DOCX attachments up to 20 MiB are read, and other files contribute only their names. + + +The selected server. An access rule you set on it governs its replies. Not searchable. + + +**Example searches** + +- What did the community say about the release, limited to the announcements channel's id? +- Who replied to the bug report, and what did they suggest? +- What does the setup guide PDF posted in Discord say about configuring the bot? + +## How it fits into the graph + +- Messages use the Message class. +- Replies use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Discord creates** + +- A reply to the message it answers. +- A forwarded message to its original. +- A message to any Loom video it links to, which resolves when that video is synced into the same collection. +- Channels and servers are kept as labels, not linked. +- No other links to other tools. + +**People and groups** + +- The author of each message or reply. +- Users mentioned in a message, by display name. +- The author's id is a query filter, not a person in the graph. + +**Found in the text** + +The message text, embed text and text read from attachments. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Servers you did not select, and channels and private threads the bot cannot read. +- Voice and stage audio and video. +- Forum and media parent objects, apart from the messages in their threads. +- Attachment contents other than PDF and DOCX, files over 20 MiB, and files that cannot be read. +- Reactions and poll vote counts. +- Deletions: deleted messages stay in HydraDB. +- Member email addresses and Discord permissions. Role names are used only to turn mentions into names. diff --git a/essentials/v2/connectors/dropbox.mdx b/essentials/v2/connectors/dropbox.mdx new file mode 100644 index 00000000..ad99d130 --- /dev/null +++ b/essentials/v2/connectors/dropbox.mdx @@ -0,0 +1,197 @@ +--- +title: "Dropbox" +description: "Sync the files inside the Dropbox folders you choose, one document per file. With Enforce ACL on, the members of each file's shared folder decide who can find it." +icon: "/images/connectors/dropbox.svg" +--- + +Sync the files inside the Dropbox folders you select, and in every folder below them. Each file is one document. Text from supported files is searchable when HydraDB can download and read the files. A file whose text cannot be read is still findable by its path, size and modified time. + +With Enforce ACL on, a file can be read only by the members of the shared folder that holds it, or only by the connecting member for files in their own unshared space. Sharing set on a single file is not read. The first sync reaches only files modified in the last 30 days unless you raise `lookback_days`. Files deleted in Dropbox stay in HydraDB, and no author or owner is recorded. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Dropbox permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Each file follows the shared folder that contains it. The folder's members and invitees can read it, and so can members of a group the folder is shared with. A file in the connecting member's own unshared space can be read by that member only. +- **How a person is identified:** A member's or invitee's email address. A group is turned into its members' email addresses when the Dropbox Business team scopes are granted. +- **When permissions cannot be read:** If HydraDB cannot read a shared folder's members, or cannot turn a group into its members, the connector reports a permission warning. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Sharing set on an individual file, rather than on its shared folder, is not read. +- Without `sharing.read`, shared folder members can be unreadable. +- Without the Business team scopes, a folder shared with a group cannot be fully resolved. +- A very large folder or group membership list that cannot be read in full counts as unreadable. +- When a shared folder's members change, a later sync applies the new access to its files, including files that did not change. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Dropbox uses an app you create in Dropbox, authorized for offline access: an app key, an app secret and a refresh token. + + +The Dropbox app key. + + + +The Dropbox app secret. + + + +A long-lived offline refresh token for the connecting account. + + +**Scopes to give the Dropbox app** + +- `account_info.read`: required. Identifies the account and whether it is a Business account. Without it, team folders are never picked up. +- `files.metadata.read`: required. Sees folders, files and what changed. +- `files.content.read`: required. Reads file contents. Without it, only name, location and size are known. +- `sharing.read`: required. Sees who each folder is shared with, which decides who can find its files. +- `team_info.read`: optional, Business only. Tells that the connection is to a team. +- `members.read`: optional, Business only. +- `team_data.member`: optional, Business only. Reads the team's files on behalf of the member who connected. +- `groups.read`: optional, Business only. Reads group members, so a folder shared with a group resolves to people. + +### Set it up + + + + Create a Dropbox app with the four required scopes. For a Dropbox Business team, add the four Business scopes too, so team folders are read and group shares resolve to people. + + + Authorize the app for offline access with the account to sync, and keep the refresh token. + + + Paste the values as `app_key`, `app_secret` and `refresh_token`. + + + HydraDB lists your folders by path. Select the folders to sync. Every folder below a selected one is included. To reach files older than 30 days, raise `lookback_days` when you select them. + + + +One connector reads one Dropbox account. On a Business team, it reads team files on behalf of the member who connected. + + + +Use provider `dropbox` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected folder reads back the window set by `lookback_days`, 30 days by default. Files last modified before that window are not synced. +- **New and changed items:** Later syncs pick up the changes Dropbox reports since the last sync. If Dropbox no longer accepts where the last sync stopped, the folder is listed again in full. +- **Edits:** An edited file is read again and replaces its document. +- **Deletions:** Deleted files are not removed. A file deleted in Dropbox stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Files + +- **One document:** One Dropbox file. Folders are not documents. +- **Title:** The file's path, for example `Projects/Acme/contract.pdf`. A file with no path is titled `Dropbox file` and its id. +- **Text:** The file's text when it could be read. Otherwise the title followed by `Path`, `Size` and `Modified` lines. The title is searchable in either case. +- **Date:** When the file was last modified on Dropbox's servers. +- **Link back:** Opens the file in the Dropbox web app, at its path. +- **Files:** Text from supported files is searchable when HydraDB can download and read the files. Files over 50 MiB keep only their details. + + +The file's path in Dropbox. It is the title, so it is always searchable, and it is the `Path` line when the file's text could not be read. + + + +The size in bytes, written as the `Size` line. Searchable only on files whose text could not be read. + + + +When the file was last modified on Dropbox's servers. Sets the result date. Written as the `Modified` line, so it is searchable only on files whose text could not be read. + + + +The path of the folder that directly holds the file, `/` at the top level. Limits a query to the files directly in one folder. Files in its subfolders carry their own folder's path. Not searchable. + + + +The same folder path. Another way to limit a query to one folder. Not searchable. + + + +Always `folder`. Not searchable. + + + +Limits a query to this connector's files. Not searchable. + + + +Always `dropbox`. Not searchable. + + + +The email addresses of the members and invitees of the file's shared folder, including members of shared groups. They decide who can read the file when Enforce ACL is on. Not searchable. + + + + + +Set when the file's sharing could not be fully resolved. It explains the missing permissions and grants no access. + + + +Set when the sharing of the file's folder could not be read. Explains the failed read. + + + +`permission_refused` when that warning is set. + + + +The Dropbox revision id the document was read from. + + + +Dropbox's content hash, for comparing file contents outside HydraDB. + + + +The modified time recorded by the app that uploaded the file. The result date uses the server time instead. + + + + +**Example searches** + +- What does the Acme contract PDF in the Legal folder say about termination? +- Which files in the Projects/2026 folder mention the launch date? +- When was the pricing spreadsheet last changed? + +## How it fits into the graph + +- Files use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Dropbox creates** + +- No links between files, and no links to items in other tools. The folder that holds a file is kept as a filter, not a graph link. + +**People and groups** + +- No people are attached to files. Dropbox files carry no author or owner in HydraDB. + +**Found in the text** + +The file's text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Folders you did not select. +- Files last modified before the `lookback_days` window on the first sync. +- Folders themselves, as documents. +- File comments, version history and Dropbox Paper structure. +- Who created or last edited a file. +- Sharing set on an individual file. +- Text of files over 50 MiB. +- Deletions: deleted files stay in HydraDB. diff --git a/essentials/v2/connectors/figma.mdx b/essentials/v2/connectors/figma.mdx new file mode 100644 index 00000000..9ff6bd31 --- /dev/null +++ b/essentials/v2/connectors/figma.mdx @@ -0,0 +1,147 @@ +--- +title: "Figma" +description: "Sync a catalogue of the files in the Figma projects you choose: each file's name, project, last modified time and link. Design content is not synced." +icon: "/images/connectors/figma.svg" +--- + +Sync a catalogue of the files in the Figma projects you select. Each file is one document holding its name, project, last modified time and link, so a search can find a file by name and take you to it. + +Design content is not read: frames, text layers, components and comments are not synced. Figma permissions are not imported, so every synced file is visible to everyone who can query the collection unless you set an access rule. The first sync lists only files modified in the last 30 days unless you raise `lookback_days`. Files deleted in Figma stay in HydraDB. + + +Figma is in beta. + + +## Permissions + + +Figma permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + + +Figma setup needs your team ids, because Figma's API cannot list a user's teams. The connection form does not accept them yet, so contact HydraDB before connecting Figma. + + +### Credentials + +Figma uses a personal access token. + + +A Figma personal access token. + + +### Set it up + + + + In Figma, create a personal access token for a user who can see the projects you want catalogued. + + + Paste the token as `api_token`. + + + HydraDB lists the projects of your Figma teams. Select the projects to sync. To reach files older than 30 days, raise `lookback_days` when you select them. + + + +One connector reads what one Figma user's token can see. + + + +Use provider `figma` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected project reads back the window set by `lookback_days`, 30 days by default. Files last modified before that window are not listed. +- **New and changed items:** Each sync lists the files modified since the last sync. +- **Edits:** A file whose last modified time moved is sent again with its new details. +- **Deletions:** Deleted files are not removed. A file deleted in Figma stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Files + +- **One document:** One Figma file's details. Its design content is not included. +- **Title:** The file name. A file with no name is titled `Figma file` and its key. +- **Text:** The title, then `Project`, `Last modified` and `Link` lines. This is the only searchable text for a file. +- **Date:** When the file was last modified. +- **Link back:** Opens the file in Figma. +- **Files:** None. + + +The project name, written as the `Project` line when HydraDB has it. The name is often missing, so to limit a query to a project, use `additional_metadata.figma_project_id`. + + + +When the file was last modified, written as the `Last modified` line. Sets the result date. + + + +The Figma link built from the file key, written as the `Link` line. + + + +The id of the project that holds the file. Limits a query to one project's files. Not searchable. + + + +The file key. Picks out one file. Not searchable. + + + +Limits a query to this connector's files. Not searchable. + + + +Always `figma`. Not searchable. + + + + + +The address of the file's thumbnail image, for your own app to show. HydraDB does not read the image. + + + + +**Example searches** + +- Is there a Figma file for the checkout redesign? +- Which files in this Figma project changed recently? +- What is the link to the onboarding flow design? + +## How it fits into the graph + +- Files use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Figma creates** + +- No links between files, and no links to items in other tools. + +**People and groups** + +- No people are attached. + +**Found in the text** + +The file name and, when present, the project name. There is no design content to read. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Projects you did not select. +- Files last modified before the `lookback_days` window on the first sync. +- Design content: frames, text layers and components. +- Comments. +- Version history. +- Thumbnail images. Only their address is kept. +- Deletions: deleted files stay in HydraDB. diff --git a/essentials/v2/connectors/fireflies.mdx b/essentials/v2/connectors/fireflies.mdx new file mode 100644 index 00000000..be8801c6 --- /dev/null +++ b/essentials/v2/connectors/fireflies.mdx @@ -0,0 +1,181 @@ +--- +title: "Fireflies" +description: "Sync meeting transcripts from one Fireflies account, one searchable document per meeting with its AI overview." +icon: "/images/connectors/fireflies.svg" +--- + +Sync meeting transcripts from one Fireflies account. Each meeting is one document with its title, Fireflies' AI overview and the transcript, each line labelled with its speaker. + +Fireflies permissions are not imported, so every synced meeting is visible to everyone who can query the collection unless you set an access rule. Audio and video are not synced. Each sync reads meetings by meeting date, so a transcript or summary that changes later is not guaranteed to be picked up. Meetings deleted in Fireflies stay in HydraDB. + + +Fireflies is in beta. + + +## Permissions + + +Fireflies permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Fireflies uses an API key. + + +A Fireflies API key. + + +### Set it up + + + + Get a Fireflies API key for the account whose meetings you want to sync. + + + Paste the key as `api_token`. + + + HydraDB lists one item for the whole account. Select it. You cannot pick individual meetings. + + + +One connector reads one Fireflies account. + + + +Use provider `fireflies` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads meetings from the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads meetings by meeting date, picking up meetings dated since the last sync. +- **Edits:** A change to a meeting is picked up only if the meeting's date falls inside a later sync's window. +- **Deletions:** Meetings deleted in Fireflies stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Meetings + +- **One document:** One meeting transcript. A meeting with no transcript sentences, no overview and no gist or short summary is skipped. +- **Title:** The meeting title, or `Fireflies meeting ` when it has none. +- **Text:** The meeting title, then the AI overview, then the transcript as one `Speaker: text` line per sentence. If there are no sentences and no overview, Fireflies' gist or short summary is used instead. The title is searchable too. +- **Date:** The meeting time. +- **Link back:** The transcript in Fireflies. +- **Files:** None. Audio and video are not downloaded. + + +Fireflies' AI overview, written before the transcript. + + + +The meeting time. Sets the result date and decides which meetings each sync reads. Not searchable. + + + +The Fireflies transcript id. Picks out one meeting. Not searchable. + + + +The host's email. Limits a query to meetings one person hosted. Not searchable. + + + +The organizer's email. Limits a query to meetings one person organized. Not searchable. + + + +The conference link. Finds the meeting held at a given link. It does not link the meeting to Zoom or Google Calendar items. Not searchable. + + + +The calendar event id. Finds the transcript for a known calendar event. It does not link the meeting to Google Calendar items. Not searchable. + + + +How many participant emails the meeting has. Limits a query by meeting size. Not searchable. + + + +Limits a query to this connector's meetings. Not searchable. + + + +Always `fireflies`. Not searchable. + + + + + +The host's name, or email when no name was found. To find a host's meetings, filter on `additional_metadata.host_email`. + + + +The organizer's name, or email when no name was found. To find an organizer's meetings, filter on `additional_metadata.organizer_email`. + + + +Participant emails. They are not attached to the meeting as people. + + + +The same count as `additional_metadata.participant_count`, returned with the meeting. + + + +The meeting length Fireflies reports. + + + +How many transcript sentences were included. + + + +Fireflies' AI action items. They are not part of the searchable text. + + + +Fireflies' keyword labels. They are not part of the searchable text. + + + + +**Example searches** + +- What did we agree with Acme on last week's call? +- What did Maria say about the migration timeline? +- Give me the overview of yesterday's planning meeting. + +## How it fits into the graph + +- Meetings use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Fireflies creates** + +- No links between meetings or to other tools. The calendar event id and conference link do not link a meeting to Google Calendar or Zoom items. + +**People and groups** + +The connector does not attach the host, organizer or participants to a meeting as people. Speaker names are part of the transcript text. + +**Found in the text** + +The overview and the speaker-labelled transcript. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Audio and video recordings. +- The full attendee list Fireflies keeps. Only participant emails are kept. +- Fireflies' AI outline and shorthand bullet summaries. Only the overview, action items, keywords and, as a fallback, the gist or short summary are kept. +- Changes to older meetings whose date falls outside later syncs' windows. +- Deletions: meetings deleted in Fireflies stay in HydraDB. diff --git a/essentials/v2/connectors/freshdesk.mdx b/essentials/v2/connectors/freshdesk.mdx new file mode 100644 index 00000000..5528765d --- /dev/null +++ b/essentials/v2/connectors/freshdesk.mdx @@ -0,0 +1,254 @@ +--- +title: "Freshdesk" +description: "Sync Freshdesk tickets and their replies from one helpdesk. Freshdesk ticket visibility is not imported." +icon: "/images/connectors/freshdesk.svg" +--- + +Sync every ticket in one Freshdesk helpdesk, with its replies. Each ticket is one document with its description, requester, assignee, company and group. Each reply is its own document, linked to its ticket. + +Freshdesk agent scopes are not imported, so every synced ticket and reply is visible to everyone who can query the collection unless you set an access rule. Private agent notes are skipped unless you turn them on. Tickets deleted in Freshdesk stay in HydraDB. Attachments are not synced. + +## Permissions + + +Freshdesk permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Freshdesk Global, Group and Restricted agent scopes are not reproduced. +- If you turn on `include_private_notes`, private agent notes are visible to everyone who can query the collection too. +- Every ticket and reply carries `additional_metadata.rbac_warning`, saying that Freshdesk visibility is not captured. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Freshdesk uses an agent's API key and your helpdesk's subdomain. + + +An agent's API key, from the agent's Freshdesk profile settings. + + + +The helpdesk subdomain only, for example `acme` for `acme.freshdesk.com`. + + + +Off by default. Turn it on to also sync private agent notes. + + +There is no scope to choose. The key reads the tickets its agent can see under that agent's Global, Group or Restricted ticket scope. Pick an agent with Global scope, or only part of the helpdesk syncs. + +### Set it up + + + + In Freshdesk, open the profile settings of an agent with Global ticket scope and copy the API key. + + + Paste the key as `api_key` and the subdomain as `domain`. Turn on `include_private_notes` only if everyone who can query the collection may read private notes, or set an access rule. + + + HydraDB lists one account-wide resource, All data. Select it to sync the whole helpdesk as one unit. + + + +One connector reads one Freshdesk helpdesk domain. + + + +Use provider `freshdesk` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads tickets updated since the last sync, together with their replies. Replies are read again only when their ticket changes. +- **Edits:** A changed ticket is read again with its replies and updates its documents. +- **Deletions:** Deleted tickets are not removed. A ticket synced before it was deleted or marked as spam stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Freshdesk item + + +The ticket id on a ticket, the reply id on a reply. Targets one item, and keeps later syncs on the same document. Not searchable. + + + +Set on every item, saying that Freshdesk visibility is not captured. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `freshdesk`. Not searchable. + + +### Tickets + +- **One document:** One ticket. Spam and deleted tickets are skipped. +- **Title:** The ticket subject. +- **Text:** The plain-text description, converted from HTML when needed, or the subject when the description is empty. Then `Requester`, `Requester email`, `Assignee`, `Company` and `Group` lines. Status, priority and creation time are part of the text too. The subject is searchable too. +- **Date:** When the ticket was last updated, else when it was created. +- **Link back:** The ticket in the Freshdesk agent portal. +- **Files:** Ticket attachments are not synced. + + +Open, Pending, Resolved or Closed, written as a `Status` line. A custom status is written as its raw number. + + + +Low, Medium, High or Urgent, written as a `Priority` line. + + + +The requester's name, written as the `Requester` line, where HydraDB can identify the customer. + + + +The requester's email, written as the `Requester email` line, where HydraDB can connect the address to the customer. + + + +The assigned agent's name or email, written as the `Assignee` line. The graph records the ticket as assigned to that agent. + + + +The requester's company, written as the `Company` line, so every ticket from one company matches. + + + +The name of the agent group the ticket is assigned to, written as the `Group` line. + + + +When the ticket was created, written as a `Created` line. Used as the result date only when the update time is missing. + + + +When the ticket was last updated. Not searchable. + + + + + +The Freshdesk ticket type. + + + +The ticket's tags. + + + +The requester's Freshdesk contact id. + + + +The assigned agent's id. The agent's name is in `assignee`. + + + +The assigned group's id. The group's name is in `group`. + + + + +### Replies + +- **One document:** One reply or note on a ticket. Empty replies are skipped. Private agent notes are included only when `include_private_notes` is on. +- **Title:** `Comment by` and the author's name. Without an author, the first 80 characters of the text. +- **Text:** An `Author` line, then the plain-text reply. The creation and update times are part of the text too. +- **Date:** When the reply was created, else when it was last updated. +- **Link back:** The parent ticket in the Freshdesk agent portal. +- **Files:** Reply attachments are not synced. + + +The agent who wrote the reply, written as the `Author` line. The graph records the reply as written by that agent. Customers are not named, because Freshdesk contacts are not synced. + + + +The sender's email. Written as the `Author` line only when no agent name is found, which is the case for customer replies. + + + +Names mentioned in a private note. The names stay in the note text, and the graph records each as mentioned. + + + +The ticket the reply belongs to. Links the reply to its ticket, so the whole conversation can be returned together. + + + +The id of the ticket the reply belongs to. Returns every reply on one ticket. Not searchable. + + + +When the reply was created, written as a `Created` line. + + + +When the reply was last updated, written as an `Updated` line. Used as the result date only when the creation time is missing. + + + + + +True for a private agent note. It does not restrict who can read the note. + + + +True when the reply came from the requester, so you can tell a customer message from an agent reply. + + + +The Freshdesk user id of the reply's author. + + + + +**Example searches** + +- What did an agent say about a billing issue? +- Which urgent tickets are assigned to Priya? +- Which tickets came from Acme Corp? + +## How it fits into the graph + +- Tickets use the Ticket class. +- Replies use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Freshdesk creates** + +- A reply to its ticket. +- No links to other tools. + +**People and groups** + +- The assigned agent of each ticket. +- The author of each agent reply. +- Names mentioned in a private note. +- The requester's name and email, and the company, appear in the ticket text, where HydraDB can identify them. +- Customers who reply are not attached as people. Their email appears in the reply text. + +**Found in the text** + +The ticket description with its requester, assignee, company and group lines, and the text of every reply. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Private agent notes, unless `include_private_notes` is on. +- Spam and deleted tickets. Replies on them can still be synced. +- Contacts and companies as documents of their own. +- Satisfaction ratings, time entries, solution articles and forum posts. +- Ticket custom fields. +- Ticket and reply attachments. +- Deletions: tickets deleted in Freshdesk stay in HydraDB. diff --git a/essentials/v2/connectors/github.mdx b/essentials/v2/connectors/github.mdx new file mode 100644 index 00000000..6b271b6f --- /dev/null +++ b/essentials/v2/connectors/github.mdx @@ -0,0 +1,209 @@ +--- +title: "GitHub" +description: "Sync issues and pull requests, each with its whole discussion, from the GitHub repositories you choose." +icon: "/images/connectors/github-light.svg" +--- + +The GitHub connector syncs issues and pull requests from selected repositories. Code, commits and diffs are not synced. Each issue and each pull request is one document that carries its body and its whole discussion: conversation comments and, for a pull request, review comments and review summaries. + +Issues and pull requests link to the issues they reference or close, to their parent issue, and to the Linear issues, Slack messages and Notion pages they link to. + +A private repository's items are limited to its collaborators and teams only when Enforce ACL is on and HydraDB can read its collaborators. Deleted issues and pull requests stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow GitHub permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Access follows the repository, not the single issue. A public or internal repository can be read by everyone who can query the collection unless you set an access rule. A private repository can be read by its collaborators and by the organization teams that have access to it. +- **How a person is identified:** The email address on a collaborator's public GitHub profile. Teams are added as groups. +- **When permissions cannot be read:** If a collaborator hides their profile email, the collaborator list is incomplete, there are too many people to express, or GitHub refuses a request, the connector reports a permission warning. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- One collaborator with a hidden public email stops HydraDB from capturing a private repository's audience. Set an access rule on such a repository. +- Internal repositories are open to everyone who can query the collection. Check that this matches who should see them. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +GitHub uses a personal access token. The setup steps below use a classic token, which needs `repo`, or `public_repo` for public repositories only. A fine-grained token works if GitHub grants it read access to the repositories you want and to their issues. + + +A GitHub personal access token with read access to repositories and issues. + + +**Scopes for a classic token** + +- `public_repo`: public repositories only. Use this or `repo`. +- `repo`: private and public repositories. Reading a private repository's collaborators for permissions also needs it. +- `read:org`: reads which organization teams can access a repository, for permissions. If GitHub refuses it, the connector reports a permission warning. + +A successful token check does not guarantee access to every repository. Confirm that the repositories you need are listed when you select them. + +### Set it up + + + + In GitHub, create a personal access token with `repo`, or `public_repo` for public repositories only. Add `read:org` if you want organization team access captured. + + + Paste the token as `access_token`. + + + HydraDB lists every repository the token's user owns, collaborates on, or can see as an organization member. Select the repositories to sync. + + + +One connector reads the repositories one token's user can see. + +To connect more than one GitHub account, give each connector its own `provider_account_scope`, such as `github-account-a` and `github-account-b`. These are labels you choose, not GitHub's own account ids, and HydraDB does not check them. Two connectors that share a scope and write to the same collection can overwrite each other's items. See [several accounts from one provider](/essentials/v2/connectors#6-connect-several-accounts-from-one-provider). + + + +Use provider `github` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back 30 days by default, set by `lookback_days`. The window is measured from the repository's most recent activity, not from today, so a quiet repository still brings in its last stretch of work. +- **New and changed items:** Each sync asks GitHub for items updated since the last sync. A changed item is sent again with its whole discussion. +- **Edits:** Editing an issue or pull request, or adding a comment, moves its updated time, so the whole item is sent again. +- **Deletions:** Deleted issues and pull requests are not removed. An item that disappears from GitHub can stay searchable in HydraDB. +- GitHub rate limits apply per token. A large first sync can use its hourly quota. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Issues and pull requests + +- **One document:** One issue or one pull request, with its whole discussion inside it. A search result is the issue or pull request, not an individual comment. +- **Title:** The issue or pull request title. +- **Text:** The issue or pull request body and its discussion are searchable together. Comments and reviews include their author and time. Review comments also include the file, line and reply context. Empty comments are skipped. Labels are written as a `Labels` line, the creation time as a `Created` line, and a sub-issue's parent as a `Parent` line. The title is searchable too. +- **Date:** When the issue or pull request was last updated. +- **Link back:** The issue or pull request page on GitHub. +- **Files:** Images and files in bodies and comments are not downloaded. + + +HydraDB also scans the title for Linear issue keys and links, and links the item to those issues. + + + +The main text. References in it become links: `#123`, `owner/repo#123`, closing keywords, and Linear, Slack and Notion links. + + + +Each comment, review comment and review summary is searchable with the item. Its author is recorded as a commenter, and references inside it become links of the item. + + + +Written as the `Labels` line, so a query can match a label. + + + +Written as the `Created` line. + + + +The id `owner/repo#number`. It keeps later syncs on the same document, and it is what items in other tools, such as Linear issues, link to. + + + +When the item was last updated. It moves with every edit or new comment. Not searchable. + + + +The repository as `owner/name`. Limits a query to one repository. Not searchable. + + + +The issue or pull request number within a repository. Combine it with `additional_metadata.github_repo` to select one item. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `github`. Not searchable. + + + +A sub-issue's parent issue, as `owner/repo#number`. Links the sub-issue to its parent, and is written as the `Parent` line. + + + +Marks a pull request, so closing keywords in its body link it to the issues it closes. Not searchable. + + + +Each `@username` in the body, recorded as a person the item mentions. The field itself is not searchable, but the body it comes from is. + + + +The selected repository. Its audience decides who can read every issue and pull request in it. Not searchable. + + + + + +The login of the person who opened the item. It is not added to the graph as a person. + + + +Assignee logins. Not added to the graph. + + + +`open` or `closed`. + + + +When the item was closed. + + + +The milestone title and its due date. + + + + +**Example searches** + +- Which pull request fixed issue `acme/api#412`? +- Which issues in `acme/api` are labelled bug and mention the login timeout? +- Which Linear issue does this pull request close? + +## How it fits into the graph + +- Issues and pull requests use the Ticket class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections GitHub creates** + +- A sub-issue to its parent issue. +- An issue or pull request to each issue or pull request it references in its body or discussion. +- A pull request to each issue its body closes with a closing keyword. +- An issue or pull request to a Linear issue it links to, or names after a closing word. +- An issue or pull request to a Slack message or Notion page it links to. +- In the other direction, Linear issues link to the GitHub pull requests attached to them. +- References inside code blocks, inline code and HTML comments are ignored. + +**People and groups** + +- The author of each comment, as a commenter. +- Each `@username` mentioned in the body. +- The opener and assignees are not attached to the item as people in the graph. + +**Found in the text** + +The body and discussion text of each issue and pull request. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Code, commits and diffs. +- Releases, wikis, projects and GitHub Discussions. +- Images and files attached in bodies and comments. +- Repositories the token's user cannot see. diff --git a/essentials/v2/connectors/gitlab.mdx b/essentials/v2/connectors/gitlab.mdx new file mode 100644 index 00000000..3c768e5f --- /dev/null +++ b/essentials/v2/connectors/gitlab.mdx @@ -0,0 +1,376 @@ +--- +title: "GitLab" +description: "Sync issues, merge requests and their notes, Markdown files, releases, project descriptions and commit messages from the GitLab projects you choose. Private-project restrictions need Enforce ACL and readable member emails." +icon: "/images/connectors/gitlab.svg" +--- + +Sync issues, merge requests and their notes, Markdown files on the default branch, releases, project descriptions and commit messages from the GitLab projects you select. Each issue, merge request, note, file, release, project and commit is one document, and a note links to its issue or merge request. + +A private project's items are limited to its members only when Enforce ACL is on and HydraDB can read every member's email. Confidential issues and internal notes are kept only as empty placeholders. Code and diffs are not synced, and items deleted in GitLab stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow GitLab permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Access follows the project. A public or internal project can be read by everyone who can query the collection. A private project can be read by its active members at any access level, including inherited group members and members of groups the project is shared with. A confidential issue, or an internal or confidential note, is kept only as a placeholder with no content, and with Enforce ACL on no one can read it. +- **How a person is identified:** A member's email address, from the member list when GitLab shows it, else from the member's public profile email. +- **When permissions cannot be read:** If a member's email is hidden, the member list is incomplete, there are too many members to express, or no member can be expressed, the connector reports a permission warning for the whole project. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Most GitLab users hide their public email, so a private project often needs an access rule you set. +- Visibility of single issues is not reproduced, apart from confidential issues. +- A project GitLab reports as not found may be deleted, or the token may have lost access. HydraDB does not treat it as deleted. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +GitLab uses a personal, project or group access token with `read_api`. + + +A GitLab access token with `read_api`. + + +**Connector settings** + + +The API address of a self-managed GitLab, including `/api/v4`, for example `https://gitlab.example.com/api/v4`. Leave it empty for GitLab.com. Self-managed GitLab is not yet a supported setup. + + +**Token scope** + +- `read_api`: reads projects, issues, merge requests, notes and repository files, and a private project's members for permissions. + +### Set it up + + + + Create a GitLab access token with `read_api` for a user who is a member of every project you will select. + + + Paste the token as `private_token`. For self-managed GitLab, set `api_url`. + + + HydraDB lists the projects the token's user is a member of, up to 2,000. Select the projects to sync. + + + +One connector reads the projects one token's user is a member of. + + + +Use provider `gitlab` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. Issues and merge requests are measured by last update, commits by creation and projects by last activity. Markdown files on the default branch can come across even when their last commit is older than the window. +- **New and changed items:** Each sync reads issues and merge requests updated since the last sync, new commits and active projects. When an issue or merge request changes or gets a new comment, all its notes are read again. Markdown files are read again when the default branch gets a commit inside the window. A project with no recent activity can be skipped, releases included. +- **Edits:** An edited issue or merge request updates its document. An edited note, or a note made internal, updates only when its issue or merge request changes or gets a new comment. An issue made confidential is replaced by its placeholder only when it is read again. Resetting the default branch to an older commit can leave newer file content in HydraDB. +- **Deletions:** Issues, merge requests, notes and files deleted in GitLab stay searchable in HydraDB. +- A commit that appears in several selected projects is one document, attributed to the project read last. +- Markdown files larger than 512 KiB are skipped, and reading a repository stops after 100,000 entries. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every GitLab item + + +The numeric project id. Limits a query to one project. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `gitlab`. Not searchable. + + + +The selected project. Its readers decide who can read every item in it. Not searchable. + + + + + +The kind of item: `issue`, `merge_request`, `note`, `repository_file`, `commit`, `release` or `project`. + + + + +### Issues and merge requests + +- **One document:** One issue or one merge request. Its notes are separate documents. +- **Title:** The title. An item with no title is called `GitLab issue` or `GitLab MR` with its id. A confidential issue is titled `Confidential GitLab issue`. +- **Text:** The description, else the title, then `Author` and `Assignees` lines, and for a merge request `Reviewers` and `Branch` lines. Labels are written as a `Labels` line and the creation time as a `Created` line. The title and the item id are searchable too. A confidential issue's text is a fixed placeholder sentence. +- **Date:** When the item was last updated, else when it was created. +- **Link back:** The issue or merge request page on GitLab. Confidential placeholders have none. +- **Files:** Attachments are not downloaded. + + +`!` for an issue and `!mr` for a merge request. Keeps later syncs on the same document, also when an issue becomes confidential, and a search can match it. + + + +Label names, written as the `Labels` line. + + + +The opener's username, written as the `Author` line. Not attached to the item as a person in the graph. + + + +Assignee names, written as the `Assignees` line. Not attached to the item as people in the graph. + + + +A merge request's reviewer names, written as the `Reviewers` line. + + + +A merge request's branches, written as the `Branch` line. + + + +When the item was created, written as the `Created` line. The result date when there is no update time. + + + +When the item was last updated. Not searchable. + + + +Each `@username` in the description, recorded as a person the item mentions. The field itself is not searchable, but the description it comes from is. + + + +The issue or merge request number within its project. Combine it with `additional_metadata.gitlab_project_id` to pick out one item. Not searchable. + + + +True on a confidential issue's placeholder. Finds placeholders. Not searchable. + + + + + +`opened`, `closed`, `locked` or `merged`. It is not part of the text, so a query cannot match the state. + + + +When the item was closed or merged. + + + + +### Notes + +- **One document:** One note on an issue or merge request. System notes, such as state and label changes, are left out. An internal or confidential note is kept as a placeholder with no content. +- **Title:** `Comment on` with the parent's id. A placeholder is titled `Comment on a confidential GitLab issue`. The title is not searchable. +- **Text:** The note text, with its author, its creation and update times and its parent's id. A placeholder's text is a fixed sentence. +- **Date:** When the note was last updated, else when it was created. +- **Link back:** The note on its issue or merge request page. +- **Files:** Attachments are not downloaded. + + +The note author's username, else name. The graph records the note as written by this person. + + + +The issue or merge request the note belongs to, written as the `Parent` line. Links the note to it. + + + +Groups every note on one issue or merge request into one thread. Not searchable. + + + +When the note was created and last updated. The update time, else the creation time, is the result date. + + + +Each `@username` in the note, recorded as a person the note mentions. The field itself is not searchable, but the note text is. + + + +The note id. Picks out one note. Not searchable. + + + +`Issue` or `MergeRequest`. Keeps only issue notes or only merge request notes. Not searchable. + + + +The parent's number within its project. With `additional_metadata.gitlab_project_id`, returns every note on one issue or merge request. Not searchable. + + + +True on a placeholder note. Finds placeholders. Not searchable. + + + + + +The GitLab discussion the note belongs to. Notes in one discussion are not linked as replies to each other. + + + +The file and line a diff note was left on. + + + + +### Markdown files + +- **One document:** One non-empty Markdown file, `.md` or `.mdx`, on the default branch, up to 512 KiB. +- **Title:** The file's first heading, else its file name without the extension. +- **Text:** The file content. The title is searchable too. +- **Date:** The time of the default branch's latest commit when the file was read. +- **Link back:** The file on GitLab. + + +The project path, for example `acme/backend`. Limits a query to one project by path. Not searchable. + + + +The file path in the repository. Picks out one file. Not searchable. + + + +The content hash of the file version read. Picks out one exact version. Not searchable. + + + +The branch the file was read from. Not searchable. + + + + + +The repository path, and whether the file is `md` or `mdx`. + + + + +### Commits + +- **One document:** One commit. A commit that appears in several selected projects is one document. +- **Title:** The commit title, else the first line of the message, else `GitLab commit` with its short id. +- **Text:** The commit message, then an `Author` line. The title is searchable too. +- **Date:** When the commit was created, else committed, else authored. +- **Link back:** The commit on GitLab. + + +The author's name, written as the `Author` line. Not attached to the commit as a person in the graph. + + + +When the commit was created. Not searchable. + + + +The commit hash. Picks out one commit. Not searchable. + + +### Releases + +- **One document:** One release. +- **Title:** The release name, else `Release` with its tag. +- **Text:** The release notes, else the title. The title is searchable too. +- **Date:** When the release was published, else when it was created. +- **Link back:** The release on GitLab. +- **Files:** Release assets are not downloaded. + + +The publish time, else the creation time, is the result date. Not searchable. + + + +The release's Git tag. Picks out one release. Not searchable. + + + + + +The release's Git tag. + + + + +### Projects + +- **One document:** One GitLab project. +- **Title:** The project name with its namespace, else its path, else its name. +- **Text:** The project description, else the title, then `Path` and `Topics` lines. The title is searchable too. +- **Date:** The project's last activity, else when it was created. +- **Link back:** The project on GitLab. + + +The path with its namespace, written as the `Path` line. + + + +The last activity, else creation, is the result date. Not searchable. + + + + + +The project's default branch. + + + +`private`, `internal` or `public`. Who can read the project's items is worked out from its members, not from this value. + + + + +**Example searches** + +- What did reviewers say on the merge request that changed the payment retry logic? +- What changed in release v2.4.0? +- What does the README of acme/backend say about local setup? + +## How it fits into the graph + +- Issues and merge requests use the Ticket class. +- Notes use the Comment class. +- Markdown files use the Page class. +- Commits use the Record class. +- Releases use the Page class. +- Projects use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections GitLab creates** + +- A note to its issue or merge request, with all notes on one item grouped into one thread. +- A placeholder note to its confidential issue. +- Notes in one GitLab discussion are not linked as replies to each other. +- References such as `#12` or `!34` are not turned into links, and merge requests are not linked to the issues they close. +- No links to items in other tools. + +**People and groups** + +- The author of each note. +- Each `@username` mentioned in an issue, merge request or note. +- Issue and merge request authors, assignees and reviewers, and commit authors, appear only in the text. + +**Found in the text** + +Issue, merge request, note, file, commit and release text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Projects the token's user is not a member of. +- The content of confidential issues and internal notes. Only empty placeholders are kept. +- System notes, such as state and label changes. +- Code and diffs. Commits carry only their message, and only Markdown files are read. +- Pipelines, jobs, branches, tags, wikis, snippets, and label and milestone lists. +- Issue due dates, weights, time tracking, milestones and epics. +- Commit statistics and author and committer emails. +- Markdown files over 512 KiB, empty files, and files beyond the first 100,000 repository entries. diff --git a/essentials/v2/connectors/gmail.mdx b/essentials/v2/connectors/gmail.mdx new file mode 100644 index 00000000..2acf041d --- /dev/null +++ b/essentials/v2/connectors/gmail.mdx @@ -0,0 +1,176 @@ +--- +title: "Gmail" +description: "Sync emails from the Gmail labels you choose, one document per email. Earlier emails of a thread come along even when they sit outside the label." +icon: "/images/connectors/gmail.svg" +--- + +Sync emails from the Gmail labels you select in one Gmail account. Each email is one document. A reply links to the email it answers, and earlier emails of its thread are fetched too, even from outside the selected label. Text from supported attachments is searchable with the email when HydraDB can download and read the files. + +Gmail connects with an App Password, not OAuth. Gmail permissions are not imported, so every synced email is visible to everyone who can query the collection unless you set an access rule on its label. Emails deleted or moved out of a label stay in HydraDB, and label, read and starred changes are not picked up. + +## Permissions + + +Gmail permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- A mailbox is personal in Gmail, but HydraDB does not limit its emails to the mailbox owner. Set an access rule on each label that must stay private. +- Earlier thread emails fetched from All Mail follow the access rule of the label that brought them in, even when they sit outside that label. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Gmail connects over IMAP with your Gmail address and a Google App Password. It does not use your Google password or OAuth. + + +Your Gmail address and the App Password joined by a colon, as one string: `address:app_password`. It is a single field, not two. + + +### Set it up + + + + Turn on 2-Step Verification for the Google account. + + + Generate an App Password for the Google account. + + + Paste the Gmail address, a colon and the App Password as `access_token`. + + + HydraDB lists every selectable mailbox of the account, such as `INBOX` and your own labels. Select the labels to sync. + + + +One connector reads one Gmail account. + + + +Use provider `gmail` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each label reaches back the last 30 days by default. You can choose a different window for each label with `lookback_days`. Earlier emails of a new email's thread are also fetched, up to 10 levels back. When they are outside the label or the lookback window, they are looked up in All Mail. +- **New and changed items:** Each sync fetches the emails that arrived in the label since the last sync. Mail moved into a selected label is fetched too when it gets a new IMAP UID, even with an old delivery date. +- **Edits:** An email that is already synced is not read again. Label, read and starred changes are not picked up. +- **Deletions:** Deleted emails are not removed. An email deleted or moved out of the label stays searchable in HydraDB. +- If Gmail resets a mailbox's message numbering, the label is read again from its lookback window. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Emails + +- **One document:** One email. An email without a Message-ID is identified by its IMAP UID instead. Different labels can reuse a UID, so two such emails from different labels can replace each other in the same collection. +- **Title:** The email subject. +- **Text:** The subject on the first line. Then each non-empty field of the email as a labelled line, sorted by field name: the body, sender, To and CC addresses, Reply-To, delivery time, the account address, the Message-ID, the Message-ID it replies to, the conversation id and the IMAP UID. The body is plain text: HTML is converted and encoded text is decoded. An email with no body uses its subject. The subject is searchable too. +- **Date:** When the email was delivered, or its Date header when the delivery time is missing. +- **Link back:** None. +- **Files:** Named files inside a multipart email are fetched again and read. Their text becomes searchable when the file type is supported and the fetch succeeds. A file sent as the whole email, not inside a multipart email, is not read as an attachment. + + +The sender's address, written as a line of the text. The graph records the email as sent by that address. + + + +The To addresses, written as a line of the text. The graph records each address as a recipient. + + + +The CC addresses, written as a line of the text. The graph records each address as copied. + + + +The Reply-To addresses, written as a line of the text. They are not added to the graph as people. + + + +The delivery time, written as a line of the text. + + + +The email's Message-ID, written as a line of the text. It identifies the email across syncs. + + + +The Message-ID of the email this one replies to, from the In-Reply-To header or the last References entry. Links the reply to that email. + + + +The Message-ID of the forwarded email inside this one, when it holds exactly one. Links the email to it. + + + +The email's IMAP UID in the mailbox it was read from, which is All Mail for earlier thread emails. It is not a Gmail API message id. + + + +The conversation id: the first Message-ID in the References header, else In-Reply-To, else the email's own Message-ID. Limits a query to one conversation, and groups the conversation's emails in the graph. Also written as a line of the text. + + + +The Gmail account address. Limits a query to emails from one account. Also written as a line of the text. + + + +Limits a query to this connector's emails. Not searchable. + + + +Always `gmail`. Not searchable. + + + +Links a GitHub or Linear notification email to the GitHub issue or pull request, or the Linear issue, it is about. Only emails from `notifications@github.com`, `notifications@linear.app` or `notifications@mail.linear.app` that pass Gmail's DKIM check are linked. At most 32 links per email. Not searchable. + + + +The selected label the email was synced through. An access rule you set on the label governs its emails, including earlier thread emails fetched from All Mail. Not searchable. + + +**Example searches** + +- What did the customer say in their last email about the renewal? +- Who was copied on the contract thread with Acme? +- Which emails were about GitHub pull request 123 in our repo? + +## How it fits into the graph + +- Emails use the Email class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Gmail creates** + +- A reply to the email it answers, by Message-ID. +- Every email to its conversation. +- An email to each forwarded email inside it. +- A GitHub or Linear notification email to the GitHub issue or pull request, or Linear issue, it is about. GitHub items are found from the email's headers. Linear issues are found from links in the email text. +- Through the API, a selected label can carry an optional calendar binding to one selected Google Calendar calendar in the same collection. A calendar invitation then links to its Google Calendar event when exactly one visible event matches. The account-wide calendar resource cannot be bound, and cancelled invitations are not linked. +- No other links to other tools. + +**People and groups** + +- The sender. +- The To and CC recipients. +- Reply-To addresses and the account address are not attached as people. BCC recipients are not read. + +**Found in the text** + +The subject, the body and the text read from attachments. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Emails outside the selected labels, unless fetched as earlier emails of a synced thread. Mailboxes Gmail marks as not selectable. +- Gmail label assignments, and read and starred state. +- Email older than the first sync's lookback window, unless it is an earlier email of a synced thread. +- Deletions: emails deleted or moved out of a label stay in HydraDB. +- BCC recipients. +- A file sent as the whole email rather than as an attachment inside it. diff --git a/essentials/v2/connectors/gong.mdx b/essentials/v2/connectors/gong.mdx new file mode 100644 index 00000000..613c5fb3 --- /dev/null +++ b/essentials/v2/connectors/gong.mdx @@ -0,0 +1,459 @@ +--- +title: "Gong" +description: "Sync recorded Gong calls with their transcripts, AI content and public comments, plus coaching reviews and library placements, from the workspaces you choose. Gong permissions are not imported." +icon: "/images/connectors/gong-light.svg" +--- + +Sync recorded calls from the Gong workspaces you select. Each call is one document holding the call details, linked CRM records, topics, Gong's AI brief, key points, highlights and outline, the full speaker-labelled transcript, and public comments. Each completed coaching review, and each call filed in a library folder, is its own document linked to the call. + +Gong permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Calls Gong marks private are skipped unless you turn them on. Changes that arrive after a call's re-read window, such as late comments, are missed. Audio and video are not synced. + +## Permissions + + +Gong permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Calls Gong marks private, reviews of those calls, and reviews that are not public are skipped unless you turn on `include_private_calls`. With it on, they are synced without their Gong audience. Set an access rule on the workspace if they must stay restricted. +- A call that Gong does not mark as private or public is synced. A review with no visibility is treated as public. +- If HydraDB cannot read the privacy of the call behind a review or library placement, the item still syncs, with a permission warning. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Gong uses an API key pair, an Access Key and an Access Key Secret, created by a Gong technical administrator. + + +The Gong Access Key. + + + +The Gong Access Key Secret. Gong shows it once. + + + +The HTTPS API host shown on Gong's API keys page: `api.gong.io`, or your company's subdomain directly before `api.gong.io`. Set it only if Gong shows a company-specific address. + + + +Off by default. Turn it on to also sync private calls and reviews that are not public. + + + +How many hours of recent calls every sync reads again, to catch late transcripts, briefs and comments. 24 by default. + + +**Gong API permissions the connector uses** + +- `api:calls:read:basic` +- `api:calls:read:extensive` +- `api:calls:read:transcript` +- `api:users:read` +- `api:workspaces:read` +- `api:library:read`: optional. Without it, library placements are skipped. +- `api:settings:scorecards:read`: optional. Without it, coaching reviews are skipped. +- `api:stats:scorecards`: optional. Without it, coaching reviews are skipped. + +A Gong API key pair covers the whole company and has no scope picker. The list names what the connector reads, not grants you choose. Which optional endpoints your Gong plan allows depends on your subscription. + +### Set it up + + + + In Gong's Admin center, open Settings, Ecosystem, API, API keys, and choose Get API key. Only technical administrators can do this. Copy the Access Key and the Access Key Secret. + + + Leave the key's TTL empty. A key with an expiry stops the connector on that date. Leave Trusted IPs empty unless you add HydraDB's outgoing addresses, or every request fails. + + + Paste the Access Key as `access_key` and the secret as `access_key_secret`. If the API keys page shows a company-specific API address, enter it as `api_base_url`. + + + HydraDB lists the company's Gong workspaces. Select the ones to sync. Each workspace syncs separately. + + + +One connector reads one Gong company, through its company-wide API key. + + + +Use provider `gong` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Calls and reviews reach back the window set by `lookback_days`, 30 days by default. For calls, the window reaches back a further `transcript_settle_hours`. Library folders are read in full. +- **New and changed items:** Each sync reads calls by start time, and reads again every call that started within the last `transcript_settle_hours`, 24 by default, to catch late transcripts, briefs and comments. Reviews are read by review time. The workspace library is read in full on every sync. +- **Edits:** A call is updated only while its start time is inside the re-read window. Later changes to a call, such as a comment added after that, are missed. Raise `transcript_settle_hours` to keep calls open longer. +- **Deletions:** Calls deleted in Gong stay searchable in HydraDB. +- The shortest sync interval for Gong is 30 minutes. +- Gong allows a company 10,000 API calls a day. HydraDB shares that allowance with every other integration on your Gong company. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Gong item + + +Limits a query to this connector's items. Not searchable. + + + +Always `gong`. Not searchable. + + +### Calls + +- **One document:** One recorded call, with its transcript and public comments. +- **Title:** The call title, else `Gong call` and the call id. +- **Text:** The title, then `When`, `Duration`, `Direction`, `Scope`, `Host`, `Participants` with their job titles, `Related` CRM records, `Outcome`, `Topics` and `Trackers` lines. Then `Brief`, `Key points`, `Highlights` and `Outline` sections, then `Transcript` with one line per speaker turn. Public comments are searchable with the call. +- **Date:** When the call actually started. +- **Link back:** The call in Gong. +- **Files:** None. Audio and video are never downloaded. + + +The full transcript, one line per speaker turn, when Gong has produced it. + + + +The host's name, written as the `Host` line. The graph records that person as the call's host. + + + +The host's email. Identifies the host across tools, and limits a query to one host. Written as the `Host` line only when the host's name is missing. + + + +Each party's name, email, job title and affiliation, written as the `Participants` line. The graph records each as a participant. + + + +The text of each public comment, searchable with the call. The graph records each comment's author. + + + +Gong's AI brief, in the `Brief` section. + + + +Gong's AI key points, in the `Key points` section. + + + +Gong's AI highlight headings and items, in the `Highlights` section. + + + +The next steps from Gong's highlights, written as the call's action items. + + + +Gong's AI outline sections and items, in the `Outline` section, without timings. + + + +The topics discussed, written as the `Topics` line and as the call's labels. Topics with no talk time are left out. + + + +The trackers that fired, with their counts, written as the `Trackers` line. Trackers that did not fire are left out. + + + +Linked CRM records as `ObjectType: Name`, written as the `Related` line, so a deal or account name finds the call. It does not link the call to a CRM record in the graph. + + + +The call length, written as the `Duration` line. + + + +When the call actually started, written into the text. + + + +Inbound, Outbound, Conference or Unknown, written as the `Direction` line. Separates inbound from outbound calls. + + + +Internal, External or Unknown, written as the `Scope` line. Limits a query to customer-facing calls. + + + +The call outcome, such as Demo booked, written as the `Outcome` line. Limits a query to one outcome. + + + +Linked CRM records as `ObjectType:id` pairs. Finds every call linked to one CRM opportunity or account. Not searchable. + + + +The host's Gong user id. Limits a query to one rep's calls. Not searchable. + + + +Video or Audio. Not searchable. + + + +The detected language. Not searchable. + + + +Gong's private flag. Leaves private calls out of a query when you sync them. Not searchable. + + + +Whether the transcript has arrived. Not searchable. + + + +The calendar event id. Finds the call for a known calendar event. It is not linked to calendar documents. Not searchable. + + + +The workspace id. Limits a query to one workspace. Not searchable. + + + +The workspace name. Not searchable. + + + +Always `workspace`. Not searchable. + + + + + +When the call was scheduled to start. It is not the result date. + + + +The call's purpose label. + + + +The conferencing or telephony system that recorded the call. + + + +How many non-empty public comments the call has. + + + + +### Coaching reviews + +- **One document:** One completed scorecard review of one call. +- **Title:** The scorecard name, `review of`, the rep reviewed, and the call date. +- **Text:** The title, then `Reviewer`, `Reviewed`, `Reviewed at`, `Method` and `Call id` lines, then each question with its score, selected options and answer text. A question that does not apply shows `N/A`. `Author` and `Updated` lines are part of the text too. +- **Date:** When the review was completed, else when the call started. +- **Link back:** None. + + +Each question with its score, selected options and answer text. The structured answers are kept with the review too. + + + +The scorecard's name, in the title. + + + +The reviewer, written as the `Author` line. The graph records the review as written by that person. + + + +The reviewer, or Gong AI, written as the `Reviewer` line. + + + +The rep reviewed, in the title and the `Reviewed` line. The rep is not attached to the review as a person. + + + +When the review was completed, written as the `Reviewed at` and `Updated` lines. Also kept as the review's created and updated time. + + + +When the reviewed call started, in the title. Used as the result date only when the review time is missing. + + + +The reviewer's email. Identifies the reviewer in the graph. Not searchable. + + + +The call the review scores. Links the review to that call. Not searchable. + + + +The reviewed call. Returns every review of one call. Not searchable. + + + +The scorecard. Limits a query to one scorecard. Not searchable. + + + +`MANUAL` or `AUTOMATIC`. Separates human and AI reviews. Not searchable. + + + +The reviewer's Gong user id. Not searchable. + + + +The reviewer's email. Limits a query to one reviewer. Not searchable. + + + +The reviewed rep's Gong user id. Finds every review of one rep. Not searchable. + + + +The reviewed rep's email. Finds every review of one rep. Not searchable. + + + +The review's Gong visibility. Leaves out reviews that are not public, when you sync them. Not searchable. + + + +The scorecard's workspace id. Limits a query to one workspace. Not searchable. + + + +The workspace name. Not searchable. + + + +Always `workspace`. Not searchable. + + + + + +How many answers the review contains. + + + + +### Library placements + +- **One document:** One call filed in one library folder. A call filed in two folders is two documents. +- **Title:** The call title, then `(filed in` and the folder path. +- **Text:** The title, then the folder, who filed the call and when, and the curator's note. `Space`, `Author` and `Updated` lines are part of the text too. +- **Date:** When the call was filed. +- **Link back:** The placement in Gong, when Gong supplies its address. + + +The curator's note, under `Curator note`. + + + +The folder and up to eight parent folders, in the title and the `Library folder` line. + + + +The folder path, written as the `Space` line, so a folder name finds the call. + + + +The original call title, in the title and the text. + + + +Who filed the call, written as the `Author` line. The graph records the placement as written by that person. + + + +When the call was filed, written as the `Filed at` and `Updated` lines. Also kept as the placement's created and updated time. + + + +The filer's email. Identifies the filer in the graph. Not searchable. + + + +The filed call. Links the placement to that call. Not searchable. + + + +The filed call. Returns every placement of one call. Not searchable. + + + +The library folder. Limits a query to one folder. Not searchable. + + + +The filer's Gong user id. Limits a query to one curator. Not searchable. + + + +Always `library_folder`. Separates placements from calls. Not searchable. + + + + + +The library folder id. Filter on it with `additional_metadata.folder_id`. + + + +Where the filed excerpt starts in the call, in seconds, when only part of the call was filed. + + + +Where the filed excerpt ends in the call, in seconds. + + + + +**Example searches** + +- What objections did Acme raise on our last three calls? +- How did Jordan score on the discovery scorecard last month? +- Which calls are in the Best discovery calls library folder, and why were they filed? + +## How it fits into the graph + +- Calls use the Meeting class. +- Coaching reviews use the Page class. +- Library placements use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Gong creates** + +- A coaching review to the call it scores. +- A library placement to the call it files. +- CRM record ids and calendar event ids are kept for filtering only. They do not link a call to CRM or calendar documents. +- No links to other tools. + +**People and groups** + +- The host and every participant of each call, with their email when Gong has it. +- The author of each public comment. +- The reviewer of each coaching review, and the person who filed each library placement. +- The rep reviewed is not attached to the review as a person. + +**Found in the text** + +The transcript and Gong's AI content for each call, coaching review answers and curator notes. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Workspaces you did not select. +- Emails and other digital interactions, Engage flows and tasks, and forecasts. +- Audio and video, per-person interaction statistics, and transcript timings. +- Private calls, reviews of them, and reviews that are not public, unless `include_private_calls` is on. +- Private and archived library folders, even with `include_private_calls` on. +- Library placements or coaching reviews when Gong refuses the optional endpoint. Reviews also need access to scorecard definitions. +- Comments and other changes that arrive after a call's re-read window. diff --git a/essentials/v2/connectors/google-calendar.mdx b/essentials/v2/connectors/google-calendar.mdx new file mode 100644 index 00000000..b92fe719 --- /dev/null +++ b/essentials/v2/connectors/google-calendar.mdx @@ -0,0 +1,179 @@ +--- +title: "Google Calendar" +description: "Sync the events on every calendar of one Google account, one searchable event card per event." +icon: "/images/connectors/google-calendar.svg" +--- + +Sync events from every calendar on one Google account's calendar list. Each event is one document that reads as a short event card: title, time, place, organizer, attendees and description. A changed occurrence of a recurring meeting links to its series. + +Google Calendar sharing and event visibility are not imported, so private events are visible to everyone who can query the collection unless you set an access rule. You cannot pick individual calendars: every calendar on the account's list is synced. The first sync picks events by when they were last edited, not by when they take place. An event cancelled or deleted after it was synced stays in HydraDB. + +## Permissions + + +Google Calendar permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Private events are synced like any other event. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Google Calendar uses a Google OAuth 2.0 client id and client secret, with a refresh token for the Google account to sync. + + +The Google OAuth 2.0 client id. + + + +The Google OAuth 2.0 client secret. + + + +A refresh token for the Google account, issued with a Calendar read scope such as `calendar.readonly`. + + +### Set it up + + + + Get a Google OAuth 2.0 client id and secret, and a refresh token for the account whose calendars you want to sync. Issue the token with a Calendar read scope such as `calendar.readonly`. + + + Paste the three values as `client_id`, `client_secret` and `refresh_token`. + + + HydraDB lists one item, All data, that covers every calendar on the account's list. Select it. + + + +One connector reads one Google account. Every calendar on that account's calendar list is synced. + + + +Use provider `google_calendar` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads events last edited within the window set by `lookback_days`, 30 days by default. When an event has no edit time, its creation time is used. Events with neither are read regardless. The window is about edits, not meeting dates: an old recurring meeting that was not edited recently may not be picked up, and a future event edited recently is. +- **New and changed items:** Each sync reads, calendar by calendar, the events edited since the last sync. +- **Edits:** An edited event is read again and replaces its document. +- **Deletions:** Cancelled events are not added. An event cancelled or deleted after it was synced stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Events + +- **One document:** One calendar event. A recurring series is one document for the series, plus one for each occurrence that was changed. An event that appears with the same event id on more than one calendar of the account is one document, and each calendar's copy can replace the other. +- **Title:** The event title, or `Calendar event ` when it has none. +- **Text:** The title, then a `When` line with the start and end, a `Where` line with the location, an `Organizer` line, an `Attendees` line, then the event description. Descriptions are kept as Google supplies them, so an HTML description keeps its markup. The title is searchable too. +- **Date:** When the event was last edited, else when it was created. It is not the time the event takes place. +- **Link back:** None. +- **Files:** None. Event attachments are not synced. + + +The organizer's display name, or email when there is no name, written as the `Organizer` line. The same name is kept as `author`. The organizer is not attached to the event as a person in the graph unless the same email is also among the attendees. + + + +Each attendee's email, display name and response status. Names, or emails when there is no name, are written as the `Attendees` line. The graph attaches each attendee to the event by email. Response statuses are kept on the event but are not searchable. + + + +The free-text location, written as the `Where` line. + + + +The scheduled start, or the date for an all-day event, written in the `When` line. It does not set the result date. + + + +The scheduled end, or the date for an all-day event, written after the start in the `When` line when the event has a start. + + + +When the event was last edited. Sets the result date and decides which events each sync reads. Not searchable. + + + +When the event was created. Sets the result date only when the event has no edit time. Not searchable. + + + +For a changed occurrence, the recurring series event it belongs to. Links the occurrence to the series document. Not searchable. + + + +The recurring series an occurrence belongs to, empty for one-off events. Groups the occurrences of one series together in the graph. Not searchable. + + + +The calendar's id. Limits a query to one calendar. Not searchable. + + + +The calendar's name. Limits a query to a calendar by name. Not searchable: the calendar name is not part of the event text. + + + +Always `calendar`. Not searchable. + + + +Limits a query to this connector's events. Not searchable. + + + +Always `google_calendar`. Not searchable. + + + + + +`confirmed` or `tentative`. It is not part of the event text. + + + + +**Example searches** + +- What was the agenda in the description of last Tuesday's planning meeting? +- Which meetings did Dana organize this month? +- Where is the offsite being held? + +## How it fits into the graph + +- Events use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Google Calendar creates** + +- A changed occurrence of a recurring meeting to its series. +- Changed occurrences of the same series to each other, so they group together. +- No links to other tools, including Gmail invitations. + +**People and groups** + +- Each attendee, by email. +- The organizer only when the organizer is also an attendee. +- Attendee names and response statuses are kept with the event but do not identify people in the graph. + +**Found in the text** + +The event card: title, time, place, organizer, attendees and description. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Calendar sharing and event visibility settings. +- Event attachments, audio and video, and conference details beyond what the location or description says. +- Unchanged occurrences of a recurring series as documents of their own. +- Events last edited before the first sync's window. +- Cancellations and deletions: an event cancelled or deleted after it was synced stays in HydraDB. diff --git a/essentials/v2/connectors/google-drive.mdx b/essentials/v2/connectors/google-drive.mdx new file mode 100644 index 00000000..4b92ecdb --- /dev/null +++ b/essentials/v2/connectors/google-drive.mdx @@ -0,0 +1,211 @@ +--- +title: "Google Drive" +description: "Sync files and folders from the Google Drive folders and shared drives you choose, one document per file or folder. With Enforce ACL on, each file's Drive sharing decides who can find it." +icon: "/images/connectors/google-drive.svg" +--- + +Sync the files inside the Google Drive folders and shared drives you select, including My Drive and every folder below a selected one. Each file and each folder is one document, and each links to its parent folder. Text from supported files is searchable when HydraDB can download and read the files: Google Docs and Slides come across as text, and Sheets as comma-separated values. A file whose text cannot be read is still findable by its name, type, owner and location. + +Each file's own Drive sharing becomes its access list, and search follows it when Enforce ACL is on. The first sync reaches only files modified in the last 30 days unless you raise `lookback_days`. Files removed in Drive are not deleted from HydraDB. Comments, suggestions and revision history are not synced. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Google Drive permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Each file has its own access list, read from its Drive sharing. A person it is shared with can read it, and so can members of a Google Group it is shared with. A domain share grants that Google Workspace domain. A file shared with anyone becomes readable by everyone who can query the collection only when it is discoverable. An unshared file can be read by its owner. +- **How a person is identified:** A person's email address. A Google Group share is turned into its members' email addresses when the Directory scope below is granted. +- **When permissions cannot be read:** If HydraDB cannot read a file's sharing, the connector reports a permission warning and the file carries `additional_metadata.acl_warning`. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- A share with anyone who has the link does not make a file readable by everyone. +- Without the Directory scope, Google Group shares are not turned into members, so a person identified only by email does not match a file shared only with a group. +- If a Google Group cannot be turned into its members, the group share is kept as it is. Access is not opened up. +- Sharing changes that do not edit the file are picked up on each sync. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Google Drive uses an OAuth client from your Google Cloud project and a refresh token for the Google account that connects. HydraDB sees what that account can see. + + +The OAuth client id of your Google Cloud app. + + + +The OAuth client secret of the same app. + + + +A refresh token for the connecting Google account, issued with the `drive.readonly` scope. + + +**Scopes to grant** + +- `https://www.googleapis.com/auth/drive.readonly`: required. Lists My Drive, files shared with the account and shared drives, and reads file details and sharing. +- `https://www.googleapis.com/auth/admin.directory.group.member.readonly`: optional, needs Google Workspace admin consent. Turns Google Group shares into member email addresses, for search that follows Drive permissions. +- `https://www.googleapis.com/auth/drive`: optional. Full Drive access, not needed to sync. + +### Set it up + + + + In Google Cloud, create an OAuth client and note its client id and client secret. + + + Sign in with a Google account that can see the folders and shared drives you want synced, grant `drive.readonly`, and keep the refresh token. + + + If files are shared with Google Groups and search must follow Drive permissions, have a Google Workspace admin consent to `admin.directory.group.member.readonly`. + + + Paste the three values as `client_id`, `client_secret` and `refresh_token`. + + + HydraDB lists My Drive, your shared drives and folders. Select at least one. Nothing syncs until you do. To reach files older than 30 days, raise `lookback_days` when you select them. + + + +One connector reads what one Google account can see. + + + +Use provider `google_drive` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected folder or shared drive reads back the window set by `lookback_days`, 30 days by default. Files last modified before that window are not synced. +- **New and changed items:** Each sync reads files modified since the last sync. Sharing changes are read on every sync, even when the file itself did not change. +- **Edits:** An edited file is read again, and its text replaces the old text. +- **Deletions:** Files removed in Drive are not deleted from HydraDB. When Drive reports a file as removed, HydraDB makes it private. It is then hidden only when Enforce ACL is on. With Enforce ACL off, it stays searchable. +- A file in two selected folders is kept once. +- A shortcut is synced as the file it points to when that file can be read. Otherwise only the shortcut's details are kept. Shortcuts to folders are not followed. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Files and folders + +- **One document:** One Drive file or one folder. +- **Title:** The shared drive name, the first parent folder name and the file name, joined with slashes, for example `Research/Q3 Findings.pdf`. A name that is missing is left out, and a shared drive's name may be missing. A file with no name is titled `Drive file` and its id. +- **Text:** For a file whose text could be read, that text. For a folder, or a file whose text could not be read, the title followed by `Type`, `Owner`, `Link` and `Modified` lines, leaving out empty ones. The title is searchable too. +- **Date:** When the file was last modified in Drive. +- **Link back:** Opens the file in Drive. A folder without its own link gets a Drive folder link. +- **Files:** Text from supported files is searchable when HydraDB can download and read the files. Google Docs and Slides are exported as text, and Sheets as comma-separated values. Files over 50 MiB, and Google file types other than Docs, Sheets and Slides, keep only their details. + + +The Drive file type, written as the `Type` line. Searchable on folders and on files whose text could not be read. On other files it is kept but not searchable. + + + +The display name, or else the email, of the file's first owner, written as the `Owner` line. Searchable on folders and on files whose text could not be read. On other files it is kept but not searchable. The owner is not attached to the file as a person in the graph. + + + +The Drive link, written as the `Link` line on folders and on files whose text could not be read. On other files it is the link back only. A Drive folder link that HydraDB builds is not added to the text. + + + +When the file was last modified in Drive. Sets the result date and decides which files each sync reads. Written as the `Modified` line, so it is searchable only on folders and on files whose text could not be read. + + + +The shared drive id for a file in a shared drive, otherwise its parent folder id. Limits a query to one shared drive, or to one folder in My Drive. Not searchable. + + + +The shared drive name, or the parent folder name. Limits a query by drive or folder name. Not searchable. + + + +`drive` or `folder`. Says which kind of container the two keys above refer to. Not searchable. + + + +The first parent folder id, even inside a shared drive. Limits a query to one folder. Not searchable. + + + +The first parent folder name. Limits a query by folder name. Not searchable. + + + +Set when the file's sharing could not be read or a Google Group could not be turned into its members. Finds the files that need attention. It does not grant access. Not searchable. + + + +Limits a query to this connector's files. Not searchable. + + + +Always `google_drive`. Not searchable. + + + +The file's first parent folder. Links the file or folder to that folder's document, so a folder and its files are connected. Not searchable. + + + +The file's people, group, domain and public shares. Decides who can read it when Enforce ACL is on. Not searchable. + + + + + +The size in bytes. Empty for Google Docs, Sheets and Slides. + + + +Drive's content checksum, for comparing file versions. Empty for Google Docs, Sheets and Slides. + + + +When the file was created in Drive. The result date uses the modified time instead. + + + +`folder` on folders. + + + +True on folders. + + + + +**Example searches** + +- What does the Q3 findings deck say about onboarding? +- Which files in the Finance folder mention the 2026 budget? +- Which pricing files were changed most recently? + +## How it fits into the graph + +- Files and folders use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Google Drive creates** + +- A file or folder to its first parent folder. +- No links to items in other tools. + +**People and groups** + +- No people are attached to files in the graph. The owner is part of the text only on folders and on files whose text could not be read. + +**Found in the text** + +The file's text, or for a folder or unread file, its title and detail lines. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Folders and shared drives you did not select. +- Files last modified before the `lookback_days` window on the first sync. +- Comments, suggestions and revision history. +- Text of files over 50 MiB. +- Text of Google file types other than Docs, Sheets and Slides. +- Deletions: removed files stay in HydraDB. diff --git a/essentials/v2/connectors/google-search-console.mdx b/essentials/v2/connectors/google-search-console.mdx new file mode 100644 index 00000000..1fbd9828 --- /dev/null +++ b/essentials/v2/connectors/google-search-console.mdx @@ -0,0 +1,152 @@ +--- +title: "Google Search Console" +description: "Sync daily search performance for one Google Search Console property, one document per report row with clicks, impressions, click-through rate and average position." +icon: "/images/connectors/google-search-console.svg" +--- + +Sync daily search performance reports for one Search Console property. Each report row is one small document: one day for one search query, page, country or device, or one day for the whole property, with its clicks, impressions, click-through rate and average position. A busy site produces one document per query per day. + +Search Console permissions are not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. Only web search performance is read. Rows that drop out of a later report stay in HydraDB. + + +Google Search Console is in beta. + + +## Permissions + + +Google Search Console permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Search Console uses a Google service-account JSON key together with the property to read. + + +The service account's JSON key, pasted whole. + + + +The Search Console property to read, written as Search Console names it: a URL-prefix property such as `https://example.com/`, or a domain property such as `sc-domain:example.com`. + + +**Scopes the connector requests** + +- `https://www.googleapis.com/auth/webmasters` +- `https://www.googleapis.com/auth/webmasters.readonly` + +### Set it up + + + + In Google Cloud, create a service account and download its JSON key. + + + Paste the key as `client_secrets` and the property as `site_url`. + + + HydraDB lists one `All data` resource for the property. Select it. Report types cannot be selected separately. + + + +One connector reads one Search Console property. + + + +Use provider `google_search_console` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the days since the last sync, plus the three days before them again. The current UTC day is not read until the next day. The freshest data Search Console has, which can still change, is included. +- **Edits:** Rows for the three re-read days replace their earlier documents, so late changes Search Console makes to those days come across. +- **Deletions:** Rows are never removed. A row that drops out of a later report stays searchable in HydraDB. +- On a day with more than 50,000 rows in one report, some of that day's rows are skipped. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Report rows + +- **One document:** One day of one report: one search query, one page, one country or one device, or the whole property for that day. +- **Title:** For a query row, the query in quotes followed by ` - search performance ()`. For a page, country, device or keys row, the value followed by ` - search performance ()`. For a whole-property row, `Search performance for ()`. +- **Text:** The title, then `Site`, the row's own line (`Query`, `Page`, `Country`, `Device` or `Keys`), `Date`, `Clicks`, `Impressions`, `CTR` and `Avg position` lines. `CTR` is a percentage with two decimals and `Avg position` has one decimal. Empty values are left out. +- **Date:** The report day, at midnight UTC. +- **Link back:** None. +- **Files:** None. + + +The value the row reports on, written into the title and its own line. The keys report asks only for the date, so its rows repeat the whole-property daily totals. + + + +The day's metrics, written as the `Clicks`, `Impressions`, `CTR` and `Avg position` lines. + + + +The report day. It is written into the title and the `Date` line and sets the result date. + + + +The property, written into the `Site` line with everything up to the first colon removed. `https://example.com/` reads as `//example.com/` and `sc-domain:example.com` reads as `example.com`. + + + +The report the row came from: `performance_report_query`, `performance_report_page`, `performance_report_date`, `performance_report_country`, `performance_report_device` or `performance_report_keys`. Limits a query to one report, for example only per-query rows. Not searchable. + + + +Limits a query to this connector's rows. Not searchable. + + + +Always `google-search-console`, with hyphens. A filter on `google_search_console` matches nothing. Not searchable. + + + + + +The report the row came from, shown when you inspect the item. To limit a query to one report, use `additional_metadata.google_search_console_stream`. + + + + +**Example searches** + +- How did the search query "running shoes" perform on 2026-11-03? +- How many clicks and impressions did the /pricing page get on 2026-11-03? +- What was our average position on mobile devices last week? + +## How it fits into the graph + +- Report rows use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Google Search Console creates** + +- None. Rows are not linked to each other, to pages or to the property. +- No links to other tools. + +**People and groups** + +No people or groups are attached to rows. + +**Found in the text** + +The report text: the site, the query, page, country or device, the date and the metrics. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Image, video and news search performance. Only web search is read. +- URL inspection, index coverage, sitemaps and other Search Console reports. +- Query and page pairs as one combined report. +- Properties other than the one set in `site_url`. +- Removals: rows that drop out of a later report stay in HydraDB. diff --git a/essentials/v2/connectors/googleads.mdx b/essentials/v2/connectors/googleads.mdx new file mode 100644 index 00000000..e4063ce4 --- /dev/null +++ b/essentials/v2/connectors/googleads.mdx @@ -0,0 +1,148 @@ +--- +title: "Google Ads" +description: "Sync Google Ads account structure and daily performance reports from the accounts one Google user can access, one searchable document per report row." +icon: "/images/connectors/googleads.svg" +--- + +Sync account structure and reports from every Google Ads account one Google user can access: accounts and labels, campaigns with their budgets, targeting criteria and labels, ad groups, ads, audiences, keywords, placements, search terms, geography, video, and daily campaign and ad group performance. Each report row is one document, written as `Label: value` lines. + +Google Ads account access is not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. Rows are kept by each report's key, and some keys leave out the date or the account, so several rows can end up as one document. Items removed in Google Ads stay in HydraDB. + +## Permissions + + +Google Ads permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Google Ads uses a developer token together with a Google OAuth client id, client secret and refresh token. Paste all four. + + +Your Google Ads API developer token. + + + +A Google OAuth client id. + + + +The secret for that OAuth client. + + + +A refresh token for a Google user who has access to the Google Ads accounts you want to sync. + + +### Set it up + + + + Get your Google Ads API developer token. Then issue a refresh token, through your own Google OAuth client, for a Google user who can access the Google Ads accounts to sync. + + + Paste the developer token as `developer_token`, and the client id, client secret and refresh token as `oauth_credentials.client_id`, `oauth_credentials.client_secret` and `oauth_credentials.refresh_token`. + + + HydraDB lists one account-wide resource, All data, that covers every account the user can access. Select it. Individual Google Ads accounts are not listed separately. + + + +One connector reads every Google Ads account that one Google user can access, including accounts under a manager account. + + + +Use provider `googleads` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Campaign, ad group, budget, demographic, location and geography performance reports are read for the days in each sync's date window. +- **Edits:** A row read again updates its document only while the row's report key stays the same. In reports whose key includes a name or status, such as campaign performance, renaming a campaign or changing its status creates a new document and the old one stays. Corrections Google makes later to older days are not guaranteed to be picked up. +- **Deletions:** Campaigns, ad groups and ads removed in Google Ads stay searchable in HydraDB. +- Manager accounts and disabled accounts appear in the account hierarchy, but their performance and other reports are not read. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Report rows + +- **One document:** One row of a report, identified by that report's key. Rows that share a key are kept as one document, and the last one read wins. Budget rows for different days share a key, managed placement rows share one key per account and date, and campaign performance rows with the same campaign name, status, date and device share a key even when they come from different accounts. +- **Title:** The row's most specific name: its own name or title, else the ad group, budget, audience, label, interest, geo target, video title, campaign or account name, else any other name column. When the row has a `segments__date`, the date follows in parentheses, as in `Spring Sale (2026-11-03)`. A row with no name is titled `Google Ads `. +- **Text:** The title on the first line. Then every non-empty column of the row in alphabetical order, as `Label: value`, with the column name turned into words, such as `Metrics Cost Micros`. Nested values are flattened first. Ids and resource names are left out. Rows of `accessible_customers` add a `Resource names` line. +- **Date:** The report date, at midnight UTC. A row without a date has no date. +- **Link back:** None. +- **Files:** None. + + +Names, statuses, dates and metric values, one `Label: value` line each. No unit conversion is applied: columns such as `cost_micros` and `amount_micros` keep the raw micros values Google Ads reports. Ids and resource names are not part of the text. + + + +The report day, from `segments__date`, or from `date` when that is the column a report has. It sets the result date and appears as a column line. `segments__date` is also added to the title. + + + +The report the row came from. Limits a query to one report. The values are `accessible_customers`, `customer_hierarchy`, `customer`, `customer_label`, `label`, `campaign_history`, `campaign_budget`, `campaign_criterion`, `campaign_label`, `campaign_performance`, `campaign_performance_by_age_range_and_device`, `campaign_performance_by_gender_and_device`, `campaign_performance_by_location`, `adgroups`, `ad_groups_performance`, `ad_group_ad`, `ad_group_ad_label`, `ad_group_criterion`, `ad_group_label`, `ad_listing_group_criterion`, `audience`, `user_interest`, `geo_performance`, `geo_target_constant`, `keyword_view`, `managed_placement_view`, `search_term_view` and `video`. Not searchable. + + + +Limits a query to this connector's rows. Not searchable. + + + +Always `googleads`. Limits a query to Google Ads rows. Not searchable. + + + + + +The report the row came from, shown when you inspect the item. To limit a query to one report, use `additional_metadata.googleads_stream`. + + + +Every column of the row as Google Ads returned it, including ids and resource names. Kept for inspection only. A query does not match ids or resource names and cannot filter on these columns. + + + + +**Example searches** + +- How did the Spring Sale campaign perform on mobile on 2026-11-03? +- What amount in micros is recorded for the budget named Brand Budget? +- Which keywords are in the Running Shoes ad group, and how did they perform? + +## How it fits into the graph + +- Report rows use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Google Ads creates** + +- None. Rows are not linked to their account, campaign, ad group or ad. +- Campaign labels are not linked to their campaign. A campaign label row carries the campaign id and the label name, but no campaign name. +- No links to other tools. + +**People and groups** + +No people or groups are attached to rows. + +**Found in the text** + +The row text: names, statuses, dates and metric values. Ids and resource names are not part of it. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Per-click reports. +- A standalone gender report. Campaign performance by gender and device is synced. +- Performance and other reports for manager accounts and disabled accounts. +- Removals: campaigns, ad groups and ads removed in Google Ads stay in HydraDB. +- Google Ads account access. diff --git a/essentials/v2/connectors/granola.mdx b/essentials/v2/connectors/granola.mdx new file mode 100644 index 00000000..885f85ad --- /dev/null +++ b/essentials/v2/connectors/granola.mdx @@ -0,0 +1,173 @@ +--- +title: "Granola" +description: "Sync Granola meeting notes from the folders you choose, one searchable document per note with its summary and transcript." +icon: "/images/connectors/granola.svg" +--- + +Sync Granola meeting notes from the folders you select. Each note is one document with the meeting details, Granola's AI summary and the transcript, each line labelled with its speaker. + +Granola sharing is not imported, so every synced note is visible to everyone who can query the collection unless you set an access rule. Only notes the API key can see are synced, and only Business and Enterprise plans can create a key. Notes deleted in Granola stay in HydraDB. + + +Granola is in beta. + + +## Permissions + + +Granola permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- An access rule set on a folder applies to the notes that folder's sync returned. A note in several selected folders follows the rule of the first selected folder that returned it. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Granola uses an API key. Only Business and Enterprise plans can create one. + + +A Granola API key. + + +What the key can see decides which notes are synced. A key scoped to workspace or public notes sees more than a personal-only key. + +### Set it up + + + + In the Granola desktop app, open Settings, Connectors, API keys and create a key. + + + Paste the key as `api_key`. + + + HydraDB lists the workspace's folders. Select the folders whose notes you want to sync. + + + +One connector reads the notes its API key can see in one Granola workspace. + + + +Use provider `granola` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads notes edited within the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the notes edited since the last sync, with their transcripts. +- **Edits:** An edited note is read again and replaces its document. After an edit, the note can be synced without its transcript text if Granola still holds transcript lines from the note's previous version. +- **Deletions:** Notes deleted in Granola stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Notes + +- **One document:** One Granola note with its transcript. +- **Title:** The note title, or `Granola note ` when it has none. +- **Text:** The title, then a `Meeting` line when the calendar event's title differs from the note title, a `When` line, an `Owner` line, an `Attendees` line and a `Folders` line. Then Granola's summary under `Summary`, and the transcript under `Transcript`, one speaker-labelled line per segment, in order. Transcript lines from an older version of the note are left out. The title is searchable too. +- **Date:** When the note was last edited, else when it was created. +- **Link back:** The note in Granola's web app. +- **Files:** None. + + +Granola's AI summary, written under `Summary`. A query can match it without matching the transcript. + + + +The owner's name or email, written as the `Owner` line. The owner is not attached to the note as a person in the graph. + + + +Each attendee's name, or email when there is no name, written as the `Attendees` line. An attendee's email is kept even when the name is shown. + + + +The names of the folders the note is in, written as the `Folders` line, so a query can name a folder in plain words. + + + +The linked calendar event's title, written as the `Meeting` line when it differs from the note title. + + + +The linked calendar event's start, written as the `When` line. It does not set the result date. + + + +When the note was last edited. Sets the result date and decides which notes each sync reads. Written as the `When` line when the note has no scheduled start. + + + +When the note was created. Sets the result date only when there is no edit time. Written as the `When` line only when there is neither a scheduled start nor an edit time. + + + +The id of the note's first folder. Limits a query to notes whose first folder is that folder. A note in several folders matches only its first. Not searchable. + + + +Always `folder`. Not searchable. + + + +Limits a query to this connector's notes. Not searchable. + + + +Always `granola`. Not searchable. + + + +The first selected folder whose sync returned the note. An access rule you set on that folder applies to the note. It can differ from the folder in `additional_metadata.container_id`. Not searchable. + + + + + +The linked calendar event's organizer email. It is not part of the searchable text and is not attached to the note as a person. + + + +Whether the transcript made it into the note's text. + + + + +**Example searches** + +- What did we decide in Monday's roadmap meeting? +- What did the customer say in the Acme intro call? +- Summarize my notes in the Hiring folder from last week. + +## How it fits into the graph + +- Notes use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Granola creates** + +No links between notes or to other tools. + +**People and groups** + +The connector does not attach the owner, attendees or speakers to a note as people. Their names are part of the note text. + +**Found in the text** + +The whole note: meeting details, summary and transcript. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Folders you did not select, and notes the API key cannot see. +- Granola note sharing and permissions. +- Folders as documents of their own, audio, and transcript lines as documents of their own. +- The original Markdown summary, the linked calendar event's id, its invite list and its scheduled end time. +- Deletions: notes deleted in Granola stay in HydraDB. diff --git a/essentials/v2/connectors/greenhouse.mdx b/essentials/v2/connectors/greenhouse.mdx new file mode 100644 index 00000000..1b6700ad --- /dev/null +++ b/essentials/v2/connectors/greenhouse.mdx @@ -0,0 +1,373 @@ +--- +title: "Greenhouse" +description: "Sync candidates, applications, jobs, scheduled interviews and offers from Greenhouse. Applications link to their candidate and jobs, and interviews and offers link to their application." +icon: "/images/connectors/greenhouse.svg" +--- + +Sync candidates, applications, jobs, scheduled interviews and offers from one Greenhouse account. Each record is one document. Applications link to their candidate and to each job applied for. Interviews and offers link to their application. + +Greenhouse permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Private candidates and confidential jobs are not restricted. Selecting jobs limits only jobs and applications: candidates, interviews and offers sync for the whole account. Changes to an offer after it is created may not be picked up, and records deleted in Greenhouse stay in HydraDB. + + +Greenhouse is in beta. + + +## Permissions + + +Greenhouse permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Greenhouse's private flag on candidates and confidential flag on jobs are stored but do not restrict who can read them. +- An access rule on a job does not cover candidates, interviews or offers, which sync for the whole account. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Greenhouse uses a Harvest API key. + + +A Greenhouse Harvest API key. + + +### Set it up + + + + Get a Harvest API key for your Greenhouse account. + + + Paste the key as `api_key`. + + + HydraDB lists your jobs. Select the jobs to sync. Jobs and applications are limited to the jobs you select. Candidates, interviews and offers sync for the whole account whatever you select. + + + +One connector reads one Greenhouse account. + + + +Use provider `greenhouse` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Candidates and interviews are picked up when they are updated, applications when they have new activity, and selected jobs when they are updated. Offers are picked up when they are created. +- **Edits:** An edited candidate, application, job or interview replaces its document. Changes to an older offer may not be picked up, so its status can be out of date. +- **Deletions:** Records deleted in Greenhouse stay searchable in HydraDB. +- A new version of an offer keeps the same offer id, so it replaces the earlier version's document. Earlier versions are not kept. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Greenhouse item + + +The record's Greenhouse id, written into the text as its key. + + + +Limits a query to this connector's records. Not searchable. + + + +Always `greenhouse`. Not searchable. + + +### Candidates + +- **One document:** One candidate. +- **Title:** The candidate's first and last name. Otherwise `Greenhouse candidate` and its id. +- **Text:** The name, then `Company`, `Title`, `Tags` and `Emails` lines, and each past employment and education. The creation time is part of the text. The title is searchable too. +- **Date:** When the candidate was last updated, or created when there is no update time. +- **Link back:** None. +- **Files:** Resumes and other candidate attachments are not synced. + + +The candidate's name, in the title and the text. + + + +The candidate's current employer and job title. + + + +The candidate's tags. + + + +The candidate's email addresses, in the text only. They are not kept as a separate field. + + + +Each past employer and job title. Employment dates are stored but not searchable. + + + +Each school, degree and discipline. Education dates are stored but not searchable. + + + +When the candidate was created. It is the result date only when there is no update time. + + + +When the candidate was last updated. Not searchable. + + + +The Greenhouse candidate id. Finds one candidate. Not searchable. + + + + + +Greenhouse's private flag. It does not restrict who can read the candidate. + + + +The ids of the candidate's applications. The links to applications come from the application documents. + + + +When the candidate last had activity. + + + + +### Applications + +- **One document:** One application, for a job you selected. +- **Title:** `Application:` and the names of the jobs applied for. Otherwise `Greenhouse application` and its id. +- **Text:** The title, then `Status`, `Jobs` and `Rejection reason` lines, then each application question with its answer. The title is searchable too. +- **Date:** When the application last had activity, or when it was submitted. +- **Link back:** None. + + +Links the application to its candidate. Not searchable. + + + +Links the application to each job applied for. Not searchable. + + + +The names of the jobs applied for, in the title and the `Jobs` line. + + + +The application status, in the `Status` line. + + + +Any rejection reason, by name. It is in the text only, not kept as a separate field. + + + +Each application question with a non-empty answer. Answers are in the text only, not kept as separate fields. + + + +When the application last had activity. Not searchable. + + + +When the candidate applied. It is the result date only when there is no activity time. Not searchable. + + + +The Greenhouse application id. Finds one application. Not searchable. + + + + + +When the application was rejected. + + + + +### Jobs + +- **One document:** One job you selected. +- **Title:** The job name. Otherwise `Greenhouse job` and its id. +- **Text:** The name, then `Requisition`, `Status`, `Departments` and `Offices` lines. The creation time is part of the text. The title is searchable too. +- **Date:** When the job was opened, or created when there is no open time. +- **Link back:** None. + + +The job name, in the title and the text. + + + +The requisition reference, in the `Requisition` line. + + + +The job status, in the `Status` line. + + + +Department and office names. Office locations are not searchable. + + + +When the job was created. It is the result date only when there is no open time. + + + +When the job was opened. Not searchable. + + + +The Greenhouse job id. Finds one job. Not searchable. + + + + + +Greenhouse's confidential flag. It does not restrict who can read the job. + + + +When the job was closed. + + + + +### Interviews + +- **One document:** One scheduled interview. +- **Title:** `Interview with` and the interviewers' names. Otherwise `Greenhouse interview` and its id. +- **Text:** The title, then `Status`, `Start`, `End`, `Location`, `Video conferencing`, `Interviewers` and `Organizer` lines. The creation time is part of the text. The title is searchable too. +- **Date:** When the interview was last updated. Otherwise its start time, then its creation time. +- **Link back:** None. + + +Links the interview to its application. Not searchable. + + + +Each interviewer's name and email. Names are also in the title. Interviewers are not attached to the interview as people in the graph. + + + +The organizer's name and email, in the text only. + + + +When the interview starts. It is the result date only when there is no update time. + + + +When the interview ends. + + + +The interview location and video conferencing link. The link is not a link back to Greenhouse. + + + +The interview status, in the `Status` line. + + + +When the interview was created. It is the result date only when there is no update or start time. + + + +When the interview was last updated. Not searchable. + + + +The Greenhouse interview id. Finds one interview. Not searchable. + + + + + +Each interviewer's response status. + + + + +### Offers + +- **One document:** One offer. A new version with the same offer id replaces it. +- **Title:** `Greenhouse offer` and its id. +- **Text:** `Status`, `Version`, `Sent`, `Resolved` and `Starts` lines. The creation time is part of the text. The title is searchable too. +- **Date:** When the offer was last updated, or created when there is no update time. +- **Link back:** None. + + +Links the offer to its application. Not searchable. + + + +The offer status and version, as recorded when the offer was last read. + + + +When the offer was sent and resolved, and the proposed start date. + + + +When the offer was created. It decides when the offer is synced, and it is the result date only when there is no update time. + + + +When the offer was last updated, as of the last time it was read. A later update does not cause it to be read again. Not searchable. + + + +The Greenhouse offer id. Finds one offer. Not searchable. + + +**Example searches** + +- Which applications for the backend engineer job are active? +- Which interviewers and times were recorded for this application? +- Which offers were accepted, and what start dates do they show? + +## How it fits into the graph + +- Candidates use the Ticket class. +- Applications use the Ticket class. +- Jobs use the Ticket class. +- Interviews use the Ticket class. +- Offers use the Ticket class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Greenhouse creates** + +- An application to its candidate. +- An application to each job applied for. +- An interview to its application. +- An offer to its application. +- No links to other tools. + +**People and groups** + +Interviewers and organizers are not attached to an interview as people. Their names and emails are in the text only. + +**Found in the text** + +Candidate profiles, application answers, job details, interview details with interviewer and organizer names, and offer terms. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Jobs you did not select, and applications for them. +- EEOC self-identification records. +- Scorecards, interview feedback, candidate notes and activity feed entries. +- Resumes, photos and other files. +- Candidate phone numbers, addresses, websites and social links. +- Earlier versions of an offer. +- Deletions: records deleted in Greenhouse stay in HydraDB. diff --git a/essentials/v2/connectors/guru.mdx b/essentials/v2/connectors/guru.mdx new file mode 100644 index 00000000..e21ba7de --- /dev/null +++ b/essentials/v2/connectors/guru.mdx @@ -0,0 +1,300 @@ +--- +title: "Guru" +description: "Sync cards and their comments from the Guru collections you choose. With Enforce ACL on, the Guru groups that can open a collection decide who can find its cards." +icon: "/images/connectors/guru-light.svg" +--- + +Sync the cards in the Guru collections you select. Each card is one document with its text, collection, verification state and owner. Each comment and each reply is its own document, linked to its card or thread. Attached files can be downloaded and their text added to the card. + +The Guru groups that can open a collection restrict search when Enforce ACL is on. Private cards are skipped unless you turn on `include_private_cards`. Tags, folders and verifiers are kept but are not searchable. Cards and comments deleted in Guru stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Guru permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** A card can be read by the members of the Guru groups that can open its collection. A collection open to All Members or All Organization Members can be read by everyone who can query the collection. A private card, synced only when `include_private_cards` is on, can be read by its owner and its collaborators. A comment follows its card. +- **How a person is identified:** A member's email address. Guru groups are turned into their active members' email addresses. +- **When permissions cannot be read:** If HydraDB cannot read a collection's group access, or a private card's owner and collaborators, the connector reports a permission warning. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Reading a collection's group access needs the user token of a Guru Admin or of the collection's owner. A collection token cannot read it. +- Guru Admins are not added to a collection's readers. +- A group or audience too large to read in full counts as unreadable. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Guru uses an API token, paired with either your Guru username for a user token, or a collection id for a collection token. Set exactly one of `email` and `collection_id`. The token reads as the user who generated it. + + +A Guru user token. + + + +Your Guru username, usually your email. + + + + +**Collection token** + + +A Guru collection token. It is read-only and covers one collection, and it cannot read who can open the collection. + + + +The id of the token's collection. + + + + +**Connector settings** + + +Set to `true` to also sync private cards, each readable only by its owner and collaborators. Off by default. + + +**What the Guru user needs** + +- `Read access to each collection`: required. Cards in collections the user cannot open are never synced. +- `Manage Apps & Integrations`: required to generate the token. An Admin can generate it on behalf of the syncing user. +- `Admin or Collection Owner`: optional, for search that follows Guru permissions. Reads which groups can open each collection. + +### Set it up + + + + In Guru, open Manage, Apps & Integrations, API Access and generate a user token, or a collection token for a single collection. For search that follows Guru permissions, use the user token of a Guru Admin or of each collection's owner. + + + Paste the token as `api_token`. For a user token, add your Guru username as `email`. For a collection token, add the collection id as `collection_id`. To sync private cards, set `include_private_cards` to `true`. + + + HydraDB lists the collections the token can read. Select the collections to sync. To reach cards older than 30 days, raise `lookback_days` when you select them. + + + +One connector reads what one Guru user, or one collection token, can open. + + + +Use provider `guru` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected collection reads back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the cards that were edited, verified or commented on since the last sync. Each card's comments are sent again as their own documents. +- **Edits:** An edited card is read again and replaces its document. +- **Deletions:** Deleted cards are not removed. A card, comment or reply deleted in Guru stays searchable in HydraDB. +- If Guru refuses a card's comment list, a change to its comments only can be missed until the card changes again. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Guru item + + +When the card or comment was last modified, written as the `Updated` line. A card's result date is the later of this and its last verification. A comment's is the later of this and its creation time. + + + +The card id. On a card, picks out that card. On a comment, the card it is on, so one key finds a card and its comments. Not searchable. + + + +The collection id. Limits a query to one collection's cards and comments. Not searchable. + + + +The collection name. Limits a query to one collection by name. Not searchable. + + + +Always `collection`. Not searchable. + + + +Limits a query to this connector's cards and comments. Not searchable. + + + +Always `guru`. Not searchable. + + + +The Guru groups that can open the card's collection. For a private card, its owner and collaborators instead. A comment uses its card's. Decides who can read the item when Enforce ACL is on. Not searchable. + + + + + +Set when a private card's owner and collaborators could not be read. Explains the missing permissions. + + + + +### Cards + +- **One document:** One Guru card. +- **Title:** The card title. A card with no title is titled `Guru card` and its id. +- **Text:** The card content with HTML removed. Plain text and Markdown pass through. If the content has no readable text, the title stands in. The title, author and last-modified time are searchable too. +- **Date:** The later of when the card was last modified and when it was last verified, so a re-verified card counts as recent. +- **Link back:** Opens the card in Guru. +- **Files:** Attached files can be downloaded and their text added to the card. A file over 25 MiB, of an unsupported type, or that fails to download keeps only its name. + + +The card owner's display name, written as the `Author` line. The graph records the card as written by its owner. + + + +The card owner's name or email, the same person as `created_by`. + + + +The owner's email. Gives the author an email in the graph, so the same person is recognised across tools. Not searchable. + + + +When the card was last verified. When it is later than the last edit, it sets the result date. Not searchable. + + + +The card's trust status, such as `TRUSTED` or `STALE`. Limits a query to trusted cards, or finds stale ones. Not searchable. + + + +`TEAM`, `PRIVATE` or `PUBLIC`. Private cards are skipped, or with `include_private_cards` on, readable only by their owner and collaborators. Not searchable. + + + + + +When the card was created. + + + +Guru's reason for the verification state, when there is one. + + + +How many days pass between required verifications. + + + +The people and groups responsible for verifying the card. Not attached as people in the graph. + + + +The verifiers' emails. They do not decide who can read the card. + + + +The name of whoever last verified the card. + + + +That verifier's email. + + + +The last editor's name or email. Not attached as a person in the graph. + + + +The last editor's display name. + + + +The last editor's email. + + + +The card's tag names. A query cannot match or filter on them. + + + +The names of the folders the card is in. A query cannot match or filter on them. + + + +How many comments Guru reports for the card. + + + +The file names of the card's attachments. + + + + +### Comments + +- **One document:** One comment that starts a thread on a card, or one reply in a thread. Empty comments are skipped, except a thread opener whose replies have text. +- **Title:** `Comment by` the author's name `on` the card title, or `Comment on` the card title. +- **Text:** The comment text with markup removed, with `Author`, `Parent`, `Created` and `Updated` lines. +- **Date:** The later of when the comment was created and last modified. +- **Link back:** Opens the card the comment is on. + + +The comment author as name and email, written as the `Author` line. The graph records the comment as written by that person. + + + +The card for a thread opener, or the thread for a reply, written as the `Parent` line. Links the comment to it. + + + +When the comment was created, written as the `Created` line. + + + +The comment id. Picks out one comment. Not searchable. + + + + + +The comment's status. + + + + +**Example searches** + +- What does our Guru card say about the refund policy for annual plans? +- Which trusted cards in the Sales collection cover competitor pricing? +- What did people comment on the onboarding checklist card? + +## How it fits into the graph + +- Cards use the Page class. +- Comments use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Guru creates** + +- A comment that starts a thread to its card. +- A reply to its thread. +- No links to items in other tools. + +**People and groups** + +- The owner of each card, with name and email. +- The author of each comment and reply. +- Verifiers and editors are kept with the card but not attached as people. + +**Found in the text** + +The card text, the text read from attached files, and the comment text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Collections you did not select. +- Cards not edited, verified or commented on within the `lookback_days` window on the first sync. +- Private cards, unless `include_private_cards` is on. +- Collections the token's user cannot open. +- Deletions: deleted cards, comments and replies stay in HydraDB. diff --git a/essentials/v2/connectors/helpscout.mdx b/essentials/v2/connectors/helpscout.mdx new file mode 100644 index 00000000..acb24a3d --- /dev/null +++ b/essentials/v2/connectors/helpscout.mdx @@ -0,0 +1,212 @@ +--- +title: "Help Scout" +description: "Sync conversations, and every message, reply and internal note in them, from the Help Scout mailboxes you choose. Help Scout permissions are not imported." +icon: "/images/connectors/helpscout.svg" +--- + +Sync conversations from the Help Scout mailboxes you select. Each conversation is one document with its preview, customer, assignee, mailbox and tags. Each customer message, agent reply and internal note is its own document, linked to its conversation. The full text lives in those message documents, not in the conversation. + +Help Scout permissions are not imported, so every synced conversation and message, including internal notes, is visible to everyone who can query the collection unless you set an access rule. Conversations deleted in Help Scout stay in HydraDB. Help Scout Docs and attachments are not synced. + +## Permissions + + +Help Scout permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Internal notes are synced with every other message. Help Scout's own audience for a note is not imported. Set an access rule on a mailbox whose notes must stay private. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Help Scout uses the App ID and App Secret of a Help Scout app. HydraDB gets a fresh access token from them on every sync, so there is no refresh token to manage. + + +The App ID of a Help Scout app owned by the account you connect. + + + +The App Secret of that app. + + +### Set it up + + + + In the Help Scout account you want to connect, create an app and copy its App ID and App Secret. + + + Paste the App ID as `client_id` and the App Secret as `client_secret`. + + + HydraDB lists the account's mailboxes. Select the ones to sync. Only conversations in selected mailboxes are synced. + + + +One connector reads one Help Scout account. An app belongs to one account, so each account needs its own app. + + + +Use provider `helpscout` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected mailbox reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads conversations that changed since the last sync. A conversation counts as changed when a user updated it or the customer started waiting on it. Every message in a changed conversation is read again. +- **Edits:** A changed conversation is read again with all its messages, and updates their documents. +- **Deletions:** Deleted conversations and messages are not removed. They stay searchable in HydraDB. +- A connector created before mailboxes could be selected syncs the whole account. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Help Scout item + + +The conversation id on a conversation, the thread id on a message. Targets one item, and keeps later syncs on the same document. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `helpscout`. Not searchable. + + +### Conversations + +- **One document:** One conversation. +- **Title:** The conversation subject. +- **Text:** The conversation preview, or the subject when the preview is empty. Then `Customer`, `Assignee`, `Mailbox` and `Tags` lines. The status and creation time are part of the text too. The subject is searchable too. The preview is short, so search the messages for the full text. +- **Date:** When the conversation was last updated, else when it was created. +- **Link back:** The conversation in Help Scout. + + +The conversation status: active, pending, closed or spam, written as a `Status` line. + + + +The primary customer's name or email, written as the `Customer` line, where HydraDB can identify the person. + + + +The assigned user's name or email, written as the `Assignee` line, where HydraDB can identify the person. + + + +The mailbox name, written as the `Mailbox` line, where HydraDB can identify the mailbox. It does not create a link to a mailbox. + + + +The tag names, written as the `Tags` line. + + + +When the conversation was created, written as a `Created` line. Used as the result date only when there is no update time. + + + +When the conversation was last updated. Not searchable. + + + + + +Published, draft or deleted. + + + +The conversation number Help Scout shows. It is part of the link back. + + + +The mailbox id. The mailbox name is in `mailbox`. + + + + +### Messages + +- **One document:** One customer message, agent reply or internal note that has a body. Status-only entries are skipped. +- **Title:** `Comment by` and the author's name. Without an author, the first 80 characters of the text. +- **Text:** An `Author` line, then the message body converted from HTML to text. The creation time is part of the text too. +- **Date:** When the message was created. +- **Link back:** None. Open the conversation from its own document. +- **Files:** Attachments are not synced. + + +The name or email of whoever wrote the message, else the customer, written as the `Author` line. The graph records the message as written by that person. + + + +Names @mentioned in an internal note. The names stay in the note text, and the graph records each as mentioned. + + + +The conversation the message belongs to. Links the message to its conversation, so the whole exchange can be returned together. + + + +The id of the conversation the message belongs to. Returns every message in one conversation. Not searchable. + + + +When the message was created, written as a `Created` line. + + + + + +`customer`, `message` or `note`, so you can tell a customer message from an internal note. + + + +The message's status in Help Scout. + + + + +**Example searches** + +- What did the customer say in the latest conversation about a refund? +- Which open conversations are assigned to Maria? +- Which conversations mention refunds in the billing mailbox? + +## How it fits into the graph + +- Conversations use the Ticket class. +- Messages use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Help Scout creates** + +- A message to its conversation. +- No links to other tools. + +**People and groups** + +- The author of each message. +- Names @mentioned in an internal note. +- The customer, the assignee and the mailbox appear in the conversation text, where HydraDB can identify them. + +**Found in the text** + +The conversation preview with its customer, assignee, mailbox and tag lines, and the body of every message. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Mailboxes you did not select. +- Help Scout Docs, the knowledge base, which uses a separate API and key. +- Customer profiles and happiness ratings. +- Users, teams, workflows, saved replies and mailbox folders, as documents of their own. +- Conversation custom field values. +- Attachments. +- Deletions: deleted conversations and messages stay in HydraDB. diff --git a/essentials/v2/connectors/hubspot.mdx b/essentials/v2/connectors/hubspot.mdx new file mode 100644 index 00000000..f943d4e1 --- /dev/null +++ b/essentials/v2/connectors/hubspot.mdx @@ -0,0 +1,388 @@ +--- +title: "HubSpot" +description: "Sync HubSpot CRM records and logged activities. Owner and team restrictions carry over for deals, contacts and companies, not tickets." +icon: "/images/connectors/hubspot.svg" +--- + +Sync the HubSpot CRM object types you select: deals, tickets, contacts and companies, and the notes, emails, calls, meetings and tasks logged on them. Each record or activity is one document. + +An activity links to one associated deal, contact or company only when everyone who can read the activity can also read that record. Owner and team restrictions can be captured for deals, contacts and companies, but not tickets. Search applies captured restrictions only with Enforce ACL enabled. + +Custom CRM properties and files attached to activities are not synced. Deleted and archived records stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow HubSpot permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Each deal, contact and company carries HubSpot's owners and the teams that can access it, including parent teams. Its readers are the owners, every member of those teams, every super admin, and the members of the roles you list in `full_visibility_roles`. An activity can be read by everyone who can read any record it is logged on. An activity logged on nothing uses its own owner and teams. +- **How a person is identified:** A HubSpot user's or owner's email address. +- **When permissions cannot be read:** If a record names owners or teams but their readers cannot be worked out, the record gets an access warning, which you can find with `additional_metadata.rbac_warning`. A warning does not by itself mean the record is public. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Tickets do not carry HubSpot's owner and team access lists, so owners and teams do not restrict them. Set an access rule on the tickets resource if tickets must be private. +- If a record carries no owner or team access information, HydraDB does not restrict it based on the owner it shows, and does not raise a warning. An access rule you set on its resource still applies. +- Queues and archived owners give access to no one. +- If an activity's parent record is not synced, the activity can be readable by everyone. Sync the deals, contacts and companies your activities are logged on. +- If HydraDB cannot read which records an activity is logged on, those activities are not synced until a later sync can read them. +- This is HydraDB's reading of HubSpot owners, teams and roles. It is not a guarantee that HydraDB matches HubSpot's visibility in every case. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +HubSpot uses an access token from a private app, or an OAuth access token. + + +A HubSpot private-app or OAuth access token. HydraDB does not refresh it, so a short-lived token must be replaced when it expires. + + +**Scopes for the app, all required** + +- `crm.objects.contacts.read`: contacts. +- `crm.objects.companies.read`: companies. +- `crm.objects.deals.read`: deals. +- `tickets`: tickets. +- `crm.objects.notes.read`: notes. +- `crm.objects.calls.read`: calls. +- `crm.objects.emails.read`: logged emails. +- `sales-email-read`: email bodies. Without it, emails sync with their subject only. +- `crm.objects.meetings.read`: meetings. +- `crm.objects.tasks.read`: tasks. +- `crm.objects.owners.read`: record owners, used to work out who can read a record. +- `settings.users.read`: users, their teams and super-admin status, used for permissions. +- `settings.users.teams.read`: teams, used for permissions. + +### Set it up + + + + In HubSpot, create a private app or an OAuth app that requests every scope above, and copy its access token. + + + Paste the token as `access_token`. + + + HydraDB lists the CRM object types the token can read. Select the ones to sync. Notes, emails, calls, meetings and tasks are offered only when the token can also read contacts, companies, deals and tickets. + + + When you configure the connector, list in `full_visibility_roles` the names of HubSpot roles whose members can see every record. HubSpot does not report what a role can see, so a member of such a role is otherwise not given access. Leaving the setting out keeps the current list. An empty list clears it. + + + +One connector reads the object types one access token can read. + + + +Use provider `hubspot` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected object type reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads records modified since the last sync, and reads owners, users and teams again in full. +- **Edits:** An edited record is read again and replaces its document. A change to users or teams can also update who can read records already in HydraDB. A large change can take several syncs, so do not rely on a membership change to remove access right away. +- **Deletions:** Deleted and archived HubSpot records are not removed. They stay in HydraDB. +- If the token lacks the scope for one object type, that type can be skipped while the others sync. +- A connector set up before object types could be selected keeps syncing all of them until you configure it again. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every HubSpot item + + +The record's modification time. Used for ranking by date when no activity time is available. Searchable on notes and emails. Not searchable on other record types. + + + +The record's creation time. Used for ranking by date only when activity and modification times are missing. Searchable on deals, tickets, notes, emails and calls. Not searchable on contacts, companies, meetings and tasks. + + + +The source object type. Searchable in email details. On other record types it is stored and not searchable. Filter by `additional_metadata.hubspot_object`. + + + +The HubSpot record id. Targets one record, and keeps later syncs on the same document. Not searchable. No HubSpot link is stored, so use this id to find the record in HubSpot. + + + +The object type, such as `deals` or `notes`. Limits a query to one type. Not searchable. + + + +Set when there was a problem working out who can read the record, such as readers that could not be resolved or a removed team. A warning does not by itself mean the record is public. Not searchable. + + + +Limits a query to this connector's records. Not searchable. + + + +Always `hubspot`. Not searchable. + + + +The people who can read the record, worked out as described under Permissions. Not searchable. + + +### Deals + +- **One document:** One deal. +- **Title:** The deal name. +- **Text:** The deal description, then `Deal`, `Amount`, `Stage`, `Close date` and `Owner` lines. The deal name is searchable too. +- **Date:** When the deal was last modified, else when it was created. +- **Link back:** None. + + +Written as the `Amount` line. + + + +Written as the `Close date` line. + + + +Written as the `Stage` line, as HubSpot's internal stage id, not its display name. + + + +The owner's email, written as the `Owner` line, where HydraDB can identify the person. It does not create an assignee relationship. + + + + + +HubSpot's pipeline id. It is not turned into a name. + + + + +### Tickets + +- **One document:** One ticket. +- **Title:** The ticket subject. +- **Text:** The ticket content. When the content is empty, the subject with `Priority` and `Stage` lines. The subject is searchable either way. +- **Date:** When the ticket was last modified, else when it was created. +- **Link back:** None. + + +When the ticket has no content, written as a `Priority` line. + + + +Written as a `Stage` line only when the ticket has no content. Otherwise it is stored and not searchable. + + + + + +The owner's email. It is not part of the text, and it does not restrict who can read the ticket. + + + + +### Contacts and companies + +- **One document:** One contact, or one company. +- **Title:** A contact's first and last name, else their email. A company's name. +- **Text:** For a contact, `Name`, `Email`, `Company`, `Phone` and `Job title` lines. For a company, its description, then `Company`, `Domain` and `Industry` lines. The title is searchable too. +- **Date:** When the record was last modified, else when it was created. +- **Link back:** None. + + +A contact's email, so a query can find the person by email. + + + +A contact's company name. + + + +A contact's job title. + + + +A company's website domain, written as the `Domain` line. + + + +A company's industry, written as the `Industry` line. + + + +Links a contact to its company's document. Not searchable. + + + + + +The owner's email. It is not part of the text. + + + + +### Notes + +- **One document:** One note. +- **Title:** Usually the first 80 characters of the note. +- **Text:** The note body, converted from HTML to plain text. +- **Date:** When the note was logged as happening, else when it was last modified, else when it was created. +- **Link back:** None. +- **Files:** Files attached to the note are not synced. + + +When the note was logged as happening. Not searchable. + + + + + +The owner's email. It is not part of the text. + + + + +### Emails + +- **One document:** One logged email. +- **Title:** The email subject. +- **Text:** The plain-text body, else the HTML body converted to text, else the subject. The email's details, such as its direction, sender, recipient, owner and times, are written into the text as a list of fields. The subject is searchable too. +- **Date:** When the email happened, else when it was last modified, else when it was created. +- **Link back:** None. +- **Files:** Files attached to the email are not synced. + + +The sender. Part of the email details, and can be attached to the email in the graph. + + + +The recipient. Part of the email details, and can be attached to the email in the graph. + + + +Whether the email was inbound or outbound, written into the details. + + + +The owner's email, written into the details. + + + +When the email happened, written into the details. + + +### Calls + +- **One document:** One logged call. +- **Title:** Usually the first 80 characters of the call text, which include the call details. +- **Text:** The call notes, converted from HTML, then `Call`, `Direction` and `Owner` lines. +- **Date:** When the call happened, else when it was last modified, else when it was created. +- **Link back:** None. + + +Written as the `Direction` line, so a query can match inbound or outbound calls. + + + +The owner's email, written as the `Owner` line, where HydraDB can identify the person. + + + +When the call happened. Not searchable. + + + + + +The call length in milliseconds. It is not searchable. + + + + +### Meetings and tasks + +- **One document:** One logged meeting, or one task. +- **Title:** The meeting title, or the task subject. +- **Text:** For a meeting, its notes converted from HTML, then `Meeting`, `Location`, `Start` and `Owner` lines. For a task, its body converted from HTML, then `Task`, `Status`, `Priority` and `Owner` lines. The title is searchable too. +- **Date:** When the meeting or task happened, else when it was last modified, else when it was created. +- **Link back:** None. + + +Where the meeting was held, written as the `Location` line. + + + +When the meeting started, written as the `Start` line. The result date is the activity time instead. + + + +A task's status, written as the `Status` line. + + + +A task's priority, written as the `Priority` line. + + + +The owner's email, written as the `Owner` line, where HydraDB can identify the person. + + + +When the meeting or task happened. Not searchable. + + + + + +When the meeting ended. It is not the result date. + + + + +**Example searches** + +- What was said on the last call with this contact? +- Which notes and emails are logged on the Acme deal? +- What did the customer write in their last email? + +## How it fits into the graph + +- Deals use the Ticket class. +- Tickets use the Ticket class. +- Contacts and companies use the Record class. +- Notes use the Comment class. +- Emails use the Email class. +- Calls use the Message class. +- Meetings and tasks use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections HubSpot creates** + +- A contact to its company. +- A note, email, call, meeting or task to the deal it is logged on. With no deal, to the contact. With no contact, to the company. When several records of one type are associated, the one with the lowest id is used. +- An activity is linked to that record only if everyone who can read the activity can also read the record. +- No links to other tools. + +**People and groups** + +- Deal, call, meeting and task owner emails appear in searchable text, where HydraDB can identify the person. +- Email senders and recipients can also be attached to email records in the graph. +- Owners stored only on other record types are not identified from that field. +- A contact's company name. + +**Found in the text** + +Deal descriptions, ticket content, and the text of notes, emails, calls, meetings and tasks. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Object types you did not select. +- Email bodies, when the token lacks `sales-email-read`: those emails have their subject only. +- Products, line items, quotes, forms, marketing emails and other HubSpot objects. +- Files attached to activities. +- Custom CRM properties. +- Deletions and archived records. diff --git a/essentials/v2/connectors/intercom.mdx b/essentials/v2/connectors/intercom.mdx new file mode 100644 index 00000000..84cb5288 --- /dev/null +++ b/essentials/v2/connectors/intercom.mdx @@ -0,0 +1,318 @@ +--- +title: "Intercom" +description: "Sync Intercom conversations and their replies, Intercom Tickets and published Help Center articles. Conversation and ticket access carries over from the assigned teammate and team when Enforce ACL is on." +icon: "/images/connectors/intercom.svg" +--- + +Sync Intercom conversations from the teams you select, or from the whole workspace, with every reply in them. Intercom Tickets and published Help Center articles sync for the whole workspace. Each conversation, ticket and article is one document. Each reply is its own document, linked to its conversation. The conversation document holds only the opening message. + +A conversation and a ticket can be restricted to the assigned teammate and the members of the assigned team. Search applies this only when Enforce ACL is on. Internal notes are skipped unless you turn them on. File attachments are not synced, apart from text in pasted images. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Intercom permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** A conversation, its replies and a ticket can be read by the assigned teammate and the members of the assigned team. These readers take precedence over the resource's. A team resource can be read by the team's members. The All conversations resource is open to everyone who can query the collection unless you set an access rule on it. An unassigned conversation or ticket, and every article, follows its resource. +- **How a person is identified:** A teammate's email address. +- **When permissions cannot be read:** If the readers of a conversation or ticket are incomplete or too many, it gets a permission warning, which you can find with `additional_metadata.rbac_warning`. Internal notes on an unassigned conversation get the warning too. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Intercom does not report which teammates can see all conversations. A teammate who is neither the assignee nor in the assigned team cannot read the conversation in HydraDB, even when Intercom lets them see it. +- Internal notes are synced only when `include_private_notes` is on. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Intercom uses an access token from a private app, or an OAuth access token. + + +An Intercom private-app or OAuth access token. An OAuth token reads only the conversations its teammate can see. + + + +Off by default. Turn it on to also sync internal teammate notes. + + +**Permissions for the token** + +- `Read conversations`: required. +- `Read users and companies`: required. +- `Read admins`: required. +- `Read articles`: optional. Without it, articles are skipped. +- `Read tickets`: optional. Without it, or on a plan without Tickets, tickets are skipped. + +### Set it up + + + + Create the token as a teammate with access to all conversations. If that teammate's access is later reduced, an OAuth token silently reads fewer conversations, so create a new token. + + + Paste the token as `access_token`. Turn on `include_private_notes` to also sync internal notes. + + + HydraDB lists your teams and an All conversations option. Select teams to sync the conversations assigned to them, or All conversations for every conversation the token can see. All conversations takes precedence over teams. Selecting every team still leaves out unassigned conversations. + + + +One connector reads one Intercom workspace. + + + +Use provider `intercom` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads conversations, tickets and articles updated since the last sync. Every reply in a changed conversation is read again. +- **Edits:** A changed conversation is read again with all its replies, and updates their documents. +- **Deletions:** Conversations, tickets and articles deleted in Intercom stay searchable in HydraDB. +- If Intercom refuses access to tickets or articles, they are skipped and the rest still syncs. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Intercom item + + +Set on a conversation, reply or ticket when its readers could not be worked out, or on an internal note in an unassigned conversation. A warning does not by itself mean the item is public. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `intercom`. Not searchable. + + + +The teammates who can read a conversation, reply or ticket, worked out as described under Permissions. Articles have none of their own. Not searchable. + + +### Conversations + +- **One document:** One conversation, holding its opening message. +- **Title:** The conversation title, else the opening message's subject. Otherwise a title with the conversation id. +- **Text:** The opening message converted from HTML to text, or the title when it is empty. The status, priority, tags, creation time and conversation id are part of the text too. The title is searchable too. Search the replies for the rest of the conversation. +- **Date:** When the conversation was last updated, else when it was created. +- **Link back:** None. + + +Open, closed or snoozed, written as a `Status` line. + + + +`priority` or `not_priority`, written as a `Priority` line. + + + +The conversation's tag names, written as a `Labels` line, so a tag name in a query matches. + + + +The Intercom conversation id, written into the text as the conversation's key. Keeps later syncs on the same document. + + + +Links the conversation to the Intercom Ticket it refers to. Not searchable. + + + +True while the conversation is open. Keeps only open conversations. Not searchable. + + + +True once the conversation has been read. Finds unread conversations. Not searchable. + + + +When the conversation was created, written as a `Created` line. Used as the result date only when there is no update time. + + + +When the conversation was last updated. Not searchable. + + + + + +The opening message's author as `Name `. The author is not attached to the conversation as a person. + + + +The ids of the conversation's tags. + + + +The conversation's Fin AI topic names and their ids. They are not part of the searchable text. + + + + +### Replies + +- **One document:** One reply, or one internal note when `include_private_notes` is on. Parts that only record a state change, and redacted parts, are skipped. +- **Title:** `Comment by` and the author. Without an author, the first 80 characters of the text. +- **Text:** The reply converted from HTML to text, with its author, conversation id, and created and updated times. A reply that is only a pasted image is kept, and the text in the image is searchable. +- **Date:** When the reply was created. +- **Link back:** None. +- **Files:** Text in images pasted into a reply is read and searchable. Other files are not synced. + + +The teammate or customer who wrote the reply, as `Name `. The graph records the reply as written by that person. + + + +Names @mentioned in an internal note. The names stay in the note text, and the graph records each as mentioned. + + + +The conversation the reply belongs to, written into the text as its id. Links the reply to its conversation. + + + +The id of the conversation the reply belongs to. Returns every reply in one conversation. Not searchable. + + + +When the reply was created, written as a `Created` line. + + + +When the reply was last updated, written as an `Updated` line. It is not the result date. + + + + + +Whether the part is a reply, a note or another event with text. + + + + +### Tickets + +- **One document:** One Intercom Ticket. +- **Title:** The ticket subject. Otherwise a title with the ticket id. +- **Text:** The ticket description converted from HTML to text, or the subject when it is empty. Then a `Reporter` line. The creation time and the ticket id are part of the text too. The subject is searchable too. +- **Date:** When the ticket was last updated, else when it was created. +- **Link back:** None. + + +The ticket's contact, written as the `Reporter` line, so tickets from one customer can be found. The graph records the ticket as reported by that person. + + + +The Intercom ticket id. Written into the text as the ticket's key. Targets one ticket, and keeps later syncs on the same document. + + + +When the ticket was created, written as a `Created` line. Used as the result date only when the update time is missing. + + + +When the ticket was last updated. Not searchable. + + + + + +Open or closed. It is not part of the searchable text. + + + +The ticket attributes your workspace defines. They are not part of the searchable text. + + + + +### Articles + +- **One document:** One published Help Center article. Drafts are skipped. +- **Title:** The article title. Otherwise a title with the article id. +- **Text:** The article body converted from HTML to text, else its summary, else its title. Then `Author` and `Updated` lines. The title is searchable too. +- **Date:** When the article was last updated, else when it was created. +- **Link back:** The article in your Help Center. + + +The summary under the title. Searchable when the article body is empty. Otherwise it is kept with the article. + + + +The teammate who wrote the article, written as the `Author` line. The graph records the article as written by that person. + + + +When the article was last updated, written as the `Updated` line. + + + +When the article was created. Used as the result date only when the update time is missing. Not searchable. + + + +The collection or section the article sits in. Places the article under it in the graph. Collections are not documents of their own. Not searchable. + + + +The Intercom article id. Targets one article, and keeps later syncs on the same document. Not searchable. + + + + + +The Help Center collection name, or its id when the name cannot be found. + + + +Always `published`. + + + + +**Example searches** + +- What did customers say about the checkout bug last week? +- Which open conversations are tagged billing? +- What does our Help Center say about resetting a password? + +## How it fits into the graph + +- Conversations use the Ticket class. +- Replies use the Comment class. +- Tickets use the Ticket class. +- Articles use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Intercom creates** + +- A reply or internal note to its conversation. +- A conversation to the Intercom Ticket it is linked to. +- An article to its collection or section. +- No links to other tools. + +**People and groups** + +- The author of each reply, and names @mentioned in internal notes. +- The reporter of each ticket. +- The author of each article. +- The opening message's author and the assigned teammate are not attached to a conversation as people. Assignment decides who can read it. + +**Found in the text** + +The opening message of each conversation, the text of every reply, ticket descriptions and article content. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Internal teammate notes, unless `include_private_notes` is on. +- Unassigned conversations, when you select teams instead of All conversations. +- Draft Help Center articles. +- Redacted conversation parts. +- Contacts, companies and segments as documents of their own. Contacts only name people. +- File attachments, apart from text in pasted images. diff --git a/essentials/v2/connectors/jira.mdx b/essentials/v2/connectors/jira.mdx new file mode 100644 index 00000000..ab29ac45 --- /dev/null +++ b/essentials/v2/connectors/jira.mdx @@ -0,0 +1,372 @@ +--- +title: "Jira" +description: "Sync issues, comments and worklogs from the Jira Cloud projects you choose. Project and issue-security restrictions apply only with Enforce ACL on and a successful permission read." +icon: "/images/connectors/jira.svg" +--- + +Sync issues, comments and worklogs from the Jira Cloud projects you select. Each issue is one document with its description, environment, people, status, labels, issue links and linked pull requests. Each comment and each worklog entry is its own document, linked to its issue. + +Project and issue-security permissions restrict search only when Enforce ACL is on and HydraDB can read them, which needs a Jira site-admin account. Issue history, watchers and most custom fields are not synced. Edits come across on the next sync. Items deleted in Jira stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Jira permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Access follows the project. An issue can be read by the active people who hold Browse Projects on its project. An issue with a security level can be read only by that level's members, and an empty level lets nobody read it. A comment or worklog follows its issue's security level. +- **How a person is identified:** A person's email address. For a security level, Jira groups are kept as groups next to their members' emails. +- **When permissions cannot be read:** If HydraDB cannot read a project's Browse holders or an issue's security level, the connector reports a permission warning. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Reading who can browse a project needs a Jira site-admin account. +- One Browse holder whose email is hidden by Atlassian profile visibility stops HydraDB from capturing the whole project's audience. Set an access rule on such a project. +- A project with too many readers to express cannot be captured. +- A security level held by project roles, the reporter, the assignee or a custom field cannot be captured. +- A comment or worklog whose issue security level cannot be found follows the project's access. +- If Jira returns a temporary error, the audience captured earlier stays in force. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Jira uses an Atlassian API token together with the email of the account that owns it. + + +Your Atlassian site host, for example `acme.atlassian.net`. + + + +The email of the Atlassian account that owns the API token. + + + +An Atlassian API token for that account. + + +**Jira permissions for the account** + +- `Browse projects`: required. Lists projects and their issues. +- `Browse issues`: required. Reads issue fields, comments and worklogs. +- `Administer Jira`: optional, for permissions. Reading who can browse a project and issue security schemes needs a site-admin account. +- `Browse users and groups`: optional, for permissions. Finds each project reader's email and turns a security level's groups into member emails. + +### Set it up + + + + In your Atlassian account security settings, create an API token for the account HydraDB will use. Give that account the Jira permissions above on every project you will select. + + + Enter your site as `domain`, the account's `email`, and the token as `api_token`. + + + HydraDB lists every project the account can see, with its name and key. Select the projects to sync. + + + +One connector reads one Jira Cloud site as the account that owns the token, and sees only what that account can access. + + + +Use provider `jira` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A newly selected project reads back the window set by `lookback_days`, 30 days by default. The window is measured on when an issue was last updated, not when it was created. +- **New and changed items:** Each sync reads the issues updated since the last sync. Comments and worklogs are read again for every issue in that window. +- **Edits:** An edited issue is picked up through its last-updated time and updates its document. Comments and worklogs are read again whenever their issue is picked up. +- **Deletions:** Issues, comments and worklogs deleted in Jira stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Jira item + + +The project key. Limits a query to one project. Not searchable. + + + +The project name. Another way to limit a query to one project. Not searchable. + + + +The project key, the same value as `additional_metadata.project_key`. Not searchable. + + + +The project name, the same value as `additional_metadata.project_name`. Not searchable. + + + +Always `project`. Not searchable. + + + +The issue's security level, when one is set. A comment or worklog carries its issue's level. Limits a query to one level, and the level's members decide who can read the item. Not searchable. + + + +The name of the issue's security level, when one is set. Limits a query by level name. The level itself, not this name, decides who can read the item. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `jira`. Not searchable. + + + +The selected project. The people who can browse it decide who can read its items, unless an issue has a security level. Not searchable. + + +### Issues + +- **One document:** One Jira issue. Its comments and worklogs are separate documents. +- **Title:** The issue summary, or `Jira issue` and the issue key, or the numeric id, when there is no summary. +- **Text:** A first line with the issue key and type, such as `ENG-123 (Bug)`. Then a `Parent` line and one line per issue link, such as `blocks: ENG-7`, up to 20. Then the description as plain text, with link targets kept and mentions written as names, the `Environment` text, and a `Linked pull requests` list with one pull request address per line. The status, priority, assignee, reporter, type, labels, creation date and resolution date are written as lines too. The title is searchable too. +- **Date:** When the issue was last updated, or when it was created if there is no update time. +- **Link back:** The issue's page in Jira, `https:///browse/`. +- **Files:** Files attached to the issue are downloaded with the connector's credentials and read, and their text becomes searchable with the issue. A file with no id or download address is skipped. A file that fails to download or is not a supported type keeps only its details. + + +The issue key, such as `ENG-123`, or the numeric issue id when there is no key. It keeps later syncs on the same document. + + + +The workflow status name, written as the `Status` line. + + + +The priority name, written as the `Priority` line. + + + +The issue type name, written as the `Type` line and in the first line of the text. + + + +The issue's labels, written as the `Labels` line. + + + +The assignee's display name, written as the `Assignee` line. The graph records that person as the assignee. + + + +The reporter's display name, or the creator's when there is no reporter, written as the `Reporter` line. The graph records that person as the reporter. + + + +The text read from each attached file, searchable with the issue. + + + +The addresses of pull requests linked in the issue's Development panel, one per line in the text. If Atlassian changes how it reports them, issues show no linked pull requests rather than an error. They are not linked to GitHub or GitLab items in the graph. + + + +When the issue was created, written into the issue details. Sets the result date only when the update time is missing. + + + +When the issue was resolved, written into the issue details. + + + +When the issue was last updated. Sets the result date and decides when a sync picks the issue up. Not searchable. + + + +The key of the parent issue or epic, written as the `Parent` line. Links the issue to its parent. + + + +The keys of every linked issue. Up to 20 different keys are written into the text. Every linked issue is linked in the graph. + + + +Names of people @mentioned in the description. The graph records each as mentioned by the issue. The field itself is not searchable, but the description it comes from is. + + + +The issue key, such as `ENG-123`. Picks out one issue. Not searchable. + + + +The numeric issue id. Picks out one issue by id. Not searchable. + + + +The numeric id of the parent issue or epic. Returns the children of one parent. Not searchable. + + + +The link phrases on this issue's side, such as `blocks` or `is blocked by`. Finds issues with a given kind of link. Not searchable. + + + +The issue's address in the Jira REST API. Mainly shows where the item came from. Not searchable. + + + + + +The issue due date. It is not written into the text. + + + +The resolution name, component names, fix version names and linked pull request addresses. Only the pull request addresses also appear in the text. + + + + +### Comments + +- **One document:** One comment on an issue. +- **Title:** `Comment on ENG-123`, or `Comment on issue` and the numeric issue id when the key is unknown. +- **Text:** The comment as plain text. The author, the creation and update times, and the issue key are written with it. +- **Date:** When the comment was last updated, or when it was created if there is no update time. +- **Link back:** The issue's page in Jira with the comment focused. + + +The commenter's display name. The graph records the comment as written by that person. + + + +The commenter's email, when Jira shows it. Identifies the commenter in the graph. Not searchable. + + + +When the comment was created. Sets the result date only when the update time is missing. + + + +When the comment was last updated. Sets the result date. + + + +The key of the issue the comment is on. Links the comment to that issue. + + + +The issue key. Groups the comments and worklogs of one issue together in the graph. Not searchable. + + + +Names of people @mentioned in the comment. The graph records each as mentioned. The field itself is not searchable, but the comment text is. + + + +The numeric comment id. Picks out one comment. Not searchable. + + + +The key of the issue. Returns every comment on one issue. Not searchable. + + + +The numeric id of the issue. Returns every comment on one issue. Not searchable. + + +### Worklogs + +- **One document:** One worklog entry on an issue. +- **Title:** `Worklog on ENG-123`, or `Worklog on issue` and the numeric issue id when the key is unknown. +- **Text:** A first line such as `Sam logged work on ENG-123 (1h 30m)`, then the worklog note as plain text. The author, the update time and the issue key are written with it. +- **Date:** When the worklog was last updated, or when the logged work started if there is no update time. +- **Link back:** The issue's page in Jira with the worklog focused. + + +The name of the person who logged the work. The graph records the worklog as written by that person. + + + +The email of the person who logged the work, when Jira shows it. Identifies that person in the graph. Not searchable. + + + +When the worklog was last updated, written as the `Updated` line. Sets the result date. + + + +When the logged work started. Sets the result date only when there is no update time. Not searchable. + + + +The key of the issue the work was logged on. Links the worklog to that issue. + + + +The issue key. Groups the comments and worklogs of one issue together in the graph. Not searchable. + + + +Names of people @mentioned in the worklog note. The graph records each as mentioned. The field itself is not searchable, but the note is. + + + +The numeric worklog id. Picks out one worklog. Not searchable. + + + +The key of the issue. Returns every worklog on one issue. Not searchable. + + + +The numeric id of the issue. Returns every worklog on one issue. Not searchable. + + + + + +The exact number of seconds logged. The text carries a readable duration instead. + + + + +**Example searches** + +- Which bugs in the ENG project are still In Progress and assigned to Sam? +- What is blocking ENG-123? +- How much time was logged on ENG-789, and by whom? + +## How it fits into the graph + +- Issues use the Ticket class. +- Comments use the Comment class. +- Worklogs use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Jira creates** + +- An issue to its parent issue or epic. +- An issue to each issue it links to. `blocks`, `is blocked by` and `is caused by` keep their direction. `relates to`, `duplicates`, `clones` and `causes` become a plain related link. Other link types become a general link. +- A comment or worklog to its issue, and the comments and worklogs of one issue to each other. +- Each item to its project. +- No links to items in other tools. Linked pull requests stay addresses in the text. + +**People and groups** + +- The assignee and the reporter, or creator, of each issue. +- The author of each comment and worklog. +- People @mentioned in a description, comment or worklog note. + +**Found in the text** + +The issue description and environment, and the text of each comment and worklog note. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Projects you did not select. +- Issue history and watchers. +- Projects, boards, sprints, versions, components and users as items of their own. +- Jira admin configuration: screens, schemes, filters, dashboards and custom field definitions. +- Custom fields other than resolution, components and fix versions. +- Linked pull requests, when development-status capture is turned off with `include_dev_status`. +- Comments with no text, and comments or worklogs whose issue cannot be identified. diff --git a/essentials/v2/connectors/klaviyo.mdx b/essentials/v2/connectors/klaviyo.mdx new file mode 100644 index 00000000..8219658b --- /dev/null +++ b/essentials/v2/connectors/klaviyo.mdx @@ -0,0 +1,186 @@ +--- +title: "Klaviyo" +description: "Sync a Klaviyo account's campaigns, flows, lists, segments, email templates and subscriber profiles, one document per record." +icon: "/images/connectors/klaviyo-light.svg" +--- + +Sync a Klaviyo account's campaigns, flows, lists, segments, email templates and subscriber profiles. Each record is one document of `Label: value` lines. Templates also carry their email content as text, and profiles carry their location and custom properties. + +Klaviyo permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. That includes profiles, whose email, phone number and custom properties are searchable. List and segment membership is not synced. Campaign audience links describe configuration, not message delivery. Records deleted in Klaviyo stay in HydraDB. + + +Klaviyo is in beta. + + +## Permissions + + +Klaviyo permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Klaviyo uses a private API key. + + +A Klaviyo private API key. + + +### Set it up + + + + Paste a Klaviyo private API key as `auth_token`. + + + HydraDB lists one account-wide resource, All data. Select it to sync the whole account the key belongs to. + + + +One connector reads one Klaviyo account, the one the key belongs to. + + + +Use provider `klaviyo` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default, by each record's last update time. A record not updated within that window is not synced until it changes. +- **New and changed items:** Each sync reads records whose update time moved past the last sync. +- **Edits:** An edited record replaces its document. +- **Deletions:** Deleted records are not removed. A record deleted in Klaviyo stays searchable in HydraDB. +- A record with no readable update time is skipped. +- Campaigns on a channel Klaviyo reports as unsupported are skipped. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Klaviyo item + + +Every non-empty attribute with a single value, in alphabetical order as `Label: value`, such as names, statuses, personal details and dates. The `html`, `text`, `company_id`, `message` and `image` attributes are left out of this list. + + + +When the record was last updated. It sets the result date. When it is one of the record's attributes, it is part of the text too. + + + +The Klaviyo id of the record. Targets one record. Not searchable. + + + +Limits a query to this connector's records. Not searchable. + + + +Always `klaviyo`. Not searchable. + + + + + +The record type, such as `campaigns` or `profiles`, shown when you inspect the item. No published filter limits a query by record type. + + + +Other nested values of the record, including list and segment membership details. Kept for inspection only, not searchable. Campaign audiences and segment definition references also create the graph connections described below. + + + + +### Campaigns, flows, lists and segments + +- **One document:** One campaign, flow, list or segment. Campaigns cover the email, SMS and mobile push channels. +- **Title:** The record's name, or `Klaviyo ` when there is none. +- **Text:** The title, then the record's attributes as `Label: value` lines. +- **Date:** When the record was last updated. +- **Link back:** The record's address in Klaviyo's API, not a page in the Klaviyo app. +- **Files:** None. + + +The record's name, written as the title and as an attribute line. + + + +Configured included list or segment audiences link through `targets`, and excluded audiences through `excludes`. These links describe audience configuration, not message delivery. Not searchable. + + + +Lists or segments referenced in a segment's definition link through `related_to`. A reference in a negative rule does not assert positive membership. Not searchable. + + +### Email templates + +- **One document:** One email template. +- **Title:** The template's name, or `Klaviyo templates ` when there is none. +- **Text:** The title, the template's attributes as `Label: value` lines, then the email content. +- **Date:** When the template was last updated. +- **Link back:** The template's address in Klaviyo's API, not a page in the Klaviyo app. +- **Files:** None. + + +The email content: the HTML converted to text, or the plain-text version when there is no HTML. + + +### Profiles + +- **One document:** One subscriber profile. +- **Title:** The person's first and last name, else their email, else `Klaviyo profiles `. +- **Text:** The title, the profile's attributes as `Label: value` lines, such as email and phone number, then a `Location` line and the custom properties. +- **Date:** When the profile was last updated. +- **Link back:** The profile's address in Klaviyo's API, not a page in the Klaviyo app. +- **Files:** None. + + +City, region and country, written as `Location: city, region, country`. Other location details are not searchable. + + + +Every non-empty custom property with a single value, in order of property name, as `Label: value`. Custom properties whose value is an object or a list are not searchable. + + +**Example searches** + +- What does the Welcome Series email template say? +- Which flows are live, and when were they last updated? +- What city, region and country are recorded for jane@example.com? + +## How it fits into the graph + +- Campaigns, flows, lists and segments use the Record class. +- Email templates use the Record class. +- Profiles use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Klaviyo creates** + +- Campaigns link to their configured included and excluded list or segment audiences through `targets` and `excludes`, respectively; these links describe audience configuration, not message delivery. +- Segments link to lists or segments referenced in their definitions through `related_to`; a reference in a negative rule does not assert positive membership. +- Campaigns are not linked to their templates, and profiles are not linked to their lists or segments. +- No links to other tools. + +**People and groups** + +No people are attached to items. A profile's name and email are part of its text only. + +**Found in the text** + +The attribute lines of every record, template email content, and profile locations and custom properties. List membership and other relationships are not in the text, so they cannot be found there. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Events, such as opens, clicks and orders, and metrics. +- List and segment membership. +- Campaign messages and subject lines. Template content is synced as templates. +- Klaviyo reports, such as campaign values and flow series. +- Records not updated within the first sync window, until they change. +- Deletions: records deleted in Klaviyo stay in HydraDB. diff --git a/essentials/v2/connectors/launchdarkly.mdx b/essentials/v2/connectors/launchdarkly.mdx new file mode 100644 index 00000000..02e91101 --- /dev/null +++ b/essentials/v2/connectors/launchdarkly.mdx @@ -0,0 +1,331 @@ +--- +title: "LaunchDarkly" +description: "Sync feature flags with their targeting, segments and environments from the LaunchDarkly projects you choose, plus the account's members, teams and audit log." +icon: "/images/connectors/launchdarkly-light.svg" +--- + +Sync feature flags, segments and environments from the LaunchDarkly projects you select, plus the account's members, teams and audit log. Each flag, segment, environment, member, team and audit entry is one document. A flag carries its configuration in every environment: on or off, prerequisites, individual targets, rules, the default rollout and its variations. + +This is a record of configuration, not live flag evaluation: big-segment membership is not listed, so search cannot tell you every user who gets a variation. Project content follows LaunchDarkly's project view access only when Enforce ACL is on. Members, teams and account-wide audit entries are visible to everyone who can query the collection unless you set an access rule. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow LaunchDarkly permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Access follows the project. Flags, segments, environments and audit entries about one project can be read by the members whose LaunchDarkly role lets them view that project. Reader, Writer, Admin and Owner can view every project. No access views none. A member's own custom role replaces the base role, team roles add to it, and preset role statements, role attributes and permission grants are taken into account. Members, teams and audit entries about the account as a whole are not restricted. +- **How a person is identified:** A member's email address. Members who were invited but have not joined are left out. +- **When permissions cannot be read:** If HydraDB cannot work out who can view a project, or an audit entry touches several projects or all of them, the connector reports a permission warning. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Only project view access counts. Flag-level and environment-level permission statements are not considered. +- A project with no viewers, a viewer without an email, or more than 1,000 viewers cannot be captured. Some custom role statements cannot be evaluated either. +- For permissions, the token's role must be able to read members, teams and custom roles. The built-in Reader role can. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +LaunchDarkly uses an access token. The Reader role is enough. + + +A LaunchDarkly access token, ideally a service token with the Reader role. + + +**Token role** + +- `Reader`: reads projects, environments, flags, segments, members, teams and the audit log. Writer and Admin add only write access, which the connector never uses. + +### Set it up + + + + In LaunchDarkly, open Account settings, Authorization, Access tokens, Create token. Keep the role as Reader. Tick This is a service token, so the token keeps working when the person who made it is deactivated. Copy the token: it is shown once. + + + Paste the token as `auth_token`. + + + HydraDB lists the projects the token can see, by name and key. Select the projects to sync. Members, teams and the audit log are read for the whole account. + + + +One connector reads one LaunchDarkly account. + + + +Use provider `launchdarkly` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Flags, segments and environments of each selected project, and the account's members and teams, are read in full, whatever their age. +- **New and changed items:** Flags, segments, environments, members and teams are read in full on every sync, and ones that did not change are skipped. The audit log is read from the newest entry already synced. +- **Edits:** A change to a flag, segment, environment, member or team is picked up on the next sync. +- **Deletions:** Items deleted in LaunchDarkly stay searchable in HydraDB. New links skip items that were deleted. +- If LaunchDarkly refuses members, teams or the audit log on the first request, they are skipped. A refusal after some records arrive fails the sync, and so does a rejected token. +- If one project is refused, the other projects still sync. +- A new LaunchDarkly organization has one empty project and no flags, so a nearly empty first sync is expected. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every LaunchDarkly item + + +Limits a query to this connector's items. Not searchable. + + + +Always `launchdarkly`. Not searchable. + + +### Feature flags + +- **One document:** One feature flag in one project, with its configuration in every environment. +- **Title:** The flag name, else its key. +- **Text:** The name and description, then `Kind`, `Project`, `Maintainer` and `Tags` lines, and markers when the flag is temporary or archived. Then one section per environment, in order: on or off, prerequisites, individual user and context targets, rules in order, the default rollout and the off variation. Then each variation's name, value and description. Empty values are left out. A prerequisite's variation can show as a number instead of its name. The title is searchable too. +- **Date:** The latest change in any environment, else when the flag was created. +- **Link back:** The flag's targeting page in LaunchDarkly. + + +The flag key. Searchable only when the flag has no name and the key is its title. + + + +The maintainer's name, else their email, written as the `Maintainer` line. + + + +Links the flag to the maintainer's member record. Not searchable. + + + +Written as markers only when true. + + + +Link the flag to each environment it is configured in, each prerequisite flag and each segment its rules match. Not searchable as links. + + + +The latest change, else creation, is the result date. Not searchable. + + + +The flag key. Picks out one flag. Not searchable. + + + +The project key. Limits a query to one project. Not searchable. + + + +The project name. Limits a query to one project by name. Not searchable. + + + +Always `project`. Not searchable. + + + +The flag's project. Who can view the project decides who can read the flag. Not searchable. + + +### Segments + +- **One document:** One segment in one project environment. +- **Title:** The segment name, else its key. +- **Text:** The name and description, `Project`, `Environment` and `Tags` lines, then the included and excluded users and contexts, then rule lines. A big segment's text says its membership is kept outside LaunchDarkly's API, and the members are not listed. The title is searchable too. +- **Date:** The last change, else when the segment was created. +- **Link back:** The segment page in LaunchDarkly. + + +The segment key. Searchable only when the segment has no name and the key is its title. + + + +Users and contexts listed in the segment, so a query can find which segments include a user key. Big-segment membership is not listed. + + + +Link the segment to its environment and to each segment its rules match. Not searchable as links. + + + +The last change, else creation, is the result date. Not searchable. + + + +The segment key. Picks out one segment. Not searchable. + + + +The project key. Limits a query to one project. Not searchable. + + + +The project name. Limits a query to one project by name. Not searchable. + + + +Always `project`. Not searchable. + + + +The segment's project. Who can view the project decides who can read the segment. Not searchable. + + +### Environments + +- **One document:** One environment of one project. +- **Title:** The environment name, else its key. +- **Text:** The name, `Project` and `Environment key` lines, `Marked critical`, `Requires confirmation for changes` and `Requires a comment on every change` when set, and a `Tags` line. The title is searchable too. +- **Date:** None. +- **Link back:** The environment page in LaunchDarkly. + + +The environment key. Picks out one environment. Not searchable. + + + +The project key. Limits a query to one project. Not searchable. + + + +The project name. Limits a query to one project by name. Not searchable. + + + +Always `project`. Not searchable. + + + +The environment's project. Who can view the project decides who can read the environment. Not searchable. + + +### Members + +- **One document:** One account member. +- **Title:** The first and last name, else the email, else `LaunchDarkly member`. +- **Text:** The name, then `Email`, `Role`, `Custom roles` and `Teams` lines. The title is searchable too. +- **Date:** None. +- **Link back:** None. + + +The member's email, written as the `Email` line. Identifies the member as a person in the graph. + + + +The base role and custom role keys, so a query can find who has which role. + + + +The member's team names, written as the `Teams` line. Links the member to each team's record. + + + +The member id. Picks out one member. Not searchable. + + +### Teams + +- **One document:** One team. +- **Title:** The team name, else its key. +- **Text:** The name, the description and a `Team key` line. The title is searchable too. +- **Date:** None. +- **Link back:** None. + + +The team key and its written purpose. + + + +The team key. Picks out one team. Not searchable. + + +### Audit log entries + +- **One document:** One audit log entry. +- **Title:** The entry title as plain text, else its name, else `LaunchDarkly audit` with its id. +- **Text:** The title, a `By` line with the member who made the change, the description, the short description when different, a `Comment` line, and one `Action` line per change with the action and the resource. The title is searchable too. +- **Date:** When the change happened. +- **Link back:** The entry in LaunchDarkly. + + +The member who made the change, by name, else email, written as the `By` line. Links the entry to that member's record. + + + +The flags the entry touched, as `project/flag`, written in the `Action` lines. Links the entry to those flags. The entry is also linked to the environments, segments, members or teams it touched. + + + +When the change happened. Not searchable. + + + +The entry id. Picks out one entry. Not searchable. + + + +An entry about one project follows who can view that project. An entry about the account as a whole is not restricted. An entry about several projects carries a permission warning. Not searchable. + + + + + +LaunchDarkly's category for the entry and its verb phrase. + + + + +**Example searches** + +- Which flags does the beta-testers segment gate? +- Who turned off the payments-v2 flag and what comment did they leave? +- Which environments require a comment on every change? + +## How it fits into the graph + +- Feature flags use the Record class. +- Segments use the Record class. +- Environments use the Record class. +- Members use the Record class. +- Teams use the Record class. +- Audit log entries use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections LaunchDarkly creates** + +- A flag to its maintainer member or maintainer team. +- A flag to each environment it is configured in, and to each prerequisite flag. +- A flag or segment to each segment its rules match. +- A segment to its environment. +- A member to each of their teams. +- An audit entry to the member who made it, and to the flags, environments, segments, members or teams it touched. +- Links reach only items this connector has synced, that are not deleted, into the same database and collection. +- No links to items in other tools. + +**People and groups** + +- Each member, identified by email. +- A flag's maintainer and an audit entry's author are linked to member records, not attached to the item as people. + +**Found in the text** + +Flag descriptions, audit comments and descriptions. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Flags, segments and environments of projects you did not select. +- Audit entries about a single project you did not select. +- Big-segment membership. +- Per-user targeting values outside the flag configuration. +- Custom flag properties, experiment definitions and goal ids. +- Environment and resource approval settings. +- Environment SDK keys and mobile keys, and members' MFA state and password status. +- Projects as their own documents. +- Metrics, experiments, releases and code references. diff --git a/essentials/v2/connectors/lever.mdx b/essentials/v2/connectors/lever.mdx new file mode 100644 index 00000000..29ed31b5 --- /dev/null +++ b/essentials/v2/connectors/lever.mdx @@ -0,0 +1,361 @@ +--- +title: "Lever" +description: "Sync opportunities, candidates, job postings, contacts, submitted applications and referral forms from Lever. Opportunities link to their contact, and applications link to their candidate when Lever supplies the candidate id." +icon: "/images/connectors/lever-light.svg" +--- + +Sync opportunities, candidates, job postings, contacts, submitted applications and referral forms from one Lever account. Each record is one document. An opportunity links to its contact, and an application links to its candidate when Lever supplies the candidate id. Referral forms are not linked to a candidate. + +Lever permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Selecting postings limits only postings: everything else syncs for the whole account. Edits to an application or referral form after it is first synced are not guaranteed to be picked up. Archived and deleted records stay in HydraDB. + + +Lever is in beta. + + +## Permissions + + +Lever permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- An access rule on a posting does not cover opportunities, candidates, contacts, applications or referral forms, which sync for the whole account. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Lever uses an API key. + + +A Lever API key. + + +### Set it up + + + + Get a Lever API key for your account. + + + Paste the key as `token`. + + + HydraDB lists your job postings. Select the postings to sync. This selection limits postings only. Opportunities, candidates, contacts, applications and referral forms sync for the whole account whatever you select. + + + +One connector reads one Lever account. + + + +Use provider `lever` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Opportunities, candidates and selected postings are picked up when they are updated. Contacts, applications and referral forms are reached only through the candidates read in the same sync. A contact is read when such a candidate refers to it. An application or referral form is read when it was created within the sync window. +- **Edits:** An updated opportunity, candidate or posting replaces its document. A contact is read again only when a candidate that refers to it is read. Edits to an application or referral form after it is first synced are not guaranteed to be picked up. +- **Deletions:** Records deleted in Lever stay searchable in HydraDB. Archiving a candidate or application in Lever does not remove or hide its document. +- An opportunity and a candidate that share an id share one document, so the one read last is the one you see. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Lever item + + +Limits a query to this connector's records. Not searchable. + + + +Always `lever`. Not searchable. + + + +The record's Lever id, written into the text as its key. Searchable on every record type except contacts. + + +### Opportunities + +- **One document:** One opportunity. A candidate with the same id shares this document. +- **Title:** The person's name. Otherwise `Lever opportunity` and its id. +- **Text:** The name, then `Headline`, `Stage`, `Origin`, `Tags` and `Emails` lines. The creation time is part of the text. The title is searchable too. +- **Date:** When the opportunity was last updated, or created when there is no update time. +- **Link back:** None. +- **Files:** Resumes and other files are not synced. + + +The person's name and profile headline. The name forms the title. + + + +The stage's display name. When the name cannot be found, the stage id is written instead. + + + +Whether the person applied, was sourced or was referred, their tags and their email addresses. + + + +Links the opportunity to its Lever contact. Not searchable. + + + +When the opportunity was created. It is the result date only when there is no update time. + + + +When the opportunity was last updated. Not searchable. + + + +The Lever opportunity id. Finds one opportunity. Not searchable. + + + + + +The owner's Lever user id. It is not turned into a name. + + + + +### Candidates + +- **One document:** One candidate. Lever's candidate and opportunity views of the same record share one document. +- **Title:** The candidate's name. Otherwise `Lever candidate` and its id. +- **Text:** The name, then `Headline`, `Location`, `Stage`, `Origin`, `Tags`, `Emails` and `Links` lines. The creation time is part of the text. The title is searchable too. +- **Date:** When the candidate was last interacted with, or created when there is no interaction time. +- **Link back:** None. +- **Files:** Resumes and other files are not synced. + + +The candidate's name, profile headline and location. The name forms the title. + + + +The stage's display name. When the name cannot be found, the stage id is written instead. + + + +Whether the candidate applied, was sourced or was referred, their tags and their email addresses. + + + +The candidate's profile links on other sites. They are not links back to Lever. + + + +When the candidate was created. It is the result date only when there is no interaction time. + + + +When the candidate was last interacted with. Not searchable. + + + +The Lever candidate id. Finds one candidate. Not searchable. + + + + + +Whether Lever marks the candidate as archived. It does not remove or hide the document. + + + + +### Postings + +- **One document:** One job posting you selected. +- **Title:** The posting title. Otherwise `Lever posting` and its id. +- **Text:** The title, then `Team`, `Department`, `Location` and `Commitment` lines and the posting description as plain text. The creation time is part of the text. The title is searchable too. +- **Date:** When the posting was last updated, or created when there is no update time. +- **Link back:** The posting's public page, or its listing page when there is none. + + +The posting's team, department, location and commitment. Other category values are stored but not searchable. + + + +The posting description. Lists and additional sections of the posting are not kept. + + + +When the posting was created. It is the result date only when there is no update time. + + + +When the posting was last updated. Not searchable. + + + +The Lever posting id. Finds one posting. Not searchable. + + + + + +The Lever user ids of the posting's owner and creator. They are not turned into names. + + + + +### Contacts + +- **One document:** One contact person that a synced candidate refers to. +- **Title:** The contact's name. Otherwise `Lever contact` and its id. +- **Text:** `Name`, `Headline`, `Location`, `Emails`, `Phones`, `Links` and `Tags` lines. The title is searchable too. +- **Date:** When the contact was last updated, or created when there is no update time. +- **Link back:** None. + + +The contact's name, headline and location. The name forms the title. + + + +The contact's email addresses and phone numbers, in the text only. They do not make the contact a person in the graph. + + + +The contact's profile links and tags. + + + +When the contact was last updated, or created. Not searchable. + + + +The Lever contact id. Finds one contact. Not searchable. + + +### Applications + +- **One document:** One submitted application. +- **Title:** `Application from` and the applicant's name. Otherwise `Lever application`. +- **Text:** `Type`, `Name`, `Email`, `Company`, `Phone` and `Comments` lines, then each custom question with its answer. The creation time is part of the text. The title is searchable too. +- **Date:** When the application was created. +- **Link back:** None. + + +The applicant's name, email, company and phone as given on the application. They are in the text only, not kept as separate fields. + + + +How the application came in, and the applicant's comments. + + + +Each custom question with a non-empty answer, in the text only. + + + +The candidate id, when Lever supplies it. Limits a query to one candidate's applications, and links the application to the candidate. Not searchable. + + + +When the application was created. It is the result date. + + + +The Lever application id. Finds one application. Not searchable. + + + + + +The id of the posting applied to. It does not link the application to the posting, and it is not a query filter. + + + +Lever's archive details for the application. They do not remove or hide the document. + + + + +### Referral forms + +- **One document:** One completed referral form. +- **Title:** The form title. Otherwise `Lever referral` and its id. +- **Text:** `Type`, `Stage` and `Instructions` lines, then each question with its answer. The candidate's name is not added. The creation time is part of the text. The title is searchable too. +- **Date:** When the form was completed, or created when there is no completion time. +- **Link back:** None. + + +The form type and its instructions. + + + +The stage's display name. When the name cannot be found, the stage id is written instead. + + + +Each question with a non-empty answer. + + + +When the form was created. It is the result date only when there is no completion time. + + + +When the form was completed. Not searchable. + + + +The Lever referral id. Finds one referral form. Not searchable. + + + + + +The Lever user ids of the person who completed the form and the referrer. They are not turned into names, and the referrer is not linked. + + + + +**Example searches** + +- Which candidates mention the onsite stage? +- What comments and answers are recorded in this application? +- Which postings mention the Engineering department? + +## How it fits into the graph + +- Opportunities use the Ticket class. +- Candidates use the Ticket class. +- Postings use the Ticket class. +- Contacts use the Record class. +- Applications use the Ticket class. +- Referral forms use the Ticket class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Lever creates** + +- An opportunity to its contact. +- An application to its candidate, when Lever supplies the candidate id. +- Applications are not linked to their posting, and referral forms are not linked to a candidate. +- No links to other tools. + +**People and groups** + +No one is attached to a record as a person. Owners, creators and referrers are kept as Lever user ids only. Candidate and contact names are in the text. + +**Found in the text** + +Profiles, posting descriptions, application comments and answers, and referral form answers. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Postings you did not select. +- Interview feedback, notes and scorecards. +- Resumes and other files. +- Lever users, requisitions, sources and tags as documents. +- Whether a posting is open or closed, and posting sections other than its categories and description. +- Separate fields for contact phone numbers, applicant profile details and question answers. Their values are in the text only. +- Deletions: records deleted in Lever stay in HydraDB. diff --git a/essentials/v2/connectors/linear.mdx b/essentials/v2/connectors/linear.mdx new file mode 100644 index 00000000..f42e7c19 --- /dev/null +++ b/essentials/v2/connectors/linear.mdx @@ -0,0 +1,240 @@ +--- +title: "Linear" +description: "Sync issues, with their comments, and Linear Documents from the teams and projects you choose. Private-team restrictions require Enforce ACL and a successful permission read." +icon: "/images/connectors/linear.svg" +--- + +Sync issues from the Linear teams or projects you select, and Linear Documents attached to teams, projects, issues and initiatives. Each issue is one document with its description and up to 50 of its comments. Each Linear Document is one page. A sub-issue links to its parent, and an issue links to the GitHub pull requests attached to it. + +Private-team membership restricts search only when Enforce ACL is on and HydraDB can read the team's members. Projects and Workspace Documents carry no Linear permissions. Issue labels are not synced. Issues and documents deleted in Linear stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Linear permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Access follows the team. A public team's issues can be read by everyone who can query the collection. A private team's issues can be read by its active members. A restricted team uses the members of the private team that contains it. A team's Documents resource follows the same rule. A project resource and Workspace Documents carry no Linear permissions, so set an access rule on them to restrict them. +- **How a person is identified:** A member's email address, in lower case. Linear bots, apps and deactivated members are left out. +- **When permissions cannot be read:** If HydraDB cannot read a team's full membership, the connector reports a permission warning. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Public-team access includes everyone who can query the collection, including people Linear treats as guests. +- An issue in both a selected team and a selected project is stored once, and the resource that synced it last decides its access. A project gives no team audience, so set an access rule on any project you select. +- Documents attached only to an initiative sit under Workspace Documents. A project document can also land there when its project belongs to more teams than HydraDB reads. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Linear uses a personal API key. + + +A Linear personal API key. + + +**Access the key needs** + +- `read`: lists teams and projects, and reads issues, comments and attachments. + +### Set it up + + + + In Linear, open Settings, Account, Security and access, API keys, and create a key. + + + Paste the key as `access_token`. + + + HydraDB lists every team, every project, a ` Documents` resource for each team, and one `Workspace Documents` resource. Select the ones to sync. A team's Documents resource holds the documents of the team, of its projects and of its issues. A document reachable through several teams is synced under one of them only. Workspace Documents holds documents no team claims, in practice documents attached only to an initiative. + + + +One connector reads what one API key's Linear user can see. + +To connect more than one Linear account, give each connector its own `provider_account_scope`, such as `linear-account-a` and `linear-account-b`. These are labels you choose, not Linear's own account ids, and HydraDB does not check them. Two connectors that share a scope and write to the same collection can overwrite each other's items. See [several accounts from one provider](/essentials/v2/connectors#6-connect-several-accounts-from-one-provider). + + + +Use provider `linear` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A newly selected resource reads back the window set by `lookback_days`, 30 days by default, measured on when items were last updated. +- **New and changed items:** Each sync reads the issues and documents updated since the last sync. +- **Edits:** An edited issue or document is picked up through its last-updated time and updates its document. Comments are read again only when their issue is picked up. +- **Deletions:** Deleted issues and documents are not removed. An item that disappears from Linear stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Issues + +- **One document:** One Linear issue, with up to 50 of its comments inside it. A search result is the issue, not an individual comment. +- **Title:** The issue title. +- **Text:** The issue's fields, written as `name: value` lines: the description, workflow state, priority and its label, assignee and creator with their emails, creation and update times, team key and name, project name, and the issue's address. Up to 50 comments are searchable with the issue. The title is searchable too. +- **Date:** When the issue was last updated. +- **Link back:** The issue's page in Linear. +- **Files:** Files uploaded into the description or comments are downloaded with the connector's key and read, and their text is searchable with the issue. Only files stored by Linear's upload service are read. Link attachments, such as GitHub, Figma or plain links, are kept as references and not opened. Up to 50 link attachments are kept per issue. + + +The identifier, such as `ENG-123`, or the issue's id when there is none. It keeps later syncs on the same document. + + + +Up to 50 comments, each with its author, text and time, searchable with the issue. Each comment's author is recorded as a commenter. + + + +The text read from each uploaded file, searchable with the issue. + + + +The workflow state name, written as a line. + + + +The priority number and its readable label, written as lines. + + + +The assignee's name, or email when there is no name, and their email, written as lines. The graph records that person as the assignee. + + + +The creator's name, or email when there is no name, and their email, written as lines. The graph records that person as the creator. + + + +The owning team's key and name, written as lines. + + + +The issue's project, if any, written as a line. + + + +The issue's Linear address. It is the link back, and it is also written as a `url` line. + + + +When the issue was created, written as a line. + + + +When the issue was last updated, written as a line. Sets the result date and decides when a sync picks the issue up. + + + +The identifier, such as `ENG-123`. Picks out one issue. Not searchable. + + + +The issue's Linear id. Picks out one issue by id. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `linear`. Not searchable. + + + +The selected team or project the issue was synced under. A private or restricted team's members decide who can read the issue. A project carries no Linear permissions. Not searchable. + + +### Documents + +- **One document:** One Linear Document, attached to a team, project, issue or initiative. +- **Title:** The document title. +- **Text:** The document's markdown content. The author and the update time are written with it. The title is searchable too. +- **Date:** When the document was last updated. +- **Link back:** The document's page in Linear. +- **Files:** Files uploaded into the content are downloaded and read, and their text is searchable with the document. + + +The creator's name, or email when there is no name. The graph records the document as written by that person. + + + +The creator's email. Identifies the author in the graph. Not searchable. + + + +The text read from each uploaded file, searchable with the document. + + + +When the document was last updated, written as the `Updated` line. Sets the result date and decides when a sync picks the document up. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `linear`. Not searchable. + + + +The team's Documents resource the document was synced under. A private or restricted team's members decide who can read it. Workspace Documents carries no Linear permissions. Not searchable. + + + + + +When the document was created. + + + +What the document is attached to: `project`, `team`, `initiative` or `issue`. + + + +The name or identifier of what the document is attached to. + + + + +**Example searches** + +- What issues are assigned to Dana in the Platform team? +- What did the comments on ENG-412 conclude? +- What does our Linear project doc say about the Q4 roadmap? + +## How it fits into the graph + +- Issues use the Ticket class. +- Documents use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Linear creates** + +- A sub-issue to its parent issue. +- An issue to each GitHub pull request attached to it, up to 50. The link reaches the pull request when the GitHub connector also syncs that repository. A repository name capitalized differently from GitHub's does not match. +- A document is not linked to the team, project, issue or initiative it is attached to. +- Teams and projects appear only as text on issues, not as links. + +**People and groups** + +- The assignee and the creator of each issue. +- The author of each embedded comment, as a commenter. +- The author of each document. + +**Found in the text** + +Issue descriptions, embedded comments and document content. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Teams, projects and Documents resources you did not select. +- Comments beyond the first 50 on an issue. +- Issue labels. +- Projects, cycles, milestones, labels and initiatives as items of their own. +- The contents of link attachments such as GitHub, Figma and plain links. Only uploaded files are read. +- Deletions: deleted issues and documents stay in HydraDB. diff --git a/essentials/v2/connectors/loom.mdx b/essentials/v2/connectors/loom.mdx new file mode 100644 index 00000000..2d35ffce --- /dev/null +++ b/essentials/v2/connectors/loom.mdx @@ -0,0 +1,151 @@ +--- +title: "Loom" +description: "Sync the Loom videos whose share links you list, one searchable document per video with its transcript." +icon: "/images/connectors/loom.svg" +--- + +Sync the Loom videos whose share links you list. Each video is one document with its title, owner, description and transcript. Discord and Microsoft Teams messages that link to a listed video connect to it in the graph. + +No Loom account or token is needed, and only the videos you list are synced: there is no workspace-wide listing. Loom permissions are not imported, so once a password-protected video is synced, its transcript is visible to everyone who can query the collection unless you set an access rule. Removing a link from the list does not remove the video from HydraDB, and a video deleted in Loom stays searchable. + +## Permissions + + +Loom permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Loom needs no API key or sign-in. You list the share links of the videos to sync. A password-protected video also needs its share password. + + +The share or embed links of the videos to sync. + + + +A share password used for every protected video that has no password of its own in `video_passwords`. + + + +Share passwords for individual videos, as a JSON object keyed by the 32-character video id. + + +### Set it up + + + + Copy the share link of each Loom video to sync. For a password-protected video, note its share password. + + + Add the links as `video_urls`. For protected videos, add `password`, or `video_passwords` to give each video its own password. + + + HydraDB lists one item per link and tries to read each video's title. A link it cannot read as a Loom link fails this step. A video that is missing or private is still listed, with a placeholder title, and can fail or be skipped when it syncs. Select the videos to sync. + + + +One connector reads the videos you list. There is no Loom account behind it. To add a video later, add its share link. + + + +Use provider `loom` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Syncs every listed video, whatever its age. +- **New and changed items:** Each sync reads every listed video again. Only videos whose content changed are updated. +- **Edits:** An edited title, description or transcript is picked up on the next sync. +- **Deletions:** Removing a link, or a video that can no longer be read, does not remove its document. A video deleted in Loom stays searchable in HydraDB. +- If a video's transcript cannot be read, the video is skipped for that sync, so the transcript already in HydraDB is kept. +- If the password is rejected for every selected video, the sync fails. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Videos + +- **One document:** One listed Loom video with its transcript. A video with no title, owner, description or transcript is skipped. +- **Title:** The video title, or `Loom video ` when it has none. +- **Text:** The title, an `Owner` line, the description when it differs from the title, then the transcript. The transcript has a `Transcript` heading when other text comes before it. The title is searchable too. +- **Date:** When the video was last updated, else when it was created. +- **Link back:** The video's share link on loom.com. +- **Files:** None. The video file is not downloaded. + + +The owner's display name, written as the `Owner` line. The owner is not attached to the video as a person in the graph. + + + +The owner's description of the video, written after the `Owner` line. + + + +When the video was last updated, written as an `Updated` line. Sets the result date. + + + +When the video was created. Sets the result date only when there is no update time. Not searchable. + + + +The 32-character video id. Picks out one video. Discord and Microsoft Teams messages that link to the video connect to it by this id. Not searchable. + + + +The owner's display name. Limits a query to one owner's videos. Not searchable under this key: the same name is searchable through the `Owner` line. + + + +Limits a query to this connector's videos. Not searchable. + + + +Always `loom`. Not searchable. + + + + + +Whether the transcript was included. + + + + +**Example searches** + +- What does the onboarding walkthrough video say about setting up SSO? +- Which Discord messages linked to the product demo Loom? +- What did Alex explain in the Q3 roadmap video? + +## How it fits into the graph + +- Videos use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Loom creates** + +- A Discord or Microsoft Teams message to each listed Loom video it links to, by share or embed link, up to 50 videos per message. +- The message connects to the video once the video is synced into the same collection as the message. Until then, it points to a placeholder. +- Videos have no links of their own to other items. + +**People and groups** + +The connector does not attach the owner to a video as a person. The owner's name is part of the video text. + +**Found in the text** + +The title, owner, description and transcript. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Videos whose share links you did not list. +- Video and audio files, comments, reactions and view counts. +- Removals: a link removed from the list stays in HydraDB, and so does a video deleted in Loom. diff --git a/essentials/v2/connectors/mailchimp.mdx b/essentials/v2/connectors/mailchimp.mdx new file mode 100644 index 00000000..306170a9 --- /dev/null +++ b/essentials/v2/connectors/mailchimp.mdx @@ -0,0 +1,227 @@ +--- +title: "Mailchimp" +description: "Sync a Mailchimp account's sent campaigns with their email text, its audience lists and its classic automations. Each campaign links to the list it was sent to." +icon: "/images/connectors/mailchimp.svg" +--- + +Sync a Mailchimp account's sent email campaigns, audience lists and classic automations. Each campaign is one document with its settings, open and click rates, and the email text. Each campaign links to the audience list it was sent to. + +Mailchimp permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Draft and scheduled campaigns, audience members, and the emails inside automations are not synced. Items deleted in Mailchimp stay in HydraDB. + +## Permissions + + +Mailchimp permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Mailchimp uses an API key. + + +A Mailchimp API key, complete with its data center suffix, such as `-us21`. HydraDB finds your account's Mailchimp address from that suffix. + + +### Set it up + + + + Paste the whole Mailchimp API key, including the data center suffix after the last `-`, as `api_key`. + + + HydraDB lists one account-wide resource, All data. Select it to sync the whole account. + + + +One connector reads one Mailchimp account. + + + +Use provider `mailchimp` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads every sent campaign, audience list and automation in the account, whatever their age. +- **New and changed items:** Every sync reads all sent campaigns, lists and automations again. Open and click rates are refreshed on each sync. +- **Edits:** A changed campaign, list or automation replaces its document. +- **Deletions:** Deleted items are not removed. A campaign, list or automation deleted in Mailchimp stays searchable in HydraDB. +- Each sent campaign's email text is read with a separate request. If that request fails, the campaign is indexed with its settings only, and email text indexed on an earlier sync is replaced. Some failures, such as a refused request or a request that keeps timing out, can fail the whole sync. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Mailchimp item + + +The Mailchimp id of the campaign, list or automation. Targets one item. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `mailchimp`. Not searchable. + + + + + +The record type, `campaigns`, `lists` or `automations`, shown when you inspect the item. No published filter limits a query by record type. + + + + +### Campaigns + +- **One document:** One sent campaign, with its email text when Mailchimp returns it. +- **Title:** The campaign's internal title, else its subject line, else `Mailchimp campaigns `. +- **Text:** The title, then `Subject`, `Preview`, `From`, `List`, `Type`, `Status`, `Sent`, `Open rate` and `Click rate` lines, with the rates as percentages. Then the email text: Mailchimp's plain-text version, or the HTML converted to text when there is no plain-text version. +- **Date:** When the campaign was sent, or when it was created if there is no send time. +- **Link back:** The campaign's public archive page. +- **Files:** None. Images and files in the email are not fetched. Only the text is kept. + + +The full email message, from the plain-text version or the converted HTML. The original plain-text and HTML content are not kept on the item. + + + +The campaign's title, subject line, preview text and sender name, written as the title and the `Subject`, `Preview` and `From` lines. + + + +The audience list the campaign was sent to. Its name is written as the `List` line, and its id links the campaign to that list. + + + +Open and click rates, written as percentages. They are a snapshot from the latest sync. + + + +The campaign type and status, written as the `Type` and `Status` lines. + + + +When the campaign was sent, written as the `Sent` line. It sets the result date. + + + +When the campaign was created. Sets the result date only when there is no send time. Not searchable. + + + + + +Every other field of the campaign, such as `emails_sent` and tracking settings. Kept for inspection only. + + + + +### Audience lists + +- **One document:** One audience list. Its members are not synced. +- **Title:** The list name, or `Mailchimp lists ` when there is none. +- **Text:** The title, then `Permission Reminder`, `Members` and `Created` lines. +- **Date:** When the list was created. +- **Link back:** The list's public signup form, not the list in Mailchimp. +- **Files:** None. + + +The list name, written as the title and the first line. + + + +The list's permission reminder: its explanation of how people signed up or gave permission. + + + +How many members the list has, written as the `Members` line. + + + +When the list was created, written as the `Created` line. It sets the result date. + + + + + +Every other field of the list, such as its stats, contact details and campaign defaults. Kept for inspection only. + + + + +### Classic automations + +- **One document:** One automation. The emails inside it are not synced. +- **Title:** The automation's title, or `Mailchimp automations ` when there is none. +- **Text:** The title, then `From`, `Status`, `Emails Sent` and `Started` lines. +- **Date:** When the automation started, or when it was created if there is no start time. +- **Link back:** None. +- **Files:** None. + + +The automation's title and sender name, written as the title and the `From` line. + + + +The automation's status and how many emails it has sent, as of the latest sync. + + + +When the automation started, written as the `Started` line. It sets the result date. + + + +When the automation was created. Sets the result date only when there is no start time. Not searchable. + + + + + +Every other field of the automation. Kept for inspection only. + + + + +**Example searches** + +- What did the Black Friday campaign email say, and what was its subject line? +- What were the open and click rates of last month's newsletter? +- Which automations are running, and how many emails have they sent? + +## How it fits into the graph + +- Campaigns use the Record class. +- Audience lists use the Record class. +- Classic automations use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Mailchimp creates** + +- A campaign to the audience list it was sent to. +- No links to other tools. + +**People and groups** + +No people or groups are attached to items. Audience members are not synced. + +**Found in the text** + +Campaign email text, and the settings of each campaign, list and automation. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Draft, scheduled and other campaigns that were not sent. +- Audience members, segments, segment members and unsubscribes. +- Per-recipient email activity, such as who opened or clicked. +- The individual emails inside an automation. +- Images and attachments inside campaign emails. +- Deletions: items deleted in Mailchimp stay in HydraDB. diff --git a/essentials/v2/connectors/microsoft-teams.mdx b/essentials/v2/connectors/microsoft-teams.mdx new file mode 100644 index 00000000..29abfe7d --- /dev/null +++ b/essentials/v2/connectors/microsoft-teams.mdx @@ -0,0 +1,314 @@ +--- +title: "Microsoft Teams" +description: "Sync channel posts and replies from the teams you choose, and the chats of the people you choose, one document per message. Team, channel and chat membership restricts search when Enforce ACL is on and HydraDB can read the members." +icon: "/images/connectors/microsoft-teams.svg" +--- + +Sync channel posts and replies from the Microsoft Teams teams you select, and the 1:1, group and meeting chats of the people you select. Each post, reply and chat message is one document. A reply links to its root post and a chat message to its chat, so a conversation is returned together. Text from PDF and DOCX files shared in messages is searchable when HydraDB can download and read the files. + +With Enforce ACL on, a standard channel's messages can be read by the team's members, a private or shared channel's messages by that channel's members, and a chat's messages by its participants. Private and shared channels are skipped unless you turn on `include_private_channels`. Chats need the optional `Chat.Read.All` permission. Every sync fails until Microsoft approves your app for the Teams protected APIs. A message deleted in Teams becomes a hidden stub rather than being removed. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Microsoft Teams permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** A standard channel's messages can be read by the team's members. A private or shared channel's messages can be read by that channel's members, including the members of every team a shared channel is shared with. A chat's messages can be read by its participants. +- **How a person is identified:** A member's email address, in lower case. +- **When permissions cannot be read:** If a team, channel or chat member list is missing, empty or cannot be read in full, the message is marked with a permission warning, which you can find with `additional_metadata.rbac_warning`. A partial member list is never applied. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- A team or channel with more than 5,000 members cannot be captured. Set an access rule on such a team. +- Do not rely on a team or channel membership change to update access right away. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Microsoft Teams uses a Microsoft Entra ID app registration with application permissions and a client secret. The same app can also back an Outlook connector. + + +The Directory (tenant) ID. + + + +The Application (client) ID. + + + +The client secret's Value, shown once in the Azure portal. + + +**Connector settings** + + +Set to `true` to also sync private and shared channels, restricted to their members. Off by default. + + +**Microsoft Graph application permissions to grant** + +- `Team.ReadBasic.All`: lists the tenant's teams and reads each selected team's name. +- `Channel.ReadBasic.All`: lists the channels of each selected team. +- `ChannelMessage.Read.All`: reads channel posts and replies. A Teams protected API. +- `TeamMember.Read.All`: reads each team's members, who can read its standard channels. +- `ChannelMember.Read.All`: reads private and shared channel members, and the teams a channel is shared with. +- `User.ReadBasic.All`: lists people for chat selection, and resolves authors to names and addresses. +- `Chat.Read.All`: optional. Reads the chats of the people you select. A Teams protected API. Without it, no chats are offered. +- `Files.Read.All`: optional. Lets HydraDB download PDF and DOCX files shared in messages. Messages sync without it, but without the file text. + +Request access to the Teams protected APIs at https://aka.ms/teamsgraph/requestaccess with your app id and tenant id. Until Microsoft approves the app, every Teams sync fails with a 403 error, even though the permissions show as granted. + +### Set it up + + + + In Microsoft Entra ID, register an app with no redirect URI and create a client secret. Copy the tenant id, the client id and the secret's Value. + + + Add the Microsoft Graph application permissions above, not delegated ones, and grant admin consent. + + + Request access to the Teams protected APIs with your app id and tenant id, and wait for Microsoft's approval. + + + Enter `tenant`, `client_id` and `client_secret`. Set `include_private_channels` to `true` to also sync private and shared channels. + + + HydraDB lists the tenant's teams and users. Select the teams whose channels to sync. Select a person to sync the chats that person takes part in. Chats are opted in person by person. + + + Rotate the client secret before it expires. An expired secret stops every sync. + + + +One connector reads the teams and people you select in one Microsoft 365 tenant. + + + +Use provider `microsoft_teams` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected team and person reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the messages modified since the last sync, per team and per selected person's chats. A channel post with a new reply is picked up again, even if the post itself is old. +- **Edits:** An edited message is read again and replaces its document. A new reply also makes its root post be read again. +- **Deletions:** A message deleted in Teams is replaced on the next sync by a stub with the text `[deleted]`. With Enforce ACL on, nobody can read the stub. The document itself is not removed. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Microsoft Teams item + + +The display name of the person or bot that posted, written as the From line. The graph records the message as sent by that author. + + + +When the message was posted, written as the Sent line. + + + +When the message was last modified. Not searchable. + + + +The names of the people, bots or channels @mentioned. The graph records each as mentioned. This list is not searchable by itself, but the names stay in the message text. + + + +The names of attached files, cards or links. They are searchable only when the message has no text, as its `Shared:` line. Text read from supported files is searchable separately. + + + +`true` when the message has a non-inline attachment. Not searchable. + + + +`true` when a bot posted the message. Excludes or isolates bot posts. Not searchable. + + + +Present when the message's member list could not be read in full. Finds such messages. Not searchable. + + + +`true` on the hidden stub left by a deleted message. Not searchable. + + + +Limits a query to this connector's messages. Not searchable. + + + +Always `microsoft_teams`. Not searchable. + + + + + +The author's email address. + + + +Whether the message was edited. + + + +When the message was last edited. + + + +How many reactions the message has. + + + +`high`, `low` or `urgent`, when the message's importance is not normal. + + + + +### Channel messages + +- **One document:** One root post in a channel, or one reply. +- **Title:** The post's subject, else the first line of its text cut to about 120 characters, else `Teams message` and its id. Search matches the message text, not this title, so a subject is searchable only when it also appears in the text. +- **Text:** The message flattened from HTML, with @mention tags shown as the mentioned name. A post with no text but with attachments reads `Shared:` followed by the attachment names. The author is written as a From line and the posted time as a Sent line. +- **Date:** When the message was last modified, else when it was posted. +- **Link back:** The message's Teams web link. +- **Files:** Attachment names are kept. Text from PDF and DOCX files up to 50 MiB is searchable separately when `Files.Read.All` is granted and HydraDB can download and read the files. Images embedded in a message are not read. + + +For a reply, the root post it answers. Joins the reply to that post, so the whole conversation can be returned together. Not searchable. + + + +The root post's id. Groups a root post and its replies into one thread. Not searchable. + + + +The channel's id. Limits a query to one channel. Not searchable. + + + +The channel's name. Limits a query to one channel by name. Not searchable. + + + +Always `channel`. Separates channel messages from chat messages. Not searchable. + + + +The team's id. Limits a query to one team. Not searchable. + + + +The team's name. Limits a query to one team by name. Not searchable. + + + +`standard`, `private` or `shared`. Not searchable. + + + +`true` for replies. Keeps only root posts or only replies. Not searchable. + + + +For a standard channel, the team's members can read the message. For a private or shared channel, the channel's members can. Not searchable. + + + + + +How many replies a root post had when it was synced. + + + + +### Chat messages + +- **One document:** One message in a 1:1, group or meeting chat. +- **Title:** The first line of the text cut to about 120 characters, else `Teams chat message` and its id. Search matches the message text, not this title. +- **Text:** The message flattened from HTML, or `Shared:` followed by the attachment names when there is no text. The author is written as a From line and the sent time as a Sent line. +- **Date:** When the message was last modified, else when it was sent. +- **Link back:** The message's Teams web link. +- **Files:** Attachment names are kept. Text from PDF and DOCX files up to 50 MiB is searchable separately when `Files.Read.All` is granted and HydraDB can download and read the files. Images embedded in a message are not read. + + +The chat's id. Groups all messages of one chat into one thread. Not searchable. + + + +Also the chat's id. Keeps a chat's messages together, so earlier messages are read as context. The chat itself is not a document. Not searchable. + + + +The chat's id. Limits a query to one chat. Not searchable. + + + +The chat's topic, or up to four participant names. Limits a query to one chat by name. Not searchable. + + + +Always `chat`. Separates chat messages from channel messages. Not searchable. + + + +`oneOnOne`, `group` or `meeting`. Not searchable. + + + +Always `false` for chat messages. Not searchable. + + + +The chat's participants can read its messages. Not searchable. + + + + + +The names of the chat's participants. They are not attached to the message in the graph. + + + + +**Example searches** + +- What did the Platform team decide in the incidents channel about the database migration? +- What did Alex say in our 1:1 chat about the launch date? +- Show the replies to the post announcing the new on-call rotation. + +## How it fits into the graph + +- Channel messages use the Message class. +- Chat messages use the Message class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Microsoft Teams creates** + +- A channel reply to its root post. +- Every chat message to its chat, so a chat's messages are kept together. +- A message to any Loom video it links to, which resolves when that video is synced into the same collection. +- No other links to other tools. + +**People and groups** + +- The author of each message. +- The people, bots and channels @mentioned in a message. +- Chat participants are kept with each chat message but not attached in the graph. + +**Found in the text** + +The message text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Private and shared channels, unless `include_private_channels` is on. +- Chats of people you did not select, and every chat without `Chat.Read.All`. +- Shared file formats other than PDF and DOCX, and images embedded in a message. +- System event messages. +- Reactions, apart from their count. diff --git a/essentials/v2/connectors/mixpanel.mdx b/essentials/v2/connectors/mixpanel.mdx new file mode 100644 index 00000000..72c759b0 --- /dev/null +++ b/essentials/v2/connectors/mixpanel.mdx @@ -0,0 +1,230 @@ +--- +title: "Mixpanel" +description: "Sync one Mixpanel project's events, daily funnel results, saved cohorts and annotations, with each event's user named from their Mixpanel profile." +icon: "/images/connectors/mixpanel.svg" +--- + +Sync one Mixpanel project's events, daily funnel results, saved cohorts and project annotations. Each event is one document that names the event, the user and up to 30 of the event's properties. The user's name and email come from their Mixpanel profile when one exists. + +Mixpanel permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Events without an insert id can be treated as one event, so some of them can be lost. Annotations sync only with a service account. Cohorts and annotations deleted in Mixpanel stay in HydraDB. + + +Mixpanel is in beta. + + +## Permissions + + +Mixpanel permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Mixpanel uses the project's API secret. Add a service account as well to sync annotations. + + +The Mixpanel project's API secret. + + + +A service account's username, from Organization Settings, Service Accounts. Needed to sync annotations. + + + +That service account's secret. Set it together with `username` and `project_id`. + + + +The Mixpanel project id, a number. Required when you use a service account. + + +### Set it up + + + + To sync annotations, create a service account in Mixpanel under Organization Settings, Service Accounts. Without one, everything except annotations syncs. + + + Paste the project's API secret as `api_secret`. If you created a service account, add its username as `username`, its secret as `password`, and the project id as `project_id`. + + + HydraDB lists one account-wide resource, All data. Select it to sync the whole project the credentials reach. + + + +One connector reads one Mixpanel project. + + + +Use provider `mixpanel` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. Events and annotations reach back at most 365 days, and funnel results at most 90 days. +- **New and changed items:** Events, funnel results and annotations are read by date. Cohorts are read by when they were created. +- **Edits:** An event read again with the same insert id, or a funnel day read again, replaces its document. A cohort is read by its creation time, so a later edit to an older cohort may not come across. A change to a user's profile does not update events already synced. +- **Deletions:** Deleted cohorts and annotations are not removed. A cohort or annotation deleted in Mixpanel stays searchable in HydraDB. +- If a Mixpanel request keeps failing after retries, the sync fails instead of skipping that data. +- Event times are converted using UTC. The connection form has no project-timezone setting. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Mixpanel item + + +Limits a query to this connector's items. Not searchable. + + + +Always `mixpanel`. Not searchable. + + +### Events + +- **One document:** One event. An event read again with the same insert id updates the same document. Events without an insert id, as older events can be, may be treated as the same event, and all but one of them lost. +- **Title:** The event name, or `Mixpanel event ` when there is none. +- **Text:** `Event`, `User` and `When` lines, then up to 30 of the event's properties in alphabetical order as `property: value`. Mixpanel's `$` and `mp_reserved_` prefixes are removed from property names. The title is searchable too. +- **Date:** The event time in UTC. Times are converted from the project timezone, which defaults to UTC, so events from a project set to another timezone can have shifted times. +- **Link back:** None. +- **Files:** None. + + +The event name, written as the title and the `Event` line. + + + +The user's name and email from their Mixpanel profile, as `name (email)`. When no profile name or email is found, for example because the Mixpanel plan has no user profiles, the line shows the raw `distinct_id` instead. Older events keep the name and email they were synced with. + + + +When the event happened, written as the `When` line. It sets the result date. + + + +Up to 30 non-empty properties with a single value each, such as a plan name. Properties past the 30th, and properties whose value is an object or a list, are not kept or searchable. + + + +The event name. Limits a query to one event name. Not searchable. + + + +The user's `distinct_id`. Limits a query to one user's events, whether or not their profile was found. Not searchable. + + +### Funnel days + +- **One document:** One funnel's results for one day. +- **Title:** The funnel name, or `Mixpanel funnel :` when there is none. +- **Text:** `Funnel` and `Date` lines, then one line per step: `Step N: - count `. The title is searchable too. +- **Date:** The funnel day. +- **Link back:** None. +- **Files:** None. + + +The funnel name, written as the title and the `Funnel` line. + + + +The day, written as the `Date` line. It sets the result date when Mixpanel supplies no date and time for the day. + + + +The date and time Mixpanel supplies for the funnel day. When present, it sets the result date. Not searchable. + + + +The funnel id. Searchable only in a title used when the funnel has no name. + + + +The funnel id. Limits a query to one funnel. Not searchable. + + +### Cohorts + +- **One document:** One saved cohort. +- **Title:** The cohort name, or `Mixpanel cohort ` when there is none. +- **Text:** The `Cohort` line, the description and a `Members` line with the member count. The title is searchable too. +- **Date:** When the cohort was created. +- **Link back:** None. +- **Files:** None. The list of members is not synced. + + +The cohort name, written as the title and the `Cohort` line. + + + +The cohort description. + + + +How many members the cohort has, written as the `Members` line. + + + +When the cohort was created, as Mixpanel reports it. Not searchable. + + +### Annotations + +- **One document:** One project annotation. +- **Title:** The start of the description, up to 80 bytes, or `Mixpanel annotation` followed by its id when there is no description. A long title in a non-Latin script can be cut in the middle of a character. +- **Text:** The annotation's description. The title is searchable too. +- **Date:** The annotation date. +- **Link back:** None. +- **Files:** None. + + +The annotation text, which also supplies the title. + + + +The date the annotation is attached to. Not searchable. + + +**Example searches** + +- When did jane@example.com last complete Checkout Completed? +- How many users reached each step of the Onboarding funnel on 2026-11-02? +- What is the Power users cohort, and how many members does it have? + +## How it fits into the graph + +- Events use the Record class. +- Funnel days use the Record class. +- Cohorts use the Record class. +- Annotations use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Mixpanel creates** + +- None. Events are not linked to funnels, cohorts or each other. +- No links to other tools. + +**People and groups** + +No people are attached to items. The user named in an event's `User` line is part of the text only. + +**Found in the text** + +The event, funnel, cohort and annotation text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Annotations, when no service account is set. +- Cohort members. +- Daily event counts and retention reports. +- Revenue reports. Mixpanel retired them. +- User profiles as their own documents. A profile only supplies the name and email shown on events. +- Event properties past the 30th, and properties whose value is an object or a list. +- Deletions: cohorts and annotations deleted in Mixpanel stay in HydraDB. diff --git a/essentials/v2/connectors/monday.mdx b/essentials/v2/connectors/monday.mdx new file mode 100644 index 00000000..72717cca --- /dev/null +++ b/essentials/v2/connectors/monday.mdx @@ -0,0 +1,210 @@ +--- +title: "Monday.com" +description: "Sync items, subitems and the readable files attached to them from the Monday.com boards you choose. Monday.com permissions are not imported." +icon: "/images/connectors/monday.svg" +--- + +Sync items and subitems from the Monday.com boards you select. Each item is one document with its name and every filled column value. Each attached file whose text can be read becomes its own page, linked to its item. Subitems link to their parent, and board-relation columns link items to each other. + +Monday.com permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Item updates, the comments on an item, are not synced. People columns are text only. Items archived or deleted in Monday.com stay in HydraDB. + +## Permissions + + +Monday.com permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- The token lists only boards its user can open, but synced items do not keep that restriction. Item-level visibility is not reproduced either. Set an access rule on each board that should be restricted. +- Each selected board shows a warning in connector status that its permissions are not captured. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Monday.com uses an API token: a personal token, or an OAuth access token from an app with `boards:read`. + + +A Monday.com personal API token, or an OAuth access token. + + +Monday.com limits API complexity and daily calls by plan. Very large boards can need a longer sync interval. To rotate a personal token, update the connector with the new token and check that it works before revoking the old one. + +**Scope for an OAuth app token** + +- `boards:read`: lists boards and reads items and column values. + +### Set it up + + + + In Monday.com, open Profile, Developers, My Access Tokens and copy your personal token, or use an OAuth app token with `boards:read`. Use a user who can open every board you plan to select. Private boards that user cannot open are not listed. + + + Paste the token as `auth_token`. + + + HydraDB lists every board the token can see. Select the boards to sync. + + + +One connector reads the boards one token's Monday.com user can open. + + + +Use provider `monday` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A newly selected board reads back the window set by `lookback_days`, 30 days by default, measured on when items were last updated. +- **New and changed items:** Each sync reads every item and subitem updated since the last sync, and the files on those items. Up to four boards sync at once. +- **Edits:** An edited item is picked up through its last-updated time and updates its document. Its files are read again. +- **Deletions:** Items archived or deleted in Monday.com stay searchable in HydraDB. +- If a board makes no progress for five minutes, that sync fails and the board is tried again on the next sync. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Monday.com item + + +The board id. Limits a query to one board. Not searchable. + + + +The board name. Limits a query to one board by name. Empty when the board name could not be read. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `monday`. Not searchable. + + +### Items + +- **One document:** One Monday.com item or subitem, at any level. +- **Title:** The item name, or `Monday item` and the board and item ids when the name is empty. +- **Text:** The item name, then one line per filled column, as `Column title: value`. An item with no column values is just its name. The item key, creation date and parent are written into the item details too. The title is searchable too. +- **Date:** When the item was last updated, or when it was created if there is no update time. +- **Link back:** The item's card in Monday.com. +- **Files:** Attached files are their own documents, described below. + + +Each filled column, such as status, people, dates, numbers and text, as `Column title: value`. People columns are text only: owners and assignees are not added to the graph as people. + + + +The board id and item id together. It keeps later syncs on the same document. + + + +When the item was created, written as the `Created` line. + + + +When the item was last updated. Sets the result date and decides when a sync picks the item up. Not searchable. + + + +For a subitem, its parent item, written as the `Parent` line. Links the subitem to its parent. + + + +Each item a board-relation column points to becomes a link from this item, as long as that item is also synced, which means it is on a selected board. The linked ids themselves are not searchable. + + + +The item id. Picks out one item. Not searchable. + + + + + +The item's state: `active`, `archived` or `deleted`. + + + +The board id. + + + +The board name. + + + + +### Files + +- **One document:** One file attached to an item, once its text has been read. A file whose text could not be read is not synced. +- **Title:** The file name, with `.pdf` or `.docx` added when the name has no extension, or `Monday attachment` and the file id when the name is empty. +- **Text:** The text read from the file, or the file name when there is no text. The update time is written as the `Updated` line. The title is searchable too. +- **Date:** When the file was last updated, else when it was created, else when its item was last updated. +- **Link back:** The card of the item the file is attached to. + + +When the file was last updated, written as the `Updated` line. Sets the result date. + + + +The item the file is attached to. Links the file to that item, so an item and its files are found together. Not searchable. + + + + + +The board of the item the file is attached to. + + + +The id of the item the file is attached to. + + + +`pdf` or `docx`. + + + + +**Example searches** + +- Which items on the Marketing Campaigns board are marked Stuck? +- What does the contract PDF attached to the Acme onboarding item say? +- What are the subitems of the Website Launch item? + +## How it fits into the graph + +- Items use the Ticket class. +- Files use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Monday.com creates** + +- A subitem to its parent item. +- An item to each item in its board-relation columns, when that item is also synced. +- A file to the item it is attached to. +- No links to items in other tools. + +**People and groups** + +No people are attached to items. People columns, such as owners and assignees, are text only. + +**Found in the text** + +The column values of every item, and the text of attached files. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Boards you did not select, and boards the token's user cannot open. +- Item updates: the comments and replies on an item. +- Archived and deleted items. One that was synced earlier stays searchable. +- Files whose text could not be read. +- Board views, groups, columns, workspaces and users as items of their own. +- Monday.com docs and dashboards. diff --git a/essentials/v2/connectors/notion.mdx b/essentials/v2/connectors/notion.mdx new file mode 100644 index 00000000..8c2405a9 --- /dev/null +++ b/essentials/v2/connectors/notion.mdx @@ -0,0 +1,159 @@ +--- +title: "Notion" +description: "Sync page text from selected Notion pages and databases, one document per page. Database properties other than titles are not synced." +icon: "/images/connectors/notion-light.svg" +--- + +Sync the Notion databases and top-level pages you share with the connector's integration. Each page is one document: a database row, a selected page, and every sub-page under them. Each sub-page links to the page it sits under. + +A database row brings in its title and page text only. Status, owner, dates, tags and other properties are not read. Notion page sharing is not imported, so every synced page is visible to everyone who can query the collection unless you set an access rule. Pages deleted or unshared in Notion stay in HydraDB. + +## Permissions + + +Notion permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Notion uses an internal integration token. + + +A Notion internal integration token. It starts with `secret_` or `ntn_`. + + +**Capabilities to give the integration** + +- `Read content`: required. Lets HydraDB search, read pages and blocks, and query databases. +- `Read user information without email`: optional. Lets HydraDB check the token and show who created a page. + +### Set it up + + + + In Notion, create an internal integration with the Read content capability, and copy its token. + + + Share each database and page you want synced with the integration. HydraDB can list only what the integration can see. + + + Paste the token as `access_token`. + + + HydraDB lists every database the integration can see, and every page that sits at the top of the workspace. Select at least one database or top-level page. + + + +One connector reads what one integration can see. + +To connect more than one Notion workspace, give each connector its own `provider_account_scope`, such as `notion-account-a` and `notion-account-b`. These are labels you choose, not Notion's own account ids, and HydraDB does not check them. Two connectors that share a scope and write to the same collection can overwrite each other's items. See [several accounts from one provider](/essentials/v2/connectors#6-connect-several-accounts-from-one-provider). + + + +Use provider `notion` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A database reaches back 30 days by last edited time by default, set by `lookback_days`. A selected page and its sub-pages are read again on every sync. +- **New and changed items:** For a database, rows edited since the last sync are read again in full, with their sub-pages. For a selected page, the whole page tree is read on every sync, and the pages edited since the last sync are sent. +- **Edits:** For a directly selected page tree, edited pages replace their existing documents on the next sync. For a sub-page under a database row, the change is picked up only when the database row is also edited. +- **Deletions:** Pages deleted or unshared in Notion are not removed. They stay searchable in HydraDB. +- Sub-pages are followed up to 10 levels deep, and blocks up to 20 levels deep. +- If a sub-page or block is unavailable, its content is omitted. Other accessible content on the page can still sync. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Pages + +- **One document:** One Notion page: a database row, a selected page, or any sub-page under them. A sub-page is its own document, not part of its parent's text. +- **Title:** The page's title. A page without a title uses its Notion id. +- **Text:** The page title at the top, the creator as an `Author` line, and the plain text of the page's blocks in order, one block per line: paragraphs, headings, bulleted and numbered lists, to-dos, toggles, quotes, callouts and code. Text inside toggles and callouts is included. +- **Date:** When the page was last edited. +- **Link back:** The page in Notion. +- **Files:** Images and files remain links to the originals. Image text is searchable only when image reading is available in your deployment. Do not rely on PDF or Word attachment text being searchable. + + +The creator's display name, or their Notion id if the name cannot be read. It is the `Author` line of the text, and the graph records the page as written by that person. + + + +When the page was last edited. Not searchable. + + + +The page's Notion id. Limits a query to one page. Not searchable. + + + +Limits a query to this connector's pages. Not searchable. + + + +Always `notion`. Not searchable. + + + +For a sub-page, the page it sits under. Links the two, so a page tree is connected in the graph. Not searchable. + + + +The creator's email, when Notion returns one. It lets the graph recognise the same person across tools. Not searchable. + + + +People @mentioned in the page. The graph records each as mentioned by the page. The field itself is not searchable, but the page text it comes from is. + + + + + +When the page was created. + + + +The Notion user id of the last editor. It is not turned into a name or a person. + + + + +**Example searches** + +- What does our onboarding page say about laptop setup? +- Which Notion pages did Priya create? +- What sub-pages sit under the Engineering Handbook page? + +## How it fits into the graph + +- Pages use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Notion creates** + +- A sub-page to the page it sits under. +- No links from Notion pages to other tools. In the other direction, GitHub issues, pull requests and comments that link to a Notion page are linked to it. + +**People and groups** + +- The page's creator, with an email when Notion returns one. +- People @mentioned in the page. + +**Found in the text** + +The page text, including people and projects named in plain text rather than @mentioned. Database properties are not read, so anything kept only in database columns cannot be found. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Property values other than the title, such as status, owner, dates and tags, are not read. +- Comments on pages. +- Pages and databases not shared with the integration. +- Text in unsupported blocks, such as table rows, equations, embeds and bookmarks. +- Deletions: deleted pages stay in HydraDB. diff --git a/essentials/v2/connectors/okta.mdx b/essentials/v2/connectors/okta.mdx new file mode 100644 index 00000000..d21f86b8 --- /dev/null +++ b/essentials/v2/connectors/okta.mdx @@ -0,0 +1,322 @@ +--- +title: "Okta" +description: "Sync every user, group and application in your Okta org, plus System Log events. Okta permissions are not carried over." +icon: "/images/connectors/okta.svg" +--- + +Sync every user, group and application in your Okta org, plus System Log events. Each user, group, application and log event is one document. A group lists its members, an application its assigned users, and a user the active MFA factors HydraDB found. + +Okta permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. These records do not prove who has access today or that MFA is off: a missing factor can mean a factor read failed. Users, groups and applications deleted in Okta stay in HydraDB. + +## Permissions + + +Okta permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Okta reads are governed by the admin role on the token, not by anything on a user, group, application or event, so there is nothing per item to import. +- Application assignments and self-service settings are not treated as read permissions. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Okta uses an API token. The token gets the admin role of the person who creates it, so create it while signed in as a Read-only Administrator. + + +An Okta API token, from Security, API, Tokens, Create Token. + + + +Your org's API address with the `/api/v1/` path and the trailing slash: `https://.okta.com/api/v1/`. + + +The token stops working if the account that created it is deactivated, and Okta expires a token after 30 days without use. + +**What the token's admin role needs** + +- `Read-only Administrator`: the role of the person who creates the token. +- `View users and their details` +- `View groups and their details` +- `View applications and their details` +- `View System Log`: without it, the sync fails with an error instead of skipping log events. + +### Set it up + + + + Sign in to the Okta admin console as a Read-only Administrator, so the token gets that role. Use a long-lived admin account. + + + Open Security, API, Tokens and create a token. Set where API calls made with this token must come from: Any IP, unless you have a network zone for HydraDB's addresses. Without this setting, creating the token fails with an unclear error. + + + In the token list, check the Role column to confirm the role the token got. + + + Paste the token as `api_key` and your org's API address as `service_url`, with `/api/v1/` and the trailing slash. + + + Okta has no resources to choose. The connector reads the whole org. + + + +One connector reads one Okta org. + + + +Use provider `okta` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Users, groups, applications, group members, application assignments and MFA factors are read in full. System Log events reach back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the whole directory again, and System Log events newer than the last sync. Users, groups and applications that did not change are skipped. +- **Edits:** A change to a user, group or application updates its document. A change only to a group's members, an application's assignments or a user's MFA factors may not show until the group, application or user itself changes. +- **Deletions:** Users, groups and applications deleted in Okta stay searchable in HydraDB. A removed MFA factor can stay listed on the user. +- MFA factors are read one user at a time, with a one-second pause per user. If one user's factors cannot be read, that user's factors are skipped and the sync goes on. If Okta rejects the token, the sync fails. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Okta item + + +Limits a query to this connector's items. Not searchable. + + + +Always `okta`. Not searchable. + + +### Users + +- **One document:** One Okta user. +- **Title:** The first and last name, else the login, else `Okta user` with the user's id. +- **Text:** The name, then `Login`, `Email`, `Title`, `Department`, `Manager`, `Organization`, `Location`, `Second Email`, `Mobile Phone`, `Status`, `MFA`, `Created` and `Last Login` lines. Profile attributes outside this list are not synced. The title is searchable too. +- **Date:** When the user was last updated in Okta, else when it was created. +- **Link back:** None. + + +The primary email, written as the `Email` line. Identifies the user as a person in the graph. The name does not. + + + +The user's name, used for the title and the first line. + + + +The username, written as the `Login` line. It is the title when the user has no name. + + + +Written as the `Title`, `Department` and `Organization` lines. + + + +The manager's name from the profile, written as the `Manager` line. It does not create the manager link. + + + +Links the user to their manager's user record when it matches exactly one user by id, employee number or login, ignoring case. Not kept as a field. Not searchable. + + + +The account state, written as the `Status` line. + + + +The active factor types and providers HydraDB found, written as the `MFA` line. A missing factor does not prove MFA is off: a user's factor read can fail and be skipped, and a removed factor can stay listed. + + + +When the user was created, written as the `Created` line. The result date when the user has no last-updated time. + + + +The last recorded login, written as the `Last Login` line. Not used as the result date. + + + +When the user was last updated in Okta. Not searchable. + + + +The Okta user id. Picks out one user. Not searchable. + + + + + +When the account was activated. + + + + +### Groups + +- **One document:** One Okta group, with its members. +- **Title:** The group name, else `Okta group` with the group's id. +- **Text:** The name, then `Description`, `Type`, `Members` and `Created` lines. The title is searchable too. +- **Date:** When the group was last updated in Okta, else when it was created. +- **Link back:** None. + + +The group description. + + + +Whether the group is managed in Okta, comes from an application, or is built in. + + + +Up to 200 distinct member names, with a count of the rest and of members without a name. Each member is linked to their user record. + + + +A group that comes from an application is linked to that application's record. Not searchable. + + + +When the group was created, written as the `Created` line. The result date when the group has no last-updated time. + + + +When the group was last updated in Okta. Not searchable. + + + +The Okta group id. Picks out one group. Not searchable. + + + + + +How many members the group has, including any beyond the 200 names in the text. + + + + +### Applications + +- **One document:** One Okta application, with its assignments. +- **Title:** The application label, else its internal name, else `Okta application` with its id. +- **Text:** The label, then `App`, `Status`, `Sign-On Mode`, `Assigned Users` and `Created` lines. Assigned groups are not written into the text. The title is searchable too. +- **Date:** When the application was last updated in Okta, else when it was created. +- **Link back:** None. + + +The internal app name, written as the `App` line. It is the title when the application has no label. + + + +The application state and its sign-on mode, such as `SAML_2_0`. + + + +Up to 200 distinct assigned user names, with a count of the rest. Each assigned user is linked to the application. + + + +Each group assigned to the application is linked to it. Not searchable. + + + +When the application was created, written as the `Created` line. The result date when the application has no last-updated time. + + + +When the application was last updated in Okta. Not searchable. + + + +The Okta application id. Picks out one application. Not searchable. + + + + + +How many users and groups are assigned to the application. + + + + +### System Log events + +- **One document:** One System Log event. +- **Title:** The event's display message, else its event type, else `Okta event` with its id. +- **Text:** The message, then `Event Type`, `Outcome`, `Actor`, `Severity` and `Published` lines. The title is searchable too. +- **Date:** When the event was published. +- **Link back:** None. + + +The event type, written as the `Event Type` line. It is the title when the event has no display message. + + + +The result with its reason, and the severity. + + + +Who performed the action, by display name, else alternate id, else id, written as the `Actor` line. The event is linked to that person's user record. + + + +The users, applications and groups the event acted on. The event is linked to each of their records. Not searchable. + + + +When the event happened, written as the `Published` line. + + + +The event's Okta id. Picks out one event. Not searchable. + + +**Example searches** + +- Which members are listed for the Engineering-Admins group? +- Which recorded sign-in events failed yesterday? +- Who is linked as this user's manager? + +## How it fits into the graph + +- Users use the Record class. +- Groups use the Record class. +- Applications use the Record class. +- System Log events use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Okta creates** + +- A user to their manager. +- A group to each of its members. +- A group that comes from an application to that application. +- An application to each assigned user and group. +- A System Log event to the user who performed it, and to each user, application or group it acted on. +- A link is made only when its target was synced by this connector. Each item has at most 200 links. +- No links to items in other tools. + +**People and groups** + +- Each user, identified by primary email. +- Groups and applications are linked records, not people. +- Managers, members, assignees and event actors are linked to user records, not added as separate people. + +**Found in the text** + +The text of users, groups, applications and events, including department, organization and location. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Policies, authorization servers, network zones and admin role assignments. +- Custom profile attributes outside the fields listed above. +- System Log events older than the sync window. +- Member and assignee names beyond 200 per group or application, and links beyond 200 per item. +- Group memberships and application assignments as their own documents. They are shown on the group or application. +- Deletions: users, groups and applications deleted in Okta stay in HydraDB, and a removed MFA factor can stay listed on the user. diff --git a/essentials/v2/connectors/outlook.mdx b/essentials/v2/connectors/outlook.mdx new file mode 100644 index 00000000..f449956d --- /dev/null +++ b/essentials/v2/connectors/outlook.mdx @@ -0,0 +1,249 @@ +--- +title: "Outlook" +description: "Sync emails from the Microsoft 365 mailboxes you choose, one document per email in each mailbox. Each email is restricted to its mailbox owner when Enforce ACL is on and the owner's address can be read." +icon: "/images/connectors/outlook.svg" +--- + +Sync emails from the Microsoft 365 mailboxes you select. Each email in each mailbox is one document, so a message received by two selected mailboxes is two documents. An email is grouped with the rest of its conversation in that mailbox. Text from supported images and PDF and DOCX attachments is searchable when HydraDB can download and read the files. + +With Enforce ACL on, an email can be read only by the owner of the mailbox it came from. Recipients do not get access through someone else's mailbox. `Mail.Read` gives the app every mailbox in your tenant unless you limit it in Exchange. Drafts, Junk Email, Deleted Items and a few other folders are not synced, and permanently deleted mail stays in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Outlook permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** Each email can be read only by the owner of the mailbox it was synced from. Recipients appear in the text and the graph, but get no access through another person's copy. To let a recipient find an email, select their mailbox too: their copy carries their own access. +- **How a person is identified:** The mailbox address, in lower case. +- **When permissions cannot be read:** If HydraDB cannot resolve a mailbox owner's address, the email is marked with a permission warning, which you can find with `additional_metadata.rbac_warning`. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Shared and delegated mailbox access is not reflected. Only the mailbox's own address can read its emails. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Outlook uses a Microsoft Entra ID app registration with application permissions and a client secret. The same app can also back a Microsoft Teams connector. + + +The Directory (tenant) ID. + + + +The Application (client) ID. + + + +The client secret's Value. + + +The form also shows `include_private_channels`. It is a Microsoft Teams setting and has no effect on mail. + +**Microsoft Graph application permissions to grant** + +- `User.ReadBasic.All`: lists mailboxes for you to select, and resolves senders and recipients to names and addresses. +- `Mail.Read`: reads the mail of the selected mailboxes. + +`Mail.Read` grants the app every mailbox in the tenant. To limit it to the mailboxes you select, create an Exchange application access policy with `New-ApplicationAccessPolicy`, naming the app id and a group, with `RestrictAccess`. A selected mailbox outside the policy fails its sync with a message that names the policy. + +### Set it up + + + + In Microsoft Entra ID, register an app and create a client secret. Copy the tenant id, the client id and the secret's Value. + + + Add the Microsoft Graph application permissions above, not delegated ones, and grant admin consent. + + + Optional. Create an Exchange application access policy so the app can read only the mailboxes you plan to select. + + + Enter `tenant`, `client_id` and `client_secret`. + + + HydraDB lists the tenant's users as mailboxes. Select the mailboxes to sync. + + + Rotate the client secret before it expires. + + + +One connector reads the mailboxes you select in one Microsoft 365 tenant. + + + +Use provider `outlook` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected mailbox reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the mail in each selected mailbox whose last-modified time moved since the last sync. +- **Edits:** An email moved to another folder or recategorised is read again and replaces its document. +- **Deletions:** Mail moved to Deleted Items or Junk Email is replaced by a hidden stub only when it was received at or before the start of the time window that sync reads. With Enforce ACL on, nobody can read the stub. Other deleted mail, and mail deleted permanently, stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Emails + +- **One document:** One email in one mailbox. A message received by two selected mailboxes is two documents. Drafts are skipped. +- **Title:** The subject, or `Email` and the Message-ID when there is no subject. +- **Text:** The subject, the sender, the To and CC lines and the sent time, then the email's text with HTML stripped. When there is no text body, the preview is used, else the title. Bcc recipients are not in the text. +- **Date:** When the email was received, else when it was sent, else when it was created. +- **Link back:** The message's Outlook web link. +- **Files:** Text from images, including inline images, and from PDF and DOCX attachments is searchable separately when HydraDB can download and read the files. Other attachments keep only their names. + + +The sender as `Name
`, written as the From line. The graph records the email as sent by that person. + + + +The To recipients, written as the To line. The graph records each as a recipient. + + + +The CC recipients, written as the CC line. The graph records each as copied. + + + +The Bcc recipients, present only on mail in the sender's own mailbox. The graph records each as a Bcc recipient. Not searchable. + + + +When the email was sent, written as the Date line. The result date when the received time is missing. + + + +When the email was received. Not searchable. + + + +When the email was created. The result date only when the received and sent times are both missing. Not searchable. + + + +The Outlook conversation id. Returns every email of one conversation, and groups the conversation's emails in the graph. Not searchable. + + + +The address of the mailbox the email was synced from. Limits a query to one person's mail. Not searchable. + + + +The Microsoft 365 user id of that mailbox. Not searchable. + + + +The mail folder's id. Limits a query to one folder. Not searchable. + + + +The mail folder's name. Limits a query to one folder by name. Not searchable. + + + +Always `mail_folder`. Not searchable. + + + +The well-known folder name, such as `inbox`, `sentitems` or `archive`. Not searchable. + + + +`true` for mail in Sent Items. Keeps only mail the mailbox owner wrote. Not searchable. + + + +The email's Outlook categories. Not searchable. + + + +`true` when the email has a non-inline attachment. Not searchable. + + + +Present when the mailbox owner's address could not be resolved. Finds such mail. Not searchable. + + + +`true` on the hidden stub that replaces deleted or junked mail. Not searchable. + + + +Limits a query to this connector's emails. Not searchable. + + + +Always `outlook`. Not searchable. + + + +The address of the mailbox the email was synced from. Its owner is the only reader. Not searchable. + + + + + +The same value as `from`. + + + +The Reply-To addresses. + + + +The internet Message-ID, the same on every mailbox's copy of the email. + + + +The names of non-inline attachments. Text read from supported files is searchable separately, not through this list. + + + +`high` or `low`, when the email's importance is not normal. + + + +When the email was last modified. A change to it makes the next sync read the email again. + + + + +**Example searches** + +- What did Acme's procurement team email us about the renewal terms? +- What is the latest message in the Q3 audit conversation? +- Who was copied on the offer letter email to Jordan? + +## How it fits into the graph + +- Emails use the Email class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Outlook creates** + +- Every email to its conversation in its mailbox, so the conversation's emails are kept together in time order. +- No links to other tools. Copies of one email in two mailboxes stay separate documents. + +**People and groups** + +- The sender. +- The To, CC and Bcc recipients. +- Reply-To addresses are not attached as people. + +**Found in the text** + +The email text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Mailboxes you did not select. +- Drafts, Outbox, Junk Email, Deleted Items, Conversation History and Clutter, and their subfolders. +- Attachment types other than images, PDF and DOCX. Item and reference attachments are not downloaded. +- Calendar items and contacts. +- Permanent deletions: purged mail stays in HydraDB. diff --git a/essentials/v2/connectors/pagerduty.mdx b/essentials/v2/connectors/pagerduty.mdx new file mode 100644 index 00000000..91cb2d00 --- /dev/null +++ b/essentials/v2/connectors/pagerduty.mdx @@ -0,0 +1,262 @@ +--- +title: "PagerDuty" +description: "Sync incidents from the PagerDuty services you choose, with their alerts, notes and timelines, plus the account's schedules and escalation policies." +icon: "/images/connectors/pagerduty.svg" +--- + +Sync incidents from the PagerDuty services you select, plus every schedule and escalation policy in the account. Each incident, schedule and escalation policy is one document. An incident carries its alert summaries, timeline and, by default, its notes and status updates. + +Incidents follow who can read their service, and schedules and policies follow their owning teams, only when Enforce ACL is on. Schedules keep rotation layers but no dated shifts or overrides, so they cannot tell you who is on call at a given time. Incidents deleted in PagerDuty stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow PagerDuty permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** An incident follows the readers of the service it belongs to. A schedule or escalation policy has its own readers, worked out from its owning teams and each user's role. Account owners and admins can read everything. If an owning team is public, every user can read the item. Otherwise users with a full role read their own teams' items, and managers, responders, observers and full stakeholders also read items that belong to no team. Limited stakeholders get no access to private or teamless items. +- **How a person is identified:** A user's email address. Teams are not used as groups. +- **When permissions cannot be read:** If HydraDB cannot work out who can read a service, schedule or escalation policy, the connector reports a permission warning. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- An item with no readers, a reader without an email, or more than 1,000 readers cannot be captured. The same applies when a user's role is one HydraDB does not recognise and no owning team is public. +- A team with no default role recorded is treated as members only. +- Roles given on single objects to restricted-access users are not read, so those users cannot see the item. +- Schedule and policy readers are checked again on every sync. If the list cannot be read, nothing is changed and the next sync tries again. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +PagerDuty uses a read-only REST API key created at the account level, plus the email of a user in that account. + + +A read-only REST API key created at the account level. A user-scoped key cannot list services, so there is nothing to select. + + + +The email of a user in the PagerDuty account the key belongs to. + + +**Connector settings** + + +On by default. When on, incident notes and status updates are synced with each incident. + + + +An earliest incident date. Normal syncs do not use it. They use the history window instead. + + +### Set it up + + + + In PagerDuty, open Integrations, API Access Keys, Create New API Key, and tick Read-only. Create it at the account level, not for a single user. + + + Paste the key as `token` and the email of a user in that account as `email`. + + + HydraDB lists the services the key can see. Select the services whose incidents to sync. Schedules and escalation policies are read for the whole account, whichever services you select. + + + +One connector reads one PagerDuty account. + + + +Use provider `pagerduty` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Incidents of each selected service reach back the window set by `lookback_days`, 30 days by default, measured by their last status change. Schedules and escalation policies are read in full. +- **New and changed items:** Each sync reads incidents whose last status change is newer than the last sync, including older incidents that changed. Schedules and escalation policies are read in full on every sync. +- **Edits:** An incident is read again when its status changes. A new note or other edit without a status change may not be picked up. +- **Deletions:** Incidents, schedules and policies deleted in PagerDuty stay searchable in HydraDB. With Enforce ACL on, a schedule or policy that no longer exists can be hidden from search, but its content is not deleted. +- Schedules and escalation policies are skipped if your PagerDuty plan or the key's permissions refuse them. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every PagerDuty item + + +Limits a query to this connector's items. Not searchable. + + + +Always `pagerduty`. Not searchable. + + +### Incidents + +- **One document:** One incident, with its alerts, notes, status updates and timeline. +- **Title:** The incident title, else its summary, else `PagerDuty incident` with its id. +- **Text:** `Status`, `Urgency`, `Priority`, `Service`, `Assigned To` and `Escalation Policy` lines. Then each alert's summary with its severity and context, the notes and status updates with their authors when `fetch_incident_prose` is on, and a timeline of log entry summaries and trigger descriptions in time order. Empty entries and most other alert details are left out. The title and the incident id are searchable too. +- **Date:** The last status change, else when the incident was created. +- **Link back:** The incident page in PagerDuty. + + +PagerDuty's incident id. Keeps later syncs on the same document, and a search can match it. + + + +`triggered`, `acknowledged` or `resolved`, written as the `Status` line. + + + +`high` or `low`, written as the `Urgency` line. + + + +The incident's service, written as the `Service` line. + + + +When the incident was created. The result date when there is no last status change. + + + +The last status change. Not searchable. + + + +Links the incident to its escalation policy and, when it was resolved by merging, to the incident it was merged into. Not searchable. + + + +The service id. Limits a query to one service. Not searchable. + + + +The service name. Limits a query to one service by name. Not searchable. + + + +The owning teams' ids, from the incident or else its service. Limits a query to one team. Not searchable. + + + +The owning teams' names. Limits a query to one team by name. Not searchable. + + + +The selected service. Its readers decide who can read the incident. Not searchable. + + + + + +The account-wide incident number. + + + + +### Schedules + +- **One document:** One on-call schedule. Rotation layers are included only when PagerDuty returns them with the schedule. +- **Title:** The schedule name, else its summary, else a generated title with its id. +- **Text:** The name, `Description` and `Time Zone` lines, one `Layer` line per rotation layer with its turn length and the people on it, and a `Used By` line with the escalation policies that use it. The title is searchable too. +- **Date:** None. +- **Link back:** The schedule page in PagerDuty. + + +The people named in the rotation layers, once each. Empty when no layers are returned. + + + +The schedule id. Picks out one schedule. Not searchable. + + + +The owning teams' ids. Limits a query to one team's schedules. The teams also decide who can read the schedule. Not searchable. + + + +The owning teams' names. Limits a query to one team by name. Not searchable. + + + + + +The schedule id. + + + + +### Escalation policies + +- **One document:** One escalation policy. +- **Title:** The policy name, else its summary, else a generated title with its id. +- **Text:** The name and `Description`, one `Level` line per escalation level with its delay and targets, and a `Services` line with the services it is attached to. The title is searchable too. +- **Date:** None. +- **Link back:** The policy page in PagerDuty. + + +Links the policy to each schedule it pages. Not searchable. + + + +The policy id. Picks out one policy. Not searchable. + + + +The owning teams' ids. Limits a query to one team's policies. The teams also decide who can read the policy. Not searchable. + + + +The owning teams' names. Limits a query to one team by name. Not searchable. + + + + + +The policy id. + + + +How many times the policy repeats. + + + + +**Example searches** + +- Who gets paged after the primary on-call for the checkout escalation policy? +- What happened during last night's database incident and what did responders note? +- Which high-urgency incidents hit the API service recently? + +## How it fits into the graph + +- Incidents use the Ticket class. +- Schedules use the Record class. +- Escalation policies use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections PagerDuty creates** + +- An incident to its escalation policy. +- An incident to the incident it was merged into. +- An escalation policy to each schedule it pages. +- No links to items in other tools. + +**People and groups** + +No one is attached as a person in the graph. Assignees, note authors and rotation members appear only in the text. + +**Found in the text** + +Incident text, including alert summaries, notes and status updates, and schedule and policy text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Incidents of services you did not select. +- Incident notes and status updates when `fetch_incident_prose` is off. +- Dated on-call shifts, schedule overrides and rotation start times. +- Schedule members when PagerDuty returns no rotation layers. +- Services, teams and users as their own documents. +- Alert and notification records on their own. Only alerts inside an incident are searchable. +- Analytics, postmortems, response plays and on-call shift history. diff --git a/essentials/v2/connectors/pardot.mdx b/essentials/v2/connectors/pardot.mdx new file mode 100644 index 00000000..201d9089 --- /dev/null +++ b/essentials/v2/connectors/pardot.mdx @@ -0,0 +1,226 @@ +--- +title: "Pardot" +description: "Sync prospects, prospect accounts and opportunities from one Pardot business unit, one document per record." +icon: "/images/connectors/pardot-light.svg" +--- + +Sync prospects, prospect accounts and opportunities from one Pardot business unit. Each prospect is one document with their contact details, company, score, grade and notes. Each account and each opportunity is one document too. + +Pardot permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. That includes prospect emails, phone numbers and notes. Stage or status changes on opportunities created before the sync window are not picked up. Records deleted in Pardot stay in HydraDB. + + +Pardot is in beta. + + +## Permissions + + +Pardot permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Pardot uses a Salesforce connected app's client id and client secret with a refresh token, together with the Pardot business unit id. + + +The Salesforce connected app's client id. + + + +The Salesforce connected app's client secret. + + + +A Salesforce OAuth refresh token issued through that app. HydraDB exchanges it for an access token at `login.salesforce.com`. + + + +The Pardot business unit id. + + +### Set it up + + + + Get the client id and client secret of a Salesforce connected app, and issue a refresh token through it. Note your Pardot business unit id. + + + Paste the values as `client_id`, `client_secret`, `refresh_token` and `pardot_business_unit_id`. + + + HydraDB lists one `All data` resource for the business unit. Select it. Individual record types cannot be selected separately. + + + +One connector reads one Pardot business unit. + + + +Use provider `pardot` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads prospects and prospect accounts updated in its window. Opportunities are read by when they were created, so only opportunities created in the window are read. +- **Edits:** An updated prospect or account replaces its document. A stage or status change on an opportunity created before the window is not picked up. +- **Deletions:** Deleted records are not removed. A prospect, account or opportunity deleted in Pardot stays searchable in HydraDB. +- When more than 200 prospects or accounts share the same update time, as after a bulk update, some of them can be skipped. +- If Pardot refuses access to one record type, that type is skipped and the others still sync. A completed sync does not mean all three types were read. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Pardot item + + +The Pardot id of the record. Targets one record. Not searchable. + + + +The record type: `prospects`, `prospect_accounts` or `opportunities`. Limits a query to one type. Not searchable. + + + +Limits a query to this connector's records. Not searchable. + + + +Always `pardot`. Not searchable. + + + + + +The record type, shown when you inspect the item. To limit a query by type, use `additional_metadata.pardot_object`. + + + + +### Prospects + +- **One document:** One prospect. +- **Title:** The prospect's first and last name, else their email, else `Pardot prospects `. +- **Text:** The title, then `Salutation`, `Email`, `Phone`, `Company`, `Job Title`, `Department`, `Industry`, `Website`, `Location`, `Territory`, `Source`, `Score` and `Grade` lines. `Location` joins city, state and country. Then the prospect's notes, or their comments when there are no notes. +- **Date:** When the prospect was last updated, or created if there is no update time. +- **Link back:** The prospect's record in Salesforce. +- **Files:** None. + + +The prospect's email, written as the `Email` line. It identifies the prospect as a person in the graph. + + + +The prospect's name, written as the title and first line. + + + +Contact, company and scoring details, one labelled line each, with city, state and country joined in the `Location` line. + + + +`Salutation` and `Department` lines, and the free-text notes at the end of the text. Notes are used before comments. + + + +When the prospect was created and last updated. The update time, else the creation time, sets the result date. Not searchable. + + + + + +The id of the prospect account the prospect belongs to. It does not link the prospect to the account and cannot be used as a filter. + + + + +### Prospect accounts + +- **One document:** One prospect account. +- **Title:** The account name, or `Pardot prospect_accounts ` when there is none. +- **Text:** The title, then `Assignee`, `Created` and `Updated` lines. +- **Date:** When the account was last updated, or created if there is no update time. +- **Link back:** None. +- **Files:** None. + + +The account name, written as the title and first line. + + + +The full name, else the email, of the Pardot user assigned to the account, written as the `Assignee` line. The assignee is not attached as a person in the graph. + + + +When the account was created and last updated, written as the `Created` and `Updated` lines. The update time, else the creation time, sets the result date. + + +### Opportunities + +- **One document:** One opportunity. +- **Title:** The opportunity name, or `Pardot opportunities ` when there is none. +- **Text:** Details with the opportunity's id, `Status` and `Created`, then a description with the title and `Stage`, `Status`, `Type`, `Value`, `Probability` and `Closed` lines. +- **Date:** When the opportunity was last updated, or created if there is no update time. +- **Link back:** None. +- **Files:** None. + + +The opportunity's stage, type, value, probability and close date, one labelled line each. + + + +`open`, `won` or `lost`, shown in the details and in the description. + + + +The Pardot id, shown as the opportunity's key in the details. + + + +When the opportunity was created, shown as `Created` in the details. Sets the result date when there is no update time. + + + +When the opportunity was last updated. Sets the result date when present. Not searchable. + + +**Example searches** + +- What company, job title, score and grade does Pardot record for jane@acme.com? +- Which opportunities are in the Negotiation stage, and what are they worth? +- Who is assigned to the Acme Corp prospect account? + +## How it fits into the graph + +- Prospects use the Record class. +- Prospect accounts use the Record class. +- Opportunities use the Ticket class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Pardot creates** + +- None. A prospect is not linked to its account, and opportunities are not linked to prospects or campaigns. +- No links to other tools. + +**People and groups** + +- Each prospect, identified by their email. +- An account's assignee is part of the text only and is not attached as a person. + +**Found in the text** + +Prospect details and notes, account names and assignees, and opportunity details. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Visitors, visits, visitor activities, lists, list memberships, users, email clicks and campaigns. +- Custom prospect and account fields, and other prospect details such as address, annual revenue, employees and opt-out flags. +- Stage and status changes on opportunities created before the sync window. +- Deletions: records deleted in Pardot stay in HydraDB. diff --git a/essentials/v2/connectors/pipedrive.mdx b/essentials/v2/connectors/pipedrive.mdx new file mode 100644 index 00000000..1a3a3a83 --- /dev/null +++ b/essentials/v2/connectors/pipedrive.mdx @@ -0,0 +1,712 @@ +--- +title: "Pipedrive" +description: "Sync deals, leads, projects, tasks, persons, organizations, activities and notes from one Pipedrive account. Pipedrive visibility settings are not enforced." +icon: "/images/connectors/pipedrive-light.svg" +--- + +Sync a whole Pipedrive account: deals, leads, projects and project tasks, persons, organizations, activities such as calls and meetings, and notes. Each record is one document. Stage, pipeline, organization, person, activity type, product and lead label ids are turned into names. A note or activity links to every deal, person, organization and lead it is attached to. + +Pipedrive's visibility setting is kept as a filter but does not restrict who can read an item, so every synced item is visible to everyone who can query the collection unless you set an access rule. Records deleted in Pipedrive stay in HydraDB. Pipedrive mail, files and call logs are not synced. + + +Pipedrive is in beta. + + +## Permissions + + +Pipedrive permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Pipedrive's `visible_to` setting is stored as `additional_metadata.visible_to`. You can filter on it, but it does not decide who can read an item. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Pipedrive uses a personal API token. + + +A Pipedrive personal API token. The connector reads every record this token can see. + + +### Set it up + + + + In Pipedrive, copy the personal API token of a user who can see the records you want in HydraDB. + + + Paste the token as `api_token`. + + + Pipelines are offered for selection, but selecting them does not narrow the sync. The connector syncs every record the token can read in the account. + + + +One connector reads one Pipedrive account. + + + +Use provider `pipedrive` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads records whose update time moved past the last sync. A deal's line items are read again whenever the deal changes. +- **Edits:** An edited record is read again and updates its document. +- **Deletions:** Deleted records are not removed. They stay searchable in HydraDB. A record Pipedrive marks as deleted is flagged, so you can leave it out with `additional_metadata.is_deleted`, or `additional_metadata.active_flag` for notes. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Pipedrive item + + +The Pipedrive record id. Ids can repeat across record types, so combine it with `additional_metadata.pipedrive_object` to target one record. Not searchable. + + + +The record type, such as `deals`, `persons` or `notes`. Limits a query to one type. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `pipedrive`. Not searchable. + + +### Deals + +- **One document:** One deal. +- **Title:** The deal title. +- **Text:** The deal title, then `Value` with its currency, `Status`, `Lost reason`, `Stage`, `Pipeline`, `Organization`, `Contact`, `Expected close` and `Owner` lines. Then a `Products` block listing each line item with its quantity, price, currency and comments. The deal's key and creation time are part of the text too. +- **Date:** When the deal was last modified, else when it was created. +- **Link back:** None. + + +The deal amount, written as the `Value` line with `currency`. + + + +The deal currency, written with the value. + + + +The deal outcome, written as the `Status` line. + + + +Why a lost deal was lost, written as the `Lost reason` line. + + + +The stage name, written as the `Stage` line. When the name cannot be found, the stage id is written instead. + + + +The pipeline name, written as the `Pipeline` line. When the name cannot be found, the pipeline id is written instead. + + + +The organization name, written as the `Organization` line. + + + +The contact person's name, written as the `Contact` line. + + + +Links the deal to its organization. Written into the text only when the organization's name cannot be found. + + + +Links the deal to its contact person. Written into the text only when the person's name cannot be found. + + + +The product names of the deal's line items, written in the `Products` block, so a query can find the deals that include a product. + + + +The owner's name or email, written as the `Owner` line, where HydraDB can identify the person. + + + +The expected closing date, written as the `Expected close` line. Limits a query to a range of closing dates. + + + +Set when Pipedrive marks the deal as deleted. Leaves deleted deals out of a query. Not searchable. + + + +Set when the deal is archived. Leaves archived deals out of a query. Not searchable. + + + +Pipedrive's visibility level for the deal. Filters on that value. It does not decide who can read the deal. Not searchable. + + + +The record type and Pipedrive id together, written into the text as the deal's key. Keeps later syncs on the same document. + + + +When the deal was created, written as a `Created` line. Used as the result date only when the modification time is missing. + + + +When the deal was last modified. Not searchable. + + + + + +When the deal was won. + + + +When the deal was lost. + + + +The win probability. + + + +Monthly recurring revenue. + + + +Annual recurring revenue. + + + +Annual contract value. + + + +The deal's label ids. They are not turned into names. + + + +The record type. Filter on it with `additional_metadata.pipedrive_object`. + + + + +### Leads + +- **One document:** One lead. +- **Title:** The lead title. +- **Text:** The lead title, then `Value`, `Labels`, `Source`, `Organization`, `Contact`, `Expected close` and `Owner` lines. The lead's key and creation time are part of the text too. When none of a lead's label names can be found, the lead's other filled-in fields are written into the text as a list instead. +- **Date:** When the lead was last modified, else when it was created. +- **Link back:** None. + + +The lead amount, written as the `Value` line with `currency`. + + + +The lead currency, written with the value. + + + +The lead's label names, written as the `Labels` line. + + + +Where the lead came from, written as the `Source` line. + + + +The organization name, written as the `Organization` line. + + + +The contact person's name, written as the `Contact` line. + + + +Links the lead to its organization. Written into the text only when the organization's name is missing or the lead is written as a list. + + + +Links the lead to its contact person. Written into the text only when the person's name is missing or the lead is written as a list. + + + +The lead's label ids. Written into the text only when the lead is written as a list. + + + +The owner's name or email, written as the `Owner` line, where HydraDB can identify the person. + + + +The expected closing date, written as the `Expected close` line. Limits a query to a range of closing dates. + + + +Set when the lead is archived. Leaves archived leads out of a query. Not searchable. + + + +Pipedrive's visibility level for the lead. Filters on that value. It does not decide who can read the lead. Not searchable. + + + +The record type and Pipedrive id together, written into the text as the lead's key. Keeps later syncs on the same document. + + + +When the lead was created, written as a `Created` line. Used as the result date only when the modification time is missing. + + + +When the lead was last modified. Written into the text only when the lead is written as a list. + + + +The record type. Written into the text only when the lead is written as a list. Filter on it with `additional_metadata.pipedrive_object`. + + +### Projects + +- **One document:** One project. +- **Title:** The project title. +- **Text:** The project description. The title, the project's key and its creation time are searchable too. The status, health, dates and owner are not part of the text. Filter on status and health, or follow the project's links, instead. +- **Date:** When the project was last modified, else when it was created. +- **Link back:** None. + + +The project description. + + + +Links the project to each linked deal. Not searchable. + + + +Links the project to each linked organization. Not searchable. + + + +Links the project to each linked person. Not searchable. + + + +The project status. Limits a query to open, completed, canceled or deleted projects. Not searchable. + + + +The project health. Limits a query to projects that are at risk or off track. Not searchable. + + + +The record type and Pipedrive id together, written into the text as the project's key. Keeps later syncs on the same document. + + + +When the project was created, written as a `Created` line. Used as the result date only when the modification time is missing. + + + +When the project was last modified. Not searchable. + + + + + +A summary with the project's status, health, start, end and owner. It is not part of the searchable text. + + + +When the project starts. + + + +When the project ends. + + + +The owner's name or email. + + + +The project's label ids. + + + +The record type. Filter on it with `additional_metadata.pipedrive_object`. + + + + +### Tasks + +- **One document:** One project task. +- **Title:** The task title. +- **Text:** The task description. The title, the task's key and its creation time are searchable too. The project name, assignees and dates are not part of the text. Filter on completion, milestone and priority, or follow the task's links, instead. +- **Date:** When the task was last modified, else when it was created. +- **Link back:** None. + + +The task description. + + + +Links the task to its project. Not searchable. + + + +Links the task to its parent task. Not searchable. + + + +Whether the task is done. Limits a query to unfinished tasks. Not searchable. + + + +Whether the task is a milestone. Limits a query to project milestones. Not searchable. + + + +The task priority. Limits a query to one priority. Not searchable. + + + +The record type and Pipedrive id together, written into the text as the task's key. Keeps later syncs on the same document. + + + +When the task was created, written as a `Created` line. Used as the result date only when the modification time is missing. + + + +When the task was last modified. Not searchable. + + + + + +A summary with the task's project, assignees, start, due and completion dates. It is not part of the searchable text. + + + +The project's title. + + + +The names of the assigned users. They are not linked to the task as people. + + + +When the task starts. + + + +When the task is due. + + + +When the task was completed. + + + +The record type. Filter on it with `additional_metadata.pipedrive_object`. + + + + +### Persons + +- **One document:** One person. +- **Title:** The person's name. +- **Text:** `Name`, `Emails`, `Phones`, `Organization` and `Owner` lines. +- **Date:** When the person was last modified, else when they were created. +- **Link back:** None. + + +The person's email addresses, written as the `Emails` line. + + + +The person's phone numbers, written as the `Phones` line. + + + +The organization name, written as the `Organization` line. + + + +Links the person to their organization. Written into the text only when the organization's name cannot be found. + + + +The owner's name or email, written as the `Owner` line, where HydraDB can identify the person. + + + +Set when Pipedrive marks the person as deleted. Leaves deleted persons out of a query. Not searchable. + + + +Pipedrive's visibility level for the person. Filters on that value. It does not decide who can read the person. Not searchable. + + + +When the person was last modified. Not searchable. + + + +When the person was created. Used as the result date only when the modification time is missing. Not searchable. + + + + + +The person's label ids. + + + +The record type. Filter on it with `additional_metadata.pipedrive_object`. + + + + +### Organizations + +- **One document:** One organization. +- **Title:** The organization's name. +- **Text:** `Name`, `Address` and `Owner` lines. +- **Date:** When the organization was last modified, else when it was created. +- **Link back:** None. + + +The formatted address, written as the `Address` line. + + + +The owner's name or email, written as the `Owner` line, where HydraDB can identify the person. + + + +Set when Pipedrive marks the organization as deleted. Leaves deleted organizations out of a query. Not searchable. + + + +Pipedrive's visibility level for the organization. Filters on that value. It does not decide who can read the organization. Not searchable. + + + +When the organization was last modified. Not searchable. + + + +When the organization was created. Used as the result date only when the modification time is missing. Not searchable. + + + + + +The organization's label ids. + + + +The record type. Filter on it with `additional_metadata.pipedrive_object`. + + + + +### Activities + +- **One document:** One activity, such as a call, meeting, task or logged email. +- **Title:** The activity subject. +- **Text:** The subject, then `Type`, `Due`, `Duration`, `Location` and `Owner` lines, then the activity note converted from HTML to text, and its public description. +- **Date:** When the activity was last modified, else when it was created. +- **Link back:** None. + + +The activity type's name, written as the `Type` line. When the name cannot be found, the type key is written instead. + + + +The activity note, converted from HTML to text. + + + +The activity's public description. + + + +The due date, written in the `Due` line. + + + +The due time, written in the `Due` line. + + + +The scheduled duration, written as the `Duration` line. + + + +Where the activity takes place, written as the `Location` line. + + + +The owner's name or email, written as the `Owner` line, where HydraDB can identify the person. + + + +Links the activity to its deal. Not searchable. + + + +Links the activity to its lead. Not searchable. + + + +Links the activity to its contact person. Not searchable. + + + +Links the activity to its organization. Not searchable. + + + +Links the activity to each person who took part. Not searchable. + + + +Set when Pipedrive marks the activity as deleted. Leaves deleted activities out of a query. Not searchable. + + + +When the activity was last modified. Not searchable. + + + +When the activity was created. Used as the result date only when the modification time is missing. Not searchable. + + + + + +The activity type key. Its name is in `activity_type`. + + + +Whether the activity is marked as done. + + + +When the activity was marked as done. + + + + +### Notes + +- **One document:** One note that has content. Empty notes are skipped. +- **Title:** `Comment by` and the author's name. Without an author, the first 80 characters of the text. +- **Text:** The note content converted from HTML to text, with the author, the first record it is attached to, and its created and updated times. +- **Date:** When the note was last modified, else when it was created. +- **Link back:** None. + + +The note's author. The graph records the note as written by that person. + + + +The first deal, person or organization the note is attached to, written as a `Parent` line. Links the note to that record. + + + +Links the note to the lead it is attached to. Not searchable. + + + +The id of the first deal, person or organization the note is attached to. Finds the notes on that record. It does not cover a note's other records, or notes attached only to a lead. Not searchable. + + + +False when Pipedrive marks the note as deleted. Leaves deleted notes out of a query. Not searchable. + + + +When the note was last modified, written as an `Updated` line. + + + +When the note was created, written as a `Created` line. Used as the result date only when the modification time is missing. + + + + + +The type of the first record the note is attached to. + + + +The title of the first record the note is attached to. + + + + +**Example searches** + +- Which deals for Acme are open and at what stage? +- What was discussed in the last call with this person? +- Which deals include the Enterprise plan product? + +## How it fits into the graph + +- Deals use the Ticket class. +- Leads use the Ticket class. +- Projects use the Ticket class. +- Tasks use the Ticket class. +- Persons use the Record class. +- Organizations use the Record class. +- Activities use the Record class. +- Notes use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Pipedrive creates** + +- A note or activity to every deal, person, organization and lead it is attached to. +- An activity to each person who took part. +- A deal or lead to its organization and contact person. +- A person to their organization. +- A project to every linked deal, organization and person. +- A task to its project and its parent task. +- No links to other tools. + +**People and groups** + +- The author of each note. +- Owners of deals, leads, persons, organizations and activities appear in the text, where HydraDB can identify them. +- Project owners and task assignees are kept with the item but not attached to it as people. + +**Found in the text** + +Notes, activity notes, deal titles, and project and task descriptions, along with the rest of each record's text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Pipedrive mail messages and mail threads. +- Files, call logs and deal stage-change history. +- Deal participants and followers. +- Custom field values. +- Project boards and phases, task audit users and lead marketing attribution. +- Records removed from Pipedrive entirely: they stay in HydraDB. diff --git a/essentials/v2/connectors/posthog.mdx b/essentials/v2/connectors/posthog.mdx new file mode 100644 index 00000000..bee2d5b2 --- /dev/null +++ b/essentials/v2/connectors/posthog.mdx @@ -0,0 +1,292 @@ +--- +title: "PostHog" +description: "Sync people, cohorts, feature flags and annotations from the PostHog projects you select. Events are not synced." +icon: "/images/connectors/posthog.svg" +--- + +Sync people, cohorts, feature flags and annotations from the PostHog projects you select. Each person is one contact document built from their PostHog properties. Cohorts, feature flags and annotations are one document each, naming their creator. + +PostHog permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Events, such as pageviews and custom events, are not synced. People deleted in PostHog stay in HydraDB, and feature flags and annotations that PostHog marks deleted stay searchable. + + +PostHog is in beta. + + +## Permissions + + +PostHog permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +PostHog uses a personal API key. + + +A PostHog personal API key. + + + +A PostHog project id. It is used when you select no projects. The projects you select take its place. + + +### Set it up + + + + In PostHog, create a personal API key. + + + Paste the key as `api_key` and a project id as `project_id`. + + + HydraDB lists the projects of the organization the key belongs to, from `https://app.posthog.com`. The connection form has no setting for another PostHog address. Select the projects to sync. Each one syncs separately. + + + If you select more than one project, send each to its own collection. Records of the same type with the same id in two projects can replace each other when they land in the same collection. + + + +One connector reads projects from one PostHog organization, the one the API key belongs to. + + + +Use provider `posthog` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** People are read in full, whatever the window. Cohorts, feature flags and annotations reach back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Every sync reads all people in each selected project again, which is slow for projects with many people. A cohort is picked up again when PostHog recalculates it. Feature flags and annotations are picked up again when they are updated. +- **Edits:** An edited item replaces its document. +- **Deletions:** Deleted people are not removed. A person deleted in PostHog stays searchable in HydraDB. Feature flags and annotations that PostHog marks deleted are still synced and searchable. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every PostHog item + + +The record type: `persons`, `cohorts`, `feature_flags` or `annotations`. Limits a query to one type, for example only people. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `posthog`. Not searchable. + + + + + +The record type, shown when you inspect the item. To limit a query by type, use `additional_metadata.posthog_stream`. + + + + +### People + +- **One document:** One person in a selected project. +- **Title:** `PostHog persons: `, using the person's name, else their first and last name, else their email. `PostHog persons` when there is none. +- **Text:** Contact details taken from the person's properties, described below. Then notes with a `Name` line, a `Distinct IDs` line, and every person property that has a single value, in alphabetical order as `property: value`. The title is searchable too. +- **Date:** When the person was created. +- **Link back:** None. +- **Files:** None. + + +The person's name and email, from their properties. The email comes from `email` or `$email`. They identify the person in the graph. + + + +The person's first distinct id. It is part of the contact details and identifies the person in the graph. + + + +Social handles, from `linkedin_url` or `linkedin`, and from `x_handle`, `twitter_handle` or `username`. The first one available identifies the person in the graph. + + + +Always `person`. It makes the contact a person in the graph. + + + +The contact owner's name and email, from the person's properties. The graph records the owner as a separate person. + + + +All of the person's distinct ids, written as the `Distinct IDs` line. Only the first one identifies the person in the graph. + + + +Job, company and lifecycle stage, from matching properties or from `title`, `company`, `company_id` and `stage`. + + + +Phone numbers from the `phones`, `phone` and `phone_number` properties. They do not identify the person in the graph. + + + +Labels, tags and a URL from the person's properties or record. The URL is part of the contact details and is not a link back. + + + +When the person was created. It is part of the contact details and sets the result date. + + + +When the person was last updated, when PostHog provides it. It does not set the result date. + + + + + +Every other field of the person record, kept for inspection only. + + + + +### Cohorts + +- **One document:** One saved cohort. +- **Title:** `PostHog cohorts: `. +- **Text:** `Name`, `Description` and `Count` lines, with the creator as the author. The title is searchable too. +- **Date:** When the cohort was created. +- **Link back:** None. +- **Files:** None. The list of members is not synced. + + +The creator's name, or their email when there is no name. It is written as the author, and the graph records the creator as the author. + + + +The creator's email, attached to the author in the graph. Not searchable. + + + +When the cohort was created. Not searchable. + + + + + +When PostHog last recalculated the cohort. A recalculation is what makes a sync pick the cohort up again. + + + +Every other field of the cohort record, kept for inspection only. + + + + +### Feature flags + +- **One document:** One flag, active or archived. +- **Title:** `PostHog feature_flags` followed by the feature flag name. When a feature flag has no name, its key is not used in its place. +- **Text:** `Name`, `Key`, `Active` and `Rollout percentage` lines, when present, with the creator as the author and the update time. The rollout percentage is the flag's top-level one. The title is searchable too. +- **Date:** When the flag was created. +- **Link back:** None. +- **Files:** None. + + +The creator's name, or their email when there is no name. It is written as the author, and the graph records the creator as the author. + + + +The creator's email, attached to the author in the graph. Not searchable. + + + +When the flag was last updated, when PostHog provides it. It does not set the result date. + + + +When the flag was created. Not searchable. + + + + + +Other fields of the flag, including its targeting rules under `filters` and PostHog's `deleted` marker. Kept for inspection only, so targeting rules are not searchable. + + + + +### Annotations + +- **One document:** One annotation. +- **Title:** `PostHog annotations` followed by the first 80 characters of the content, with an ellipsis when it is longer. Just `PostHog annotations` when the content is empty. +- **Text:** The annotation content, then `Insight`, `Scope` and `Date marker` lines, when present, with the creator as the author and the update time. The title is searchable too. +- **Date:** When the annotation was last updated, or when it was created if PostHog gives no update time. +- **Link back:** None. +- **Files:** None. + + +The creator's name, or their email when there is no name. It is written as the author, and the graph records the creator as the author. + + + +The creator's email, attached to the author in the graph. Not searchable. + + + +When the annotation was last updated. It is part of the text and sets the result date. + + + +When the annotation was created. Sets the result date only when there is no update time. Not searchable. + + + + + +Every other field of the annotation record, kept for inspection only. + + + + +**Example searches** + +- Which company and lifecycle stage does PostHog record for jane@acme.com? +- What are the key, active status and rollout percentage of the new-checkout flag? +- Which annotations were added around the March release? + +## How it fits into the graph + +- People use the Contact class. +- Cohorts use the Page class. +- Feature flags use the Page class. +- Annotations use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections PostHog creates** + +- None. People, cohorts, feature flags and annotations are not linked to each other. +- No links to other tools. + +**People and groups** + +- Each person, identified by their name, email, social handle and first distinct id. +- A person's owner, as a separate person. +- The creator of cohorts, feature flags and annotations, as their author. + +**Found in the text** + +The text of people, cohorts, feature flags and annotations. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Events, including pageviews, autocapture and custom events. +- Insights, dashboards, session recordings, experiments and surveys. +- Projects you did not select. +- Cohort members. A cohort carries its member count only. +- Targeting rules of feature flags, in the searchable text. +- Deletions: people deleted in PostHog stay in HydraDB. diff --git a/essentials/v2/connectors/quickbooks.mdx b/essentials/v2/connectors/quickbooks.mdx new file mode 100644 index 00000000..a0b0b0b0 --- /dev/null +++ b/essentials/v2/connectors/quickbooks.mdx @@ -0,0 +1,317 @@ +--- +title: "QuickBooks" +description: "Sync customers, invoices, payments, bills and attachments from one QuickBooks Online sandbox company. Invoices and payments link to their customer, and attached files are read so their text is searchable." +icon: "/images/connectors/quickbooks.svg" +--- + +Sync customers, invoices, payments, bills and attachments from one QuickBooks Online sandbox company. Each record is one document. Invoices and payments link to their customer. Each attachment is its own document, linked to the records it is attached to, and its file is read so its text is searchable. + +QuickBooks permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Every sync reads all records of each selected type again, which is slow for companies with many invoices. Records deleted in QuickBooks stay in HydraDB. Vendors, items and accounts are not their own documents. + + +QuickBooks connects to sandbox companies only. The connection form has no setting to reach a live QuickBooks company. + + + +QuickBooks is in beta. + + +## Permissions + + +QuickBooks permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Each record type you select is its own resource, so you can set an access rule on one type, such as Invoices, and not on the others. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + + +Connect a QuickBooks sandbox company. Connecting a live company is not supported by the connection form. + + +### Credentials + +QuickBooks uses the client id and client secret of an Intuit developer app, with a refresh token and the company id of the company you connect. + + +The client id of your Intuit developer app, from its Keys & credentials page. + + + +The client secret of the same app. + + + +An OAuth refresh token for the company. + + + +The QuickBooks company id that the refresh token belongs to. + + + +Leave it empty. HydraDB obtains access tokens itself. + + +Intuit replaces the refresh token from time to time. HydraDB stores each new refresh token itself. + +### Set it up + + + + In the Intuit developer portal, create an app and copy its client id and client secret. + + + Get a refresh token for the sandbox company you want to connect, and that company's id. The Intuit OAuth Playground is one place to get both. + + + Paste the values as `client_id`, `client_secret`, `refresh_token` and `realmId`. + + + HydraDB lists five record types: Customers, Invoices, Payments, Bills and Attachments. Select the ones to sync. Each selected type is synced on its own. + + + +One connector reads one QuickBooks Online sandbox company. + + + +Use provider `quickbooks` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads every record of each selected type, whatever its date. `lookback_days` does not narrow it. +- **New and changed items:** Every sync reads every record of each selected type again. +- **Edits:** A changed record replaces its document. +- **Deletions:** Deleted records are not removed. A record deleted in QuickBooks stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every QuickBooks item + + +When the record was last updated in QuickBooks. It is the result date, and it appears in the text. + + + +When the record was created in QuickBooks. It is the result date only when there is no update time. Searchable on customers. Not searchable on other record types. + + + +The record's QuickBooks Id, without its record type. Finds a record by its Id. Not searchable. + + + +Limits a query to this connector's records. Not searchable. + + + +Always `quickbooks`. Not searchable. + + + + + +The record type: `Customer`, `Invoice`, `Payment`, `Bill` or `Attachable`. + + + +Every other field QuickBooks returns for the record. Kept for inspection only. A query does not match them and cannot filter on them. + + + + +### Customers + +- **One document:** One customer, active or inactive. +- **Title:** The customer's display name. Otherwise the fully qualified name, the company name, or the first and last name. +- **Text:** Contact details: the display name, first and last name, email, phone numbers, website, whether the customer is a person or an organization, the company or parent customer name, and the created and updated times. Then the customer's QuickBooks notes, followed by `Name`, `Company`, `Email`, `Phone` and `Balance` lines. The title is searchable too. +- **Date:** When the customer was last updated, or created when there is no update time. +- **Link back:** None. +- **Files:** Files attached to a customer arrive as separate attachment documents linked to it. + + +The customer's display name. It forms the title and names the customer in the graph. + + + +The customer's given name. Helps form the person's name when there is no display name. + + + +The customer's family name. Helps form the person's name when there is no display name. + + + +The customer's primary email. Identifies a person customer in the graph. + + + +Organization when the customer has a company name, otherwise person. Decides whether the graph records the customer as a person or as an organization. + + + +The customer's QuickBooks Id, for person customers only. Empty for organizations. Identifies the person in the graph. + + + +The primary, mobile, alternate and fax numbers, each once. Phone numbers do not identify the customer in the graph. + + + +The customer's website. It is part of the text, not a link back to QuickBooks. + + + +The company name for an organization, or the parent customer's name for a person. + + + +For a person, the parent customer's id. Links the person to that parent customer. Empty for organizations. + + + + + +An empty list. Secondary email addresses are not kept. + + + + +### Invoices + +- **One document:** One invoice. +- **Title:** `Invoice - `. +- **Text:** The customer memo, then `Customer`, `Total`, `Balance`, `Invoice date`, `Due date`, `Line items` and `Note` lines, and the update time. The title is searchable too. +- **Date:** When the invoice was last updated, or created when there is no update time. +- **Link back:** None. +- **Files:** Files attached to an invoice arrive as separate attachment documents linked to it. + + +The customer the invoice belongs to. Its id links the invoice to the customer's document. Its name is in the title and the `Customer` line. The id itself is not searchable. + + + +The invoice number, in the title. + + + +Each line's description with its item or account name, written into the `Line items` line. Other line details are not searchable. + + +### Payments + +- **One document:** One customer payment. +- **Title:** `Payment - `. +- **Text:** The private note, then `Customer`, `Total`, `Payment date` and `Reference` lines, and the update time. The title is searchable too. +- **Date:** When the payment was last updated, or created when there is no update time. +- **Link back:** None. +- **Files:** Files attached to a payment arrive as separate attachment documents linked to it. + + +The customer who paid. Its id links the payment to the customer's document. Its name is in the title and the `Customer` line. The id itself is not searchable. + + + +The payment reference, in the title and the `Reference` line. + + +### Bills + +- **One document:** One vendor bill. +- **Title:** `Bill - `. +- **Text:** The private note, then `Vendor`, `Total`, `Balance`, `Bill date`, `Due date` and `Line items` lines, and the update time. The title is searchable too. +- **Date:** When the bill was last updated, or created when there is no update time. +- **Link back:** None. +- **Files:** Files attached to a bill arrive as separate attachment documents linked to it. + + +The vendor's name, in the title and the `Vendor` line. Vendors are not their own documents, so a bill is not linked to a vendor. + + + +The bill number, in the title. + + + +Each line's description with its item or account name, written into the `Line items` line. Other line details are not searchable. + + +### Attachments + +- **One document:** One attachment: a file or a note. +- **Title:** The file name. +- **Text:** When the file's text is read, that text is the document's text. Otherwise, the attachment note, then `File name`, `Content type` and `File size` lines. The title and the update time are searchable either way. +- **Date:** When the attachment was last updated, or created when there is no update time. +- **Link back:** None. +- **Files:** The file is downloaded and its text is read. A file larger than 50 MiB is not downloaded, and only its note and file details are searchable. + + +The text read from the file, such as a PDF attached to an invoice. + + + +The attachment note. Searchable only when the file's text was not read. Read file text takes its place. + + + +The file's media type and size. Searchable only when the file's text was not read. Otherwise kept for inspection. + + + +Every QuickBooks record the file is attached to. Links the attachment to each of those records. Not searchable. + + + +The first record the file is attached to. The graph places the attachment under that record. Not searchable, and not a query filter. + + +**Example searches** + +- What is the outstanding balance on invoices for Acme Corp? +- What does the contract PDF attached to invoice 1042 say? +- Which bills from Office Depot still have a balance? + +## How it fits into the graph + +- Customers use the Contact class. +- Invoices use the Page class. +- Payments use the Page class. +- Bills use the Page class. +- Attachments use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections QuickBooks creates** + +- An invoice to its customer. +- A payment to its customer. +- An attachment to every record it is attached to, and under the first of them. +- A person customer to its parent customer, when it has one. +- Bills are not linked to a vendor. +- No links to other tools. + +**People and groups** + +- Each customer: as a person, or as an organization when it has a company name. +- For a person customer with a parent customer, the parent as their organization. +- Vendors are not attached as people or organizations. They appear in bill text only. + +**Found in the text** + +Customer notes, invoice memos, payment and bill notes, line items and attachment text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Record types you did not select. +- Vendors, items, accounts, estimates, sales receipts, credit memos, journal entries and other QuickBooks record types. Vendors, items and accounts appear only as names in bills and line items. +- QuickBooks reports, such as profit and loss or the balance sheet. +- Deletions: records deleted in QuickBooks stay in HydraDB. +- The text of files larger than 50 MiB. diff --git a/essentials/v2/connectors/recurly.mdx b/essentials/v2/connectors/recurly.mdx new file mode 100644 index 00000000..5505c032 --- /dev/null +++ b/essentials/v2/connectors/recurly.mdx @@ -0,0 +1,213 @@ +--- +title: "Recurly" +description: "Sync customer accounts, invoices, subscriptions and transactions from one Recurly site. Invoices, subscriptions and transactions link to their account." +icon: "/images/connectors/recurly-light.svg" +--- + +Sync customer accounts, invoices, subscriptions and transactions from one Recurly site. Each record is one document with a readable summary, with amounts shown in their currency, such as `49.99 USD`. Invoices, subscriptions and transactions link to the account they belong to. + +Recurly permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Records deleted in Recurly stay in HydraDB. Plans, coupons, adjustments and billing info are not synced as documents. + +## Permissions + + +Recurly permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Recurly uses a private API key together with your site's subdomain. + + +A Recurly private API key. + + + +Your Recurly site code, for example `acme` for `acme.recurly.com`. + + + +Filled in automatically. Leave it empty. + + +### Set it up + + + + Get a private API key for your Recurly site. + + + Paste the key as `api_key` and your site code as `subdomain`. + + + Select the `All data` resource. It syncs accounts, invoices, subscriptions and transactions together. You cannot select these record types separately. + + + +One connector reads one Recurly site. + + + +Use provider `recurly` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads accounts, invoices and subscriptions updated since the last sync, and transactions collected since the last sync. +- **Edits:** An edited account, invoice or subscription replaces its document. Transactions are found by when they were collected, so a later change to a collected transaction's status may not be picked up. +- **Deletions:** Deleted records are not removed. A record deleted in Recurly stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Recurly item + + +When the record was last updated in Recurly. When there is none, the creation time is used, and for a transaction then the collection time. Not searchable. + + + +The Recurly record id. Finds one account, invoice, subscription or transaction. Not searchable. + + + +Limits a query to this connector's records. Not searchable. + + + +Always `recurly`. Not searchable. + + + + + +The record type: `accounts`, `invoices`, `subscriptions` or `transactions`. + + + +Every other field Recurly returns for the record, such as an account's address, custom fields, cc emails and VAT number. Kept for inspection only. A query does not match them and cannot filter on them. + + + + +### Accounts + +- **One document:** One customer account. +- **Title:** The company. Otherwise the first and last name, then the email, then the account code. +- **Text:** `Name`, `Company`, `Email`, `Code` and `State` lines. The title is searchable too. +- **Date:** When the account was last updated, or created when there is no update time. +- **Link back:** None. + + +The account's email, in the `Email` line and the title when there is no company or name. Identifies the account as a person in the graph. + + + +The account's username, when Recurly has one. Identifies the account as a person in the graph, even without an email. Not searchable. + + + +The company, name and account code, in the title and the `Name`, `Company` and `Code` lines. + + + +The account's state, in the `State` line. + + +### Invoices + +- **One document:** One invoice. +- **Title:** `Invoice - `, with the account shown as its company, name, email or code. +- **Text:** The customer notes, then `Account`, `State`, `Total` and `Balance` with the currency, `Due date` and `Line items` lines. Each line item shows its description. The title is searchable too. +- **Date:** When the invoice was last updated, or created when there is no update time. +- **Link back:** None. +- **Files:** Invoice PDFs are not downloaded. + + +The account the invoice belongs to. Its id links the invoice to the account's document. Its name is in the title and the `Account` line. The id itself is not searchable. + + + +The invoice number, in the title. + + + +Each line's description, in the `Line items` line. Other line details are not searchable. + + +### Subscriptions + +- **One document:** One subscription. +- **Title:** ` subscription - `. +- **Text:** The customer notes, then `Plan`, `Account`, `State`, `Amount` (the unit amount with its currency), `Quantity` and `Current period ends` lines. The title is searchable too. +- **Date:** When the subscription was last updated, or created when there is no update time. +- **Link back:** None. + + +The subscribed account. Its id links the subscription to the account's document. Its name is in the title and the `Account` line. The id itself is not searchable. + + + +The plan name, in the title and the `Plan` line. Plans are not their own documents. + + +### Transactions + +- **One document:** One payment transaction. +- **Title:** `Transaction - `. +- **Text:** The customer message, then `Account`, `Amount`, `Status`, `Type`, `Origin`, `Invoice` (the invoice number) and `Collected at` lines. The title is searchable too. +- **Date:** When the transaction was last updated. Otherwise when it was created, then when it was collected. +- **Link back:** None. + + +The paying account. Its id links the transaction to the account's document. Its name is in the title and the `Account` line. The id itself is not searchable. + + + +The invoice number, in the `Invoice` line. It is text only. The transaction is not linked to the invoice's document. + + +**Example searches** + +- What is the outstanding balance on Acme Corp's latest Recurly invoice? +- Which plan is Acme Corp subscribed to, and when does the current period end? +- Did the payment from jane@example.com on 2026-11-02 succeed? + +## How it fits into the graph + +- Accounts use the Record class. +- Invoices use the Record class. +- Subscriptions use the Record class. +- Transactions use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Recurly creates** + +- An invoice to its account. +- A subscription to its account. +- A transaction to its account. +- Transactions are not linked to their invoice. The invoice number is in the text only. +- No links to other tools. + +**People and groups** + +- Each account, as a person identified by its email and username. + +**Found in the text** + +Account details, customer notes and messages, plan names, line items and the rest of each record's summary. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Billing info, adjustments, coupons, coupon redemptions, plans and plan add-ons as documents. +- Invoice PDFs. +- Account custom fields, addresses and billing details as searchable text. They are stored for inspection only. +- Deletions: records deleted in Recurly stay in HydraDB. diff --git a/essentials/v2/connectors/sendgrid.mdx b/essentials/v2/connectors/sendgrid.mdx new file mode 100644 index 00000000..a5732d46 --- /dev/null +++ b/essentials/v2/connectors/sendgrid.mdx @@ -0,0 +1,123 @@ +--- +title: "SendGrid" +description: "Sync single-send campaigns, contact lists, segments and email templates from one SendGrid account, one document per record." +icon: "/images/connectors/sendgrid.svg" +--- + +Sync the single-send campaigns, contact lists, segments and email templates of one SendGrid account. Each record is one document: a readable summary of its fields, plus any email subject and content the record carries. SendGrid usually leaves email HTML and plain-text content out of these records, so many single sends and templates are searchable by their name, subject and settings only. + +SendGrid permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Individual contacts, sent emails, suppressions and statistics are not synced. Every sync reads all four record types in full. + +## Permissions + + +SendGrid permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +SendGrid uses an API key. + + +A SendGrid API key. + + +### Set it up + + + + Paste a SendGrid API key as `api_key`. + + + HydraDB offers one resource that covers the whole SendGrid account. Select it to sync. + + + +One connector reads one SendGrid account, in full. + + + +Use provider `sendgrid` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads every single send, list, segment and template, whatever its age. +- **New and changed items:** Each sync reads all four record types in full again. +- **Edits:** A changed record replaces its document. A record with no SendGrid id is identified by a hash of its content instead, so a change to it can create a new document rather than update the old one. +- **Deletions:** Records deleted in SendGrid stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Single sends, lists, segments and templates + +- **One document:** One single send, one list, one segment or one template. +- **Title:** The record's name. A record with no name is titled `Sendgrid` with its record type and id. +- **Text:** The title on the first line. Then every simple field of the record as a `Label: value` line, in alphabetical order, leaving out ids and content fields. For a template, one line per version with its name and subject. Then the email subject and the email content, with HTML converted to text, when the record includes them. +- **Date:** For a single send, its scheduled send time. For a segment or template, when it was last updated, else when it was created. A list has no date. +- **Link back:** None. +- **Files:** None. + + +Every field SendGrid returned is kept on the document. Simple values are searchable through their lines in the text. Nested values are kept but not searchable, apart from template version names and subjects. + + + +The record's SendGrid id, or a hash of its content when it has none. Picks out one record. Not searchable. + + + +Limits a query to this connector's records. Not searchable. + + + +Always `sendgrid`. Not searchable. + + + + + +Whether the record is a single send, list, segment or template. + + + + +**Example searches** + +- What was the subject line of our March newsletter single send? +- Which marketing lists do we have, and how many contacts are in them? +- Which email templates exist for onboarding? + +## How it fits into the graph + +- Single sends, lists, segments and templates use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections SendGrid creates** + +The connector creates no links. A single send is not linked to the lists, segments or template it uses. + +**People and groups** + +The connector does not attach records to people. + +**Found in the text** + +The record text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Individual contacts and recipients. +- Individual sent emails. +- Bounces, blocks, spam reports, invalid emails and suppression lists and groups. +- Senders. +- Send and automation statistics. +- Email content that SendGrid leaves out of these records. diff --git a/essentials/v2/connectors/sentry.mdx b/essentials/v2/connectors/sentry.mdx new file mode 100644 index 00000000..f6039fe4 --- /dev/null +++ b/essentials/v2/connectors/sentry.mdx @@ -0,0 +1,289 @@ +--- +title: "Sentry" +description: "Sync issues and error events from the Sentry projects you choose, plus the organization's projects, teams and members. Sentry permissions are not carried over." +icon: "/images/connectors/sentry-light.svg" +--- + +Sync issues and error events from the Sentry projects you select, plus project, team and member records. Each issue, event, project, team and member is one document. Teams and members cover the whole organization, even when you select only a few projects. + +Sentry access controls are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. An event is not linked to the issue it belongs to. Issue comments, stack traces and breadcrumbs are not synced. + + +Sentry is in beta. + + +## Permissions + + +Sentry permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Sentry team-based project access is not reproduced. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Sentry uses an internal integration token. + + +The token of a Sentry internal integration, created under Organization settings, Developer settings. + + +**Connector settings** + + +The organization slug. If you leave it out, HydraDB uses the first organization the token returns, and warns if the token reaches more than one. + + +**Scopes to give the internal integration** + +- `org:read` +- `project:read` +- `event:read` + +### Set it up + + + + In Sentry, open your organization's Developer settings and create an internal integration with `org:read`, `project:read` and `event:read`. Copy its token. + + + Paste the token as `api_token`. If the token reaches more than one organization, set `organization` to the one you want. + + + HydraDB lists the projects the token can see, by slug. Listing stops after 20 pages. Select the projects to sync. + + + +One connector reads one Sentry organization. + + + +Use provider `sentry` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Issues and events reach back the window set by `lookback_days`, 30 days by default. Issues are measured by when they were last seen, events by when they were created. Selected projects, teams and members are read in full, whatever their age. +- **New and changed items:** Each sync reads issues seen again since the last sync and events created since then. Selected projects, teams and members are read in full on every sync. +- **Edits:** An issue is read again when it recurs. A change of status or assignee without a new occurrence may not be picked up. +- **Deletions:** Resolving or ignoring an issue changes its status. It does not remove the document. An item deleted in Sentry stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Sentry item + + +Limits a query to this connector's items. Not searchable. + + + +Always `sentry`. Not searchable. + + +### Issues + +- **One document:** One Sentry issue: a group of similar errors. +- **Title:** The issue title. An issue with no title is called `Sentry issue` with its id. +- **Text:** The title, then a `Culprit` line, the exception type and value, and `File`, `Function`, `Level` and `Project` lines. The status, the assignee and the issue's short id are searchable too. +- **Date:** When the issue was last seen, else when it was first seen. +- **Link back:** The issue page in Sentry. + + +The short id, such as `PROJECT-123`, else the numeric id. Keeps later syncs on the same document, and a search can match it. + + + +`resolved`, `unresolved` or `ignored`, so a query can match the issue's status. + + + +The assigned user's or team's name, else their email, written as an `Assignee` line. A team assignment also links the issue to that team's record through `related_to`, using the Sentry team ID. A user assignment does not link to an organization member record. + + + +The Sentry project ID links the issue to its project's record through `part_of`. Not searchable. + + + +The code location Sentry blames, written as the `Culprit` line. + + + +The severity, written as the `Level` line. + + + +When the issue first and last occurred. The last occurrence, else the first, is the result date. Not searchable. + + + +The numeric issue id. Picks out one issue. Not searchable. + + + +The short id, such as `PROJECT-123`. Picks out one issue. This key is not searchable, but the short id is part of the issue text. + + + + + +How many comments the issue has and how many users it affected. + + + +The logger and platform that produced the issue. + + + + +### Error events + +- **One document:** One error event. +- **Title:** The event title, else its message. An event with neither is called `Sentry event` with its id. +- **Text:** The title, then `Message`, `Culprit`, `Location`, `Platform` and `Project` lines. The event id is searchable too. +- **Date:** When the event was created. +- **Link back:** None. + + +The Sentry event id. Keeps later syncs on the same document, and a search can match it. + + + +The event message, the blamed code location, the location and the platform, each written as its own line. + + + +The event's project, as `project:`, written in the `Project` and `Parent` lines. Links the event to its project's record. + + + +When the event was created. Not searchable. + + + + + +The id of the issue the event belongs to. It does not link the event to the issue. + + + + +### Projects and teams + +- **One document:** One Sentry project or team. +- **Title:** The name, else the slug. A record with neither gets a generated title with its id. +- **Text:** The name and a `Slug` line. A project also has `Platform` and `Status` lines. The title is searchable too. +- **Date:** When the project or team was created. +- **Link back:** None. + + +A project's id, as `project:`. Issues and events of the project link to this record. Not searchable. + + + +The Sentry team IDs link a project to each owning team's record through `part_of`. Not searchable. + + + +The Sentry team ID identifies the record that assigned issues and owned projects link to. Not searchable. + + + +When the project or team was created. Not searchable. + + + + + +`project` or `team`. + + + + +### Members + +- **One document:** One organization member. +- **Title:** The member's name, else their email. A member with neither gets a generated title with their id. +- **Text:** The name, then `Email`, `Role` and `Invite status` lines, and any contact details Sentry reports, such as names, organization, emails, phone numbers, a profile link and the creation and update times. The title is searchable too. +- **Date:** When the membership was created. +- **Link back:** The member's profile link, when Sentry reports one. + + +The member's primary and other emails. Identify the member as a person in the graph. + + + +The member's display name and Sentry user id. Name the member as a person in the graph. + + + +Names, organization, role and invite status, when reported. + + + +The record owner and their email, when reported. The graph records the owner as a person. + + + +Phone numbers, when reported. They do not identify the person in the graph. + + + +The profile link, when reported. Also the link back. + + + +When the membership was created. + + + +The last reported update, else the creation time. The graph also records it as when the member was last updated. + + +**Example searches** + +- Which unresolved Sentry issues mention a timeout in the payments project? +- Who is assigned to PAYMENTS-482? +- Which file and function raise the KeyError issue? + +## How it fits into the graph + +- Issues use the Ticket class. +- Error events use the Ticket class. +- Projects and teams use the Page class. +- Members use the Contact class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Sentry creates** + +- An error event to its project's record. +- Issues link to their project through `part_of` and, when assigned to a team, to that team through `related_to`. Projects link to each owning team through `part_of`. +- These links use Sentry's project and team IDs, not display names, and are fully resolved only after the target is indexed in the same database and collection. +- Event-to-issue and user-assignee-to-member links are not provided. An event's numeric group ID does not identify the issue's short ID, and a user ID is distinct from an organization member ID. +- Stack traces are not read for links to code. +- No links to items in other tools. + +**People and groups** + +- The assignee of each issue. +- Each organization member, identified by email. + +**Found in the text** + +Issue and event titles, messages, culprits and exception text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Projects you did not select. +- Issue comments and activity. Only the comment count is kept. +- Stack traces, breadcrumbs and tags beyond the issue summary. +- Releases, alerts, performance data and replays. +- Sentry team-based project access. diff --git a/essentials/v2/connectors/servicenow.mdx b/essentials/v2/connectors/servicenow.mdx new file mode 100644 index 00000000..1fed035c --- /dev/null +++ b/essentials/v2/connectors/servicenow.mdx @@ -0,0 +1,398 @@ +--- +title: "ServiceNow" +description: "Sync knowledge articles, catalog items, ticket rows and custom-table rows from the ServiceNow resources you choose. ServiceNow read access carries over where its rules can be read and Enforce ACL is on." +icon: "/images/connectors/servicenow.svg" +--- + +Sync the ServiceNow knowledge bases, service catalogs, ticket tables and custom tables you select. Each knowledge article, catalog item and table row is one document. Comments and work notes are searchable with the record they belong to, and attachments are read when the service account can download them and their format is supported. + +Readers come from knowledge-base and catalog-item criteria and from table read rules. Rules with conditions or scripts cannot be captured, and standard ticket tables often use them. Search applies captured readers only when Enforce ACL is on. Work notes share their record's readers. Rows deleted in ServiceNow stay in HydraDB. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow ServiceNow permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** A knowledge article can be read by the users its knowledge base's Can Read criteria allow, minus those its Cannot Read criteria exclude. A knowledge base with no criteria follows the instance's policy for that case. When the instance turns on article-level criteria, an article is limited further to users both allow. A catalog item can be read by the users its own criteria allow. Catalogs themselves carry no readers. A ticket or custom-table row can be read by users who hold the roles its table's read rules require, across the table and its parent tables, including roles held through a group. Comments and work notes share their record's readers. Rules that resolve to no users leave the item readable by no one. +- **How a person is identified:** A ServiceNow user's email address. +- **When permissions cannot be read:** If a read rule has a condition or script, uses advanced user criteria, or yields more users than HydraDB can capture, the connector reports a permission warning. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- Standard ticket-table read rules often use scripts, so on many instances ticket readers cannot be captured. Set an access rule on such tables. +- If an article's own criteria cannot be read, the article follows its knowledge base's readers, with a warning. That can be wider than the article's own rule. +- Work notes are marked internal in ServiceNow, but they have no separate readers in HydraDB. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +ServiceNow uses an OAuth application with the client credentials grant. Its OAuth Application User is a dedicated service account. Basic authentication is not supported, and HydraDB never stores a user password. + + +The instance name only, for example `acme` for `acme.service-now.com`. + + + +The client id of the OAuth application. + + + +The client secret of that application. + + +**Roles for the service account** + +- `admin`: required. Reads every selected table, the lists HydraDB offers for selection, comments, work notes and attachments. +- `snc_read_only`: required. Blocks every write from the service account, so it can only read. + +Reading permissions needs `admin` and `snc_read_only`, or read access to `sys_security_acl`, `sys_security_acl_role`, `user_criteria`, `sys_user`, `sys_user_has_role`, `sys_group_has_role` and `sys_user_grmember`. + +### Set it up + + + + In ServiceNow, create a dedicated web-service user and give it the `admin` and `snc_read_only` roles. Set its timezone to GMT, so date windows line up as expected. + + + Create an OAuth application for the client credentials grant, and set the service user as its OAuth Application User. + + + Enter the instance name, not the URL, as `instance`, then the client id and client secret. + + + HydraDB lists the instance's knowledge bases, service catalogs, ticket tables and custom tables. Select the ones to sync. Nothing outside your selection is read. Each ticket table reads only rows of its exact class, so selecting a parent table does not bring in its child tables' rows, and selecting both never indexes a row twice. + + + +One connector reads one ServiceNow instance. + + + +Use provider `servicenow` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected resource reaches back the window set by `lookback_days`, 30 days by default. Only published, latest-version articles and active catalog items are read. +- **New and changed items:** Each selected resource syncs on its own and reads rows updated since the last sync. A record whose comment, work note or attachment changed is read again too. +- **Edits:** An updated row is read again and updates its document. A new version of an article updates the same document, keyed by the article number. +- **Deletions:** Rows deleted in ServiceNow stay searchable in HydraDB. An article that is retired, or a catalog item that is deactivated, is not removed when it stops being read. +- A service account without access to comments and work notes can get an empty answer instead of an error, so a ticket can sync without them. +- A catalog item in several selected catalogs is one document, filed under the selected catalog with the lowest id. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every ServiceNow item + + +Comments and work notes the service account can read, each with its author and time, searchable with the record. The graph records each author. + + + +Text read from attached files that downloaded and parsed successfully, searchable with the record. Each keeps a link to the original file. + + + +The source table, such as `incident` or `kb_knowledge`. Limits a query to one table. Not searchable. + + + +Whether the item is an article, catalog item, ticket or custom row. Not searchable. + + + +The row's current sys_id. Targets one row. For articles, use the number instead, because a new version has a new sys_id. Not searchable. + + + +The row's ServiceNow class, when supplied. Not searchable. + + + +The selected knowledge base, catalog or table. Limits a query to it. Not searchable. + + + +The name of the selected knowledge base, catalog or table, when available. Not searchable. + + + +Whether the item came from a knowledge base, a catalog or a table. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `servicenow`. Not searchable. + + + +The users who can read the item, worked out as described under Permissions. Not searchable. + + +### Knowledge articles + +- **One document:** One knowledge article, in its published latest version. +- **Title:** The short description, else the article number. Otherwise `ServiceNow article` and its id. +- **Text:** The article text converted from HTML, else its wiki text, else the short description. The author and an `Updated` line are part of the text too. The title is searchable too. +- **Date:** When the article was last updated, else when it was created. +- **Link back:** The article in the ServiceNow knowledge view, by its number. +- **Files:** Attachments the service account can download are read when their format is supported, up to 25 MiB by default. Image fields are not read. Not every file yields text. + + +The article's author. The graph records the article as written by that person. + + + +The author's email. Limits a query to one author, and identifies the author in the graph. Not searchable. + + + +The article number. Keeps every version of the article on one document, builds the link back, and becomes the title when there is no short description. Targets one article. + + + +When the article was last updated, written as an `Updated` line. + + + +When the article was created. Used as the result date only when the update time is missing. Not searchable. + + + +The article's workflow state. Only published articles are synced. Not searchable. + + + +The article's version, when supplied. Not searchable. + + + +The knowledge category. Limits a query to one category. Not searchable. + + + +The article's language code. Not searchable. + + + + + +The user name of the last editor. The editor is not attached to the article as a person. + + + +When the article was published. It is not the result date. + + + + +### Catalog items + +- **One document:** One active catalog item. +- **Title:** The item name, else the short description. Otherwise `ServiceNow catalog item` and its id. +- **Text:** The short description, then the full description converted from HTML. An `Updated` line is part of the text too. The title is searchable too. +- **Date:** When the item was last updated, else when it was created. +- **Link back:** The catalog item in ServiceNow. +- **Files:** Attachments the service account can download are read when their format is supported, up to 25 MiB by default. Image fields are not read. Not every file yields text. + + +When the item was last updated, written as an `Updated` line. + + + +When the item was created. Used as the result date only when the update time is missing. Not searchable. + + + +The item's number, when it has one. Targets one item. Not searchable. + + + +The item's category. Limits a query to one category. Not searchable. + + + + + +The user name of the last editor. + + + + +### Tickets + +- **One document:** One row of a selected ticket table, such as an incident, problem, change request, request, requested item or catalog task, with its comments and work notes. +- **Title:** The short description, else the ticket number. Otherwise `ServiceNow`, the table name and the row id. +- **Text:** The description, then labeled sections when present: `Close notes`, `Resolution notes`, `Cause notes`, `Fix notes`, `Workaround`, `Implementation plan`, `Backout plan`, `Test plan` and `Justification`. The status, priority, assignee, reporter, ticket type, resolution date, parent and creation time are part of the text too, with the ticket's key. The title is searchable too. +- **Date:** When the row was last updated, else when it was created. +- **Link back:** The record form in ServiceNow. +- **Files:** Attachments the service account can download are read when their format is supported, up to 25 MiB by default. Image fields are not read. Not every file yields text. + + +The displayed state. + + + +The displayed priority. + + + +The assigned person's name. The graph records the ticket as assigned to that person. + + + +The assignee's email. Limits a query to one assignee, and identifies the assignee in the graph. Not searchable. + + + +The caller, requested-for person or opener. The graph records the ticket as reported by that person. + + + +The reporter's email. Limits a query to one reporter, and identifies the reporter in the graph. Not searchable. + + + +The table's label, such as Incident. + + + +When the ticket was resolved. It is not the result date. + + + +The ticket's parent, else its requested item, else its request. Places the ticket under that record when its table is selected. + + + +The ticket number. Targets one ticket. Becomes the title when there is no short description. + + + +The row's id, written into the text as the ticket's key. Keeps later syncs on the same document. + + + +When the row was created, written as a `Created` line. Used as the result date only when the update time is missing. + + + +When the row was last updated. Not searchable. + + + +The assignment group's name. Limits a query to one group. Not searchable. + + + +The raw state code. Not searchable. + + + +The raw priority code. Not searchable. + + + +The raw impact code. Not searchable. + + + +The raw urgency code. Not searchable. + + + +The ticket's category. Not searchable. + + + + + +The ticket's deadline. + + + +Impact, urgency, severity, subcategory, close and resolution codes, contact type, approval, risk, referenced names, and opened and closed dates. + + + + +### Custom table rows + +- **One document:** One row of a selected custom table. +- **Title:** The table's display field, else `name`, `u_name`, the number or the short description. Otherwise `ServiceNow`, the table name and the row id. +- **Text:** The row's non-empty text columns as `Label: value` lines, converted from HTML. The title is used when there are none. +- **Date:** When the row was last updated, else when it was created. +- **Link back:** The record form in ServiceNow. +- **Files:** Attachments the service account can download are read when their format is supported, up to 25 MiB by default. Image fields are not read. Not every file yields text. + + +The row's non-empty text columns, with their display labels. + + + +When the row was last updated. Not searchable. + + + +When the row was created. Used as the result date only when the update time is missing. Not searchable. + + + +The row's number, when it has one. Targets one row. Not searchable. + + + + + +The custom table's name. Filter on it with `additional_metadata.servicenow_table`. + + + + +**Example searches** + +- How was the VPN outage incident resolved? +- What does the knowledge base say about requesting a new laptop? +- What work notes were left on change CHG0030012? + +## How it fits into the graph + +- Knowledge articles use the Page class. +- Catalog items use the Page class. +- Tickets use the Ticket class. +- Custom table rows use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections ServiceNow creates** + +- A ticket to its parent, else its requested item, else its request, and to any other of the three. +- A ticket to its problem and to the record that caused it. +- A ticket to its change request. +- A link reaches a record only when that record's table is selected. +- Each item is grouped under the knowledge base, catalog or table it came from. +- No links to other tools. + +**People and groups** + +- The assignee and reporter of each ticket. +- The author of each article. +- The author of each comment and work note. +- The assignment group is a filter, not a person or group in the graph. + +**Found in the text** + +Descriptions, resolution and plan notes, comments and work notes, article text, and text read from attachments. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Knowledge bases, catalogs and tables you did not select. +- Unpublished and older article versions, and inactive catalog items. +- Users, groups, CMDB items, journal entries and attachments as documents of their own. +- Image fields, files over the download limit, and files whose text cannot be read. +- Comments, work notes and attachments the service account cannot read. diff --git a/essentials/v2/connectors/sharepoint.mdx b/essentials/v2/connectors/sharepoint.mdx new file mode 100644 index 00000000..19a66cb4 --- /dev/null +++ b/essentials/v2/connectors/sharepoint.mdx @@ -0,0 +1,289 @@ +--- +title: "SharePoint" +description: "Sync files, site pages and list rows from the SharePoint Online sites you choose, one document per item. SharePoint permissions are not imported." +icon: "/images/connectors/sharepoint.svg" +--- + +Sync three kinds of content from the SharePoint Online sites you select: files in document libraries, site pages including news posts, and the rows of the site's lists. Each file, page and list row is one document. Text from supported files is searchable when HydraDB can download and read the files. A file whose text cannot be read is still findable by its name, library and folder path. + +SharePoint permissions are not imported, so everything synced is visible to everyone who can query the collection unless you set an access rule. The first sync reaches only items modified in the last 30 days, files included, unless you raise `lookback_days`. Items deleted in SharePoint stay in HydraDB. + +## Permissions + + +SharePoint permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- SharePoint site and item permissions are not reproduced. Set an access rule on each site that must be restricted. +- Every synced item carries `additional_metadata.rbac_warning`, a notice that SharePoint permissions were not captured. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +SharePoint uses a Microsoft Entra app registration with app-only access: a client id and client secret, with no signed-in user. + + +Your Entra Directory (tenant) ID, as a GUID or its friendly name. + + + +The Application (client) ID of the Entra app. + + + +The client secret's Value, not its Secret ID. + + +SharePoint is its own connector. Connecting it does not sync Microsoft Teams chat or Outlook mail. + +**Microsoft Graph application permissions** + +- `Sites.Read.All`: lists the tenant's sites and reads document libraries, site pages and lists with their columns and rows. +- `Files.Read.All`: reads file details and downloads files so their text can be read. + +Both must be application permissions with tenant-wide admin consent. Delegated permissions do not work. + +### Set it up + + + + In Microsoft Entra, register an app for app-only access and create a client secret. + + + Add the Microsoft Graph application permissions `Sites.Read.All` and `Files.Read.All`, then grant tenant-wide admin consent. + + + Enter `tenant`, `client_id` and `client_secret`. + + + HydraDB lists the tenant's sites. Select the sites to sync. Everything in a selected site is synced: its document libraries, pages and lists. You cannot select a single library or list. To reach items older than 30 days, raise `lookback_days` when you select them. + + + +One connector reads one Microsoft Entra tenant. `Sites.Read.All` covers every site in the tenant, but HydraDB reads only the sites you select. + + + +Use provider `sharepoint` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected site reads back the window set by `lookback_days`, 30 days by default. This applies to files too: a file not modified within the window is not synced, even on the first sync. +- **New and changed items:** Each sync reads files, pages and list rows modified since the last sync. +- **Edits:** A changed file, page or row is read again and replaces its document. +- **Deletions:** Deleted files, pages and list rows are not removed. They stay searchable in HydraDB. +- If SharePoint refuses access to a list, the sync fails. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every SharePoint item + + +The creator's display name, or email if there is no name, written as the `Author` line. The graph records the item as written by that person. + + + +When the item was last modified, written as the `Updated` line. Sets the result date. + + + +The document library id for a file, the site id for a page, or the list id for a list row. Limits a query to one library, site or list. Not searchable. + + + +The library name for a file, the site name for a page, or the list name for a list row. Limits a query by that name. Not searchable. + + + +`drive` for a file, `site` for a page, `list` for a list row. Says what the two keys above refer to. Not searchable. + + + +The site id. Limits a query to one site across its files, pages and list rows. Not searchable. + + + +A notice that SharePoint permissions were not captured. Present on every item. An access rule you set still applies. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `sharepoint`. Not searchable. + + + + + +The site's id. + + + +When the item was created. The result date uses the modified time instead. + + + + +### Files + +- **One document:** One file in a document library. Folders are not documents. +- **Title:** The library name, folder path and file name joined with slashes, for example `Documents/Reports/2026/Q3.pdf`. A file with no name is titled `SharePoint file` and its id. +- **Text:** The file's text when it could be read. Otherwise the title followed by `Type`, `Library`, `Path`, `Author`, `Link` and `Modified` lines, leaving out empty ones. The title, author and modified time are searchable in either case. +- **Date:** When the file was last modified. +- **Link back:** Opens the file in SharePoint. +- **Files:** Text from supported files is searchable when HydraDB can download and read the files. Files over 50 MiB keep only their details. Web pages (`.aspx`) and OneNote files (`.one`, `.onetoc2`) are not synced as files. + + +The document library name. Starts the title, and is the `Library` line when the file's text could not be read. + + + +The folder path inside the library. Part of the title, so files can be found by folder, and the `Path` line when the file's text could not be read. + + + +The file type as SharePoint reports it, written as the `Type` line. Searchable only on files whose text could not be read. + + + +The file's SharePoint link. Written as the `Link` line only on files whose text could not be read. + + + +The document library id. Limits a query to one library. Not searchable. + + + +The file id, unique only inside its library. Picks out one file. Not searchable. + + + + + +The site's display name. To limit a query to a site, use `additional_metadata.sharepoint_site_id`. + + + +The document library's id. + + + +The file size in bytes. + + + + +### Site pages + +- **One document:** One site page or news post. +- **Title:** The page title, else its name. A page with neither is titled `SharePoint page` and its id. +- **Text:** The text of the page's web parts, with markup removed. The title, author and modified time are searchable too. +- **Date:** When the page was last modified. +- **Link back:** Opens the page in SharePoint. + + +The page id, unique only inside its site. Picks out one page. Not searchable. + + + + + +The site's display name. To limit a query to a site, use `additional_metadata.container_name` or `additional_metadata.sharepoint_site_id`. + + + +`article`, `home` or `newsLink`. + + + +Whether the page was promoted as a news post. + + + + +### List rows + +- **One document:** One row of a SharePoint list. Folder rows are skipped. +- **Title:** The list name, a colon, and the row's Title column. When Title is empty, the first column with a value is used, and otherwise the row id. +- **Text:** The title, a `List` line with the list and site names, then the row's columns in list order as labelled lines, then `Author`, `Modified` and `Link` lines. Empty values are left out. Hidden, reserved and most read-only columns are left out, and so are values that cannot be shown as text. If a list's column definitions cannot be read, its column values are left out. Columns are searchable as text, not as separate filters. +- **Date:** When the row was last modified. +- **Link back:** The row's display form in SharePoint, else the row's web link. +- **Files:** None. Files attached to list rows are not downloaded. + + +The list's display name. Starts the title and the `List` line. + + + +The site's display name, written in the `List` line. + + + +The row's link, written as the `Link` line. + + + +The list id. Limits a query to one list. Not searchable. + + + +The row id, unique only inside its list. Picks out one row. Not searchable. + + + + + +The list's id. + + + +The list template, such as `genericList`, `events` or `tasks`. + + + + +**Example searches** + +- What does the travel policy PDF on the HR site say about per diem? +- Which items in the Projects list mention the Platform team? +- Find the Q3 board deck in the Finance Documents library. + +## How it fits into the graph + +- Files use the Page class. +- Site pages use the Page class. +- List rows use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections SharePoint creates** + +- No links between items, and no links to items in other tools. Site, library and list are kept as filters, not as graph links. + +**People and groups** + +- The creator of each file, page and list row. + +**Found in the text** + +The file text, the page text and the list row's columns. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Sites you did not select. +- Items last modified before the `lookback_days` window on the first sync, files included. +- SharePoint site and item permissions. +- Personal OneDrive, OneNote notebooks, comments, and metadata columns on library files. +- Files attached to list rows, hidden lists and system lists. +- Hidden, reserved and most read-only list columns, values that cannot be shown as text, and lookup-type columns beyond twelve per list. +- Text of files over 50 MiB. +- Deletions: deleted files, pages and list rows stay in HydraDB. diff --git a/essentials/v2/connectors/shortcut.mdx b/essentials/v2/connectors/shortcut.mdx new file mode 100644 index 00000000..d712406e --- /dev/null +++ b/essentials/v2/connectors/shortcut.mdx @@ -0,0 +1,206 @@ +--- +title: "Shortcut" +description: "Sync every story and epic in the Shortcut workspace your token can read. Shortcut permissions are not imported." +icon: "/images/connectors/shortcut.svg" +--- + +Sync every story and epic in the Shortcut workspace the token can read. There is nothing to select. Each story and each epic is one document with its description. A story links to its epic and to its parent story. + +Shortcut permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Comments, tasks, files, owners and requesters are not synced, and a story's workflow state is kept only as a number. Stories and epics deleted in Shortcut stay in HydraDB. + +## Permissions + + +Shortcut permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- No per-team or per-story visibility is captured. To restrict the whole connector, set an access rule on its resource. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Shortcut uses an API token. + + +A Shortcut API token. + + +### Set it up + + + + In Shortcut, create an API token. + + + Paste the token as `token`. + + + There is nothing to select. The connector syncs every story and epic the token can read. + + + +One connector reads the Shortcut workspace one token can read. + + + +Use provider `shortcut` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads back the window set by `lookback_days`, 30 days by default, measured on when stories and epics were last updated. +- **New and changed items:** Each sync reads the stories and epics updated since the last sync. A story found both in the workspace and in a legacy Project is stored once. +- **Edits:** An edited story or epic is picked up through its last-updated time and updates its document. +- **Deletions:** Stories and epics deleted in Shortcut stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Shortcut item + + +Limits a query to this connector's items. Not searchable. + + + +Always `shortcut`. Not searchable. + + +### Stories + +- **One document:** One Shortcut story, including stories in legacy Projects. +- **Title:** The story name, or `Shortcut story` and its id when the name is empty. +- **Text:** The story description. The labels, the creation date and the story id are written as lines too. The title is searchable too. +- **Date:** When the story was last updated, or when it was created if there is no update time. +- **Link back:** The story's page in Shortcut. + + +The Shortcut story id. It keeps later syncs on the same document. + + + +Label names, written as the `Labels` line. + + + +When the story was created, written as the `Created` line. + + + +When the story was last updated. Sets the result date and decides when a sync picks the story up. Not searchable. + + + +The epic the story belongs to. Links the story to that epic. Not searchable. + + + +The story this story is a sub-task of. Links the story to that parent. Not searchable. + + + +The story id. Picks out one story. Not searchable. + + + + + +`feature`, `bug` or `chore`. It is not written into the text. + + + +The workflow state's numeric id, not its name. + + + +Whether the story is completed. + + + +The legacy Project id, often empty. + + + + +### Epics + +- **One document:** One Shortcut epic. +- **Title:** The epic name, or `Shortcut epic` and its id when the name is empty. +- **Text:** The epic description. The creation date and the epic id are written as lines too. The title is searchable too. +- **Date:** When the epic was last updated, or when it was created if there is no update time. +- **Link back:** The epic's page in Shortcut. + + +`epic:` and the epic id, so it never clashes with a story id. Stories link to this id. + + + +When the epic was created, written as the `Created` line. + + + +When the epic was last updated. Sets the result date and decides when a sync picks the epic up. Not searchable. + + + +The epic id, without the `epic:` prefix. Picks out one epic. Not searchable. + + + +Always `epic`. Limits a query to epics. Not searchable. + + + + + +`to do`, `in progress` or `done`. It is not written into the text. + + + +Whether the epic is completed. + + + +Always `epic`. + + + + +**Example searches** + +- What does the story about the export bug say? +- Which stories are labelled customer-request? +- What is the Billing v2 epic about? + +## How it fits into the graph + +- Stories use the Ticket class. +- Epics use the Ticket class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Shortcut creates** + +- A story to its epic. +- A story to its parent story. +- No links to items in other tools. + +**People and groups** + +No people are attached to stories or epics. Owners, requesters and followers are not synced. + +**Found in the text** + +Story and epic descriptions. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Story comments, tasks (checklists), files and linked files. +- Story owners, requesters and followers. +- Readable workflow state names. Only the state's numeric id is kept. +- Members, labels, milestones, iterations, categories, objectives and groups as items of their own. diff --git a/essentials/v2/connectors/slack.mdx b/essentials/v2/connectors/slack.mdx new file mode 100644 index 00000000..2a27e1a9 --- /dev/null +++ b/essentials/v2/connectors/slack.mdx @@ -0,0 +1,210 @@ +--- +title: "Slack" +description: "Sync messages and replies from selected Slack channels. Private-channel restrictions require Enforce ACL and a successful permission read." +icon: "/images/connectors/slack.svg" +--- + +Sync messages and replies from the public and private Slack channels you select in one workspace. Each message and each thread reply is one document, and a reply links to the message that started its thread. Shared files are downloaded and their text is searchable with the message when the download and text reading succeed. + +Private-channel membership restricts search only when Enforce ACL is on and HydraDB can read the channel's members. Direct messages are not synced. Edits and deletions made in Slack after a message is synced are not picked up. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Slack permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** A public channel's messages can be read by everyone who can query the collection. A private channel's messages can be read by its members. HydraDB reads this once per channel on each sync. There is no per-message permission. +- **How a person is identified:** A member's email address, in lower case. Bots and deactivated users have no email and are left out. +- **When permissions cannot be read:** If HydraDB cannot read a channel's privacy, members or member emails, the connector reports a permission warning. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- A private channel with more than 1,000 members who have emails, or more than 3,000 members in all, cannot be captured. Set an access rule on such a channel. +- Without `users:read.email`, permissions cannot be captured for any private channel. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Slack uses a token from a Slack app installed in your workspace. A bot token or a user token works. + + +A Slack bot token, which starts with `xoxb-`, or a user token, which starts with `xoxp-`. + + +**Scopes to add to the Slack app** + +- `channels:read`: lists public channels for you to select. +- `channels:history` +- `groups:read`: lists private channels for you to select. +- `groups:history` +- `users:read` +- `users:read.email`: without it, permissions cannot be captured for any private channel. +- `files:read` + +If neither `channels:read` nor `groups:read` is granted, connecting fails with a message that names the missing scope. + +### Set it up + + + + Create a Slack app for your workspace and add the scopes above. + + + Install the app in the workspace and copy its token. + + + Paste the token as `access_token`. + + + HydraDB lists the non-archived channels the token can see. For each channel, it shows privacy, app membership and member count. Select the channels to sync. + + + +One token covers one Slack workspace. + +To connect more than one Slack workspace, give each connector its own `provider_account_scope`, such as `slack-account-a` and `slack-account-b`. These are labels you choose, not Slack's own account ids, and HydraDB does not check them. Two connectors that share a scope and write to the same collection can overwrite each other's items. See [several accounts from one provider](/essentials/v2/connectors#6-connect-several-accounts-from-one-provider). + + + +Use provider `slack` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A newly selected channel reads back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** New messages and replies are synced from recent history. New replies on older threads are checked every 6 hours by default. That check covers channel history over multiple syncs, so older replies may arrive later. +- **Edits:** A routine sync does not pick up an edit to a message that is already synced. +- **Deletions:** Deleted messages are not removed. A message deleted in Slack stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Messages + +- **One document:** One Slack message: a message posted in a channel, or a single reply in a thread. +- **Title:** The channel name with `#`, a colon and the message's first line, cut to about 80 characters, for example `#general: Deploy is done`. A reply reads `#general thread: ...`. A message with no text is titled `Slack message`. When a message has text, search matches the message, not this title, so a channel name in a query does not reliably limit results to that channel. +- **Text:** The message text, with mentions turned into display names. Then the pretext, title and text of any legacy attachments, and one `[file: name]` line per shared file. The sender is written as a `From` line and the time as a `Sent` line. +- **Date:** The message's Slack timestamp. +- **Link back:** A Slack permalink to the message. A reply links to itself inside its thread. Empty if the workspace address could not be read. +- **Files:** Each shared file is downloaded and read, and its text becomes searchable with the message. A file is skipped if Slack gave no download address, the download fails, or the file is too large. + + +The display name of the person or bot that posted, written as the `From` line. The graph records the message as sent by that person. If the name could not be read, the raw Slack id is kept, and later syncs do not go back to fix it. + + + +The text read from each shared file, searchable with the message. + + + +The message time, written as the `Sent` line. + + + +Display names of people mentioned in the message. The graph records each as mentioned. + + + +The message's Slack timestamp. Picks out one exact message. Not searchable. + + + +The timestamp of the thread's first message, empty outside a thread. Limits a query to one thread. Not searchable. + + + +Slack's message subtype, such as `bot_message` or `file_share`. Includes or excludes bot posts and file shares. Not searchable. + + + +The bot id when a bot posted the message. Includes or excludes one bot's messages. Not searchable. + + + +How many replies the thread has. Finds thread starters by how many replies they drew. Not searchable. + + + +Limits a query to this connector's messages. Not searchable. + + + +Always `slack`. Not searchable. + + + +For a reply, the message that started its thread. Joins the reply to that message, so the whole conversation can be returned together. Not searchable. + + + +The thread a message belongs to. Groups every message of one thread together in the graph. Not searchable. + + + +The selected channel. For a private channel, its members decide who can read its messages. Not searchable. + + + + + +How many legacy attachments the message had. + + + +How many shared files Slack listed, including any that could not be downloaded. + + + +Whether Slack marked the message as edited when it was read. Later edits are not picked up automatically. + + + +The display name of the editor, when edited. The editor is not added to the graph as a person. + + + +The edit time, when edited. The result date stays the original message time. + + + +The details Slack supplied for each shared file, kept even when a file's text could not be read. + + + + +**Example searches** + +- What did the team decide about the release last week? +- What did Priya say in the thread about the pricing change? +- Which messages were posted by the alerts bot? + +## How it fits into the graph + +- Messages use the Message class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Slack creates** + +- A thread reply to the message that started the thread. +- Every message to its thread, including a message nobody replied to. +- No links to items in other tools. + +**People and groups** + +- The sender of each message. +- People mentioned in a message. +- An editor is kept with the message but not added to the graph. + +**Found in the text** + +The message text, legacy attachment text and shared file text. Each reply is read together with the text of its thread's first message. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Archived channels: HydraDB does not list them for selection. +- Direct messages and group direct messages. +- System messages: joins, leaves, renames, topic and purpose changes, pins, bots being added or removed, and thread broadcasts. +- Edits and deletions made after a message was synced. +- Reactions. diff --git a/essentials/v2/connectors/smartsheet.mdx b/essentials/v2/connectors/smartsheet.mdx new file mode 100644 index 00000000..7545ff58 --- /dev/null +++ b/essentials/v2/connectors/smartsheet.mdx @@ -0,0 +1,136 @@ +--- +title: "Smartsheet" +description: "Sync every row of the Smartsheet sheets you choose, one searchable document per row. Smartsheet sharing is not imported." +icon: "/images/connectors/smartsheet-light.svg" +--- + +Sync every row of the Smartsheet sheets you select. Each row is one document, with each non-empty cell written as a column-and-value line. + +Smartsheet sharing is not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. Attachments and discussions are not synced. Rows deleted in Smartsheet stay in HydraDB. + + +Smartsheet is in beta. + + +## Permissions + + +Smartsheet permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Smartsheet sharing is not reproduced. Set an access rule on each sheet that should be restricted. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Smartsheet uses an API access token. + + +A Smartsheet API access token for a user who can read the sheets. + + +### Set it up + + + + In Smartsheet, generate an API access token for a user who can view the sheets you want. + + + Paste the token as `smartsheet_access_token`. + + + HydraDB lists the sheets the token can read. Select the sheets to sync. Each row of a selected sheet becomes one document. + + + +One connector reads the sheets one token's Smartsheet user can view. + + + +Use provider `smartsheet` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A newly selected sheet reads back the window set by `lookback_days`, 30 days by default, measured on when rows were last modified. +- **New and changed items:** Each sync reads the rows modified since the last sync. +- **Edits:** A row with a changed cell is read again and updates the same document. +- **Deletions:** Deleted rows are not removed. A row deleted in Smartsheet stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### Rows + +- **One document:** One row of a selected sheet. +- **Title:** The first non-empty cell in a column named `name`, `title`, `subject` or `task name`, in any case, taking columns in alphabetical order. Otherwise the first other non-empty value. Otherwise the sheet name and `row`. +- **Text:** The title, then one `Column: value` line per non-empty cell, with columns in alphabetical order, not sheet order. Cross-sheet references and predecessors appear as cell text. +- **Date:** When the row was last modified. +- **Link back:** The sheet that holds the row, not the row itself. +- **Files:** Row attachments are not synced. + + +Every non-empty cell, as `Column: value`. Columns are not individual query filters. Contact and assignee columns are text only, not people in the graph. + + + +When the row was last modified. Sets the result date and decides when a sync picks the row up. Not searchable. + + + +The sheet name in snake case, such as `project_tracker`. Limits a query to one sheet's rows. Different sheet names can end up with the same value, so it is not a unique sheet id. Not searchable. + + + +Limits a query to this connector's rows. Not searchable. + + + +Always `smartsheet`. Not searchable. + + + + + +The numeric row id. Together with the sheet, it decides which document a later sync updates. + + + + +**Example searches** + +- Which rows in the Project Tracker sheet are marked At Risk? +- What is the due date and owner of the Vendor onboarding task? +- Which rows in the Hiring Plan sheet changed this week? + +## How it fits into the graph + +- Rows use the Page class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Smartsheet creates** + +- Each row is grouped under its sheet. Sheets are not items of their own. +- No links between rows or to other tools. Cross-sheet references and predecessors are cell text only. + +**People and groups** + +No people are attached to rows. Contact and assignee columns are text only. + +**Found in the text** + +All cell values of each row. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Sheets you did not select. +- Row attachments, discussions and comments. +- Cell formatting, formulas and column-type details. Only cell values are kept. +- Smartsheet sharing. +- Deletions: deleted rows stay in HydraDB. diff --git a/essentials/v2/connectors/stripe.mdx b/essentials/v2/connectors/stripe.mdx new file mode 100644 index 00000000..0599f5d9 --- /dev/null +++ b/essentials/v2/connectors/stripe.mdx @@ -0,0 +1,191 @@ +--- +title: "Stripe" +description: "Sync customers, invoices, subscriptions and charges from one Stripe account. Invoices, subscriptions and charges link to their customer." +icon: "/images/connectors/stripe.svg" +--- + +Sync customers, invoices, subscriptions and charges from one Stripe account. Each record is one document with a readable summary, and an invoice carries its line items. Invoices, subscriptions and charges link to their customer. + +Stripe permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Other Stripe objects, such as products, refunds and payouts, are not synced. Deletions in Stripe are not detected. + + +Searchable amounts assume two decimal places. For a currency such as JPY, an amount of 100 is shown as 1.00, so the searchable text understates it by a factor of 100. Original stored amounts are unchanged. + + +## Permissions + + +Stripe permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Stripe uses a secret key together with the account id. + + +A Stripe secret key, `sk_live_...` or `sk_test_...`, with read access to the account's resources. + + + +The Stripe account id, `acct_...`. + + +### Set it up + + + + Paste the secret key as `client_secret` and the account id as `account_id`. + + + Select the account's `All data` resource. It syncs customers, invoices, subscriptions and charges together. You cannot select these record types separately. + + + +One connector reads one Stripe account. A test-mode key reads test data and a live-mode key reads live data. + + + +Use provider `stripe` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync lists records created in the sync window, and reads Stripe's events for updates in the same window. +- **Edits:** An update, such as an invoice being paid, arrives as an event and replaces the record's document. +- **Deletions:** Deletions in Stripe are not detected. A deleted record stays in HydraDB. +- Updates are read from events that reach back 30 days. After a long pause, updates to older records can be missed. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Stripe item + + +When the record was created. It stays the result date after the record is updated, so ranking by date follows creation time. Not searchable. + + + +The Stripe id: `cus_...`, `in_...`, `sub_...` or `ch_...`. Targets one record. Not searchable. + + + +Limits a query to this connector's records. Not searchable. + + + +Always `stripe`. Not searchable. + + + + + +The record type: `customers`, `invoices`, `subscriptions` or `charges`. + + + +Every other field Stripe returns for the record, such as a customer's address, metadata or invoice settings. Kept for inspection only. A query does not match them and cannot filter on them. + + + + +### Customers + +- **One document:** One customer. +- **Title:** The customer's name, or their email when there is no name. +- **Text:** The customer's description, then `Name`, `Email`, `Phone` and `Balance` lines, with the balance in its currency. The title is searchable too. +- **Date:** When the customer was created. +- **Link back:** None. + + +The customer's email. It identifies the customer as a person in the graph, appears in the `Email` line, and is the title when there is no name. + + +### Invoices + +- **One document:** One invoice, with its line items. +- **Title:** `Invoice - `, using the customer's name or email. +- **Text:** The invoice description, then `Customer`, `Email`, `Status`, `Total`, `Amount due`, `Amount paid`, `Due date` and `Line items` lines. Each line item shows its description and amount. The title is searchable too. +- **Date:** When the invoice was created. +- **Link back:** None. +- **Files:** Invoice PDFs are not downloaded. + + +Each line's description and amount, written into the `Line items` line. + + + +The customer id. Links the invoice to its customer. The id itself is not searchable. The customer's name or email is part of the text. + + +### Subscriptions + +- **One document:** One subscription. +- **Title:** The plan's nickname or name, or the plan id, followed by `subscription`. +- **Text:** `Plan`, `Status`, `Amount`, `Quantity`, `Customer`, `Started` and `Current period end` lines. `Amount` is the plan price with its currency and interval, for example `49.00 USD/month`. The title is searchable too. +- **Date:** When the subscription was created. +- **Link back:** None. + + +The plan nickname or name, or the plan id when neither is available, forms the title followed by `subscription`. Its price and billing interval form the searchable `Amount` line. Product or price details that live only in other fields are not searchable. + + + +The customer id links the subscription to its customer. The searchable `Customer` line uses the customer's name when known, or the id otherwise. + + +### Charges + +- **One document:** One charge. +- **Title:** The charge description, or `Charge - ` when there is none. +- **Text:** The charge description, then `Customer`, `Amount`, `Status`, `Receipt email` and `Failure message` lines. `Customer` is the first of the billing name, billing email, receipt email, customer name and customer id that is present. The title is searchable too. +- **Date:** When the charge was created. +- **Link back:** None. + + +The customer id. Links the charge to its customer. The id itself is not searchable unless it is the only customer detail, in which case it fills the `Customer` line. + + +**Example searches** + +- What status, amount due and amount paid are recorded for Acme Corp's invoice INV-0042? +- What plan is jane@example.com subscribed to, and when does the current period end? +- Why did the charge for jane@example.com fail? + +## How it fits into the graph + +- Customers use the Record class. +- Invoices use the Record class. +- Subscriptions use the Record class. +- Charges use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Stripe creates** + +- An invoice to its customer. +- A subscription to its customer. +- A charge to its customer. +- Charges are not linked to their invoice, and invoices are not linked to their subscription. +- No links to other tools. + +**People and groups** + +- Each customer, identified by their email. + +**Found in the text** + +Descriptions, plan names and the rest of each record's summary. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Products, prices and plans as their own documents. +- Events, payouts, refunds, disputes, balance transactions and other Stripe objects. +- Deletions in Stripe. +- Invoice PDFs and hosted invoice pages. diff --git a/essentials/v2/connectors/supabase.mdx b/essentials/v2/connectors/supabase.mdx new file mode 100644 index 00000000..586bf696 --- /dev/null +++ b/essentials/v2/connectors/supabase.mdx @@ -0,0 +1,135 @@ +--- +title: "Supabase" +description: "Receive inserts, updates and deletes from the Supabase tables you choose, one document per row. Rows that existed before you set it up are not loaded." +icon: "/images/connectors/supabase.svg" +--- + +Supabase sends each insert, update and delete on the tables you choose to HydraDB, through Database Webhooks you add in Supabase. Each row is one document, with one searchable line per content column. HydraDB needs no Supabase credentials and does not read your database. + +Rows that existed before you added the webhooks do not come across. Row-level security is not imported, so every row is visible to everyone who can query the collection unless you set an access rule. Deleting a row in Supabase asks HydraDB to remove its document, which can stay if the row is still being indexed or a newer change has replaced it. Changes sent while the connector is paused are lost. + + +Supabase is in beta. + + +## Permissions + + +Supabase permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Supabase row-level security policies are not reproduced. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + + +A row is identified by its table name and primary key only. If two Supabase projects or connectors send a table with the same name to the same collection, rows with the same key overwrite each other. Send them to separate collections. + + +### Credentials + +HydraDB stores no Supabase credentials. Each Supabase webhook sends its changes with a HydraDB API key and the connector id in its headers. + + +The tables to accept, schema-qualified, one per line, for example `public.orders`. A change for any other table is refused. + + +### Set it up + + + + Create the Supabase connector in HydraDB and list the tables you want as `tables`, schema-qualified. A query over `information_schema.tables` can produce the list. An entry in a system schema, or an invalid entry, is rejected. + + + Through the API, you can send a schema for a table in `provider_metadata.schema` when you add it. A schema can name the primary key, the role of each column, a title template, the timestamp column and foreign keys. Without one, the primary key is `id` and the column rules under What gets synced apply. + + + In Supabase, add a Database Webhook on each table for `INSERT`, `UPDATE` and `DELETE` that sends a POST request to HydraDB's `/webhooks/supabase` endpoint. + + + Set the `Authorization` header to `Bearer` followed by a HydraDB API key, and the `X-HydraDB-Connector` header to the connector id. + + + +One connector covers the tables you list in it. + + + +Use provider `supabase` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Nothing is loaded when you connect. Only changes made after the webhooks exist arrive. To bring in an existing row, change it or send its change again. +- **New and changed items:** Each insert or update arrives as it happens and updates the row's document. An insert with no content columns is skipped. +- **Edits:** An update replaces the row's document. A primary-key change asks HydraDB to remove the document under the old key. An update that empties every content column asks HydraDB to remove the row's document under its current key and any replaced key. As with a delete, a document can stay if it is still being indexed or a newer change has replaced it. +- **Deletions:** A delete asks HydraDB to remove the row's document. The document can stay if the row is still being indexed when the delete arrives, or a newer change has already replaced it. +- While the connector is paused, every change, deletes included, is refused, and Supabase does not send it again. +- A change for a table you did not list is refused with an error, so a misconfigured webhook is visible. +- Changes count against HydraDB's ingestion rate limit. A bulk update sends one request per row. + +## What gets synced + +### Rows + +- **One document:** One row of a listed table, identified by its table and primary key. +- **Title:** The table's title template with column values filled in. Without a template, the table name and the row's primary key. +- **Text:** One `column: value` line per non-empty content column, sorted by column name. Nested JSON is written as compact JSON. Without a schema, `id` is the key, timestamp columns, status columns and columns ending in `_id` are kept out of the text, columns starting with `_` are ignored, and every other column is content. Column roles in a schema override these rules. The title is searchable too, so a title template can put a key or status value into searchable text. +- **Date:** The value of the timestamp column named in the table's schema. Without one, the row has no date. +- **Link back:** None. + + +Each content column's value, one line per column. + + + +The column the schema names as the timestamp. Its value is the result date. This date is not searchable as a separate field. + + + +Each foreign key named in the schema, when it has a value, links the row to the row it references. One declaration covers one column, so a key made of several columns cannot be linked. Not searchable. + + + + + +The table name, the row's key and its timestamp value. + + + + +**Example searches** + +- What do our orders rows say about delayed shipments? +- Which support_tickets rows mention a refund? + +## How it fits into the graph + +- Rows use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Supabase creates** + +- A row to each row its schema's foreign keys reference. +- Each row is grouped under its table. +- No links to items in other tools. + +**People and groups** + +No one is attached to a row as a person. + +**Found in the text** + +The content columns of each row. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Rows that existed before the webhooks were added. +- Tables not listed in the connector. Their changes are refused. +- Changes sent while the connector is paused. +- Columns with the ignore role. Columns starting with `_` are ignored unless a schema gives them another role. +- Row-level security policies. diff --git a/essentials/v2/connectors/surveymonkey.mdx b/essentials/v2/connectors/surveymonkey.mdx new file mode 100644 index 00000000..786456b2 --- /dev/null +++ b/essentials/v2/connectors/surveymonkey.mdx @@ -0,0 +1,206 @@ +--- +title: "SurveyMonkey" +description: "Sync the SurveyMonkey surveys you choose: each survey's questionnaire, and each response as question and answer pairs linked to its survey." +icon: "/images/connectors/surveymonkey.svg" +--- + +Sync the SurveyMonkey surveys you select. Each survey is one document with its page text and question wording. Each response is one document of question and answer pairs, linked to its survey. A respondent who gave an email is attached to the response as a person. + +SurveyMonkey team sharing is not imported, so every synced survey and response is visible to everyone who can query the collection unless you set an access rule. On SurveyMonkey Basic plans, only 25 responses per survey come through. Surveys and responses deleted in SurveyMonkey stay in HydraDB. + +## Permissions + + +SurveyMonkey permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Every synced survey and response carries a fixed `additional_metadata.rbac_warning` note saying SurveyMonkey sharing is not captured. The note does not decide who can read the item. An access rule you set still applies. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +SurveyMonkey uses an app access token. + + +The access token of a SurveyMonkey app with the scopes below. + + +**Scopes the token needs** + +- `surveys_read`: View Surveys, to list surveys and read their pages and questions. +- `responses_read_detail`: View Response Details, to read responses with readable answers. + +### Set it up + + + + Create an app in SurveyMonkey and give its token View Surveys and View Response Details. A draft app's token expires after 90 days unless you deploy the app. Replace the token in the connector before then. + + + Paste the app's access token as `access_token`. + + + HydraDB lists the surveys the token can see, by title. Only the first 100 surveys are listed. Select the surveys to sync. Each one syncs separately. + + + +One connector reads the surveys one SurveyMonkey token can see. + + + +Use provider `surveymonkey` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default, by when each survey and response was last modified, or created if there is no modification time. +- **New and changed items:** Each sync reads the questionnaires and responses of each selected survey that were modified in its window. +- **Edits:** A modified questionnaire or response replaces its document. A questionnaire last modified before the window is not read, even while its new responses sync. +- **Deletions:** Deleted surveys and responses are not removed. A survey or response deleted in SurveyMonkey stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every SurveyMonkey item + + +The SurveyMonkey id of the survey or response. Targets one item. Not searchable. + + + +A fixed note that SurveyMonkey sharing is not captured. It does not decide who can read the item. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `surveymonkey`. Not searchable. + + + + + +The record type, `survey_details` or `simplified_responses`, shown when you inspect the item. + + + + +### Surveys + +- **One document:** One selected survey's questionnaire. +- **Title:** The survey title, else its nickname, else `SurveyMonkey survey `. +- **Text:** The nickname when it differs from the title, then each page's title and description and every question, one per line, in survey order. Answer choices are not part of the text. The title is searchable too. +- **Date:** When the survey was last modified, or created if there is no modification time. +- **Link back:** The survey's preview page, else its analyze page, else its address in SurveyMonkey's API. +- **Files:** None. + + +The survey's alternate name. It is the title when there is no survey title, and is written into the text when it differs from the title. + + + +Each page's title and description and each question's wording, in the order the survey shows them. + + + +When the survey was last modified and created. The modification time, else the creation time, sets the result date. Not searchable. + + + + + +The answer choices each question offers, when SurveyMonkey supplies them. Kept for inspection only. A choice a respondent selected is searchable on their response. + + + +Other survey fields SurveyMonkey returns. Kept for inspection only. + + + + +### Responses + +- **One document:** One response to a selected survey. +- **Title:** `SurveyMonkey response `. The title does not name the survey. +- **Text:** The title, then `Respondent` and `Email` lines, then a `Q:` line with the question and an `A:` line with the answer for each answered question. Several answers to one question are joined with `;`. Unanswered questions are left out. +- **Date:** When the response was last modified, or created if there is no modification time. +- **Link back:** The response's analyze page, else its address in SurveyMonkey's API. +- **Files:** None. Only answer text is kept. + + +The respondent's email, when the survey collected it, written as the `Email` line. It attaches the respondent to the response as a person in the graph. + + + +The respondent's name, when collected, written as the `Respondent` line. + + + +Each answered question's wording and the readable answer text. + + + +The survey the response belongs to. Links the response to its survey. Not searchable. + + + +The survey id. Limits a query to the responses of one survey. Not searchable. + + + +When the response was last modified and created. The modification time, else the creation time, sets the result date. Not searchable. + + + + + +Submission details, when present: the respondent's IP address, custom variables, metadata, quiz results and response status. Kept for inspection only. + + + +Other response fields SurveyMonkey returns. Kept for inspection only. + + + + +**Example searches** + +- What questions does the Q3 customer satisfaction survey ask? +- What did respondents answer to "How likely are you to recommend us?" in the NPS survey? +- What did jane@example.com say in their survey response? + +## How it fits into the graph + +- Surveys use the Page class. +- Responses use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections SurveyMonkey creates** + +- A response to its survey. +- No links to other tools. + +**People and groups** + +- The respondent of each response, identified by their email, when the survey collected it. + +**Found in the text** + +The questionnaire text and each response's questions and answers. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Surveys you did not select, and surveys past the first 100 listed. +- Responses past 25 per survey on SurveyMonkey Basic plans. +- Collectors and contacts. +- The answer choices a question offers, in the survey's searchable text. +- SurveyMonkey team sharing. +- Deletions: surveys and responses deleted in SurveyMonkey stay in HydraDB. diff --git a/essentials/v2/connectors/twilio.mdx b/essentials/v2/connectors/twilio.mdx new file mode 100644 index 00000000..c9ba975b --- /dev/null +++ b/essentials/v2/connectors/twilio.mdx @@ -0,0 +1,289 @@ +--- +title: "Twilio" +description: "Sync a Twilio account's SMS and MMS messages, voice calls with Twilio's transcriptions, conferences and debugger alerts, one document each." +icon: "/images/connectors/twilio.svg" +--- + +Sync the communication logs of one Twilio account and the subaccounts its credentials can reach. Each SMS or MMS message, each voice call, each conference and each debugger alert is one document. A call includes the text of Twilio's own transcriptions of its recordings. HydraDB does not transcribe audio, and recordings and MMS media files are not downloaded. + +Twilio permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Phone numbers are searchable text, not people. Items deleted in Twilio stay in HydraDB. + + +Twilio is in beta. + + +## Permissions + + +Twilio permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Twilio uses your Account SID and Auth Token. + + +The Twilio Account SID. + + + +The account's Auth Token. + + +**Connector settings** + + +Hours of message history each sync reads again to catch later changes, such as a new delivery status. Sent as a string. 168 by default. `0` turns the overlap off. + + + +Hours of recording history each sync reads again to catch later changes. Sent as a string. 24 by default. `0` turns the overlap off. + + + + + +The user agent sent to Twilio. A default is set. + + + + +### Set it up + + + + In the Twilio console, copy the Account SID and Auth Token. + + + Enter `account_sid` and `auth_token`. + + + HydraDB offers one resource that covers the whole account. Select it to sync. + + + +One connector reads one Twilio account, plus every subaccount its credentials can reach. You cannot pick subaccounts one by one. + + + +Use provider `twilio` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Messages are found by send time. Calls, conferences and alerts are found by their last update. After the first sync, each sync also reads the last `messages_update_overlap_hours` of messages again. +- **Edits:** A message update, such as a new delivery status, is caught when it happens inside the overlap. An update to a call that ended long ago is not guaranteed to be picked up. A new recording or transcription does not on its own update a call that is already synced. A change to a message's media or a conference's participants updates that message or conference. +- **Deletions:** Messages, calls, conferences and alerts deleted in Twilio stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Twilio item + + +The message, call, conference or alert SID. Picks out one item. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `twilio`. Not searchable. + + +### Messages + +- **One document:** One SMS or MMS message. +- **Title:** The message text, or `Twilio message` and its SID. Search matches the message text, not this title. +- **Text:** `SMS` with the direction, then `From:` with the sending number and `to` with the receiving number, then the message text, then `Media:` with each attachment's content type. The send time is written as a Sent line when Twilio reports one. +- **Date:** When the message was sent, else when it was created, else when it was last updated. +- **Link back:** None. +- **Files:** MMS media is listed by content type. The files are not downloaded. + + +The sending number. It is text only and is not attached as a person in the graph. + + + +The receiving number. It is text only and is not attached as a person in the graph. + + + +The direction, such as `inbound` or `outbound-api`. + + + +When the message was sent, written as the Sent line when present. + + + +When Twilio created the message. The result date when the send time is missing. Not searchable. + + + +When the message last changed. The result date only when the send and creation times are both missing. Not searchable. + + + + + +The delivery status, such as `delivered` or `failed`. It is not searchable and not a filter. + + + +How many media items came with the message. + + + + +### Calls + +- **One document:** One voice call. +- **Title:** `Call`, the direction and the phone numbers that are available. With no numbers, `Twilio call` and its SID. +- **Text:** `Call` with the direction, `From:` and `To:` numbers, `Status:`, `Duration:` in seconds, `Caller:` and `Answered By:`. Then `Transcript:` with the text of every Twilio transcription of the call's recordings. The creation time is written as a Started line. The title is searchable too. +- **Date:** When the call started, else when it was created, else when it was last updated. +- **Link back:** None. +- **Files:** None. Recordings are not downloaded. Only Twilio's own transcription text is used. + + +The caller's number, formatted when available. In the title and the text. Not attached as a person. + + + +The called number. In the title and the text. Not attached as a person. + + + +The call's direction. In the title and the text. + + + +The call status, such as `completed`, `no-answer` or `busy`, written as the Status line. + + + +The call length in seconds, written as the Duration line. + + + +When the call started. Not searchable. + + + +When Twilio created the call record, written as the Started line. It can differ from the actual start. The result date when the start time is missing. + + + +When the call record last changed. The result date only when the start and creation times are both missing. Not searchable. + + + + + +When the call ended. + + + +Whether transcription text was included. + + + + +### Conferences + +- **One document:** One conference call. +- **Title:** The conference's friendly name, or `Twilio conference` and its SID. +- **Text:** `Status:`, `Region:` and `Ended:` with the reason, then `Participants:` with each participant's label and call SID. The creation time is written as a Started line. The title is searchable too. +- **Date:** When the conference was last updated, else when it was created. +- **Link back:** None. + + +The participants' labels, written as the Participants line. The graph records each as a participant, by label, not by email address. + + + +The conference status, written as the Status line. + + + +When the conference was created, written as the Started line. + + + +When the conference last changed. Not searchable. + + + +When the conference was created. The result date when the update time is missing. Not searchable as its own field, though the same time is the Started line. + + +### Alerts + +- **One document:** One Twilio debugger alert, an error or a warning. +- **Title:** The alert text, or `Twilio alert` and its SID. +- **Text:** The alert text, then `Level:`, `Error code:`, `Request:` with the method and URL, and `More info:` with a link. The alert SID is written as a Key line, the log level as Status and Priority lines, and the time as a Created line. The title is searchable too. +- **Date:** When the alert was last updated, else when it was generated. +- **Link back:** The alert's address in Twilio's API. + + +The alert's SID, written as the Key line. + + + +The log level, written as the Status line. + + + +The log level, written as the Priority line. + + + +When the alert was generated, else when Twilio created it, written as the Created line. The result date when the update time is missing. + + + +When the alert last changed. Not searchable. + + +**Example searches** + +- Which outbound calls went unanswered yesterday? +- What did the caller say on the recorded support call this morning? +- What errors did our Twilio account raise about the request URL? + +## How it fits into the graph + +- Messages use the Message class. +- Calls use the Meeting class. +- Conferences use the Meeting class. +- Alerts use the Ticket class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Twilio creates** + +The connector creates no links. A call is not linked to its conference or recordings: transcription text is part of the call document. + +**People and groups** + +- Conference participants, by their labels. +- Phone numbers are text only. They are not attached as people. + +**Found in the text** + +Message text, call details and transcripts, conference details and alert text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Recording audio and MMS media files. +- Transcripts of recordings that Twilio did not transcribe. HydraDB does not transcribe audio. +- Phone number inventories, balances, keys, usage records, addresses, applications, queues and other account configuration. +- Deletions: items deleted in Twilio stay in HydraDB. diff --git a/essentials/v2/connectors/twitter.mdx b/essentials/v2/connectors/twitter.mdx new file mode 100644 index 00000000..5ef6989e --- /dev/null +++ b/essentials/v2/connectors/twitter.mdx @@ -0,0 +1,344 @@ +--- +title: "Twitter" +description: "Sync posts from the X accounts you list and, optionally, the connected account's direct messages. X permissions are not carried over, so direct messages are not private in HydraDB unless you set an access rule." +icon: "/images/connectors/twitter-light.svg" +--- + +Sync posts from the X (Twitter) accounts you list and, optionally, the direct messages of the account that authorized the connector. Each post is one document and includes the text of the post it quotes, replies to or retweets, when available. Direct messages are grouped into one document per conversation per time window, which can repeat up to 12 earlier messages for context. + +X permissions are not imported, so direct messages are visible to everyone who can query the collection unless you set an access rule on the inbox. Retweets are skipped by default. Media is not fetched. Edited posts are not guaranteed to be refreshed, and deleted posts and messages stay in HydraDB. Reads count against your own X developer app. + +## Permissions + + +Twitter permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Direct messages are private on X, but HydraDB does not limit them to the inbox owner. Set an access rule on the inbox before you sync it. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +X uses your own X developer app. For posts, use an app-only bearer token or a user access token. Direct messages need a user access token from the inbox owner, with a refresh token and your app's OAuth client credentials so syncing continues after the access token expires. + + +An app-only bearer token for your X developer app. Reads posts only. + + + + +**User access token, for posts and direct messages** + + +An OAuth 2.0 user access token from the inbox owner. Needed for direct messages. + + + +The matching refresh token. Without it, direct message syncing stops when the access token expires, after about two hours. + + + +Your app's OAuth client id, used to renew the access token. + + + +Your app's OAuth client secret. The app must be a confidential client. + + + + +**Connector settings** + + +The X handles, or numeric user ids, whose posts to sync. + + + +Skip retweets. On by default. + + + +Skip replies. Off by default. + + + +Also read the profiles of the accounts you list, for display names and follower counts. Each profile costs one user read. Off by default. + + + + + +The most posts read per account in one sync, 500 by default and at least 5. Use a whole number. Posts dropped because they fall outside the time window still count. + + + +The most direct message events read in one sync, 1,000 by default and at least 5. Use a whole number. + + + +How far back a first sync reaches when no history window is set, 90 days by default. Use a whole number. Configuring the connector sets a window, which takes its place. + + + +Which direct message event types to read. `MessageCreate` by default. + + + + +**For direct messages** + +- `dm.read`: scope on the user access token. +- `tweet.read`: scope on the user access token. +- `users.read`: scope on the user access token. +- `offline.access`: scope on the user access token, so a refresh token is issued. +- `Read and write and Direct message`: app permission. + +Changing the app's permission level later invalidates tokens already issued. + +### Set it up + + + + Use your own X developer app. Reads are billed to it. For direct messages, give it the Read and write and Direct message permission and make it a confidential client. + + + For posts only, get an app-only bearer token. For direct messages, have the inbox owner authorize the app with the scopes above, and keep the access token and refresh token. + + + Paste `bearer_token`, or paste `access_token`, `refresh_token`, `client_id` and `client_secret`. List the accounts to follow in `handles`. + + + HydraDB looks up each handle or id and lists it as an account to sync. A handle that cannot be found is rejected. With a user access token, HydraDB also lists the owner's inbox. Select the accounts, and select the inbox to sync direct messages. + + + +One connector reads the posts of the accounts you list, and at most one inbox: that of the account that authorized its access token. + + + +Use provider `twitter` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected account and the inbox reach back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads the posts and direct messages created since the last sync. Direct message history that did not fit in one sync continues on later syncs with whatever is left of the read cap, so a busy inbox can delay older history. +- **Edits:** Edits are not tracked. An edited post is not guaranteed to be refreshed. +- **Deletions:** Posts and direct messages deleted on X stay searchable in HydraDB. +- The sync interval for this connector must be between 10 minutes and 6 hours. +- A direct message window is as long as the sync interval, kept between 10 minutes and 6 hours. Changing the interval changes the window for future syncs only. Documents already written keep the old size. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Twitter item + + +The handle, without `@`, of the post's author or of whoever opened a direct message window, written as the From line. The graph records the item as sent by that account. + + + +When the post was published, or when the newest message in a direct message window was sent, written as the Sent line. + + + +The X conversation id. Groups every post, or every direct message window, of one conversation into one thread. Not searchable. + + + +For a post, the author's numeric user id. For direct messages, the conversation id. Not searchable. + + + +For a post, the author's `@handle`. For direct messages, `DM with` and the participants' handles. Not searchable. + + + +`twitter_account` for posts and `twitter_dm_conversation` for direct messages. Separates the two. Not searchable. + + + +The X conversation id. Limits a query to one thread or direct message conversation. Not searchable. + + + +The full URLs of shared links. Finds items that link to a given URL. Searchable on posts, where the full URLs are in the text. Not searchable as a field on direct messages. + + + +For a post, the post it replies to, quotes or retweets. For a direct message window, the first post shared in it. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `twitter`. Not searchable. + + +### Posts + +- **One document:** One post. +- **Title:** The post text on one line, cut to about 80 characters, or `Post by @handle` when there is no text. Search matches the post text, not this title. +- **Text:** `Name (@handle) on X`, then the post text with t.co short links replaced by their full URLs, then the text of the quoted, replied-to or retweeted post, labelled `Quoting`, `In reply to` or `Retweet of`. The author is written as a From line and the time as a Sent line. +- **Date:** When the post was published. +- **Link back:** The post's x.com link. +- **Files:** None. Media is not fetched. + + +Handles mentioned in the post. Finds posts that mention a handle. The graph records each as mentioned. The handles also appear in the post text. + + + +For a reply, the post it answers. Joins the reply to that post. Quotes and retweets are not linked this way. Not searchable. + + + +The author's handle. Limits a query to one author. Not searchable. + + + +The author's display name. Not searchable. + + + +The author's numeric id. Keeps working after a handle change. Not searchable. + + + +The author's follower count when the post was synced, only when `sync_profiles` is on. Not searchable. + + + +The post's detected language. Not searchable. + + + +Whether the post is a reply. Not searchable. + + + +Whether the post is a retweet. Not searchable. + + + +Whether the post quotes another post. Not searchable. + + + +Hashtags, without `#`. Limits a query to a hashtag. This field is not searchable, but hashtags stay in the post text. + + + +The selected account. An access rule you set on it governs its posts. Not searchable. + + +### Direct messages + +- **One document:** All messages of one conversation inside one time window. The window is as long as the sync interval, between 10 minutes and 6 hours. A later sync rewrites the same window document with the complete window. +- **Title:** Built from the window's opening message and how many messages followed. +- **Text:** A single message shows its direction, sender and text, with the text of a shared post or a media count. A longer exchange shows each speaker and message, with up to 12 messages from the previous exchange under `Earlier in the conversation` and the current window under `New messages`. A media count appears only for a message with no text. Each window is marked as a direct message. +- **Date:** When the newest message in the window was sent. +- **Link back:** None. +- **Files:** None. Media is counted, not fetched. + + +The known participants' handles. The graph records each as mentioned. The handles can also appear in the text with each speaker. + + + +The handle of the window's opening sender only, not of every sender in it. Not searchable. + + + +The name of the window's opening sender. Not searchable. + + + +The numeric id of the window's opening sender. Not searchable. + + + +`true` only when every new message in the window was sent from the inbox. `false` covers both mixed and entirely inbound windows. Not searchable. + + + +How many messages the window holds. Not searchable. + + + +How many earlier messages the window repeats for context. Not searchable. + + + +The handles of known participants. Members who never wrote in the history HydraDB read can be missing. Not searchable. + + + +Member ids, only when X provides them. Usually incomplete. Not searchable. + + + +`true` when the conversation is known to have more than two members. `false` or missing does not prove a one-to-one conversation. Not searchable. + + + +The inbox owner's handle, when a message sent from the inbox shows it. Not searchable. + + + +The known participants other than the inbox owner. Left out when the owner's handle is not known. Not searchable. + + + +X media keys. Marks windows that carried media. The media itself is not fetched. Not searchable. + + + +The selected inbox. An access rule you set on it governs its direct messages. Not searchable. + + +**Example searches** + +- What has @competitor posted about pricing this month? +- Which posts from accounts we follow link to our blog? +- What did @jane and I discuss in direct messages about the partnership? + +## How it fits into the graph + +- Posts use the Message class. +- Direct messages use the Message class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Twitter creates** + +- A reply to the post it answers. +- Every post, and every direct message window, to its conversation. +- Quotes and retweets are not linked. Their text is included in the post instead. +- No links to other tools. + +**People and groups** + +- The author of each post, and the opening sender of each direct message window. +- Handles mentioned in a post, and the known participants of a direct message conversation. + +**Found in the text** + +The post or exchange text, including quoted posts and full link URLs. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Media files. +- Lists of liked or bookmarked posts. +- Direct messages, unless you connect with a user access token and select the inbox. +- Retweets, unless you turn off `exclude_retweets`. Replies, when `exclude_replies` is on. +- Profiles as their own documents, and bios, images and other profile fields. +- Replies by accounts you did not list, unless their text arrives as part of a listed account's post. +- Deletions and edits after a post or message was synced. diff --git a/essentials/v2/connectors/typeform.mdx b/essentials/v2/connectors/typeform.mdx new file mode 100644 index 00000000..579dc15e --- /dev/null +++ b/essentials/v2/connectors/typeform.mdx @@ -0,0 +1,211 @@ +--- +title: "Typeform" +description: "Sync forms and their completed and partial responses from the Typeform workspaces you choose. Each response links to its form." +icon: "/images/connectors/typeform-light.svg" +--- + +Sync forms and responses from the Typeform workspaces you select, including forms created later. Each form is one document with its numbered questions and answer options. Each completed or partial response is one document of question and answer pairs, linked to its form. Text in uploaded files can be searchable with the response. + +Typeform workspace membership is not imported, so every synced form and response is visible to everyone who can query the collection unless you set an access rule. That includes respondent emails and other answers. Forms and responses deleted in Typeform stay in HydraDB. + +## Permissions + + +Typeform permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Typeform uses a personal access token. Accounts hosted in the EU also set a region. + + +A Typeform personal access token with the scopes below. + + + +The Typeform data center: `us`, the default, `eu` for EU accounts, or `eu_new` for EU accounts created from August 2025. An EU account without it is read from the US data center. + + +**Scopes the token needs** + +- `forms:read`: to list the forms in each selected workspace and read their questions. +- `responses:read`: to read completed and partial responses and their answers. +- `workspaces:read`: to list workspaces and the forms in each. + +### Set it up + + + + In Typeform, create a personal access token with `forms:read`, `responses:read` and `workspaces:read`. + + + Paste the token as `token`. If the Typeform account is hosted in the EU, set `region` to `eu`, or to `eu_new` for an account created from August 2025. + + + HydraDB lists the workspaces the token can see. Select the ones to sync. Every form in a selected workspace syncs, including forms created later. Each workspace syncs separately. + + + +One connector reads the workspaces one Typeform token can see, in one region. + + + +Use provider `typeform` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads forms updated since the last sync, completed responses by when they were submitted, and partial responses by their `staged_at` time. Response reads overlap the previous sync by 30 minutes. A form not updated in the window is read again only when it gets new responses. +- **Edits:** An updated form replaces its document. A partial response and its completed version share one document, so they are not duplicated. Later changes to a response outside its time window are not guaranteed to come across. +- **Deletions:** Deleted forms and responses are not removed. A form or response deleted in Typeform stays searchable in HydraDB. A form that is deleted, or a workspace the token can no longer see, is skipped, and its earlier documents stay. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Typeform item + + +The form id on a form, and the response id on a response. Targets one item. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `typeform`. Not searchable. + + + + + +The record type, `forms`, `responses` or `partial_responses`, shown when you inspect the item. To limit a query to completed or partial responses, use `additional_metadata.typeform_response_type`. + + + + +### Forms + +- **One document:** One form, with its current questions. +- **Title:** The form title. +- **Text:** The form's questions in order, numbered, with sub-questions indented and numbered 2.1 and so on. A question with choices is followed by an `Options` line. The title is searchable too. +- **Date:** When the form was last updated, or created if there is no update time. +- **Link back:** The public form, else its address in Typeform's API. +- **Files:** None. + + +Every question of the form and the answer options it offers. + + + +When the form was last updated and created. The update time, else the creation time, sets the result date. Not searchable. + + + + + +Every other field of the form. Kept for inspection only. + + + + +### Responses + +- **One document:** One completed or partial response. +- **Title:** `Response to
` or `Partial response to `. Without a form title, `Typeform response ` or `Typeform partial response `. +- **Text:** The title, then a `Q:` line with the question and an `A:` line with the answer for each answer, in the form's question order. Choices show as their labels, yes or no questions as yes or no, file uploads as the file name, and payments as name and amount. Then `Hidden fields`, `Score`, `Browser`, `Platform` and `Came from` lines. +- **Date:** When the response was submitted, else its `staged_at` time, else its `landed_at` time. +- **Link back:** None. +- **Files:** Files uploaded in answers. Supported files are downloaded with your token and their text is searchable with the response. If a file cannot be downloaded or read, only its name is searchable. + + +Each answer, labelled by its question, so a search can match the question and the answer together. + + + +Each uploaded file's name, in its answer, and the file's text when it can be read. + + + +Hidden fields passed to the form, written as the `Hidden fields` line. + + + +The response's score, written as the `Score` line only for forms that define a score. + + + +The page the respondent came from, written as the `Came from` line with only its host and path. The full address is kept for inspection. + + + +The respondent's browser family, written as the `Browser` line. Limits a query to responses from one browser family. + + + +The respondent's device class, written as the `Platform` line. Limits a query to responses from one device class. + + + +`completed` or `partial`. Includes or leaves out responses that were never submitted. Not searchable. + + + +The form id. Limits a query to the responses of one form. Not searchable. + + + +The form the response belongs to. Links the response to its form. Not searchable. + + + +Response times. The first one present, in this order, sets the result date. Not searchable. + + + + + +Every other field of the response. Kept for inspection only. + + + + +**Example searches** + +- What questions does the Customer Onboarding form ask, and what options does question 3 offer? +- What did respondents answer to "What is your biggest challenge?" on the Feedback form? +- What does the resume PDF uploaded in the job application response say? + +## How it fits into the graph + +- Forms use the Page class. +- Responses use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Typeform creates** + +- A response to its form. +- No links to other tools. + +**People and groups** + +No people are attached to items. A respondent's name or email in an answer is part of the text only. + +**Found in the text** + +Form questions and options, response answers, and the text of uploaded files. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Workspaces you did not select. +- Respondents' network ids and user agents. +- Typeform workspace membership. +- Deletions: forms and responses deleted in Typeform stay in HydraDB. diff --git a/essentials/v2/connectors/wrike.mdx b/essentials/v2/connectors/wrike.mdx new file mode 100644 index 00000000..8f78620e --- /dev/null +++ b/essentials/v2/connectors/wrike.mdx @@ -0,0 +1,199 @@ +--- +title: "Wrike" +description: "Sync tasks and their comments from the Wrike spaces you choose. Wrike sharing is not imported." +icon: "/images/connectors/wrike.svg" +--- + +Sync tasks and their comments from the Wrike spaces you select, including tasks anywhere inside each space. Each task is one document with its description and status. Each comment on a task is its own document, linked to the task. A subtask links to each of its parent tasks. + +Wrike sharing is not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Assignees, folders, projects, custom fields and attachments are not synced. Tasks and comments deleted in Wrike stay in HydraDB. + +## Permissions + + +Wrike permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Wrike sharing is not captured. Set an access rule on each space that should be restricted. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Wrike uses a permanent access token. + + +A Wrike permanent access token. + + +### Set it up + + + + In Wrike, open Apps and Integrations, API, and create a permanent access token for a user who can see the spaces you will select. + + + Paste the token as `token`. + + + HydraDB lists your Wrike spaces. Select the spaces to sync. Tasks anywhere inside a selected space are synced. + + + +One connector reads what one token's Wrike user can see. + + + +Use provider `wrike` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** A newly selected space reads back the window set by `lookback_days`, 30 days by default, measured on when tasks were last updated. +- **New and changed items:** Each sync reads the tasks updated since the last sync in each selected space. It then reads the comments on those tasks and keeps the ones updated since the last sync. +- **Edits:** An edited task is picked up through its last-updated time and updates its document. An edited comment is picked up only when its task is read in the same sync, so a comment edit can be missed. +- **Deletions:** Tasks and comments deleted in Wrike stay searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Wrike item + + +Limits a query to this connector's items. Not searchable. + + + +Always `wrike`. Not searchable. + + +### Tasks + +- **One document:** One Wrike task. Its comments are separate documents. +- **Title:** The task title, or `Wrike task` and its id when the title is empty. +- **Text:** The task description as plain text, or the brief description when there is none. The status and the task id are written as lines too. The title is searchable too. +- **Date:** When the task was last updated, or when it was created if there is no update time. +- **Link back:** The task's Wrike permalink. +- **Files:** Attachments are not synced. + + +The Wrike task id. It keeps later syncs on the same document. + + + +`Active`, `Completed`, `Deferred` or `Cancelled`, written as the `Status` line. + + + +When the task was last updated. Sets the result date and decides when a sync picks the task up. Not searchable. + + + +The tasks this task is a subtask of. A task can have several. Links the task to each parent. Not searchable. + + + +Names of people @mentioned in the description, leaving out group mentions. The graph records each as mentioned by the task. The field itself is not searchable, but the description is. + + + +The Wrike task id. Picks out one task. Not searchable. + + + + + +`High`, `Normal` or `Low`. It is not written into the text. + + + +When the task was created. It is not written into the text. + + + +When the task was completed. + + + + +### Comments + +- **One document:** One comment on a task. +- **Title:** `Wrike comment` and the comment id. The title carries no content, so search matches the comment text. +- **Text:** The comment as plain text. The author and the task id are written with it. +- **Date:** When the comment was created, or updated if there is no creation time. +- **Link back:** None. + + +The author's first and last name from Wrike contacts, or the author's id when no name is found, written as the `Author` line. The graph records the comment as written by that person. + + + +The id of the task the comment is on, written as the `Parent` line. Links the comment to that task, so a task and its discussion are found together. + + + +Names of people @mentioned in the comment. The graph records each as mentioned. The field itself is not searchable, but the comment text is. + + + +The Wrike comment id. Picks out one comment. Not searchable. + + + +The id of the task. Returns every comment on one task. Not searchable. + + + + + +The author's Wrike contact id. + + + +When the comment was created and last updated, as Wrike sends them. + + + + +**Example searches** + +- What does the Wrike task about the vendor contract say? +- Which Wrike tasks are Deferred? +- Who commented on the budget review task? + +## How it fits into the graph + +- Tasks use the Ticket class. +- Comments use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Wrike creates** + +- A subtask to each of its parent tasks. +- A comment to its task. +- No links to items in other tools. + +**People and groups** + +- The author of each comment. +- People @mentioned in task descriptions and comments. +- Task assignees are not synced. + +**Found in the text** + +Task descriptions and comment text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Spaces you did not select. +- Folders, projects and spaces as items of their own. +- Comments on folders and projects. +- Task assignees, custom fields and dependencies. +- Attachments. +- Timelogs, workflows and custom field definitions. diff --git a/essentials/v2/connectors/xero.mdx b/essentials/v2/connectors/xero.mdx new file mode 100644 index 00000000..282a256d --- /dev/null +++ b/essentials/v2/connectors/xero.mdx @@ -0,0 +1,300 @@ +--- +title: "Xero" +description: "Sync contacts, invoices, payments and bank transactions from one Xero organisation, with files attached to contacts, invoices and bank transactions. Records link to their contact, and payments link to their invoice." +icon: "/images/connectors/xero.svg" +--- + +Sync contacts, invoices, payments and bank transactions from one Xero organisation. Each record is one document. Invoices and bank transactions link to their contact, and payments link to the invoice they settle. Files attached to contacts, invoices and bank transactions are separate documents, and their text is searchable when the file can be downloaded and read. + +Xero permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Records deleted in Xero stay in HydraDB. Accounts, items, credit notes, quotes and other Xero objects are not synced. + + +Xero is in beta. + + +## Permissions + + +Xero permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Xero uses the client id and client secret of a Xero developer app, with a refresh token and the id of the organisation you connect. + + +The client id of your Xero app, from its Configuration page. + + + +The client secret of the same app. + + + +A refresh token from completing Xero's OAuth flow for the organisation. + + + +The id of the Xero organisation the tokens belong to. + + + +Leave it empty. HydraDB obtains access tokens itself. + + +A Xero refresh token can be used only once. Each time it is used, Xero issues a new one, and HydraDB stores it itself. + +### Set it up + + + + In the Xero developer portal, create an app and copy its client id and client secret. + + + Complete Xero's OAuth flow for the organisation you want to connect. Copy the refresh token and the organisation's tenant id. + + + Paste the values as `client_id`, `client_secret`, `refresh_token` and `tenant_id`. Saving the connector does not test the credentials, because a test would use up the single-use refresh token. The first sync is the test. + + + Select the `All data` resource. It syncs contacts, invoices, payments, bank transactions and their attached files together. You cannot select individual contacts or invoices. + + + +One connector reads one Xero organisation. + + + +Use provider `xero` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads contacts, invoices, payments and bank transactions updated since the last sync. Attached files are checked for the contacts, invoices and bank transactions in that window. +- **Edits:** An updated record replaces its document. +- **Deletions:** Deleted records are not removed. A record deleted in Xero stays searchable in HydraDB. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Xero item + + +The Xero id: the contact id, the invoice, payment or bank transaction id, or the attachment id. Finds one record. Not searchable. + + + +Limits a query to this connector's records. Not searchable. + + + +Always `xero`. Not searchable. + + + + + +The record type, such as `contacts` or `invoices`. + + + +The other fields HydraDB reads from Xero for the record. Kept for inspection only. A query does not match them and cannot filter on them. + + + + +### Contacts + +- **One document:** One contact: a customer or a supplier. +- **Title:** The contact's name. Otherwise the first and last name. +- **Text:** Contact details: the name, first and last name, email, phone numbers, lifecycle stage (the contact status), URL (the website), whether the contact is a person or an organization, the organization name and the update time. Then the name again, followed by `Email`, `Phones`, `Website`, `Status` and `Account number` lines. The title is searchable too. +- **Date:** When the contact was last updated in Xero. +- **Link back:** None. +- **Files:** Files attached to a contact arrive as separate attachment documents linked to it. + + +The contact's name. It forms the title, and names a person contact in the graph. + + + +The contact's first name. Forms the title when there is no name, and makes the contact a person. + + + +The contact's last name. Forms the title when there is no name, and makes the contact a person. + + + +The contact's email address. Identifies a person contact in the graph. + + + +Person when the contact has a first or last name, otherwise organization. Decides whether the graph records the contact as a person. + + + +The Xero contact id. Identifies a person contact in the graph. An organization contact is not made a person from it. + + + +The contact's phone numbers, without their area and country codes joined on. + + + +The contact's name, when it differs from the person's name. Adds the organization to the contact details. It does not link the person to a separate company. + + + +The contact's status, website and account number. + + + +When the contact was last updated. It is the result date and appears in the contact details as `Updated`. + + +### Invoices + +- **One document:** One sales or purchase invoice. +- **Title:** `Invoice - `. When a part is missing, the record type and id are used instead. +- **Text:** The reference, then `Contact`, `Type`, `Status`, `Total` and `Amount due` with the currency, `Due date` and `Line items` lines. The title is searchable too. +- **Date:** When the invoice was last updated in Xero. +- **Link back:** The URL set on the invoice in Xero, when there is one. Otherwise none. +- **Files:** Files attached to an invoice arrive as separate attachment documents linked to it. + + +The contact the invoice belongs to. Its id links the invoice to the contact's document. Its name is in the title and the `Contact` line. The id itself is not searchable. + + + +The invoice number, in the title. + + + +Each line's description. Quantities, prices and account codes are stored but not searchable. + + + +When the invoice was last updated. Not searchable. + + +### Payments + +- **One document:** One payment against an invoice. +- **Title:** `Payment - `. When a part is missing, the record type and id are used instead. +- **Text:** The reference, then `Contact`, `Invoice` (the invoice number), `Amount`, `Type`, `Status` and `Date` lines. The title is searchable too. +- **Date:** When the payment was last updated in Xero. +- **Link back:** None. + + +The invoice the payment settles. Its id links the payment to the invoice's document. The invoice number and contact name are in the text, and the contact name can be in the title. + + + +The payment amount, with its currency when Xero supplies one. In the title and the `Amount` line. + + + +When the payment was last updated. Not searchable. + + +### Bank transactions + +- **One document:** One bank transaction. +- **Title:** `Bank transaction - `. When a part is missing, the record type and id are used instead. +- **Text:** The reference, then `Contact`, `Type`, `Status`, `Total`, `Date` and `Line items` lines. The title is searchable too. +- **Date:** When the transaction was last updated in Xero. +- **Link back:** The URL set on the transaction in Xero, when there is one. Otherwise none. +- **Files:** Files attached to a bank transaction arrive as separate attachment documents linked to it. + + +The contact the transaction belongs to. Its id links the transaction to the contact's document. Its name is in the title and the `Contact` line. The id itself is not searchable. + + + +Each line's description. Quantities, prices and account codes are stored but not searchable. + + + +When the transaction was last updated. Not searchable. + + +### Attached files + +- **One document:** One file attached to a contact, an invoice or a bank transaction. +- **Title:** The file name, or the attachment id when there is none. +- **Text:** When the file is read, its text, followed by a `Data` section with the parent record's id and type. When it is not read, `Parent`, `Parent type`, `File` and `Content type` lines. The title is searchable either way. +- **Date:** None. HydraDB does not keep when a file was added or changed. +- **Link back:** None that opens in the Xero app. +- **Files:** Supported files are downloaded and read. When a file cannot be downloaded or read, only its details are searchable. + + +The text read from the file, such as a receipt PDF. + + + +The Xero id of the contact, invoice or bank transaction the file is attached to. Links the file to that record, and the graph places the file under it. Not a query filter. + + + +`contacts`, `invoices` or `bank_transactions`: the kind of record the file is attached to. + + + +The file's media type. Searchable only when the file was not read. Otherwise kept for inspection. + + + + + +The file size in bytes. + + + + +**Example searches** + +- What is still due on invoice INV-0042 for Acme Ltd? +- Which payments settled invoice INV-0042, and when? +- What is the email and phone number for supplier Office Supplies Co? + +## How it fits into the graph + +- Contacts use the Contact class. +- Invoices use the Page class. +- Payments use the Page class. +- Bank transactions use the Page class. +- Attached files use the Record class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Xero creates** + +- An invoice to its contact. +- A bank transaction to its contact. +- A payment to the invoice it settles. +- An attached file to its contact, invoice or bank transaction, and under that record. +- No links to other tools. + +**People and groups** + +- Each contact with a first or last name, as a person, identified by name, email and Xero contact id. +- Other contacts are organizations. A person contact is not linked to a separate company. + +**Found in the text** + +References, line descriptions, contact details and the text of attached files. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Accounts, items, credit notes, purchase orders, quotes, journals, manual journals and other Xero objects. +- Archived contacts. The connection form does not offer an option to include them. +- Files attached to anything other than contacts, invoices and bank transactions. +- Deletions: records deleted in Xero stay in HydraDB. +- When an attached file was added or changed. diff --git a/essentials/v2/connectors/zendesk.mdx b/essentials/v2/connectors/zendesk.mdx new file mode 100644 index 00000000..bf4bf9d7 --- /dev/null +++ b/essentials/v2/connectors/zendesk.mdx @@ -0,0 +1,259 @@ +--- +title: "Zendesk" +description: "Sync Zendesk Support tickets and their comments from the brands you choose. Group-based ticket access carries over when Enforce ACL is on and HydraDB can work out the readers." +icon: "/images/connectors/zendesk-light.svg" +--- + +Sync Zendesk Support tickets from the brands you select, with every comment on them: public replies and internal notes. Each ticket is one document and each comment is its own document, linked to its ticket. PDF and DOCX files attached to comments are read, and their text is searchable with the comment. + +A ticket assigned to a group can be restricted to that group's members, the assignee, the requester and Zendesk admins. A ticket with no assigned group carries no Zendesk permissions. Search applies these restrictions only when Enforce ACL is on. Authorize as a Zendesk administrator, or only that person's own tickets sync. Satisfaction ratings and Help Center articles are not synced. + +## Permissions + +Turn on **Enforce ACL** for this connector to make search follow Zendesk permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL](/essentials/v2/connectors#enforce-acl). + +- **Who can read an item:** A ticket with an assigned group can be read by the group's members, the assignee, the requester and Zendesk admins. A comment can be read by its ticket's readers. The requester cannot read an internal note, unless they also have access as an admin, the assignee or a group member. +- **How a person is identified:** A Zendesk user's email address. +- **When permissions cannot be read:** If a group's memberships are missing or incomplete, a member cannot be identified, a ticket has too many readers, or a comment's ticket cannot be found, the item gets a permission warning, which you can find with `additional_metadata.rbac_warning`. On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status). +- A ticket with no assigned group carries no Zendesk permissions and gets no warning. It follows the access rule you set on its resource. With no rule, it is visible to everyone who can query the collection, and so are its comments, including internal notes. +- Readers come from the assigned group and the people named on the ticket. Other Zendesk visibility settings are not reproduced. +- Readers are worked out when a ticket is synced. Do not rely on a change to Zendesk group membership to remove access right away. + +You can also [set your own rule on a resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + +## Before you connect + +### Credentials + +Zendesk uses an OAuth access token, with a refresh token and the OAuth client id and secret so HydraDB can renew it. OAuth is the recommended option for a new connection. An existing Zendesk API token also works. + + +Your Zendesk subdomain, for example `acme` for `acme.zendesk.com`. + + + +An OAuth access token. + + + +The OAuth refresh token, used to renew the access token. + + + +The OAuth client id. + + + +The OAuth client secret. + + + + +**Existing API token** + + +A Zendesk API token. Send it with `subdomain` and `email`. + + + +The email of the Zendesk user the API token belongs to. + + + + +**What the connection needs** + +- `read`: OAuth scope. +- `Administrator`: the Zendesk role of the person who authorizes. Otherwise only that person's own tickets sync. + +### Set it up + + + + Sign in to Zendesk as an administrator and authorize the connection with the `read` scope. + + + Enter `subdomain` and the OAuth token fields. + + + HydraDB lists the account's brands. Select the ones to sync. Tickets from every brand are still read from Zendesk and filtered afterwards. A comment follows its ticket's brand. + + + +One connector reads one Zendesk subdomain. + + + +Use provider `zendesk` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Each selected brand reaches back the window set by `lookback_days`, 30 days by default. Comments come with the tickets in that window. +- **New and changed items:** Each sync reads tickets changed since the last sync, with their comments. +- **Edits:** A changed ticket is read again with its comments and updates their documents. +- **Deletions:** Tickets deleted in Zendesk stay searchable in HydraDB. +- Zendesk users, groups, group memberships and organizations are read for the whole account on every sync, whatever brands you select. They name people and decide who can read a ticket. They are not documents of their own. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Zendesk item + + +The ticket id on a ticket, the comment id on a comment. Targets one item, and keeps later syncs on the same document. Not searchable. + + + +Set when HydraDB could not fully work out who can read the item, or when a group that granted access was deleted. A warning does not by itself mean the item is public. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `zendesk`. Not searchable. + + + +The people who can read the item, worked out as described under Permissions. Not searchable. + + +### Tickets + +- **One document:** One ticket. +- **Title:** The ticket subject. A ticket without one gets a title with its ticket id. +- **Text:** The ticket description, or the subject when the description is empty. Then `Requester`, `Assignee`, `Organization` and `Group` lines. The status, priority and creation time are part of the text too. The subject is searchable too. +- **Date:** When the ticket was last updated, else when it was created. +- **Link back:** The ticket in the Zendesk agent interface. +- **Files:** None on the ticket itself. Attachments are on its comments. + + +New, open, pending, hold, solved or closed, written as a `Status` line. + + + +Urgent, high, normal or low, written as a `Priority` line. + + + +The requester's name, written as the `Requester` line, where HydraDB can identify the customer. + + + +The assigned agent's name, written as the `Assignee` line. The graph records the ticket as assigned to that agent. + + + +The organization's name, written as the `Organization` line, where HydraDB can identify the company. + + + +The assigned group's name, written as the `Group` line. Who can read the ticket is worked out from the group's members, not from this name. + + + +When the ticket was created, written as a `Created` line. Used as the result date only when the update time is missing. + + + +When the ticket was last updated. Not searchable. + + + + + +Problem, incident, question or task. + + + +The ticket's tags. They are not part of the searchable text. + + + +The ticket's address in the Zendesk API. The link back is the agent interface address. + + + + +### Comments + +- **One document:** One comment on a ticket: a public reply or an internal note. +- **Title:** `Comment by` and the author's name. Without an author, the first 80 characters of the comment. +- **Text:** An `Author` line, then the plain text of the comment, or `Attachment:` and the file name for a comment that has only an attachment. The ticket id and the creation time are part of the text too. +- **Date:** When the comment was created. +- **Link back:** None. Open the ticket from its own document. +- **Files:** PDF and DOCX attachments up to 25 MiB are downloaded and read, and their text is searchable with the comment. An attachment that fails HydraDB's checks is skipped. Documents in other formats are not read. + + +The name of the person who wrote the comment, written as the `Author` line. The graph records the comment as written by that person. + + + +Names @mentioned in an internal note. The names stay in the note text, and the graph records each as mentioned. + + + +The ticket the comment belongs to, written into the text as the ticket id. Links the comment to its ticket. The ticket's text is read together with the comment. + + + +The id of the ticket the comment belongs to. Returns every comment on one ticket. Not searchable. + + + +When the comment was created, written as a `Created` line. + + + +True for a public reply, false for an internal note. The requester cannot read an internal note through being the requester. Not searchable. + + + + + +The Zendesk user id of the comment's author. + + + + +**Example searches** + +- What did we tell Acme about the export bug? +- Which urgent tickets are open for the billing group? +- What did an agent write on ticket 123? + +## How it fits into the graph + +- Tickets use the Ticket class. +- Comments use the Comment class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Zendesk creates** + +- A comment to its ticket. +- No links to other tools. + +**People and groups** + +- The assigned agent of each ticket. +- The author of each comment. +- Names @mentioned in an internal note. +- The requester, the organization and the group appear in the ticket text, where HydraDB can identify them. + +**Found in the text** + +The ticket description with its requester, assignee, organization and group lines, the comment text, and the text of attached PDF and DOCX files. Each comment is read together with its ticket's text. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Brands you did not select. +- Satisfaction ratings. +- Help Center articles and community posts. +- Ticket audits, macros, ticket fields and forms, SLA policies and metric events. +- Ticket custom fields. +- Attached documents in formats other than PDF and DOCX. diff --git a/essentials/v2/connectors/zoho-crm.mdx b/essentials/v2/connectors/zoho-crm.mdx new file mode 100644 index 00000000..b7cabbde --- /dev/null +++ b/essentials/v2/connectors/zoho-crm.mdx @@ -0,0 +1,581 @@ +--- +title: "Zoho CRM" +description: "Sync records, notes and file attachments from the Zoho CRM modules you choose, including custom modules. Zoho CRM permissions are not imported." +icon: "/images/connectors/zoho-crm.svg" +--- + +Sync the Zoho CRM modules you select: leads, contacts, accounts, deals, tasks, cases, notes, and custom and other modules. Each record is one document, with its description and its other visible fields as labeled lines. Each note and each file attached to a record is its own document, linked to that record. Uploaded files in supported formats are read, and their text is searchable. + +Zoho CRM sharing and permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. In a module that has only a creation date, edits to older records can be missed. Records deleted in Zoho CRM stay in HydraDB. + + +Zoho CRM is in beta. + + +## Permissions + + +Zoho CRM permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +- Zoho CRM module visibility, record owners and record sharing are not reproduced. + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Zoho CRM uses an OAuth client id and secret with a refresh token for the account. + + +The Zoho OAuth client id. + + + +The Zoho OAuth client secret. + + + +A Zoho OAuth refresh token for the account. + + + +The Zoho data center of the account, such as `com`, `in`, `eu`, `com.au`, `jp` or `ca`. Defaults to `com`, the US data center. A refresh token works only in its own data center. + + +### Set it up + + + + In Zoho, create an OAuth client and generate a refresh token for the account you want to sync. + + + Paste the client id, client secret and refresh token. If your Zoho account is not in the US data center, set `data_center`, or the token is rejected. + + + HydraDB lists the modules in the account. Select the ones to sync. Only selected modules sync. + + + +One connector reads one Zoho CRM account. + + + +Use provider `zoho_crm` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reaches back the window set by `lookback_days`, 30 days by default. A module with no modification or creation date is read in full. +- **New and changed items:** A module with a modification date picks up records changed since the last sync. A module with only a creation date picks up new records. A module with neither is read in full on every sync. Files are listed only for records synced in the same sync. +- **Edits:** An edited record updates its document when its module has a modification date or is read in full. In a module with only a creation date, edits to older records can be missed. +- **Deletions:** Records deleted in Zoho CRM stay searchable in HydraDB. +- Zoho users are read on every sync to name record owners. They are not documents of their own. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + + +Zoho CRM items are stored with the provider value `zoho-crm`, with a hyphen. Use that value when you filter on `provider`. + + +### On every Zoho CRM item + + +The Zoho CRM record id. Targets one record, and keeps later syncs on the same document. Not searchable. + + + +The module's API name in lower case, such as `deals`. Limits a query to one module. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `zoho-crm`, with a hyphen. Not searchable. + + + +Every other visible field of the module, written as labeled lines. A link to another record is written as that record's name or email. Hidden fields are left out. + + +### Leads, contacts and accounts + +- **One document:** One lead, contact or account. +- **Title:** For a lead or contact, the full name, else the first and last name, the company or the email. For an account, the account name. Otherwise a title with the record id. +- **Text:** The description, then `Label: value` lines. Leads: `Name`, `Company`, `Status`, `Email` and `Owner`. Contacts: `Name`, `Account`, `Email`, `Title` and `Owner`. Accounts: `Account`, `Industry`, `Website` and `Owner`. Then the module's other fields, then the owner's email. The name is searchable too. +- **Date:** When the record was last modified, else when it was created. +- **Link back:** The record's URL field, else its website, when it has one. This can be the company's website rather than the record in Zoho CRM. +- **Files:** Files attached to the record are their own documents. + + +The person's or account's name. For a lead or contact, the graph treats the record as that person. + + + +Person for leads and contacts, organization for accounts. Decides whether the record stands for a person in the graph. + + + +The primary email, else another email on the record. Identifies the person in the graph. + + + +The record's other email addresses. Connected to the same person in the graph. + + + +The first name. + + + +The last name. + + + +The record's phone numbers, so a person can be found by phone. + + + +The person's title or designation. + + + +The account name on a contact, the company name on a lead. + + + +The id of a contact's account. Links the contact to the account as a member. + + + +A lead's company, written as the `Company` line. + + + +A lead's status, written as the `Status` line. + + + +A contact's account name, written as the `Account` line. + + + +An account's industry, written as the `Industry` line. + + + +An account's website, written as the `Website` line. + + + +The contact status, lead status or account type. + + + +The record's labels. + + + +The record's tags. + + + +The record's URL field, else its website. Used as the link back. + + + +The Zoho CRM record id. Identifies the person in the graph, and keeps later syncs on the same document. + + + +The owner's name or email, written as the `Owner` line. The graph records the owner of the record. + + + +The owner's email. Identifies the owner in the graph. + + + +When the record was created. Used as the result date only when the modification time is missing. + + + +When the record was last modified. + + + + + +A copy of the record's name. + + + +The owner's Zoho user id. + + + +The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`. + + + + +### Deals, tasks and cases + +- **One document:** One deal, task or case. +- **Title:** A deal's name. For a task or case, its subject or title. Otherwise a title with the record id. +- **Text:** For a deal, the description, then `Deal`, `Account`, `Stage`, `Amount`, `Closing date` and `Owner` lines, then its other fields. For a task or case, all its fields as labeled lines. The title and creation time are searchable too. +- **Date:** When the record was last modified, else when it was created. +- **Link back:** None. +- **Files:** Files attached to the record are their own documents. + + +A deal's amount, written as the `Amount` line. + + + +A deal's stage, written as the `Stage` line. + + + +A deal's expected closing date, written as the `Closing date` line. It is not the result date. + + + +The linked account's name, written as the `Account` line. + + + +The record's email field, when it has one. + + + +The owner's name, written as the `Owner` line. + + + +The owner's email. + + + +When the record was created, written as a `Created` line. Used as the result date only when the modification time is missing. + + + +When the record was last modified. Not searchable. + + + + + +A copy of the record's title. + + + +The owner's Zoho user id. + + + +The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`. + + + + +### Notes + +- **One document:** One note. Notes with neither content nor a title are skipped. +- **Title:** `Comment by` and the note owner's name or email. Without one, the first 80 characters of the text. +- **Text:** A `Parent` line naming the record the note is on, with its id, module and name. Then the note content, or the note title when there is no content, then the note's other fields. The author and the created and updated times are part of the text too. +- **Date:** When the note was last modified, else when it was created. +- **Link back:** None. + + +The note owner's name or email. The graph records the note as written by that person. + + + +The note's title. Searchable when the note has no content. Otherwise it is kept with the note. + + + +The record the note is on, written in the `Parent` line. Links the note to that record, in any module. + + + +The name of the record the note is on, written in the `Parent` line. + + + +The module of the record the note is on, written in the `Parent` line when it is known. + + + +The id of the record the note is on. Returns every note on one record. Not searchable. + + + +When the note was created, written as a `Created` line. Used as the result date only when the modification time is missing. + + + +When the note was last modified, written as an `Updated` line. + + + + + +A copy of the note owner. The author is the searchable value. + + + +The note owner's Zoho user id. + + + +The note owner's email. + + + + +### Attachments + +- **One document:** One file attached to a record. +- **Title:** The file name. Otherwise a title with the attachment id. +- **Text:** The file name with `File type`, `Size` and `Parent name` lines, the file's other fields, the owner and an `Updated` line. When the file was downloaded and read, its text is searchable too. +- **Date:** When the attachment was last modified, else when it was created. +- **Link back:** None. +- **Files:** Uploaded files in supported formats up to 50 MiB are downloaded and read. Larger files keep only their details. Link attachments are not downloaded. Files attached to notes are not synced. + + +The file type Zoho reports, written as the `File type` line. It is not always a MIME type. + + + +The file size in bytes, written as the `Size` line. + + + +The name of the record the file is attached to, written as the `Parent name` line. + + + +The record the file is attached to. Links the file to that record when its module is known. Written into the text only when the record's name is missing. + + + +The module of the record the file is attached to. Makes sure the link goes to the right kind of record. Written into the text only when the record's name is missing. + + + +The id of the record the file is attached to. Returns every file on one record. Not searchable. + + + +The module of the record the file is attached to. Finds files by their record's module. Not searchable. + + + +The kind of record the file is attached to. Finds files by that kind. Not searchable. + + + +When the attachment was last modified, written as the `Updated` line. + + + +When the attachment was created. Used as the result date only when the modification time is missing. Not searchable. + + + + + +Always `attachments`. + + + + +### Solutions and custom modules + +- **One document:** One record of the Solutions module, or of a custom or other module not listed on this page. +- **Title:** The record's name, subject or title. Otherwise a title with the record id. +- **Text:** Every field of the record as labeled lines, then the owner and an `Updated` line. The title is searchable too. +- **Date:** When the record was last modified, else when it was created. +- **Link back:** None. +- **Files:** Files attached to the record are their own documents. + + +The record's email field, when it has one. + + + +The owner's name. + + + +The owner's email. + + + +When the record was last modified, written as the `Updated` line. + + + +When the record was created. Used as the result date only when the modification time is missing. Not searchable. + + + + + +A copy of the record's title. + + + +The owner's Zoho user id. + + + +The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`. + + + + +### Events, meetings and calls + +- **One document:** One event, meeting or call record. +- **Title:** The record's name, subject or title. Otherwise a title with the record id. +- **Text:** Every field of the record as labeled lines, then the owner. The title is searchable too. +- **Date:** When the record was last modified, else when it was created. +- **Link back:** None. +- **Files:** Files attached to the record are their own documents. + + +The record's email field, when it has one. + + + +The owner's name. + + + +The owner's email. + + + +When the record was last modified. Not searchable. + + + +When the record was created. Used as the result date only when the modification time is missing. Not searchable. + + + + + +A copy of the record's title. + + + +The owner's Zoho user id. + + + +The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`. + + + + +### Emails + +- **One document:** One record of an email module. +- **Title:** The record's name, subject or title. Otherwise a title with the record id. +- **Text:** Every field of the record as labeled lines, then the owner. The title and creation time are searchable too. +- **Date:** When the record was last modified, else when it was created. +- **Link back:** None. +- **Files:** Files attached to the record are their own documents. + + +The record's email field, when it has one. + + + +The owner's name. + + + +The owner's email. + + + +When the record was created, written as the email's date. Used as the result date only when the modification time is missing. + + + +When the record was last modified. Not searchable. + + + + + +A copy of the record's title. + + + +The owner's Zoho user id. + + + +The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`. + + + + +**Example searches** + +- Which deals for Acme are at the Negotiation stage? +- What notes were left on this lead? +- What does the contract attached to the Acme account say? + +## How it fits into the graph + +- Leads, contacts and accounts use the Contact class. +- Deals, tasks and cases use the Ticket class. +- Notes use the Comment class. +- Attachments use the Page class. +- Solutions and custom modules use the Page class. +- Events, meetings and calls use the Meeting class. +- Emails use the Email class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Zoho CRM creates** + +- A note to the record it is on, in any module. +- A file to the record it is attached to. +- A deal or contact to its account, and a contact to its account as a member. +- Any record to every record named in its lookup fields, up to 100 per record. +- No links to other tools. + +**People and groups** + +- A lead or contact stands for that person, identified by name and email. +- The owner of each lead, contact and account. +- The author of each note. +- Owners of other records appear only in their text. + +**Found in the text** + +Descriptions, note content, the text read from attached files, and the other fields of each record. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Modules you did not select. +- Hidden, unreadable and virtual fields. +- Profiles, roles, territories, currencies and organization settings. +- The contents of link attachments, and the text of files over 50 MiB. +- Files attached to notes. +- Zoho CRM sharing and permissions. diff --git a/essentials/v2/connectors/zoom.mdx b/essentials/v2/connectors/zoom.mdx new file mode 100644 index 00000000..dae87568 --- /dev/null +++ b/essentials/v2/connectors/zoom.mdx @@ -0,0 +1,209 @@ +--- +title: "Zoom" +description: "Sync a Zoom account's cloud recordings with their transcripts, plus its scheduled meetings and webinars." +icon: "/images/connectors/zoom.svg" +--- + +Sync a Zoom account's cloud recordings, scheduled meetings and webinars. Each recording is one document with the text of its transcript, captions, summary and timeline files, and links to the scheduled meeting it came from. Each scheduled meeting and each webinar is one document with its topic, time, host and agenda. + +Zoom permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. HydraDB does not transcribe video: only the text files Zoom produces are searchable. A transcript that becomes available after its recording was synced is not guaranteed to be added. Recordings and meetings deleted in Zoom stay in HydraDB. + + +Zoom is in beta. + + +## Permissions + + +Zoom permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource](/essentials/v2/connectors#set-your-own-rule-on-a-resource). + + +API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content](/essentials/v2/connectors#5-acl-native-rbac-awareness). + +## Before you connect + +### Credentials + +Zoom uses a Server-to-Server OAuth app that you create in the Zoom Marketplace. + + +The app's Account ID. + + + +The app's Client ID. + + + +The app's Client Secret. + + +**Scopes the connector reads with** + +- `user:read:admin`: lists the account's users, to name hosts and to find each user's meetings and webinars. +- `cloud_recording:read:admin` +- `meeting:read:admin` +- `webinar:read:admin` + +If Zoom refuses a request because of your plan or a missing scope, that part returns nothing and the rest still syncs. A plan without webinars syncs no webinars. If the user list is refused, no scheduled meetings or webinars are synced. + +### Set it up + + + + In the Zoom Marketplace, create a Server-to-Server OAuth app and add the scopes above. + + + Copy the app's Account ID, Client ID and Client Secret. + + + Paste them as `account_id`, `client_id` and `client_secret`. + + + HydraDB lists one item for the whole Zoom account. Select it. + + + +One connector reads one Zoom account. Recordings are read across the account. Scheduled meetings and webinars are read for each user on the account. + + + +Use provider `zoom` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync. + + + +## Keeping in sync + +- **First sync:** Reads recordings that started within the window set by `lookback_days`, 30 days by default. +- **New and changed items:** Each sync reads recordings, scheduled meetings and webinars by start time, and reads the account's users again in full. +- **Edits:** A change to an older scheduled meeting or webinar that does not touch its start time may not be picked up. A transcript that becomes available after its recording was synced is not guaranteed to be added. +- **Deletions:** Recordings, meetings and webinars deleted in Zoom stay searchable in HydraDB. +- If a transcript, caption, summary or timeline file fails to download, the recording is still synced without that file's text. + +After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it. + +## What gets synced + +### On every Zoom item + + +The host's name, or email when there is no name, written as the `Host` line. The graph records the item as hosted by that person. + + + +The start time: when a recording started, or when a meeting or webinar is scheduled to start. Written in the `When` line and, as `started_at`, a `Started` line. Sets the result date and decides which items each sync reads. + + + +The length in minutes, written as the `Duration` line. + + + +The host's Zoom user id, also kept as `host_id`. Limits a query to one host's items. Not searchable. + + + +On recordings, the Zoom account id. On scheduled meetings and webinars, the id of the Zoom user they belong to, so it limits a query to one user's meetings. Not searchable. + + + +`zoom_account` on recordings and `zoom_user` on scheduled meetings and webinars. Separates recordings from scheduled meetings and webinars. Not searchable. + + + +Limits a query to this connector's items. Not searchable. + + + +Always `zoom`. Not searchable. + + +### Recordings + +- **One document:** One cloud recording, with the text of its files. +- **Title:** The meeting topic, or `Zoom recording ` when it has none. +- **Text:** The topic, a `When` line, a `Duration` line in minutes and a `Host` line. Then, under `Transcript`, the transcript and caption text, followed by any summary or timeline text. Timings in transcript and caption files are removed. Summary and timeline files are kept as Zoom supplies them. The topic is searchable too. +- **Date:** When the recording started. +- **Link back:** The recording's share link in Zoom. +- **Files:** Only the text files Zoom produces: transcript, captions, summary and timeline. Their text joins the recording's text. Video and audio files are not downloaded. + + +The host's email. Lets the graph identify the host as the same person in other tools. Searchable only when the host has no name and the email is used as the `Host` line. + + + + + +How many recording files Zoom reported. + + + +The total size of the recording files, in bytes. + + + +Whether any transcript, caption, summary or timeline text was added. A summary or timeline alone sets it, so it does not prove that spoken transcript text is present. + + + + +### Scheduled meetings and webinars + +- **One document:** One scheduled meeting or one webinar. +- **Title:** The topic, or `Zoom meeting ` or `Zoom webinar ` when it has none. +- **Text:** The topic, a `When` line, a `Duration` line in minutes and a `Host` line, then the agenda. The topic is searchable too. +- **Date:** The scheduled start, else when the meeting or webinar was created. +- **Link back:** The join link. + + +The agenda, written after the header lines. + + + +When the meeting or webinar was created. Sets the result date only when there is no scheduled start. Not searchable. + + + + + +The webinar's numeric id, on webinars only. + + + + +**Example searches** + +- What was discussed in last Thursday's all-hands recording? +- What is on the agenda for next week's board meeting? +- Which recordings did Lee host this month? + +## How it fits into the graph + +- Recordings use the Meeting class. +- Scheduled meetings and webinars use the Meeting class. + +[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class. + +**Connections Zoom creates** + +- A recording to the scheduled meeting it recorded. +- No links to other tools. + +**People and groups** + +- The host of each recording, scheduled meeting and webinar. +- On recordings, the host's email as well, so the host can be matched to the same person in other tools. +- Meeting participants are not synced, so they are not attached as people. + +**Found in the text** + +The text of each recording's transcript, caption, summary and timeline files, and each scheduled meeting's and webinar's agenda. HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions](/essentials/v2/connectors#4-custom-ingestion-instructions). + +## Not synced + +- Audio and video recording files. +- Participant lists and in-meeting chat messages. +- Timings and cue details in transcript and caption files. +- A file's text when its download fails or the file is unavailable. +- Items Zoom refuses because of your plan or the app's scopes. +- Deletions: recordings and meetings deleted in Zoom stay in HydraDB. diff --git a/essentials/v2/context.mdx b/essentials/v2/context.mdx index c5cb8ea2..ea266db6 100644 --- a/essentials/v2/context.mdx +++ b/essentials/v2/context.mdx @@ -1,240 +1,113 @@ --- title: "Context" -description: "Knowledge and memories: the two types of context HydraDB stores, how to ingest each, and how they work together." +description: "Context is everything you give HydraDB so the database can organize it and your AI can find it. You can directly ingest docs, emails, and all forms of knowledge or you can use our data connectors." --- import { Field } from "/snippets/field.jsx"; -Context is everything you give HydraDB so your AI can find it later. It comes in two types, and most applications use both: - -| | Knowledge | Memories | -|---|---|---| -| What it is | What your organization has written down | What your agent has learned about a user | -| Examples | Product docs, policy PDFs, runbooks, Slack threads, tickets, emails | Preferences, decisions, things already tried, past conversations | -| Usually shared by | Everyone who may read it | One user | -| Ingest with | `type=knowledge` | `type=memory` | -| What you send | Files, or records from an app (**app sources**) | Text or a conversation | -| Changes when | The document changes | The user says or does something new | - -The two types work the same way. Both go to [`POST /context/ingest`](/api-reference/v2/endpoint/ingest-context), both are saved in a [collection](/essentials/v2/databases-and-collections), both are indexed in the background, and both come back from [`POST /query`](/api-reference/v2/endpoint/query). Each item you ingest is a **source**; HydraDB splits it into searchable passages called **chunks** and builds a context graph from it. - -They are stored separately, so a query chooses what to read: `type: "knowledge"`, `type: "memory"`, or `type: "all"` for both in one ranked list. A support agent, for example, answers from the help center (knowledge) and from the fact that this customer already tried restarting (a memory). - -## 1. Ingest knowledge - -There are three ways to ingest knowledge: - -- **Files:** upload PDF, DOCX, Markdown, CSV, or TXT files, and HydraDB reads them for you. -- **App sources:** send records your application already holds from an app, such as a Slack message or a Jira ticket. -- **[Connectors](/essentials/v2/connectors):** connect an app such as Slack, Google Drive, Notion, or GitHub once, and HydraDB keeps it in sync. - -### Upload files - -The request is **multipart/form-data** with these fields: - -| Form field | What to send | -|---|---| -| `type` | `knowledge` | -| `database` | An existing [database](/api-reference/v2/endpoint/create-database) | -| `collection` | Optional. Leave it out to use the database's default collection. A query that names another collection does not read the default one. | -| `documents` | One or more files | -| `document_metadata` | One item per file, in the same order, as a JSON string. Optional, but this is where a file's `id` and `metadata` go. | -| `upsert` | Leave it out. It defaults to `true`, so a file sent again with the same `id` replaces the saved one. | - - - -Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript example. - - -```python Python SDK -import json - -with open("/path/to/policy.pdf", "rb") as f1, open("/path/to/runbook.pdf", "rb") as f2: - result = client.context.ingest( - type="knowledge", - database="acme_corp", - documents=[ - ("policy.pdf", f1, "application/pdf"), - ("runbook.pdf", f2, "application/pdf"), - ], - document_metadata=json.dumps([ - {"id": "policy_v2", "metadata": {"document_type": "policy", "status": "approved"}}, - {"id": "runbook_deploy", "metadata": {"document_type": "runbook"}}, - ]), - ) -``` -```typescript TypeScript SDK -const result = await client.context.ingest({ - type: "knowledge", - database: "acme_corp", - documents: [ - { path: "/path/to/policy.pdf", filename: "policy.pdf", contentType: "application/pdf" }, - { path: "/path/to/runbook.pdf", filename: "runbook.pdf", contentType: "application/pdf" }, - ], - documentMetadata: JSON.stringify([ - { id: "policy_v2", metadata: { document_type: "policy", status: "approved" } }, - { id: "runbook_deploy", metadata: { document_type: "runbook" } }, - ]), -}); -``` -```bash cURL -curl -X POST 'https://api.hydradb.com/context/ingest' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -F "type=knowledge" \ - -F "database=acme_corp" \ - -F "documents=@/path/to/policy.pdf" \ - -F "documents=@/path/to/runbook.pdf" \ - -F 'document_metadata=[ - { "id": "policy_v2", "metadata": { "document_type": "policy", "status": "approved" } }, - { "id": "runbook_deploy", "metadata": { "document_type": "runbook" } } - ]' -``` - - -The response lists each file in `data.results` with its `id` and a `status` of `queued`. The payload is wrapped in the standard envelope, so read it from `response.data`: - -```json -{ - "success": true, - "data": { - "success": true, - "message": "Knowledge uploaded successfully", - "results": [ - { "id": "policy_v2", "filename": "policy.pdf", "status": "queued", "error": null }, - { "id": "runbook_deploy", "filename": "runbook.pdf", "status": "queued", "error": null } - ], - "success_count": 2, - "failed_count": 0 - }, - "error": null, - "meta": { - "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", - "latency_ms": 12.3 - } -} -``` - - - -Each `document_metadata` item takes these properties: +# Overview + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**Default****Knowledge****Memory****Traces (Experimental)**
DescriptionThe CLI and MCP use an auto selector to choose the request layout for your input. This is client-side selection, not a backend content classifier. Choose knowledge or memory explicitly when you need a specific type.All the data your agent should be able to access: docs, emails, chats, transcripts, code, and sheets. You can directly ingest context or use connectors API to programmatically ingest data from your apps (RBAC aware).What your agent has learned about a user and their preferences, used to personalize search on each query.Agent decisions or traces: a record of every agent run, successful or failed, so future agents have a procedural memory of what works and what doesn't.
ExamplesEverything in the following columnsProduct docs, policy PDFs, runbooks, Slack threads, Linear tickets, emailsUser preferences, chats, and past decisionsTool calls and agent logs
RBACUse multi-tenancy features to maintain access controls (ACLs).Ranges from org-wide (tribal) knowledge to team knowledge, and sometimes personal knowledge.Same as knowledge, but usually scoped to individual users.Same as knowledge, but usually org-wide, so agent runs across all sessions improve together.
IngestionCLI/MCP: auto selection by default. The public multipart API defaults to `type=knowledge`; send `type=memory` with `memories` items. `auto` is not an API wire value.`type=knowledge``type=memory`Not a public ingestion type. Store trace text as knowledge or memories.
Evolves temporallyHydraDB maintains a temporally versioned graph of everything you ingest.As knowledge changes, HydraDB keeps a version history. The latest node is a snapshot of the current information and links back through a chain of earlier nodes that record past states.A preference changes whenever the user says or does something new, which happens often.Build agents that improve after every run, with procedural memory.
+ +## Ingesting Knowledge + +There are two ways to ingest knowledge/context + +1. Directly using the ingest API. You have to set your own ACLs with multi tenancy features within the database +2. Connectors API - programmatically ingest data from slack, gmail, linear, and 70+ connectors with all RBAC aware. Read more in [Connectors](/essentials/v2/connectors). + +### Upload with metadata | Property | What it is | |---|---| | `id` | Your stable ID for the file, and the upsert key. Send the same `id` later to replace the file, or use it to check status and delete. Leave it out to have one generated; the response returns it either way. | | `metadata` | Values you filter on at query time, such as `document_type`. Declare the keys in the database's [metadata schema](/essentials/v2/metadata). Up to 16 KiB as compact JSON. | | `additional_metadata` | Free-form values for display and bookkeeping. Filterable only when nested under `additional_metadata` in `metadata_filters`. Up to 1 KiB as compact JSON. | -| `relations` | Other sources this file belongs with, as `{ "ids": [...] }`. See [Link documents that belong together](#6-link-sources-that-belong-together). | - -The key list is closed. Any other key, including `title`, `type`, `url`, and `timestamp`, returns `400`. [Ingest Context](/api-reference/v2/endpoint/ingest-context#supported-file-formats) lists the supported file formats. - -### Send app sources +| `relations` | Other sources this file belongs with, as `{ "ids": [...] }`. See [Link sources deterministically](#link-sources-deterministically). | -When your application already holds the text and fields of a Slack message, a Jira ticket, a Notion page, or a CRM record, send it as an **app source** instead of a file. HydraDB keeps the app's structure: the author, the thread, the ticket's status, and the links between records. +### Spreadsheets become queryable tables -The request goes to the same endpoint, with `app_knowledge` in place of `documents`. One request can carry both. `kind` says what the record is (`email`, `message`, `ticket`, `knowledge_base`, `comment`, `meeting`, or `custom`), and `fields` carries its content. An app source can also carry an `acl`, the list of principals allowed to retrieve it. The [field reference](#field-reference) lists the keys each kind takes in `fields`. - - - -```python Python SDK -import json +A CSV, TSV or Excel workbook (`.xlsx`, `.xlsm`, `.xlsb`, `.xls`, `.ods`) uploaded here, or delivered by a file connector such as Google Drive, Dropbox, Box, SharePoint or Nextcloud, is ingested two ways at once. Its cells are rendered as text and indexed like any other document, and its rows are kept as a typed table: HydraDB infers a column type for every column and records the row ranges each chunk came from. A workbook yields one table per sheet. -result = client.context.ingest( - type="knowledge", - database="acme_corp", - app_knowledge=json.dumps([ - { - "id": "slack_C01_1716213600_000100", - "title": "Pricing discussion - Slack #product", - "kind": "message", - "provider": "slack", - "external_id": "1716213600.000100", - "fields": { - "kind": "message", - "body": "We agreed on three tiers: Starter at $29, Pro at $79, Enterprise at $199.", - "author": "alice", - "thread_id": "1716213600.000100", - "created_at": "2026-05-20T10:00:00Z", - }, - "metadata": {"channel": "product", "status": "finalized"}, - "additional_metadata": {"slack_ts": "1716213600.000100"}, - } - ]), -) -``` -```typescript TypeScript SDK -const result = await client.context.ingest({ - type: "knowledge", - database: "acme_corp", - appKnowledge: JSON.stringify([ - { - id: "slack_C01_1716213600_000100", - title: "Pricing discussion - Slack #product", - kind: "message", - provider: "slack", - external_id: "1716213600.000100", - fields: { - kind: "message", - body: "We agreed on three tiers: Starter at $29, Pro at $79, Enterprise at $199.", - author: "alice", - thread_id: "1716213600.000100", - created_at: "2026-05-20T10:00:00Z", - }, - metadata: { channel: "product", status: "finalized" }, - additional_metadata: { slack_ts: "1716213600.000100" }, - }, - ]), -}); -``` -```bash cURL -curl -X POST 'https://api.hydradb.com/context/ingest' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -F "type=knowledge" \ - -F "database=acme_corp" \ - -F 'app_knowledge=[ - { - "id": "slack_C01_1716213600_000100", - "title": "Pricing discussion - Slack #product", - "kind": "message", - "provider": "slack", - "external_id": "1716213600.000100", - "fields": { - "kind": "message", - "body": "We agreed on three tiers: Starter at $29, Pro at $79, Enterprise at $199.", - "author": "alice", - "thread_id": "1716213600.000100", - "created_at": "2026-05-20T10:00:00Z" - }, - "metadata": { "channel": "product", "status": "finalized" }, - "additional_metadata": { "slack_ts": "1716213600.000100" } - } - ]' -``` - +Nothing changes in how you upload. The difference shows at query time: a question that needs filtering, grouping or arithmetic over the rows is answered by SQL that HydraDB writes and runs over the complete table, with the result returned under `tabular_data`. See [Ask questions over spreadsheets](/essentials/v2/query#ask-questions-over-spreadsheets). -The response has the same shape as a file upload, with one entry per app source in `data.results`. +Replacing the file with the same `id` replaces the table too; the previous version is no longer queried once the new one is indexed. A table is bounded at 4,096 columns; a file with more columns is ingested as text only. - +## Ingesting memory -## 2. Save memories +HydraDB does not capture memories on its own: your application saves one when a user states a preference, makes a decision in a specific way, finishes a task, or corrects the agent. -HydraDB does not capture memories on its own: your application saves one when a user states a preference, makes a decision, finishes a task, or corrects the agent. Give each user their own collection, such as `user_john_123`, and send it on every ingest, status check, and query. Your backend picks it from the signed-in session; the name itself does not authenticate anyone. +Give each user their own collection, such as `user_john_123`, and send it on every ingest, status check, and query. Your backend picks the collection from the signed-in session, never from untrusted client input; the collection name itself does not authenticate anyone. -The request is the same as for knowledge, with `type=memory` and a `memories` list in place of files: +Apply the same server-derived scope and authorization to updates and deletes. Before any operation, authorize the signed-in user's access to the source in that collection; knowing a source ID or collection name is not permission to read or change it. -| Form field | What to send | -|---|---| -| `type` | `memory` | -| `database` | An existing [database](/api-reference/v2/endpoint/create-database) | -| `collection` | The user's own collection, such as `user_john_123`. | -| `memories` | One item or a list of items, as a JSON string | -| `upsert` | Leave it out. It defaults to `true`, so sending an item again with the same `id` replaces the saved memory. | +1. **Let HydraDB infer**: `infer` controls whether HydraDB extracts memories and preferences from what you send. + 1. `infer: true` (default): Extracts the preferences, trait, or fact from messy or indirect evidence. Omitting `infer` means `true`. + 2. `infer: false`: Disables additional memory enrichment for that item. Ingestion, indexing, and entity/graph extraction may still run. +2. **Ingest memory**: It can be via `text` or `user_assistant_pairs`, not both. + - `text`: Any prose, such as observations, facts, meeting notes, or semi-structured records. Set `is_markdown: true` for Markdown content so HydraDB keeps its structure when chunking and embedding. + - `user_assistant_pairs`: Dialogue, especially when a preference is implied rather than stated. Each pair is `{ "user": "...", "assistant": "..." }`. Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript example. +The `verified_session` / `verifiedSession` objects and `SESSION_MEMORY_COLLECTION` below stand in for scope already resolved by your backend from a verified session. Their values are examples, not authentication code. Replace them with your server's authenticated context, never a user ID or collection supplied in the incoming request. + ```python Python SDK @@ -243,11 +116,12 @@ import os from hydra_db import HydraDB client = HydraDB(token=os.environ["HYDRADB_API_KEY"]) +verified_session = {"memory_collection": "user_john_123"} result = client.context.ingest( type="memory", database="acme_corp", - collection="user_john_123", + collection=verified_session["memory_collection"], memories=json.dumps([ { "text": "Prefers short, direct answers with no preamble.", @@ -264,11 +138,12 @@ import { HydraDBClient } from "@hydradb/sdk"; const client = new HydraDBClient({ token: process.env.HYDRADB_API_KEY, }); +const verifiedSession = { memoryCollection: "user_john_123" }; const result = await client.context.ingest({ type: "memory", database: "acme_corp", - collection: "user_john_123", + collection: verifiedSession.memoryCollection, memories: JSON.stringify([ { text: "Prefers short, direct answers with no preamble.", @@ -280,12 +155,14 @@ const result = await client.context.ingest({ ``` ```bash cURL +SESSION_MEMORY_COLLECTION="user_john_123" + curl -X POST 'https://api.hydradb.com/context/ingest' \ -H "Authorization: Bearer $HYDRADB_API_KEY" \ -H "API-Version: 2" \ -F "type=memory" \ -F "database=acme_corp" \ - -F "collection=user_john_123" \ + -F "collection=$SESSION_MEMORY_COLLECTION" \ -F 'memories=[ { "text": "Prefers short, direct answers with no preamble.", @@ -321,449 +198,39 @@ The response lists each memory in `data.results` with its `id` and a `status` of -### Let HydraDB infer the memory - -`infer` controls whether HydraDB extracts the memory from what you send or stores it as written. - -| | `infer: true` | `infer: false` (the default) | -|---|---|---| -| What HydraDB does | Extracts the useful preference, trait, or fact from messy or indirect evidence. | Stores and indexes exactly what you send. There is no extraction step, so it is faster and deterministic. | -| Use it for | Dialogue where the preference is implicit, behavior logs and event streams, and feedback like "the last summary was too long." | Facts you already captured, such as `"User's plan tier is Pro"`, pre-structured notes, and text you want to retrieve exactly as written. | - -`custom_instructions` takes effect only when `infer: true`. Use it to guide extraction, for example: `"Focus on UI and notification preferences only"`. - - - -A user has been toggling dark mode in your application. Instead of extracting the preference yourself, send the raw behavior log and let HydraDB infer the memory. - - - -```python Python SDK -import json - -client.context.ingest( - type="memory", - database="acme_corp", - collection="user_john_123", - memories=json.dumps([ - { - "text": ( - "User opened the app 14 times in the last week. " - "Switched to dark mode on first session. " - "Toggled back to light once on 2026-04-12 at 3pm, " - "then switched back to dark within 4 minutes. " - "Has not changed theme since." - ), - "infer": True, - "user_name": "John", - "custom_instructions": "Focus on display and theme preferences.", - } - ]), -) -``` - -```typescript TypeScript SDK -const result = await client.context.ingest({ - type: "memory", - database: "acme_corp", - collection: "user_john_123", - memories: JSON.stringify([ - { - text: - "User opened the app 14 times in the last week. " + - "Switched to dark mode on first session. " + - "Toggled back to light once on 2026-04-12 at 3pm, " + - "then switched back to dark within 4 minutes. " + - "Has not changed theme since.", - infer: true, - user_name: "John", - custom_instructions: "Focus on display and theme preferences.", - }, - ]), -}); -``` - -```bash cURL -curl -X POST 'https://api.hydradb.com/context/ingest' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -F "type=memory" \ - -F "database=acme_corp" \ - -F "collection=user_john_123" \ - -F 'memories=[ - { - "text": "User opened the app 14 times in the last week. Switched to dark mode on first session. Toggled back to light once on 2026-04-12 at 3pm, then switched back to dark within 4 minutes. Has not changed theme since.", - "infer": true, - "user_name": "John", - "custom_instructions": "Focus on display and theme preferences." - } - ]' -``` - - - -Later, when [`POST /query`](/api-reference/v2/endpoint/query) runs with `type: "memory"` and a query like `"what UI settings does the user prefer?"`, HydraDB can return the inferred preference (for example, `"prefers dark mode"`) rather than the raw event log. - -If you sent the same input with `infer: false`, HydraDB would index the event log verbatim. That is useful only when you want to retrieve the log itself. - - - -### Send text or a conversation - -Each memory item takes either `text` or `user_assistant_pairs`, **not both** (sending both returns `400`). - -- **`text`:** prose of any kind, such as observations, captured facts, meeting notes, or semi-structured records. Set `is_markdown: true` when the content uses Markdown (headings, lists, code blocks) so HydraDB keeps that structure during chunking and embedding. -- **`user_assistant_pairs`:** dialogue, especially when the preference is implied rather than stated. Each pair is `{ "user": "...", "assistant": "..." }`. - - - -Markdown notes, stored as written: - -```json -{ - "text": "# Meeting Notes\n\n## Key Points\n- Budget approved", - "is_markdown": true, - "infer": false -} -``` - -A plain statement, with the preference extracted: - -```json -{ - "text": "Prefers detailed technical explanations and works in PST.", - "infer": true -} -``` - -A conversation, with the preference extracted: - -```json -{ - "user_assistant_pairs": [ - { "user": "Remember I like dark mode", "assistant": "Noted." } - ], - "infer": true -} -``` - - - -## 3. Wait for indexing - -Knowledge and memories are indexed the same way, in the background: HydraDB parses each source, splits it into chunks, infers the memory if you asked it to, finds the people, teams, and topics it mentions and how they relate, and builds the search indexes. The ingest request returns `202 Accepted` with each source's `id`. - -Poll [`GET /context/status`](/api-reference/v2/endpoint/source-status) with those ids and the same `collection` every few seconds. A source's `indexing_status` moves forward through `queued`, `processing`, `graph_creation`, and `completed`, or lands in `errored` on failure: - -- At `graph_creation` the source becomes searchable within a few seconds, while its graph is still building. A query sent the moment this status appears can miss the source, and a collection that is new can still be reported as not existing. -- At `completed` the source and its graph are ready. Wait for `completed` when you query straight after ingesting. Most documents complete in 1 to 5 minutes. - -[Ingestion Status](/api-reference/v2/endpoint/source-status) has the full status table. To skip polling, register a [webhook](/api-reference/v2/endpoint/webhooks-overview). - - - -```python Python SDK -import time - -ids = ["policy_v2", "runbook_deploy"] -terminal = {"completed", "errored"} - -while True: - status = client.context.status( - database="acme_corp", - collection="default", - ids=ids, - ) - if all(s.indexing_status in terminal for s in status.data.statuses): - break - time.sleep(5) -``` -```typescript TypeScript SDK -const ids = ["policy_v2", "runbook_deploy"]; -const terminal = new Set(["completed", "errored"]); - -let status; -while (true) { - status = await client.context.status({ - database: "acme_corp", - collection: "default", - ids: ids, - }); - - const allDone = (status.data?.statuses ?? []).every((s) => terminal.has(s.indexingStatus ?? "")); - if (allDone) break; - - await new Promise((r) => setTimeout(r, 5_000)); -} -``` -```bash cURL -while true; do - response=$(curl -s -G 'https://api.hydradb.com/context/status' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - --data-urlencode "database=acme_corp" \ - --data-urlencode "collection=default" \ - --data-urlencode "ids=policy_v2" \ - --data-urlencode "ids=runbook_deploy") - - statuses=$(echo "$response" | jq -r '.data.statuses[].indexing_status') - if echo "$statuses" | grep -qv '^\(completed\|errored\)$'; then - sleep 5 - continue - fi - echo "$response" | jq - break -done -``` - - -Each status in the `data` payload looks like this: - -```json -{ - "statuses": [ - { - "id": "policy_v2", - "indexing_status": "completed", - "success": true - } - ] -} -``` - - - -## 4. Query knowledge and memories together - -[`POST /query`](/api-reference/v2/endpoint/query) reaches each type through the `type` parameter: - -- `type: "knowledge"` (the default) searches files and app sources. -- `type: "memory"` searches memories. -- `type: "all"` searches both and returns one merged, ranked list. - -Both types are read from the collections you name. Shared knowledge usually lives in one collection and each user's memories in their own, so list both in `collections`. If some sources carry an `acl`, also send the caller's identity as `acl`. [Query](/essentials/v2/query) covers the other parameters and how to pass the result to a model. - - +| Form field | What to send | +| --- | --- | +| `type` | `memory` | +| `database` | An existing [database](/api-reference/v2/endpoint/create-database) | +| `collection` | The user's own collection, resolved and authorized by your backend from the signed-in session. | +| `memories` | One item or a list of items, as a JSON string | +| `upsert` | Leave it out. It defaults to `true`, so sending an item again with the same `id` replaces the saved memory. | - -```python Python SDK -result = client.query( - database="acme_corp", - collections=["company_docs", "user_john_123"], - query="How do I reset my password?", - type="all", - mode="thinking", - max_results=8, -) -``` -```typescript TypeScript SDK -const result = await client.query({ - database: "acme_corp", - collections: ["company_docs", "user_john_123"], - query: "How do I reset my password?", - type: "all", - mode: "thinking", - maxResults: 8, -}); -``` -```bash cURL -curl -X POST 'https://api.hydradb.com/query' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "database": "acme_corp", - "collections": ["company_docs", "user_john_123"], - "query": "How do I reset my password?", - "type": "all", - "mode": "thinking", - "max_results": 8 - }' -``` - +## Wait for indexing -Knowledge and memories come back together in `data.chunks`, ranked as one list. To let the user's memories outrank the shared documents, send weights instead of a list: +Use polling or webhooks to check indexing status: -```json -{ - "collections": { - "user_john_123": 2, - "company_docs": 1 - } -} -``` +- **Webhooks:** register a [webhook](/api-reference/v2/endpoint/webhooks-overview) and HydraDB notifies you when indexing finishes, so you don't need to poll. +- **Polling:** call [`GET /context/status`](/api-reference/v2/endpoint/source-status) with those ids and the same `collection` every few seconds until `indexing_status` is `completed` or `errored`. + - At `graph_creation`, the source becomes searchable but its graph is still building. Queries sent right away can miss it, and a new collection can still be reported as not existing. + - At `completed`, the source and its graph are ready to query. - +[Ingestion Status](/api-reference/v2/endpoint/source-status) lists every status. -## 5. Update or delete context +## Upsert or Delete -To change a source or a memory, send it again with the same `id`. `upsert` defaults to `true`, so the saved one is replaced; include everything you want to keep. Wait for the previous ingestion to reach `completed` or `errored` before sending the next update for the same `id`. +To change a source, send it again with the same `id`. `upsert` defaults to `true`, so the saved one is replaced; include everything you want to keep. Wait for the previous ingestion to reach `completed` or `errored` before sending the next update for the same `id`. To remove one, call [`DELETE /context`](/api-reference/v2/endpoint/delete-source) with its `id` and the same `collection`. -## 6. Link sources that belong together + -Forceful relations are links you declare between knowledge sources when you ingest them. When a query matches a source that has forceful relations, HydraDB returns the linked sources in the `additional_context` field of the response, alongside the primary chunks. +## Link sources deterministically -This is separate from the context graph HydraDB builds on its own. Use forceful relations for documents that belong together when the text does not say so: a contract and its addendum, or a runbook and its troubleshooting guide. They link whole **sources**. To declare the entity and relation graph within one document, replacing extraction for it, use [Bring Your Own Graph](/essentials/v2/bring-your-own-graph#using-byog-without-cypher). +Deterministic relations are links you declare between knowledge sources at ingestion. When a query matches one of those sources, HydraDB returns the linked sources in the response map `data.additional_graph_context`, alongside the primary chunks. The legacy response alias `data.additional_context` contains the same map. -On a file, set `relations.ids` on its `document_metadata` item. On an app source, set `relations.ids` the same way, and name the relationship in `app_relations` so the link also carries a predicate. `relations.ids` is what makes the linked text come back with query results; a named relationship alone connects the sources without requesting their text. +This is separate from the relations in the context graph HydraDB builds on its own. - +On a file, set `relations.ids` on its `document_metadata` item. `relations.ids` is what makes the linked text come back with query results. -This Notion guide links to a troubleshooting page already ingested with the HydraDB `id` `auth-troubleshooting`. Ingest that page first and wait for `completed`. - - -```python Python SDK -client.context.ingest( - type="knowledge", - database="acme_corp", - app_knowledge=json.dumps([ - { - "id": "auth-guide", - "title": "Authentication Guide", - "kind": "knowledge_base", - "provider": "notion", - "external_id": "AUTH-GUIDE", - "fields": {"kind": "knowledge_base", "title": "Authentication Guide", "body": "..."}, - "relations": {"ids": ["auth-troubleshooting"]}, - "app_relations": [ - {"predicate": "linked_to", "target": {"source_id": "auth-troubleshooting"}}, - ], - } - ]), -) -``` -```typescript TypeScript SDK -await client.context.ingest({ - type: "knowledge", - database: "acme_corp", - appKnowledge: JSON.stringify([ - { - id: "auth-guide", - title: "Authentication Guide", - kind: "knowledge_base", - provider: "notion", - external_id: "AUTH-GUIDE", - fields: { kind: "knowledge_base", title: "Authentication Guide", body: "..." }, - relations: { ids: ["auth-troubleshooting"] }, - app_relations: [ - { predicate: "linked_to", target: { source_id: "auth-troubleshooting" } }, - ], - }, - ]), -}); -``` -```bash cURL -curl -X POST 'https://api.hydradb.com/context/ingest' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -F "type=knowledge" \ - -F "database=acme_corp" \ - -F 'app_knowledge=[ - { - "id": "auth-guide", - "title": "Authentication Guide", - "kind": "knowledge_base", - "provider": "notion", - "external_id": "AUTH-GUIDE", - "fields": { "kind": "knowledge_base", "title": "Authentication Guide", "body": "..." }, - "relations": { "ids": ["auth-troubleshooting"] }, - "app_relations": [ - { "predicate": "linked_to", "target": { "source_id": "auth-troubleshooting" } } - ] - } - ]' -``` - - - - -`query_forceful_relations` defaults to `true`; set it to `false` to skip the linked sources. - - -**Knowledge sources, `thinking` mode only:** Forceful relations stay within one store, so pointing a knowledge source at a memory ID silently returns nothing. Linked context is fetched only when `mode: "thinking"` is set on the query, or when `mode: "auto"` routes to thinking. In `fast` mode, `query_forceful_relations` is ignored even if set to `true`. - - -## Field reference - - - - -| Field | Default | Description | -|---|---|---| -| | None | Selects the type of context. | -| | None | Target database. | -| | default collection | The collection to save into. If omitted, context goes to the database's default collection, which a query naming another `collection` does not read. | -| | None | Knowledge only. Files for HydraDB to parse. | -| | None | Knowledge only. One item per file in `documents`, in the same order. | -| | None | Knowledge only. App sources. | -| | None | Memories only. Memory items. | -| | `true` | Replace existing context with the same `id`. | - - - - -Set `kind` on the app source and repeat it as `fields.kind`. Every other key in `fields` is optional. - -| Kind | Use it for | Keys in `fields` | -|---|---|---| -| `email` | An email | `subject`, `body`, `from`, `to`, `cc`, `bcc`, `thread_id`, `reply_to_id`, `forwarded_from_id`, `created_at`, `url` | -| `message` | A chat message | `body`, `author`, `thread_id`, `parent_id`, `mentions`, `created_at`, `edited_at`, `url` | -| `ticket` | A ticket or issue | `title`, `description`, `status`, `priority`, `assignee`, `reporter`, `parent_id`, `linked_issue_ids`, `created_at`, `updated_at`, `url` | -| `knowledge_base` | A wiki page or article | `title`, `body`, `parent_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `url` | -| `comment` | A comment on another record | `body`, `author`, `parent_id`, `thread_id`, `created_at`, `updated_at`, `url`, `properties` | -| `meeting` | A meeting or call | `title`, `body`, `host`, `host_email`, `participants`, `started_at`, `updated_at`, `labels`, `url` | -| `custom` | Any other record, such as a CRM deal or a database row | `body`, `parent_id`, `thread_id`, `data` | - - - - -| Field | Description | -|---|---| -| | Optional stable ID. Acts as the upsert key. | -| | Short label for display in `/context/list` and query results. | -| | Raw text or Markdown content. Required unless `user_assistant_pairs` is provided. | -| | Conversation pairs in the shape `{ "user": "...", "assistant": "..." }`. Required unless `text` is provided. | -| | Treat `text` as Markdown for chunking and indexing. | -| | When `true`, HydraDB extracts the underlying preference, trait, or fact. When `false` (the default), it stores the input as written. | -| | Guides extraction when `infer: true`. Ignored when `infer: false`. | -| | User name used during inference. | -| | Metadata schema fields for filtering. Send this as an object inside each `memories[]` item, for example `"metadata": { "department": "support" }`. Up to 16 KiB as compact JSON. | -| | Free-form per-memory fields for display or bookkeeping. Send this as an object. Up to 1 KiB as compact JSON. | - -`memories` is a JSON string. Inside each item, `metadata` and `additional_metadata` are plain objects; do not stringify them again. - -```json -{ - "id": "pref_dark_mode", - "text": "User prefers dark mode and concise answers.", - "infer": true, - "metadata": { "department": "support", "workspace": "docs" }, - "additional_metadata": { "source": "onboarding" } -} -``` - - - - -## Common mistakes - -| Mistake | What goes wrong | Fix | -|---|---|---| -| Storing shared documents as memories | They do not surface when querying `type: "knowledge"` | Ingest them with `type=knowledge`. | -| Querying with the wrong `type` | Nothing returned: the other type was searched | Use the matching `type`, or `"all"`. | -| Omitting `collection` for per-user memories | The memory lands in the default collection and may surface in the wrong scope | Use the user's ID as `collection` to keep each user separate. | -| Querying before indexing finishes | Results are empty, or a new collection returns `400` as not existing | Wait for `indexing_status` to reach `completed`. | -| Sending `document_metadata`, `app_knowledge`, or `memories` as a JSON object | `multipart/form-data` validation fails | Send each as a JSON string. | -| Sending pre-extracted facts with `infer: true` | HydraDB may re-derive the memory and change the original phrasing | Use `infer: false` for already-structured facts. | -| Extracting preferences yourself instead of sending the raw logs | You duplicate work HydraDB can do for you | Send the raw signal with `infer: true`. | -| Pointing a forceful relation from knowledge to a memory | Nothing is returned: relations stay within one type | Link knowledge to knowledge. | - -## Related - -- [Query](/essentials/v2/query): search context and pass the result to a model -- [Databases and Collections](/essentials/v2/databases-and-collections): where context is saved, and how to keep users apart -- [Metadata Filters](/essentials/v2/metadata): fields to filter on -- [Connectors](/essentials/v2/connectors): keep an app's knowledge in sync -- [Ingest Context: API Reference](/api-reference/v2/endpoint/ingest-context) +`query_explicit_relations` defaults to `true`; set it to `false` to skip the linked sources. Linked-source retrieval runs only in `thinking` mode. This describes deterministic source links, not a new ingestion field: keep using `relations.ids`. diff --git a/essentials/v2/databases-and-collections.mdx b/essentials/v2/databases-and-collections.mdx index c9b17ef9..1a06f076 100644 --- a/essentials/v2/databases-and-collections.mdx +++ b/essentials/v2/databases-and-collections.mdx @@ -1,234 +1,44 @@ --- title: "Databases and Collections" -description: "Scope every write and read with a database and a collection, and split scopes only where context must never meet in one query." +description: "HydraDB is multi tenant by design. Every database can hold multiple collections/namespaces. You can scope read/write split between database(s) and collections. " --- -HydraDB scopes every write and every read with two fields: `database`, an isolated store for one customer or one environment, and `collection`, an optional group inside a database. Most products need one database and one collection. Your backend sets both on every request; the user never chooses them. +Every write and read is scoped with two fields: `database`, an isolated store for one environment (for eg - one enterprise could be one database), and `collection`, a group separated by logic, not infrastructure, inside a database. Most products need one database and multiple collections. -## 1. Choose how to scope your data +## Choose how to scope your data -Pick the scope by what must never meet in one query: +Some examples of goals and outcomes to help shape up your mental model | Goal | Use | |---|---| | A company brain: one query across all your files and connectors | One `database` and one collection for everything. Isolate results inside it with metadata filters and access control | -| Separate customers on your platform | A different `database` per customer | -| Separate environments (`prod` vs `staging`) | A different `database` per environment | +| Separate enterprise customers on your platform | A different `database` per customer | | Keep each person's memories apart | One `database`, and a collection per person, such as `user_123` | -### Company brain - -Put everything in one collection: connect all your connectors and ingest all your files and app sources there, so one query searches across all of it. When some results must stay out of reach for some people, keep the single collection and isolate inside it. Put a team, region, or user ID in [metadata](/essentials/v2/metadata) and filter on it. Let [access control](/essentials/v2/query#6-query-on-behalf-of-a-user), captured from the source app's permissions or set by you, decide who may retrieve each source. HydraDB enforces both inside one query. - -### B2C application - -Use one database for the application. Keep shared knowledge in one collection, and give each user a collection for their memories, for example `collection = "user_123"`. Ingest each user's preferences and conversation history with that collection, and query with the same one. - -### B2B SaaS - -Use one database per customer organization, for example `database = "acme_corp"`. Inside it, keep the organization's knowledge in one collection and isolate teams with metadata filters and access control. Give each user a collection only for their memories. - -### Shared knowledge plus personal memories - -For answers grounded in shared knowledge and personalized with the user's memories, send `type: "all"` on [`POST /query`](/api-reference/v2/endpoint/query). It reads both from the same collections and returns one ranked list, so name the knowledge collection and the user's with `collections: ["company_docs", "user_123"]`. Every listed collection must already exist, and the list holds up to 100. When your prompt needs the two formatted differently, call `POST /query` twice, once with `type: "knowledge"` and once with `type: "memory"`. - -## 2. Write and read with the same scope - -This example saves a memory for `user_123` and then queries it for the same user. Both requests name the database `acme_corp` and the collection `user_123`. That is the whole mechanism: context written under a collection is read back only by requests that name that collection. - - - -Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript example. - - - -```python Python SDK -import json -import os -from hydra_db import HydraDB - -client = HydraDB(token=os.environ["HYDRADB_API_KEY"]) - -# 1. Write a memory under the user's collection. -client.context.ingest( - type="memory", - database="acme_corp", - collection="user_123", - memories=json.dumps([ - { - "text": "Prefers dark mode and short answers.", - "infer": True, - "user_name": "John", - } - ]), -) -``` - -```typescript TypeScript SDK -import { HydraDBClient } from "@hydradb/sdk"; - -const client = new HydraDBClient({ - token: process.env.HYDRADB_API_KEY, -}); - -// 1. Write a memory under the user's collection. -await client.context.ingest({ - type: "memory", - database: "acme_corp", - collection: "user_123", - memories: JSON.stringify([ - { - text: "Prefers dark mode and short answers.", - infer: true, - user_name: "John", - }, - ]), -}); -``` - -```bash cURL -# 1. Write a memory under the user's collection. -curl -X POST 'https://api.hydradb.com/context/ingest' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -F "type=memory" \ - -F "database=acme_corp" \ - -F "collection=user_123" \ - -F 'memories=[ - { - "text": "Prefers dark mode and short answers.", - "infer": true, - "user_name": "John" - } - ]' -``` - - - -Wait for [`GET /context/status`](/api-reference/v2/endpoint/source-status) to report `completed` for the returned memory `id` in `user_123`, then run the query. - - - -```python Python SDK -# 2. Search the memories in the same collection. -result = client.query( - database="acme_corp", - collection="user_123", - query="How does this user like answers written?", - type="memory", -) -``` - -```typescript TypeScript SDK -// 2. Search the memories in the same collection. -const result = await client.query({ - database: "acme_corp", - collection: "user_123", - query: "How does this user like answers written?", - type: "memory", -}); -``` - -```bash cURL -# 2. Search the memories in the same collection. -curl -X POST 'https://api.hydradb.com/query' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "database": "acme_corp", - "collection": "user_123", - "query": "How does this user like answers written?", - "type": "memory" - }' -``` - - - - - -### What each property means - -| Property | What it is | -|---|---| -| `database` | The customer's or environment's database. Create it first with [`POST /databases`](/api-reference/v2/endpoint/create-database). | -| `collection` | The group inside the database. Both requests name the same one, so the query reads what the write stored. | -| `type` | `memory` on both: the write saves a [memory](/essentials/v2/context#2-save-memories) and the query searches memories. `knowledge` and `all` work the same way with the same scope. | -| `memories` | The memory items, as a JSON string. | -| `query` | The user's question. HydraDB ranks results inside the collection you named. | - -Use stable internal IDs for both fields, such as `user_123`, `workspace_42`, or `org_acme`. Display names, emails, and user-typed labels change, and a changed scope name orphans the context written under the old one. - -## 3. How writes and reads scope +## How writes and reads scope -**Writes:** Send the `collection` you will query the context from. John's memories go in John's collection; shared knowledge goes in the shared one. Omit `collection` and HydraDB uses the database's default collection, which is created on the first write. +**Writes:** Send the `collection` you will query the context from. John's memories go in John's collection; shared knowledge goes in the shared one. When you omit `collection`, HydraDB uses a universal default collection, which is automatically created. -**Reads:** A query that names one `collection` reads only that collection. It does not read the default collection or any other collection. To read several at once, send `collections` as a list, or as an object that maps each collection to a relative ranking weight, as in `{"company_docs": 1.5, "user_123": 0.8}`. +**Reads:** A query containing one `collection` reads only that collection. To read several collections at once, send `collections` as a list, or as an object that maps each collection to a relative ranking weight, as in `{"company_docs": 1.5, "user_123": 0.8}`. -**Deleting a collection:** [`DELETE /databases/collections`](/api-reference/v2/endpoint/delete-collection) permanently removes one collection and everything in it. The parent database and its other collections stay. Confirm the name with [List Collections](/api-reference/v2/endpoint/list-collections) first. On the dashboard, open a database to see its collections and delete from the list. +**Deleting a collection:** `DELETE /databases/collections` permanently deletes that collection and everything in it. The parent database and its other collections are unaffected. -## 4. Migrate from the deprecated tenant and sub-tenant fields - -`database` and `collection` are the current names for the fields that were called `tenant_id` and `sub_tenant_id`. The rename is user-facing only. Nothing about your stored context changes, the old names still work as deprecated aliases, and migration is optional and non-breaking. - -Both names work on every surface: - -| Surface | Deprecated (still works) | Current (preferred) | -|---|---|---| -| Routes | `/tenants`, `/tenants/status`, `/tenants/{tenant_id}/metadata-schema`, and the rest | `/databases`, `/databases/status`, `/databases/{database}/metadata-schema`, and the rest | -| Request fields | `tenant_id`, `sub_tenant_id` | `database`, `collection` | -| `/query` multi-scope selector | `sub_tenant_ids` | `collections` | -| Query params | `?tenant_id=...&sub_tenant_id=...` | `?database=...&collection=...` | - -Both route prefixes use the same handlers. Deprecated fields are accepted in the query string, the JSON body, and the multipart form. The singular `sub_tenant_id` still works on [`/query`](/api-reference/v2/endpoint/query) too. - -### Deprecation signals +## Deprecation signals When a request uses a deprecated route or field, HydraDB adds a deprecation notice. It is never an error, and the status code is unchanged: -- **Response headers:** `Deprecation: true`, plus a `Warning` header carrying the migration message. -- **`meta.deprecation`:** a list of notices in the response envelope's `meta` object, on endpoints that return the envelope. Each entry carries `deprecated`, a readable `message`, and `deprecated_since` (`"2.0.1"`). Field-level notices, such as `sub_tenant_ids` to `collections`, also include `deprecated_field` and `preferred_field`; route-level notices omit them. - - - -```json -{ - "success": true, - "data": { "...": "..." }, - "error": null, - "meta": { - "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", - "latency_ms": 12.3, - "deprecation": [ - { - "deprecated": true, - "message": "The /tenants routes are deprecated. Migrate to the /databases routes.", - "deprecated_since": "2.0.1" - } - ] - } -} -``` - - - -Use these signals to find and retire deprecated usage. Once you send only the current names on the `/databases` routes, the header and `meta.deprecation` disappear. - -### Sending both names - -If you send a current field and its deprecated alias together: +**Response headers:** `Deprecation: true`, plus a `Warning` header carrying the migration message. -- **Same value:** for example `database` and `tenant_id` both `"acme"`. Accepted. HydraDB uses the current field. -- **Different values:** for example `database: "acme"` and `tenant_id: "other"`. Rejected with `400`, because the two names refer to the same thing and must agree. Send only one. The same rule applies to `collection` and `sub_tenant_id`, and to `collections` and `sub_tenant_ids` on `/query`. +The deprecated names map one to one: `tenant_id` is `database`, `sub_tenant_id` is `collection`, `sub_tenant_ids` on `/query` is `collections`, and the `/tenants/*` routes are the `/databases/*` routes. ## Common mistakes @@ -246,6 +56,6 @@ Knowledge written with one user's `collection` is invisible to every other user. ## Related -- [Context](/essentials/v2/context#2-save-memories): preferences, decisions, and past conversations +- [Context](/essentials/v2/context#ingesting-memory): preferences, decisions, and past conversations - [Query](/essentials/v2/query): how scoping is applied at query time - [Databases API](/api-reference/v2/endpoint/databases-overview): creating databases and their metadata schema diff --git a/essentials/v2/metadata-2.mdx b/essentials/v2/metadata-2.mdx new file mode 100644 index 00000000..af1653ea --- /dev/null +++ b/essentials/v2/metadata-2.mdx @@ -0,0 +1,644 @@ +--- +title: "Metadata & Filtering (copy)" +description: "Declare metadata fields on a database, attach values when you ingest, and filter queries to the sources that match." +--- + +## Declare a field and filter on it + +Three requests: create the database with a metadata schema, ingest a source that carries values for those fields, then query with `metadata_filters`. The example declares `department`, `priority`, and a `summary_label` field that is also searchable as text. + + + Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript example. + + + + ```python Python SDK + import os + from hydra_db import HydraDB + + client = HydraDB(token=os.environ["HYDRADB_API_KEY"]) + + client.databases.create( + database="acme_corp", + database_metadata_schema=[ + {"name": "department", "data_type": "VARCHAR"}, + {"name": "priority", "data_type": "INT64"}, + { + "name": "summary_label", + "data_type": "VARCHAR", + "enable_dense_embedding": True, + "enable_sparse_embedding": True, + }, + ], + ) + ``` + + ```typescript TypeScript SDK + import { HydraDBClient } from "@hydradb/sdk"; + + const client = new HydraDBClient({ + token: process.env.HYDRADB_API_KEY, + }); + + await client.databases.create({ + database: "acme_corp", + databaseMetadataSchema: [ + { name: "department", dataType: "VARCHAR" }, + { name: "priority", dataType: "INT64" }, + { + name: "summary_label", + dataType: "VARCHAR", + enableDenseEmbedding: true, + enableSparseEmbedding: true, + }, + ], + }); + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/databases' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "database_metadata_schema": [ + { "name": "department", "data_type": "VARCHAR" }, + { "name": "priority", "data_type": "INT64" }, + { + "name": "summary_label", + "data_type": "VARCHAR", + "enable_dense_embedding": true, + "enable_sparse_embedding": true + } + ] + }' + ``` + + + + + + After creating the database, wait for [`GET /databases/status`](/api-reference/v2/endpoint/database-status) to report `infra.ready_for_ingestion: true` before ingesting. + + Send `metadata` and `additional_metadata` on each `app_knowledge[]` item, or on each `document_metadata[]` item when you upload files. For `type=memory`, the `memories` field is already a JSON string, and each memory item's `metadata` and `additional_metadata` are plain objects inside it; do not stringify them a second time. + + + + ```python Python SDK + import json + + client.context.ingest( + type="knowledge", + database="acme_corp", + collection="default", + app_knowledge=json.dumps([ + { + "database": "acme_corp", + "collection": "default", + "id": "auth-controls-001", + "kind": "knowledge_base", + "fields": { + "kind": "knowledge_base", + "title": "Authentication controls", + "body": "Authentication controls are reviewed quarterly for SOC2.", + }, + "metadata": { + "department": "security", + "priority": 7, + "summary_label": "quarterly access control review", + }, + "additional_metadata": {"author": "alice", "doc_version": 3}, + } + ]), + ) + ``` + + ```typescript TypeScript SDK + await client.context.ingest({ + type: "knowledge", + database: "acme_corp", + collection: "default", + appKnowledge: JSON.stringify([ + { + database: "acme_corp", + collection: "default", + id: "auth-controls-001", + kind: "knowledge_base", + fields: { + kind: "knowledge_base", + title: "Authentication controls", + body: "Authentication controls are reviewed quarterly for SOC2.", + }, + metadata: { + department: "security", + priority: 7, + summary_label: "quarterly access control review", + }, + additional_metadata: { author: "alice", doc_version: 3 }, + }, + ]), + }); + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/context/ingest' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -F "type=knowledge" \ + -F "database=acme_corp" \ + -F "collection=default" \ + -F 'app_knowledge=[ + { + "database": "acme_corp", + "collection": "default", + "id": "auth-controls-001", + "kind": "knowledge_base", + "fields": { + "kind": "knowledge_base", + "title": "Authentication controls", + "body": "Authentication controls are reviewed quarterly for SOC2." + }, + "metadata": { + "department": "security", + "priority": 7, + "summary_label": "quarterly access control review" + }, + "additional_metadata": { + "author": "alice", + "doc_version": 3 + } + } + ]' + ``` + + + + + + Wait for [`GET /context/status`](/api-reference/v2/endpoint/source-status) to report `completed` for `auth-controls-001` in the `default` collection before running this query. + + Top-level keys filter on `metadata`. Keys nested under `additional_metadata` filter on the free-form layer. Both can appear in one request. + + + + ```python Python SDK + result = client.query( + database="acme_corp", + collection="default", + query="How do access control reviews work?", + type="knowledge", + metadata_filters={ + "department": {"equals": "security"}, + "priority": {"equals": 7}, + "additional_metadata": {"author": "alice"}, + }, + ) + ``` + + ```typescript TypeScript SDK + const result = await client.query({ + database: "acme_corp", + collection: "default", + query: "How do access control reviews work?", + type: "knowledge", + metadataFilters: { + department: { equals: "security" }, + priority: { equals: 7 }, + additional_metadata: { author: "alice" }, + }, + }); + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/query' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collection": "default", + "query": "How do access control reviews work?", + "type": "knowledge", + "metadata_filters": { + "department": { "equals": "security" }, + "priority": { "equals": 7 }, + "additional_metadata": { "author": "alice" } + } + }' + ``` + + + + +### What each property means + +| Property | What it is | +| --- | --- | +| `metadata` on the item | Values for the declared fields. | +| `database_metadata_schema` | The fields a source's `metadata` may carry, each with a `name` and a `data_type`. The [schema field reference](#schema-field-reference) lists every option and limit. | +| `enable_dense_embedding`, `enable_sparse_embedding` | Make a `VARCHAR` field searchable as text: dense adds semantic search, sparse adds keyword (BM25) search. To search it, put the concept in `query`, not in `metadata_filters`. | +| `additional_metadata` on the item | Free-form fields with no schema. [Metadata and additional metadata](#metadata-and-additional-metadata) compares the two, and [Size limits](#4-size-limits) gives the per-item cap on each. | +| `metadata_filters` | Hard constraints applied before ranking. Every key must match. [Filter operators](#3-filter-operators) covers the forms. | + +A valid filter that matches no source returns an empty result. HydraDB does not widen it into an unfiltered search. + + + +## Metadata and additional metadata + +| Layer | Sent at ingest as | Query filter shape | Best for | +| --- | --- | --- | --- | +| Database metadata | `metadata` | Top-level keys in `metadata_filters.` | Fields you filter on often, such as department, region, plan, customer, or status. Declare their names and types in `database_metadata_schema`. | +| Additional metadata | `additional_metadata` | Nested under metadata `metadata_filters.additional_metadata` | Free-form per-source fields for display, citations, debugging, external IDs, or occasional filters. No schema. | + +A filter runs in three steps: + +1. HydraDB resolves the `metadata` and `additional_metadata` filters to the matching source IDs. +2. It runs vector and keyword retrieval only over those sources. +3. It rechecks every retrieved chunk against the filter. The recheck also keeps graph expansion and retry paths from leaking excluded sources. + +An `additional_metadata` filter that cannot be resolved up front is checked after retrieval, with about 3x over-fetch to compensate. + +A few fields worth declaring from the start: + +- **`status`:** tag every source `draft` or `published`, and send `{"status": {"equals": "published"}}` on user-facing queries to keep work in progress out of customer answers. +- **`language`:** route each query to its language with a filter on the detected language. + +For a company brain, filters do the isolation inside one collection: put a team, region, or user id in `metadata` and filter on it in each query. Use separate [collections](/essentials/v2/databases-and-collections#1-choose-how-to-scope-your-data) only for data that must never meet in one search. + + + + + +## 3. Filter operators + +Each top-level key in `metadata_filters` takes an operator object naming the comparison: + +| Operator | Value | Matches | +| --- | --- | --- | +| `equals` | a single value | sources whose whole stored value is exactly that value | +| `contains` | a single value | sources whose field holds that value, at any position in a multi-value field | +| `contains_any` | an array | sources holding any one of the listed values (OR, like IN) | + +`equals` works on every declared type, so `{"priority": {"equals": 7}}` is valid on an `INT64` field. `contains`, `contains_any`, and arrays need a `VARCHAR` field; sent for a declared field of another type, they are rejected with `400`. + + + ```json + { + "metadata_filters": { + "department": { "equals": "legal" }, + "attendee_emails": { "contains": "b@company.com" }, + "tags": { "contains_any": ["alpha", "beta"] } + } + } + ``` + + Given four sources with these `attendee_emails` values: + + | Source | `attendee_emails` | + | --- | --- | + | A | `a@company.com` | + | B | `a@company.com,b@company.com` | + | C | `c@company.com` | + | D | `x@company.com,a@company.com,z@company.com` | + + | Filter | Returns | + | --- | --- | + | `{"equals": "a@company.com"}` | A | + | `{"contains": "a@company.com"}` | A, B, D | + | `{"contains_any": ["a@company.com", "c@company.com"]}` | A, B, C, D | + + +| Behavior | Contract | +| --- | --- | +| Multiple keys | AND. Every key you send must match, across both layers. | +| Lists | ANY, not ALL. `{"contains_any": ["alpha", "beta"]}` matches a source tagged `alpha` and a source tagged `beta`. Adding values widens the result set; there is no ALL operator inside a single key. | +| OR | Within one key, use `contains_any`. Across different keys, run several queries and union the results yourself. | +| Null values | Rejected with `400` (`metadata_filters values cannot be null`). | +| Range and fuzzy | Not supported. Put the concept in `query`, use a searchable `VARCHAR` field, or post-process in your application. | +| Graph context | Respects the filter; graph paths from excluded sources are removed. | +| Size | At most 500 values per list, and 64 KiB for the whole `metadata_filters` object. See [filter size limits](#filter-size-limits). | + +**Filtering `additional_metadata`:** operators apply to top-level keys only. Inside `additional_metadata`, use a bare value for an exact match or an array to match any listed value. An operator placed there is not rejected; it is read as an exact match against a stored object, so the query returns `200` with an empty result. + +**What returns `400`, and what does not:** a known operator with the wrong value type, several operators in one object, or a `null` value is rejected with `400`. A misspelled operator, such as `{"contian": "x"}`, is not rejected; it is read as a filter for a stored object with that key and matches nothing. + +**Reserved key names:** `equals`, `contains`, and `contains_any` are read as operators. This only matters for a `JSON` field that stores an object whose keys are all drawn from those words: `{"contains": "x"}` is read as the operator, `{"contains": "a", "equals": "b"}` is rejected with `400`, and `{"contains": "a", "other": 1}` stays an ordinary exact-match filter. To match such an object, rename the nested key or the field. + +**Bare forms:** filters without an operator still work but are deprecated, because the comparison is inferred from the JSON shape. A bare value behaves as `equals`, a bare array as `contains_any`, and a one-element array as `contains`, so `{"emails": "a@x"}` and `{"emails": ["a@x"]}` return different results. `document_metadata` is still accepted as a deprecated alias for `additional_metadata`; when both are present, `additional_metadata` wins on conflicts. + + + +### Store several values in one field + +A declared schema field holds a single value. To store several values in one field, declare it as `VARCHAR` and join the values with commas, then filter for one member with `contains`. + + + At ingest: + + ```json + { + "metadata": { + "attendee_emails": "a@company.com,b@company.com" + } + } + ``` + + At query: + + ```json + { + "metadata_filters": { + "attendee_emails": { "contains": "b@company.com" } + } + } + ``` + + +- **`data_type: "array"` is not accepted on a declared field:** declaring one is rejected with `400`. +- **An array value for a declared `VARCHAR` field is also rejected:** `metadata field "attendee_emails" must be of type string, got array`. Join the values yourself. +- **The comma is the separator:** a value that itself contains a comma will not match as expected. Use a field per value, or a different value format, if your values can contain commas. +- **Size the field for the whole joined string:** `max_length` defaults to `1024`, its maximum is `65535`, and it cannot be raised after the field is created, so declare it large enough up front. +- **`equals` compares the entire joined string:** it is rarely what you want on a multi-value field. Use `contains`. + + + +## 4. Size limits + +### Stored metadata + +Every request that attaches metadata is checked against two caps, on ingest and on metadata edit alike: + +| Layer | Send as | Cap | +| --- | --- | --- | +| `metadata` | `metadata` at ingest, `database_metadata` on edit | 16 KiB (16,384 bytes) | +| `additional_metadata` | `additional_metadata` | 1 KiB (1,024 bytes) | + +Deprecated aliases are still accepted, but which one works depends on the endpoint: + +| Alias | On `/context/ingest` | On `PATCH /context/{id}/metadata` | +| --- | --- | --- | +| `tenant_metadata` | accepted | accepted (`database_metadata` wins if both are sent) | +| `document_metadata` | accepted | rejected with `400`: send `additional_metadata` | + +Accepted aliases have the same cap as the canonical field. + +The cap applies to the whole map, not to any one value, and it is measured on the map's compact JSON encoding in UTF-8 bytes. Three consequences: + +- **Keys and punctuation count:** quotes, colons, commas, and braces all count toward the byte limit. +- **Bytes, not characters:** accented Latin characters cost 2 bytes, most CJK characters 3, and emoji 4. +- **Budget in bytes from the start:** a 950-character summary sounds comfortably under a 1 KiB cap, but with two small sibling keys it serializes to 1,015 bytes (65 bytes of that is structure alone). Push the summary to 1,000 characters and the request is rejected at 1,065 bytes. + +Exceeding either cap fails the whole request with `400` before anything is ingested. The message names the offending field and reports both numbers. On [`PATCH /context/{id}/metadata`](/api-reference/v2/endpoint/update-source-metadata) the same message is prefixed with `invalid metadata edit:`. + + + ```json Document metadata: 1,015 bytes, just inside the 1 KiB cap + {"title":"Q3 Board Deck","author":"ada@example.com","summary":"<950 characters>"} + ``` + + ```json + { + "success": false, + "data": null, + "error": { + "code": "INVALID_INPUT", + "message": "additional_metadata is too large (1065 bytes when serialized; the maximum is 1024). Reduce the number or size of metadata fields." + } + } + ``` + + +If a source needs more than 1 KiB of descriptive metadata, put the long text in the source's body, where it gets chunked and embedded, and keep `additional_metadata` for the short values you filter on. + +### Filter size limits + +`metadata_filters` on [`/query`](/api-reference/v2/endpoint/query) has its own pair of caps. They bound what you send at query time, not how much metadata a source carries: + +| Limit | Cap | +| --- | --- | +| Values in any one list | 500 | +| Whole `metadata_filters` object | 64 KiB (65,536 bytes) | + +Both are measured the same way as the stored caps: compact JSON, UTF-8 bytes, field names and punctuation counted. The object total includes the nested `additional_metadata` object, and it is measured after operator objects are reduced to their values, so `{"contains": "x"}` counts as `["x"]` and the operator keyword costs nothing. + +Both limits exist because every value in a list is expanded into the filter expression sent to the vector store. The per-list cap catches one runaway list; the object cap catches many individually legal lists adding up. Twenty lists of 500 values are each within the element cap but total roughly 127 KiB, so the object cap is what rejects them. + +Exceeding either limit returns `400` before the query runs, naming the offending key or the actual byte count. + + + ```text + metadata_filters.customer_id (got 743) must contain at most 500 values + + metadata_filters is too large (130251 bytes when serialized; the maximum is 65536). + Reduce the number or size of filter values. + ``` + + +Needing far more than 500 values in one filter usually means the constraint belongs in the data rather than the query: add a metadata field that groups those values (a segment, tier, or cohort key) and filter on that instead. + + + + + +## 5. Add schema fields later + +[`PATCH /databases/{database}/metadata-schema`](/api-reference/v2/endpoint/update-metadata-schema) adds fields to an existing database. It is additive only: fields are added, never deleted, retyped, or reflagged. The response returns `added_fields` directly, without the `success` and `data` envelope, and a field you resend with an identical definition is skipped. + + + + + ```python Python SDK + client.databases.update_metadata_schema( + "acme_corp", + add_fields=[{"name": "status", "data_type": "VARCHAR", "max_length": 32}], + ) + ``` + + ```typescript TypeScript SDK + await client.databases.updateMetadataSchema({ + database: "acme_corp", + addFields: [{ name: "status", dataType: "VARCHAR", maxLength: 32 }], + }); + ``` + + ```bash cURL + curl -X PATCH 'https://api.hydradb.com/databases/acme_corp/metadata-schema' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "add_fields": [ + { "name": "status", "data_type": "VARCHAR", "max_length": 32 } + ] + }' + ``` + + + + +Plan the schema before your first ingest: + +- **Searchable fields are declared at creation:** fields added later cannot turn on dense or sparse search; the endpoint rejects `enable_dense_embedding` and `enable_sparse_embedding`. +- **Existing fields are fixed:** renaming a key means re-ingesting the affected sources, or creating a new database with the corrected schema. +- **Undeclared keys match nothing:** a database with a schema rejects undeclared `metadata` keys on ingest and on edit, so no source ever holds them, and a filter on such a key returns nothing. The exceptions are `connector_id` and `provider`, which [connectors](/essentials/v2/connectors#metadata-on-synced-objects) write on every synced source. If you will filter on a field more than once, declare it. + + + +## 6. Update metadata without re-ingesting + +Use [`PATCH /context/{id}/metadata`](/api-reference/v2/endpoint/update-source-metadata) when you know the source ID and need to change its metadata in place. The body uses `database_metadata` for the schema-backed layer (the shorter `metadata` spelling from ingest is not accepted here) and `additional_metadata` for the free-form layer. + + + + + ```python Python SDK + client.context.update_source_metadata( + "auth-controls-001", + database="acme_corp", + collection="default", + database_metadata={"department": "legal"}, + additional_metadata={"author": "grace"}, + ) + ``` + + ```typescript TypeScript SDK + await client.context.updateSourceMetadata({ + id: "auth-controls-001", + database: "acme_corp", + collection: "default", + databaseMetadata: { department: "legal" }, + additionalMetadata: { author: "grace" }, + }); + ``` + + ```bash cURL + curl -X PATCH 'https://api.hydradb.com/context/auth-controls-001/metadata' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collection": "default", + "database_metadata": { "department": "legal" }, + "additional_metadata": { "author": "grace" } + }' + ``` + + + + +- **The source must already exist:** this endpoint does not create sources, and `collection` is required. +- **At least one of `database_metadata`, `additional_metadata`, `acl`, or `acl_inherit: true` is required:** `tenant_metadata` is a deprecated alias for `database_metadata`; `document_metadata` is rejected. +- **Metadata merges:** sent keys are inserted or overwritten; omitted keys are preserved. `acl` is the exception: when sent, it replaces the stored list, and an `acl`-only body is a valid edit. To remove a connector source's own ACL, send `acl_inherit: true` without `acl`. This can widen access. See [Restore resource permissions](/essentials/v2/connectors#restore-resource-permissions) for eligibility and validation rules. +- **The edit is visible to filters and listing right away:** if no edited field has an embedding flag, the vector store is untouched and the response reports `vector_sync_required: false`. +- **Searchable fields sync synchronously:** if an edited field has `enable_dense_embedding` or `enable_sparse_embedding`, HydraDB refreshes that field's search lane and reports `vector_sync_required` and `vector_synced` in the response (the `milvus_sync_required` and `milvus_synced` aliases are still emitted, deprecated). Such a field rejects `null`, because it would leave stale metadata vectors behind. + +To replace a source's content as well as its metadata, re-ingest it with `upsert: true` and the same source `id`. Upsert replaces the source payload and the metadata supplied by ingestion. + + + +## 7. List sources with metadata filters + +Use [`POST /context/list`](/api-reference/v2/endpoint/list-context) to browse or page sources rather than run semantic retrieval. Its `filters` object takes `metadata`, `additional_metadata`, and `source_fields`, each as bare key-value pairs. `source_fields` filters on the source's own fields: `title`, `type`, `description`, `url`, `timestamp`, and for app sources `app_provider`, `app_kind`, `app_external_id`, and `app_parent_id`. Pair `app_external_id` or `app_parent_id` with `app_provider`, because a Jira issue key and a Linear ID can collide. + + + + + ```python Python SDK + from hydra_db import ListContentFilter + + result = client.context.list( + database="acme_corp", + collection="default", + type="knowledge", + filters=ListContentFilter( + metadata={"department": "legal"}, + additional_metadata={"author": "alice"}, + source_fields={"app_provider": "slack"}, + ), + ) + ``` + + ```typescript TypeScript SDK + const result = await client.context.list({ + database: "acme_corp", + collection: "default", + type: "knowledge", + filters: { + metadata: { department: "legal" }, + additionalMetadata: { author: "alice" }, + sourceFields: { appProvider: "slack" }, + }, + }); + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/context/list' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collection": "default", + "type": "knowledge", + "filters": { + "metadata": { "department": "legal" }, + "additional_metadata": { "author": "alice" }, + "source_fields": { "app_provider": "slack" } + } + }' + ``` + + + + +`/context/list` also accepts the deprecated aliases `tenant_metadata` for `metadata` and `document_metadata` for `additional_metadata`; the current name wins on conflicts. It takes the same `acl` field as `/query` to list as one user. See [Query](/essentials/v2/query#6-query-on-behalf-of-a-user). + + + + + +## Schema field reference + +Each entry in `database_metadata_schema` on [Create Database](/api-reference/v2/endpoint/create-database), and in `add_fields` on [Update Metadata Schema](/api-reference/v2/endpoint/update-metadata-schema), takes these options: + +| Field | Type / values | Purpose | +| --- | --- | --- | +| `name` | string | Metadata key. Must start with a letter, contain only letters, numbers, and underscores, and not use a reserved system name such as `source_id`, `chunk_id`, or `metadata`. | +| `data_type` | `VARCHAR`, `BOOL`, `INT8`, `INT16`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `JSON`, or the friendly aliases `string`, `boolean`, `integer`, `float`, `object` | Defaults to `VARCHAR`. `ARRAY` is not supported and is rejected with `400`; for multi-value fields see [Store several values in one field](#store-several-values-in-one-field). | +| `max_length` | integer | Maximum length for a `VARCHAR` value. Default `1024`, maximum `65535`. This sizes one declared field; it is not the limit on how much metadata you can send per request, which is in [Size limits](#4-size-limits). | +| `enable_dense_embedding` | boolean | Adds semantic search over a `VARCHAR` field. | +| `enable_sparse_embedding` | boolean | Adds keyword (BM25) search over a `VARCHAR` field. | + +Limits: + +- Up to 32 custom metadata fields per database. +- Up to 6 embedding-enabled fields per database: `enable_dense_embedding` and `enable_sparse_embedding` each count as one, so a field with both set counts as two. Exceeding the limit fails database creation with `400` before anything is provisioned. +- Field names are unique case-insensitively. +- Embedding flags are only valid on `VARCHAR` fields. +- Values must match the declared type when the database has a schema. +- Unknown `metadata` keys are rejected on ingest and edit when the database has a non-empty schema. + +## Common mistakes + +| Symptom | Cause | Fix | +| --- | --- | --- | +| A filter on a top-level key returns nothing | The key is not declared in the schema, so no source holds it | [Add the field](#5-add-schema-fields-later) and set a value on your sources, or keep it in `additional_metadata` and nest the filter there. | +| A filter on an `additional_metadata` key returns nothing | The key was sent top-level, so it was matched against `metadata`, or it was sent with an operator object | Nest it with a bare value: `metadata_filters: { additional_metadata: { author: "alice" } }`. See [Filter operators](#3-filter-operators). | +| A query returns nothing after you add filters | The combined constraints exclude everything; keys are ANDed | Start with the minimum hard constraints, add filters one at a time, and re-check counts. | +| A range or fuzzy filter does not work | Only `equals`, `contains`, and `contains_any` are supported | Move the constraint into the `query` text, or post-process in your application. | +| An `additional_metadata` filter is slow | It could not be resolved up front, so it is checked [after retrieval](#metadata-and-additional-metadata) | Move the hot field into `metadata` and declare it in the schema. | +| A schema change does not take effect, or you need a searchable field after creation | The schema is [additive only](#5-add-schema-fields-later), and added fields cannot take embedding flags | Create a new database with the corrected schema and re-ingest. There is no in-place migration for existing fields. | +| A metadata edit returns `400` | Unknown key, wrong type, oversized payload, too-deep nesting, reserved key, missing `collection`, `null` on a searchable field, `acl` combined with `acl_inherit: true`, or inheritance without connector resource attribution | Check the schema, the [size limits](#4-size-limits), and the [edit rules](#6-update-metadata-without-re-ingesting); send a valid metadata edit or one ACL action. For a searchable field, set a non-null value or re-ingest. | + +## Related + +- [Context](/essentials/v2/context): what attaches to knowledge sources +- [Databases and Collections](/essentials/v2/databases-and-collections): scoping with collections, which filters do not replace +- [Query](/essentials/v2/query): how `metadata_filters` interacts with ranking +- [Create Database (API Reference)](/api-reference/v2/endpoint/create-database): full `database_metadata_schema` reference +- [Query (API Reference)](/api-reference/v2/endpoint/query): full `metadata_filters` reference +- [List Context (API Reference)](/api-reference/v2/endpoint/list-context): source browsing filters +- [Update Source Metadata (API Reference)](/api-reference/v2/endpoint/update-source-metadata): point metadata edits +- [Update Metadata Schema (API Reference)](/api-reference/v2/endpoint/update-metadata-schema): additive database schema changes diff --git a/essentials/v2/metadata.mdx b/essentials/v2/metadata.mdx index 317872b0..c41e8677 100644 --- a/essentials/v2/metadata.mdx +++ b/essentials/v2/metadata.mdx @@ -1,639 +1,94 @@ --- -title: "Metadata Filters" -description: "Declare metadata fields on a database, attach values when you ingest, and filter queries to the sources that match." +title: "Metadata" +description: "Declare metadata fields on a database, attach values when you ingest, and filter queries to the sources that match. Use it for filtering and advanced querying patterns." --- -Metadata is structured data attached to each [knowledge](/essentials/v2/context) source and [memory](/essentials/v2/context#2-save-memories). You send it at ingest, and at query time `metadata_filters` on [`POST /query`](/api-reference/v2/endpoint/query) keeps only the sources whose values match, such as `department = legal` or `status = published`, before ranking runs. +## Overview - Two layers -## 1. Declare a field and filter on it - -Three requests: create the database with a metadata schema, ingest a source that carries values for those fields, then query with `metadata_filters`. The example declares `department`, `priority`, and a `summary_label` field that is also searchable as text. - - - -Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript example. - - -```python Python SDK -import os -from hydra_db import HydraDB - -client = HydraDB(token=os.environ["HYDRADB_API_KEY"]) - -client.databases.create( - database="acme_corp", - database_metadata_schema=[ - {"name": "department", "data_type": "VARCHAR"}, - {"name": "priority", "data_type": "INT64"}, - { - "name": "summary_label", - "data_type": "VARCHAR", - "enable_dense_embedding": True, - "enable_sparse_embedding": True, - }, - ], -) -``` -```typescript TypeScript SDK -import { HydraDBClient } from "@hydradb/sdk"; - -const client = new HydraDBClient({ - token: process.env.HYDRADB_API_KEY, -}); - -await client.databases.create({ - database: "acme_corp", - databaseMetadataSchema: [ - { name: "department", dataType: "VARCHAR" }, - { name: "priority", dataType: "INT64" }, - { - name: "summary_label", - dataType: "VARCHAR", - enableDenseEmbedding: true, - enableSparseEmbedding: true, - }, - ], -}); -``` -```bash cURL -curl -X POST 'https://api.hydradb.com/databases' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "database": "acme_corp", - "database_metadata_schema": [ - { "name": "department", "data_type": "VARCHAR" }, - { "name": "priority", "data_type": "INT64" }, - { - "name": "summary_label", - "data_type": "VARCHAR", - "enable_dense_embedding": true, - "enable_sparse_embedding": true - } - ] - }' -``` - - - - - - -After creating the database, wait for [`GET /databases/status`](/api-reference/v2/endpoint/database-status) to report `infra.ready_for_ingestion: true` before ingesting. - -Send `metadata` and `additional_metadata` on each `app_knowledge[]` item, or on each `document_metadata[]` item when you upload files. For `type=memory`, the `memories` field is already a JSON string, and each memory item's `metadata` and `additional_metadata` are plain objects inside it; do not stringify them a second time. - - -```python Python SDK -import json - -client.context.ingest( - type="knowledge", - database="acme_corp", - collection="default", - app_knowledge=json.dumps([ - { - "database": "acme_corp", - "collection": "default", - "id": "auth-controls-001", - "kind": "knowledge_base", - "fields": { - "kind": "knowledge_base", - "title": "Authentication controls", - "body": "Authentication controls are reviewed quarterly for SOC2.", - }, - "metadata": { - "department": "security", - "priority": 7, - "summary_label": "quarterly access control review", - }, - "additional_metadata": {"author": "alice", "doc_version": 3}, - } - ]), -) -``` -```typescript TypeScript SDK -await client.context.ingest({ - type: "knowledge", - database: "acme_corp", - collection: "default", - appKnowledge: JSON.stringify([ - { - database: "acme_corp", - collection: "default", - id: "auth-controls-001", - kind: "knowledge_base", - fields: { - kind: "knowledge_base", - title: "Authentication controls", - body: "Authentication controls are reviewed quarterly for SOC2.", - }, - metadata: { - department: "security", - priority: 7, - summary_label: "quarterly access control review", - }, - additional_metadata: { author: "alice", doc_version: 3 }, - }, - ]), -}); -``` -```bash cURL -curl -X POST 'https://api.hydradb.com/context/ingest' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -F "type=knowledge" \ - -F "database=acme_corp" \ - -F "collection=default" \ - -F 'app_knowledge=[ - { - "database": "acme_corp", - "collection": "default", - "id": "auth-controls-001", - "kind": "knowledge_base", - "fields": { - "kind": "knowledge_base", - "title": "Authentication controls", - "body": "Authentication controls are reviewed quarterly for SOC2." - }, - "metadata": { - "department": "security", - "priority": 7, - "summary_label": "quarterly access control review" - }, - "additional_metadata": { - "author": "alice", - "doc_version": 3 - } - } - ]' -``` - - - - - - -Wait for [`GET /context/status`](/api-reference/v2/endpoint/source-status) to report `completed` for `auth-controls-001` in the `default` collection before running this query. - -Top-level keys filter on `metadata`. Keys nested under `additional_metadata` filter on the free-form layer. Both can appear in one request. - - -```python Python SDK -result = client.query( - database="acme_corp", - collection="default", - query="How do access control reviews work?", - type="knowledge", - metadata_filters={ - "department": {"equals": "security"}, - "priority": {"equals": 7}, - "additional_metadata": {"author": "alice"}, - }, -) -``` -```typescript TypeScript SDK -const result = await client.query({ - database: "acme_corp", - collection: "default", - query: "How do access control reviews work?", - type: "knowledge", - metadataFilters: { - department: { equals: "security" }, - priority: { equals: 7 }, - additional_metadata: { author: "alice" }, - }, -}); -``` -```bash cURL -curl -X POST 'https://api.hydradb.com/query' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "database": "acme_corp", - "collection": "default", - "query": "How do access control reviews work?", - "type": "knowledge", - "metadata_filters": { - "department": { "equals": "security" }, - "priority": { "equals": 7 }, - "additional_metadata": { "author": "alice" } - } - }' -``` - - - - -### What each property means - -| Property | What it is | -|---|---| -| `database_metadata_schema` | The fields a source's `metadata` may carry, each with a `name` and a `data_type`. The [schema field reference](#schema-field-reference) lists every option and limit. | -| `enable_dense_embedding`, `enable_sparse_embedding` | Make a `VARCHAR` field searchable as text: dense adds semantic search, sparse adds keyword (BM25) search. To search it, put the concept in `query`, not in `metadata_filters`. | -| `metadata` on the item | Values for the declared fields. | -| `additional_metadata` on the item | Free-form fields with no schema. [The two layers](#2-the-two-layers) compares the two, and [Size limits](#4-size-limits) gives the per-item cap on each. | -| `metadata_filters` | Hard constraints applied before ranking. Every key must match. [Filter operators](#3-filter-operators) covers the forms. | - -A valid filter that matches no source returns an empty result. HydraDB does not widen it into an unfiltered search. - - - -## 2. The two layers - -| Layer | Sent at ingest as | Query filter shape | Best for | -| --- | --- | --- | --- | -| Database metadata | `metadata` | Top-level keys in `metadata_filters` | Fields you filter on often, such as department, region, plan, customer, or status. Declare their names and types in `database_metadata_schema`. | -| Additional metadata | `additional_metadata` | Nested under `metadata_filters.additional_metadata` | Free-form per-source fields for display, citations, debugging, external IDs, or occasional filters. No schema. | - -A filter runs in three steps: - -1. HydraDB resolves the `metadata` and `additional_metadata` filters to the matching source IDs. -2. It runs vector and keyword retrieval only over those sources. -3. It rechecks every retrieved chunk against the filter. The recheck also keeps graph expansion and retry paths from leaking excluded sources. - -An `additional_metadata` filter that cannot be resolved up front is checked after retrieval, with about 3x over-fetch to compensate. - -A few fields worth declaring from the start: - -- **`status`:** tag every source `draft` or `published`, and send `{"status": {"equals": "published"}}` on user-facing queries to keep work in progress out of customer answers. -- **`language`:** route each query to its language with a filter on the detected language. - -For a company brain, filters do the isolation inside one collection: put a team, region, or user id in `metadata` and filter on it in each query. Use separate [collections](/essentials/v2/databases-and-collections#1-choose-how-to-scope-your-data) only for data that must never meet in one search. - - - - -## 3. Filter operators - -Each top-level key in `metadata_filters` takes an operator object naming the comparison: - -| Operator | Value | Matches | +| Layer | What it is | Use for | | --- | --- | --- | -| `equals` | a single value | sources whose whole stored value is exactly that value | -| `contains` | a single value | sources whose field holds that value, at any position in a multi-value field | -| `contains_any` | an array | sources holding any one of the listed values (OR, like IN) | - -`equals` works on every declared type, so `{"priority": {"equals": 7}}` is valid on an `INT64` field. `contains`, `contains_any`, and arrays need a `VARCHAR` field; sent for a declared field of another type, they are rejected with `400`. - - +| `metadata` | Declared in the schema and typed, so filters on it are fast. | Fields you filter on often, like department or status. | +| `additional_metadata` | Free-form with no schema. Filters can be slower, since they may be checked after retrieval. | Display values, citations, and external IDs. | -```json -{ - "metadata_filters": { - "department": { "equals": "legal" }, - "attendee_emails": { "contains": "b@company.com" }, - "tags": { "contains_any": ["alpha", "beta"] } - } -} -``` +## Schema fields -Given four sources with these `attendee_emails` values: - -| Source | `attendee_emails` | -| --- | --- | -| A | `a@company.com` | -| B | `a@company.com,b@company.com` | -| C | `c@company.com` | -| D | `x@company.com,a@company.com,z@company.com` | - -| Filter | Returns | -| --- | --- | -| `{"equals": "a@company.com"}` | A | -| `{"contains": "a@company.com"}` | A, B, D | -| `{"contains_any": ["a@company.com", "c@company.com"]}` | A, B, C, D | - - - -| Behavior | Contract | +| Option | Rule | | --- | --- | -| Multiple keys | AND. Every key you send must match, across both layers. | -| Lists | ANY, not ALL. `{"contains_any": ["alpha", "beta"]}` matches a source tagged `alpha` and a source tagged `beta`. Adding values widens the result set; there is no ALL operator inside a single key. | -| OR | Within one key, use `contains_any`. Across different keys, run several queries and union the results yourself. | -| Null values | Rejected with `400` (`metadata_filters values cannot be null`). | -| Range and fuzzy | Not supported. Put the concept in `query`, use a searchable `VARCHAR` field, or post-process in your application. | -| Graph context | Respects the filter; graph paths from excluded sources are removed. | -| Size | At most 500 values per list, and 64 KiB for the whole `metadata_filters` object. See [filter size limits](#filter-size-limits). | - -**Filtering `additional_metadata`:** operators apply to top-level keys only. Inside `additional_metadata`, use a bare value for an exact match or an array to match any listed value. An operator placed there is not rejected; it is read as an exact match against a stored object, so the query returns `200` with an empty result. - -**What returns `400`, and what does not:** a known operator with the wrong value type, several operators in one object, or a `null` value is rejected with `400`. A misspelled operator, such as `{"contian": "x"}`, is not rejected; it is read as a filter for a stored object with that key and matches nothing. - -**Reserved key names:** `equals`, `contains`, and `contains_any` are read as operators. This only matters for a `JSON` field that stores an object whose keys are all drawn from those words: `{"contains": "x"}` is read as the operator, `{"contains": "a", "equals": "b"}` is rejected with `400`, and `{"contains": "a", "other": 1}` stays an ordinary exact-match filter. To match such an object, rename the nested key or the field. - -**Bare forms:** filters without an operator still work but are deprecated, because the comparison is inferred from the JSON shape. A bare value behaves as `equals`, a bare array as `contains_any`, and a one-element array as `contains`, so `{"emails": "a@x"}` and `{"emails": ["a@x"]}` return different results. `document_metadata` is still accepted as a deprecated alias for `additional_metadata`; when both are present, `additional_metadata` wins on conflicts. - - - -### Store several values in one field +| `name` | Must be unique (case-insensitive). | +| `data_type` | Defaults to `VARCHAR`. `ARRAY` isn't supported. | +| `max_length` | Defaults to 1024, up to 65535. | +| Dense/sparse flags | Make a `VARCHAR` field searchable through `query`, not through filters. | -A declared schema field holds a single value. To store several values in one field, declare it as `VARCHAR` and join the values with commas, then filter for one member with `contains`. +A database allows up to 32 fields and 6 embedding flags. Values must match their declared type, and unknown keys are rejected. - +## Lifecycle & how filters run -At ingest: +Create the database with a schema and wait until it's ready. Ingest your sources with metadata values, wait for them to reach `completed`, then query with `metadata_filters`. -```json -{ - "metadata": { - "attendee_emails": "a@company.com,b@company.com" - } -} -``` +When a query runs, HydraDB: -At query: +- Finds the sources that match the filter, retrieves only from those, then rechecks every chunk, including graph paths. +- Returns an empty result if nothing matches. It never falls back to a wider search. -```json -{ - "metadata_filters": { - "attendee_emails": { "contains": "b@company.com" } - } -} -``` +## Operators - - -- **`data_type: "array"` is not accepted on a declared field:** declaring one is rejected with `400`. -- **An array value for a declared `VARCHAR` field is also rejected:** `metadata field "attendee_emails" must be of type string, got array`. Join the values yourself. -- **The comma is the separator:** a value that itself contains a comma will not match as expected. Use a field per value, or a different value format, if your values can contain commas. -- **Size the field for the whole joined string:** `max_length` defaults to `1024`, its maximum is `65535`, and it cannot be raised after the field is created, so declare it large enough up front. -- **`equals` compares the entire joined string:** it is rarely what you want on a multi-value field. Use `contains`. - - - -## 4. Size limits - -### Stored metadata - -Every request that attaches metadata is checked against two caps, on ingest and on metadata edit alike: - -| Layer | Send as | Cap | +| Operator | Matches | Types | | --- | --- | --- | -| `metadata` | `metadata` at ingest, `database_metadata` on edit | 16 KiB (16,384 bytes) | -| `additional_metadata` | `additional_metadata` | 1 KiB (1,024 bytes) | - -Deprecated aliases are still accepted, but which one works depends on the endpoint: - -| Alias | On `/context/ingest` | On `PATCH /context/{id}/metadata` | -| --- | --- | --- | -| `tenant_metadata` | accepted | accepted (`database_metadata` wins if both are sent) | -| `document_metadata` | accepted | rejected with `400`: send `additional_metadata` | - -Accepted aliases have the same cap as the canonical field. - -The cap applies to the whole map, not to any one value, and it is measured on the map's compact JSON encoding in UTF-8 bytes. Three consequences: - -- **Keys and punctuation count:** quotes, colons, commas, and braces all count toward the byte limit. -- **Bytes, not characters:** accented Latin characters cost 2 bytes, most CJK characters 3, and emoji 4. -- **Budget in bytes from the start:** a 950-character summary sounds comfortably under a 1 KiB cap, but with two small sibling keys it serializes to 1,015 bytes (65 bytes of that is structure alone). Push the summary to 1,000 characters and the request is rejected at 1,065 bytes. - -Exceeding either cap fails the whole request with `400` before anything is ingested. The message names the offending field and reports both numbers. On [`PATCH /context/{id}/metadata`](/api-reference/v2/endpoint/update-source-metadata) the same message is prefixed with `invalid metadata edit:`. +| `equals` | The exact whole value | Any | +| `contains` | One member of a multi-value field | `VARCHAR` only | +| `contains_any` | Any of the listed values (OR) | `VARCHAR` only | - +| Behavior | Rule | +| --- | --- | +| Multiple keys | All must match (AND). | +| Null, range, fuzzy | Not supported. | +| OR across keys | Run separate queries and combine the results. | +| `additional_metadata` | Takes bare values or arrays only, not operators. | -```json Document metadata: 1,015 bytes, just inside the 1 KiB cap -{"title":"Q3 Board Deck","author":"ada@example.com","summary":"<950 characters>"} -``` +## Multi-value fields -```json -{ - "success": false, - "data": null, - "error": { - "code": "INVALID_INPUT", - "message": "additional_metadata is too large (1065 bytes when serialized; the maximum is 1024). Reduce the number or size of metadata fields." - } -} -``` +- Store the values as one comma-joined `VARCHAR` and filter for a member with `contains`. +- Set `max_length` large enough for the whole string up front, since it can't be raised later. - +## Errors -If a source needs more than 1 KiB of descriptive metadata, put the long text in the source's body, where it gets chunked and embedded, and keep `additional_metadata` for the short values you filter on. +- A wrong type, multiple operators in one object, or a null value returns `400`. +- A misspelled operator, or an operator inside `additional_metadata`, doesn't error but silently returns nothing. +- Bare filters without an operator still work but are deprecated. -### Filter size limits +## Size caps -`metadata_filters` on [`/query`](/api-reference/v2/endpoint/query) has its own pair of caps. They bound what you send at query time, not how much metadata a source carries: +Caps are measured in bytes of compact JSON, and keys count toward the total. | Limit | Cap | | --- | --- | -| Values in any one list | 500 | -| Whole `metadata_filters` object | 64 KiB (65,536 bytes) | - -Both are measured the same way as the stored caps: compact JSON, UTF-8 bytes, field names and punctuation counted. The object total includes the nested `additional_metadata` object, and it is measured after operator objects are reduced to their values, so `{"contains": "x"}` counts as `["x"]` and the operator keyword costs nothing. - -Both limits exist because every value in a list is expanded into the filter expression sent to the vector store. The per-list cap catches one runaway list; the object cap catches many individually legal lists adding up. Twenty lists of 500 values are each within the element cap but total roughly 127 KiB, so the object cap is what rejects them. - -Exceeding either limit returns `400` before the query runs, naming the offending key or the actual byte count. - - - -```text -metadata_filters.customer_id (got 743) must contain at most 500 values - -metadata_filters is too large (130251 bytes when serialized; the maximum is 65536). -Reduce the number or size of filter values. -``` - - - -Needing far more than 500 values in one filter usually means the constraint belongs in the data rather than the query: add a metadata field that groups those values (a segment, tier, or cohort key) and filter on that instead. - - - - -## 5. Add schema fields later - -[`PATCH /databases/{database}/metadata-schema`](/api-reference/v2/endpoint/update-metadata-schema) adds fields to an existing database. It is additive only: fields are added, never deleted, retyped, or reflagged. The response returns `added_fields` directly, without the `success` and `data` envelope, and a field you resend with an identical definition is skipped. +| `metadata` (stored) | 16 KiB | +| `additional_metadata` (stored) | 1 KiB | +| Values per filter list | 500 | +| Whole `metadata_filters` object | 64 KiB | - +- Going over a cap fails the request with `400`. +- If you need more than 500 values, add a grouping field and filter on that instead. Long text belongs in the source body. - -```python Python SDK -client.databases.update_metadata_schema( - "acme_corp", - add_fields=[{"name": "status", "data_type": "VARCHAR", "max_length": 32}], -) -``` -```typescript TypeScript SDK -await client.databases.updateMetadataSchema({ - database: "acme_corp", - addFields: [{ name: "status", dataType: "VARCHAR", maxLength: 32 }], -}); -``` -```bash cURL -curl -X PATCH 'https://api.hydradb.com/databases/acme_corp/metadata-schema' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "add_fields": [ - { "name": "status", "data_type": "VARCHAR", "max_length": 32 } - ] - }' -``` - +## Schema changes - +- Schemas are add-only: you can't delete, retype, or rename a field. +- Fields added later can't be made searchable. +- Filtering on an undeclared key matches nothing, except for keys written by connectors. -Plan the schema before your first ingest: +## Edit in place (`PATCH /context/{id}/metadata`) -- **Searchable fields are declared at creation:** fields added later cannot turn on dense or sparse search; the endpoint rejects `enable_dense_embedding` and `enable_sparse_embedding`. -- **Existing fields are fixed:** renaming a key means re-ingesting the affected sources, or creating a new database with the corrected schema. -- **Undeclared keys match nothing:** a database with a schema rejects undeclared `metadata` keys on ingest and on edit, so no source ever holds them, and a filter on such a key returns nothing. The exceptions are `connector_id` and `provider`, which [connectors](/essentials/v2/connectors#metadata-on-synced-objects) write on every synced source. If you will filter on a field more than once, declare it. +- Send `database_metadata` and/or `additional_metadata`. `collection` is required. +- Sent keys are merged into existing metadata, while `acl` replaces the stored list. Searchable fields sync immediately and can't be set to null. +- To remove a connector source's own ACL and use its connector resource permissions again, send `acl_inherit: true` without `acl`. This can widen access. See [Restore resource permissions](/essentials/v2/connectors#restore-resource-permissions). +- To replace the content as well, re-ingest with `upsert: true`. - +## List (`/context/list`) -## 6. Update metadata without re-ingesting - -Use [`PATCH /context/{id}/metadata`](/api-reference/v2/endpoint/update-source-metadata) when you know the source ID and need to change its metadata in place. The body uses `database_metadata` for the schema-backed layer (the shorter `metadata` spelling from ingest is not accepted here) and `additional_metadata` for the free-form layer. - - - - -```python Python SDK -client.context.update_source_metadata( - "auth-controls-001", - database="acme_corp", - collection="default", - database_metadata={"department": "legal"}, - additional_metadata={"author": "grace"}, -) -``` -```typescript TypeScript SDK -await client.context.updateSourceMetadata({ - id: "auth-controls-001", - database: "acme_corp", - collection: "default", - databaseMetadata: { department: "legal" }, - additionalMetadata: { author: "grace" }, -}); -``` -```bash cURL -curl -X PATCH 'https://api.hydradb.com/context/auth-controls-001/metadata' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "database": "acme_corp", - "collection": "default", - "database_metadata": { "department": "legal" }, - "additional_metadata": { "author": "grace" } - }' -``` - - - - -- **The source must already exist:** this endpoint does not create sources, and `collection` is required. -- **At least one of `database_metadata`, `additional_metadata`, `acl`, or `acl_inherit: true` is required:** `tenant_metadata` is a deprecated alias for `database_metadata`; `document_metadata` is rejected. -- **Metadata merges:** sent keys are inserted or overwritten; omitted keys are preserved. `acl` is the exception: when sent, it replaces the stored list, and an `acl`-only body is a valid edit. To remove a connector source's own ACL, send `acl_inherit: true` without `acl`. This can widen access. See [Restore resource permissions](/essentials/v2/connectors#restore-resource-permissions) for eligibility and validation rules. -- **The edit is visible to filters and listing right away:** if no edited field has an embedding flag, the vector store is untouched and the response reports `vector_sync_required: false`. -- **Searchable fields sync synchronously:** if an edited field has `enable_dense_embedding` or `enable_sparse_embedding`, HydraDB refreshes that field's search lane and reports `vector_sync_required` and `vector_synced` in the response (the `milvus_sync_required` and `milvus_synced` aliases are still emitted, deprecated). Such a field rejects `null`, because it would leave stale metadata vectors behind. - -To replace a source's content as well as its metadata, re-ingest it with `upsert: true` and the same source `id`. Upsert replaces the source payload and the metadata supplied by ingestion. - - - -## 7. List sources with metadata filters - -Use [`POST /context/list`](/api-reference/v2/endpoint/list-context) to browse or page sources rather than run semantic retrieval. Its `filters` object takes `metadata`, `additional_metadata`, and `source_fields`, each as bare key-value pairs. `source_fields` filters on the source's own fields: `title`, `type`, `description`, `url`, `timestamp`, and for app sources `app_provider`, `app_kind`, `app_external_id`, and `app_parent_id`. Pair `app_external_id` or `app_parent_id` with `app_provider`, because a Jira issue key and a Linear ID can collide. - - - - -```python Python SDK -from hydra_db import ListContentFilter - -result = client.context.list( - database="acme_corp", - collection="default", - type="knowledge", - filters=ListContentFilter( - metadata={"department": "legal"}, - additional_metadata={"author": "alice"}, - source_fields={"app_provider": "slack"}, - ), -) -``` -```typescript TypeScript SDK -const result = await client.context.list({ - database: "acme_corp", - collection: "default", - type: "knowledge", - filters: { - metadata: { department: "legal" }, - additionalMetadata: { author: "alice" }, - sourceFields: { appProvider: "slack" }, - }, -}); -``` -```bash cURL -curl -X POST 'https://api.hydradb.com/context/list' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "database": "acme_corp", - "collection": "default", - "type": "knowledge", - "filters": { - "metadata": { "department": "legal" }, - "additional_metadata": { "author": "alice" }, - "source_fields": { "app_provider": "slack" } - } - }' -``` - - - - -`/context/list` also accepts the deprecated aliases `tenant_metadata` for `metadata` and `document_metadata` for `additional_metadata`; the current name wins on conflicts. It takes the same `acl` field as `/query` to list as one user. See [Query](/essentials/v2/query#6-query-on-behalf-of-a-user). - - - - -## Schema field reference - -Each entry in `database_metadata_schema` on [Create Database](/api-reference/v2/endpoint/create-database), and in `add_fields` on [Update Metadata Schema](/api-reference/v2/endpoint/update-metadata-schema), takes these options: - -| Field | Type / values | Purpose | -| --- | --- | --- | -| `name` | string | Metadata key. Must start with a letter, contain only letters, numbers, and underscores, and not use a reserved system name such as `source_id`, `chunk_id`, or `metadata`. | -| `data_type` | `VARCHAR`, `BOOL`, `INT8`, `INT16`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `JSON`, or the friendly aliases `string`, `boolean`, `integer`, `float`, `object` | Defaults to `VARCHAR`. `ARRAY` is not supported and is rejected with `400`; for multi-value fields see [Store several values in one field](#store-several-values-in-one-field). | -| `max_length` | integer | Maximum length for a `VARCHAR` value. Default `1024`, maximum `65535`. This sizes one declared field; it is not the limit on how much metadata you can send per request, which is in [Size limits](#4-size-limits). | -| `enable_dense_embedding` | boolean | Adds semantic search over a `VARCHAR` field. | -| `enable_sparse_embedding` | boolean | Adds keyword (BM25) search over a `VARCHAR` field. | - -Limits: - -- Up to 32 custom metadata fields per database. -- Up to 6 embedding-enabled fields per database: `enable_dense_embedding` and `enable_sparse_embedding` each count as one, so a field with both set counts as two. Exceeding the limit fails database creation with `400` before anything is provisioned. -- Field names are unique case-insensitively. -- Embedding flags are only valid on `VARCHAR` fields. -- Values must match the declared type when the database has a schema. -- Unknown `metadata` keys are rejected on ingest and edit when the database has a non-empty schema. - -## Common mistakes - -| Symptom | Cause | Fix | -| --- | --- | --- | -| A filter on a top-level key returns nothing | The key is not declared in the schema, so no source holds it | [Add the field](#5-add-schema-fields-later) and set a value on your sources, or keep it in `additional_metadata` and nest the filter there. | -| A filter on an `additional_metadata` key returns nothing | The key was sent top-level, so it was matched against `metadata`, or it was sent with an operator object | Nest it with a bare value: `metadata_filters: { additional_metadata: { author: "alice" } }`. See [Filter operators](#3-filter-operators). | -| A query returns nothing after you add filters | The combined constraints exclude everything; keys are ANDed | Start with the minimum hard constraints, add filters one at a time, and re-check counts. | -| A range or fuzzy filter does not work | Only `equals`, `contains`, and `contains_any` are supported | Move the constraint into the `query` text, or post-process in your application. | -| An `additional_metadata` filter is slow | It could not be resolved up front, so it is checked [after retrieval](#2-the-two-layers) | Move the hot field into `metadata` and declare it in the schema. | -| A schema change does not take effect, or you need a searchable field after creation | The schema is [additive only](#5-add-schema-fields-later), and added fields cannot take embedding flags | Create a new database with the corrected schema and re-ingest. There is no in-place migration for existing fields. | -| A metadata edit returns `400` | Unknown key, wrong type, oversized payload, too-deep nesting, reserved key, missing `collection`, `null` on a searchable field, `acl` combined with `acl_inherit: true`, or inheritance without connector resource attribution | Check the schema, the [size limits](#4-size-limits), and the [edit rules](#6-update-metadata-without-re-ingesting); send a valid metadata edit or one ACL action. For a searchable field, set a non-null value or re-ingest. | +Browse sources without ranking, filtering by `metadata`, `additional_metadata`, or source fields. -## Related +## Best practice -- [Context](/essentials/v2/context): what attaches to knowledge sources -- [Databases and Collections](/essentials/v2/databases-and-collections): scoping with collections, which filters do not replace -- [Query](/essentials/v2/query): how `metadata_filters` interacts with ranking -- [Create Database (API Reference)](/api-reference/v2/endpoint/create-database): full `database_metadata_schema` reference -- [Query (API Reference)](/api-reference/v2/endpoint/query): full `metadata_filters` reference -- [List Context (API Reference)](/api-reference/v2/endpoint/list-context): source browsing filters -- [Update Source Metadata (API Reference)](/api-reference/v2/endpoint/update-source-metadata): point metadata edits -- [Update Metadata Schema (API Reference)](/api-reference/v2/endpoint/update-metadata-schema): additive database schema changes +- Declare `status` and `language` from the start. +- Use filters to isolate data within a collection, and separate collections only when data must never be searched together. +- Add filters one at a time and check counts as you go. diff --git a/essentials/v2/query-2.mdx b/essentials/v2/query-2.mdx new file mode 100644 index 00000000..3d356b88 --- /dev/null +++ b/essentials/v2/query-2.mdx @@ -0,0 +1,348 @@ +--- +title: "Query (copy)" +description: "Agents query differently. They ask harder, longer, and multi part questions. " +--- + +Imagine your AI at the center of a web of information and it can keep crawling the web gathers all relevant information. + +This is where the real magic happens. Agents perform better searches with graphs i.e. you notice agents asking less up front, while consistently delivering accurate work that is verifiable with citations across sources. + +## Running a query + +The following sample request searches the `acme_corp` database. + + + Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript example. + + + + ```python Python SDK + result = client.query( + database="acme_corp", + collection="company_docs", + query="How do I rotate API keys?", + type="all", + mode="thinking", + max_results=10, + ) + + for chunk in result.data.chunks: + print(chunk.source_title, chunk.chunk_content) + ``` + + ```typescript TypeScript SDK + const result = await client.query({ + database: "acme_corp", + collection: "company_docs", + query: "How do I rotate API keys?", + type: "knowledge", + maxResults: 5, + }); + + if (!result.data || typeof result.data === "string") throw new Error("Expected structured query results"); + for (const chunk of result.data.chunks ?? []) { + console.log(chunk.sourceTitle, chunk.chunkContent); + } + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/query' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collection": "company_docs", + "query": "How do I rotate API keys?", + "type": "knowledge", + "max_results": 5 + }' + ``` + + + + The response is wrapped in the standard envelope, so read the result from `data`. Trimmed to the fields you use most, it looks like this: + + ```json + { + "success": true, + "data": { + "chunks": [ + { + "chunk_uuid": "runbook_keys_chunk_2", + "id": "runbook_keys", + "chunk_content": "Rotate API keys from Settings, then Security. The old key stays valid for 24 hours.", + "source_title": "API key runbook", + "relevancy_score": 0.91, + "metadata": { "document_type": "runbook" } + } + ], + "graph_context": { + "query_paths": [], + "chunk_relations": [], + "chunk_id_to_group_ids": {} + }, + "additional_context": {} + }, + "error": null, + "meta": { + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "latency_ms": 412.0 + } + } + ``` + + The full response schema is on the [Query API reference](/api-reference/v2/endpoint/query). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OverviewDescription
`query`Incoming agent query.
`query_by``"hybrid"` (the default) matches by meaning and by keyword together, and `"text"` matches keywords only
`mode`Decide how much compute the query requires. `"thinking"` mode takes more time and scans more nodes. `"fast"` mode uses less compute but returns results extremely fast.
`max_results`How many chunks to return. Default `10`, maximum `250`.
`type`By default everything is searched, unless you specify.

`"knowledge"` for just documents; `"memory"` for just preferences; `"trace"` for agent traces
+ +### What comes back + +- `data.llm_prompt`**:** the query and the entire response to the query in one markdown file, complete with citations, that your agents can easily read. +- `data.chunks`**:** the matching chunks from the graph, ranked by relevance, each with its source `id`, `chunk_content`, `source_title`, `relevancy_score`, and `metadata`. +- **`data.graph_context`** and `data.additional_context`**:** relationships and linkages, covered in [section 5](#5-add-relationships). + +## 3. Tune the ranking + +When the defaults are not right, start here: + +- **`mode`:** `"fast"` is one retrieval pass, for chat and autocomplete. `"thinking"` expands the query, reranks, and pulls in [forceful relations](#5-add-relationships), for answers where quality matters more than latency. `"auto"`, the default, scores each query and routes it to one of the two, choosing thinking when unsure; the response does not say which it chose. Applies to `query_by: "hybrid"` only. +- **`alpha`:** the balance between meaning (`1.0`) and keywords (`0.0`) in a hybrid query. Default `0.8`, which `"auto"` also resolves to. Lower it toward `0.3` to `0.5` for error codes, SKUs, and product names; raise it toward `0.9` for conceptual questions. +- **`recency_bias`:** how much newer context is favored, from `0.0` to `1.0`. Default `0.4`, a mild tilt that only reorders close results. Send `0` for policies and other context that rarely changes, and `0.6` to `0.8` for changelogs and status updates. +- **`max_results`:** drop to `5` for tight context windows; raise to `20` when you rerank downstream. +- **`additional_context`:** a short factual hint, such as `"user is on the billing page"`, that sharpens retrieval. It is not a filter. + +In production: + +- **Timeouts:** 3 to 5 s for thinking, 500 ms or less for fast. Budget `"auto"` like thinking. +- **Literal token plus intent:** run `query_by: "hybrid"` and `query_by: "text"` in parallel, dedupe by `chunk_uuid`, and keep the text hits. +- **Recall, then rerank:** ask for `max_results: 20` and apply your own rules before picking the final set. +- **Caching:** key on the database, the collections, the caller's `acl`, and every query parameter, and expire entries when context or permissions change. + +## 4. Choose what to search + +To search beyond one collection: + +- **Several collections:** send `collections` instead, as a list, or as an object of weights to rank one collection over another. Up to 100; every listed collection must exist, or the call returns `400`. `max_results` caps the merged list. +- **Knowledge and memories together:** `type: "all"` reads both from the same collections and ranks them together. When shared documents and memories live in different collections, list both. +- **A slice you already know:** `metadata_filters` narrows results before ranking, such as only runbooks or only one team's documents. [Metadata](/essentials/v2/metadata) covers the operators. + + + + + ```python Python SDK + result = client.query( + database="acme_corp", + collections=["company_docs", "user_john_123"], + query="How do I reset my password?", + type="all", + mode="thinking", + max_results=8, + ) + ``` + + ```typescript TypeScript SDK + const result = await client.query({ + database: "acme_corp", + collections: ["company_docs", "user_john_123"], + query: "How do I reset my password?", + type: "all", + mode: "thinking", + maxResults: 8, + }); + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/query' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collections": ["company_docs", "user_john_123"], + "query": "How do I reset my password?", + "type": "all", + "mode": "thinking", + "max_results": 8 + }' + ``` + + + + Knowledge and memories come back together in `data.chunks`, ranked as one list. To let the user's memories outrank the shared documents, send weights instead of a list: + + ```json + { + "collections": { + "user_john_123": 2, + "company_docs": 1 + } + } + ``` + + +## 5. Add relationships + +Three fields bring in context beyond the chunks that matched. All three are on by default. + +- **`graph_context`:** the relationships HydraDB extracted from your context, such as "Payments team owns billing service", in `data.graph_context`. `false` drops it, but only in fast mode; thinking always includes it. The [Query API reference](/api-reference/v2/endpoint/query) describes its fields. +- **`query_forceful_relations`:** forceful relations (links you declare between sources at ingest with `relations.ids`), such as a contract and its addendum, returned in `data.additional_context`. Thinking mode only; fast mode skips it without an error. [Context](/essentials/v2/context#6-link-sources-that-belong-together) shows how to declare the links. +- **`query_apps`:** for [app sources](/essentials/v2/context#send-app-sources), an extra lane that rebuilds Slack threads, follows ticket and parent links, and matches exact ids and people. It still searches everything else, and has no effect on memories. + +## 6. Query on behalf of a user + +Which identity a query runs as depends on where the content came from: + +- **Directly ingested knowledge, and connectors without ACL enforcement:** send the caller's email in `acl`, such as `"acl": ["grace@acme.com"]`, to filter results to documents that person may retrieve, plus public and unrestricted ones. Without `acl`, this content is not filtered by caller identity. +- **Connectors with `enforce_acl` enabled:** HydraDB uses the authenticated caller and ignores a request `acl` for that connector's content. API keys use the key creator's email; MCP OAuth and dashboard requests use the signed-in user. If you send `acl` anyway, a successful response includes one `meta.warnings` entry with code `acl_ignored_by_connector_enforcement`. + +An `acl` entry on a source or a query is a **principal**: + +| Principal | Meaning | +| --- | --- | +| `grace@acme.com` | One person, by email. | +| `domain:acme.com` | Everyone whose email is under that domain. A query as `grace@acme.com` matches it automatically. | +| `group::` | A group in the source app, such as `group:slack:C0123`. Group membership is never derived from an email; send it on the query. | +| `__public__` | Every identified caller. | + +A source with no `acl` is unrestricted. On a query, omitting `acl`, sending `[]`, or sending `["*"]` all mean no caller filtering. See [ACL on synced content](/essentials/v2/connectors#enforce-acl) for connectors. + +## 7. Use the results + +HydraDB returns context, not answers: your application passes the result to a model. `build_string(result)` in Python and `buildString(result)` in TypeScript return `data.llm_prompt`, which numbers the ranked results `[1]`, `[2]`, and so on, so ask the model to cite by those numbers. Tell the model to answer only from the context, and keep the chunks in the order returned. To format the prompt yourself, read `data.chunks`; set `response_format` to `"structured"` to leave `llm_prompt` out, or to `"markdown"` to get only the prompt text as `data`. + + + +```python Python SDK +import os +from hydra_db import HydraDB +from hydra_db.helpers import build_string +from openai import OpenAI + +hydra = HydraDB(token=os.environ["HYDRADB_API_KEY"]) +openai_client = OpenAI(api_key=os.environ["OPENAI_API_KEY"]) + +question = "How does authentication work?" + +result = hydra.query( + database="your-database", + collection="your-collection", + query=question, + type="knowledge", + query_by="hybrid", + mode="fast", + graph_context=True, +) + +context = build_string(result) + +completion = openai_client.chat.completions.create( + model="gpt-4o", + messages=[ + { + "role": "system", + "content": "You are a helpful assistant. Answer the user's question using only the context provided. If the answer is not in the context, say you don't know.", + }, + { + "role": "user", + "content": f"Context:\n{context}\n\nQuestion: {question}", + }, + ], +) + +print(completion.choices[0].message.content) +``` + +```typescript TypeScript SDK +import { HydraDBClient } from "@hydradb/sdk"; +import { buildString } from "@hydradb/sdk/helpers"; +import OpenAI from "openai"; + +const hydra = new HydraDBClient({ token: process.env.HYDRADB_API_KEY }); +const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY }); + +const question = "How does authentication work?"; + +const result = await hydra.query({ + database: "your-database", + collection: "your-collection", + query: question, + type: "knowledge", + queryBy: "hybrid", + mode: "fast", + graphContext: true, +}); + +const context = buildString(result); + +const completion = await openai.chat.completions.create({ + model: "gpt-4o", + messages: [ + { + role: "system", + content: "You are a helpful assistant. Answer the user's question using only the context provided. If the answer is not in the context, say you don't know.", + }, + { + role: "user", + content: `Context:\n${context}\n\nQuestion: ${question}`, + }, + ], +}); + +console.log(completion.choices[0].message.content); +``` + + + +--- + +# Advanced query patterns (mostly for agents) + +## Common mistakes + +| Symptom | Cause | Fix | +| --- | --- | --- | +| Empty `query_paths` or `chunk_relations` | `graph_context` set to `false`, or no relationships exist for the result set | Leave `graph_context` on (the default). Empty arrays are normal when there is nothing to return. | +| Recent uploads do not appear in results | Indexing not finished | Poll [`GET /context/status`](/api-reference/v2/endpoint/source-status) with the source ids. Chunks are invisible until indexing reaches at least `graph_creation`. | +| `metadata_filters` does not narrow results | Filter key is in the wrong namespace, the value does not match exactly, or the top-level field was not declared in the metadata schema | Top-level keys match `metadata`; free-form per-source fields must be nested under `additional_metadata`. Declare hot filter keys in `database_metadata_schema` before production ingest. | +| Memories missing from a `type: "knowledge"` query | Wrong store selected | Use `type: "memory"` or `type: "all"`. | +| Knowledge missing from a `type: "all"` query | The documents live in a different collection from the one you sent | List both collections in `collections`. | +| Recency does not seem to matter | `recency_bias` was sent as `0`, or the default `0.4` tilt is too mild | Raise it toward `1.0`. | +| `operator: "phrase"` returns `400` | `query_by` not set to `"text"` | `"and"` and `"phrase"` only apply to BM25 text queries: switch `query_by` to `"text"`. | +| `query_explicit_relations` ignored | Request runs in `mode: "fast"` (or `auto` routed to fast) | Forceful relations are fetched only in thinking mode. Set `mode: "thinking"`. | +| `graph_context: false` ignored | Request runs in thinking mode (`mode: "thinking"`, or `auto` routed to thinking) | Thinking always includes the graph slice; `false` takes effect only in fast mode. Set `mode: "fast"` to drop it. | +| Expected a deterministic `fast` or `thinking` pipeline, got auto-routed instead | `mode` was omitted | Omitting `mode` means `"auto"`. Set `mode` explicitly to `"fast"` or `"thinking"`. | diff --git a/essentials/v2/query.mdx b/essentials/v2/query.mdx index 6f0f7444..3cc06cce 100644 --- a/essentials/v2/query.mdx +++ b/essentials/v2/query.mdx @@ -1,238 +1,288 @@ --- title: "Query" -description: "Search knowledge, memories, or both, tune what comes back, and pass the result to a model." +description: "Agents query differently. They ask harder, longer, and multi part questions. " --- -[`POST /query`](/api-reference/v2/endpoint/query) searches your [context](/essentials/v2/context): knowledge, memories, or both. It returns ranked passages, called **chunks**, with their source details and the context graph around them. Your application puts them in the model's prompt; the model writes the answer. +Imagine your AI at the center of a web of information and it can keep crawling that web to gather all relevant information. -The defaults work without tuning. +This is where the real magic happens. Agents perform better searches with graphs i.e. you notice agents asking less up front, while consistently delivering accurate work that is verifiable with citations across sources. -## 1. Run a query +## Running a query -This request searches the `acme_corp` database for knowledge about rotating API keys. Every query starts from this request; later sections add fields. The body is JSON; ingestion is multipart. +The following sample request searches the `acme_corp` database. + Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript example. + + + + ```python Python SDK + result = client.query( + database="acme_corp", + collection="company_docs", + query="How do I rotate API keys?", + mode="thinking", + max_results=10, + ) + + for chunk in result.data.chunks: + print(chunk.source_title, chunk.chunk_content) + ``` + + ```typescript TypeScript SDK + const result = await client.query({ + database: "acme_corp", + collection: "company_docs", + query: "How do I rotate API keys?", + maxResults: 5, + }); + + if (!result.data || typeof result.data === "string") throw new Error("Expected structured query results"); + for (const chunk of result.data.chunks ?? []) { + console.log(chunk.sourceTitle, chunk.chunkContent); + } + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/query' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collection": "company_docs", + "query": "How do I rotate API keys?", + "max_results": 5 + }' + ``` + + + + The response is wrapped in the standard envelope, so read the result from `data`. Trimmed to the fields you use most, it looks like this: + + ```json + { + "success": true, + "data": { + "chunks": [ + { + "chunk_uuid": "runbook_keys_chunk_2", + "id": "runbook_keys", + "chunk_content": "Rotate API keys from Settings, then Security. The old key stays valid for 24 hours.", + "source_title": "API key runbook", + "relevancy_score": 0.91, + "metadata": { "document_type": "runbook" } + } + ], + "graph_context": { + "query_paths": [], + "chunk_relations": [], + "chunk_id_to_group_ids": {} + }, + "additional_graph_context": {} + }, + "error": null, + "meta": { + "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", + "latency_ms": 412.0 + } + } + ``` -Set up your [SDK client](/api-reference/v2/sdks#client-setup) before running the Python or TypeScript example. + The full response schema is on the [Query API reference](/api-reference/v2/endpoint/query). + - -```python Python SDK -result = client.query( - database="acme_corp", - collection="company_docs", - query="How do I rotate API keys?", - type="knowledge", - max_results=5, -) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OverviewDescription
`query`Incoming agent query.
`query_by``"hybrid"` (the default) matches by meaning and by keyword together. `"text"` matches keywords only. These are the two supported values.
`mode``"auto"` (the default) chooses between `"thinking"` and `"fast"` per query. `"thinking"` takes more time and scans more nodes; `"fast"` uses less compute.
`max_results`How many chunks to return. Default `10`, maximum `250`.
`type`Defaults to `"all"`, searching knowledge and memories together. Set `"knowledge"` for documents or `"memory"` for saved preferences.
-for chunk in result.data.chunks: - print(chunk.source_title, chunk.chunk_content) -``` -```typescript TypeScript SDK -const result = await client.query({ - database: "acme_corp", - collection: "company_docs", - query: "How do I rotate API keys?", - type: "knowledge", - maxResults: 5, -}); +### What comes back + +- `data.llm_prompt`**:** the query and the entire response to the query in one markdown file, complete with citations, that your agents can easily read. +- `data.chunks`**:** the matching chunks from the graph, ranked by relevance, each with its source `id`, `chunk_content`, `source_title`, `relevancy_score`, and `metadata`. +- **`data.graph_context`** and **`data.additional_graph_context`:** extracted relationships and deterministically linked sources, covered in [section 5](#5-understanding-relationships-in-your-context). +- `data.tabular_data`**:** `null` for a document question. Present in thinking mode when the collection holds spreadsheets and the question is about them: a computed answer (`status: "ok"`) with `columns`, `records`, `sources` and `citations`, or a decline (`status: "not_applicable"`) when the question is not about the tables. See [Ask questions over spreadsheets](#ask-questions-over-spreadsheets). + +### Ask questions over spreadsheets + +When a collection holds CSV, TSV or Excel files (see [Spreadsheets become queryable tables](/essentials/v2/context#spreadsheets-become-queryable-tables)), a question in `"mode": "thinking"` that needs filtering, grouping or arithmetic over the rows is answered by SQL that HydraDB writes and runs over the complete table. Ask in plain language: "total revenue per region, highest first", "how many units of Gizmo were sold in Mumbai and Pune", "which regions beat their target". Set `include_table_sql: true` to get the statement back. -if (!result.data || typeof result.data === "string") throw new Error("Expected structured query results"); -for (const chunk of result.data.chunks ?? []) { - console.log(chunk.sourceTitle, chunk.chunkContent); -} -``` ```bash cURL curl -X POST 'https://api.hydradb.com/query' \ -H "Authorization: Bearer $HYDRADB_API_KEY" \ -H "API-Version: 2" \ -H "Content-Type: application/json" \ -d '{ - "database": "acme_corp", - "collection": "company_docs", - "query": "How do I rotate API keys?", - "type": "knowledge", - "max_results": 5 + "database": "your-database", + "collection": "sales", + "query": "What is the total revenue per region, highest first?", + "mode": "thinking", + "include_table_sql": true, + "response_format": "structured" }' ``` -
-The response is wrapped in the standard envelope, so read the result from `data`. Trimmed to the fields you use most, it looks like this: +What comes back in `data.tabular_data`: ```json { - "success": true, - "data": { - "chunks": [ - { - "chunk_uuid": "runbook_keys_chunk_2", - "id": "runbook_keys", - "chunk_content": "Rotate API keys from Settings, then Security. The old key stays valid for 24 hours.", - "source_title": "API key runbook", - "relevancy_score": 0.91, - "metadata": { "document_type": "runbook" } - } - ], - "graph_context": { - "query_paths": [], - "chunk_relations": [], - "chunk_id_to_group_ids": {} - }, - "additional_context": {} - }, - "error": null, - "meta": { - "request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d", - "latency_ms": 412.0 + "status": "ok", + "answer_type": "computed", + "sql": "SELECT \"region\", SUM(\"revenue\") AS \"total_revenue\" FROM \"table_1fda2c6d06a92aa70abaf1df\" GROUP BY \"region\" ORDER BY \"total_revenue\" DESC", + "columns": [ + { "name": "region", "type": "VARCHAR", "kind": "string" }, + { "name": "total_revenue", "type": "HUGEINT", "kind": "integer" } + ], + "records": [ + { "region": "East", "total_revenue": 97500 }, + { "region": "West", "total_revenue": 85860 }, + { "region": "North", "total_revenue": 56470 }, + { "region": "South", "total_revenue": 37815 } + ], + "truncated": false, + "sources": [ + { "id": "sales_2026", "title": "sales_2026.csv", "collection": "sales", "version": "9181604be39c" } + ], + "citations": { + "rows": [{ "chunk_id": "sales_2026_chunk_0001", "collection": "sales", "source_id": "sales_2026" }], + "constants": [] } } ``` -The full response schema is on the [Query API reference](/api-reference/v2/endpoint/query). - - - -### What each property means +- **`status`:** `"ok"` is an answer. `"not_applicable"` with `reason` (`not_tabular`: the question is not about the tables; `needs_context`: it needs a value or definition the context does not state; `listing_pending`: tables are still being catalogued, ask again; `scope_too_large`: the request covers more sources than one table query reads, name source IDs or fewer collections) means no SQL ran and the text chunks stand on their own. `"error"` carries a `code` and `message`; the rest of the response is unaffected. +- **`answer_type`:** `"exact"` when every record is a stored row of a table (the rows are named in `citations.rows`); `"computed"` when the records are aggregated or derived. +- **`records`** are the result rows keyed by column name, up to 100 per answer (`truncated` says whether more existed). Values follow each column's `kind`: integers and doubles are JSON numbers, booleans are booleans, decimals are strings (to keep precision), dates and timestamps are strings, a SQL NULL is `null`. `columns` lists each column's name, SQL `type` and `kind`. +- **`sources`** lists every table the SQL read, as you know it: the document `id` and `title`, its `collection`, the `sheet` for a workbook, and the `version` it was ingested as. A re-upload gets a new version. +- **`citations`** is what to cite. `rows` are the stored rows behind the answer, each as `{chunk_id, collection, source_id, row}`: for an `exact` answer one per record, with its one-based stored `row` and the chunk in `data.chunks` that holds it when one does; for a `computed` answer one per chunk that holds rows the SQL read. `constants` are literals the SQL took from the question or from a chunk, such as a target or a threshold stated in a document, each with the chunk it came from. +- The text chunks in `data.chunks` are returned as usual, so the answer and its evidence travel together; in this response, `data.chunks` carries the chunk `sales_2026_chunk_0001` that the citation names. `llm_prompt` and the Markdown rendering include the table under a "Table query" heading. -| Property | What it is | -|---|---| -| `database` | The [database](/api-reference/v2/endpoint/create-database) to search. Required on every call. A query never reads another database. | -| `collection` | The collection to search, the same one you ingested into. Leave it out to search the database's default collection. [Section 4](#4-choose-what-to-search) covers searching several at once. | -| `query` | The question or search terms, in natural language. Cannot be empty. | -| `type` | What to search: `"knowledge"` (the default) for documents and app sources, `"memory"` for saved preferences and conversations, or `"all"` for both. | -| `max_results` | How many chunks to return. Default `10`, maximum `250`. | - -### What comes back - -- **`data.llm_prompt`:** the question, the matching chunks, and citation instructions as one Markdown string, ready for a model. -- **`data.chunks`:** the matching chunks, ranked by relevance, each with its source `id`, `chunk_content`, `source_title`, `relevancy_score`, and `metadata`. Keep the order. -- **`data.graph_context`** and **`data.additional_context`:** relationships and linked chunks, covered in [section 5](#5-add-relationships). - -[Section 7](#7-use-the-results) shows how to pass the result to a model. New context is searchable within seconds of its [indexing status](/api-reference/v2/endpoint/source-status) reaching `graph_creation`; wait for `completed` when you query straight after ingesting. - -## 2. Pick a recipe - -Start from the row that matches your goal. Leave everything else at its default. - -| I want to | `type` | `query_by` | `mode` | Notes | -| --- | --- | --- | --- | --- | -| Answer questions from documents | `"knowledge"` | `"hybrid"` | `"thinking"` | Keep `graph_context` on (the default) to include relationships between the people, topics, or services the documents mention | -| Match an exact keyword or phrase | `"knowledge"` | `"text"` | Not used | Set `operator` to `"and"` or `"phrase"` to control how the keywords must match. | -| Personalize a response | `"memory"` | `"hybrid"` | `"thinking"` | Search the collection the memories were saved in | -| Personalize and ground in documents | `"all"` | `"hybrid"` | `"thinking"` | One call reads both stores from the same scope. If the documents live in another collection, list both in `collections` | -| Search app sources from Slack, Jira, Gmail, and other apps | `"knowledge"` | `"hybrid"` | `"thinking"` | Leave `query_apps` on (the default) so threads, replies, and linked records expand along with the matching source | -| Serve mixed traffic with one setting | `"knowledge"` | `"hybrid"` | `"auto"` | HydraDB scores each query and routes it to `"fast"` or `"thinking"`. This is also what you get when `mode` is omitted | - -`query_by` picks how the text is matched: `"hybrid"` (the default) matches by meaning and by keyword together, and `"text"` matches keywords only. `mode` picks how much work the query does. [Section 3](#3-tune-the-ranking) explains `mode`. +Table answers run in thinking mode only; `"fast"` returns the ranked chunks without `tabular_data`. Questions that are better answered from text keep working as before: the table path engages only when the question calls for it. ## 3. Tune the ranking -When the defaults are not right, start here: - -- **`mode`:** `"fast"` is one retrieval pass, for chat and autocomplete. `"thinking"` expands the query, reranks, and pulls in [forceful relations](#5-add-relationships), for answers where quality matters more than latency. `"auto"`, the default, scores each query and routes it to one of the two, choosing thinking when unsure; the response does not say which it chose. Applies to `query_by: "hybrid"` only. -- **`alpha`:** the balance between meaning (`1.0`) and keywords (`0.0`) in a hybrid query. Default `0.8`, which `"auto"` also resolves to. Lower it toward `0.3` to `0.5` for error codes, SKUs, and product names; raise it toward `0.9` for conceptual questions. -- **`recency_bias`:** how much newer context is favored, from `0.0` to `1.0`. Default `0.4`, a mild tilt that only reorders close results. Send `0` for policies and other context that rarely changes, and `0.6` to `0.8` for changelogs and status updates. +- `alpha`**:** the balance between semantic/meaning (`1.0`) and keywords (`0.0`) in a hybrid query. Default `0.8`; `"auto"` also resolves to `0.8`. +- **`recency_bias`:** how much newer context is favored, from `0.0` to `1.0`. Default `0.6` - **`max_results`:** drop to `5` for tight context windows; raise to `20` when you rerank downstream. -- **`additional_context`:** a short factual hint, such as `"user is on the billing page"`, that sharpens retrieval. It is not a filter. - -In production: - -- **Timeouts:** 3 to 5 s for thinking, 500 ms or less for fast. Budget `"auto"` like thinking. -- **Literal token plus intent:** run `query_by: "hybrid"` and `query_by: "text"` in parallel, dedupe by `chunk_uuid`, and keep the text hits. -- **Recall, then rerank:** ask for `max_results: 20` and apply your own rules before picking the final set. -- **Caching:** key on the database, the collections, the caller's `acl`, and every query parameter, and expire entries when context or permissions change. +- **`additional_graph_context`:** a request-time string hint, such as `"user is on the billing page"`, that sharpens retrieval. It is not a filter. This is separate from the response map `data.additional_graph_context` containing linked sources. ## 4. Choose what to search -To search beyond one collection: - -- **Several collections:** send `collections` instead, as a list, or as an object of weights to rank one collection over another. Up to 100; every listed collection must exist, or the call returns `400`. `max_results` caps the merged list. -- **Knowledge and memories together:** `type: "all"` reads both from the same collections and ranks them together. When shared documents and memories live in different collections, list both. -- **A slice you already know:** `metadata_filters` narrows results before ranking, such as only runbooks or only one team's documents. [Metadata](/essentials/v2/metadata) covers the operators. - - - - -```python Python SDK -result = client.query( - database="acme_corp", - collections=["company_docs", "user_john_123"], - query="How do I reset my password?", - type="all", - mode="thinking", - max_results=8, -) -``` -```typescript TypeScript SDK -const result = await client.query({ - database: "acme_corp", - collections: ["company_docs", "user_john_123"], - query: "How do I reset my password?", - type: "all", - mode: "thinking", - maxResults: 8, -}); -``` -```bash cURL -curl -X POST 'https://api.hydradb.com/query' \ - -H "Authorization: Bearer $HYDRADB_API_KEY" \ - -H "API-Version: 2" \ - -H "Content-Type: application/json" \ - -d '{ - "database": "acme_corp", - "collections": ["company_docs", "user_john_123"], - "query": "How do I reset my password?", - "type": "all", - "mode": "thinking", - "max_results": 8 - }' -``` - - -Knowledge and memories come back together in `data.chunks`, ranked as one list. To let the user's memories outrank the shared documents, send weights instead of a list: - -```json -{ - "collections": { - "user_john_123": 2, - "company_docs": 1 +- **Several collections:** send `collections` instead, as a list, or as an object of weights to rank one collection over another. You can search up to 100 collections in one call. +- **Metadata filtering:** `metadata_filters` narrows results before ranking, such as only specific emails or only one team's documents. [Metadata](/essentials/v2/metadata) covers all operators. + + + + + ```python Python SDK + result = client.query( + database="acme_corp", + collections=["company_docs", "user_john_123"], + query="How do I reset my password?", + type="all", + mode="thinking", + max_results=8, + ) + ``` + + ```typescript TypeScript SDK + const result = await client.query({ + database: "acme_corp", + collections: ["company_docs", "user_john_123"], + query: "How do I reset my password?", + type: "all", + mode: "thinking", + maxResults: 8, + }); + ``` + + ```bash cURL + curl -X POST 'https://api.hydradb.com/query' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d '{ + "database": "acme_corp", + "collections": ["company_docs", "user_john_123"], + "query": "How do I reset my password?", + "type": "all", + "mode": "thinking", + "max_results": 8 + }' + ``` + + + + Knowledge and memories come back together in `data.chunks`, ranked as one list. To let the user's memories outrank the shared documents, send weights instead of a list: + + ```json + { + "collections": { + "user_john_123": 2, + "company_docs": 1 + } } -} -``` - + ``` -## 5. Add relationships +## 5. Understanding relationships in your context -Three fields bring in context beyond the chunks that matched. All three are on by default. +- `graph_context`**:** the relationships HydraDB extracted from your context during ingestion, such as "Payments team owns billing service", in `data.graph_context`. +- **`query_explicit_relations`:** defaults to `true`. Links you declared deterministically during ingestion are returned in `data.additional_graph_context` in thinking mode only. Send `false` to skip linked sources. The legacy response alias `data.additional_context` contains the same map. +- **`query_apps`:** for content synced by [connectors](/essentials/v2/connectors), an extra lane that rebuilds Slack threads, follows ticket and parent links, and matches exact ids and people. It still searches everything else, and has no effect on memories. -- **`graph_context`:** the relationships HydraDB extracted from your context, such as "Payments team owns billing service", in `data.graph_context`. `false` drops it, but only in fast mode; thinking always includes it. The [Query API reference](/api-reference/v2/endpoint/query) describes its fields. -- **`query_forceful_relations`:** forceful relations (links you declare between sources at ingest with `relations.ids`), such as a contract and its addendum, returned in `data.additional_context`. Thinking mode only; fast mode skips it without an error. [Context](/essentials/v2/context#6-link-sources-that-belong-together) shows how to declare the links. -- **`query_apps`:** for [app sources](/essentials/v2/context#send-app-sources), an extra lane that rebuilds Slack threads, follows ticket and parent links, and matches exact ids and people. It still searches everything else, and has no effect on memories. -## 6. Query on behalf of a user +## 6. As an admin you can query the app on behalf of a user -Which identity a query runs as depends on where the content came from: - -- **Directly ingested knowledge, and connectors without ACL enforcement:** send the caller's email in `acl`, such as `"acl": ["grace@acme.com"]`, to filter results to documents that person may retrieve, plus public and unrestricted ones. Without `acl`, this content is not filtered by caller identity. -- **Connectors with `enforce_acl` enabled:** HydraDB uses the authenticated caller and ignores a request `acl` for that connector's content. API keys use the key creator's email; MCP OAuth and dashboard requests use the signed-in user. If you send `acl` anyway, a successful response includes one `meta.warnings` entry with code `acl_ignored_by_connector_enforcement`. +- **From ingested context, and connectors without ACL enforcement:** send the caller's email in `acl`, such as `"acl": ["grace@acme.com"]`, to filter results to documents that person may have retrieved themselves. Without `acl`, this content is not filtered by caller identity. +- **From connectors with `enforce_acl` enabled:** HydraDB uses the authenticated caller and ignores a request `acl` for that connector's content. API keys use the key creator's email; MCP OAuth and dashboard requests use the signed-in user. If you send `acl` anyway, a successful response includes one `meta.warnings` entry with code `acl_ignored_by_connector_enforcement`. An `acl` entry on a source or a query is a **principal**: | Principal | Meaning | -|---|---| +| --- | --- | | `grace@acme.com` | One person, by email. | | `domain:acme.com` | Everyone whose email is under that domain. A query as `grace@acme.com` matches it automatically. | | `group::` | A group in the source app, such as `group:slack:C0123`. Group membership is never derived from an email; send it on the query. | | `__public__` | Every identified caller. | -A source with no `acl` is unrestricted. On a query, omitting `acl`, sending `[]`, or sending `["*"]` all mean no caller filtering. See [ACL on synced content](/essentials/v2/connectors#enforce-acl) for connectors. - ## 7. Use the results -HydraDB returns context, not answers: your application passes the result to a model. `build_string(result)` in Python and `buildString(result)` in TypeScript return `data.llm_prompt`, which numbers the ranked results `[1]`, `[2]`, and so on, so ask the model to cite by those numbers. Tell the model to answer only from the context, and keep the chunks in the order returned. To format the prompt yourself, read `data.chunks`; set `response_format` to `"structured"` to leave `llm_prompt` out, or to `"markdown"` to get only the prompt text as `data`. +HydraDB recreates complete context that is helpful to your agents: your application. `build_string(result)` in Python and `buildString(result)` in TypeScript return `data.llm_prompt`, which numbers the ranked results `[1]`, `[2]`, and so on, so you can ask the agent to cite by those numbers. + ```python Python SDK import os from hydra_db import HydraDB @@ -272,6 +322,7 @@ completion = openai_client.chat.completions.create( print(completion.choices[0].message.content) ``` + ```typescript TypeScript SDK import { HydraDBClient } from "@hydradb/sdk"; import { buildString } from "@hydradb/sdk/helpers"; @@ -310,25 +361,24 @@ const completion = await openai.chat.completions.create({ console.log(completion.choices[0].message.content); ``` + -## Common mistakes +--- + +# Advanced query patterns (mostly for agents) -| Symptom | Cause | Fix | +| **Common mistakes** | **Cause** | **Fix** | | --- | --- | --- | | Empty `query_paths` or `chunk_relations` | `graph_context` set to `false`, or no relationships exist for the result set | Leave `graph_context` on (the default). Empty arrays are normal when there is nothing to return. | | Recent uploads do not appear in results | Indexing not finished | Poll [`GET /context/status`](/api-reference/v2/endpoint/source-status) with the source ids. Chunks are invisible until indexing reaches at least `graph_creation`. | | `metadata_filters` does not narrow results | Filter key is in the wrong namespace, the value does not match exactly, or the top-level field was not declared in the metadata schema | Top-level keys match `metadata`; free-form per-source fields must be nested under `additional_metadata`. Declare hot filter keys in `database_metadata_schema` before production ingest. | | Memories missing from a `type: "knowledge"` query | Wrong store selected | Use `type: "memory"` or `type: "all"`. | | Knowledge missing from a `type: "all"` query | The documents live in a different collection from the one you sent | List both collections in `collections`. | -| Recency does not seem to matter | `recency_bias` was sent as `0`, or the default `0.4` tilt is too mild | Raise it toward `1.0`. | +| Recency does not seem to matter | `recency_bias` was sent as `0`, or the default `0.6` tilt is too mild | Raise it toward `1.0`. | | `operator: "phrase"` returns `400` | `query_by` not set to `"text"` | `"and"` and `"phrase"` only apply to BM25 text queries: switch `query_by` to `"text"`. | -| `query_forceful_relations` ignored | Request runs in `mode: "fast"` (or `auto` routed to fast) | Forceful relations are fetched only in thinking mode. Set `mode: "thinking"`. | +| `query_explicit_relations` ignored | Request runs in `mode: "fast"` (or `auto` routed to fast) | Deterministically linked sources are fetched only in thinking mode. Set `mode: "thinking"`. | | `graph_context: false` ignored | Request runs in thinking mode (`mode: "thinking"`, or `auto` routed to thinking) | Thinking always includes the graph slice; `false` takes effect only in fast mode. Set `mode: "fast"` to drop it. | | Expected a deterministic `fast` or `thinking` pipeline, got auto-routed instead | `mode` was omitted | Omitting `mode` means `"auto"`. Set `mode` explicitly to `"fast"` or `"thinking"`. | - -## Related - -- [Context](/essentials/v2/context): the knowledge and memories a query searches -- [Metadata Filters](/essentials/v2/metadata): designing filterable fields -- [Query: API Reference](/api-reference/v2/endpoint/query): the full parameter and response schema +| No `tabular_data` for a question about a spreadsheet | Request ran in `mode: "fast"` (or `auto` routed to fast) | Table answers run in thinking mode only. Set `mode: "thinking"`. | +| `tabular_data.status` is `not_applicable` with reason `needs_context` | The question relies on a value or definition the context does not state (a target, a threshold, a category) | Add the document that defines it, or state the value in the question. | diff --git a/get-started/v2/introduction.mdx b/get-started/v2/introduction.mdx index 7287dea8..ef05810b 100644 --- a/get-started/v2/introduction.mdx +++ b/get-started/v2/introduction.mdx @@ -1,32 +1,37 @@ --- title: "Introduction" -description: "What HydraDB stores, how it differs from a vector database, and where to start." +description: "The only database you need to give your agents context. All the primitives to build your own context and memory graph in one place." --- -## What HydraDB is +HydraDB keeps context correct across millions or billions of documents, memories, and information nodes. It replaces vector, SQL, and FTS stores (and combinations of them) with one universal context layer: a single database that uses context graphs to materialize views over structured and unstructured data. Store emails, spreadsheets, chats, memories, and other knowledge in one place. -HydraDB is a context layer for AI applications. It stores two types of context: +## Problems and objections with agents at scale -- **Knowledge:** documents, app sources, and facts your AI reasons over. -- **Memories:** preferences, decisions, and past conversations that persist across sessions. +- **Vector databases weren't built for durable, persistent memory:** A vector database finds what is similar; an agent needs what is useful. A useful answer may depend on who made a decision, how a project changed, and who is asking. As you ingest more context, you generate more embeddings, and similarity search degrades because similarity isn't relevance. If you retrieve a single document from a trillion-document store, chances are that document is similar, but not the one your agent actually needs. +- **Why not use Postgres and Apache AGE (pgGraph)?** Most developers start (and should start) with Postgres, mapping CDPs and data dictionaries into a pseudo-context graph over their tables. But as data volume, query complexity, workloads, and users grow, Postgres with pgGraph slows down, and you eventually need a dedicated service for petabyte-scale retrieval. It's the same reason high-growth companies move off pgVector. +- **How about Markdown files?** Markdown is a useful starting point for agent memory, and the workflow is familiar: agents read, write, and search files with ordinary tools. But as memory grows, a plain folder of files isn't enough: filename search and literal grep become expensive and less effective. The problem isn't Markdown as a format; it's relying on files and basic search alone for agent memory at scale. -Everything lives in a **database** you create. You ingest context and connect the tools your team already uses; HydraDB indexes it in the background and builds a context graph from it. It is serverless: you never provision, shard, or scale anything, and the same code runs at ten documents or ten million. +## Why graphs? -The [Quickstart](/get-started/v2/quickstart) takes you from an empty database to your first query in five minutes. +Graphs express data in the most flexible, free-form way possible: an interconnected web your agent can crawl until it finds every node needed for a complete response. + +When mobile apps took off in the 2010s, developers adopted NoSQL over SQL because they couldn't predict the shape of user data two weeks out. AI has the same problem, plus interlinked memories, agent traces, and versioned context. All of it must form one web the AI can traverse until it finds every relevant node. Call it a "mind map," an "investigation board," or simply a "context graph." -## The problem we're solving +## Improving agent accuracy with context graphs -A vector database finds what is similar. An agent needs what is useful, and a useful answer may depend on who made a decision, how a project changed, and who is asking. A sales rep searching for "project Acme" needs the latest sales deck; an engineer needs the changelog and architecture decisions. Similarity alone does not account for those differences. +Graphs make room for new information effortlessly. As new information arrives, older versions are temporally versioned: each node is the latest snapshot, while the history of how a doc, memory, user preference, or decision trace evolved is preserved. -To handle this, teams often combine a vector database, a graph database, a relational store, and a cache, then build the connections between them, keep data in sync, and maintain the retrieval logic themselves. +A context (knowledge) graph organizes knowledge, chats, emails, and other data, maps how it connects, and gives that structure to agents at run time so they deliver high quality, personalized responses. You complete tasks without the back and forth of asking and searching for more information. -HydraDB keeps your knowledge, your memories, and the relationships between them in one graph, so your agent can retrieve the context that fits the person asking. +Consider a legal agent. Its work goes beyond reading the latest case or draft: it's highly relational, and the agent must navigate those relationships to be accurate. A single credit agreement arrives with drafts, amendments, and side letters, and the agent must know which version controls before answering anything about it. The same applies to most agents: knowledge, coding, sales, browser, and more. -## The principle +## So, what is HydraDB? -HydraDB gives you primitives, not a fixed product. The graph, the memory primitives, the retrieval pipeline, and the ranking controls are yours to compose into your own context stores, memory layers, and workflows. +HydraDB is a fast agent database that gives you every primitive you need to build the best context and memory layer for your agents. It should be the last database or context store your agents ever need. -## Performance +## Benchmarks + +These benchmarks show the baseline performance of a context graph compared to vanilla vector or Postgres search: - **Memory recall:** 90.79% on [LongMemEval-S](https://huggingface.co/datasets/xiaowu0162/longmemeval-cleaned). - **Company knowledge:** 88.7 overall on [EnterpriseRAG-Bench](https://github.com/onyx-dot-app/EnterpriseRAG-Bench), retrieval across more than half a million documents from nine enterprise systems. @@ -35,30 +40,30 @@ HydraDB gives you primitives, not a fixed product. The graph, the memory primiti - **Financial AI:** 91.4% recall@10 on [FinanceBench](https://github.com/patronus-ai/financebench), over dense filings and enterprise data. - **Low latency:** sub-200 ms retrieval. -The full technical breakdown of each run is in our [benchmarks](https://benchmarks.hydradb.com/). +See the full technical breakdown of each run in our [benchmarks](https://benchmarks.hydradb.com/). -## More in the box +## Primitives -- **Connectors:** 70 providers, including Slack, Gmail, Google Drive, Notion, GitHub, Jira, Confluence, Linear, HubSpot, Zendesk, and Microsoft Teams, synced on a schedule. Where the provider supports it, the source app's permissions come along as access control, so a query that sends a user's identity as `acl` returns only what that user may see. See [Connectors](/essentials/v2/connectors) and [Query](/essentials/v2/query#6-query-on-behalf-of-a-user). -- **SDKs:** [Python and TypeScript](/api-reference/v2/sdks), with a helper that turns a query result into a prompt string. -- **Tools:** an [MCP server](/plugins/mcp) for Claude, Cursor, and other MCP clients; a [CLI](/plugins/cli); and memory plugins for coding agents and agent frameworks such as [Claude Code](/plugins/claude-code), [Codex](/plugins/codex), [Hermes](/plugins/hermes), and [OpenClaw](/plugins/openclaw). +- **RBAC-aware connectors:** 70+ providers, including Slack, Gmail, Google Drive, Notion, GitHub, Jira, and Teams, synced on a schedule. Source app permissions carry over as access control, so a query that sends a user's identity as `acl` returns only what that user may see. This is the easiest way to start extracting memories or building a context graph from these apps. +- **SLMs that learn after every run:** Typhon-1 and Minion-1, our SLMs, are trained specifically to identify, build, and output relationships, and they learn from every run. +- **SDK, MCP, plugins, CLI:** Tooling for your HydraDB development lifecycle. Plugins are available for OpenClaw, Hermes, Codex, and more. -## What you can build +## Where do I apply this? -- Customer support agents grounded in real customer history and preferences -- Coding agents with persistent memory of a codebase and team conventions -- Clinical companions tracking patient context across visits -- Research copilots reasoning across papers, authors, and findings -- Internal knowledge assistants spanning Slack, Notion, Drive, and email -- Consumer AI applications that remember each user across sessions +- **Software factory**
Git for your agents’ context +- **Company brain**
Build knowledge graphs for your entire company context +- **Multi-agent communication**
No codex or agent session happens twice +- **Personal Graphs**
Personal AI without the brain rot +- **Voice agents**
Deeply answer the hard questions without a pause +- **Computer & browser agents**
Stop re-learning the same sites, apps, and actions -That is a sample, not the limit. +## Easiest way to get started -## Next steps +1. Sign up at [dashboard.hydradb.com](https://dashboard.hydradb.com) and get your API key. +2. Point your coding agents to [docs.hydradb.com/AGENTS.md](https://docs.hydradb.com/AGENTS.md). +3. Describe the "brain" or context graph you want your agents to build. Explore cookbooks for inspiration. -1. Sign up at [dashboard.hydradb.com](https://dashboard.hydradb.com) for your API key. -2. Follow the [Quickstart](/get-started/v2/quickstart). -3. Explore the [API Reference](/api-reference/v2). +The [Quickstart](/get-started/v2/quickstart) takes you from an empty database to your first query in five minutes. AI coding agents and IDE assistants should use the [HydraDB Agent Integration Guide](/AGENTS) and the [v2 OpenAPI spec](/api-reference/v2/openapi.json). diff --git a/get-started/v2/quickstart.mdx b/get-started/v2/quickstart.mdx index c30a84b1..c36963eb 100644 --- a/get-started/v2/quickstart.mdx +++ b/get-started/v2/quickstart.mdx @@ -1,13 +1,9 @@ --- title: "Quickstart" -description: "Create a database, ingest a document and a memory, and query them, in five minutes." +description: "Get your API key, create a database, ingest chat or document, query and pass to agents. If you have questions email founders@hydradb.com" --- -Install the SDK, create a database, ingest a document and a memory, and query both in one call. - -Working with a coding agent such as Claude Code, Cursor, or Codex? Copy this prompt instead, and it builds the integration from the [Agent Integration Guide](/AGENTS). - - + Integrate HydraDB into this project. 1. Read https://docs.hydradb.com/AGENTS.md before writing any code. @@ -17,19 +13,16 @@ Integrate HydraDB into this project. 5. Show me your plan and the files you will change before changing anything. -## 1. Install and initialize - -Get an API key from [dashboard.hydradb.com](https://dashboard.hydradb.com), then set it in the terminal where you run the examples: +## Sample code ```bash export HYDRADB_API_KEY="your_api_key" ``` -Install the SDK and create a client: - ```python Python SDK -# Install: pip install "hydradb-sdk>=2,<3" +# Install the SDK and create a client: +# pip install "hydradb-sdk>=2,<3" import os from hydra_db import HydraDB from hydra_db.helpers import build_string @@ -54,9 +47,7 @@ curl 'https://api.hydradb.com/databases' \ ``` -## 2. Create a database, ingest context, and query it - -Create a database, ingest a refund policy and a customer memory, wait until both are indexed, then query them together. Indexing runs in the background, which is why the code waits before querying. If you already created a database, set `database` to its name and skip the create call. +**Sample customer support agent:** Create a database, ingest refund policies and customer memories, wait until everything is indexed, then query. Indexing runs in the background, which is why the code waits before querying. If you already created a database, set `database` to its name and skip the create call. ```python Python SDK @@ -249,7 +240,7 @@ EOF ``` -## 3. Check the result +## Checking the results The query returns chunks (passages of your sources), not a generated answer. The SDK examples print formatted context; cURL prints the chunk text. Both should include the policy and the memory: @@ -260,36 +251,4 @@ Customer asked for a refund on 2026-09-30 and was told to wait for the billing c Send these chunks to your model as context. `build_string` in Python and `buildString` in TypeScript format them for a prompt. See [Query](/essentials/v2/query#7-use-the-results). -## What you have built - -That is the full loop: create a database, ingest context, wait for indexing, query it, and pass the result to a model. HydraDB handles parsing, chunking, embedding, graph building, and search. - -```mermaid -flowchart LR - A([1. Create Database]) --> B([2. Ingest Context]) - B --> C([3. Wait for Indexing]) - C --> D([4. Query]) - D --> E([5. Pass to Model]) - - style A fill:#0f172a,stroke:#334155,stroke-width:2px,color:#f8fafc,stroke-linecap:round - style B fill:#0f172a,stroke:#334155,stroke-width:2px,color:#f8fafc,stroke-linecap:round - style C fill:#0f172a,stroke:#334155,stroke-width:2px,color:#f8fafc,stroke-linecap:round - style D fill:#0f172a,stroke:#334155,stroke-width:2px,color:#f8fafc,stroke-linecap:round - style E fill:#0f172a,stroke:#334155,stroke-width:2px,color:#f8fafc,stroke-linecap:round -``` - -HydraDB is serverless: there is nothing to provision, and the same code works at any scale, whether the context is a Markdown file or a Slack workspace synced by a [connector](/essentials/v2/connectors). - -## Next steps - -| If you want to | Read | -|---|---| -| Ingest files, app sources, or memories | [Context](/essentials/v2/context) | -| Sync apps such as Slack, Gmail, and Notion automatically | [Connectors](/essentials/v2/connectors) | -| Tune query behavior (`alpha`, `mode`, `recency_bias`) | [Query](/essentials/v2/query) | -| Design a filterable metadata schema | [Metadata](/essentials/v2/metadata) | -| Organize context across databases and collections | [Databases and Collections](/essentials/v2/databases-and-collections) | -| Turn query results into a model prompt | [Query](/essentials/v2/query#7-use-the-results) | -| See the full endpoint reference | [API Reference](/api-reference/v2) | - -Stuck? Email [founders@hydradb.com](mailto:founders@hydradb.com). +HydraDB is serverless: there is nothing to provision, and the same code works at any scale, whether the context is a Markdown file or Slack messages synced by a [connector](/essentials/v2/connectors). diff --git a/images/connectors/airtable.svg b/images/connectors/airtable.svg new file mode 100644 index 00000000..efa29771 --- /dev/null +++ b/images/connectors/airtable.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/asana.svg b/images/connectors/asana.svg new file mode 100644 index 00000000..c35dcc61 --- /dev/null +++ b/images/connectors/asana.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/attio-dark.svg b/images/connectors/attio-dark.svg new file mode 100644 index 00000000..a0c56b0b --- /dev/null +++ b/images/connectors/attio-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/images/connectors/attio-light.svg b/images/connectors/attio-light.svg new file mode 100644 index 00000000..975b97b9 --- /dev/null +++ b/images/connectors/attio-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/images/connectors/avoma.svg b/images/connectors/avoma.svg new file mode 100644 index 00000000..96df5b3a --- /dev/null +++ b/images/connectors/avoma.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/images/connectors/bamboohr.svg b/images/connectors/bamboohr.svg new file mode 100644 index 00000000..8efbeb54 --- /dev/null +++ b/images/connectors/bamboohr.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/bigquery.svg b/images/connectors/bigquery.svg new file mode 100644 index 00000000..f75ed924 --- /dev/null +++ b/images/connectors/bigquery.svg @@ -0,0 +1,7 @@ + diff --git a/images/connectors/bookstack.svg b/images/connectors/bookstack.svg new file mode 100644 index 00000000..196cc83a --- /dev/null +++ b/images/connectors/bookstack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/calendly.svg b/images/connectors/calendly.svg new file mode 100644 index 00000000..21ff2610 --- /dev/null +++ b/images/connectors/calendly.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/clickup.svg b/images/connectors/clickup.svg new file mode 100644 index 00000000..64f68a7f --- /dev/null +++ b/images/connectors/clickup.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/images/connectors/coda.svg b/images/connectors/coda.svg new file mode 100644 index 00000000..65165bac --- /dev/null +++ b/images/connectors/coda.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/confluence.svg b/images/connectors/confluence.svg new file mode 100644 index 00000000..10174897 --- /dev/null +++ b/images/connectors/confluence.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/contentful.svg b/images/connectors/contentful.svg new file mode 100644 index 00000000..e4931da4 --- /dev/null +++ b/images/connectors/contentful.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/copper-dark.svg b/images/connectors/copper-dark.svg new file mode 100644 index 00000000..ed3eae24 --- /dev/null +++ b/images/connectors/copper-dark.svg @@ -0,0 +1,3 @@ + +C + diff --git a/images/connectors/copper-light.svg b/images/connectors/copper-light.svg new file mode 100644 index 00000000..ff88fb15 --- /dev/null +++ b/images/connectors/copper-light.svg @@ -0,0 +1,3 @@ + +C + diff --git a/images/connectors/datadog-dark.svg b/images/connectors/datadog-dark.svg new file mode 100644 index 00000000..3e70926c --- /dev/null +++ b/images/connectors/datadog-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/datadog-light.svg b/images/connectors/datadog-light.svg new file mode 100644 index 00000000..f1964bb0 --- /dev/null +++ b/images/connectors/datadog-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/discord.svg b/images/connectors/discord.svg new file mode 100644 index 00000000..fc8fd719 --- /dev/null +++ b/images/connectors/discord.svg @@ -0,0 +1,4 @@ + + diff --git a/images/connectors/dropbox.svg b/images/connectors/dropbox.svg new file mode 100644 index 00000000..c4161d91 --- /dev/null +++ b/images/connectors/dropbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/figma.svg b/images/connectors/figma.svg new file mode 100644 index 00000000..8e0b7ba9 --- /dev/null +++ b/images/connectors/figma.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/fireflies.svg b/images/connectors/fireflies.svg new file mode 100644 index 00000000..3f888e15 --- /dev/null +++ b/images/connectors/fireflies.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/connectors/freshdesk.svg b/images/connectors/freshdesk.svg new file mode 100644 index 00000000..f023a0a3 --- /dev/null +++ b/images/connectors/freshdesk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/github-dark.svg b/images/connectors/github-dark.svg new file mode 100644 index 00000000..7da5d1a1 --- /dev/null +++ b/images/connectors/github-dark.svg @@ -0,0 +1,8 @@ + + + diff --git a/images/connectors/github-light.svg b/images/connectors/github-light.svg new file mode 100644 index 00000000..1e087fa8 --- /dev/null +++ b/images/connectors/github-light.svg @@ -0,0 +1,8 @@ + + + diff --git a/images/connectors/gitlab.svg b/images/connectors/gitlab.svg new file mode 100644 index 00000000..92ad3fb6 --- /dev/null +++ b/images/connectors/gitlab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/gmail.svg b/images/connectors/gmail.svg new file mode 100644 index 00000000..e35766d1 --- /dev/null +++ b/images/connectors/gmail.svg @@ -0,0 +1 @@ + diff --git a/images/connectors/gong-dark.svg b/images/connectors/gong-dark.svg new file mode 100644 index 00000000..a08a532d --- /dev/null +++ b/images/connectors/gong-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/gong-light.svg b/images/connectors/gong-light.svg new file mode 100644 index 00000000..4383e631 --- /dev/null +++ b/images/connectors/gong-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/google-calendar.svg b/images/connectors/google-calendar.svg new file mode 100644 index 00000000..68e3bac6 --- /dev/null +++ b/images/connectors/google-calendar.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/connectors/google-drive.svg b/images/connectors/google-drive.svg new file mode 100644 index 00000000..c49f3a75 --- /dev/null +++ b/images/connectors/google-drive.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/images/connectors/google-search-console.svg b/images/connectors/google-search-console.svg new file mode 100644 index 00000000..bbb7e04a --- /dev/null +++ b/images/connectors/google-search-console.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/googleads.svg b/images/connectors/googleads.svg new file mode 100644 index 00000000..a295244f --- /dev/null +++ b/images/connectors/googleads.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/images/connectors/granola.svg b/images/connectors/granola.svg new file mode 100644 index 00000000..e7d62b14 --- /dev/null +++ b/images/connectors/granola.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/images/connectors/greenhouse.svg b/images/connectors/greenhouse.svg new file mode 100644 index 00000000..ae43ef1f --- /dev/null +++ b/images/connectors/greenhouse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/guru-dark.svg b/images/connectors/guru-dark.svg new file mode 100644 index 00000000..3dca41fe --- /dev/null +++ b/images/connectors/guru-dark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/images/connectors/guru-light.svg b/images/connectors/guru-light.svg new file mode 100644 index 00000000..5d029e18 --- /dev/null +++ b/images/connectors/guru-light.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/images/connectors/helpscout.svg b/images/connectors/helpscout.svg new file mode 100644 index 00000000..43138175 --- /dev/null +++ b/images/connectors/helpscout.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/hubspot.svg b/images/connectors/hubspot.svg new file mode 100644 index 00000000..df68080c --- /dev/null +++ b/images/connectors/hubspot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/intercom.svg b/images/connectors/intercom.svg new file mode 100644 index 00000000..1f3fe53f --- /dev/null +++ b/images/connectors/intercom.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/jira.svg b/images/connectors/jira.svg new file mode 100644 index 00000000..052ab326 --- /dev/null +++ b/images/connectors/jira.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/klaviyo-dark.svg b/images/connectors/klaviyo-dark.svg new file mode 100644 index 00000000..53b34fa2 --- /dev/null +++ b/images/connectors/klaviyo-dark.svg @@ -0,0 +1,3 @@ + +K + diff --git a/images/connectors/klaviyo-light.svg b/images/connectors/klaviyo-light.svg new file mode 100644 index 00000000..19e52711 --- /dev/null +++ b/images/connectors/klaviyo-light.svg @@ -0,0 +1,3 @@ + +K + diff --git a/images/connectors/launchdarkly-dark.svg b/images/connectors/launchdarkly-dark.svg new file mode 100644 index 00000000..e1b96821 --- /dev/null +++ b/images/connectors/launchdarkly-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/launchdarkly-light.svg b/images/connectors/launchdarkly-light.svg new file mode 100644 index 00000000..b55edce8 --- /dev/null +++ b/images/connectors/launchdarkly-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/lever-dark.svg b/images/connectors/lever-dark.svg new file mode 100644 index 00000000..37edf606 --- /dev/null +++ b/images/connectors/lever-dark.svg @@ -0,0 +1,3 @@ + +L + diff --git a/images/connectors/lever-light.svg b/images/connectors/lever-light.svg new file mode 100644 index 00000000..6ad1d306 --- /dev/null +++ b/images/connectors/lever-light.svg @@ -0,0 +1,3 @@ + +L + diff --git a/images/connectors/linear.svg b/images/connectors/linear.svg new file mode 100644 index 00000000..eb3c91c1 --- /dev/null +++ b/images/connectors/linear.svg @@ -0,0 +1 @@ + diff --git a/images/connectors/loom.svg b/images/connectors/loom.svg new file mode 100644 index 00000000..5ec5e161 --- /dev/null +++ b/images/connectors/loom.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/mailchimp.svg b/images/connectors/mailchimp.svg new file mode 100644 index 00000000..f9a41fb9 --- /dev/null +++ b/images/connectors/mailchimp.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/microsoft-teams.svg b/images/connectors/microsoft-teams.svg new file mode 100644 index 00000000..3409e6cf --- /dev/null +++ b/images/connectors/microsoft-teams.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/connectors/mixpanel.svg b/images/connectors/mixpanel.svg new file mode 100644 index 00000000..755aa8c1 --- /dev/null +++ b/images/connectors/mixpanel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/monday.svg b/images/connectors/monday.svg new file mode 100644 index 00000000..69782921 --- /dev/null +++ b/images/connectors/monday.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/notion-dark.svg b/images/connectors/notion-dark.svg new file mode 100644 index 00000000..e9f49f46 --- /dev/null +++ b/images/connectors/notion-dark.svg @@ -0,0 +1,6 @@ + + + diff --git a/images/connectors/notion-light.svg b/images/connectors/notion-light.svg new file mode 100644 index 00000000..5b25d277 --- /dev/null +++ b/images/connectors/notion-light.svg @@ -0,0 +1,6 @@ + + + diff --git a/images/connectors/okta.svg b/images/connectors/okta.svg new file mode 100644 index 00000000..5b0e1e59 --- /dev/null +++ b/images/connectors/okta.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/outlook.svg b/images/connectors/outlook.svg new file mode 100644 index 00000000..586f39ff --- /dev/null +++ b/images/connectors/outlook.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/connectors/pagerduty.svg b/images/connectors/pagerduty.svg new file mode 100644 index 00000000..f8bfde7e --- /dev/null +++ b/images/connectors/pagerduty.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/pardot-dark.svg b/images/connectors/pardot-dark.svg new file mode 100644 index 00000000..e2ab6454 --- /dev/null +++ b/images/connectors/pardot-dark.svg @@ -0,0 +1,3 @@ + +P + diff --git a/images/connectors/pardot-light.svg b/images/connectors/pardot-light.svg new file mode 100644 index 00000000..c1c8cb1a --- /dev/null +++ b/images/connectors/pardot-light.svg @@ -0,0 +1,3 @@ + +P + diff --git a/images/connectors/pipedrive-dark.svg b/images/connectors/pipedrive-dark.svg new file mode 100644 index 00000000..181dff5a --- /dev/null +++ b/images/connectors/pipedrive-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/pipedrive-light.svg b/images/connectors/pipedrive-light.svg new file mode 100644 index 00000000..1d93583a --- /dev/null +++ b/images/connectors/pipedrive-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/posthog.svg b/images/connectors/posthog.svg new file mode 100644 index 00000000..8a3fcab9 --- /dev/null +++ b/images/connectors/posthog.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/quickbooks.svg b/images/connectors/quickbooks.svg new file mode 100644 index 00000000..59ca6806 --- /dev/null +++ b/images/connectors/quickbooks.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/recurly-dark.svg b/images/connectors/recurly-dark.svg new file mode 100644 index 00000000..b8b47bed --- /dev/null +++ b/images/connectors/recurly-dark.svg @@ -0,0 +1,3 @@ + +R + diff --git a/images/connectors/recurly-light.svg b/images/connectors/recurly-light.svg new file mode 100644 index 00000000..62800bca --- /dev/null +++ b/images/connectors/recurly-light.svg @@ -0,0 +1,3 @@ + +R + diff --git a/images/connectors/sendgrid.svg b/images/connectors/sendgrid.svg new file mode 100644 index 00000000..960b7757 --- /dev/null +++ b/images/connectors/sendgrid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/sentry-dark.svg b/images/connectors/sentry-dark.svg new file mode 100644 index 00000000..e803c0cd --- /dev/null +++ b/images/connectors/sentry-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/sentry-light.svg b/images/connectors/sentry-light.svg new file mode 100644 index 00000000..b12156cc --- /dev/null +++ b/images/connectors/sentry-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/servicenow.svg b/images/connectors/servicenow.svg new file mode 100644 index 00000000..b421fff3 --- /dev/null +++ b/images/connectors/servicenow.svg @@ -0,0 +1 @@ + diff --git a/images/connectors/sharepoint.svg b/images/connectors/sharepoint.svg new file mode 100644 index 00000000..4d454b98 --- /dev/null +++ b/images/connectors/sharepoint.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/connectors/shortcut.svg b/images/connectors/shortcut.svg new file mode 100644 index 00000000..58d454eb --- /dev/null +++ b/images/connectors/shortcut.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/slack.svg b/images/connectors/slack.svg new file mode 100644 index 00000000..468eceac --- /dev/null +++ b/images/connectors/slack.svg @@ -0,0 +1 @@ + diff --git a/images/connectors/smartsheet-dark.svg b/images/connectors/smartsheet-dark.svg new file mode 100644 index 00000000..268527f0 --- /dev/null +++ b/images/connectors/smartsheet-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/smartsheet-light.svg b/images/connectors/smartsheet-light.svg new file mode 100644 index 00000000..ac45fdb3 --- /dev/null +++ b/images/connectors/smartsheet-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/stripe.svg b/images/connectors/stripe.svg new file mode 100644 index 00000000..afb8205f --- /dev/null +++ b/images/connectors/stripe.svg @@ -0,0 +1 @@ + diff --git a/images/connectors/supabase.svg b/images/connectors/supabase.svg new file mode 100644 index 00000000..4b765f7e --- /dev/null +++ b/images/connectors/supabase.svg @@ -0,0 +1,5 @@ + diff --git a/images/connectors/surveymonkey.svg b/images/connectors/surveymonkey.svg new file mode 100644 index 00000000..26484101 --- /dev/null +++ b/images/connectors/surveymonkey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/twilio.svg b/images/connectors/twilio.svg new file mode 100644 index 00000000..4a0be064 --- /dev/null +++ b/images/connectors/twilio.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/twitter-dark.svg b/images/connectors/twitter-dark.svg new file mode 100644 index 00000000..067a791e --- /dev/null +++ b/images/connectors/twitter-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/twitter-light.svg b/images/connectors/twitter-light.svg new file mode 100644 index 00000000..a871dddd --- /dev/null +++ b/images/connectors/twitter-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/typeform-dark.svg b/images/connectors/typeform-dark.svg new file mode 100644 index 00000000..aee90603 --- /dev/null +++ b/images/connectors/typeform-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/typeform-light.svg b/images/connectors/typeform-light.svg new file mode 100644 index 00000000..15f1f7cc --- /dev/null +++ b/images/connectors/typeform-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/wrike.svg b/images/connectors/wrike.svg new file mode 100644 index 00000000..3f78b398 --- /dev/null +++ b/images/connectors/wrike.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/xero.svg b/images/connectors/xero.svg new file mode 100644 index 00000000..c68f8c10 --- /dev/null +++ b/images/connectors/xero.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/zendesk-dark.svg b/images/connectors/zendesk-dark.svg new file mode 100644 index 00000000..7b0ed2ab --- /dev/null +++ b/images/connectors/zendesk-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/zendesk-light.svg b/images/connectors/zendesk-light.svg new file mode 100644 index 00000000..c8f97a18 --- /dev/null +++ b/images/connectors/zendesk-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/connectors/zoho-crm.svg b/images/connectors/zoho-crm.svg new file mode 100644 index 00000000..ef0f9063 --- /dev/null +++ b/images/connectors/zoho-crm.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/connectors/zoom.svg b/images/connectors/zoom.svg new file mode 100644 index 00000000..dd15a4a6 --- /dev/null +++ b/images/connectors/zoom.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/llms.txt b/llms.txt index 297d8157..399b93f8 100644 --- a/llms.txt +++ b/llms.txt @@ -1,139 +1,1363 @@ -# HydraDB Documentation - -> Documentation for HydraDB's supported v2 API, SDKs, integrations, and cookbooks. Legacy v1 pages are listed separately and aren't compatible with current SDK installs. - -Start with the v2 quickstart. The Agent Integration Guide explains the API contract; this index lists every non-archive documentation page, including linked detail pages outside the navigation. - -## Current v2 documentation - -- [HydraDB Agent Integration Guide](https://docs.hydradb.com/AGENTS.md) -- [Add Connector Resource](https://docs.hydradb.com/api-reference/v2/endpoint/add-connector-resource.md) -- [Configure Connector](https://docs.hydradb.com/api-reference/v2/endpoint/configure-connector.md) -- [List Connector Resources](https://docs.hydradb.com/api-reference/v2/endpoint/connector-resources.md) -- [Connectors: Overview](https://docs.hydradb.com/api-reference/v2/endpoint/connectors-overview.md) -- [Context: Overview](https://docs.hydradb.com/api-reference/v2/endpoint/context-overview.md) -- [Create Connector](https://docs.hydradb.com/api-reference/v2/endpoint/create-connector.md) -- [Create Database](https://docs.hydradb.com/api-reference/v2/endpoint/create-database.md) -- [Database Stats](https://docs.hydradb.com/api-reference/v2/endpoint/database-stats.md) -- [Database Status](https://docs.hydradb.com/api-reference/v2/endpoint/database-status.md) -- [Databases: Overview](https://docs.hydradb.com/api-reference/v2/endpoint/databases-overview.md) -- [Delete Collection](https://docs.hydradb.com/api-reference/v2/endpoint/delete-collection.md) -- [Delete Connector](https://docs.hydradb.com/api-reference/v2/endpoint/delete-connector.md) -- [Delete Connector Resource](https://docs.hydradb.com/api-reference/v2/endpoint/delete-connector-resource.md) -- [Delete Database](https://docs.hydradb.com/api-reference/v2/endpoint/delete-database.md) -- [Delete Context](https://docs.hydradb.com/api-reference/v2/endpoint/delete-source.md) -- [Delete Webhook](https://docs.hydradb.com/api-reference/v2/endpoint/delete-webhook.md) -- [Disable Signing](https://docs.hydradb.com/api-reference/v2/endpoint/disable-webhook-signing.md) -- [Discover Resources](https://docs.hydradb.com/api-reference/v2/endpoint/discover-connector-resources.md) -- [Inspect Context](https://docs.hydradb.com/api-reference/v2/endpoint/fetch-content.md) -- [Get Connector](https://docs.hydradb.com/api-reference/v2/endpoint/get-connector.md) -- [Get Connector Status](https://docs.hydradb.com/api-reference/v2/endpoint/get-connector-status.md) -- [Get Metadata Schema](https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema.md) -- [Get Webhook](https://docs.hydradb.com/api-reference/v2/endpoint/get-webhook.md) -- [Get Delivery](https://docs.hydradb.com/api-reference/v2/endpoint/get-webhook-delivery.md) -- [Ingest Context](https://docs.hydradb.com/api-reference/v2/endpoint/ingest-context.md) -- [List Collections](https://docs.hydradb.com/api-reference/v2/endpoint/list-collections.md) -- [List Connector Providers](https://docs.hydradb.com/api-reference/v2/endpoint/list-connector-providers.md) -- [List Connectors](https://docs.hydradb.com/api-reference/v2/endpoint/list-connectors.md) -- [List Context](https://docs.hydradb.com/api-reference/v2/endpoint/list-context.md) -- [List Databases](https://docs.hydradb.com/api-reference/v2/endpoint/list-databases.md) -- [List Deliveries](https://docs.hydradb.com/api-reference/v2/endpoint/list-webhook-deliveries.md) -- [Pause Connector](https://docs.hydradb.com/api-reference/v2/endpoint/pause-connector.md) -- [Query](https://docs.hydradb.com/api-reference/v2/endpoint/query.md) -- [Query: Overview](https://docs.hydradb.com/api-reference/v2/endpoint/query-overview.md) -- [Register Webhook](https://docs.hydradb.com/api-reference/v2/endpoint/register-webhook.md) -- [Resume Connector](https://docs.hydradb.com/api-reference/v2/endpoint/resume-connector.md) -- [Retry Delivery](https://docs.hydradb.com/api-reference/v2/endpoint/retry-webhook-delivery.md) -- [Set Signing Secret](https://docs.hydradb.com/api-reference/v2/endpoint/set-webhook-signing-secret.md) -- [Inspecting Context Relations](https://docs.hydradb.com/api-reference/v2/endpoint/source-relations.md) -- [Ingestion Status](https://docs.hydradb.com/api-reference/v2/endpoint/source-status.md) -- [Connected Subgraph](https://docs.hydradb.com/api-reference/v2/endpoint/subgraph.md) -- [Submit Feedback](https://docs.hydradb.com/api-reference/v2/endpoint/submit-feedback.md) -- [Sync Connector](https://docs.hydradb.com/api-reference/v2/endpoint/sync-connector.md) -- [Send Test Delivery](https://docs.hydradb.com/api-reference/v2/endpoint/test-webhook.md) -- [Update Connector](https://docs.hydradb.com/api-reference/v2/endpoint/update-connector.md) -- [Update Connector Resource](https://docs.hydradb.com/api-reference/v2/endpoint/update-connector-resource.md) -- [Update Metadata Schema](https://docs.hydradb.com/api-reference/v2/endpoint/update-metadata-schema.md) -- [Update Source Metadata](https://docs.hydradb.com/api-reference/v2/endpoint/update-source-metadata.md) -- [Webhooks: Overview](https://docs.hydradb.com/api-reference/v2/endpoint/webhooks-overview.md) -- [Error Responses](https://docs.hydradb.com/api-reference/v2/error-responses.md) -- [API Reference](https://docs.hydradb.com/api-reference/v2/index.md) -- [SDKs: Python and TypeScript](https://docs.hydradb.com/api-reference/v2/sdks.md) -- [Build your own AI Chief of Staff](https://docs.hydradb.com/cookbooks/v2/chief-of-staff.md) -- [Build your own competitive intelligence agent](https://docs.hydradb.com/cookbooks/v2/competitive-intelligence.md) -- [Build your own Cursor](https://docs.hydradb.com/cookbooks/v2/cursor.md) -- [Build your own Glean](https://docs.hydradb.com/cookbooks/v2/glean.md) -- [Cookbooks](https://docs.hydradb.com/cookbooks/v2/index.md) -- [Build your own personal assistant](https://docs.hydradb.com/cookbooks/v2/personal-assistant.md) -- [Build your own customer support agent](https://docs.hydradb.com/cookbooks/v2/support-agent.md) -- [Bring Your Own Graph (BYOG)](https://docs.hydradb.com/essentials/v2/bring-your-own-graph.md) -- [Connectors](https://docs.hydradb.com/essentials/v2/connectors.md) -- [Context](https://docs.hydradb.com/essentials/v2/context.md) -- [Databases and Collections](https://docs.hydradb.com/essentials/v2/databases-and-collections.md) -- [Metadata Filters](https://docs.hydradb.com/essentials/v2/metadata.md) -- [Query](https://docs.hydradb.com/essentials/v2/query.md) -- [Introduction](https://docs.hydradb.com/get-started/v2/introduction.md) -- [Quickstart](https://docs.hydradb.com/get-started/v2/quickstart.md) -- [CLI](https://docs.hydradb.com/plugins/cli.md) -- [Plugins](https://docs.hydradb.com/plugins/ecosystem.md) -- [MCP](https://docs.hydradb.com/plugins/mcp.md) - -## Integration and connector details - -- [Claude Code](https://docs.hydradb.com/plugins/claude-code.md) -- [Codex](https://docs.hydradb.com/plugins/codex.md) -- [CrewAI](https://docs.hydradb.com/plugins/crewai.md) -- [Cursor](https://docs.hydradb.com/plugins/cursor.md) -- [DeepSeek Harness](https://docs.hydradb.com/plugins/deepseek.md) -- [Grok Build](https://docs.hydradb.com/plugins/grok-build.md) -- [Hermes](https://docs.hydradb.com/plugins/hermes.md) -- [LangChain](https://docs.hydradb.com/plugins/langchain.md) -- [Muse Code](https://docs.hydradb.com/plugins/muse-code.md) -- [OpenClaw](https://docs.hydradb.com/plugins/openclaw.md) -- [OpenCode](https://docs.hydradb.com/plugins/opencode.md) - -## Site information - -- [Continuity Assurance](https://docs.hydradb.com/continuity-assurance.md) - -## Legacy v1 reference (not maintained) - -- [Add Memory](https://docs.hydradb.com/api-reference/endpoint/add-memory.md) -- [Boolean Recall](https://docs.hydradb.com/api-reference/endpoint/boolean-recall.md) -- [Create Tenant](https://docs.hydradb.com/api-reference/endpoint/create-tenant.md) -- [Delete Knowledge](https://docs.hydradb.com/api-reference/endpoint/delete-knowledge.md) -- [Delete Memory](https://docs.hydradb.com/api-reference/endpoint/delete-memory.md) -- [Delete Tenant](https://docs.hydradb.com/api-reference/endpoint/delete-tenant.md) -- [Fetch Content](https://docs.hydradb.com/api-reference/endpoint/fetch-content.md) -- [Full Recall](https://docs.hydradb.com/api-reference/endpoint/full-recall.md) -- [Graph Relations By Source ID](https://docs.hydradb.com/api-reference/endpoint/graph-relations.md) -- [Check Infra Status](https://docs.hydradb.com/api-reference/endpoint/infra-status.md) -- [Ingestion - Overview](https://docs.hydradb.com/api-reference/endpoint/ingestion-overview.md) -- [List Data](https://docs.hydradb.com/api-reference/endpoint/list-data.md) -- [List – Overview](https://docs.hydradb.com/api-reference/endpoint/list-overview.md) -- [List Sub-Tenant IDs](https://docs.hydradb.com/api-reference/endpoint/list-sub-tenant-ids.md) -- [List Tenant IDs](https://docs.hydradb.com/api-reference/endpoint/list-tenant-ids.md) -- [Memories – Overview](https://docs.hydradb.com/api-reference/endpoint/memories-overview.md) -- [Monitor Tenant](https://docs.hydradb.com/api-reference/endpoint/monitor-tenant.md) -- [Recall – Overview](https://docs.hydradb.com/api-reference/endpoint/recall-overview.md) -- [Recall Preferences](https://docs.hydradb.com/api-reference/endpoint/recall-preferences.md) -- [Tenants – Overview](https://docs.hydradb.com/api-reference/endpoint/tenants-overview.md) -- [Upload Knowledge](https://docs.hydradb.com/api-reference/endpoint/upload-knowledge.md) -- [Verify Processing](https://docs.hydradb.com/api-reference/endpoint/verify-processing.md) -- [Error Responses](https://docs.hydradb.com/api-reference/error-responses.md) -- [API Reference](https://docs.hydradb.com/api-reference/index.md) -- [SDKs – Node and Python](https://docs.hydradb.com/api-reference/sdks.md) -- [How to Use API Results](https://docs.hydradb.com/essentials/api-results.md) -- [App Sources](https://docs.hydradb.com/essentials/app-sources.md) -- [Architecture](https://docs.hydradb.com/essentials/architecture.md) -- [Context Graphs](https://docs.hydradb.com/essentials/context-graphs.md) -- [Knowledge](https://docs.hydradb.com/essentials/knowledge.md) -- [Memories](https://docs.hydradb.com/essentials/memories.md) -- [Metadata](https://docs.hydradb.com/essentials/metadata.md) -- [Multi-Tenant Support](https://docs.hydradb.com/essentials/multi-tenant.md) -- [Recall](https://docs.hydradb.com/essentials/recall.md) -- [Semantic Search & Retrieval](https://docs.hydradb.com/essentials/semantic-search.md) -- [Webhooks](https://docs.hydradb.com/essentials/webhooks.md) -- [Core Concepts](https://docs.hydradb.com/get-started/core-concepts.md) -- [Introduction](https://docs.hydradb.com/get-started/introduction.md) -- [Quickstart](https://docs.hydradb.com/get-started/quickstart.md) +# Complete Agent Integration Guide + +> The one page an AI coding agent reads before writing a HydraDB v2 integration: rules, API contracts, and runnable examples. + +This is the complete, maintained agent guide. Continue with the sections below; no separate documentation-index fetch is needed. + +### TL;DR: Critical endpoints + +1. **`POST /databases`** (`client.databases.create()`): Create an isolated database. Creation is asynchronous. +2. **`GET /databases/status`** (`client.databases.status()`): Poll until `infra.ready_for_ingestion` is true before you ingest or query. +3. **`POST /context/ingest`** (`client.context.ingest()`): Ingest files or memories with `type="knowledge"` or `type="memory"`. Indexing is asynchronous. +4. **`GET /context/status`** (`client.context.status()`): Poll by `ids` until `indexing_status` is `completed` before you query. `graph_creation` means the source is becoming searchable while its graph builds, but a query sent the moment it appears can still miss the source. `errored` means indexing failed: read `error_code` and `error_message`. Details in [7. Context status and lifecycle](#7-context-status-and-lifecycle). +5. **`POST /query`** (`client.query()`): Retrieve chunks with `type: "knowledge"`, `"memory"`, or `"all"`. +6. **`POST /feedback`** (`client.feedback.submit()`): Tell us when a query did not give you what you needed, and once the task is done, how the context held up. See [Sending feedback](#sending-feedback). + +Every other endpoint and SDK method is in [15. SDK method reference](#15-sdk-method-reference). + +--- + +## 1. Critical rules for LLMs + +### API versioning and auth + +- Base URL: `https://api.hydradb.com` +- Raw HTTP calls must include: + - `Authorization: Bearer ` + - `API-Version: 2` +- Official SDKs set `API-Version: 2` automatically. +- Use `HYDRADB_API_KEY` as the environment variable in examples. + +### Response envelope + +Raw HTTP responses are wrapped: + +```json +{ + "success": true, + "data": {}, + "error": null, + "meta": { + "request_id": "...", + "latency_ms": 12.3 + } +} +``` + +- Read the payload from `data`, never from the top level. This applies to `/databases`, `/context/*`, `/query`, `/feedback`, and the webhook management endpoints (`/webhooks/indexing*`). +- The SDKs do not unwrap it: they return the full envelope object, so read `response.data` (for example `response.data.infra`, `response.data.statuses`, `response.data.results`). On failure they raise a typed exception instead of returning an envelope with `error` set. +- Exceptions: connector endpoints (`/connectors*`) and `PATCH /databases/{database}/metadata-schema` return their success body directly, without the envelope. In the SDKs that is every `connectors.*` method, `list_providers()`, and `update_metadata_schema()`. Their errors still use the envelope. +- Log `meta.request_id` for failed requests. +- Treat `meta` as an open object: ignore keys you do not recognize. +- `meta` carries an optional `deprecation` list (with a `Deprecation: true` response header) when a request uses a legacy tenants route (any path under /tenants) or a deprecated field (`tenant_id`/`sub_tenant_id`, or `sub_tenant_ids` on `/query`). It is a non-breaking nudge: the status code is unchanged. Every entry has `deprecated`, `message`, and `deprecated_since`. `deprecated_field` and `preferred_field` are **optional**: the `sub_tenant_ids` notice on `/query` carries them, the `tenant_id`/`sub_tenant_id` notice does not. Read `message` for the migration, and do not key logic off the two optional fields. To avoid the notice, use the `/databases` routes and the `database`/`collection`/`collections` fields. + +### Query parameter naming + +`type` selects the store on `POST /query` and on the context lifecycle APIs: `"knowledge"`, `"memory"`, or `"all"` for both. `POST /context/ingest` takes `"knowledge"` or `"memory"` only. + +### Metadata naming + +- `metadata`: schema-aligned fields, declared at database creation; the fast filter path. Filter on them with top-level `metadata_filters` keys. +- `additional_metadata`: free-form fields; anything not in the `metadata` schema. Filter on them with `metadata_filters.additional_metadata`. +- Set both per source on `/context/ingest`: on each `document_metadata[]` item (file uploads) or each memory item. There is no top-level `metadata` or `additional_metadata` form field. + +Schema fields, placement, and filter operators are in [10. Metadata guide](#10-metadata-guide). + +### Do not mix scopes accidentally + +- `database` (formerly `tenant_id`) is the hard isolation boundary. +- `collection` (formerly `sub_tenant_id`) is an optional group inside a database. Use separate collections only for context that must never meet in one query, such as each user's memories. Otherwise (for example, a company brain) keep all knowledge and connectors in one collection and isolate results with `metadata_filters` and `acl`. Patterns are in [Databases and collections](#databases-and-collections). +- Use the same `collection` on writes, status checks, and reads. Context written under one collection does not appear in a query that names another. + +### Send `acl` on user queries + +- If your application answers on behalf of signed-in users, send the caller's identity as `acl` on every `POST /query`, for example `"acl": ["grace@acme.com"]`. +- A query with no `acl`, `[]`, or `["*"]` is not filtered: it returns everything in scope, including sources restricted to other people. +- Derive `acl` from your authenticated session, never from client input. See [Access control](#access-control). +- Do not turn on a connector's `enforce_acl` for an application that serves many users through one API key. With `enforce_acl` on, HydraDB ignores the request's `acl` for that connector's content and uses the email of whoever created the API key, so every user sees what the key's creator may see. Leave it off and send `acl` yourself. +- Under `enforce_acl`, the identity comes from authentication: an API key or pasted-key MCP uses the key creator's email, and MCP OAuth and the dashboard use the signed-in user. A request `acl` still scopes content from non-enforced connectors. +- If you send `acl` and an enforced connector ignores it, a successful response includes one `meta.warnings` entry with code `acl_ignored_by_connector_enforcement`. Treat it as a signal that your `acl` did not apply to that content. + +### Sending feedback + +`POST /feedback` (`client.feedback.submit()`) records how a query performed. It is optional, and there is no penalty for skipping it. You are the only party that knows whether the retrieved context answered the question, and that judgement is what tunes retrieval. + +Send it when you have something specific to report: + +- **A query did not give you what you needed:** nothing relevant came back, the top result was wrong, or you had to fall back to another source. One report on a query that disappointed you is worth far more than a stream of routine ones. +- **A query worked well:** `rating: "positive"` tells us what to preserve. +- **The task is finished (recommended):** send one short report on how the context performed. See [End-of-task report](#end-of-task-report). + +Rules: + +- **Take `request_id` from the query's own response. Never invent one.** It is in `meta.request_id` and in the `X-Request-ID` response header. Send it back **verbatim**: an ID you made up, or one from another query, correlates to nothing. +- Set `source: "agent"`. It separates your reports from human ones, which fail in different ways. +- Say **what** was wrong, not that something was wrong. "Returned the 2023 policy, current one is in the Q3 handbook" is actionable; "bad results" is not. +- Do not block the user on it. Feedback is fire-and-forget: if the **feedback call itself** fails, drop it and carry on. Never retry in a loop, and never surface that error to the user. +- Catch broadly, so that **nothing** escapes. Narrowing to the SDK error type would still let a timeout or a DNS failure surface an error the user cannot act on, from a call they did not ask for. +- Feedback never changes the query's result. It is a signal, not a correction, and you cannot read it back. +- Each submission is its own record. A second report about the same query adds to the first instead of replacing it, so refine as you learn more. + +```python +result = client.query(database="acme_corp", query="What is our refund policy?") + +# ... use result.data.chunks to answer the user ... + +try: + client.feedback.submit( + request_id=result.meta.request_id, + feedback="Top chunk was the 2023 policy; the current one is in the Q3 handbook.", + rating="negative", + source="agent", + database="acme_corp", + ) +except Exception: + pass # fire-and-forget: a failed report must never reach the user +``` + +#### End-of-task report + +At the end of the task you know what you could not know at query time: whether a chunk that looked plausible turned out to be stale, contradicted by another source, or never used at all. A single report then is worth more than one per query, and `rating: "positive"` is as valuable as a negative one, because you know which part of the context did the work. + +Make the report stand on its own. We see only a `request_id` and the prose you send, nothing about what you were doing. Worth a sentence each: + +- What the user was trying to do. +- Which chunks carried the answer, and which you discarded and why. +- Whether you had to go outside HydraDB to finish, and what was missing when you did. + +```python +try: + client.feedback.submit( + request_id=result.meta.request_id, # from the query you are reporting on + source="agent", + rating="positive", + feedback=( + "Task: user asked which refund window applies to EU orders. " + "Chunks 1 and 3 (Q3 handbook) carried the answer. Chunk 2 was the " + "2023 policy and was discarded as superseded. No outside sources needed." + ), + database="acme_corp", + ) +except Exception: + pass # fire-and-forget, exactly as above +``` + +#### Ground truth + +**If you know the right answer, send it as `ground_truth`.** When you run against a labelled set, or you know which source should have been returned, that is a far stronger signal than a comment, because it can be scored without a human reading it. With `ground_truth` present, `feedback` prose is optional: + +```python +try: + client.feedback.submit( + request_id=result.meta.request_id, + source="agent", + ground_truth={ + "answer": expected_answer, # what a correct response looks like + "source_ids": ["policy_2024"], # sources that actually contain it + }, + ) +except Exception: + pass +``` + +Send `answer`, `source_ids`, or both. Do **not** guess: only send ground truth you have. A fabricated answer key is worse than none, because it is scored as if it were true. + +#### Failed requests are not feedback + +**"Did not give me what I needed" is not the same as "errored".** A query that returned `200` with unhelpful results is what this endpoint is for. A query that never returned (`4xx`/`5xx`, or the SDK raised) is not: a failed request has no retrieval result to judge. Fix the request instead: a `404` means the database name is wrong, a `429` means back off, a `400` means the body was malformed. + +#### Request fields and limits + +| Field | Required | Notes | +|---|---|---| +| `request_id` | yes | The UUID from that query's `meta.request_id`, verbatim | +| `feedback` | yes* | What was right or wrong, up to 8000 chars. *Optional if `ground_truth` is sent | +| `rating` | no | `positive`, `negative`, `neutral`. Omitting it is not the same as `neutral` | +| `source` | no | `user` (default) or `agent`. Agents set `"agent"` | +| `database` / `collection` | no | Optional scoping; `collection` requires `database` | +| `ground_truth` | no | `{ answer, source_ids }`: what the right answer was, when you know it. Makes `feedback` optional | +| `metadata` | no | Up to 20 string pairs of your own context (agent name, conversation id) | + +Limit: 100 submissions per minute per organization, far above what reporting only the queries that fell short reaches. If you do hit `429`, honour `Retry-After` or skip that report. Never spin. + +--- + +## 2. Core primitives + +### Databases and collections + +Scoping rules are in [Do not mix scopes accidentally](#do-not-mix-scopes-accidentally). Recommended patterns: + +| Use case | Pattern | +|---|---| +| Company brain | one `database`, one collection for all documents and connectors; isolate with `metadata_filters` and `acl` | +| B2B SaaS | one `database` per customer; one collection for that customer's knowledge; isolate teams with `metadata_filters` and `acl` | +| B2C app | one `database`; shared knowledge in one collection; `collection = user_id` for each user's memories | +| Environment isolation | separate `database`s for prod/staging | +| User memories | `collection = user_id`, and the same collection on every read | + +### Knowledge + +Knowledge is the documents and facts your AI reasons over: PDFs, Markdown, and CSVs you upload, plus Slack threads, Notion pages, Gmail threads, tickets, and other content that [connectors](#connectors) sync from your apps. Ingest and query it with `type: "knowledge"`. + +- It can be private: restrict sources with `acl` (see [Access control](#access-control)). +- Mutability is explicit: re-ingest with the same ID and `upsert: true`, edit metadata in place with `PATCH /context/{id}/metadata`, or delete. + +### Memories + +Memories are preferences, decisions, past conversations, behavioral signals, and inferred traits. Ingest them with `type: "memory"` into the collection you will query them from, and query with `type: "memory"` or `type: "all"`. Item fields, including `infer`, are in [6. Source ingestion](#6-source-ingestion). + +### Query + +`POST /query` is the single retrieval endpoint for knowledge, memories, or both. Fields, recommended configurations, and the response shape are in [8. Query API](#8-query-api). + +### Context graph + +HydraDB builds a graph of entity/relation triplets from ingested content. When `graph_context: true` (default), a query can return: + +- `graph_context.query_paths` +- `graph_context.chunk_relations` +- `graph_context.chunk_id_to_group_ids` + +Graph context augments the result; it does not replace `chunks`. + +### Explicit relations + +Explicit relations are links you declare between sources at ingest: + +```json +{ + "relations": { + "ids": ["related-item-1", "related-item-2"], + "properties": { "reason": "same thread" } + } +} +``` + +- Use `ids`. +- Declare `relations` on `document_metadata[]` items. They link knowledge sources; memory items do not take `relations`. +- A query pulls the related chunks into `data.additional_graph_context` only in `mode: "thinking"` with `query_explicit_relations: true` (the default). The legacy response alias `data.additional_context` contains the same map. + +### Access control + +A source's `acl` lists who may retrieve it; a query's `acl` says who is asking. The query-side rule is in [Send `acl` on user queries](#send-acl-on-user-queries). + +- Set `acl` on any existing source with `PATCH /context/{id}/metadata`, where it replaces the stored list. +- Connectors copy permissions from Slack, Google Drive, GitHub, Confluence, Jira, and other providers on every sync. +- Principals: an email (`grace@acme.com`), `domain:acme.com`, `group::`, or `__public__`. +- On a query, the caller's email also matches its `domain:` principal and `__public__` automatically. Group membership is never derived from an email; send `group:` principals yourself. +- A source with no `acl` is unrestricted. + +Example: a source with `"acl": ["grace@acme.com"]` comes back for a query with `"acl": ["grace@acme.com"]` and stays hidden from `"acl": ["bob@acme.com"]`. A source with `"acl": ["domain:acme.com"]` comes back for both. + +### Connectors + +Connectors sync context from 70+ apps, including Slack, Gmail, Google Drive, Notion, Jira, Confluence, GitHub, Linear, HubSpot, and Zendesk, into a database on a schedule, with no ingestion code. Indexing is permission-aware: for providers with `acl_supported: true`, each synced source carries the provider's own access rules. App content reaches HydraDB through connectors; `GET /connectors/providers` lists the catalog. + +Setup is four calls, made once: + +1. `GET /connectors/providers?id={provider}`: read `credential_schema`, the credentials it needs. +2. `POST /connectors`: store the credentials, with `database` and `collection`. +3. `GET /connectors/{id}/discover`: list the channels, repositories, or pages the credentials reach. +4. `POST /connectors/{id}/configure`: choose resources; the first sync starts right away. + +Then poll `GET /connectors/{id}/status` until `lifecycle` is `active`, and query as usual. Syncs repeat every `sync_interval_seconds` (one hour by default). + +```python +connector = client.connectors.create( + provider="slack", + database="acme_corp", + collection="company_docs", + provider_account_scope="T12345ACME", + credentials={"access_token": "xoxp-..."}, +) +found = client.connectors.discover(connector.connector_id) +client.connectors.configure( + connector.connector_id, + resources=[ + {"resource_id": r.id, "resource_type": r.resource_type, "name": r.name} + for r in found.resources + ], +) +status = client.connectors.status(connector.connector_id) +``` + +```ts +const connector = await client.connectors.create({ + provider: "slack", + database: "acme_corp", + collection: "company_docs", + providerAccountScope: "T12345ACME", + credentials: { access_token: "xoxp-..." }, +}); +const id = connector.connectorId!; +const found = await client.connectors.discover({ id }); +await client.connectors.configure({ + id, + resources: (found.resources ?? []).map((r) => ({ + resourceId: r.id!, + resourceType: r.resourceType, + name: r.name, + })), +}); +const status = await client.connectors.status({ id }); +``` + +Rules: + +- To change one resource, use `PATCH /connectors/{id}/resources/{resource_id}`. `POST /connectors/{id}/resources` adds new resources only: on an existing resource it returns `409` and changes nothing. +- Every synced source carries `connector_id` and `provider` in `metadata`, and `connector_id` and `resource_id` in `additional_metadata`; filter on them to scope a query. +- `custom_instructions` on the connector or one resource tells HydraDB how to read its documents, from the next sync on. + +### Bring Your Own Graph (BYOG) + +To build and query your own graph in Cypher, for example when migrating from Neo4j or another Cypher-compatible store, use the `/byog` endpoints instead of `/context/ingest`: + +| Endpoint | Purpose | +| --- | --- | +| `POST /byog/databases` | Create a database; ready immediately. Returns `409` if the name exists | +| `POST /byog/query` | Run Cypher against one `collection`, with user data in `params` | +| `GET /byog/collections` | List a database's graph collections | +| `DELETE /byog/collections` | Drop one collection | +| `DELETE /byog/databases` | Drop a database | + +- Each collection is an isolated graph, created on first write. Reading one that does not exist yet returns zero rows. +- Pass user data through `params`, never by building it into the query string. +- Procedure calls (`CALL db.*`, `CALL apoc.*`) and `LOAD CSV` are not supported. +- Limits: 256 KiB request body (`413`), 8 s for reads and 30 s for writes (`400` on timeout). Rows beyond the result-set cap are silently dropped, so paginate large reads. +- Agents can run the same Cypher through the HydraDB MCP graph tools: `hydradb_graph_query`, `hydradb_graph_collections`, and `hydradb_graph_admin`. + +Full guide: `https://docs.hydradb.com/essentials/v2/bring-your-own-graph`. + +--- + +## 3. Installation and client setup + +### Python SDK + +```bash +pip install "hydradb-sdk>=2,<3" +``` + +```python +import os +from hydra_db import HydraDB + +client = HydraDB(token=os.environ["HYDRADB_API_KEY"]) +``` + +Async client: + +```python +import os +from hydra_db import AsyncHydraDB + +client = AsyncHydraDB(token=os.environ["HYDRADB_API_KEY"]) +``` + +### TypeScript SDK + +```bash +npm install @hydradb/sdk@^2 +``` + +```ts +import { HydraDBClient } from "@hydradb/sdk"; + +const client = new HydraDBClient({ + token: process.env.HYDRADB_API_KEY, +}); +``` + +SDK naming: + +- Python methods and fields are snake_case: `databases.get_metadata_schema()`, `page_size`, `query_by`. +- TypeScript methods and fields are camelCase: `databases.getMetadataSchema()`, `pageSize`, `queryBy`. +- Values passed as JSON strings (`memories`, `document_metadata`) keep snake_case keys inside the stringified payload in both SDKs, because that is raw wire data. + +--- + +## 4. Minimal end-to-end flow + +### Python + +```python +import json +import os +import time +from hydra_db import HydraDB + +client = HydraDB(token=os.environ["HYDRADB_API_KEY"]) +database = "my_first_database" + +# 1. Create database. +client.databases.create(database=database) + +# 2. Wait until the database can accept data. +while True: + status = client.databases.status(database=database) + if status.data.infra.ready_for_ingestion: + break + time.sleep(5) + +# 3. Ingest a user memory. +ingest = client.context.ingest( + type="memory", + database=database, + collection="user_alex", + memories=json.dumps([ + { + "id": "user_alex_pref_001", + "text": "User prefers detailed technical explanations and dark mode.", + "infer": True, + "user_name": "Alex", + } + ]), +) + +ingest_id = ingest.data.results[0].id + +# 4. Wait until searchable. +while True: + status = client.context.status( + database=database, + collection="user_alex", + ids=[ingest_id], + ).data.statuses[0] + + if status.indexing_status == "completed": + break + if status.indexing_status == "errored": + # A wrong database/collection reports "errored" too, with FILE_NOT_FOUND. + # error_message is "" in that case, so branch on the code, not the text. + if status.error_code == "FILE_NOT_FOUND": + raise RuntimeError("No such id in this scope: check database/collection match ingestion") + raise RuntimeError(status.error_message or status.message or "Indexing failed") + time.sleep(2) + +# 5. Search memories. +result = client.query( + database=database, + collection="user_alex", + query="What does the user prefer?", + type="memory", + query_by="hybrid", + mode="thinking", +) + +print(result.data.chunks) +``` + +### TypeScript + +```ts +import { HydraDBClient } from "@hydradb/sdk"; + +const client = new HydraDBClient({ + token: process.env.HYDRADB_API_KEY, +}); + +const database = "my_first_database"; + +await client.databases.create({ database: database }); + +while (true) { + const status = await client.databases.status({ database: database }); + if (status.data?.infra?.readyForIngestion) break; + await new Promise((resolve) => setTimeout(resolve, 5_000)); +} + +const ingest = await client.context.ingest({ + type: "memory", + database: database, + collection: "user_alex", + memories: JSON.stringify([ + { + id: "user_alex_pref_001", + text: "User prefers detailed technical explanations and dark mode.", + infer: true, + user_name: "Alex", + }, + ]), +}); + +const ingestId = ingest.data?.results?.[0]?.id; +if (!ingestId) throw new Error("Ingest returned no id"); + +while (true) { + const status = (await client.context.status({ + database: database, + collection: "user_alex", + ids: [ingestId], + })).data?.statuses?.[0]; + if (!status) throw new Error("No status returned"); + + if (status.indexingStatus === "completed") break; + if (status.indexingStatus === "errored") { + // || rather than ??: errorMessage is "" (not null) on some failures, and ?? + // would pass the empty string through and throw an error with no message. + throw new Error(status.errorMessage || status.message || "Indexing failed"); + } + + await new Promise((resolve) => setTimeout(resolve, 2_000)); +} + +const result = await client.query({ + database: database, + collection: "user_alex", + query: "What does the user prefer?", + type: "memory", + queryBy: "hybrid", + mode: "thinking", +}); + +if (!result.data || typeof result.data === "string") throw new Error("Expected structured query results"); +console.log(result.data.chunks); +``` + +--- + +## 5. Databases API + +### Create database + +`POST /databases` · `client.databases.create()` + +```json +{ + "database": "acme_corp", + "database_metadata_schema": [ + { + "name": "department", + "data_type": "VARCHAR", + "enable_dense_embedding": false, + "enable_sparse_embedding": false, + "max_length": 1024 + } + ] +} +``` + +Notes: + +- `database` should be stable. Use lowercase letters, numbers, and underscores for portability. +- Plan `database_metadata_schema` before ingestion. What you can change later is in [10. Metadata guide](#10-metadata-guide). +- `POST /databases` may return `409 DATABASE_ALREADY_EXISTS` for duplicate database IDs and `403 FORBIDDEN` when the API key or plan cannot create more databases. + +### Check readiness + +`GET /databases/status?database=...` · `client.databases.status()` + +The database is ready when `infra.ready_for_ingestion` is true. The response also carries the underlying signals: + +- `infra.scheduler_status` +- `infra.graph_status` +- `infra.vectorstore_status.knowledge` +- `infra.vectorstore_status.memories` + +### Other database endpoints + +The collections, stats, and delete routes also take `database` as a query parameter, for example `GET /databases/collections?database=...`. `DELETE /databases?database=...` deletes the database and all its data. The full list is in [15. SDK method reference](#15-sdk-method-reference). + +--- + +## 6. Source ingestion + +`POST /context/ingest` is the single write endpoint for knowledge and memories. It takes multipart form data. + +### Common form fields + +| Field | Description | +|---|---| +| `type` | `"knowledge"` or `"memory"`; default is `"knowledge"` | +| `database` | target database | +| `collection` | optional; the default collection if omitted | +| `upsert` | default `true`; replaces existing sources with the same ID | +| `documents` | binary file uploads for knowledge | +| `document_metadata` | JSON-stringified array, one item per uploaded file; see [Knowledge from files](#knowledge-from-files) | +| `memories` | JSON-stringified array of memory items | + +### Knowledge from files + +Use for files HydraDB should parse. Supported extensions: + +| Type | Extensions | +|---|---| +| Documents | `.pdf` `.doc` `.docx` `.docm` `.dot` `.dotx` `.odt` `.ott` `.rtf` | +| Spreadsheets | `.xls` `.xlsx` `.xlsm` `.xlsb` `.ods` `.ots` `.csv` `.tsv` | +| Presentations | `.ppt` `.pptx` `.pptm` `.odp` `.otp` | +| Apple iWork | `.pages` `.numbers` `.key` | +| Images (text is read with OCR) | `.png` `.jpg` `.jpeg` `.tif` `.tiff` `.webp` `.gif` `.bmp` | +| Plain text | `.txt` `.md` `.markdown` `.json` | + +- Any other extension, including source code (`.py`, `.ts`, `.go`), `.html`, and `.zip`, is rejected. The request still returns `202`; the rejected file comes back in `data.results` with `status: "failed"` and `error_code: "E1002"`, and has no status record to poll. Check every result item before polling. +- To ingest source code, upload it with `.txt` added to the filename (`auth.py.txt`) and keep the real path in `additional_metadata`. +- The `Content-Type` of the part is used only when the filename has no extension. + +```python +import json + +with open("policy.pdf", "rb") as f: + result = client.context.ingest( + type="knowledge", + database="acme_corp", + documents=[("policy.pdf", f, "application/pdf")], + document_metadata=json.dumps([ + { + "id": "policy_v2", + "metadata": {"department": "support", "status": "approved"}, + "additional_metadata": {"author": "Alice", "version": 2}, + } + ]), + ) +``` + +`document_metadata` is how you attach anything to an uploaded file. Send one item per file, in the same order as `documents`. The item count must match the file count, and an unrecognized key returns `400`. + +| `document_metadata` item field | Purpose | +|---|---| +| `id` | stable source ID / upsert key for the uploaded file; HydraDB assigns one if omitted | +| `metadata` | schema-aligned fields for this file (max 16 KiB compact JSON) | +| `additional_metadata` | free-form fields for this file (max 1 KiB compact JSON) | +| `relations` | relations you declare to other sources, e.g. `{ "ids": [...] }` | + +### Memories + +Use `type="memory"` and a JSON-stringified `memories` array. + +```python +import json + +client.context.ingest( + type="memory", + database="acme_corp", + collection="user_alex", + memories=json.dumps([ + { + "id": "pref_dark_mode", + "title": "Dark mode preference", + "text": "User prefers dark mode and concise answers.", + "infer": True, + "user_name": "Alex", + "metadata": {"team": "engineering"}, + "additional_metadata": {"source": "onboarding"} + } + ]), +) +``` + +Memory item fields: + +| Field | Description | +|---|---| +| `id` | optional stable upsert key | +| `title` | label for listing and result display | +| `text` | raw text or Markdown; required unless `user_assistant_pairs` provided | +| `user_assistant_pairs` | dialogue pairs `{ user, assistant }`; useful for implied preferences | +| `is_markdown` | preserve Markdown structure during chunking | +| `infer` | defaults to `true` when omitted: HydraDB extracts the durable preference or fact. Explicit `false` stores the memory verbatim | +| `user_name` | helps inference | +| `metadata` | schema-aligned fields, as an object (do not stringify it again inside `memories`). `tenant_metadata` is not read on memory items. | +| `additional_metadata` | free-form fields; keep as objects | + +--- + +## 7. Context status and lifecycle + +### Poll indexing + +`GET /context/status` · `client.context.status()` + +Parameters: + +- `database`: required. +- `ids`: required array. +- `collection`: **required if you ingested into one.** The lookup is scoped: omitting `collection`, or sending the wrong one, returns `indexing_status: "errored"` with `error_code: "FILE_NOT_FOUND"` and `message: "ID not found"` for a source that exists and is fully searchable. That is a scope miss, not an indexing failure, and you can tell the two apart only by reading `error_code`. + +| Status | Searchable? | Meaning | +|---|---:|---| +| `queued` | No | accepted, not picked up | +| `processing` | No | parsing/chunking/embedding | +| `graph_creation` | Within seconds | chunks are being indexed and the graph is still building; a query sent immediately can miss the source, and a new collection can still be reported as not existing | +| `completed` | Yes | fully indexed and graphed | +| `errored` | No | terminal failure; read `error_code` and `error_message` | + +A failure is always `errored`. `failed` is not an indexing status: it appears only as an item's `status` in the ingest response, for an item refused before indexing started. Its status record, if any, is not about that request: an unsupported file (`E1002`) has none, and an existing ID sent with `upsert` set to `false` (`E9003`) keeps the record of its earlier upload. + +`error_message` is `""`, not null, on some failures (including a scope miss), so branch on `error_code`, and in TypeScript fall back with `||`, not `??`. + +```ts +while (true) { + const status = (await client.context.status({ + database: "acme_corp", + collection: "support_docs", // must match the ingestion scope, or you get FILE_NOT_FOUND + ids: ["policy_v2"], + })).data?.statuses?.[0]; + if (!status) throw new Error("No status returned"); + + if (status.indexingStatus === "completed") break; + if (status.indexingStatus === "errored") { + // A scope miss reports errored too, so name the cause rather than guessing. + if (status.errorCode === "FILE_NOT_FOUND") { + throw new Error(`No such id in this scope: check database/collection match ingestion`); + } + // Use ||, not ??: errorMessage comes back as "" (not null) on some failures, + // and ?? passes an empty string straight through to an empty error. + throw new Error(status.errorMessage || status.message || "Indexing failed"); + } + await new Promise((r) => setTimeout(r, 2_000)); +} +``` + +### Webhooks instead of polling + +Register a webhook on `/webhooks/indexing` to receive terminal indexing events instead of polling. The management endpoints and SDK methods are in [15. SDK method reference](#15-sdk-method-reference). + +Supported event: `indexing.status_changed`. Payload shape: + +```json +{ + "event": "indexing.status_changed", + "delivery_id": "", + "id": "", + "database": "", + "collection": "", + "status": "completed", + "timestamp": "", + "error_code": null, + "error_message": null +} +``` + +Headers: `X-HydraDB-Delivery-ID`, `X-HydraDB-Event`, and `X-HydraDB-Signature` when a signing secret is configured. + +Signature scheme: + +```text +X-HydraDB-Signature: sha256= + +digest = HMAC-SHA256(key = signing_secret, message = raw request body bytes) +``` + +The `sha256=` prefix is part of the header value. The digest is lowercase hex, not base64. The HMAC covers the raw body bytes as received; re-serialising the parsed JSON produces different bytes and will not match. + +Managing the secret: + +- `POST /webhooks/indexing` with `{"generate_signing_secret": true}` registers and enables signing in one call, returning the secret once. Mutually exclusive with `signing_secret`; sending both is a `422`. +- `POST /webhooks/indexing/signing-secret` with no body generates one and returns the secret once. Send `{"signing_secret": "..."}` to supply your own (minimum 16 characters). +- `DELETE /webhooks/indexing/signing-secret` disables signing. +- Omitting `signing_secret` on `POST /webhooks/indexing` preserves the existing secret. It does not disable signing. + +Rules: + +- The webhook URL must be public HTTPS; localhost and private networks are blocked. +- Store `delivery_id` to deduplicate retries. +- Verify `X-HydraDB-Signature` with a constant-time comparison. Use `verify_webhook_signature` (Python SDK) or `verifyWebhookSignature` (TypeScript SDK) from the SDK helpers module. +- Fail closed: reject the request when the signing secret is absent from the environment, instead of skipping verification. + +--- + +## 8. Query API + +`POST /query` · `client.query()` + +### Request fields that matter + +| Field | Values | Notes | +|---|---|---| +| `database` | string | required | +| `collection` | string/null | the collection the context was saved in; default collection if omitted | +| `collections` | list of collection IDs, or an object of weights | query up to 100 collections at once; every listed collection must exist. Send weights, such as `{"user_alex": 2, "company_docs": 1}`, to rank one collection over another | +| `query` | string | required | +| `type` | `knowledge`, `memory`, `all` | defaults to `all`, searching knowledge and memories; choose a type to narrow it | +| `acl` | list of principals | who is asking; see [Send `acl` on user queries](#send-acl-on-user-queries) | +| `query_by` | `hybrid`, `text` | default `hybrid` (semantic + BM25); `text` is BM25 keyword/phrase search | +| `operator` | `or`, `and`, `phrase` | only for `query_by: "text"` | +| `mode` | `fast`, `thinking`, `auto` | applies to hybrid; omitted means `auto`, which picks fast or thinking per query (thinking when unsure). `fast` is low latency. `thinking` adds query expansion, reranking, richer graph traversal, and explicit-relation expansion; it improves quality but adds latency | +| `max_results` | integer/null | default 10; max 250 | +| `alpha` | `0.0` to `1.0`, or `auto` | hybrid weight; `1.0` semantic, `0.0` BM25 | +| `recency_bias` | `0.0` to `1.0` | boost newer content; omitted means `0.6`, send `0` to disable | +| `graph_context` | boolean | default true; include graph slice; `false` only takes effect in fast mode, thinking always includes it | +| `query_explicit_relations` | boolean | default true; returns explicitly related chunks in `data.additional_graph_context`; only effective in `thinking` mode | +| `additional_graph_context` | string | short factual hint that sharpens retrieval; not a hard filter | +| `metadata_filters` | object | deterministic filters before/around ranking | +| `query_apps` | boolean | app-aware retrieval lane for content synced by connectors; still searches the full selected knowledge scope; defaults to `true` on `/query`, send `false` to disable | + +`type: "all"` reads both stores from the same scope. When shared knowledge lives in its own collection, send `collections: ["", ""]`. + +### Recommended configurations + +| Goal | Request shape | +|---|---| +| Fast document RAG | `type: "knowledge"`, `query_by: "hybrid"`, `mode: "fast"`, `graph_context: false`, `max_results: 5-10` | +| Highest-quality document RAG | `type: "knowledge"`, `query_by: "hybrid"`, `mode: "thinking"`, `graph_context: true`, `alpha: "auto"` | +| Personalized grounded answer | `type: "all"`, `collections` listing the shared collection and the user's, `query_by: "hybrid"`, `mode: "thinking"` | +| User preferences only | `type: "memory"`, include `collection`, `query_by: "hybrid"` | +| Exact keyword / phrase | `type: "knowledge"`, `query_by: "text"`, `operator: "phrase"` | +| Recent operational updates | `query_by: "hybrid"`, `recency_bias: 0.6-0.8`, metadata filter to doc type/status | +| App search | `type: "knowledge"`, `query_by: "hybrid"`, `mode: "thinking"`, `query_apps: true`; still searches uploaded files too | + +### Query examples + +Knowledge RAG: + +```ts +const result = await client.query({ + database: "acme_corp", + query: "What is our refund policy?", + type: "knowledge", + queryBy: "hybrid", + mode: "thinking", + maxResults: 10, + graphContext: true, +}); +``` + +Personalized answer using knowledge and memories: + +```ts +const result = await client.query({ + database: "acme_corp", + collections: ["company_docs", "user_alex"], // shared knowledge and this user's memories + query: "What is our refund policy, and how should I explain it to this user?", + type: "all", + queryBy: "hybrid", + mode: "thinking", + alpha: "auto", +}); +``` + +Exact phrase: + +```python +result = client.query( + database="acme_corp", + query="ERROR_429 rate limit", + type="knowledge", + query_by="text", + operator="phrase", +) +``` + +Metadata-scoped query: + +```json +{ + "database": "acme_corp", + "query": "authentication control review", + "type": "knowledge", + "query_by": "hybrid", + "metadata_filters": { + "compliance_framework": { "equals": "SOC2" }, + "additional_metadata": { + "author": "alice" + } + } +} +``` + +### Query response + +The successful `data` object / SDK return is a `RetrievalResult`: + +```json +{ + "chunks": [ + { + "chunk_uuid": "...", + "id": "...", + "chunk_content": "...", + "source_title": "...", + "source_type": "...", + "source_upload_time": "...", + "source_last_updated_time": "...", + "relevancy_score": 0.91, + "metadata": {}, + "additional_metadata": {}, + "extra_context_ids": [] + } + ], + "graph_context": { + "query_paths": [], + "chunk_relations": [], + "chunk_id_to_group_ids": {} + }, + "additional_graph_context": {}, + "llm_prompt": "..." +} +``` + +Each chunk's `id` is the ID of the source it came from, and `source_title` is that source's title: cite with these. The public result has no `sources` array. + +`llm_prompt` is the result rendered as Markdown for a model, with the ranked results numbered `[1]`, `[2]`, and so on. + +Use `chunks` as the primary LLM context. Preserve server order, which is the ranking; do not re-sort unless you have a deliberate reranking step. + +--- + +## 9. Turning query results into LLM prompts + +- Do not pass raw result JSON to the LLM if token budget matters. Use the SDK formatting helper to produce a compact context string: `build_string(result)` from `hydra_db.helpers` (Python) or `buildString(result)` from `@hydradb/sdk/helpers` (TypeScript). Both return `data.llm_prompt`, which numbers the ranked results `[1]`, `[2]`, and so on; ask the model to cite by those numbers. +- Include a grounding instruction: answer only from the provided context, and say when the context is insufficient. +- Start with `max_results: 10`; reduce it for tight context windows. +- Use graph context only when it helps the question. +- Use `data.additional_graph_context` to attach explicitly related chunks by `chunk_uuid` / `extra_context_ids`. It is a response map, separate from the request's `additional_graph_context` string hint. The legacy `data.additional_context` response alias contains the same map. +- For personalized answers, `type: "all"` is simplest: one result set already merges knowledge and memories. + +Python: + +```python +import os +from hydra_db import HydraDB +from hydra_db.helpers import build_string +from openai import OpenAI + +hydra = HydraDB(token=os.environ["HYDRADB_API_KEY"]) +openai = OpenAI(api_key=os.environ["OPENAI_API_KEY"]) + +question = "How does authentication work?" + +result = hydra.query( + database="your-database", + collection="your-collection", + query=question, + type="knowledge", + query_by="hybrid", + max_results=5, +) + +context = build_string(result) + +messages = [ + { + "role": "system", + "content": "Answer using only the provided HydraDB context. If the answer is not in the context, say so. Cite source titles.", + }, + { + "role": "user", + "content": f"{context}\n\nQuestion: {question}", + }, +] +``` + +TypeScript: + +```ts +import { HydraDBClient } from "@hydradb/sdk"; +import { buildString } from "@hydradb/sdk/helpers"; +import OpenAI from "openai"; + +const hydra = new HydraDBClient({ token: process.env.HYDRADB_API_KEY }); +const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY }); + +const question = "How does authentication work?"; + +const result = await hydra.query({ + database: "your-database", + collection: "your-collection", + query: question, + type: "knowledge", + queryBy: "hybrid", + maxResults: 5, +}); + +const context = buildString(result); + +const messages = [ + { + role: "system", + content: "Answer using only the provided HydraDB context. If the answer is not in the context, say so. Cite source titles.", + }, + { + role: "user", + content: `${context}\n\nQuestion: ${question}`, + }, +]; +``` + +--- + +## 10. Metadata guide + +### Metadata schema + +Declared at `POST /databases`: + +```json +{ + "database_metadata_schema": [ + { + "name": "department", + "data_type": "VARCHAR", + "enable_dense_embedding": false, + "enable_sparse_embedding": false, + "max_length": 1024 + } + ] +} +``` + +Field options: + +| Field | Purpose | +|---|---| +| `name` | metadata key; must be valid and non-reserved | +| `data_type` | friendly names like `string`, `integer`, `float`, `boolean`, or backend types like `VARCHAR`, `INT*`, `JSON` | +| `enable_dense_embedding` | semantically embed `VARCHAR` field | +| `enable_sparse_embedding` | BM25 index `VARCHAR` field | +| `max_length` | max string length; default `1024`, maximum `65535`, and it cannot be raised after the field is created | + +Schema limits: + +- Up to 32 fields and 6 embedding flags per database. Embedding flags are valid only on `VARCHAR` fields. +- Field names are unique, case-insensitively. +- `ARRAY` is not a supported `data_type` and is rejected with `400`. For a multi-value field, store the values as one comma-joined `VARCHAR` and filter for a member with `contains`. +- Values must match their declared type, and undeclared `metadata` keys are rejected on ingest. + +### Where metadata belongs + +| Need | Put it in | Filter with | +|---|---|---| +| Hot-path exact filters: department, region, environment, status | `metadata` | top-level `metadata_filters` | +| Free-form display/bookkeeping: author, provider IDs, version | `additional_metadata` | `metadata_filters.additional_metadata` | +| Provider app fields for UI/citations | `additional_metadata` or app `fields` | usually not filtered unless needed | +| User/workspace partition | `collection` | not metadata | + +Rules: + +- Plan hot filter fields before the first ingest. `PATCH /databases/{database}/metadata-schema` can add fields later, but cannot rename, retype, or reflag existing ones, and rejects `enable_dense_embedding` / `enable_sparse_embedding` (declare those at database creation). Changing an existing field definition requires a new database and re-ingestion. +- Top-level `metadata_filters` keys must be declared in the metadata schema. They support `equals`, `contains`, and `contains_any`. Range and fuzzy matching belong in the query or a downstream reranker. +- Inside `metadata_filters.additional_metadata`, use bare values or arrays, not operators. An operator there, or a misspelled operator anywhere, does not error: it returns `200` with no results. +- To change metadata on an indexed source, call `PATCH /context/{id}/metadata` (merges keys), or re-ingest with the same `id` and `upsert: true`. +- Do not rename metadata keys without re-ingesting the affected sources. + +--- + +## 11. Browse, fetch, relations, delete + +### List sources + +`POST /context/list` · `client.context.list()` + +```ts +const sources = await client.context.list({ + database: "acme_corp", + type: "knowledge", + page: 1, + pageSize: 50, + filters: { + metadata: { department: "support" }, + additionalMetadata: { author: "alice" }, + sourceFields: { appProvider: "slack" }, + }, +}); +``` + +Parameters: `database`, `collection`, `type: "knowledge" | "memory" | "all"`, `ids`, `page`, `page_size` (1 to 100), `filters.metadata`, `filters.additional_metadata`, `filters.source_fields`, and `include_fields` for projection. + +### Fetch original content + +`GET /context/inspect` · `client.context.inspect()` + +```python +file = client.context.inspect( + database="acme_corp", + id="policy_v2", + mode="both", + expiry_seconds=3600, +) +``` + +| Mode | Returns | +|---|---| +| `content` | parsed text or base64 for binary files | +| `url` | presigned URL | +| `both` | content plus presigned URL | + +### Inspect graph relations + +`GET /context/relations` · `client.context.relations()` + +```ts +const relations = await client.context.relations({ + database: "acme_corp", + id: "policy_v2", + type: "knowledge", + limit: 5000, +}); +``` + +Use it for graph debugging and provenance inspection. It paginates with `cursor`. + +### Delete sources + +`DELETE /context` · `client.context.delete()` + +```ts +await client.context.delete({ + type: "knowledge", + database: "acme_corp", + ids: ["policy_v2"], +}); +``` + +Use `type: "memory"` to delete memory IDs. + +--- + +## 12. Error handling + +### HTTP status codes + +| Code | Meaning | Retry? | +|---|---|---| +| `400` | invalid parameters / malformed request | No | +| `401` | missing/invalid API key | No | +| `403` | authenticated but not permitted | No | +| `404` | database or source not found | No | +| `409` | conflict, e.g. existing database or source ID | Usually no | +| `413` | upload too large | No | +| `422` | semantic validation failure, including `TENANT_INFRA_NOT_READY` | Only for `TENANT_INFRA_NOT_READY`, after polling readiness | +| `429` | rate limited | Yes with backoff | +| `500` | internal error | Yes with backoff | +| `502` | upstream dependency error (`BACKEND_ERROR`) | Yes with backoff | +| `503` | temporary unavailability | Yes with backoff | + +Retry only `429`, `500`, `502`, and `503`, with bounded exponential backoff and jitter. + +The SDKs already retry `408`, `429`, and `5xx` responses twice with exponential backoff before raising, and the Python SDK also retries `409`. Do not wrap SDK calls in a second retry loop: raise the count with `request_options={"max_retries": 5}` on a Python call, or `maxRetries` on the TypeScript client or call. + +### Common error codes + +| Code | Meaning | +|---|---| +| `INVALID_INPUT` | required, malformed, or conflicting parameter. This is the code for essentially every `400`. Branch on it, not on a generic name | +| `VALIDATION_ERROR` | request shape valid but failed validation | +| `UNAUTHORIZED` | missing/invalid API key | +| `FORBIDDEN` | key lacks access | +| `DATABASE_ALREADY_EXISTS` | duplicate database ID | +| `DATABASE_NOT_FOUND` | database missing/not visible | +| `TENANT_INFRA_NOT_READY` | `422`: the database exists but its infrastructure is still provisioning. This is what querying before polling readiness returns | +| `FILE_NOT_FOUND` | ID not found **in the selected scope**, usually a `collection` mismatch, not a missing source | +| `SOURCE_PROCESSING` | the source is still indexing and cannot serve this request yet | +| `NOT_FOUND` | requested resource does not exist | +| `PARSE_ERROR` | a document could not be parsed | +| `PROCESSING_FAILED` | indexing failed for a source | +| `RATE_LIMITED` | rate limit exceeded | +| `INTERNAL_ERROR` | unexpected server error | +| `BACKEND_ERROR` | `502`: an upstream dependency returned an error | +| `SERVICE_UNAVAILABLE` | dependency unavailable / under load | + +There is no `INVALID_PARAMETERS` and no `SOURCE_NOT_FOUND`: no HydraDB response carries either. Match on `INVALID_INPUT` and `FILE_NOT_FOUND`. + +SDK errors: + +```python +from hydra_db.core.api_error import ApiError + +RETRYABLE = (429, 500, 502, 503) + +try: + result = client.query( + database="acme_corp", + query="pricing tiers", + type="knowledge", + ) +except ApiError as exc: + # 500 and 503 have typed subclasses (InternalServerError, + # ServiceUnavailableError); 429 does not, so branch on status_code to cover + # all three uniformly. Back off and retry. + if exc.status_code not in RETRYABLE: + raise +``` + +```ts +import { HydraDBError } from "@hydradb/sdk"; + +try { + const result = await client.query({ + database: "acme_corp", + query: "pricing tiers", + type: "knowledge", + }); +} catch (error) { + if (error instanceof HydraDBError) { + const body = error.body as { + error?: { code?: string }; + meta?: { request_id?: string }; + } | undefined; + const code = body?.error?.code; + const requestId = body?.meta?.request_id; + console.error({ code, requestId }); + } + throw error; +} +``` + +--- + + + +## 13. Common integration patterns + +Most integrations follow the same architecture: + +1. Create a database with a metadata schema for hot filters. +2. Upload shared knowledge with stable IDs, and connect apps with connectors. +3. Ingest user and session memories with `collection`. +4. Poll status or use webhooks. +5. Query with `type: "knowledge"`, `"memory"`, or `"all"`. +6. Format chunks, graph paths, and additional context into an LLM prompt. +7. Cite sources and handle missing context explicitly. + +--- + +## 14. Common mistakes checklist + +Each item is a rule stated in full in the section named. Check all of them before you finish. + +Section 1, critical rules: + +- [ ] Forgetting `API-Version: 2` in raw HTTP calls. +- [ ] Reading a payload from the top level instead of `data`, in raw HTTP or in the SDKs. +- [ ] Writing with one `collection` and reading with another, or omitting `collection` for user memories. +- [ ] Splitting a company brain into many collections instead of one collection with `metadata_filters` and `acl`. +- [ ] Querying on behalf of a user without `acl`, which returns everything in scope. +- [ ] Turning on a connector's `enforce_acl` behind one shared API key, which runs every query as the key's creator. + +Sections 2 to 7, ingestion and lifecycle: + +- [ ] Uploading a file with an unsupported extension, such as source code, and polling an ID that was rejected with `E1002`. +- [ ] Writing your own ingestion for an app instead of using a connector. +- [ ] Editing an existing connector resource with `POST /connectors/{id}/resources`, which returns `409` and changes nothing. +- [ ] Querying right after database creation without polling readiness. +- [ ] Querying right after ingestion without polling `context.status` or using webhooks. +- [ ] Treating `processing` or `queued` context as searchable. +- [ ] Not handling `errored` as the failure status. +- [ ] Omitting `collection` on `context.status` and reading the resulting `FILE_NOT_FOUND` as a genuine indexing failure. +- [ ] Using `??` on `errorMessage`, which is `""`, not null, on some failures, so the fallback never fires. +- [ ] Forgetting to verify webhook signatures when a signing secret is configured. + +Sections 8 to 10, query and metadata: + +- [ ] Using undeclared `metadata` keys in `metadata_filters`. +- [ ] Using `operator` without `query_by: "text"`. +- [ ] Expecting `query_explicit_relations` to work in `mode: "fast"`. +- [ ] Putting operators inside `metadata_filters.additional_metadata`, or misspelling an operator, which silently returns no results. +- [ ] Setting `graph_context: false` and expecting graph fields. +- [ ] Reading `data.sources`, which the public result does not return; cite from each chunk's `id` and `source_title`. +- [ ] Re-sorting chunks before prompting without a deliberate reranker. +- [ ] Passing raw result JSON or too many chunks to the LLM. +- [ ] Putting hot filters in free-form metadata instead of the metadata schema. + +--- + +## 15. SDK method reference + +Every method is on the client: `client.` in both SDKs. Return shapes are in [Response envelope](#response-envelope); naming is in [3. Installation and client setup](#3-installation-and-client-setup). + +| Group | Python | TypeScript | Endpoint | Purpose | +|---|---|---|---|---| +| Databases | `databases.create()` | `databases.create()` | `POST /databases` | Create a database | +| Databases | `databases.status()` | `databases.status()` | `GET /databases/status` | Check provisioning readiness | +| Databases | `databases.list()` | `databases.list()` | `GET /databases` | List database IDs | +| Databases | `databases.stats()` | `databases.stats()` | `GET /databases/stats` | Knowledge and memory row counts for a database | +| Databases | `databases.get_metadata_schema()` | `databases.getMetadataSchema()` | `GET /databases/{database}/metadata-schema` | Read the metadata schema | +| Databases | `databases.update_metadata_schema()` | `databases.updateMetadataSchema()` | `PATCH /databases/{database}/metadata-schema` | Add metadata schema fields | +| Databases | `databases.collections()` | `databases.collections()` | `GET /databases/collections` | List active collections | +| Databases | `databases.delete_collection()` | `databases.deleteCollection()` | `DELETE /databases/collections` | Delete a collection | +| Databases | `databases.delete()` | `databases.delete()` | `DELETE /databases` | Delete a database and all its data | +| Context | `context.ingest()` | `context.ingest()` | `POST /context/ingest` | Ingest files or memories | +| Context | `context.status()` | `context.status()` | `GET /context/status` | Check indexing status | +| Context | `context.list()` | `context.list()` | `POST /context/list` | Browse knowledge or memories | +| Context | `context.inspect()` | `context.inspect()` | `GET /context/inspect` | Original content or a presigned URL | +| Context | `context.update_source_metadata()` | `context.updateSourceMetadata()` | `PATCH /context/{id}/metadata` | Edit metadata or `acl` without re-ingesting | +| Context | `context.relations()` | `context.relations()` | `GET /context/relations` | Graph relations for a source or collection | +| Context | `context.subgraph()` | `context.subgraph()` | `GET /context/{id}/subgraph` | Sources connected to one source | +| Context | `context.delete()` | `context.delete()` | `DELETE /context` | Delete sources or memories | +| Query | `query()` | `query()` | `POST /query` | Query knowledge, memories, or both | +| Query | `feedback.submit()` | `feedback.submit()` | `POST /feedback` | Report how a query performed | +| Connectors | `list_providers()` | `listProviders()` | `GET /connectors/providers` | Provider catalog, or one provider's credentials | +| Connectors | `connectors.create()` | `connectors.create()` | `POST /connectors` | Store credentials for one account | +| Connectors | `connectors.discover()` | `connectors.discover()` | `GET /connectors/{id}/discover` | Resources the credentials reach | +| Connectors | `connectors.configure()` | `connectors.configure()` | `POST /connectors/{id}/configure` | Choose resources and start syncing | +| Connectors | `connectors.status()` | `connectors.status()` | `GET /connectors/{id}/status` | Connector and per-resource health | +| Connectors | `connectors.list()` | `connectors.list()` | `GET /connectors` | List connectors | +| Connectors | `connectors.get()` | `connectors.get()` | `GET /connectors/{id}` | One connector's settings | +| Connectors | `connectors.list_resources()` | `connectors.listResources()` | `GET /connectors/{id}/resources` | Configured resources | +| Connectors | `connectors.sync()` | `connectors.sync()` | `POST /connectors/{id}/sync` | Sync now | +| Connectors | `connectors.pause()` | `connectors.pause()` | `POST /connectors/{id}/pause` | Stop scheduled syncs | +| Connectors | `connectors.resume()` | `connectors.resume()` | `POST /connectors/{id}/resume` | Restart scheduled syncs | +| Connectors | `connectors.update()` | `connectors.update()` | `PATCH /connectors/{id}` | Instructions, sync interval, or credentials | +| Connectors | `connectors.update_resource_acl()` | `connectors.updateResourceAcl()` | `PATCH /connectors/{id}/resources/{resource_id}` | One resource's instructions or `acl` | +| Connectors | `connectors.create_resource()` | `connectors.createResource()` | `POST /connectors/{id}/resources` | Add a new resource; returns `409` if it already exists | +| Connectors | `connectors.delete_resource()` | `connectors.deleteResource()` | `DELETE /connectors/{id}/resources/{resource_id}` | Stop syncing one resource | +| Connectors | `connectors.delete()` | `connectors.delete()` | `DELETE /connectors/{id}` | Remove a connector | +| Webhooks | `webhooks.register()` | `webhooks.register()` | `POST /webhooks/indexing` | Register or replace the webhook | +| Webhooks | `webhooks.get()` | `webhooks.get()` | `GET /webhooks/indexing` | Current registration | +| Webhooks | `webhooks.test()` | `webhooks.test()` | `POST /webhooks/indexing/test` | Send a test delivery | +| Webhooks | `webhooks.list_deliveries()` | `webhooks.listDeliveries()` | `GET /webhooks/indexing/deliveries` | List delivery attempts | +| Webhooks | `webhooks.get_delivery()` | `webhooks.getDelivery()` | `GET /webhooks/indexing/deliveries/{delivery_id}` | One delivery | +| Webhooks | `webhooks.retry_delivery()` | `webhooks.retryDelivery()` | `POST /webhooks/indexing/deliveries/{delivery_id}/retry` | Retry a failed delivery | +| Webhooks | `webhooks.set_signing_secret()` | `webhooks.setSigningSecret()` | `POST /webhooks/indexing/signing-secret` | Generate or set the signing secret | +| Webhooks | `webhooks.clear_signing_secret()` | `webhooks.clearSigningSecret()` | `DELETE /webhooks/indexing/signing-secret` | Turn signing off | +| Webhooks | `webhooks.delete()` | `webhooks.delete()` | `DELETE /webhooks/indexing` | Remove the webhook | + +### 15.1 Minimal cURL example + +The flow from [4. Minimal end-to-end flow](#4-minimal-end-to-end-flow) over raw HTTP: + +```bash +export HYDRADB_API_KEY="your_api_key" +DATABASE="agent_docs_demo" +COLLECTION="user_alex" + +# 1. Create a database. +curl -s -X POST 'https://api.hydradb.com/databases' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d "{\"database\":\"${DATABASE}\"}" + +# 2. Check readiness. Poll this until .data.infra.ready_for_ingestion is true. +curl -s "https://api.hydradb.com/databases/status?database=${DATABASE}" \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" | jq '.data.infra' + +# 3. Ingest a memory. +INGEST_ID=$(curl -s -X POST 'https://api.hydradb.com/context/ingest' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -F "type=memory" \ + -F "database=${DATABASE}" \ + -F "collection=${COLLECTION}" \ + -F 'memories=[{"id":"alex_pref_001","text":"Alex prefers concise technical answers.","infer":true,"user_name":"Alex"}]' \ + | jq -r '.data.results[0].id') + +# 4. Poll indexing. +curl -s -G 'https://api.hydradb.com/context/status' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + --data-urlencode "database=${DATABASE}" \ + --data-urlencode "collection=${COLLECTION}" \ + --data-urlencode "ids=${INGEST_ID}" \ + | jq '.data.statuses[0]' + +# 5. Search memories. +curl -s -X POST 'https://api.hydradb.com/query' \ + -H "Authorization: Bearer $HYDRADB_API_KEY" \ + -H "API-Version: 2" \ + -H "Content-Type: application/json" \ + -d "{\"database\":\"${DATABASE}\",\"collection\":\"${COLLECTION}\",\"query\":\"How should I answer Alex?\",\"type\":\"memory\",\"query_by\":\"hybrid\",\"mode\":\"thinking\"}" \ + | jq '.data.chunks' +``` + +--- + +## 16. Navigation and support + +- Guides: `https://docs.hydradb.com/essentials/v2/context` and the other Core Concepts pages +- API reference: `https://docs.hydradb.com/api-reference/v2` +- OpenAPI spec: `https://docs.hydradb.com/api-reference/v2/openapi.json` +- Dashboard/API keys: `https://dashboard.hydradb.com` +- Support email: `founders@hydradb.com` diff --git a/plugins/claude-code.mdx b/plugins/claude-code.mdx index 399e4eaf..84db6369 100644 --- a/plugins/claude-code.mdx +++ b/plugins/claude-code.mdx @@ -154,7 +154,7 @@ The plugin resolves config in this order. Later sources override earlier ones: | Value | Behavior | | ----------- | -------------------------------------------------------------------- | -| `memory` | **(default)** Queries [memories](/essentials/v2/context#2-save-memories) only | +| `memory` | **(default)** Queries [memories](/essentials/v2/context#ingesting-memory) only | | `knowledge` | Queries [knowledge](/essentials/v2/context) only | | `both` | Queries both in parallel, then merges results | diff --git a/plugins/cli.mdx b/plugins/cli.mdx index 61aaf062..346b9040 100644 --- a/plugins/cli.mdx +++ b/plugins/cli.mdx @@ -1,26 +1,22 @@ --- title: "CLI" -description: "Query context, ingest knowledge and memories, and inspect stored sources from the terminal with the HydraDB CLI." +description: "Ingest, query, and inspect infrastructure from your terminal with the CLI." --- -The HydraDB CLI lets you and your agents query context, ingest knowledge and -memories, and inspect stored sources from the terminal. - ## Quickstart +The CLI is open source. [Raise an issue](https://github.com/hydra-db/hydradb-cli/issues) or [contribute on GitHub](https://github.com/hydra-db/hydradb-cli). + - + ```bash curl -fsSL https://cli.hydradb.com/install | bash ``` - Installs the wheel from the latest [GitHub release](https://github.com/hydra-db/hydradb-cli/releases). - Uses `pipx` when available so the CLI stays isolated, and falls back to - `pip install --user`. + Installs the wheel from the latest [GitHub release](https://github.com/hydra-db/hydradb-cli/releases). Uses `pipx` when available so the CLI stays isolated, and falls back to `pip install --user`. - ```bash pip install https://github.com/hydra-db/hydradb-cli/releases/download/v0.2.0/hydradb_cli-0.2.0-py3-none-any.whl @@ -29,118 +25,50 @@ memories, and inspect stored sources from the terminal. - Requires Python 3.10 or later, and `hydradb-cli` 0.2.0 for the commands and flags on - this page. On earlier versions, see [Deprecated aliases](#deprecated-aliases). + Requires Python 3.10 or later, and `hydradb-cli` 0.2.0 for the commands and flags on this page. See [Deprecated aliases](#deprecated-aliases). - Do not run `pip install hydradb-cli`. It installs **0.1.0**, which predates every - command name on this page. PyPI publishing is paused, so releases are served from - GitHub until it resumes. + Do not run `pip install hydradb-cli`. It installs **0.1.0**, which predates every command name on this page. PyPI publishing is paused, so releases are served from GitHub until it resumes. - - Create an API key from the [HydraDB dashboard](https://dashboard.hydradb.com/keys) - - Create or copy your database ID from the [HydraDB dashboard](https://dashboard.hydradb.com/databases) - ```bash - hydradb login --database my-db + hydradb login ``` - You are prompted for your API key. Both it and the database are saved to - `~/.hydradb/config.json` (file permissions `0600`). - - For scripts and agents, pass the key explicitly instead of being prompted: + Enter your API key at the masked prompt. The key is saved to `~/.hydradb/config.json` with file permissions `0600` (readable and writable only by your account). No database is required to authenticate. - ```bash - hydradb login --api-key "$HYDRADB_API_KEY" --database my-db - ``` - - - Agents can skip `login`: every command reads `HYDRADB_API_KEY` and - `HYDRADB_DATABASE` from the environment, so no credential is written to - disk. It also keeps the key out of `ps` output, which shows any value passed as a - command-line argument to every other user on the machine. - + Scripts and agents can skip login: inject `HYDRADB_API_KEY` through your environment or secret manager. This avoids saving the key to the CLI config or exposing it as a command-line argument in process listings. Set `HYDRADB_DATABASE` separately when a command needs a database. - - + ```bash hydradb doctor ``` - Reports your resolved config and whether the API is reachable. + | Overview of variables | Description | Default | + | --- | --- | --- | + | `HYDRADB_API_KEY` | Your HydraDB API key | _Required_ | + | `HYDRADB_DATABASE` | Default database for scoped commands; not required for login or listing databases | - | + | `HYDRADB_COLLECTION` | Collection within the database | - | + | `HYDRADB_BASE_URL` | API base URL | `https://api.hydradb.com` | + | `HYDRADB_OUTPUT` | Default output format (`human` or `json`) | `human` | - - -## Configuration - -### Authentication - -The CLI resolves credentials in this order (first match wins): - -1. Environment variables (`HYDRADB_API_KEY`, `HYDRADB_DATABASE`) -2. Config file (`~/.hydradb/config.json`, written by `hydradb login`) - -To set the environment variables permanently: - - - - ```bash - echo 'export HYDRADB_API_KEY="your-api-key"' >> ~/.bashrc - echo 'export HYDRADB_DATABASE="your-database-id"' >> ~/.bashrc - source ~/.bashrc - ``` - - - + ```bash - echo 'export HYDRADB_API_KEY="your-api-key"' >> ~/.zshrc - echo 'export HYDRADB_DATABASE="your-database-id"' >> ~/.zshrc - source ~/.zshrc + hydradb database list + hydradb config set database my-db ``` - - - - ```powershell - [System.Environment]::SetEnvironmentVariable("HYDRADB_API_KEY", "your-api-key", "User") - [System.Environment]::SetEnvironmentVariable("HYDRADB_DATABASE", "your-database-id", "User") - ``` - - - -### Environment variables - -| Variable | Description | Default | -|---|---|---| -| `HYDRADB_API_KEY` | Your HydraDB API key | *Required* | -| `HYDRADB_DATABASE` | Your HydraDB database identifier | *Required* | -| `HYDRADB_COLLECTION` | Collection within the database | - | -| `HYDRADB_BASE_URL` | API base URL | `https://api.hydradb.com` | -| `HYDRADB_OUTPUT` | Default output format (`human` or `json`) | `human` | - - - The older `HYDRA_DB_API_KEY`, `HYDRA_DB_TENANT_ID`, `HYDRA_DB_SUB_TENANT_ID`, - `HYDRA_DB_BASE_URL` and `HYDRADB_API_URL` spellings are still read, but each prints a - one-line deprecation warning to stderr. The canonical name wins when both are set. - -### Persistent configuration - -```bash -hydradb config show -hydradb config set database my-db -``` - -`hydradb config set` accepts `api_key`, `database`, `collection` and `base_url`. -Environment variables always take precedence over the config file. + Or create a database with `hydradb database create my-db`, then select it with `hydradb config set database my-db`. Authentication and database selection are separate. + + ### Output formats Every command supports `--output human` (default, Rich-formatted tables) or -`--output json` (machine-readable). Set the default with the environment -variable: +`--output json` (machine-readable). Set default: ```bash export HYDRADB_OUTPUT=json @@ -152,21 +80,21 @@ Or set it per command, before the subcommand: hydradb -o json list --database my-db ``` -Warnings and errors always go to stderr, so `--output json` stdout stays a clean -document you can pipe straight into `jq`. +Human-readable scope notices and diagnostics go to stderr. JSON stdout stays one document you can pipe into `jq`: context commands include the effective `scope`, and API warnings stay in `warnings` (or `response_warnings` if the payload already uses that name). Inspect the returned scope when using defaults or switching databases; a null collection means the API selected the collection without reporting its name. + +Payload-owned scope keys are preserved. If the server already returns `scope`, CLI provenance uses `cli_scope`. If the server owns both keys, the CLI returns `{"data": , "cli_scope": }` instead of overwriting either value; all original fields remain under `data`. + +--- ## Commands -Every command that reads or writes context takes `--database` (`-d`) to choose the -database, and `--collection` to scope to a collection within it. Both fall back to -your configured defaults, so the examples below can omit them once `hydradb login` -has run. +Every command that reads or writes context takes `--database` to choose the database and `--collection` to scope to a collection within it. Both fall back to your configured defaults, so you can omit them after selecting a scope, not merely after login. If a scoped command has no database, its error explains how to list databases and pass or configure one. -### Context operations +### Context | Command | Description | |---|---| -| `hydradb query QUERY` | Query knowledge or memories (the only retrieval command) | +| `hydradb query` | Query context | | `hydradb ingest` | Ingest a memory, knowledge text, or one or more knowledge files | | `hydradb list` | List ingested sources, both knowledge and memories | | `hydradb inspect SOURCE_ID` | Fetch a source's content by ID | @@ -176,15 +104,14 @@ has run. #### Ingesting -`ingest` stores a memory by default. Pass `--kind knowledge` for knowledge text, or -give it file paths: files are always knowledge sources. +`ingest` uses the client's auto selector by default to choose a request layout, not a backend content classifier. Pass `--type knowledge` or `--type memory` to choose explicitly, or give it file paths: files are always knowledge sources. The CLI's auto selector is not an API `type` value. ```bash -# Store a memory +# Route text automatically hydradb ingest --text "The user prefers dark mode and uses VS Code" --database my-db # Store knowledge text -hydradb ingest --kind knowledge --text "Project uses PostgreSQL 15 with pgvector" --database my-db +hydradb ingest --type knowledge --text "Project uses PostgreSQL 15 with pgvector" --database my-db # Upload one or more files hydradb ingest ./docs/architecture.md ./docs/runbook.md --database my-db @@ -195,13 +122,13 @@ cat notes.txt | hydradb ingest --database my-db | Option | Description | |---|---| -| `--kind` | `memory` (default) or `knowledge` | +| `--type` | Client-side auto selection by default, or choose `knowledge` or `memory` explicitly | | `--text`, `-t` | Text to ingest. Use `-` to read from stdin | +| `--infer` / `--no-infer` | Extract insights and build the context graph (default on) | | `--title` | Optional title | | `--source-id` | Client-assigned source identifier | -| `--user-name` | User name (memory only) | -| `--infer` / `--no-infer` | Extract insights and build the context graph (default on) | -| `--markdown` | Treat text as markdown (memory only) | +| `--user-name` | User name (for memory only) | +| `--markdown` | Treat memory or knowledge text as Markdown | | `--upsert` / `--no-upsert` | Update existing sources with the same `source_id` (default on) | @@ -213,32 +140,35 @@ cat notes.txt | hydradb ingest --database my-db #### Querying ```bash +# Some examples + # Search knowledge -hydradb query "How is authentication implemented?" --kind knowledge --database my-db +hydradb query "How is authentication implemented?" --type knowledge --database my-db -# Search memories -hydradb query "What IDE does the user prefer?" --kind memory --database my-db +# Search only memories +hydradb query "What IDE does the user prefer?" --type memory --database my-db # Deterministic keyword search hydradb query "PostgreSQL migration" --operator and --database my-db ``` -| Option | Description | -|---|---| -| `--kind` | Context type to query: `memory` or `knowledge`. Omit to search both | +| Command | Description | +| --- | --- | +| `--type` | Context type to query: `memory` or `knowledge`. Omit to search both | | `--operator` | Keyword operator: `or`, `and`, or `phrase`. Setting it switches the query to keyword (text) search | | `--max-results`, `-n` | Maximum results, 1 to 50 (default `10`) | | `--mode`, `-m` | Retrieval mode: `fast` or `thinking`. Omit it and the API picks one per query (`auto`) | | `--alpha` | Hybrid search weight (`0.0` keyword to `1.0` semantic). Omitted means the API default, `0.8` | -| `--recency-bias` | Preference for newer content (`0.0` to `1.0`). Omitted means a mild `0.4` tilt. Pass `0` to turn it off | +| `--recency-bias` | Preference for newer content (`0.0` to `1.0`). Omitted means `0.6`. Pass `0` to turn it off | | `--graph-context` / `--no-graph-context` | Include context graph relations. On by default. `--no-graph-context` only takes effect in `fast` mode | -| `--context` | Additional context to guide retrieval | +| `--query-explicit-relations` / `--no-query-explicit-relations` | Include or skip deterministically linked sources in thinking mode. On by default | +| `--additional-graph-context` | A factual string hint to guide retrieval, not a filter. `--additional_graph_context` is also accepted | -#### Inspecting and deleting +#### Inspecting ```bash # List what is stored -hydradb list --kind knowledge --database my-db +hydradb list --type knowledge --database my-db # Read one source back hydradb inspect 39e8872d-1c4a-4f0b-9c1e-7d2a5b8e4f10 --database my-db @@ -247,12 +177,10 @@ hydradb inspect 39e8872d-1c4a-4f0b-9c1e-7d2a5b8e4f10 --database my-db hydradb verify 39e8872d-1c4a-4f0b-9c1e-7d2a5b8e4f10 --database my-db # Delete (prompts unless --yes) -hydradb delete 39e8872d-1c4a-4f0b-9c1e-7d2a5b8e4f10 --kind knowledge --database my-db --yes +hydradb delete 39e8872d-1c4a-4f0b-9c1e-7d2a5b8e4f10 --type knowledge --database my-db --yes ``` -`list` accepts `--kind`, `--page` and `--page-size` (1 to 100). `inspect` accepts -`--mode content` (default), `url`, or `both`. `delete` defaults to `--kind knowledge`, -so pass `--kind memory` to remove a memory. +`list` accepts `--type`, `--page` and `--page-size` (1 to 100). `inspect` accepts `--mode content` (default), `url`, or `both`. `delete` defaults to `--type knowledge`, so pass `--type memory` to remove a memory. ### Database management @@ -264,19 +192,7 @@ so pass `--kind memory` to remove a memory. | `hydradb database stats [DATABASE]` | Row-count statistics | | `hydradb database readiness [DATABASE]` | Whether the database is provisioned and ready for ingestion | | `hydradb database monitor [DATABASE]` | Stats and readiness combined | -| `hydradb database delete DATABASE` | Delete a database and all its context (irreversible) | - -```bash -hydradb database create my-db -hydradb database readiness my-db -hydradb database delete my-db --yes -``` - - - `hydradb database delete` permanently removes the database and all associated memories, - knowledge, and graph data. This action cannot be undone. It prompts for confirmation - unless you pass `--yes`. - +| `hydradb database delete DATABASE` | Delete a database and all its context (irreversible)

Add flag --yes to skip confirmation | ### Authentication and configuration @@ -288,25 +204,15 @@ hydradb database delete my-db --yes | `hydradb config show` | Show current CLI configuration | | `hydradb config set KEY VALUE` | Save a setting. See [Persistent configuration](#persistent-configuration) for the keys | +### Persistent configuration + +Use `hydradb config set` for `database`, `collection`, or `base_url`, and `hydradb config show` to inspect the resolved configuration. Environment variables override saved settings; per-command scope flags override both. Set the output format with `HYDRADB_OUTPUT` or `--output`. Use the masked login prompt or `HYDRADB_API_KEY` for credentials. + ### Deprecated aliases -The command groups below still work and behave identically, but each prints a -deprecation warning to stderr naming its replacement. They will be removed in a future -major version. +`--kind` is the older alias for `--type` on context commands. New scripts should use `--type`. Existing `--tenant-id` and `--sub-tenant-id` scope flags remain aliases for `--database` and `--collection`. -| Deprecated | Use instead | -|---|---| -| `memories add` | `ingest` | -| `memories list`, `fetch sources` | `list` | -| `memories delete`, `knowledge delete` | `delete` | -| `knowledge upload`, `knowledge upload-text` | `ingest` | -| `knowledge verify` | `verify` | -| `recall full`, `recall preferences`, `recall keyword` | `query --kind … --operator …` | -| `fetch content` | `inspect` | -| `fetch relations` | `relations` | -| `tenant …` | `database …` | -| `whoami` | `doctor` | -| `--tenant-id`, `--sub-tenant-id` | `--database`, `--collection` | +For query hints, `--additional-graph-context` takes precedence over the older `--additional-context` and `--context` flags, including when the canonical hint is empty. For linked-source retrieval, `--query-explicit-relations` / `--no-query-explicit-relations` take precedence over the older `--follow-forceful-relations` and `--query-forceful-relations` pairs. Explicit `false` is preserved. Conflicting `--type` and `--kind` values are rejected rather than guessed. ## Scripting and automation @@ -317,7 +223,7 @@ Use `--output json` to pipe results into `jq`, Python, or other tools: hydradb -o json list --database my-db | jq '.sources[].id' # Query and extract just the matched text -hydradb -o json query "user preferences" --kind memory --database my-db \ +hydradb -o json query "user preferences" --type memory --database my-db \ | jq '.chunks[].chunk_content' # Batch upload: ingest accepts many files in one invocation @@ -330,7 +236,3 @@ find ./docs -name "*.md" -exec hydradb ingest --database my-db {} + `query` returns `chunks`, each with `chunk_content`, `source_title` and `relevancy_score`. `list` returns `sources`. Both memories and knowledge appear in the same `sources` array, distinguished by their `type`. - -## Feedback and contributions - -The CLI is open source. [Raise an issue](https://github.com/hydra-db/hydradb-cli/issues) or [contribute on GitHub](https://github.com/hydra-db/hydradb-cli). diff --git a/plugins/ecosystem.mdx b/plugins/ecosystem.mdx index 448f0236..edaae6fe 100644 --- a/plugins/ecosystem.mdx +++ b/plugins/ecosystem.mdx @@ -1,50 +1,48 @@ --- title: "Plugins" -description: "Add HydraDB memory to your coding agents, editors, and agent frameworks with a native plugin." +description: "Add HydraDB to your coding agents, editors, and agent frameworks with plugins." --- -Plugins bring HydraDB memory into the coding agents and frameworks you already -use. Pick one below for installation, configuration, and how it works. - -To connect any MCP-compatible assistant instead, use [MCP](/plugins/mcp). -For terminal workflows, use the [CLI](/plugins/cli). +Give your agents full context of your codebase and knowledge base combined with infinite memory to recall your personal preferences while retrieving relevant context. ## Coding agents and editors +Search across all your agent sessions, docs, and past conversations into every prompt. Never let your coding agent produce duplicate code, re-think decisions you've already taken, or miss out a critical piece of information across hundreds of sessions. + - Retrieves context before each prompt, syncs workspace docs, and saves conversations. + Recall earlier decisions when compaction drops important details. - Workspace sync, prompt-time retrieval, and conversation capture for Codex. + Bring past solutions into new tasks instead of solving the same problem again. - Captures turns and injects retrieved context before each prompt. + Spend less time reminding your agent what you discussed in earlier sessions. - Memory and retrieval inside the Cursor editor. + Start fresh chats with relevant project context, without repeating the background. - Long-term memory for the Muse Code agent. + Carry project knowledge between sessions without maintaining memory notes by hand. - Prompt-time retrieval and turn capture for Grok Build. + Retrieve past work so your agent spends less time rediscovering what it already did. - An agent-invoked query tool, workspace sync, and turn capture. + Recover relevant details that compacted summaries leave out. - Native dsh plugin for prompt-time retrieval and turn capture. + Bring earlier conversations into new sessions instead of rebuilding context from scratch. -## Agent memory providers +## Agent memory - Retrieves context before each turn and saves completed turns automatically. + Recall past conversations without repeatedly reminding your agent what matters. @@ -52,10 +50,10 @@ For terminal workflows, use the [CLI](/plugins/cli). - Shared memory for CrewAI agents and crews. + Share what one crew learns so other crews spend less time repeating the work. - Memory and retrieval for LangChain chains and agents. + Retrieve relevant knowledge across conversations instead of rebuilding context for each thread. diff --git a/plugins/mcp.mdx b/plugins/mcp.mdx index 686db7df..92ab2141 100644 --- a/plugins/mcp.mdx +++ b/plugins/mcp.mdx @@ -1,19 +1,14 @@ --- title: "MCP" -description: "Connect your AI assistant to HydraDB through the Model Context Protocol (MCP) server." +description: "Connect your agents to HydraDB through MCP server." --- -The HydraDB MCP server gives any MCP-compatible AI assistant tools to query and -ingest context in your databases. - -For automatic retrieval and conversation capture, use a native [plugin](/plugins/ecosystem) -instead. For terminal workflows, use the [CLI](/plugins/cli). +The MCP is open source. [Raise an issue](https://github.com/hydra-db/hydradb-mcp/issues) or [contribute on GitHub](https://github.com/hydra-db/hydradb-mcp). The MCP server for HydraDB is `https://mcp.hydradb.com`. ## Quickstart Choose a sign-in method, then select your AI app. **Sign in with HydraDB** is -the fastest: add one URL to your AI app and approve it in the browser. No API -key needed. +the easiest: add one URL to your AI app and approve it in the browser. @@ -85,41 +80,20 @@ key needed. - **Not sure where to put the URL?** Paste this to your AI assistant and it - will add or update the config file for you: + **Not sure where to put the URL?** Ask your agent: - > Add the HydraDB MCP server at `https://mcp.hydradb.com` to my MCP - > config, then help me authenticate. + Help me add the HydraDB MCP server at `https://mcp.hydradb.com` to my MCP config, then help me authenticate. - - - The approval screen shows the app asking to connect, what it will be able to - do, and which **database** it will read and write. It also asks whether the - app may use your *other* databases: - - - **Allowed when asked** (default): the app starts in the database you - picked and can switch to another one of yours when you tell it to. Choose - this if you work across several databases. - - **Not allowed**: the app is confined to that database, and to the - collection shown under **Advanced**. Anything else is refused, including - a request to delete a graph in another collection. - - You can change your mind at any time by - [disconnecting the app](#sign-in-with-hydradb-oauth). - - An API key works everywhere and is the right choice for servers, CI, - scripts, and self-hosted deployments where no browser is available. - Otherwise, prefer signing in. - - Create an API key from the [HydraDB dashboard](https://dashboard.hydradb.com/keys) - - Create or copy your database ID from the [HydraDB dashboard](https://dashboard.hydradb.com/databases) + + No database is required to connect with an API key. Choose one after authentication. @@ -128,7 +102,7 @@ key needed. Point your client at `https://mcp.hydradb.com` and pass your credentials as headers. The key names differ by client: VS Code uses the `servers` schema with an explicit `type`, the others use - `mcpServers`. See [authentication](#authenticating-to-the-remote-server) + `mcpServers`. See [API key headers](#api-key-headers) for every header. @@ -139,8 +113,7 @@ key needed. "hydradb": { "url": "https://mcp.hydradb.com", "headers": { - "Authorization": "Bearer YOUR_HYDRADB_API_KEY", - "X-HydraDB-Database": "your-database" + "Authorization": "Bearer YOUR_HYDRADB_API_KEY" } } } @@ -158,8 +131,7 @@ key needed. "type": "http", "url": "https://mcp.hydradb.com", "headers": { - "Authorization": "Bearer YOUR_HYDRADB_API_KEY", - "X-HydraDB-Database": "your-database" + "Authorization": "Bearer YOUR_HYDRADB_API_KEY" } } } @@ -182,8 +154,7 @@ key needed. "command": "npx", "args": ["-y", "@hydradb/mcp@^1.1.0"], "env": { - "HYDRADB_API_KEY": "your-api-key", - "HYDRADB_DATABASE": "your-database" + "HYDRADB_API_KEY": "your-api-key" } } } @@ -201,8 +172,7 @@ key needed. "command": "npx", "args": ["-y", "@hydradb/mcp@^1.1.0"], "env": { - "HYDRADB_API_KEY": "your-api-key", - "HYDRADB_DATABASE": "your-database" + "HYDRADB_API_KEY": "your-api-key" } } } @@ -220,8 +190,7 @@ key needed. "command": "npx", "args": ["-y", "@hydradb/mcp@^1.1.0"], "env": { - "HYDRADB_API_KEY": "your-api-key", - "HYDRADB_DATABASE": "your-database" + "HYDRADB_API_KEY": "your-api-key" } } } @@ -240,8 +209,7 @@ key needed. "command": "npx", "args": ["-y", "@hydradb/mcp@^1.1.0"], "env": { - "HYDRADB_API_KEY": "your-api-key", - "HYDRADB_DATABASE": "your-database" + "HYDRADB_API_KEY": "your-api-key" } } } @@ -254,75 +222,41 @@ key needed. - Swap `YOUR_HYDRADB_API_KEY` / `your-api-key` and `your-database` for the - values from Step 1, then restart your editor or client so it picks up + Swap `YOUR_HYDRADB_API_KEY` / `your-api-key` for your API key, + then restart your editor or client so it picks up the new MCP server. - - - **Local MCP server only:** the canonical tool names and `HYDRADB_*` - variables need **@hydradb/mcp 1.1.0 or later**. If your config pins - `@0.0.1` or `@1.0.0`, change it to `@^1.1.0` and restart. The caret keeps - you on the 1.x line this page documents. Old `hydra_db_*` tool names are - off by default; set `HYDRADB_MCP_LEGACY_TOOLS=1` to register them again. - + + If your config pins `@0.0.1` or `@1.0.0`, change it to `@^1.1.0` and restart. The caret keeps you on the 1.x line this page documents. + + ## Configuration -### Environment variables +### Choose a database after authentication + +Ask your agent to call `hydradb_databases` to list the databases your connection can use, or `hydradb_database_create` to create one. Pass `database` in each scoped tool call, or configure a default below. Database-management tools do not require a default database. An OAuth connection remains limited to the scope you approved. + +Tool responses include a `scope_notice` and a human-readable Scope notice, so your agent can check the effective database and collection when it uses a connection default or switches scope per call. A null collection does not name a collection: the response may list multiple `collections` for automatic search, or leave the API-selected collection name unreported. Backend warnings are retained in the response; if a bounded result cannot include them all, `warnings_omitted` reports that. An OAuth request outside its approved scope is rejected before an API call is made. + +### Some environment variables | Variable | Description | Default | | -------------------- | ------------------------------------------ | ------------------------- | | `HYDRADB_API_KEY` | Your HydraDB API key | *Required* | -| `HYDRADB_DATABASE` | The database to read and write | *Required* | +| `HYDRADB_DATABASE` | Default database; scoped tools can instead receive `database` in their arguments | *(unset)* | | `HYDRADB_COLLECTION` | Collection within the database | *(default collection)* | | `HYDRADB_BASE_URL` | API base URL override | `https://api.hydradb.com` | | `HYDRADB_LOG_LEVEL` | Log level: `DEBUG`, `INFO`, `WARN`, `ERROR` | `ERROR` | | `HYDRADB_TIMEOUT_SECONDS` | Deadline for a whole tool call, retries and waits included | `45` | | `HYDRADB_MAX_RETRIES` | Retries per request inside that deadline (`0` disables) | `2` | - - The `HYDRA_DB_*` spellings still work. Each one is read as a deprecated alias - of its canonical name and prints a single warning to stderr naming the - replacement; if both are set, the canonical name wins. - - | Deprecated | Canonical | - | ---------- | --------- | - | `HYDRA_DB_API_KEY` | `HYDRADB_API_KEY` | - | `HYDRA_DB_TENANT_ID` | `HYDRADB_DATABASE` | - | `HYDRA_DB_SUB_TENANT_ID` | `HYDRADB_COLLECTION` | - | `HYDRA_DB_BASE_URL` | `HYDRADB_BASE_URL` | - | `HYDRA_DB_LOG_LEVEL` | `HYDRADB_LOG_LEVEL` | - - -### Timeouts and retries - -One deadline, `HYDRADB_TIMEOUT_SECONDS`, covers a whole tool call: every attempt -and every wait between attempts. The default of 45 seconds ends a call before -the 60 seconds most MCP clients wait for a tool. When the deadline passes, the -error names it and lists each attempt. - -- **Reads** are retried after `429`, `408`, `5xx` and dropped connections. -- **Writes that are not safe to repeat** (`hydradb_ingest`, `hydradb_graph_query`, - `hydradb_feedback`, and creating or deleting a database or collection) are - retried only when the failure shows HydraDB did not act on them: `429`, `408`, - or a refused connection. After a `5xx`, a dropped connection or the deadline, - the error says the outcome is unknown. Check whether the write took effect - before sending it again. -- **`Retry-After`** sets the wait, in seconds or as an HTTP date. If the wait - would end after the deadline, the call fails at once with HydraDB's answer. -- **Cancelling** a tool call stops the request in flight and starts no new - attempt, on the local server and on the remote server. - -On the remote server these are operator settings: set them in the server's -environment. - ### Collections -Give each project its own `HYDRADB_COLLECTION` to keep its memory isolated +Give each project its own `HYDRADB_COLLECTION` to keep its context isolated within one database, or point several projects at the same value to share context between them: @@ -342,79 +276,37 @@ context between them: } ``` -When `HYDRADB_COLLECTION` is unset, the API uses the default collection. To keep -the old shared behavior, set it to `hydra-db-mcp`. - -## Authenticating to the remote server - -`https://mcp.hydradb.com` accepts two kinds of credentials at the same URL. - -### Sign in with HydraDB (OAuth) - -Point your client at the URL with no credentials and it discovers the sign-in -flow on its own: the server answers `401` with a pointer to its metadata, your -client registers itself, and opens your browser. You sign in, choose a database, -and approve. Your client stores a token that it refreshes silently, and you never -handle a key. - -**Settings**, then **Connected apps**, lists every app you have connected. -**Disconnect** ends an app's access within 30 seconds, once the server's cached -token check expires. - ### API key headers -Every request carries its own credentials, so one server serves any number of -independent users. Send them as headers: +A request that authenticates nobody is refused with `401`, and that refusal is +what starts the sign-in flow for clients that support it. An API key alone is enough to connect and list databases. A scoped tool call without a database returns an actionable error explaining how to select one. | Header | Maps to | Required | -| ------ | ------- | -------- | +| --- | --- | --- | | `Authorization` | Your HydraDB API key as a `Bearer` token (`X-HydraDB-Api-Key` is also accepted), or an OAuth access token | Yes | -| `X-HydraDB-Database` | Database. API-key requests only; not read for an OAuth token, whose scope comes from what you approved | With an API key | +| `X-HydraDB-Database` | Optional default database. API-key requests only; not read for an OAuth token, whose scope comes from what you approved | No | | `X-HydraDB-Collection` | Collection. If omitted, the API uses the default collection | No | | `X-HydraDB-Graph-Database` | Default graph database for the Cypher tools; defaults to the request's database | No | | `X-HydraDB-Graph-Collection` | Default graph collection; defaults to `default` | No | -A request that authenticates nobody is refused with `401`, and that refusal is -what starts the sign-in flow for clients that support it. A request that carries -an API key but names no database is refused with `400`. - - - The API key and database resolve together: a request that supplies its own key - must also supply its own `X-HydraDB-Database`, so your key is never paired with - someone else's database. The base URL, request timeout, and retry count are - operator settings on the server and are never read from a request header. - - - - **Per-call database switching:** Multi-tenant agents serving multiple companies - from a single session can pass `database` and `collection` directly in tool - arguments (for example, `hydradb_query` with `{"query": "...", "database": "tenant_b"}`). - When omitted, calls fall back to the connection's default scope: the - `X-HydraDB-Database` / `X-HydraDB-Collection` headers for an API key, or what - you approved for an OAuth connection. - - On an OAuth connection you approved with **other databases not allowed**, a - per-call `database` or `collection` outside that scope is refused before the - request leaves the server, and `hydradb_databases` shows what the connection - may use. - - ## Self-hosting the HTTP server To run the remote server yourself instead of using `mcp.hydradb.com`, use -the npm binary or the Docker image. Set `HYDRADB_API_KEY` and `HYDRADB_DATABASE` -in the environment for a single-tenant server (clients then send no credentials), -or leave them unset for a multi-tenant one where every client authenticates with -its own headers. +the npm binary or the Docker image. Inject `HYDRADB_API_KEY` into the environment for a single-tenant server (clients then send no credentials). `HYDRADB_DATABASE` is an optional default; scoped tool calls can select a database later. For a multi-tenant server, leave the key unset so every client authenticates with its own headers. + + + The defaults are loopback-only. When you expose the server publicly, bind `0.0.0.0` deliberately, set `ALLOWED_HOSTS` to your hostname, list any browser origins in `ALLOWED_ORIGINS`, and terminate TLS in front of it. For a shared, public server, leave `HYDRADB_API_KEY` unset so every caller must authenticate with their own key rather than sharing yours. + ```bash npm install -g @hydradb/mcp # Single-tenant: the server holds one account - HYDRADB_API_KEY=your-key HYDRADB_DATABASE=your-database hydradb-mcp-http + HYDRADB_DATABASE=your-database hydradb-mcp-http # Multi-tenant: clients authenticate per request - BIND_ADDRESS=0.0.0.0 ALLOWED_HOSTS=mcp.hydradb.com hydradb-mcp-http + env -u HYDRADB_API_KEY -u HYDRADB_DATABASE \ + BIND_ADDRESS=0.0.0.0 ALLOWED_HOSTS=mcp.hydradb.com hydradb-mcp-http ``` @@ -422,7 +314,7 @@ its own headers. ```bash docker build -t hydradb-mcp https://github.com/hydra-db/hydradb-mcp.git docker run -p 8080:8080 \ - -e HYDRADB_API_KEY=your-key -e HYDRADB_DATABASE=your-database \ + -e HYDRADB_API_KEY -e HYDRADB_DATABASE \ hydradb-mcp ``` @@ -437,15 +329,3 @@ The primary endpoint is `POST /` (with `/mcp` supported as an alias); `GET /heal | `ALLOWED_HOSTS` | Extra `Host` headers to accept (comma-separated); loopback always allowed | *(loopback only)* | | `ALLOWED_ORIGINS` | CORS origins for browser clients (comma-separated; `*` allows any) | *(none)* | | `TRUST_PROXY` | Express `trust proxy` when behind a reverse proxy: a hop count, `true`, or `loopback` | *off* | - - - The defaults are loopback-only. When you expose the server publicly, bind - `0.0.0.0` deliberately, set `ALLOWED_HOSTS` to your hostname, list any browser - origins in `ALLOWED_ORIGINS`, and terminate TLS in front of it. For a shared, - public server, leave `HYDRADB_API_KEY` unset so every caller must authenticate - with their own key rather than sharing yours. - - -## Feedback and contributions - -The MCP server is open source. [Raise an issue](https://github.com/hydra-db/hydradb-mcp/issues) or [contribute on GitHub](https://github.com/hydra-db/hydradb-mcp). diff --git a/scripts/connector_capabilities.json b/scripts/connector_capabilities.json new file mode 100644 index 00000000..da5a462c --- /dev/null +++ b/scripts/connector_capabilities.json @@ -0,0 +1,1163 @@ +{ + "provenance": { + "application": { + "repo": "hydra-db/hydradb-application", + "commit": "d76958b515105f9b60ce76d36df670d2dc5ee924", + "source": "application/internal/connectors/lance/provider_info.go: ProviderInfoFor" + }, + "dashboard": { + "repo": "hydra-db/dashboard-2.0", + "commit": "f611226e4c790747140bb47d552aa9785097162d", + "source": "next-app/src/lib/providers.ts: PROVIDERS, CATALOG_ALIAS and Supabase tokenHowTo" + }, + "export_entries": 100, + "export_sha256": "30e1205d312195291e10adc4358b928e30e03be7eb120691474376b8104aadff", + "aliases": { + "googleanalytics": "ga4", + "zoho": "zoho-crm" + }, + "notes": [ + "Indexed object types and setup notes are from public ProviderInfoFor output, not dashboard marketing summaries.", + "Supabase has no normalizer provider description; push-only behavior and setup are sourced from the dashboard provider tokenHowTo.", + "An empty indexed_object_types list is preserved and does not imply that no content syncs." + ] + }, + "providers": [ + { + "provider": "github", + "name": "GitHub", + "indexed_object_types": [ + "issues", + "issue_comments" + ] + }, + { + "provider": "linear", + "name": "Linear", + "indexed_object_types": [ + "Issues" + ] + }, + { + "provider": "gitlab", + "name": "GitLab", + "indexed_object_types": [ + "issues", + "merge_requests", + "issue_notes", + "mr_notes", + "repository_files", + "commits", + "releases", + "projects" + ] + }, + { + "provider": "sentry", + "name": "Sentry", + "indexed_object_types": [ + "issues", + "events", + "projects", + "teams", + "users" + ] + }, + { + "provider": "pagerduty", + "name": "PagerDuty", + "indexed_object_types": [ + "incidents", + "schedules", + "escalation_policies" + ], + "setup_guide": [ + "Create a READ-ONLY REST API key: PagerDuty → Integrations → API Access Keys → Create New API Key, and tick Read-only. This connector never writes, and a full-access key would let a leaked token trigger or resolve real incidents.", + "Set the email field to the account the key belongs to. PagerDuty sends it as the From header and rejects calls where it does not match a real user, so a mistyped address fails every request rather than some of them.", + "Mint the key at the ACCOUNT level, not scoped to a single user. A user-scoped key cannot list services, so discovery returns nothing and there is no way to choose what to sync — an empty picker is what that mistake looks like.", + "Services are picked after connecting. Incidents are scoped to the services you select, including their alerts, notes and status updates; schedules and escalation policies are account-wide and always synced, which is what makes \"who is on call\" answerable.", + "Incident notes and status updates are indexed by default because they are where the human response text lives. Turn off fetch_incident_prose if you would rather not index them, or to cut the per-incident request count on a very large account. Disabling excludes the note text; the fact that a note was added stays visible in the incident timeline.", + "With permission-aware search on, each service is readable by PagerDuty owners and admins, and by everyone else only from inside one of its teams (a service on no team is readable by every role that reads public services). Schedules and escalation policies carry the same rule over their own teams and are refreshed every sync. PagerDuty's API does not say whether a team is private, so a Manager, Responder or Observer outside a team does not see its services here even when the team is public. The read-only key must be able to read users, teams, services, schedules and escalation policies; when it cannot, the service is readable by everyone in your workspace, with a warning on the connector, until you reconnect or set an access rule on it." + ] + }, + { + "provider": "datadog", + "name": "Datadog", + "indexed_object_types": [ + "aggregate_logs", + "metric_response_time", + "slo_history_us_prod", + "slo_history_eu_prod", + "slo_history_ca_prod", + "monitors", + "dashboards", + "slos", + "notebooks", + "incidents" + ], + "setup_guide": [ + "Datadog needs TWO keys and they do different jobs. Create an API key under Organization Settings → API Keys, and an application key under Organization Settings → Application Keys. The API key identifies the org; the application key carries the scopes, so it is the one that decides what syncs.", + "An application key is created UNSCOPED and the create dialog has no scope picker — the key list will show it as \"Not Scoped\", meaning it inherits everything its owner can do. You have to open the key afterwards and Edit it to apply scopes, so a key made the obvious way is a full-permission key.", + "Grant exactly these and nothing more: timeseries_query, slos_read, logs_read_data, monitors_read, dashboards_read, notebooks_read and incident_read. Datadog's own description of logs_read_data claims reading logs also needs \"Logs Read Index Data\"; tested against a live org it does not, so do not grant the extra one.", + "A missing scope does not fail loudly. Datadog answers an unauthorized request with a bare 403 that names no permission, an unknown metric with a 200 and an empty series, and a log query against an org with no indexes with \"No valid indexes specified\" — so an under-scoped key looks exactly like an empty account.", + "Both keys are site-specific. If your org is not on US1, set the site field (for example us5.datadoghq.com or datadoghq.eu) or every call fails against the wrong region.", + "Datadog has nothing to browse, so the resource step offers a single \"All data\" row — select it to continue. It syncs the whole org: monitors are indexed with their message text, which is where runbooks live, along with dashboards, SLO definitions, notebooks and declared incidents.", + "Incidents Datadog marks PRIVATE are indexed too, and their restriction is carried over: Datadog scopes a private incident to its participants, and we record it as visible to nobody, so an access-scoped search never returns it. Each indexed incident also records its own visibility in its text, so you can tell which is which.", + "That mirroring only takes effect once access-scoped search is enabled for this connector on our side, which is a per-provider setting rather than something the scopes control. Until it is on, a private incident behaves the way it did before and is searchable by everyone in your HydraDB tenant. Ask us to turn it on, or skip just the incident_read scope if that trade is not acceptable: every other stream syncs without it.", + "The metric query, log query and SLO id fields are optional additions, each selecting one extra time series to index. Leaving them blank costs you those series and nothing else — everything above syncs without them." + ] + }, + { + "provider": "jira", + "name": "Jira", + "indexed_object_types": [ + "issues", + "issue_comments", + "issue_worklogs" + ] + }, + { + "provider": "asana", + "name": "Asana", + "indexed_object_types": [ + "tasks", + "subtasks", + "stories", + "projects" + ], + "setup_guide": [ + "Create a personal access token in Asana's Developer Console under My apps → Personal access tokens. PATs inherit the creating user's visibility and have no scope picker, so use a dedicated integration user with access to every project you intend to select.", + "Asana PATs do not refresh automatically. Rotate by creating a replacement token, updating the connector, verifying a sync, and only then revoking the old token; removing the integration user immediately invalidates its token.", + "Pick the projects to sync after connecting. Tasks, subtasks, projects and comment stories become searchable; system-generated activity stories are skipped. The connector only reads Asana.", + "HydraDB uses Asana's privacy_setting to capture each selected project's read audience: public_to_workspace includes active, non-guest workspace members plus explicit project memberships; private includes explicit project memberships; deprecated private_to_team includes the project team's users plus explicit project memberships. Memberships can grant admins, editors, commenters, viewers or teams. If project attribution is missing, Asana omits or returns an unknown privacy setting, hides a member email, or a permission read is incomplete, HydraDB refuses a partial ACL and shows a resource-level warning under the current fail-open policy; the content remains workspace-readable unless a customer resource rule governs it. Use a dedicated integration user's personal access token that can read the selected project, its memberships, and member email addresses.", + "Asana quotas are per token (150 requests/minute on free domains and 1,500 on paid domains). Large comment/subtask histories fan out per task, so a dedicated token also keeps this connector from sharing quota with unrelated automations." + ] + }, + { + "provider": "monday", + "name": "Monday.com", + "indexed_object_types": [ + "items", + "assets" + ], + "setup_guide": [ + "Paste a Monday personal API token from Profile → Developers → My Access Tokens, or an OAuth token whose app has boards:read. A personal token inherits the user's board visibility; private boards the user cannot open will not appear in the picker.", + "A Monday personal token does not use an OAuth refresh flow. Rotate it by updating and validating the connector before revoking the prior token; OAuth installations must keep their provider refresh flow active.", + "Pick boards after connecting. Each active item becomes a searchable task containing its name and rendered column values, with board-relation columns represented as graph links. Archived/deleted items are not enumerable through Monday's board items_page API and can remain indexed until a full resync.", + "When Monday permission capture is disabled, selected board content is readable by everyone in the workspace with a persistent warning unless you set a resource access rule. Ask your administrator to enable Monday permission capture before relying on board restrictions.", + "When capture is enabled, board readers are captured from owners, subscribers, and subscribed teams. Main/public boards follow account membership; public boards in closed workspaces follow workspace membership. The token must read boards, users, teams, and workspaces (boards:read, users:read, teams:read, workspaces:read).", + "If a guest, team member, or workspace reader cannot be resolved to a complete user/email roster, resource ACL capture fails open with a persistent warning rather than storing a partial allow-list. Do not interpret board permissions as read access; those values govern editing.", + "Monday enforces GraphQL complexity budgets and daily API call limits that vary by token and account plan. The connector paginates and retries rate limits, but very large boards can require a longer sync interval." + ] + }, + { + "provider": "trello", + "name": "Trello", + "indexed_object_types": [ + "cards" + ] + }, + { + "provider": "smartsheet", + "name": "Smartsheet", + "indexed_object_types": [] + }, + { + "provider": "wrike", + "name": "Wrike", + "indexed_object_types": [ + "tasks", + "comments" + ] + }, + { + "provider": "clickup", + "name": "ClickUp", + "indexed_object_types": [ + "team", + "task", + "task_comment" + ], + "setup_guide": [ + "Create a personal API token under avatar → Settings → Apps → API Token. ClickUp personal tokens have no scope picker and inherit the user; use a dedicated account that can open every Workspace you intend to select.", + "ClickUp personal tokens have no refresh flow. Rotate by generating a replacement, updating the connector, verifying discovery and sync, and then revoking the old token; an OAuth installation must use ClickUp's refresh-token lifecycle instead.", + "Pick Workspaces after connecting. Tasks and subtasks are indexed with descriptions, status, assignees, priority, tags and list/folder context. Task comments are indexed as first-class comment documents with human author and parent-task context. ClickUp limits personal and OAuth tokens per Workspace plan, starting at 100 requests/minute on Free, Unlimited and Business.", + "HydraDB does not currently reproduce ClickUp guest or private Space/List/Task visibility. Synced tasks and comments are tenant-wide under the current fail-open policy, carry a persistent rbac_warning, and can be restricted with a HydraDB resource ACL for the selected Workspace." + ] + }, + { + "provider": "shortcut", + "name": "Shortcut", + "indexed_object_types": [ + "stories", + "project_stories", + "epics" + ] + }, + { + "provider": "notion", + "name": "Notion", + "indexed_object_types": [ + "pages" + ] + }, + { + "provider": "airtable", + "name": "Airtable", + "indexed_object_types": [], + "setup_guide": [ + "Create an Airtable Personal Access Token with data.records:read and schema.bases:read, then grant that token access to every base you want to select. Correct scopes alone do not grant base access. Legacy API keys are retired.", + "Airtable Personal Access Tokens have no refresh flow. Rotate by creating a replacement with the same scopes and base grants, updating the connector, validating discovery and sync, and then revoking the old token.", + "Pick bases after connecting. Every table record becomes a custom searchable object; record-link fields become graph links, attachment filenames remain in record text, and supported attachment file contents are downloaded through short-lived claim-check pointers and indexed. Oversized or unsupported files remain metadata-only without blocking the record.", + "HydraDB does not currently import Airtable base/workspace collaborators as ACLs. Synced records are tenant-wide unless you configure a HydraDB resource ACL for the selected base.", + "Airtable has no reliable modified timestamp in record payloads, so the connector uses LAST_MODIFIED_TIME() server-side windows. Formula fields that depend on external state can change without a record modification event and may require a full resync." + ] + }, + { + "provider": "confluence", + "name": "Confluence", + "indexed_object_types": [ + "content", + "attachments" + ] + }, + { + "provider": "coda", + "name": "Superhuman", + "indexed_object_types": [ + "docs", + "pages", + "page_contents", + "rows" + ] + }, + { + "provider": "contentful", + "name": "Contentful", + "indexed_object_types": [ + "entries", + "tasks" + ] + }, + { + "provider": "bookstack", + "name": "BookStack", + "indexed_object_types": [ + "books", + "pages", + "chapters" + ] + }, + { + "provider": "nextcloud", + "name": "Nextcloud", + "indexed_object_types": [ + "files" + ] + }, + { + "provider": "sharepoint", + "name": "SharePoint", + "indexed_object_types": [ + "pages", + "driveItems", + "listItems" + ], + "setup_guide": [ + "Register a Microsoft Entra app for app-only client credentials. Copy the Directory (tenant) ID, Application (client) ID, and a client-secret Value into tenant, client_id, and client_secret; the Secret ID is not the secret value.", + "Grant Microsoft Graph APPLICATION permissions Sites.Read.All and Files.Read.All, then grant tenant-wide admin consent. Sites.Read.All is required for site discovery, document libraries, and site pages; Files.Read.All is required for drive delta metadata and file-content download. Delegated permissions do not satisfy this connector.", + "Pick the SharePoint sites to sync. Site pages and document-library files become searchable with human site, library, path, author, and MIME metadata; IDs remain provenance and stable identity rather than reader-facing labels.", + "Lists on a selected site are indexed too: every row of every visible list becomes one document holding its column values under their display names. Document libraries, hidden lists and SharePoint's own system lists are skipped, and list row attachments are not downloaded.", + "Native SharePoint item and site permissions are not yet reproduced. Content stays tenant-public under the current fail-open policy and every source carries rbac_warning; configure a customer resource ACL for sites that must be restricted.", + "File changes use Graph drive delta and page changes use lastModifiedDateTime windows. Provider deletion signals are not fully converged into hard index deletion yet; this documented current limitation does not block initial or incremental ingestion." + ] + }, + { + "provider": "salesforce", + "name": "Salesforce", + "indexed_object_types": [ + "Opportunity", + "Lead", + "Account", + "Contact" + ] + }, + { + "provider": "hubspot", + "name": "HubSpot", + "indexed_object_types": [ + "deals", + "tickets", + "contacts", + "companies", + "notes", + "emails", + "calls", + "meetings", + "tasks" + ] + }, + { + "provider": "pipedrive", + "name": "Pipedrive", + "indexed_object_types": [ + "deals", + "persons", + "organizations", + "notes", + "activities", + "leads", + "projects", + "tasks" + ] + }, + { + "provider": "zendesk", + "name": "Zendesk", + "indexed_object_types": [ + "tickets", + "ticket_comments", + "satisfaction_ratings" + ] + }, + { + "provider": "gorgias", + "name": "Gorgias", + "indexed_object_types": [ + "tickets", + "messages" + ] + }, + { + "provider": "helpscout", + "name": "Help Scout", + "indexed_object_types": [ + "conversations", + "conversation_threads" + ] + }, + { + "provider": "intercom", + "name": "Intercom", + "indexed_object_types": [ + "conversations", + "conversation_parts", + "articles", + "tickets" + ], + "setup_guide": [ + "Use an Intercom private-app access token or OAuth token with Read conversations, Read and list users and companies, Read admins, Read and List articles, and Read tickets. The connector only reads.", + "Rotate a private-app token by replacing the connector secret and validating a sync before revoking the old token. OAuth installations must preserve refresh tokens and reauthorize if requested scopes or teammate visibility change.", + "Use the token of a teammate set to All conversations. Since July 2026, an OAuth token can read only conversations visible to the teammate who authorized it. Regenerate the token after changing that setting, or the index silently narrows.", + "Private teammate notes are excluded by default. When acl_supported is enabled for Intercom, each assigned conversation, conversation part and ticket is readable by its assignee and the members of its assigned team. Intercom's API does not expose which teammates can see all conversations, so this is a lower bound: such a teammate who is not the assignee or on the team is denied, never over-granted.", + "Unassigned conversations and tickets carry no ACL of their own and follow their resource. The workspace resource is public unless you set a HydraDB resource ACL on it. Help Center articles are unrestricted. An assignee or team that cannot be resolved makes no claim and carries an rbac_warning: the object then follows its resource, which is public for the workspace resource.", + "Intercom applies app/workspace rate limits and paginated-search limits that can vary by endpoint and plan. The connector honors 429 backoff; high-volume workspaces should avoid overlapping full syncs with other bulk exports." + ] + }, + { + "provider": "freshdesk", + "name": "Freshdesk", + "indexed_object_types": [ + "tickets", + "conversations" + ], + "setup_guide": [ + "Copy an agent API key from Freshdesk Profile settings and enter only the helpdesk subdomain: for acme.freshdesk.com, enter acme. The key has no scope picker and reads according to that agent's Global, Group or Restricted ticket scope.", + "Freshdesk API keys do not refresh automatically and are tied to the agent. Rotate by resetting or replacing the key, updating the connector, and validating a sync before disabling the prior agent credential.", + "Tickets and public replies become searchable and link back to the agent portal. Private agent notes are off by default because Freshdesk's per-agent visibility is not yet reproduced in HydraDB; when explicitly enabled they are indexed tenant-wide with an RBAC warning, so enable include_private_notes only when every tenant member may read them.", + "Freshdesk rate limits are account-wide and plan-dependent. The connector honors Retry-After on 429 responses; other apps in the same helpdesk consume the same quota." + ] + }, + { + "provider": "affinity", + "name": "Affinity", + "indexed_object_types": [ + "list_entries", + "notes" + ] + }, + { + "provider": "copper", + "name": "Copper", + "indexed_object_types": [ + "opportunities", + "leads", + "tasks", + "projects", + "people", + "companies", + "activities_search" + ] + }, + { + "provider": "kustomer", + "name": "Kustomer", + "indexed_object_types": [ + "conversations", + "messages" + ] + }, + { + "provider": "slack", + "name": "Slack", + "indexed_object_types": [ + "conversation_history" + ] + }, + { + "provider": "discord", + "name": "Discord", + "indexed_object_types": [ + "messages" + ], + "setup_guide": [ + "Create a Discord application and bot in the Developer Portal, reset/copy the bot token, and invite it to each server with OAuth2 scope bot. Grant View Channels and Read Message History on every selected channel; the connector is read-only and never sends messages.", + "Enable Message Content Intent under Developer Portal → Bot → Privileged Gateway Intents. The connector verifies the application flag and refuses to sync when it is absent instead of silently indexing empty content fields.", + "Pick the Discord servers to sync. Every readable message in their text and announcement channels, active threads, public archived threads, and joined private archived threads becomes a message source. User, role and channel mentions are rewritten to human display names; attachments contribute filenames but their bytes are not downloaded.", + "Discord bot tokens have no granular API scope picker and do not expire automatically. Rotate a leaked token in the Developer Portal. Discord enforces rate-limit buckets and the connector honors Retry-After before retrying.", + "Discord exposes no guild-member email addresses, so provider roles and channel overwrites cannot be mapped safely to HydraDB login emails. Under the current fail-open RBAC policy Discord sources are tenant-public with a persistent warning unless a customer HydraDB resource ACL is configured.", + "The REST history API exposes existing messages and edits but not deletion events. A deleted Discord message can remain indexed until the connector is rebuilt from a fresh snapshot; real-time deletion capture requires the Discord Gateway and is intentionally not claimed by this pull connector." + ] + }, + { + "provider": "gmail", + "name": "Gmail", + "indexed_object_types": [ + "messages" + ] + }, + { + "provider": "google_calendar", + "name": "Google Calendar", + "indexed_object_types": [ + "events" + ] + }, + { + "provider": "ms_graph", + "name": "Microsoft Teams & Outlook", + "indexed_object_types": [ + "channel_messages", + "chat_messages", + "mail_messages" + ], + "setup_guide": [ + "Connect with an Azure AD app registration (app-only, client credentials): in the Azure portal open Microsoft Entra ID → App registrations → New registration (any name, no redirect URI). Copy the Directory (tenant) ID as tenant and the Application (client) ID as client_id, then under Certificates & secrets create a client secret and paste its Value (shown once) as client_secret.", + "Under API permissions → Add a permission → Microsoft Graph → Application permissions (not Delegated) add Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, TeamMember.Read.All and ChannelMember.Read.All for Teams channels, User.ReadBasic.All plus Mail.Read for Outlook, and Chat.Read.All to offer people's Teams chats, then click Grant admin consent (a Global or Application Administrator). The connect step reads the token's roles and names any permission that is missing; a family whose permissions are absent simply does not appear in the picker.", + "Reading channel and chat messages with application permissions is a Microsoft Teams protected API: after consent, submit https://aka.ms/teamsgraph/requestaccess with the Application (client) ID and tenant ID (Microsoft usually answers within a week). Until it is approved every Teams sync fails with 403 even though the permission shows as granted; the picker and Outlook work regardless.", + "Pick the teams, the mailboxes and the people whose Teams chats to sync in the resource-selection step. A team syncs its standard channels (root posts and replies each become a message document, replies linked to their root); a mailbox syncs every message received in the history window outside Drafts, Junk Email, Deleted Items, Outbox and Conversation History, with text bodies and attachment names; a chat user syncs the 1:1, group and meeting chats they take part in. Chats are opted in per person on purpose: they are the most private surface Graph exposes.", + "Every message carries who may see it in Microsoft 365: the team's members for a standard channel, the channel's members (plus the teams it is shared with) for a private or shared channel, the participants for a chat, and the mailbox owner for mail. With acl_supported on for the provider, permission-aware search shows each message only to those people. A complete roster is authoritative; when Microsoft omits, truncates or refuses a roster, the message remains tenant-public under the current fail-open policy and carries a persistent rbac_warning instead of applying a partial allow-list.", + "Mail.Read grants the app every mailbox in the tenant. To limit it to the mailboxes you select, create an Exchange application access policy (New-ApplicationAccessPolicy -AppId -PolicyScopeGroupId -AccessRight RestrictAccess); a selected mailbox outside the policy fails the sync with a message naming the policy rather than syncing silently empty. Leave Mail.Read out entirely for a Teams-only connector.", + "Private and shared channels are skipped by default (Teams shows them only to their members); set include_private_channels to true to index them, restricted to their members.", + "Each sync reads only what changed: Graph orders a channel's posts by the last activity of the whole thread, so an old post that gets a new reply is picked up, and mail is filtered server-side on lastModifiedDateTime. Edits re-index the message. A message deleted in Teams, and mail moved to Deleted Items or Junk Email after it was indexed, is replaced by a hidden stub on the next sync; mail purged from Deleted Items leaves no trace until a full re-sync.", + "Rotate the client secret before it expires (Azure defaults to 6-24 months): an expired secret stops every sync with a message naming the fix. Pasting a new secret value re-enables the connector." + ] + }, + { + "provider": "outlook", + "name": "Outlook", + "indexed_object_types": [ + "mail_messages" + ], + "setup_guide": [ + "Connect with an Azure AD app registration (app-only, client credentials): in the Azure portal open Microsoft Entra ID → App registrations → New registration (any name, no redirect URI). Copy the Directory (tenant) ID as tenant and the Application (client) ID as client_id, then under Certificates & secrets create a client secret and paste its Value (shown once) as client_secret.", + "Under API permissions → Add a permission → Microsoft Graph → Application permissions (not Delegated) add User.ReadBasic.All and Mail.Read, then click Grant admin consent (a Global or Application Administrator). The connect step fails with a message naming them when either is missing.", + "Pick the mailboxes to sync in the resource-selection step. A mailbox syncs every message received in the history window outside Drafts, Junk Email, Deleted Items, Outbox and Conversation History, with text bodies and attachment names.", + "Every email carries who may see it in Microsoft 365: the mailbox owner. With acl_supported on for the provider, permission-aware search shows each email only to that person; when the owner cannot be resolved the email remains tenant-public under the current fail-open policy and carries a persistent rbac_warning.", + "Mail.Read grants the app every mailbox in the tenant. To limit it to the mailboxes you select, create an Exchange application access policy (New-ApplicationAccessPolicy -AppId -PolicyScopeGroupId -AccessRight RestrictAccess); a selected mailbox outside the policy fails the sync with a message naming the policy rather than syncing silently empty.", + "Each sync reads only what changed: mail is filtered server-side on lastModifiedDateTime. Mail moved to Deleted Items or Junk Email after it was indexed is replaced by a hidden stub on the next sync; mail purged from Deleted Items leaves no trace until a full re-sync.", + "Rotate the client secret before it expires (Azure defaults to 6-24 months): an expired secret stops every sync with a message naming the fix. Pasting a new secret value re-enables the connector." + ] + }, + { + "provider": "microsoft_teams", + "name": "Microsoft Teams", + "indexed_object_types": [ + "channel_messages", + "chat_messages" + ], + "setup_guide": [ + "Connect with an Azure AD app registration (app-only, client credentials): in the Azure portal open Microsoft Entra ID → App registrations → New registration (any name, no redirect URI). Copy the Directory (tenant) ID as tenant and the Application (client) ID as client_id, then under Certificates & secrets create a client secret and paste its Value (shown once) as client_secret.", + "Under API permissions → Add a permission → Microsoft Graph → Application permissions (not Delegated) add Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, TeamMember.Read.All, ChannelMember.Read.All and User.ReadBasic.All, plus Chat.Read.All to offer people's Teams chats, then click Grant admin consent (a Global or Application Administrator). The connect step reads the token's roles; without Chat.Read.All no chats appear in the picker.", + "Reading channel and chat messages with application permissions is a Microsoft Teams protected API: after consent, submit https://aka.ms/teamsgraph/requestaccess with the Application (client) ID and tenant ID (Microsoft usually answers within a week). Until it is approved every Teams sync fails with 403 even though the permission shows as granted; the picker works regardless.", + "Pick the teams and the people whose Teams chats to sync in the resource-selection step. A team syncs its standard channels (root posts and replies each become a message document, replies linked to their root); a chat user syncs the 1:1, group and meeting chats they take part in. Chats are opted in per person on purpose: they are the most private surface Graph exposes.", + "Every message carries who may see it in Microsoft 365: the team's members for a standard channel, the channel's members (plus the teams it is shared with) for a private or shared channel, and the participants for a chat. With acl_supported on for the provider, permission-aware search shows each message only to those people. A complete roster is authoritative; when Microsoft omits, truncates or refuses a roster, the message remains tenant-public under the current fail-open policy and carries a persistent rbac_warning instead of applying a partial allow-list.", + "Private and shared channels are skipped by default (Teams shows them only to their members); set include_private_channels to true to index them, restricted to their members.", + "Each sync reads only what changed: Graph orders a channel's posts by the last activity of the whole thread, so an old post that gets a new reply is picked up. Edits re-index the message. A message deleted in Teams after it was indexed is replaced by a hidden stub on the next sync.", + "Rotate the client secret before it expires (Azure defaults to 6-24 months): an expired secret stops every sync with a message naming the fix. Pasting a new secret value re-enables the connector." + ] + }, + { + "provider": "zoom", + "name": "Zoom", + "indexed_object_types": [ + "cloud_recordings", + "meetings", + "webinars" + ] + }, + { + "provider": "fireflies", + "name": "Fireflies", + "indexed_object_types": [ + "transcripts" + ] + }, + { + "provider": "granola", + "name": "Granola", + "indexed_object_types": [ + "notes" + ] + }, + { + "provider": "avoma", + "name": "Avoma", + "indexed_object_types": [ + "meetings", + "scorecard_evaluations" + ] + }, + { + "provider": "loom", + "name": "Loom", + "indexed_object_types": [ + "videos" + ] + }, + { + "provider": "bigquery", + "name": "BigQuery", + "indexed_object_types": [], + "setup_guide": [ + "Connect with a service-account key: paste the downloaded key file as credentials_json (grant the account the BigQuery Data Viewer and BigQuery Job User roles). client_email + private_key, or client_id + client_secret + refresh_token, also work.", + "Pick which tables to sync in the resource-selection step; each table's rows become searchable documents.", + "Replication is configured PER TABLE, alongside the selection: pass table_configs on POST /connectors/{id}/configure — the same request that selects the tables — with exactly one mode per table. The dashboard collects this on the table-selection screen.", + "Tables with a timestamp column that changes on every insert/update (updated_at, modified_ts, …): make it the sync cursor — table_configs: [{\"table\": \"dataset.table\", \"replication_key\": \"updated_at\"}] — and each sync reads only new and changed rows.", + "Append-only tables with no such column: use {\"table\": \"dataset.table\", \"change_history\": \"appends\"}. New rows stream from BigQuery's own change log — no schema change, no setup.", + "Tables that also receive UPDATEs but have no cursor column: use {\"table\": \"dataset.table\", \"change_history\": \"changes\"} instead, and run this once in BigQuery (no schema change, does not touch your data): ALTER TABLE dataset.table SET OPTIONS(enable_change_history=true).", + "Change-history backfill never blocks live syncing: changes are captured from the moment you connect, while existing rows backfill in the background in bounded slices per sync cycle. On a very large table the full backfill can take many cycles — expect it to be slow. To skip it, add \"snapshot\": \"none\" to that table's table_configs entry (only rows that change after connecting are indexed), or \"snapshot\": 10000 to cap the backfill at that many rows.", + "Fleet-wide fallbacks (optional, credential fields): a top-level \"replication_key\" applies that cursor to every synced table that has the column; \"change_history\" (\"appends\" | \"changes\") covers tables that still have no cursor. Per-table table_configs override both.", + "A table with no cursor and no change_history re-reads in full every sync cycle — fine for small reference tables, expensive for large ones. The dashboard requires a mode per table; API/SDK consumers should always send table_configs (or the fleet-wide fields)." + ] + }, + { + "provider": "google_sheets", + "name": "Google Sheets", + "indexed_object_types": [ + "spreadsheet_metadata", + "sheet_data" + ] + }, + { + "provider": "google_drive", + "name": "Google Drive", + "indexed_object_types": [ + "files" + ] + }, + { + "provider": "google_search_console", + "name": "Google Search Console", + "indexed_object_types": [ + "performance_report_query", + "performance_report_page", + "performance_report_date", + "performance_report_country", + "performance_report_device", + "performance_report_keys" + ] + }, + { + "provider": "googleads", + "name": "Google Ads", + "indexed_object_types": [ + "accessible_customers", + "customer_hierarchy", + "customer", + "customer_label", + "label", + "campaign_history", + "campaign_budget", + "campaign_criterion", + "campaign_label", + "campaign_performance", + "campaign_performance_by_age_range_and_device", + "campaign_performance_by_gender_and_device", + "campaign_performance_by_location", + "adgroups", + "ad_groups_performance", + "ad_group_ad", + "ad_group_ad_label", + "ad_group_criterion", + "ad_group_label", + "ad_listing_group_criterion", + "audience", + "user_interest", + "geo_performance", + "geo_target_constant", + "keyword_view", + "managed_placement_view", + "search_term_view", + "video", + "click_view_report" + ] + }, + { + "provider": "mixpanel", + "name": "Mixpanel", + "indexed_object_types": [ + "export", + "funnels", + "revenue", + "cohorts", + "annotations" + ] + }, + { + "provider": "amplitude", + "name": "Amplitude", + "indexed_object_types": [ + "events" + ] + }, + { + "provider": "gong", + "name": "Gong", + "indexed_object_types": [ + "calls", + "answered_scorecards", + "library_calls" + ], + "setup_guide": [ + "Connect with a Gong API key pair: in Gong's Admin center open Settings → Ecosystem → API → API keys → Get API key. Only a Gong technical administrator can create one. Copy the Access Key and the Access Key Secret (the secret is shown once) and pass them as access_key and access_key_secret.", + "When creating the key, leave the TTL empty: a key minted with an expiry stops the connector on that date and every sync after it fails with 401 until a new key is pasted. Leave Trusted IPs empty too, unless you add HydraDB's egress addresses; a list that excludes them fails every request with 403.", + "The same page shows your company's API base URL. If it is not https://api.gong.io (Gong assigns some companies their own host, e.g. https://us-12345.api.gong.io), pass it as api_base_url; only *.api.gong.io hosts are accepted.", + "Gong API keys are company-wide and have no scope picker, so there is nothing to under- or over-grant. The connector reads calls (metadata, CRM context, AI brief, outline, highlights, key points, outcome, public comments, transcript), users, workspaces, the call library and coaching scorecards; it never writes to Gong and never downloads media.", + "Pick the Gong workspaces to sync in the resource-selection step; most companies have one. Each recorded call becomes one document whose body is the transcript plus Gong's summary content; each completed coaching scorecard review becomes a document linked to its call; each call filed in a public library folder becomes a document carrying the curator's note.", + "Calls Gong marks private, and coaching reviews whose visibility is not PUBLIC, are skipped by default (Gong shows them only to their owner, participants or managers). Set include_private_calls to true to index them as well.", + "Gong publishes no modified-since filter and finishes transcripts, briefs and comments after the call itself appears, so every sync re-reads the last transcript_settle_hours (default 24) of calls and re-indexes the ones whose content changed. Raise it to catch later comments, lower it (or 0) to save requests on a very high-volume account: Gong allows 10,000 API calls per company per day, shared with every other integration you run. Because of that cap, a Gong connector syncs at most every 30 minutes (the default is hourly).", + "Not synced, because Gong's API does not expose them: emails and digital interactions, Gong Engage flows and tasks, forecasts, and deleted calls (a call removed in Gong stays indexed until the connector is re-synced from scratch)." + ] + }, + { + "provider": "guru", + "name": "Guru", + "indexed_object_types": [ + "cards" + ], + "setup_guide": [ + "Connect with a Guru API token: in Guru open Manage → Apps & Integrations → API Access and click Generate User Token (Admins, and roles with the Manage Apps & Integrations permission, can generate one, including on behalf of another user). A user token pairs the Guru username, usually the email, with the token (pass them as email and api_token) and reads exactly what that user can read; there is no scope picker. A collection token pairs the collection ID with the token (pass them as collection_id and api_token) and is read-only, scoped to that one collection; the connector then offers only that collection. Set exactly one of email or collection_id.", + "Pick the collections to sync in the resource-selection step; each card becomes one searchable document carrying its collection, folders, tags, verification state, verifiers, owner and comment count. Comment threads and replies are separate searchable comment documents linked to their card with comment_on and to their parent thread with reply_to, not embedded into the card. Each sync picks up cards edited, re-verified or commented on since the last one.", + "With permission-aware search on, each collection is restricted to the members of the Guru groups that can open it. Reading that needs the user token of a Guru Admin or of the collection's owner. With a collection token, or a member's token Guru refuses, the collection stays readable by everyone in this workspace and the connector shows a warning naming the token to use, until you reconnect with one or set an access rule on the resource.", + "Restricted (PRIVATE) cards are skipped by default: Guru shows them only to their author and the people they are shared with. Set include_private_cards to index them too; each is then indexed with exactly that audience (author and live collaborators, groups expanded to their members), enforced while permission-aware search is on. A card whose audience cannot be read completely is still indexed, with its collection's access." + ] + }, + { + "provider": "klaviyo", + "name": "Klaviyo", + "indexed_object_types": [ + "campaigns", + "flows", + "lists", + "segments", + "templates", + "profiles" + ] + }, + { + "provider": "mailchimp", + "name": "Mailchimp", + "indexed_object_types": [ + "campaigns", + "lists", + "automations" + ] + }, + { + "provider": "segment", + "name": "Segment", + "indexed_object_types": [ + "source_api_calls_daily", + "workspace_api_calls_daily", + "events_volume_daily", + "source_mtu_usage_daily", + "workspace_mtu_usage_daily" + ] + }, + { + "provider": "sendgrid", + "name": "SendGrid", + "indexed_object_types": [ + "single_sends", + "lists", + "segments", + "templates" + ] + }, + { + "provider": "iterable", + "name": "Iterable", + "indexed_object_types": [ + "campaigns", + "lists", + "templates" + ] + }, + { + "provider": "linkedin_ads", + "name": "LinkedIn Ads", + "indexed_object_types": [ + "accounts", + "account_users", + "ad_analytics_by_campaign", + "ad_analytics_by_creative", + "campaigns", + "campaign_groups", + "creatives", + "video_ads" + ] + }, + { + "provider": "surveymonkey", + "name": "SurveyMonkey", + "indexed_object_types": [ + "survey_details", + "simplified_responses" + ], + "setup_guide": [ + "Use a SurveyMonkey app access token with View Surveys (surveys_read) and View Response Details (responses_read_detail). A draft app token expires after 90 days unless the app is deployed.", + "Before a draft token expires, replace it in the connector and validate discovery and sync; deployed OAuth apps must retain their refresh-token flow and reauthorize when scopes change.", + "Pick surveys after connecting. The full questionnaire and human-readable response answers are indexed; collectors and contacts are not. Basic accounts expose at most 25 detailed responses per survey through the API, while paid plans allow the complete response history.", + "HydraDB does not currently import SurveyMonkey team sharing as ACLs. Survey questions and responses are tenant-wide unless you configure a HydraDB resource ACL for the selected survey." + ] + }, + { + "provider": "typeform", + "name": "Typeform", + "indexed_object_types": [ + "forms", + "responses", + "partial_responses" + ] + }, + { + "provider": "posthog", + "name": "PostHog", + "indexed_object_types": [ + "persons", + "cohorts", + "feature_flags", + "annotations" + ] + }, + { + "provider": "pendo", + "name": "Pendo", + "indexed_object_types": [ + "accounts", + "events", + "feature_events", + "features", + "guide_events", + "guides", + "metadata_accounts", + "metadata_visitors", + "page_events", + "pages", + "poll_events", + "track_events", + "track_types", + "visitor_history", + "visitors" + ] + }, + { + "provider": "stripe", + "name": "Stripe", + "indexed_object_types": [ + "invoices", + "customers", + "subscriptions", + "charges" + ] + }, + { + "provider": "quickbooks", + "name": "QuickBooks", + "indexed_object_types": [ + "Invoice", + "Customer", + "Payment", + "Bill", + "Attachable" + ] + }, + { + "provider": "xero", + "name": "Xero", + "indexed_object_types": [ + "invoices", + "contacts", + "payments", + "bank_transactions", + "invoice_attachments", + "contact_attachments", + "bank_transaction_attachments" + ] + }, + { + "provider": "chargebee", + "name": "Chargebee", + "indexed_object_types": [ + "invoices", + "customers", + "subscriptions", + "transactions" + ] + }, + { + "provider": "recurly", + "name": "Recurly", + "indexed_object_types": [ + "invoices", + "accounts", + "subscriptions", + "transactions" + ] + }, + { + "provider": "netsuite", + "name": "NetSuite", + "indexed_object_types": [ + "Invoice", + "Customer", + "Accounts", + "VendorBills" + ] + }, + { + "provider": "marketo", + "name": "Marketo", + "indexed_object_types": [ + "campaigns", + "programs", + "lists" + ] + }, + { + "provider": "pardot", + "name": "Pardot", + "indexed_object_types": [ + "opportunities", + "prospects", + "prospect_accounts" + ] + }, + { + "provider": "okta", + "name": "Okta", + "indexed_object_types": [ + "users", + "groups", + "applications", + "system_logs" + ], + "setup_guide": [ + "Create an API token: Okta admin console → Security → API → Tokens → Create Token. There is no scope picker and no role selector on that dialog — the token silently inherits the role of whoever creates it.", + "That inheritance is the thing to get right. To get a least-privilege token you must be signed in AS a Read-only Administrator when you mint it; minting as a Super Admin gives you a Super Admin token with nothing in the UI saying so. Check the Role column in the token list afterwards to confirm what you actually created.", + "The create form has a required dropdown, \"API calls made with this token must originate from\". Leaving it unset fails with only \"We found some errors\" and no indication of which field. Choose Any IP unless you have defined an Okta network zone covering HydraDB's egress addresses.", + "Set the org URL to your own org host, keeping the /api/v1/ path and the trailing slash: https://.okta.com/api/v1/ . The -admin host answers the API too, so either hostname works — the path and trailing slash are the part that matters.", + "Two expiry traps. The token is bound to its creating user, so deactivating that person breaks the sync with 403s. And Okta expires a token after 30 days of no use, while the admin session itself is short-lived — so mint it and paste it in one sitting.", + "Nothing is picked after connecting: Okta syncs the whole org. Users, groups, applications and system log events are indexed, with group membership, app assignments and MFA enrolment folded into the user, group and application records." + ] + }, + { + "provider": "bamboohr", + "name": "BambooHR", + "indexed_object_types": [ + "employees", + "time_off_requests", + "whos_out" + ] + }, + { + "provider": "greenhouse", + "name": "Greenhouse", + "indexed_object_types": [ + "candidates", + "applications", + "jobs", + "interviews", + "offers" + ] + }, + { + "provider": "launchdarkly", + "name": "LaunchDarkly", + "indexed_object_types": [ + "feature_flags", + "audit_log", + "segments", + "environments", + "members", + "teams" + ], + "setup_guide": [ + "Create the token in LaunchDarkly under Account settings → Authorization → Access tokens → Create token. LaunchDarkly has no scope checkboxes: a token carries a ROLE, and the role is the whole decision.", + "Set Role to Reader, which is the default. Reader is all this connector needs — verified against the API, every endpoint it calls answers 200 with a read-only token. Writer or Admin add only write access, so they buy you nothing and let a leaked token turn your flags on and off.", + "Tick \"This is a service token\". A personal token inherits the role of whoever minted it and stops working the moment that person is deactivated, which is the most common way this connection breaks. The token is shown once — copy it before closing the dialog.", + "After connecting, pick the projects to sync. Everything project-scoped follows that choice: the project's flags, its environments, and its segments.", + "Some data is account-wide and is always synced, whatever you pick: the audit log, account members and teams. Members and teams are what let a flag's maintainer resolve to a person or a group rather than a raw id.", + "Flags are indexed with their real targeting, per environment — on/off state, the default variation or percentage rollout, individual targets, prerequisite flags and each rule, including which segment a rule matches. Segments are indexed alongside, so \"who is this flag on for\" is answerable end to end.", + "Two things are deliberately never indexed. An environment's SDK key and mobile key are dropped before they leave the tap, because they are live credentials for your own environment. So are a member's MFA state and whether they have a password.", + "A brand-new LaunchDarkly organization has one empty default project and no flags, so a correctly configured connector on a new org indexes almost nothing. That is the org being empty, not the token being wrong.", + "With permission-aware search on, each project is restricted to the members who can view it in LaunchDarkly: their base role, custom roles (preset roles included), team roles and permission grants are evaluated the way LaunchDarkly does. Flags, segments and environments follow their project, and so does each audit log entry about one project; members, teams and account-level audit entries are not restricted. Invited members who have not joined yet are not included. The token's role must read projects, members, teams and custom roles (the built-in Reader can). A role this evaluation cannot read exactly makes every project readable by everyone in your workspace, with a warning on the connector naming it." + ] + }, + { + "provider": "lever", + "name": "Lever", + "indexed_object_types": [ + "opportunities", + "candidates", + "postings", + "contacts", + "candidate_applications", + "candidate_referrals" + ] + }, + { + "provider": "workday_raas", + "name": "Workday RaaS", + "indexed_object_types": [ + "workers", + "employees" + ] + }, + { + "provider": "crossbeam", + "name": "Crossbeam", + "indexed_object_types": [ + "account", + "lead", + "partner_account", + "partner_lead" + ] + }, + { + "provider": "figma", + "name": "Figma", + "indexed_object_types": [ + "files" + ] + }, + { + "provider": "dropbox", + "name": "Dropbox", + "indexed_object_types": [ + "files" + ] + }, + { + "provider": "box", + "name": "Box", + "indexed_object_types": [ + "folder_items" + ] + }, + { + "provider": "tableau", + "name": "Tableau", + "indexed_object_types": [ + "datasources", + "groups", + "projects", + "schedules", + "tasks", + "users", + "workbooks", + "workbooks_metadata", + "published_datasources_metadata", + "embedded_datasources_metadata", + "custom_sql_locations_metadata", + "users_metadata", + "calculated_fields_metadata", + "column_lineage_metadata" + ] + }, + { + "provider": "dynamics", + "name": "Microsoft Dynamics 365", + "indexed_object_types": [ + "accounts", + "contacts", + "leads", + "opportunities" + ] + }, + { + "provider": "outreach", + "name": "Outreach", + "indexed_object_types": [ + "opportunities", + "prospects", + "accounts", + "tasks" + ] + }, + { + "provider": "ringcentral", + "name": "RingCentral", + "indexed_object_types": [ + "messages", + "call_logs" + ] + }, + { + "provider": "twilio", + "name": "Twilio", + "indexed_object_types": [ + "messages", + "calls", + "conferences", + "alerts" + ] + }, + { + "provider": "servicenow", + "name": "ServiceNow", + "indexed_object_types": [ + "kb_knowledge", + "sc_cat_item", + "incident", + "problem", + "change_request", + "sc_request", + "sc_req_item", + "sc_task" + ] + }, + { + "provider": "codat", + "name": "Codat", + "indexed_object_types": [ + "invoices", + "customers", + "bills", + "payments" + ] + }, + { + "provider": "calendly", + "name": "Calendly", + "indexed_object_types": [ + "scheduled_events" + ] + }, + { + "provider": "attio", + "name": "attio", + "indexed_object_types": [ + "records", + "list_entries", + "notes", + "tasks", + "comments", + "list_entry_comments", + "meetings", + "call_transcripts" + ], + "setup_guide": [ + "Connect with a workspace API key: Attio workspace settings → Developers → API keys. The key is static and does not expire, so this connection never needs reconnecting.", + "Grant the key the read scopes for records, objects, lists, list entries, notes, tasks, comments and users. A key missing a scope fails with a 403 that names it — granting them all up front is faster than finding out one at a time.", + "Pass the key as access_token. Objects (people, companies, deals, custom ones) and lists are picked in the resource-selection step after connecting — leaving the objects/lists credential fields empty is the normal path.", + "With permission-aware search on, a private list's entries are restricted to the workspace's admins and the members the list is shared with; a list shared with the whole workspace, and every record, note, task, comment and meeting, is readable by everyone in your workspace. Attio's API does not expose team grants, so a member who reaches a list only through a team does not see it here. The key needs the List Configuration: Read and User Management: Read scopes; without them the list is readable by everyone, with a warning, until you reconnect." + ] + }, + { + "provider": "eloqua", + "name": "eloqua", + "indexed_object_types": [ + "campaigns", + "emails", + "forms" + ] + }, + { + "provider": "ga4", + "name": "Google Analytics", + "indexed_object_types": [ + "website_overview", + "traffic_sources", + "locations", + "four_weekly_active_users", + "weekly_active_users", + "daily_active_users", + "devices", + "transactions", + "pages" + ] + }, + { + "provider": "twitter", + "name": "twitter", + "indexed_object_types": [ + "posts", + "dms" + ], + "setup_guide": [ + "You bring your own X developer app: X bills API reads per record to the app owner ($0.005/post, $0.010/user read), so the connector never fronts a shared app.", + "Posts only (recommended): in the X developer portal open Projects & Apps → your app, and complete 'User authentication settings' once if it is empty — that is what creates the app's OAuth 2.0 client. Then on the Keys and tokens page, in the 'OAuth 2.0 Client ID and Client Secret' section, copy the Client ID and Generate the Client Secret (X shows it only once) — pass them as client_id and client_secret. Do NOT use the API Key and API Key Secret listed above them: those are OAuth 1.0a keys and will not work. The connector mints its own app-only token from them on every sync; nothing expires, so this connection never needs reconnecting. Add the handles to follow (any public account).", + "Direct messages additionally need an OAuth2 user-context token — X serves DMs to no other auth scheme. First set the app's permissions to 'Read and write and Direct message' (User authentication settings): that setting is what allows the dm.read scope to be granted at all, and changing it later invalidates tokens already issued. Set the app type to the confidential-client option (Web App, Automated App or Bot) so the app has a client secret — both the app-only mint and token refresh require one.", + "Then, for your own account, generate the token pair straight from the portal: the Keys and tokens page has an OAuth 2.0 token generator — pick the scopes (dm.read tweet.read users.read offline.access) and it returns the access token and refresh token together. offline.access is the scope that produces the refresh token. To read a DIFFERENT account's inbox, that account must instead complete the authorization-code flow against your app once, since the portal only issues tokens for the logged-in account.", + "Pass the resulting tokens as access_token AND refresh_token, alongside client_id and client_secret. The access token expires after ~2 hours; the refresh token is what lets the platform renew it indefinitely. A DM connector without refresh_token stops syncing when the access token expires.", + "DM ingest is an explicit opt-in: even with a user token, the inbox appears as its own resource in the selection step and is never synced unless selected.", + "History limits are X's, not ours: the DM API serves only the most recent 30 days of events, so a DM backfill reaches back at most 30 days (the dashboard caps the history window accordingly); post timelines reach roughly the 3,200 most recent posts per account.", + "Spend guards: max_posts_per_account_per_sync (default 500) and max_dms_per_sync (default 1000) cap billed reads per sync and log a warning when hit; sync_profiles is off by default because a user read costs double a post read." + ] + }, + { + "provider": "uservoice", + "name": "uservoice", + "indexed_object_types": [ + "suggestions", + "comments" + ] + }, + { + "provider": "zoho-crm", + "name": "Zoho CRM", + "indexed_object_types": [ + "deals", + "leads", + "contacts", + "accounts", + "notes" + ] + }, + { + "provider": "zuora", + "name": "zuora", + "indexed_object_types": [ + "Invoice", + "Account", + "Subscription", + "Payment" + ] + }, + { + "provider": "supabase", + "name": "Supabase", + "indexed_object_types": [], + "summary": "Selected table row changes arrive through database webhooks. There is no history backfill.", + "setup_guide": [ + "List the tables you want indexed, one per line, as schema.table, for example public.customers. Always include the schema.", + "In your Supabase project, install the Database Webhooks integration if it is not already installed.", + "Establish the connection in the HydraDB dashboard, then select the tables you want to sync.", + "Run the SQL command generated by the dashboard in the Supabase SQL editor to add a trigger for each table. Replace the API key placeholder with your HydraDB API key.", + "Only changes made after connecting are reflected. Existing rows are sent when they are updated; there is no historical backfill." + ] + } + ] +} diff --git a/scripts/connector_pages/airtable.json b/scripts/connector_pages/airtable.json new file mode 100644 index 00000000..7443b5a9 --- /dev/null +++ b/scripts/connector_pages/airtable.json @@ -0,0 +1,184 @@ +{ + "description": "Sync rows from every table in the Airtable bases you choose, one document per row. Airtable permissions are not imported.", + "opening": [ + "Sync the rows of every table in the Airtable bases you select. Each row is one document, with its field values written as labelled lines of text. A linked-record field links the row to the rows it references. Attachment file names are searchable, and a file's text can be added when it can be downloaded and read.", + "Airtable permissions are not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. You cannot pick single tables: every table in a selected base is synced. A row's date is when it was created, not when it was last edited. Rows deleted in Airtable stay in HydraDB." + ], + "callouts": { + "synced": { + "kind": "warning", + "text": "Give every field in a table a distinct name. Field names are lowercased and their spaces and punctuation simplified before they are written. Two fields whose names then match can overwrite each other, and a field whose name becomes `id` can replace the record id that identifies the row." + } + }, + "permissions": { + "carried": false, + "notes": [ + "Airtable base and workspace collaborators, sharing and interface permissions are not reproduced. Set an access rule on each base that must be restricted.", + "Every synced row carries `additional_metadata.rbac_warning`, a notice that Airtable collaborators were not captured." + ] + }, + "connect": { + "auth": "Airtable uses a personal access token.", + "credentials": [ + { + "name": "token", + "type": "secret string", + "required": true, + "text": "An Airtable personal access token with the scopes below and access to the bases you want synced." + } + ], + "credentials_note": "Personal access tokens do not refresh. To rotate one, create a replacement with the same scopes and bases, update the connector, check that the bases still list and sync, then revoke the old token.", + "permissions_label": "Scopes for the token", + "permissions": [ + { + "name": "data.records:read", + "text": "reads the rows of each table." + }, + { + "name": "schema.bases:read", + "text": "lists bases, their tables and their fields." + } + ], + "permissions_note": "Scopes alone do not open a base. Add every base you want synced to the token.", + "steps": [ + { + "title": "Create a personal access token", + "text": "In Airtable, create a personal access token with `data.records:read` and `schema.bases:read`." + }, + { + "title": "Give it your bases", + "text": "Add every base you want synced to the token." + }, + { + "title": "Create the connector", + "text": "Paste the token as `token`." + }, + { + "title": "Select bases", + "text": "HydraDB lists the bases the token can reach. Select the bases to sync. Every table in a selected base is synced. To reach rows older than 30 days, raise `lookback_days` when you select them." + } + ], + "account": "One connector reads the bases one personal access token can reach." + }, + "sync": { + "first_sync": "Each selected base reads back the window set by `lookback_days`, 30 days by default, measured by each row's last modified time.", + "changes": "Each sync reads every table in the base and picks up the rows modified since the last sync.", + "edits": "A modified row is sent again and replaces its document. A formula or rollup value that changes because of another table, or because time passed, does not count as a modification of the row. It stays out of date until the row itself is edited.", + "deletes": "Deleted rows are not removed. A row deleted in Airtable stays searchable in HydraDB." + }, + "documents": [ + { + "name": "Rows", + "kind": "custom", + "one_document": "One row of a table in a selected base.", + "title": "The row's field named `name`, `title` or `subject`. Otherwise the first non-empty field in alphabetical order, skipping linked-record fields. A row with none is titled `Airtable record` and its id.", + "text": "The title, then one line per non-empty field in alphabetical order, as the field name in title case and its value. Lists are joined with commas. An object shows its name, title, text, file name, email or URL. An attachment field shows file names only. Linked-record fields are left out of the text, because they become graph connections. Numbers are written with at most six decimal places. Fields are searchable as text, not as separate filters.", + "date": "When the row was created. Airtable rows carry no last-edited time.", + "link_back": "None.", + "files": "Files in attachment fields are downloaded and read when they are hosted by Airtable, can be downloaded and are of a supported type. A file that is missing, too large or unsupported keeps only its name in the row text.", + "attributes": [ + { + "name": "Attachments", + "uses": [ + "Searchable text" + ], + "text": "File names in the row text, plus the text read from each file that could be read." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the row was created. Used as the result date, so ranking by date reflects creation, not the last edit. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The table as base id and table id joined by a colon. Limits a query to one table, and stays the same when the table is renamed. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The table name. Limits a query to one table by name. Two tables can share a name, so use the id keys to tell them apart. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `table`. Not searchable." + }, + { + "name": "additional_metadata.airtable_base_id", + "uses": [ + "Query filter" + ], + "text": "The base id, which starts with `app`. Limits a query to one base. Not searchable." + }, + { + "name": "additional_metadata.airtable_table_id", + "uses": [ + "Query filter" + ], + "text": "The table id. Limits a query to one table by id. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "A notice that Airtable collaborators were not captured. Present on every row. It neither grants nor denies access. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's rows. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `airtable`. Not searchable." + }, + { + "name": "Linked records", + "uses": [ + "Graph connection" + ], + "text": "Each linked-record field links the row to the rows it references, across tables in the same base. The field is not kept as searchable text. Not searchable." + } + ] + } + ], + "example_searches": [ + "Which rows in the Customers table are on the Enterprise plan?", + "What is the status and owner of the Website relaunch project?", + "Which tasks are linked to the Q3 Launch project?" + ], + "graph": { + "connections": [ + "A row to each row it references through a linked-record field, across tables in the same base.", + "No links to items in other tools." + ], + "people": [ + "No people are attached. Collaborator, user and person fields are written as text, by name or email." + ], + "from_text": "Every field value in the row's text, and the text read from attached files." + }, + "not_synced": [ + "Bases you did not select.", + "Rows last modified before the `lookback_days` window on the first sync.", + "Comments on records and revision history.", + "Base and workspace collaborators.", + "Field types and field descriptions.", + "A link back to the row in Airtable.", + "Deletions: deleted rows stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/asana.json b/scripts/connector_pages/asana.json new file mode 100644 index 00000000..49b3f156 --- /dev/null +++ b/scripts/connector_pages/asana.json @@ -0,0 +1,361 @@ +{ + "description": "Sync tasks, subtasks, comments and project overviews from the Asana projects you choose. Asana permissions are not imported.", + "opening": [ + "Sync tasks, subtasks, comments and project overviews from the Asana projects you select. Each task and subtask is one document. Each comment on a task is its own document, linked to the task. Each project is one overview page. Tasks link to their parent task, their projects and the tasks they block or are blocked by.", + "Asana permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. A task in two selected projects is stored once per project. Attachments, task activity other than comments, tags and custom fields are not synced. Items deleted in Asana stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "Asana project privacy, project membership and per-task visibility are not reproduced. Set an access rule on each project that should be restricted.", + "A task in two selected projects is stored as one copy per project, and each copy follows its own project's rule." + ] + }, + "connect": { + "auth": "Asana uses a personal access token. It has no scopes to choose: it sees what its user sees.", + "credentials": [ + { + "name": "personal_access_token", + "type": "secret string", + "required": true, + "text": "An Asana personal access token." + } + ], + "credentials_note": "Asana limits requests per token: 150 a minute on free domains and 1,500 on paid ones. A dedicated token keeps this connector from sharing that limit with other automations. To rotate it, create a new token, update the connector, check that a sync succeeds, then revoke the old token. Removing the token's user invalidates the token.", + "steps": [ + { + "title": "Create a token", + "text": "In Asana's Developer Console, under My apps, Personal access tokens, create a token. A dedicated integration user works best. Add that user to every project you plan to select." + }, + { + "title": "Create the connector", + "text": "Paste the token as `personal_access_token`." + }, + { + "title": "Select projects", + "text": "HydraDB lists every non-archived project in every workspace the token can see. Select the projects to sync." + } + ], + "account": "One connector reads what one token's Asana user can see, across that user's workspaces." + }, + "sync": { + "first_sync": "A newly selected project reads back the window set by `lookback_days`, 30 days by default, measured on when tasks and projects were last modified.", + "changes": "Each sync reads the tasks, subtasks and projects modified since the last sync. Comments are read again on every sync, without a time window.", + "edits": "An edited task or project is picked up through its modified time and updates its document. An edited comment is picked up because comments are read again on every sync.", + "deletes": "Tasks, comments and projects deleted in Asana stay searchable in HydraDB.", + "notes": [ + "A project that refuses access on the first request is skipped and reported, and its unread window is kept for a later sync." + ] + }, + "documents": [ + { + "name": "Tasks and subtasks", + "kind": "ticket", + "one_document": "One task or subtask, as it appears in one selected project. Its comments are separate documents.", + "title": "The task name, or `Asana task` and its id when the name is empty.", + "text": "The task notes as plain text. A task with no notes gets a short summary instead: name, assignee, due date, status (`Open` or `Completed`) and projects. A subtask ends with a `Parent task` line that names its parent. The assignee, creation date, task key and parent are written as lines too. The title is searchable too.", + "date": "When the task was last modified, or when it was created if there is no modification time.", + "link_back": "The task's Asana permalink.", + "files": "Task attachments and their contents are not synced.", + "attributes": [ + { + "name": "Task key", + "uses": [ + "Searchable text" + ], + "text": "The selected project's id and the task's id. It keeps each project's copy of the task on its own document." + }, + { + "name": "assignee", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The assigned user's display name, written as the `Assignee` line. The graph records that person as the assignee." + }, + { + "name": "completed", + "uses": [ + "Searchable text" + ], + "text": "Whether the task is done. Searchable as `Open` or `Completed` only in the summary of a task with no notes. It is not a filter." + }, + { + "name": "due_at", + "uses": [ + "Searchable text" + ], + "text": "The due time, or the due date. Searchable only in the summary of a task with no notes. It is not a filter." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the task was created, written into the task details. Sets the result date only when there is no modification time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the task was last modified. Sets the result date and decides when a sync picks the task up. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "For a subtask, its parent task, written as the `Parent` line. Links the subtask to its parent." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Display names of people @mentioned in the task notes. The graph records each as mentioned by the task. The field itself is not searchable, but the notes are." + }, + { + "name": "additional_metadata.asana_gid", + "uses": [ + "Query filter" + ], + "text": "The task's Asana id. Picks out one task, in every project it was synced from. Not searchable." + }, + { + "name": "additional_metadata.assignee_gid", + "uses": [ + "Query filter" + ], + "text": "The assigned user's Asana id. Limits a query to tasks assigned to one person. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `asana`. Not searchable." + }, + { + "name": "completed_at", + "uses": [ + "Stored only" + ], + "text": "When the task was completed." + } + ] + }, + { + "name": "Comments", + "kind": "comment", + "one_document": "One comment on a task. A task in two selected projects has a copy of each comment per project.", + "title": "`Comment by on `, leaving out whichever part is missing.", + "text": "The comment as plain text, then a `Parent task` line that names the task. The author, the posting time and the task's key are written with it.", + "date": "When the comment was posted.", + "link_back": "None.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The commenter's display name. The graph records the comment as written by that person." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the comment was posted, written as the `Created` line." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The key of the task the comment is on. Links the comment to that task." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Display names of people @mentioned in the comment. The graph records each as mentioned. The field itself is not searchable, but the comment text is." + }, + { + "name": "additional_metadata.asana_gid", + "uses": [ + "Query filter" + ], + "text": "The comment's Asana id. Picks out one comment. Not searchable." + }, + { + "name": "additional_metadata.asana_task_gid", + "uses": [ + "Query filter" + ], + "text": "The Asana id of the task. Returns every comment on one task. Not searchable." + }, + { + "name": "additional_metadata.author_gid", + "uses": [ + "Query filter" + ], + "text": "The commenter's Asana id. Limits a query to one person's comments. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `asana`. Not searchable." + } + ] + }, + { + "name": "Projects", + "kind": "knowledge_base", + "one_document": "One selected Asana project, as an overview page.", + "title": "The project name, or `Asana project` and its id when the name is empty.", + "text": "The project notes as plain text, then the title of the latest status update when Asana supplies one. A project with neither is written as `Project: `. The modification time is written as the `Updated` line. The title is searchable too.", + "date": "When the project was last modified, or when it was created if there is no modification time.", + "link_back": "The project's Asana permalink.", + "attributes": [ + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the project was last modified, written as the `Updated` line. Sets the result date." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the project was created. Sets the result date only when there is no modification time. Not searchable." + }, + { + "name": "additional_metadata.asana_gid", + "uses": [ + "Query filter" + ], + "text": "The project's Asana id. Picks out one project. Not searchable." + }, + { + "name": "additional_metadata.asana_kind", + "uses": [ + "Query filter" + ], + "text": "Always `project`. Keeps or leaves out project overview pages. Not searchable." + }, + { + "name": "additional_metadata.owner_gid", + "uses": [ + "Query filter" + ], + "text": "The project owner's Asana id. Limits a query to projects owned by one person. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `asana`. Not searchable." + }, + { + "name": "owner", + "uses": [ + "Stored only" + ], + "text": "The project owner's display name. The owner is not added to the graph as a person." + }, + { + "name": "completed", + "uses": [ + "Stored only" + ], + "text": "Whether the project is completed." + }, + { + "name": "completed_at", + "uses": [ + "Stored only" + ], + "text": "When the project was completed." + }, + { + "name": "due_at", + "uses": [ + "Stored only" + ], + "text": "The project due date." + }, + { + "name": "type", + "uses": [ + "Stored only" + ], + "text": "Always `project`. Filter on it with `additional_metadata.asana_kind`." + } + ] + } + ], + "example_searches": [ + "What tasks are assigned to Priya in the Q3 Launch project?", + "Which tasks are blocking the API migration task?", + "What does the Q3 Launch project brief say?" + ], + "graph": { + "connections": [ + "A subtask to its parent task.", + "A task to each project it belongs to.", + "A task to each task it depends on, and to each task that depends on it.", + "A comment to its task.", + "No links to items in other tools." + ], + "people": [ + "The assignee of each task.", + "The author of each comment.", + "People @mentioned in task notes and comments.", + "A project's owner is kept on the project but not added to the graph." + ], + "from_text": "Task notes, comment text and project notes." + }, + "not_synced": [ + "Projects you did not select. Archived projects are not listed for selection.", + "Task activity other than comments, such as assignments and field changes.", + "Task attachments and their contents.", + "Sections, tags, custom fields and portfolios, including tag and custom-field values on tasks.", + "Comment likes, task followers and start dates.", + "Project status contents, apart from the latest status update's title.", + "Comments on a nested subtask that does not appear in its project's task list." + ] +} diff --git a/scripts/connector_pages/attio.json b/scripts/connector_pages/attio.json new file mode 100644 index 00000000..1d4c3bc0 --- /dev/null +++ b/scripts/connector_pages/attio.json @@ -0,0 +1,673 @@ +{ + "description": "Sync Attio records and list entries from the objects and lists you choose, with notes, tasks, comments, meetings and call transcripts. Private list access carries over when Enforce ACL is on.", + "opening": [ + "Sync records from the Attio objects you select, such as people, companies and deals, and entries from the lists you select. Notes, tasks, meetings and call transcripts sync for the whole workspace, and comments sync for the selected records and entries. Each item is one document. Notes, tasks, comments and list entries link to the record they belong to, and a transcript links to its meeting.", + "An entry of a private Attio list can be restricted to the list's admins and directly granted members. Search applies this only when Enforce ACL is on. Object records, notes, tasks, meetings and transcripts carry no Attio restriction. Attio has no last-edited time, so results rank by when an item was created. Items deleted in Attio stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "An entry of a private list, and the comments on it, can be read by workspace admins and the members granted access to the list directly. An entry of a list open to the whole workspace, every object record and the comments on it can be read by everyone who can query the collection, unless you set an access rule. Notes, tasks, meetings and call transcripts do not take on a list's restriction.", + "identity": "A workspace member's email address.", + "when_unreadable": "If HydraDB cannot read a list's settings or members, or the list's readers come out empty or too many, the connector reports a permission warning for that list.", + "notes": [ + "Access granted only through a team cannot be read, so team members without a direct grant cannot read a private list's entries in HydraDB.", + "Suspended members, and grants to people no longer in the workspace, are left out.", + "Reading list access needs the `list_configuration:read` and `user_management:read` scopes." + ] + }, + "connect": { + "auth": "Attio uses a workspace API key. An OAuth access token also works.", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "required": true, + "text": "An Attio workspace API key, from Workspace settings, Developers, API keys, or an OAuth access token." + } + ], + "permissions_label": "Scopes for the API key", + "permissions": [ + { + "name": "record_permission:read" + }, + { + "name": "object_configuration:read" + }, + { + "name": "list_entry:read" + }, + { + "name": "list_configuration:read", + "text": "also needed to carry over private list access." + }, + { + "name": "note:read" + }, + { + "name": "task:read" + }, + { + "name": "comment:read" + }, + { + "name": "user_management:read", + "text": "also needed to carry over private list access." + } + ], + "steps": [ + { + "title": "Create an API key", + "text": "In Attio, open Workspace settings, Developers, API keys. Create a key with the read scopes above." + }, + { + "title": "Create the connector", + "text": "Paste the key as `access_token`." + }, + { + "title": "Select objects and lists", + "text": "HydraDB lists the workspace's objects and lists. Select the ones to sync. Records and entries are read only from what you select. Notes, tasks and meetings are read for the whole workspace, including notes and tasks on records of objects you did not select." + } + ], + "account": "One connector reads one Attio workspace." + }, + "sync": { + "first_sync": "Selected objects and lists are read in full. Notes and tasks reach back the window set by `lookback_days`, 30 days by default, by creation time. Meetings are read from that point to 30 days ahead.", + "changes": "By default, each selected object and list is read in full on every sync, and only items whose content changed are updated. Notes and tasks inside the window are read again on every sync. Comments are read through their records and entries, and transcripts through their meetings.", + "edits": "A full read picks up edits. Notes, tasks and meetings outside the window are not read again, so later edits to them do not arrive.", + "deletes": "Items deleted in Attio stay searchable in HydraDB. Items that fall outside the window stay in HydraDB.", + "notes": [ + "The shortest sync interval for Attio is 15 minutes.", + "Attio's rate limit is shared with every other integration in your workspace. Reading large objects in full on every sync uses it each time.", + "Through the API, you can choose to sync only new items: set `sync_mode` to `new_only` on an object or list resource when you configure the connector. Edits to older records and entries are then missed." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "On a record, the object's slug. On a list entry, the list's slug. On a note, task or comment, the record or entry it belongs to. Limits a query to one object, one list, or one record's items. Not set on meetings and transcripts. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The readable name of the object, list or parent. Limits a query by that name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "What the item hangs off: `attio_object` for records, `attio_list` for list entries, or the parent kind for notes, tasks and comments. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `attio`. Not searchable." + } + ], + "documents": [ + { + "name": "People and companies", + "kind": "contact", + "one_document": "One person or company record.", + "title": "The record's name, full name, title, domain or email. Else its first filled-in attribute. Otherwise a title with the object and record id.", + "text": "A header naming the object and record, then each attribute as a labeled line, in alphabetical order. An attribute with several values shows only its first current value, except emails and phones, which are all kept. The title is searchable too.", + "date": "When the record was created in Attio.", + "link_back": "The record in the Attio web app.", + "attributes": [ + { + "name": "display_name", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The record's name. For a person, the graph treats the record as that person." + }, + { + "name": "entity_type", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Person for the people object, organization for companies. Decides whether the record stands for a person in the graph." + }, + { + "name": "email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The first current email address. Identifies the person in the graph." + }, + { + "name": "emails", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The other current email addresses. Connected to the same person in the graph." + }, + { + "name": "phones", + "uses": [ + "Searchable text" + ], + "text": "The current phone numbers, written as a `Phones` line." + }, + { + "name": "job_title", + "uses": [ + "Searchable text" + ], + "text": "The current job title." + }, + { + "name": "handles", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The LinkedIn URL and X handle. Can identify the person in the graph." + }, + { + "name": "organization_name", + "uses": [ + "Searchable text" + ], + "text": "A person's current company name." + }, + { + "name": "organization_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The id of a person's company record. Links the person to that company as a member." + }, + { + "name": "owner", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The current owner's name. The graph records the owner of the record." + }, + { + "name": "owner_email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The current owner's email. Identifies the owner in the graph." + }, + { + "name": "lifecycle_stage", + "uses": [ + "Searchable text" + ], + "text": "The current lifecycle value." + }, + { + "name": "person, domain, linkedin, twitter", + "uses": [ + "Searchable text" + ], + "text": "The first current name, domain, LinkedIn and Twitter values, kept as their own fields as well as in the attribute lines." + }, + { + "name": "provider_user_id", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The Attio record id. Identifies the person in the graph, and keeps later syncs on the same document." + }, + { + "name": "url", + "uses": [ + "Searchable text" + ], + "text": "The record's address in the Attio web app. Used as the link back." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was created in Attio." + }, + { + "name": "additional_metadata.record_id", + "uses": [ + "Query filter" + ], + "text": "The Attio record id. Targets one record. Not searchable." + }, + { + "name": "additional_metadata.object_id", + "uses": [ + "Query filter" + ], + "text": "The Attio object id. Limits a query to one object. Not searchable." + } + ] + }, + { + "name": "Deals and other object records", + "kind": "knowledge_base", + "one_document": "One record of a deals object or a custom object.", + "title": "The record's name, full name, title, domain or email. Else its first filled-in attribute. Otherwise a title with the object and record id.", + "text": "A header naming the object and record, then each attribute as a labeled line, in alphabetical order. An attribute with several values shows only its first current value. The title is searchable too.", + "date": "When the record was created in Attio.", + "link_back": "The record in the Attio web app.", + "attributes": [ + { + "name": "email, person, domain, linkedin, twitter", + "uses": [ + "Searchable text" + ], + "text": "The first current email, name, domain, LinkedIn and Twitter values, kept as their own fields as well as in the attribute lines." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the record was created in Attio. Not searchable." + }, + { + "name": "additional_metadata.record_id", + "uses": [ + "Query filter" + ], + "text": "The Attio record id. Targets one record. Not searchable." + }, + { + "name": "additional_metadata.object_id", + "uses": [ + "Query filter" + ], + "text": "The Attio object id. Limits a query to one object. Not searchable." + }, + { + "name": "object", + "uses": [ + "Stored only" + ], + "text": "The object's slug. Filter on it with `additional_metadata.container_id`." + } + ] + }, + { + "name": "List entries", + "kind": "knowledge_base", + "one_document": "One entry in one selected list: a record's place and stage values in that list.", + "title": "The list's name followed by `entry`.", + "text": "The title, then each entry attribute as a labeled line, in alphabetical order, with the first current value of each.", + "date": "When the entry was created.", + "link_back": "None.", + "attributes": [ + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "The record the entry is for. Links the entry to that record. Not searchable." + }, + { + "name": "additional_metadata.entry_id", + "uses": [ + "Query filter" + ], + "text": "The Attio list entry id. Targets one entry. Not searchable." + }, + { + "name": "additional_metadata.parent_record_id", + "uses": [ + "Query filter" + ], + "text": "The record the entry is for. Returns every list entry, note, task and comment of one record. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the entry was created. Not searchable." + }, + { + "name": "list", + "uses": [ + "Stored only" + ], + "text": "The list's slug. Filter on it with `additional_metadata.container_id`." + } + ] + }, + { + "name": "Notes", + "kind": "comment", + "one_document": "One note.", + "title": "`Comment by` and the author's name. Without an author, the first 80 characters of the text.", + "text": "The note title, then its content as markdown, or plain text when there is no markdown. Then a `Tagged` line naming the records and members tagged in it. The author, the record it is on and its creation time are part of the text too.", + "date": "When the note was created.", + "link_back": "None.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Who created the note. The graph records the note as written by that person." + }, + { + "name": "mentions", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Workspace members tagged in the note. Their names stay in the text, and the graph records each as mentioned. Tagged records are not included." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The record the note is on, written into the text as its id. Links the note to that record." + }, + { + "name": "additional_metadata.note_id", + "uses": [ + "Query filter" + ], + "text": "The Attio note id. Targets one note. Not searchable." + }, + { + "name": "additional_metadata.meeting_id", + "uses": [ + "Query filter" + ], + "text": "The meeting the note belongs to. Returns a meeting together with its transcript and notes. Not searchable." + }, + { + "name": "additional_metadata.parent_record_id", + "uses": [ + "Query filter" + ], + "text": "The record the note is on. Returns every list entry, note, task and comment of one record. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the note was created, written as a `Created` line." + } + ] + }, + { + "name": "Tasks", + "kind": "ticket", + "one_document": "One task.", + "title": "The task text on one line, cut near 80 characters at a word. Otherwise a title with the task id.", + "text": "The title, the full task text when it is longer, a `Status` line with `Open` or `Completed`, the deadline and the assignees. The task's key, the record it is on and its creation time are part of the text too.", + "date": "When the task was created.", + "link_back": "None.", + "attributes": [ + { + "name": "additional_metadata.status", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "`Open` or `Completed`, written as the `Status` line. Limits a query to open or completed tasks." + }, + { + "name": "additional_metadata.deadline_at", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The deadline, written as the `Deadline` line. Limits a query to a range of deadlines." + }, + { + "name": "additional_metadata.is_completed", + "uses": [ + "Query filter" + ], + "text": "Whether the task is done. Keeps only open or only completed tasks. Not searchable." + }, + { + "name": "Assignees", + "uses": [ + "Searchable text" + ], + "text": "The people assigned to the task, written into the text. They are not attached to the task as people." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The record the task is linked to, written into the text. Places the task under that record in the graph." + }, + { + "name": "additional_metadata.task_id", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The Attio task id. Written into the text as part of the task's key. Targets one task." + }, + { + "name": "additional_metadata.parent_record_id", + "uses": [ + "Query filter" + ], + "text": "The record the task is on. Returns every list entry, note, task and comment of one record. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the task was created, written as a `Created` line." + } + ] + }, + { + "name": "Comments", + "kind": "comment", + "one_document": "One comment on a selected record or list entry.", + "title": "`Comment by` and the author's name. Without an author, the first 80 characters of the text.", + "text": "A header naming the author and what was commented on, the id of the record or entry when there is one, then the comment text. The creation time is part of the text too.", + "date": "When the comment was created.", + "link_back": "None.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Who wrote the comment. The graph records the comment as written by that person." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The record or list entry the comment is on, written into the text as its id. Links the comment to it." + }, + { + "name": "additional_metadata.thread_id", + "uses": [ + "Query filter", + "Graph connection" + ], + "text": "The discussion thread. Groups the comments of one discussion, so a reply can be read with the rest of its thread. Limits a query to one thread. Not searchable." + }, + { + "name": "additional_metadata.comment_id", + "uses": [ + "Query filter" + ], + "text": "The Attio comment id. Targets one comment. Not searchable." + }, + { + "name": "additional_metadata.resolved_at", + "uses": [ + "Query filter" + ], + "text": "When the comment was resolved. Finds resolved or unresolved comments. Not searchable." + }, + { + "name": "additional_metadata.parent_record_id", + "uses": [ + "Query filter" + ], + "text": "The record the comment belongs to, when there is one. Returns every list entry, note, task and comment of one record. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the comment was created, written as a `Created` line." + } + ] + }, + { + "name": "Meetings", + "kind": "meeting", + "one_document": "One calendar meeting.", + "title": "The meeting title. Otherwise a title with the meeting id.", + "text": "The title, the description, a `Starts` line and a `Participants` line.", + "date": "When the meeting was created in Attio, not when it starts.", + "link_back": "None.", + "attributes": [ + { + "name": "additional_metadata.participants", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The participants' names or emails, written as the `Participants` line, where HydraDB can identify the people. Filters meetings by participant." + }, + { + "name": "additional_metadata.meeting_id", + "uses": [ + "Query filter" + ], + "text": "The Attio meeting id. Returns a meeting together with its transcript and notes. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the meeting was created in Attio. Not searchable." + } + ] + }, + { + "name": "Call transcripts", + "kind": "meeting", + "one_document": "One call recording's transcript. A recording with no transcribed speech is skipped.", + "title": "The meeting title. Otherwise a title with the recording id.", + "text": "A header naming the call and its speakers, then the full transcript text.", + "date": "When the meeting was created in Attio.", + "link_back": "None.", + "files": "The audio and video recording itself is not synced. Only the transcript text is.", + "attributes": [ + { + "name": "additional_metadata.speakers", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The speakers' names, written in the header, where HydraDB can identify the people. Filters transcripts by speaker." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "The meeting the call belongs to. Links the transcript to that meeting. Not searchable." + }, + { + "name": "additional_metadata.call_recording_id", + "uses": [ + "Query filter" + ], + "text": "The Attio call recording id. Targets one transcript. Not searchable." + }, + { + "name": "additional_metadata.meeting_id", + "uses": [ + "Query filter" + ], + "text": "The meeting the call belongs to. Returns a meeting together with its transcript and notes. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the meeting was created in Attio. Not searchable." + } + ] + } + ], + "example_searches": [ + "What did we discuss with Acme on our last call?", + "What open tasks are attached to this company?", + "What notes mention the pricing objection?" + ], + "graph": { + "connections": [ + "A note or task to the record it is on.", + "A comment to the record or list entry it is on, and to its discussion thread.", + "A list entry to its record.", + "A call transcript to its meeting.", + "A person to their company.", + "No links to other tools." + ], + "people": [ + "A person record stands for that person, identified by name, email and handles.", + "The owner of each person and company record.", + "The author of each note and comment, and members tagged in a note.", + "Task assignees, meeting participants and transcript speakers appear only in the text, where HydraDB can identify them." + ], + "from_text": "Record and list entry attributes, note, task and comment text, meeting participants and transcript speech." + }, + "not_synced": [ + "Records and entries from objects and lists you did not select.", + "Email messages and email threads.", + "Meetings outside the window, which runs from `lookback_days` ago to 30 days ahead.", + "Notes and tasks created before the window.", + "Earlier values of an attribute, and every value after the first, except emails and phones on people and companies.", + "Files, and the audio and video of call recordings." + ] +} diff --git a/scripts/connector_pages/avoma.json b/scripts/connector_pages/avoma.json new file mode 100644 index 00000000..d73fc0b8 --- /dev/null +++ b/scripts/connector_pages/avoma.json @@ -0,0 +1,346 @@ +{ + "description": "Sync the recorded meetings and scorecard reviews an Avoma API key can see, with summaries and full transcripts.", + "opening": [ + "Sync the recorded meetings and scorecard reviews an Avoma API key can see. Each meeting is one document with its details, Avoma's AI summary and the transcript, each line labelled with its speaker. Each answered scorecard review is its own document, linked to the meeting it reviews.", + "Avoma permissions are not imported, so private meetings are visible to everyone who can query the collection unless you set an access rule. Changes are picked up only for a short time: 2 hours for meetings and 7 days for reviews. A transcript or summary that arrives after the 2-hour window is not picked up. Meetings deleted in Avoma stay in HydraDB." + ], + "callouts": { + "connect": { + "kind": "warning", + "text": "Create the API key with Organization scope to sync everyone's meetings. A key's scope cannot be changed after it is created, and a key with a narrower scope syncs only the meetings that scope allows." + } + }, + "permissions": { + "carried": false, + "notes": [ + "Private meetings that only some Avoma users can see are synced like any other meeting when the key has Organization scope." + ] + }, + "connect": { + "auth": "Avoma uses an API key. Only an Avoma admin can create one.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "The whole Avoma API key exactly as issued: both parts, with the colon between them." + } + ], + "steps": [ + { + "title": "Create an API key", + "text": "Have an Avoma admin create an API key with Organization scope." + }, + { + "title": "Create the connector", + "text": "Paste the whole key as `api_key`, including both parts and the colon." + }, + { + "title": "Select the organization", + "text": "HydraDB lists one item for all the meetings and reviews the key can see. Select it. You cannot pick individual meetings." + } + ], + "account": "One connector reads the meetings its API key's scope allows in one Avoma organization." + }, + "sync": { + "first_sync": "Reads meetings and reviews from the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads meetings by start time and reviews by creation time. It reaches 2 hours back for meetings and 7 days back for reviews, to pick up recent changes.", + "edits": "Changes are picked up only inside those windows. A transcript or summary that arrives after the 2-hour window is not picked up. A review with no answers yet is skipped, and is picked up if it is answered within the 7 days. A change to a meeting does not update its reviews.", + "deletes": "Meetings and reviews deleted in Avoma stay searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's meetings and reviews. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `avoma`. Not searchable." + } + ], + "documents": [ + { + "name": "Meetings", + "kind": "knowledge_base", + "one_document": "One meeting, with its summary and full transcript.", + "title": "The meeting subject, or `Avoma meeting ` when it has none.", + "text": "The title, then `Purpose`, `When`, `Organizer` and `Attendees` lines. Then Avoma's AI summary under `Summary`, and the transcript under `Transcript` as one `Speaker: text` line per segment. The title is searchable too.", + "date": "When the meeting started, else when it was created.", + "link_back": "The meeting in Avoma's web app.", + "files": "None. Recordings are not downloaded.", + "attributes": [ + { + "name": "summary", + "uses": [ + "Searchable text" + ], + "text": "Avoma's AI summary, written under `Summary`." + }, + { + "name": "purpose", + "uses": [ + "Searchable text" + ], + "text": "The meeting's purpose or template label, written as the `Purpose` line." + }, + { + "name": "organizer", + "uses": [ + "Searchable text" + ], + "text": "The organizer's name or email, written as the `Organizer` line. The organizer is not attached to the meeting as a person in the graph." + }, + { + "name": "attendees", + "uses": [ + "Searchable text" + ], + "text": "Attendee names, written as the `Attendees` line. Attendees are not attached to the meeting as people in the graph." + }, + { + "name": "start_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the meeting started, written as the `When` line. Sets the result date and decides which meetings each sync reads." + }, + { + "name": "additional_metadata.avoma_meeting_id", + "uses": [ + "Query filter" + ], + "text": "The meeting's id. Picks out one meeting. The same key on scorecard reviews finds that meeting's reviews. Not searchable." + }, + { + "name": "additional_metadata.recording_uuid", + "uses": [ + "Query filter" + ], + "text": "The recording's id. Picks out a meeting by its recording. Not searchable." + }, + { + "name": "additional_metadata.organizer_email", + "uses": [ + "Query filter" + ], + "text": "The organizer's email. Limits a query to meetings one person organized. Not searchable." + }, + { + "name": "additional_metadata.attendee_count", + "uses": [ + "Query filter" + ], + "text": "How many attendees the meeting had. Limits a query by meeting size. Not searchable." + }, + { + "name": "additional_metadata.meeting_state", + "uses": [ + "Query filter" + ], + "text": "The meeting's state, such as `completed` or `scheduled`. Limits a query to completed meetings, for example. Not searchable." + }, + { + "name": "additional_metadata.crm_object_ids", + "uses": [ + "Query filter" + ], + "text": "The ids of the CRM records linked to the meeting in Avoma. Finds the meetings linked to one opportunity or account. They do not link the meeting to items from a CRM connector. Not searchable." + }, + { + "name": "additional_metadata.crm_object_types", + "uses": [ + "Query filter" + ], + "text": "The types of the linked CRM records. Limits a query to meetings linked to one kind of CRM record. Not searchable." + }, + { + "name": "end_at", + "uses": [ + "Stored only" + ], + "text": "When the meeting ended." + }, + { + "name": "duration", + "uses": [ + "Stored only" + ], + "text": "The recorded meeting length, in seconds." + }, + { + "name": "outcome", + "uses": [ + "Stored only" + ], + "text": "The meeting's outcome label." + }, + { + "name": "meeting_type", + "uses": [ + "Stored only" + ], + "text": "Avoma's meeting type label." + }, + { + "name": "processing_status", + "uses": [ + "Stored only" + ], + "text": "Whether the recording was still processing or complete when it was synced." + }, + { + "name": "has_transcript", + "uses": [ + "Stored only" + ], + "text": "Whether the transcript was included." + }, + { + "name": "is_call", + "uses": [ + "Stored only" + ], + "text": "Whether Avoma classed the meeting as a voice or video call." + }, + { + "name": "is_internal", + "uses": [ + "Stored only" + ], + "text": "Whether Avoma classed the meeting as internal, meaning every attendee shares the organizer's domain." + } + ] + }, + { + "name": "Scorecard reviews", + "kind": "knowledge_base", + "one_document": "One scorecard review of one meeting. A review with no answers yet is skipped.", + "title": "The scorecard template name, or `Scorecard review` when it has none, followed by the meeting subject when there is one.", + "text": "The title, then `Meeting`, `Reviewed`, `Reviewer` and `Overall score` lines. Then each question in order, with its score, answer and reasoning. Avoma's citation markers are removed. The title is searchable too.", + "date": "When the review was created, else when the meeting started.", + "link_back": "None.", + "attributes": [ + { + "name": "scorecard_name", + "uses": [ + "Searchable text" + ], + "text": "The scorecard template's name, written in the title." + }, + { + "name": "meeting_subject", + "uses": [ + "Searchable text" + ], + "text": "The reviewed meeting's subject, written in the title and as the `Meeting` line." + }, + { + "name": "scored_for", + "uses": [ + "Searchable text" + ], + "text": "The person reviewed, written as the `Reviewed` line." + }, + { + "name": "scored_by", + "uses": [ + "Searchable text" + ], + "text": "The reviewer, written as the `Reviewer` line. For a review Avoma's AI wrote, this can be Avoma's AI email when there is no name." + }, + { + "name": "overall_score", + "uses": [ + "Searchable text" + ], + "text": "The overall score, written as the `Overall score` line." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the review was created. Sets the result date and decides which reviews each sync reads. Not searchable." + }, + { + "name": "additional_metadata.avoma_meeting_id", + "uses": [ + "Query filter", + "Graph connection" + ], + "text": "The reviewed meeting's id. Fetches every review of one meeting, and links the review to that meeting. Not searchable." + }, + { + "name": "additional_metadata.avoma_review_id", + "uses": [ + "Query filter" + ], + "text": "The review's id. Picks out one review. Not searchable." + }, + { + "name": "additional_metadata.scorecard_id", + "uses": [ + "Query filter" + ], + "text": "The scorecard template's id. Limits a query to one scorecard. Not searchable." + }, + { + "name": "additional_metadata.scored_for_email", + "uses": [ + "Query filter" + ], + "text": "The reviewed person's email. Finds every review of one person. Not searchable." + }, + { + "name": "additional_metadata.scored_by_email", + "uses": [ + "Query filter" + ], + "text": "The reviewer's email, or `ai@avoma.com` for a review Avoma's AI wrote. Separates human and AI reviews. Not searchable." + }, + { + "name": "reviewed_by_ai", + "uses": [ + "Stored only" + ], + "text": "Whether Avoma's AI wrote the review, worked out from the reviewer's email." + }, + { + "name": "answer_count", + "uses": [ + "Stored only" + ], + "text": "How many answers the review returned. A question appears in the text only when it has question text." + } + ] + } + ], + "example_searches": [ + "What did the customer say about budget on yesterday's discovery call?", + "How did Sam score on the SPICED scorecard for the Globex demo?", + "Summarize the last three calls with Acme." + ], + "graph": { + "connections": [ + "A scorecard review to the meeting it reviews.", + "No links to other tools. Linked CRM records are kept as ids for filtering only." + ], + "people": "The connector does not attach organizers, attendees, speakers or reviewers to items as people. Their names are part of the text.", + "from_text": "Each meeting's details, summary and transcript, and each review's text." + }, + "not_synced": [ + "Audio and video files.", + "Meetings outside the API key's scope.", + "Avoma meeting sharing permissions.", + "A review's company name, deal names and modified time.", + "Changes after the 2-hour window for meetings or the 7-day window for reviews.", + "Deletions: meetings and reviews deleted in Avoma stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/bamboohr.json b/scripts/connector_pages/bamboohr.json new file mode 100644 index 00000000..4a7e72c8 --- /dev/null +++ b/scripts/connector_pages/bamboohr.json @@ -0,0 +1,216 @@ +{ + "description": "Sync the BambooHR employee directory and time off. Each employee is one document linked to their manager, and each time-off request or who's-out entry is linked to its employee.", + "opening": [ + "Sync the BambooHR employee directory and time off. Each employee is one document with their job title, manager, department, division, location, work email, work phone and status, linked to their manager. Each time-off request and each who's-out entry is one document, linked to the employee it belongs to.", + "BambooHR permissions are not imported, so every synced employee and absence is visible to everyone who can query the collection unless you set an access rule. HR data is often sensitive. Departed employees and cancelled absences stay in HydraDB. Compensation, employee files and custom fields are not synced." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "BambooHR uses an API key together with your company's subdomain.", + "credentials": [ + { + "name": "auth_token", + "type": "secret string", + "required": true, + "text": "A BambooHR API key." + }, + { + "name": "subdomain", + "type": "string", + "required": true, + "text": "Your company's subdomain from its BambooHR address, for example `acme` for `acme.bamboohr.com`." + } + ], + "steps": [ + { + "title": "Get an API key", + "text": "Get a BambooHR API key. HydraDB syncs the employee directory and time off that this key can read." + }, + { + "title": "Create the connector", + "text": "Paste the key as `auth_token` and your company's subdomain as `subdomain`." + }, + { + "title": "Configure the connector", + "text": "HydraDB lists one account-wide resource, All data. Select it to sync everything the key can read as one unit." + } + ], + "account": "One connector reads one BambooHR company, the one named by `subdomain`." + }, + "sync": { + "first_sync": "Reads the whole employee directory the key can see. Time-off requests updated within the window set by `lookback_days`, 30 days by default, whatever the dates of the leave. Who's-out entries for the dates in that window.", + "changes": "Each sync reads the whole directory again, time-off requests updated since the last sync, and who's-out entries for the dates the sync covers. Future absences are not guaranteed to appear as who's-out entries.", + "edits": "A changed employee or time-off request replaces its document. A who's-out entry is read again only while its dates fall in the window a sync covers.", + "deletes": "Not removed. A departed employee or a cancelled absence stays in HydraDB." + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's documents. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `bamboohr`. Not searchable." + } + ], + "documents": [ + { + "name": "Employees", + "kind": "custom", + "one_document": "One employee in the directory the API key can read.", + "title": "The employee's display name. Otherwise the first and last name.", + "text": "The name, then `Job Title`, `Reports To`, `Department`, `Division`, `Location`, `Email`, `Phone` and `Status` lines. The title is searchable too.", + "date": "None. The directory has no change time, so ranking by date cannot order employees.", + "link_back": "None.", + "attributes": [ + { + "name": "display_name", + "uses": [ + "Searchable text" + ], + "text": "The directory display name. Forms the title and the name in the text." + }, + { + "name": "first_name, last_name", + "uses": [ + "Searchable text" + ], + "text": "The employee's first and last name. Used for the title and the name in the text only when there is no display name." + }, + { + "name": "job_title", + "uses": [ + "Searchable text" + ], + "text": "The job title, in the `Job Title` line." + }, + { + "name": "reports_to", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The manager's name from the employee's latest job information, in the `Reports To` line. When the name matches an employee in the directory, links the employee to that manager. Two people with the same name can cause a wrong link or no link." + }, + { + "name": "department, division, location", + "uses": [ + "Searchable text" + ], + "text": "Where the employee sits in the organisation, in the `Department`, `Division` and `Location` lines." + }, + { + "name": "work_email, work_phone", + "uses": [ + "Searchable text" + ], + "text": "The work email and work phone, in the `Email` and `Phone` lines." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The employment status, in the `Status` line." + }, + { + "name": "additional_metadata.bamboohr_employee_id", + "uses": [ + "Query filter" + ], + "text": "The BambooHR employee id. Finds one employee. Not searchable." + } + ] + }, + { + "name": "Time-off entries", + "kind": "custom", + "one_document": "One time-off request, or one who's-out calendar entry.", + "title": "The employee's name.", + "text": "The employee's name, then `Type`, `Status`, `Start` and `End` lines. The title is searchable too.", + "date": "The first day of the absence.", + "link_back": "None.", + "attributes": [ + { + "name": "employee_id", + "uses": [ + "Graph connection" + ], + "text": "Links the absence to the employee it belongs to. Not searchable." + }, + { + "name": "type", + "uses": [ + "Searchable text" + ], + "text": "The kind of time off, such as Vacation or Sick, in the `Type` line." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The approval status, in the `Status` line." + }, + { + "name": "start", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "The first day of the absence, in the `Start` line. It is the result date." + }, + { + "name": "end", + "uses": [ + "Searchable text" + ], + "text": "The last day of the absence, in the `End` line." + }, + { + "name": "additional_metadata.bamboohr_time_off_id", + "uses": [ + "Query filter" + ], + "text": "The BambooHR time-off id. Finds one request or entry. Not searchable." + }, + { + "name": "created", + "uses": [ + "Stored only" + ], + "text": "When a time-off request was created. Who's-out entries have none." + } + ] + } + ], + "example_searches": [ + "Who does Priya report to?", + "Who works in the Finance department?", + "What is Sam's work email and job title?" + ], + "graph": { + "connections": [ + "An employee to their manager, when the manager's name matches an employee in the directory.", + "A time-off request or who's-out entry to its employee.", + "No links to other tools." + ], + "people": "Employees and their managers, through the manager link. Departments, divisions and locations are not attached as groups. They are in the text only.", + "from_text": "Each employee's directory lines and each absence's type and status." + }, + "not_synced": [ + "Compensation, custom reports, photos, employee files and custom fields.", + "Job history other than the latest manager.", + "Time-off amounts, employee notes, per-day breakdowns and the actions allowed on a request.", + "A guaranteed calendar of future absences.", + "Deletions: departed employees and cancelled absences stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/bigquery.json b/scripts/connector_pages/bigquery.json new file mode 100644 index 00000000..d7abc001 --- /dev/null +++ b/scripts/connector_pages/bigquery.json @@ -0,0 +1,307 @@ +{ + "description": "Sync rows from the BigQuery tables you choose, one searchable document per row.", + "opening": [ + "Sync rows from the BigQuery tables you select in one Google Cloud project. Each row is one document. Every non-empty column of the row becomes searchable text, including sensitive columns.", + "BigQuery access controls are not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. Rows deleted in BigQuery stay in HydraDB. You choose, table by table, how new and changed rows are found: a timestamp column, BigQuery's change history, or a full read of the table on every sync." + ], + "callouts": { + "connect": { + "kind": "warning", + "text": "Set a primary key for every table you select. HydraDB updates a row's document by its key. If a table has no real unique key, different rows can be treated as the same document and replace each other." + } + }, + "permissions": { + "carried": false, + "notes": [ + "BigQuery dataset, table, row-level and column-level access controls are not reproduced." + ] + }, + "connect": { + "auth": "Use a service-account JSON key, a service-account email and private key, or a pre-issued OAuth client id, client secret and refresh token. Paste one complete credential set. HydraDB does not offer an interactive sign-in flow. The JSON key is the recommended option.", + "credentials": [ + { + "name": "credentials_json", + "type": "secret string", + "text": "The service account's JSON key file, pasted whole." + } + ], + "alternatives": [ + { + "title": "Service-account email and private key", + "credentials": [ + { + "name": "client_email", + "type": "secret string", + "text": "The service account's email." + }, + { + "name": "private_key", + "type": "secret string", + "text": "The service account's private key." + } + ] + }, + { + "title": "OAuth client and refresh token", + "credentials": [ + { + "name": "client_id", + "type": "secret string", + "text": "An OAuth client id." + }, + { + "name": "client_secret", + "type": "secret string", + "text": "An OAuth client secret." + }, + { + "name": "refresh_token", + "type": "secret string", + "text": "An OAuth refresh token you issued beforehand. A client id and secret alone cannot reach BigQuery, so this option needs all three fields." + } + ] + } + ], + "settings": [ + { + "name": "project_id", + "type": "string", + "text": "The Google Cloud project to read. Required unless the key file already names a project." + }, + { + "name": "location", + "type": "string", + "text": "The BigQuery location to run query jobs in." + }, + { + "name": "datasets", + "type": "string list", + "text": "Limits discovery and sync to these datasets." + } + ], + "advanced_settings": [ + { + "name": "replication_key", + "type": "string", + "text": "A timestamp column used to find changed rows, called the sync cursor, for every selected table that has it. A table's own settings override it." + }, + { + "name": "change_history", + "type": "string", + "text": "`appends` or `changes`, used for tables that have no cursor column. A table's own settings override it." + }, + { + "name": "detect_replication_from_partitioning", + "type": "boolean", + "text": "Off by default. When on, column-partitioned tables sync incrementally on their partition column." + } + ], + "permissions_label": "What the service account needs", + "permissions": [ + { + "name": "BigQuery Data Viewer", + "text": "role on the project." + }, + { + "name": "BigQuery Job User", + "text": "role on the project." + }, + { + "name": "https://www.googleapis.com/auth/bigquery", + "text": "scope, in the OAuth option. Google rejects query jobs under the read-only BigQuery scope." + } + ], + "steps": [ + { + "title": "Create a service account", + "text": "In Google Cloud, create a service account. Give it the BigQuery Data Viewer and BigQuery Job User roles on the project, and download its JSON key." + }, + { + "title": "Create the connector", + "text": "Paste the key as `credentials_json`. Add `project_id` only if the key file does not name a project. To narrow which tables HydraDB lists, set `datasets`." + }, + { + "title": "Select tables", + "text": "HydraDB lists the tables in the project, narrowed by `datasets` when you set it. Select the tables to sync. Each selected table becomes its own set of documents, one per row." + }, + { + "title": "Choose how each table finds changes", + "text": "If the table has a timestamp column that changes on every insert and update, such as `updated_at`, make it the table's `replication_key`. This column is the table's sync cursor. If rows are only ever inserted, set `change_history` to `appends`. If rows are also updated and there is no such column, set `change_history` to `changes`. A table with none of these is read in full on every sync, which is expensive on large tables." + }, + { + "title": "Turn on change history for tables set to changes", + "text": "Run `ALTER TABLE dataset.table SET OPTIONS(enable_change_history=true)` once in BigQuery for that table. It changes no data." + }, + { + "title": "Set each table's primary key", + "text": "Add `primary_keys` with the column or columns that identify one row, unless the table already has a primary key defined in BigQuery." + }, + { + "title": "Send the settings when you configure", + "text": "Through the API or SDK, send the per-table settings as `table_configs` on the same Configure Connector request that selects the tables. The dashboard collects them on the table-selection screen." + } + ], + "examples": [ + { + "intro": "One `table_configs` entry per table, for each way of finding changes. A table's own `change_history` overrides its cursor setting. Otherwise, a usable table or connector-wide cursor takes priority over the connector-wide `change_history` fallback.", + "tabs": [ + { + "title": "Timestamp cursor", + "json": { + "table": "sales.orders", + "replication_key": "updated_at", + "primary_keys": [ + "order_id" + ] + } + }, + { + "title": "Inserts only", + "json": { + "table": "web.page_views", + "change_history": "appends", + "primary_keys": [ + "event_id" + ] + } + }, + { + "title": "Inserts and updates", + "json": { + "table": "crm.accounts", + "change_history": "changes", + "primary_keys": [ + "account_id" + ] + } + }, + { + "title": "Changes only, skip existing rows", + "json": { + "table": "crm.accounts", + "change_history": "changes", + "snapshot": "none", + "primary_keys": [ + "account_id" + ] + } + }, + { + "title": "Full read", + "json": { + "table": "ref.countries", + "primary_keys": [ + "code" + ] + } + } + ] + } + ], + "account": "One connector reads one Google Cloud project." + }, + "sync": { + "first_sync": "A table with a cursor column reads back the window set by `lookback_days`, 30 days by default. A change-history table starts capturing changes at its first sync, not when you create the connector, and then loads its existing rows in slices of 1,000 per sync. Set `snapshot` to `none` to skip existing rows, or to a number to load at most that many rows, in no particular order. With `none`, changes between creating the connector and its first sync are not recovered. While existing rows are loading, deleting rows in BigQuery can cause other rows to be missed.", + "changes": "A cursor table picks up rows whose cursor value moved past the last sync. A `changes` table reads BigQuery's change history, about 11 minutes behind the current time. An `appends` table sees new rows only. A table with neither is read in full on every sync, and rows whose content did not change are skipped.", + "edits": "An edited row updates the same document, as long as its key is unique. In `appends` mode, edits to existing rows are never seen.", + "deletes": "Deleted rows are not removed. A row deleted in BigQuery stays searchable in HydraDB.", + "notes": [ + "BigQuery keeps change history for its time-travel window, 2 to 7 days. If a change-history table is not synced within that window, for example while the connector is paused, the table is skipped with an error on each sync until it is loaded again from the start.", + "A dataset name containing `__` can display incorrectly as a table label. Which table a row belongs to is not affected." + ] + }, + "documents": [ + { + "name": "Table rows", + "kind": "custom", + "one_document": "One row of a selected table, as long as the table's key is unique. Rows that share a key replace one another.", + "title": "The first non-empty column named `name`, `title`, `subject`, `summary` or `email`. Otherwise, the first non-empty, non-numeric scalar column in alphabetical column order is used. If there is none, the first numeric column is used. A row with none of these is titled with its table and row key.", + "text": "The title on the first line. Then every non-empty column in alphabetical order, as `Column Name: value`: underscores become spaces and words are capitalised. Lists of scalar values are joined with commas. Nested records and lists of records are written as compact JSON. In change-history mode, each row also has `_change_type` and `_change_timestamp` columns, and both appear in the text.", + "date": "The first recognised time column with an RFC3339 timestamp or epoch-seconds value sets the result date. The columns are checked in this order: `updated_at`, `modified_at`, `last_modified`, `updated`, `created_at`, `created`, `timestamp`, `event_time` and `inserted_at`. BigQuery DATETIME values have no time zone and do not set it. A row with none has no date.", + "link_back": "None.", + "files": "None. Column values are kept as text only.", + "attributes": [ + { + "name": "Row columns", + "uses": [ + "Searchable text" + ], + "text": "Every non-empty column is searchable as text. Columns are not individual query filters. A table name in a text query does not reliably select that table. Use `additional_metadata.container_name` or `additional_metadata.container_id`." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "The value of the first recognised time column, used as the result date. A sync cursor with another name does not set it. This attribute is not searchable, but a source column of the same name is part of the row text like any other column." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The table as `dataset.table`. Limits a query to one table. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The table as `dataset__table`, with two underscores. Another way to limit a query to one table. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `table`. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's rows. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `bigquery`. Limits a query to BigQuery rows. Not searchable." + }, + { + "name": "table", + "uses": [ + "Stored only" + ], + "text": "The table as `dataset.table`, so you can see where a result came from." + }, + { + "name": "row_key", + "uses": [ + "Stored only" + ], + "text": "The key the row was matched on. Together with the table, it decides which document a later sync updates." + } + ] + } + ], + "example_searches": [ + "What does the `sales.orders` table say about order 10432?", + "Which rows in `crm.accounts` mention Acme Corp?", + "Which rows in `support.tickets` were updated most recently?" + ], + "graph": { + "connections": "The connector creates no explicit links between rows or to other tools. A column containing another row's key does not create a link. Each row is grouped under its table.", + "people": "The connector does not explicitly attach rows to people. A column such as `email` or `user_id` is part of the row text only. It does not make the row a person in the graph.", + "from_text": "The row text. Anything found there comes from reading the text, not from joining table keys." + }, + "not_synced": [ + "Tables you did not select.", + "Rows deleted in BigQuery: they stay in HydraDB.", + "Updates to existing rows in tables set to `appends`.", + "BigQuery dataset, table, row-level and column-level access controls.", + "Table and column descriptions and other schema details. Only row values are kept." + ] +} diff --git a/scripts/connector_pages/bookstack.json b/scripts/connector_pages/bookstack.json new file mode 100644 index 00000000..4ba980b1 --- /dev/null +++ b/scripts/connector_pages/bookstack.json @@ -0,0 +1,219 @@ +{ + "description": "Sync the pages, chapters and books of the BookStack books you choose, one document per item. BookStack permissions are not imported.", + "opening": [ + "Sync the books you select from your BookStack instance. Each page is one document holding its text. Each chapter and each book is also one document, holding its description. Pages and chapters carry the id of their book and chapter, so a query can be limited to one book or chapter.", + "BookStack permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Items carry no link back to BookStack. Images and files on pages are not synced, and items deleted in BookStack stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "BookStack page, chapter, book and role permissions are not applied." + ] + }, + "connect": { + "auth": "BookStack uses an API token, made of a token id and a token secret.", + "credentials": [ + { + "name": "base_url", + "type": "string", + "required": true, + "text": "The root address of your BookStack instance." + }, + { + "name": "token_id", + "type": "secret string", + "required": true, + "text": "The BookStack API token id." + }, + { + "name": "token_secret", + "type": "secret string", + "required": true, + "text": "The BookStack API token secret." + } + ], + "steps": [ + { + "title": "Create an API token", + "text": "In BookStack, create an API token and copy its id and secret. A page the token's user cannot read in full is synced with its title only." + }, + { + "title": "Create the connector", + "text": "Enter `base_url`, `token_id` and `token_secret`." + }, + { + "title": "Select books", + "text": "HydraDB lists the books in the instance. Select the books to sync. Their chapters and pages come with them. To reach items older than 30 days, raise `lookback_days` when you select them." + } + ], + "account": "One connector reads one BookStack instance, as one API token." + }, + "sync": { + "first_sync": "Each selected book reads back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the books, chapters and pages updated since the last sync.", + "edits": "An updated item is read again and replaces its document. A page's content is read again with it.", + "deletes": "Deleted items are not removed. A page, chapter or book deleted in BookStack stays searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the item was last updated, written as the `Updated` line. Sets the result date." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the item was created. Sets the result date only when the update time is missing. Not searchable." + }, + { + "name": "additional_metadata.bookstack_type", + "uses": [ + "Query filter" + ], + "text": "`pages`, `chapters` or `books`. Limits a query to one kind of item. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `bookstack`. Not searchable." + }, + { + "name": "owned_by", + "uses": [ + "Stored only" + ], + "text": "The BookStack user id of the item's owner. It does not restrict access." + }, + { + "name": "owned_by_name", + "uses": [ + "Stored only" + ], + "text": "The owner's name, when it can be found. A search does not match it." + }, + { + "name": "slug", + "uses": [ + "Stored only" + ], + "text": "The item's URL slug." + } + ], + "documents": [ + { + "name": "Pages", + "kind": "knowledge_base", + "one_document": "One BookStack page.", + "title": "The page name. A page with no name is titled `BookStack page` and its id.", + "text": "The page content as plain text, with its title and last-updated time. If the page's content could not be read, the title stands in for it.", + "date": "When the page was last updated, else when it was created.", + "link_back": "None.", + "files": "None. Images and files on pages are not synced.", + "attributes": [ + { + "name": "additional_metadata.bookstack_id", + "uses": [ + "Query filter" + ], + "text": "The page's numeric BookStack id. Picks out one page. Not searchable." + }, + { + "name": "additional_metadata.bookstack_book_id", + "uses": [ + "Query filter" + ], + "text": "The id of the book that holds the page. Limits a query to one book. Not searchable." + }, + { + "name": "additional_metadata.bookstack_chapter_id", + "uses": [ + "Query filter" + ], + "text": "The id of the chapter that holds the page, when it is in one. Limits a query to one chapter. Not searchable." + } + ] + }, + { + "name": "Chapters", + "kind": "knowledge_base", + "one_document": "One chapter's name and description. Its pages are their own documents.", + "title": "The chapter name. A chapter with no name is titled `BookStack chapter` and its id.", + "text": "The chapter description, or the title when there is none, with the last-updated time.", + "date": "When the chapter was last updated, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "additional_metadata.bookstack_id", + "uses": [ + "Query filter" + ], + "text": "The chapter's numeric BookStack id. Picks out one chapter, and matches `additional_metadata.bookstack_chapter_id` on its pages. Not searchable." + }, + { + "name": "additional_metadata.bookstack_book_id", + "uses": [ + "Query filter" + ], + "text": "The id of the book that holds the chapter. Limits a query to one book. Not searchable." + } + ] + }, + { + "name": "Books", + "kind": "knowledge_base", + "one_document": "One book's name and description. Its chapters and pages are their own documents.", + "title": "The book name. A book with no name is titled `BookStack book` and its id.", + "text": "The book description, or the title when there is none, with the last-updated time.", + "date": "When the book was last updated, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "additional_metadata.bookstack_id", + "uses": [ + "Query filter" + ], + "text": "The book's numeric BookStack id. Picks out one book, and matches `additional_metadata.bookstack_book_id` on its chapters and pages. Not searchable." + } + ] + } + ], + "example_searches": [ + "What does the runbook page say about restoring backups?", + "Which pages in the Operations book mention VPN access?", + "What is the Onboarding book about?" + ], + "graph": { + "connections": [ + "No links between items. A page's book and chapter are kept as filters, not as graph links.", + "No links to items in other tools." + ], + "people": [ + "No people are attached. The owner is kept with the item only." + ], + "from_text": "The page text and the book and chapter descriptions." + }, + "not_synced": [ + "Books you did not select.", + "Items last updated before the `lookback_days` window on the first sync.", + "Images and files attached to pages.", + "Page revisions and comments.", + "Shelves.", + "BookStack permissions and roles.", + "A link back to the item in BookStack.", + "Deletions: deleted items stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/calendly.json b/scripts/connector_pages/calendly.json new file mode 100644 index 00000000..1524c472 --- /dev/null +++ b/scripts/connector_pages/calendly.json @@ -0,0 +1,196 @@ +{ + "description": "Sync the meetings booked through Calendly in your organization, one searchable document per meeting with its invitees and booking answers.", + "opening": [ + "Sync the meetings booked through Calendly in one organization. Each scheduled meeting is one document that combines its time, location, hosts and guests with the event type's description and every invitee's booking-form answers and cancellation reasons.", + "Calendly permissions are not imported, so every synced meeting is visible to everyone who can query the collection unless you set an access rule. Canceled meetings stay in HydraDB, marked canceled, with their cancellation reasons. A change to only an invitee or an event type does not update a meeting's document until the meeting itself changes." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Calendly uses a personal access token and your organization's Calendly API URI.", + "credentials": [ + { + "name": "auth_token", + "type": "secret string", + "required": true, + "text": "A Calendly personal access token." + }, + { + "name": "organization_url", + "type": "string", + "required": true, + "text": "Your organization's Calendly API URI, in the form `https://api.calendly.com/organizations//`. It limits the sync to that organization." + } + ], + "steps": [ + { + "title": "Create a personal access token", + "text": "Create a Calendly personal access token." + }, + { + "title": "Find your organization URI", + "text": "Find your own organization's API URI, in the form `https://api.calendly.com/organizations//`." + }, + { + "title": "Create the connector", + "text": "Paste the token as `auth_token` and the URI as `organization_url`." + }, + { + "title": "Select the organization", + "text": "HydraDB lists one item for the whole organization. Select it. You cannot pick individual meetings." + } + ], + "account": "One connector reads one Calendly organization." + }, + "sync": { + "first_sync": "Reads meetings updated within the window set by `lookback_days`, 30 days by default. Meetings with no update time are read regardless.", + "changes": "Each sync reads the meetings, invitees and event types updated since the last sync.", + "edits": "A meeting whose update time changes is read again and rebuilt with its current event type and invitees. A change to only an invitee or an event type does not update the meeting's document until the meeting itself changes.", + "deletes": "A canceled meeting stays in HydraDB with its status and any cancellation reasons. Meetings deleted in Calendly stay searchable in HydraDB." + }, + "documents": [ + { + "name": "Meetings", + "kind": "custom", + "one_document": "One scheduled meeting, with its invitees.", + "title": "The meeting name, or `Calendly event ` when it has none.", + "text": "The meeting name, a `Status` line, a `When` line with the start and end, a `Location` line, `Hosts` and `Guests` lines, and the event type's description. Then each invitee with name or email, status, cancellation reason and answered booking questions, then the meeting notes. The event type's name appears only when it has a description. The title is searchable too.", + "date": "When the meeting was last updated, else when it starts.", + "link_back": "The meeting's join link, such as a Zoom or Google Meet link, not a Calendly page. It can be empty, for example for an in-person meeting.", + "files": "None.", + "attributes": [ + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "`active` or `canceled`, written as the `Status` line." + }, + { + "name": "start_time", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the meeting starts, written in the `When` line. Sets the result date when the meeting has no update time." + }, + { + "name": "end_time", + "uses": [ + "Searchable text" + ], + "text": "When the meeting ends, written after the start in the `When` line when there is a start." + }, + { + "name": "hosts", + "uses": [ + "Searchable text" + ], + "text": "Host names, or emails when there is no name, written as the `Hosts` line. Hosts are not attached to the meeting as people in the graph." + }, + { + "name": "location", + "uses": [ + "Searchable text" + ], + "text": "The location type, such as `zoom` or `physical`, written as the `Location` line." + }, + { + "name": "join_url", + "uses": [ + "Searchable text" + ], + "text": "The join link. Used as the link back, and written in the `Location` line when the meeting has a location type." + }, + { + "name": "event_type_name", + "uses": [ + "Searchable text" + ], + "text": "The event type's name, written before its description when the description is not empty. To limit a query to one event type, filter on `additional_metadata.container_name`." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the meeting was last updated. Sets the result date and decides which meetings each sync reads. Not searchable." + }, + { + "name": "additional_metadata.calendly_uri", + "uses": [ + "Query filter" + ], + "text": "The meeting's Calendly API URI. Picks out one meeting. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The event type's URI, also kept as `event_type`. Limits a query to meetings of one event type. It does not link meetings together. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The event type's name. Limits a query to an event type by name. Not searchable under this key." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `event_type`. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's meetings. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `calendly`. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Stored only" + ], + "text": "When the meeting was booked, as distinct from when it takes place." + }, + { + "name": "invitee_count", + "uses": [ + "Stored only" + ], + "text": "How many invitees with a name or email were found when the document was built." + } + ] + } + ], + "example_searches": [ + "Who booked a demo with us this week and what did they say they need?", + "Why did invitees cancel their onboarding calls last month?", + "Which meetings are booked under the Intro call event type?" + ], + "graph": { + "connections": "No links between meetings or to other tools. The event type is a query filter, not a link.", + "people": "The connector does not attach hosts, guests or invitees to a meeting as people. Their names and emails are part of the meeting text.", + "from_text": "The whole meeting text, including who booked, their booking answers and why they cancelled." + }, + "not_synced": [ + "Routing forms, organization memberships and user records.", + "Event types and bookings as documents of their own.", + "Meetings last updated before the first sync's window.", + "Calendly sharing permissions.", + "Deletions: meetings deleted in Calendly stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/clickup.json b/scripts/connector_pages/clickup.json new file mode 100644 index 00000000..8c117c2c --- /dev/null +++ b/scripts/connector_pages/clickup.json @@ -0,0 +1,434 @@ +{ + "description": "Sync every task, subtask and task comment from the ClickUp Workspaces you choose, plus one overview page per Workspace. ClickUp permissions are not imported.", + "opening": [ + "Sync every task and subtask, including closed and archived ones, from the ClickUp Workspaces you select. Each task is one document with its description, status, people, checklists, custom fields, and its list, folder and space names. Each comment is its own document, linked to its task. Each Workspace is one short overview page listing its members.", + "ClickUp permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Task dependencies and linked tasks do not become links. Items deleted in ClickUp stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "ClickUp guest access and private Spaces, Lists and Tasks are not reproduced. Set an access rule on each Workspace that should be restricted.", + "Every synced item carries a fixed note saying ClickUp visibility is not captured, in `additional_metadata.rbac_warning`. The note itself restricts nothing." + ] + }, + "connect": { + "auth": "ClickUp uses a personal API token. It has no scopes to choose: it sees what its user sees.", + "credentials": [ + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "A ClickUp personal API token, which starts with `pk_`." + } + ], + "credentials_note": "ClickUp limits requests per token by Workspace plan, starting at 100 a minute on Free, Unlimited and Business. To rotate the token, generate a new one, update the connector, check that HydraDB still lists your Workspaces and a sync succeeds, then revoke the old one.", + "steps": [ + { + "title": "Create a token", + "text": "In ClickUp, open your avatar, Settings, Apps, API Token, and generate a token. Use a dedicated account that can open every Workspace you plan to select." + }, + { + "title": "Create the connector", + "text": "Paste the token as `api_token`." + }, + { + "title": "Select Workspaces", + "text": "HydraDB lists every Workspace the token can see. Select the Workspaces to sync. Each selected Workspace syncs its tasks and subtasks, whether open, closed or archived." + } + ], + "account": "One connector reads what one token's ClickUp user can see." + }, + "sync": { + "first_sync": "A newly selected Workspace reads back the window set by `lookback_days`, 30 days by default, measured on when tasks were last updated. The comments on those tasks are read in full, however old they are. Workspace overviews are read in full.", + "changes": "Each sync reads the tasks updated since the last sync, whether open, closed or archived, and reads all comments on each of those tasks again.", + "edits": "An edited task is picked up through its last-updated time and updates its document. A comment is read again only when its task is picked up.", + "deletes": "Tasks and comments deleted in ClickUp stay searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `clickup`. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "A fixed note that ClickUp visibility is not captured and the item is open to everyone who can query the collection. It does not restrict access. Not searchable." + } + ], + "documents": [ + { + "name": "Tasks", + "kind": "ticket", + "one_document": "One ClickUp task or subtask. Its comments are separate documents.", + "title": "The task name, or `ClickUp task` and its id when the name is empty.", + "text": "The task name, then the description as plain text when it differs from the name. Then `Status`, `Assignees`, `Priority`, `Tags`, `List`, `Folder` and `Space` lines, each checklist with its items marked `[ ]` or `[x]`, each custom field with a value as `name: value`, and one `Attachment` line per file name. The creator, the first assignee, the creation and closure dates, the task id and the parent are written into the task details too. The title is searchable too.", + "date": "When the task was last updated, or when it was created if there is no update time.", + "link_back": "The task's page in ClickUp.", + "files": "Files attached to the task are downloaded with the connector's token and read, and their text becomes searchable with the task. A file with no id or download address is skipped. A file that fails to download or is not a supported type keeps only its details.", + "attributes": [ + { + "name": "Task id", + "uses": [ + "Searchable text" + ], + "text": "The ClickUp task id. It keeps later syncs on the same document." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The status label, written as the `Status` line." + }, + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "The priority label, written as the `Priority` line." + }, + { + "name": "tags", + "uses": [ + "Searchable text" + ], + "text": "Tag names, written as the `Tags` line." + }, + { + "name": "assignees", + "uses": [ + "Searchable text" + ], + "text": "Every assignee's username, or email, written as the `Assignees` line." + }, + { + "name": "assignee", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The first assignee's username, or email. The graph records that person as the assignee. Other assignees are only in the text." + }, + { + "name": "assignee_email", + "uses": [ + "Graph identity" + ], + "text": "The first assignee's email, when available. Identifies the assignee in the graph. Not searchable." + }, + { + "name": "reporter", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The creator's display name, or email. The graph records that person as the reporter." + }, + { + "name": "reporter_email", + "uses": [ + "Graph identity" + ], + "text": "The creator's email, when available. Identifies the reporter in the graph. Not searchable." + }, + { + "name": "list_name, folder_name, space_name", + "uses": [ + "Searchable text" + ], + "text": "The names of the task's list, folder and space, written as `List`, `Folder` and `Space` lines. They are not filters, and they do not become items in the graph." + }, + { + "name": "checklists", + "uses": [ + "Searchable text" + ], + "text": "Each checklist name and its items, marked done or not done." + }, + { + "name": "clickup_custom_fields", + "uses": [ + "Searchable text" + ], + "text": "Each custom field that has a value, written as `name: value`." + }, + { + "name": "Attached files", + "uses": [ + "Searchable text" + ], + "text": "The text read from each attached file, searchable with the task. Each file name is also written as an `Attachment` line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the task was created, written into the task details. Sets the result date only when there is no update time." + }, + { + "name": "resolved_at", + "uses": [ + "Searchable text" + ], + "text": "When the task was closed, written into the task details." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the task was last updated. Sets the result date and decides when a sync picks the task up. Not searchable." + }, + { + "name": "date_created, date_updated, date_closed", + "uses": [ + "Result date" + ], + "text": "The original times in milliseconds, as ClickUp sends them. They become `created_at`, `updated_at` and `resolved_at`. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "For a subtask, its parent task's id. Links the subtask to its parent." + }, + { + "name": "additional_metadata.clickup_task_id", + "uses": [ + "Query filter" + ], + "text": "The ClickUp task id. Picks out one task. Not searchable." + }, + { + "name": "creator, creator_id", + "uses": [ + "Stored only" + ], + "text": "The creator's username, or email, and ClickUp id, as ClickUp sends them. The same person is searchable through `reporter`." + }, + { + "name": "assignee_ids", + "uses": [ + "Stored only" + ], + "text": "The ClickUp ids of all assignees." + }, + { + "name": "parent", + "uses": [ + "Stored only" + ], + "text": "The parent task id as ClickUp sends it. `parent_id` carries the searchable parent and the link." + }, + { + "name": "due_date", + "uses": [ + "Stored only" + ], + "text": "The due date. It is not written into the text." + }, + { + "name": "clickup_due_date", + "uses": [ + "Stored only" + ], + "text": "The due date in milliseconds, as ClickUp sends it." + }, + { + "name": "dependencies, linked_tasks", + "uses": [ + "Stored only" + ], + "text": "Dependency and linked-task references. They are not written into the text and do not become links." + }, + { + "name": "team_id", + "uses": [ + "Stored only" + ], + "text": "The Workspace id." + }, + { + "name": "list_id, folder_id, space_id", + "uses": [ + "Stored only" + ], + "text": "The ids of the task's list, folder and space." + } + ] + }, + { + "name": "Comments", + "kind": "comment", + "one_document": "One comment on a task.", + "title": "`Comment by on `, or `Comment on ` without an author.", + "text": "A `Task` line with the task name and id, then the comment text. The author, the comment time and the task id are written with it.", + "date": "When the comment was posted.", + "link_back": "The task's page in ClickUp. Comments have no link of their own.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The commenter's username, or email. The graph records the comment as written by that person." + }, + { + "name": "author_email", + "uses": [ + "Graph identity" + ], + "text": "The commenter's email, when ClickUp returns it. Identifies the commenter in the graph. Not searchable." + }, + { + "name": "task_name", + "uses": [ + "Searchable text" + ], + "text": "The name of the task, in the `Task` line, so a comment matches queries about its task." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The id of the task the comment is on. Links the comment to that task." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the comment was posted, written as the `Created` line." + }, + { + "name": "date", + "uses": [ + "Result date" + ], + "text": "The comment time in milliseconds, as ClickUp sends it. It becomes `created_at`. Not searchable." + }, + { + "name": "additional_metadata.clickup_comment_id", + "uses": [ + "Query filter" + ], + "text": "The ClickUp comment id. Picks out one comment. Not searchable." + }, + { + "name": "additional_metadata.clickup_task_id", + "uses": [ + "Query filter" + ], + "text": "The id of the task. Returns every comment on one task. Not searchable." + }, + { + "name": "author_id", + "uses": [ + "Stored only" + ], + "text": "The commenter's ClickUp id." + }, + { + "name": "resolved", + "uses": [ + "Stored only" + ], + "text": "Whether the action assigned in the comment is resolved." + }, + { + "name": "team_id", + "uses": [ + "Stored only" + ], + "text": "The Workspace id." + } + ] + }, + { + "name": "Workspace overviews", + "kind": "knowledge_base", + "one_document": "One selected ClickUp Workspace.", + "title": "The Workspace name, or `ClickUp workspace` and its id when the name is empty.", + "text": "`ClickUp workspace:` and the name, then a `Members` line with member usernames or emails. The title is searchable too.", + "date": "None.", + "link_back": "None.", + "attributes": [ + { + "name": "member_names", + "uses": [ + "Searchable text" + ], + "text": "Member display names, written as the `Members` line. Members are not added to the graph as people." + }, + { + "name": "members", + "uses": [ + "Stored only" + ], + "text": "The member details ClickUp returned." + }, + { + "name": "color", + "uses": [ + "Stored only" + ], + "text": "The Workspace color." + }, + { + "name": "avatar", + "uses": [ + "Stored only" + ], + "text": "The link to the Workspace avatar image." + } + ] + } + ], + "example_searches": [ + "What is open and high priority in the Mobile list?", + "Which checklist items are still open on the launch task?", + "What did people say in the comments on the checkout redesign task?" + ], + "graph": { + "connections": [ + "A subtask to its parent task.", + "A comment to its task.", + "Task dependencies and linked tasks do not become links.", + "No links to items in other tools." + ], + "people": [ + "The creator and the first assignee of each task.", + "The author of each comment.", + "Other assignees and Workspace members appear only in the text." + ], + "from_text": "Task descriptions, checklist items, custom field values and comment text." + }, + "not_synced": [ + "Workspaces you did not select.", + "Spaces, folders and lists as items of their own. Their names appear on tasks.", + "Goals, time entries, tags as items of their own, custom field definitions and task templates.", + "ClickUp visibility: guests, and private Spaces, Lists and Tasks.", + "Comments marked deleted.", + "Attached files with no usable id or download address." + ] +} diff --git a/scripts/connector_pages/coda.json b/scripts/connector_pages/coda.json new file mode 100644 index 00000000..df180a00 --- /dev/null +++ b/scripts/connector_pages/coda.json @@ -0,0 +1,248 @@ +{ + "description": "Sync the Superhuman docs you choose: one document for each doc's details, one per page with its content, and one per table row. Superhuman permissions are not imported.", + "opening": [ + "Sync the Superhuman docs you select. Each doc gives one document with its owner, workspace and folder, one document per page with the page's content, and one document per table row with its cell values. A page links to its parent page, or to its doc at the top level. Files in a row's attachment columns are downloaded when Superhuman hosts them.", + "Superhuman permissions are not imported, so everything in the selected docs is visible to everyone who can query the collection unless you set an access rule. The first sync reaches only items updated in the last 30 days unless you raise `lookback_days`. Docs, pages and rows deleted in Superhuman stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "Superhuman doc permissions are read but not applied." + ] + }, + "connect": { + "auth": "Superhuman, formerly Coda, uses a Coda API token. The token belongs to an account, not to a workspace.", + "credentials": [ + { + "name": "auth_token", + "type": "secret string", + "required": true, + "text": "A Coda API token for the account whose docs you want synced." + } + ], + "steps": [ + { + "title": "Create an API token", + "text": "Create a Coda API token for the account whose docs you want synced." + }, + { + "title": "Create the connector", + "text": "Paste the token as `auth_token`." + }, + { + "title": "Select docs", + "text": "HydraDB lists the docs the token can reach. Select the docs to sync. You select docs one by one: a whole workspace cannot be selected. To reach items older than 30 days, raise `lookback_days` when you select them." + } + ], + "account": "One connector reads the docs one account's token can reach." + }, + "sync": { + "first_sync": "Each selected doc reads back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the docs, pages and rows updated since the last sync. A change to a page's content sends that page again.", + "edits": "An edited doc, page or row is read again and replaces its document.", + "deletes": "Deleted docs, pages and rows are not removed. They stay searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the doc, page or row was last updated, written as the `Updated` line. Sets the result date." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the item was created. Sets the result date only when the update time is missing. Not searchable." + }, + { + "name": "additional_metadata.coda_doc_id", + "uses": [ + "Query filter" + ], + "text": "The doc id. Limits a query to one doc, with its pages and rows. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `coda`. Not searchable." + } + ], + "documents": [ + { + "name": "Docs", + "kind": "knowledge_base", + "one_document": "One doc's details. The doc's pages and table rows are their own documents.", + "title": "The doc name. A doc with no name is titled `Coda doc` and its id.", + "text": "The title, then `Owner`, `Workspace`, `Folder` and `Link` lines, leaving out empty ones.", + "date": "When the doc was last updated, else when it was created.", + "link_back": "Opens the doc in Superhuman.", + "attributes": [ + { + "name": "owner_name", + "uses": [ + "Searchable text" + ], + "text": "The name of the doc's owner, written as the `Owner` line, so a doc can be found by owner. The owner is not attached to the doc as a person in the graph." + }, + { + "name": "workspace_name", + "uses": [ + "Searchable text" + ], + "text": "The workspace that holds the doc, written as the `Workspace` line." + }, + { + "name": "url", + "uses": [ + "Searchable text" + ], + "text": "The doc's link, written as the `Link` line." + } + ] + }, + { + "name": "Pages", + "kind": "knowledge_base", + "one_document": "One page of a doc, with its content.", + "title": "The page name. A page with no name is titled `Coda page` and its id.", + "text": "The page's content as text, with its title and subtitle. A very large page can be cut short.", + "date": "When the page was last updated, else when it was created.", + "link_back": "Opens the page in Superhuman.", + "attributes": [ + { + "name": "subtitle", + "uses": [ + "Searchable text" + ], + "text": "The page subtitle, written as a `Subtitle` line." + }, + { + "name": "additional_metadata.coda_page_id", + "uses": [ + "Query filter" + ], + "text": "The page id. Picks out one page. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "The parent page, or the doc for a top-level page. Links the page to it, so a doc's page tree is connected. Not searchable." + }, + { + "name": "doc_id", + "uses": [ + "Stored only" + ], + "text": "The id of the doc that holds the page. To limit a query to a doc, use `additional_metadata.coda_doc_id`." + }, + { + "name": "content_type", + "uses": [ + "Stored only" + ], + "text": "The page type: `canvas`, `embed` or `syncPage`." + }, + { + "name": "page_content_elements", + "uses": [ + "Stored only" + ], + "text": "How many content elements were read from the page, blank ones included. Not a measure of how much text is searchable." + }, + { + "name": "page_content_truncated", + "uses": [ + "Stored only" + ], + "text": "True when the page's content was too large and was cut short." + } + ] + }, + { + "name": "Table rows", + "kind": "knowledge_base", + "one_document": "One row of a table.", + "title": "The table name, a dash and the row name. A row with no name is titled by its table alone. When the table is not known, the row name alone, or `Coda row` and its id.", + "text": "The title, a `Table` line when the table is known, then each non-empty cell as a labelled line, in column order. A column whose name is not known is labelled with its id and comes last. Money values show the amount and currency. Numbers are rounded to six decimal places. Cell values HydraDB cannot show as text are left out. A column that refers to another row is text, not a link.", + "date": "When the row was last updated, else when it was created.", + "link_back": "Opens the row in Superhuman, or its table when the row has no link.", + "files": "Files in attachment columns are downloaded so their text can be read, but only when they are hosted on coda.io or codahosted.io. Links to files elsewhere are dropped.", + "attributes": [ + { + "name": "table_name", + "uses": [ + "Searchable text" + ], + "text": "The row's table. Starts the title and is the `Table` line, so rows can be found by table." + }, + { + "name": "additional_metadata.coda_table_id", + "uses": [ + "Query filter" + ], + "text": "The table id. Limits a query to one table's rows. Not searchable." + }, + { + "name": "additional_metadata.coda_row_id", + "uses": [ + "Query filter" + ], + "text": "The row id. Picks out one row. Not searchable." + }, + { + "name": "doc_id", + "uses": [ + "Stored only" + ], + "text": "The id of the doc that holds the row." + }, + { + "name": "table_id", + "uses": [ + "Stored only" + ], + "text": "The id of the row's table." + } + ] + } + ], + "example_searches": [ + "What does the Q4 planning doc say about hiring?", + "Which rows in the Roadmap table have status Blocked?", + "Who owns the Team Rituals doc?" + ], + "graph": { + "connections": [ + "A page to its parent page, or to its doc for a top-level page.", + "Rows are not linked to their table or doc in the graph.", + "No links to items in other tools." + ], + "people": [ + "No people are attached. A doc owner's name is part of the doc's text only." + ], + "from_text": "The doc details, page content and row cell values." + }, + "not_synced": [ + "Docs you did not select.", + "Items last updated before the `lookback_days` window on the first sync.", + "Controls, formulas as definitions, and doc permissions. Formula results shown in row cells can still be searchable.", + "Files in attachment columns that are not hosted on coda.io or codahosted.io.", + "The rest of a very large page after it is cut short.", + "Deletions: deleted docs, pages and rows stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/confluence.json b/scripts/connector_pages/confluence.json new file mode 100644 index 00000000..6c03b4cf --- /dev/null +++ b/scripts/connector_pages/confluence.json @@ -0,0 +1,316 @@ +{ + "description": "Sync pages, blog posts and attached files from the Confluence Cloud spaces you choose. With Enforce ACL on, space permissions and page restrictions decide who can find each item.", + "opening": [ + "Sync pages, blog posts and their attached files from the Confluence Cloud spaces you select. Each page or blog post is one document, holding its text with the markup removed. Each attached file is its own document, linked to its page. Text from supported attachments is searchable when HydraDB can download and read the files. A page links to its parent page.", + "Space permissions and page view restrictions, including those inherited from parent pages, restrict search when Enforce ACL is on. An attached file follows only its space's permissions until its page has synced, so at first it can have a wider audience than its restricted page. Comments are not synced. Pages and files deleted in Confluence stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "Two levels apply. A space's view permissions decide who can read its pages, and a space open to all licensed users can be read by everyone who can query the collection. A page's own view restriction, and the restrictions of its restricted parent pages, narrow that further: a reader must meet every one of them. An attached file follows its page.", + "identity": "A user's email address. Confluence groups are turned into their members' email addresses. This works only when the site shows user email addresses.", + "when_unreadable": "If HydraDB cannot read a space's permissions, or cannot resolve a page's restrictions, the connector reports a permission warning. A page restricted to a user whose email the site hides cannot be resolved.", + "notes": [ + "Reading a space's permissions needs the Space admin permission on that space.", + "A page whose restriction levels resolve to nobody, or have no reader in common, is hidden.", + "A file attached to a restricted page follows the space's permissions until its page has synced.", + "Space admins' access through their admin role is not recorded.", + "A restriction change that does not edit the page is checked on later syncs, not the first one. A restriction removed from a page can wait until the page is next edited." + ] + }, + "connect": { + "auth": "Confluence uses an Atlassian account email and an Atlassian API token. The token carries that user's own space permissions.", + "credentials": [ + { + "name": "base_url", + "type": "string", + "required": true, + "text": "Your Confluence Cloud address, for example `https://your-domain.atlassian.net/wiki`." + }, + { + "name": "email", + "type": "string", + "required": true, + "text": "The Atlassian account email used to sign in." + }, + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "An Atlassian API token for that account." + } + ], + "permissions_label": "What the Atlassian account needs", + "permissions": [ + { + "name": "View space", + "text": "required. Lists spaces and their pages." + }, + { + "name": "View pages", + "text": "required. Reads page and blog post text." + }, + { + "name": "Space admin", + "text": "optional, for search that follows Confluence permissions. Reads each space's permission list." + }, + { + "name": "Browse users and groups", + "text": "optional, for search that follows Confluence permissions. Turns groups into their members' emails and users into emails." + } + ], + "permissions_note": "For search that follows Confluence permissions, the site must also show user email addresses. Turn this on in admin.atlassian.com, under Settings, User email visibility.", + "steps": [ + { + "title": "Choose the account", + "text": "Use an Atlassian account that can view every space you want synced. For search that follows Confluence permissions, give it Space admin on each of those spaces, and make the site show user email addresses." + }, + { + "title": "Create an API token", + "text": "Create an Atlassian API token for that account." + }, + { + "title": "Create the connector", + "text": "Enter `base_url`, `email` and `api_token`." + }, + { + "title": "Select spaces", + "text": "HydraDB lists the site's spaces. Select the spaces to sync. Each selected space syncs on its own." + } + ], + "account": "One connector reads one Confluence Cloud site, as one Atlassian user." + }, + "sync": { + "first_sync": "Each selected space reads back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the pages, blog posts and files modified since the last sync, space by space. A newly uploaded file is picked up on its own, without a page edit.", + "edits": "An edited page has a new version, so the next sync reads it again and updates its document.", + "deletes": "Deleted pages and files are not removed. They stay searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the page or file last changed, written as the `Updated` line. Sets the result date." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "For a page, its parent page, empty at the top of a space. For a file, the page or blog post it is attached to. Links the item to that page. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The space key, for example `ENG`. Limits a query to one space. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The space display name. Limits a query to one space by name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `space`. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `confluence`. Not searchable." + }, + { + "name": "Space and page restrictions", + "uses": [ + "Access rule" + ], + "text": "The space's view permissions and the page's restrictions, including inherited ones. A file uses its page's. Together they decide who can read the item when Enforce ACL is on. Not searchable." + }, + { + "name": "space", + "uses": [ + "Stored only" + ], + "text": "The space display name. To limit a query to a space, use `additional_metadata.container_name`." + }, + { + "name": "space_key", + "uses": [ + "Stored only" + ], + "text": "The space key. To limit a query to a space, use `additional_metadata.container_id`." + } + ], + "documents": [ + { + "name": "Pages and blog posts", + "kind": "knowledge_base", + "one_document": "One page or one blog post.", + "title": "The page or blog post title. One with no title is titled `Confluence content` and its id.", + "text": "The page body with all markup removed. If that leaves nothing, the title is used. The title, author and last-updated time are searchable too. Attached files are separate documents.", + "date": "The time of the page's current version.", + "link_back": "Opens the page in Confluence.", + "attributes": [ + { + "name": "created_by", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The creator's display name, or email if there is no name, written as the `Author` line. The graph records the page as written by that person." + }, + { + "name": "created_by_email", + "uses": [ + "Graph identity" + ], + "text": "The creator's email, when Confluence shows it. Gives the author an email in the graph, so the same person is recognised across tools. Not searchable." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "People @mentioned in the page, as Confluence usernames or user keys, not display names. The graph records each as mentioned. Not searchable." + }, + { + "name": "content_type", + "uses": [ + "Stored only" + ], + "text": "`page` or `blogpost`." + }, + { + "name": "status", + "uses": [ + "Stored only" + ], + "text": "The Confluence status, for example `current`." + }, + { + "name": "created_at", + "uses": [ + "Stored only" + ], + "text": "When the page was created." + }, + { + "name": "updated_by", + "uses": [ + "Stored only" + ], + "text": "The name or email of whoever made the current version. Not attached to the page as a person in the graph." + }, + { + "name": "updated_by_email", + "uses": [ + "Stored only" + ], + "text": "That editor's email, when Confluence shows it." + } + ] + }, + { + "name": "Attached files", + "kind": "knowledge_base", + "one_document": "One file attached to a page or blog post.", + "title": "The file name. A file with no name is titled `Confluence attachment` and its id.", + "text": "The text read from the file. If no text can be read, the file name is still searchable. The last-modified time is searchable too.", + "date": "When the file was last modified.", + "link_back": "Opens the file in Confluence.", + "files": "Each file is downloaded with the connector's credentials. Text from supported attachments is searchable when HydraDB can download and read the files. Only files attached to pages or blog posts are kept. Space logos and template images are left out.", + "attributes": [ + { + "name": "additional_metadata.confluence_page_id", + "uses": [ + "Query filter" + ], + "text": "The id of the page the file is attached to. Finds every file on one page. Not searchable." + }, + { + "name": "additional_metadata.confluence_attachment_id", + "uses": [ + "Query filter" + ], + "text": "The attachment id. Picks out one file. Not searchable." + }, + { + "name": "additional_metadata.confluence_file_id", + "uses": [ + "Query filter" + ], + "text": "The file id, which stays the same across the file's versions. Matches a file across versions. Not searchable." + }, + { + "name": "additional_metadata.confluence_media_type", + "uses": [ + "Query filter" + ], + "text": "The file's type, for example `application/pdf`. Limits a query to one file type. Not searchable." + }, + { + "name": "content_type", + "uses": [ + "Stored only" + ], + "text": "The file's type." + }, + { + "name": "created_at", + "uses": [ + "Stored only" + ], + "text": "When the file was uploaded." + }, + { + "name": "file_size", + "uses": [ + "Stored only" + ], + "text": "The size in bytes." + } + ] + } + ], + "example_searches": [ + "What does the ENG space say about our deploy process?", + "Who wrote the incident postmortem page for the March outage?", + "What is in the PDFs attached to the Security Policy page?" + ], + "graph": { + "connections": [ + "A page to its parent page.", + "An attached file to its page or blog post.", + "No links to items in other tools. A link to another page written in the page text does not become a connection." + ], + "people": [ + "The creator of each page and blog post.", + "People @mentioned in a page, by Confluence username or user key.", + "The editor of the current version is kept with the page but not attached as a person." + ], + "from_text": "The page text and the text read from attached files. A file is read together with its page's title and text." + }, + "not_synced": [ + "Page comments and inline comments.", + "Space logos and template images.", + "Spaces the Atlassian account cannot view.", + "Deletions: deleted pages and files stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/contentful.json b/scripts/connector_pages/contentful.json new file mode 100644 index 00000000..b28ba954 --- /dev/null +++ b/scripts/connector_pages/contentful.json @@ -0,0 +1,182 @@ +{ + "description": "Sync entries, and pending task text on them, from the Contentful spaces you choose. Contentful permissions are not imported.", + "opening": [ + "Sync the entries of the Contentful spaces you select, from every environment of each space. Each entry in each environment is one document, with its text fields written as labelled lines. Task text on an entry is its own document, linked to the entry.", + "Contentful permissions are not imported, so every synced entry is visible to everyone who can query the collection unless you set an access rule. Only one language is kept for each field, English (en-US) first. Assets, reference fields and authors are not synced, and entries deleted in Contentful stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Contentful uses a Content Management API token.", + "credentials": [ + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "A Contentful Content Management API token." + }, + { + "name": "space_id", + "type": "string", + "required": true, + "text": "The id of a Contentful space. Required, but the spaces synced are the ones you select. A space named here and not selected is not synced." + } + ], + "steps": [ + { + "title": "Create a token", + "text": "In Contentful, create a Content Management API token." + }, + { + "title": "Create the connector", + "text": "Paste the token as `api_token` and enter a space id as `space_id`." + }, + { + "title": "Select spaces", + "text": "HydraDB lists the spaces the token can reach. Select the spaces to sync. To reach entries older than 30 days, raise `lookback_days` when you select them." + } + ], + "account": "One connector reads the spaces one Content Management API token can reach." + }, + "sync": { + "first_sync": "Each selected space reads back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the entries and tasks updated since the last sync.", + "edits": "An edited entry is read again and replaces its document.", + "deletes": "Deleted entries and tasks are not removed. They stay searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the entry or task was last updated, written as the `Updated` line. Sets an entry's result date, and a task's when it has no creation time." + }, + { + "name": "additional_metadata.contentful_entry_id", + "uses": [ + "Query filter" + ], + "text": "The entry id. On an entry, picks out that entry. On a task, the entry it is on, so one key finds an entry and its tasks. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `contentful`. Not searchable." + }, + { + "name": "space_id", + "uses": [ + "Stored only" + ], + "text": "The space id. Keeps items from different spaces apart. There is no filter on it." + }, + { + "name": "environment_id", + "uses": [ + "Stored only" + ], + "text": "The environment id, often `master`. Keeps the same entry in different environments apart. There is no filter on it." + } + ], + "documents": [ + { + "name": "Entries", + "kind": "knowledge_base", + "one_document": "One entry in one environment.", + "title": "The first non-empty text in the entry's `title`, `name`, `heading` or `slug` field, checking en-US first and then other languages alphabetically. An entry with none is titled `Contentful entry` and its id.", + "text": "The entry's text fields as labelled lines: `title`, `name`, `heading` and `slug` first, then other fields alphabetically. Each field uses its first non-empty value, en-US first, then other languages alphabetically. Rich text is flattened, and links keep their URLs in brackets. Numbers, true or false values and lists of text are included. Reference fields and embedded entries or assets are left out. If no field has text, the title stands in.", + "date": "When the entry was last updated, else when it was created.", + "link_back": "Opens the entry's editor page in the Contentful web app.", + "files": "None. Assets, such as images and files, are not synced.", + "attributes": [ + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the entry was created. Sets the result date only when the update time is missing. Not searchable." + } + ] + }, + { + "name": "Tasks", + "kind": "comment", + "one_document": "One task on an entry. Tasks come from Contentful's pending-task list for the token, not from a complete task history. Tasks with no text are skipped.", + "title": "`Contentful task` and the task id.", + "text": "The task text, with `Created`, `Updated` and `Parent` lines.", + "date": "When the task was created, else when it was last updated.", + "link_back": "None.", + "attributes": [ + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the task was created, written as the `Created` line. Sets the result date." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The entry the task is on, written as the `Parent` line. Links the task to its entry." + }, + { + "name": "additional_metadata.contentful_task_id", + "uses": [ + "Query filter" + ], + "text": "The task id. Picks out one task. Not searchable." + }, + { + "name": "status", + "uses": [ + "Stored only" + ], + "text": "`active` or `resolved`. A query cannot match or filter on it." + } + ] + } + ], + "example_searches": [ + "What does our Pricing FAQ entry say about enterprise discounts?", + "Which blog post entries mention the 2026 conference?", + "What task text is attached to the homepage hero entry?" + ], + "graph": { + "connections": [ + "A task to the entry it is on.", + "Entries are not linked to the entries or assets they reference.", + "No links to items in other tools." + ], + "people": [ + "No people are attached. No author, assignee or editor is recorded." + ], + "from_text": "The entry's text fields and the task text." + }, + "not_synced": [ + "Spaces you did not select.", + "Entries last updated before the `lookback_days` window on the first sync.", + "Assets, such as images and files, and their text.", + "Values of reference fields that point to other entries or assets.", + "Other languages of a field once one language has a value.", + "Content types, tags and taxonomy.", + "Authors, assignees and editors.", + "A complete task history.", + "Deletions: deleted entries stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/copper.json b/scripts/connector_pages/copper.json new file mode 100644 index 00000000..ce799db9 --- /dev/null +++ b/scripts/connector_pages/copper.json @@ -0,0 +1,338 @@ +{ + "description": "Sync opportunities, leads, tasks, projects, people, companies and logged activities from one Copper account. Copper permissions are not imported.", + "opening": [ + "Sync a whole Copper account: opportunities, leads, tasks, projects, people, companies, and the notes and logged interactions on them. Each record or activity is one document. An activity links to the record it is logged on.", + "One account-wide resource covers everything the API key can read. Copper permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Records deleted in Copper stay in HydraDB. Activities with no text, such as stage changes, are skipped." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Copper uses an API key together with the email of the Copper user the key belongs to.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "A Copper API key." + }, + { + "name": "user_email", + "type": "string", + "required": true, + "text": "The email of the Copper user the API key belongs to." + } + ], + "steps": [ + { + "title": "Get an API key", + "text": "In Copper, get an API key. Note the email of the Copper user it belongs to." + }, + { + "title": "Create the connector", + "text": "Paste the key as `api_key` and the user's email as `user_email`." + }, + { + "title": "Configure the connector", + "text": "HydraDB lists one account-wide resource, All data. Select it to sync everything the key can read in the account." + } + ], + "account": "One connector reads one Copper account." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads records and activities modified since the last sync.", + "edits": "An edited record is read again and updates its document.", + "deletes": "Deleted records are not removed. A record deleted in Copper stays searchable in HydraDB.", + "notes": [ + "If the account does not have a Copper add-on feature enabled, the record type that needs it is skipped with a warning and the other types still sync." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.copper_id", + "uses": [ + "Query filter" + ], + "text": "The Copper record id. Targets one record, and keeps later syncs on the same document. Tasks carry a `task:` prefix and projects a `project:` prefix, so include it when you filter on a task or project. Not searchable." + }, + { + "name": "additional_metadata.copper_object", + "uses": [ + "Query filter" + ], + "text": "The record type, such as `opportunities`, `people` or `activities_search`. Limits a query to one type. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `copper`. Not searchable." + } + ], + "documents": [ + { + "name": "Opportunities, leads, tasks and projects", + "kind": "ticket", + "one_document": "One opportunity, lead, task or project.", + "title": "The record's name.", + "text": "The record's free-text details, then `Label: value` lines. Opportunities: `Name`, `Company`, `Status`, `Value` with its currency, `Close date` and `Assignee`. Leads: `Name`, `Company`, `Title`, `Status`, `Value`, `Email` and `Assignee`. Tasks: `Name`, `Status`, `Priority`, `Due date`, `Tags` and `Assignee`. Projects: `Name`, `Status`, `Company`, `Tags` and `Assignee`. The name is searchable too.", + "date": "When the record was last modified, else when it was created.", + "link_back": "None. Use `additional_metadata.copper_id` to find the record in Copper.", + "attributes": [ + { + "name": "assignee", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The assigned user's name, or their email when the name is missing, written as the `Assignee` line. The graph records the record as assigned to that person." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The Copper status, such as Open, Won, Lost or Completed, written as the `Status` line." + }, + { + "name": "monetary_value", + "uses": [ + "Searchable text" + ], + "text": "An opportunity's or lead's value, written as the `Value` line." + }, + { + "name": "company_name", + "uses": [ + "Searchable text" + ], + "text": "The related company's name on opportunities, leads and projects, written as the `Company` line." + }, + { + "name": "close_date", + "uses": [ + "Searchable text" + ], + "text": "An opportunity's close date, written as the `Close date` line." + }, + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "A task's priority, written as the `Priority` line." + }, + { + "name": "due_date", + "uses": [ + "Searchable text" + ], + "text": "A task's due time, written as the `Due date` line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was created, written as a `Created` line. Used as the result date only when the modification time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the record was last modified. Not searchable." + }, + { + "name": "pipeline_id", + "uses": [ + "Stored only" + ], + "text": "An opportunity's pipeline id. It is not turned into a name." + }, + { + "name": "pipeline_stage_id", + "uses": [ + "Stored only" + ], + "text": "An opportunity's stage id. It is not turned into a name." + }, + { + "name": "completed_date", + "uses": [ + "Stored only" + ], + "text": "When a task was completed. It is not the result date." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The record type. Filter on it with `additional_metadata.copper_object`." + } + ] + }, + { + "name": "People and companies", + "kind": "custom", + "one_document": "One person, or one company.", + "title": "The person's or company's name.", + "text": "The record's free-text details, then `Label: value` lines. People: `Name`, `Company`, `Title`, `Emails` and `Assignee`. Companies: `Name`, `Email domain` and `Assignee`. The name is searchable too.", + "date": "When the record was last modified, else when it was created.", + "link_back": "None. Use `additional_metadata.copper_id` to find the record in Copper.", + "attributes": [ + { + "name": "assignee", + "uses": [ + "Searchable text" + ], + "text": "The owner's name, written as the `Assignee` line, where HydraDB can identify the person. It does not create an assignee relationship." + }, + { + "name": "company_name", + "uses": [ + "Searchable text" + ], + "text": "A person's company, written as the `Company` line." + }, + { + "name": "title", + "uses": [ + "Searchable text" + ], + "text": "A person's job title, written as the `Title` line." + }, + { + "name": "email_domain", + "uses": [ + "Searchable text" + ], + "text": "A company's email domain, written as the `Email domain` line, so a company can be found by its domain." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the record was last modified. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the record was created. Used as the result date only when the modification time is missing. Not searchable." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "`people` or `companies`. Filter on it with `additional_metadata.copper_object`." + } + ] + }, + { + "name": "Activities", + "kind": "comment", + "one_document": "One note or logged interaction that has text. Activities with no text, such as stage changes, are skipped.", + "title": "`Comment by` and the name of the user who logged it. Without an author, the first 80 characters of the text. The activity type is not used as the title and is not searchable.", + "text": "The activity's details text, with the author, the record it is logged on, and its created and updated times.", + "date": "When the activity record was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The user who logged the activity, as a name. The graph records the activity as written by that person." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The record the activity is logged on, written as a `Parent` line. Links the activity to that record when it is a person, lead, opportunity, company, project or task." + }, + { + "name": "additional_metadata.copper_parent_id", + "uses": [ + "Query filter" + ], + "text": "The bare id of the record the activity is logged on, with no prefix. Returns every activity logged on one record. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the activity record was last modified, written as an `Updated` line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the activity record was created, written as a `Created` line. Used as the result date only when the modification time is missing." + }, + { + "name": "activity_date", + "uses": [ + "Stored only" + ], + "text": "When the activity happened. It is not the result date." + }, + { + "name": "parent_type", + "uses": [ + "Stored only" + ], + "text": "The type of record the activity is logged on: person, lead, opportunity, company, project or task." + } + ] + } + ], + "example_searches": [ + "Which opportunities for Acme are open and what are they worth?", + "What was the last note logged on this lead?", + "Which tasks are due this week and who owns them?" + ], + "graph": { + "connections": [ + "An activity to the person, lead, opportunity, company, project or task it is logged on.", + "An opportunity to its company and its primary contact.", + "A person to their company.", + "A task or project to its related record, and a project to its company.", + "A link is made only to record types this connector syncs. No links to other tools." + ], + "people": [ + "The assignee of each opportunity, lead, task and project.", + "The author of each activity.", + "The assignee of a person or company appears only in its text." + ], + "from_text": "The free-text details of every record, the `Label: value` lines, and the text of notes and logged interactions." + }, + "not_synced": [ + "Activities with no text, such as stage changes.", + "Custom field values.", + "Pipelines, stages, tags, lead statuses, loss reasons and other Copper settings, as documents of their own.", + "Files attached to records.", + "Deletions: deleted records stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/datadog.json b/scripts/connector_pages/datadog.json new file mode 100644 index 00000000..f3d759b5 --- /dev/null +++ b/scripts/connector_pages/datadog.json @@ -0,0 +1,413 @@ +{ + "description": "Sync monitors, dashboards, SLOs, notebooks and incidents from your Datadog organization, plus log, metric and SLO summaries. Only private incidents carry a Datadog restriction.", + "opening": [ + "Sync monitors with their runbook messages, dashboard summaries, SLO definitions, notebooks and incidents from one Datadog organization. Each is one document. Each sync also adds a log count for the sync window, and metric and SLO histories when you set their query or SLO id.", + "Raw logs, traces, metric points and dashboard widgets are not synced. Only incidents carry a Datadog restriction: with Enforce ACL on, a private incident is hidden from everyone, including its participants. Items deleted in Datadog stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "Only incidents carry a Datadog restriction. An incident Datadog marks private can be read by no one, not even its participants, because Datadog does not list them. Monitors, dashboards, SLOs, notebooks, log and metric summaries, and incidents visible to the organization follow the access rule you set on the resource. With no rule, everyone who can query the collection can read them.", + "identity": "No people are read. A private incident is closed to everyone.", + "when_unreadable": "If Datadog reports an incident visibility HydraDB does not recognise, HydraDB makes no permission claim for that incident. It follows the access rule you set on its resource. With no rule, everyone who can query the collection can read it.", + "notes": [ + "With Enforce ACL off, private incidents are searchable like any other item." + ], + "cloud_outcome": false + }, + "connect": { + "auth": "Datadog uses an API key and an application key. The application key's scopes decide what syncs.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "A Datadog API key, from Organization Settings, API Keys. It identifies your org." + }, + { + "name": "app_key", + "type": "secret string", + "required": true, + "text": "A Datadog application key, from Organization Settings, Application Keys. It is created without scopes, so edit it afterwards to add the scopes below." + } + ], + "settings": [ + { + "name": "site", + "type": "string", + "text": "Your Datadog site if it is not US1, for example `us5.datadoghq.com` or `datadoghq.eu`." + }, + { + "name": "log_query", + "type": "string", + "text": "A full logs query to count. Takes priority over `log_service`." + }, + { + "name": "log_service", + "type": "string", + "text": "One service name to narrow the log count. Ignored when `log_query` is set." + }, + { + "name": "log_measure", + "type": "string", + "text": "A log measure to sum alongside the count, for example `@duration`." + }, + { + "name": "metric_query", + "type": "string", + "text": "A metrics query to sync as a history. Leave it blank to skip metrics." + }, + { + "name": "slo_id_us", + "type": "string", + "text": "An SLO id whose history to sync, labelled US. Every SLO id field reads from your configured site." + }, + { + "name": "slo_id_eu", + "type": "string", + "text": "An SLO id whose history to sync, labelled EU." + }, + { + "name": "slo_id_ca", + "type": "string", + "text": "An SLO id whose history to sync, labelled CA." + } + ], + "permissions_label": "Scopes to add to the application key", + "permissions": [ + { + "name": "timeseries_query", + "text": "runs `metric_query`." + }, + { + "name": "slos_read", + "text": "reads SLO history." + }, + { + "name": "logs_read_data", + "text": "runs the log count." + }, + { + "name": "monitors_read" + }, + { + "name": "dashboards_read" + }, + { + "name": "notebooks_read" + }, + { + "name": "incident_read", + "text": "if Datadog refuses it on the first request, incidents are skipped and everything else syncs." + } + ], + "permissions_note": "An application key left without scopes has its owner's full permissions. Set exactly these scopes. Most refused reads fail the sync.", + "steps": [ + { + "title": "Create the keys", + "text": "In Datadog, create an API key under Organization Settings, API Keys, and an application key under Organization Settings, Application Keys." + }, + { + "title": "Scope the application key", + "text": "Open the new application key and edit its scopes to exactly the list above." + }, + { + "title": "Create the connector", + "text": "Paste the keys as `api_key` and `app_key`. Set `site` if your org is not on US1." + }, + { + "title": "Select All data", + "text": "There is nothing to browse. Select the single All data resource." + }, + { + "title": "Choose what to summarise", + "text": "Narrow the log count with `log_query` or `log_service`, and add `log_measure` for a sum. Left blank, logs are still counted across the default `main` index, normally as one total. Set `metric_query` and the SLO id fields to sync those histories. Left blank, they are skipped." + } + ], + "account": "One connector reads one Datadog organization on one site." + }, + "sync": { + "first_sync": "Monitors, dashboards, SLOs, notebooks and incidents are read in full, whatever their age. The log count, metric history and SLO history cover the window set by `lookback_days`, 30 days by default. Each metric or SLO history document covers the month up to one day, not that day alone.", + "changes": "Monitors, dashboards, SLOs, notebooks and incidents are read in full on every sync, and ones that did not change are skipped. Metric and SLO histories add documents as days pass. The log count is recalculated for each sync window.", + "edits": "A changed monitor, dashboard, SLO, notebook or incident updates its document on the next sync.", + "deletes": "Items deleted in Datadog stay searchable in HydraDB. Dashboards Datadog has marked as deleted are not synced.", + "notes": [ + "A changed log count can become a new document instead of replacing the old one, so earlier counts can stay searchable.", + "An unknown metric can return an empty history.", + "If HydraDB cannot read every incident, the sync fails instead of keeping a partial list." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.datadog_stream", + "uses": [ + "Query filter" + ], + "text": "The kind of record: `monitors`, `dashboards`, `slos`, `notebooks`, `incidents`, `aggregate_logs`, `metric_response_time`, `slo_history_us_prod`, `slo_history_eu_prod` or `slo_history_ca_prod`. Keeps only monitors, only incidents, and so on. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `datadog`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The kind of record, the same value as `additional_metadata.datadog_stream`." + } + ], + "documents": [ + { + "name": "Monitors", + "kind": "custom", + "one_document": "One monitor.", + "title": "The monitor name, else `Datadog monitor`.", + "text": "The name, then `Type`, `Status`, `Priority`, `Query`, `Tags`, `Created by` and `Modified` lines, then the monitor message, usually the runbook, word for word. The title is searchable too.", + "date": "When the monitor was last modified.", + "link_back": "None.", + "attributes": [ + { + "name": "Modified", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the monitor was last modified, written as the `Modified` line." + }, + { + "name": "Service tags", + "uses": [ + "Graph connection" + ], + "text": "Each `service:` tag links the monitor to that service, as `service:`, together with the SLOs and incidents of the same service. The tags themselves are searchable in the `Tags` line. Not searchable as links." + }, + { + "name": "Composite monitor query", + "uses": [ + "Graph connection" + ], + "text": "A composite monitor links to each monitor in its query. Not searchable as links." + } + ] + }, + { + "name": "Dashboards", + "kind": "custom", + "one_document": "One dashboard summary, without its widgets.", + "title": "The dashboard title, else `Datadog dashboard`.", + "text": "The title, then `Description`, `Author`, `Layout`, `URL` and `Modified` lines.", + "date": "When the dashboard was last modified.", + "link_back": "None. The dashboard's address is the searchable `URL` line.", + "attributes": [ + { + "name": "Modified", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the dashboard was last modified, written as the `Modified` line." + } + ] + }, + { + "name": "SLOs", + "kind": "custom", + "one_document": "One SLO definition.", + "title": "The SLO name, else `Datadog SLO`.", + "text": "The name, then `Description`, `Type`, `Timeframe`, the target or per-timeframe thresholds, the `Numerator` and `Denominator` queries, and `Tags`. The title is searchable too.", + "date": "When the SLO was last modified.", + "link_back": "None.", + "attributes": [ + { + "name": "Monitors", + "uses": [ + "Graph connection" + ], + "text": "Links the SLO to each monitor it is built on. Not searchable." + }, + { + "name": "Service tags", + "uses": [ + "Graph connection" + ], + "text": "Each `service:` tag links the SLO to that service, as `service:`. Not searchable as links." + }, + { + "name": "Modified", + "uses": [ + "Result date" + ], + "text": "When the SLO was last modified. Not searchable." + } + ] + }, + { + "name": "Notebooks", + "kind": "custom", + "one_document": "One notebook with its markdown cells.", + "title": "The notebook name, else `Datadog notebook`.", + "text": "The name, then `Author`, `Status` and `Modified` lines, then the text of every markdown cell. Graph cells add nothing. The title is searchable too.", + "date": "When the notebook was last modified.", + "link_back": "None.", + "attributes": [ + { + "name": "Modified", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the notebook was last modified, written as the `Modified` line." + } + ] + }, + { + "name": "Incidents", + "kind": "custom", + "one_document": "One declared incident, private ones included.", + "title": "The incident title, else `Datadog incident`.", + "text": "The title, then `Visibility`, `State`, `Severity`, `Customer impacted`, `Customer impact scope`, `Declared`, `Detected` and `Resolved` lines, and the incident's own fields, such as services and teams.", + "date": "When the incident was last modified.", + "link_back": "None.", + "files": "A postmortem notebook attached to the incident becomes a link to that notebook. Other attachments are not read.", + "attributes": [ + { + "name": "visibility", + "uses": [ + "Searchable text", + "Access rule" + ], + "text": "`organization` or `private`, written as the `Visibility` line. With Enforce ACL on, a private incident is hidden from everyone." + }, + { + "name": "Postmortem", + "uses": [ + "Graph connection" + ], + "text": "Links the incident to its postmortem notebook. Not searchable as a link." + }, + { + "name": "Services", + "uses": [ + "Graph connection" + ], + "text": "Each service named on the incident links it to that service, as `service:`. Not searchable as links." + }, + { + "name": "Modified", + "uses": [ + "Result date" + ], + "text": "When the incident was last modified. Not searchable." + } + ] + }, + { + "name": "Log counts", + "kind": "custom", + "one_document": "One log count for the sync window, usually a single total. Individual log messages are not synced.", + "title": "`Datadog log aggregate`, with the host and status added when present.", + "text": "`Host`, `Status` and `Count` lines, and the sum of `log_measure` when set. The title is searchable too.", + "date": "None.", + "link_back": "None.", + "attributes": [ + { + "name": "host, status", + "uses": [ + "Searchable text" + ], + "text": "The host and status the count is grouped by, in the title and text. Usually empty for the default total." + } + ] + }, + { + "name": "Metric histories", + "kind": "custom", + "one_document": "One window of `metric_query`. Only when `metric_query` is set.", + "title": "`Datadog metric:` followed by the metric or query.", + "text": "`Query` and `Window` lines, and one `Series` line per returned series with a summary of its points. The title is searchable too.", + "date": "The end of the window.", + "link_back": "None.", + "attributes": [ + { + "name": "query, metric, window_start, window_end", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "The query, the metric name and the window. The window end is the result date." + } + ] + }, + { + "name": "SLO histories", + "kind": "custom", + "one_document": "One history window of an SLO id set in `slo_id_us`, `slo_id_eu` or `slo_id_ca`.", + "title": "A `Datadog SLO` history title with the SLO name.", + "text": "`SLO`, `Description`, `SLI Value`, `Target`, `Type`, `Tags`, `Creator`, `Window`, `Region` and `SLO Id` lines. The title is searchable too.", + "date": "The end of the window.", + "link_back": "None.", + "attributes": [ + { + "name": "slo_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The SLO id, written as the `SLO Id` line. Links the history window to the SLO's own record when it is synced." + }, + { + "name": "sli_value, target, region", + "uses": [ + "Searchable text" + ], + "text": "The measured value, the target and the region label. The region is a label only." + }, + { + "name": "window_start, window_end", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "The history period, written as the `Window` line. The window end is the result date." + } + ] + } + ], + "example_searches": [ + "What is the runbook for the checkout latency monitor?", + "Which SLOs are built on the api-errors monitor?", + "What did the on-call write in the database migration notebook?" + ], + "graph": { + "connections": [ + "An SLO to each monitor it is built on.", + "A composite monitor to each monitor in its query.", + "An incident to its postmortem notebook.", + "An SLO history window to its SLO.", + "Monitors, SLOs and incidents to their service, from `service:` tags and incident service fields.", + "Dashboards are not linked to the monitors or SLOs they show, because widgets are not synced.", + "Links reach only items this connector has synced, that are not deleted. No links to items in other tools." + ], + "people": "No one is attached as a person in the graph. Monitor creators and dashboard and notebook authors appear only in the text.", + "from_text": "Monitor messages, notebook cells, descriptions and incident text." + }, + "not_synced": [ + "Dashboard widgets and graphs.", + "Raw logs, traces, events and metric points beyond the log count, `metric_query` and the SLO ids you set.", + "Log indexes other than `main`.", + "Notebook graph cells.", + "Incident timelines, to-dos and attachments other than postmortem notebook links.", + "Synthetics, security signals, RUM and APM.", + "Dashboards Datadog has marked as deleted." + ] +} diff --git a/scripts/connector_pages/discord.json b/scripts/connector_pages/discord.json new file mode 100644 index 00000000..916e761a --- /dev/null +++ b/scripts/connector_pages/discord.json @@ -0,0 +1,320 @@ +{ + "description": "Sync the messages a Discord bot can read in the servers you choose, one document per message. Discord channel and role permissions are not carried over.", + "opening": [ + "Sync messages from the Discord servers you select: channel histories, including the text chat of voice and stage channels, and active and archived threads, including forum and media threads. Each message is one document. A reply is its own document and links to the message it answers. Text from PDF and DOCX attachments is searchable with the message when it can be read.", + "Discord permissions are not imported, so private and role-restricted channels are visible to everyone who can query the collection unless you set an access rule on the server. Each sync reads the server's lookback window again, so edits inside it are picked up. Messages deleted in Discord stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "Discord does not expose member email addresses, so roles and channel permissions cannot be matched to the people who query HydraDB.", + "Private channels and role-restricted channels are not restricted in HydraDB. Set an access rule on the server if they must stay private." + ] + }, + "connect": { + "auth": "Discord uses the token of a bot in your Discord application. What the bot can read comes from the permissions it is granted when you invite it.", + "credentials": [ + { + "name": "bot_token", + "type": "secret string", + "required": true, + "text": "The token of a bot in your Discord application." + } + ], + "permissions_label": "What the bot needs", + "permissions": [ + { + "name": "bot", + "text": "OAuth2 scope, used when you invite the bot." + }, + { + "name": "View Channels", + "text": "on each channel to sync." + }, + { + "name": "Read Message History", + "text": "on each channel to sync." + }, + { + "name": "Message Content Intent", + "text": "turned on under Bot, Privileged Gateway Intents." + } + ], + "permissions_note": "Without Message Content Intent, every sync fails rather than indexing empty messages.", + "steps": [ + { + "title": "Create a bot", + "text": "In the Discord Developer Portal, create an application and a bot, and copy the bot token." + }, + { + "title": "Turn on Message Content Intent", + "text": "Under Bot, Privileged Gateway Intents, turn on Message Content Intent. HydraDB checks it and refuses to sync without it." + }, + { + "title": "Invite the bot", + "text": "Invite the bot to each server with the OAuth2 scope `bot`. Grant View Channels and Read Message History on every channel to sync." + }, + { + "title": "Create the connector", + "text": "Paste the token as `bot_token`." + }, + { + "title": "Select servers", + "text": "HydraDB lists every server the bot is a member of. Select the servers to sync. With no server selected, nothing is synced." + } + ], + "account": "One connector reads the servers one Discord bot has joined." + }, + "sync": { + "first_sync": "Each server reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the server's lookback window again and updates messages by id.", + "edits": "An edit is picked up while the message is still inside the server's lookback window. Edits to older messages are not.", + "deletes": "Deleted messages are not removed. A message deleted in Discord stays searchable in HydraDB.", + "notes": [ + "A private archived thread is read only when the bot can see it or has joined it. Histories the bot cannot read are skipped with a warning.", + "Through the API, you can choose to sync only new messages: set `sync_mode` to `new_only` on a server when you configure the connector. Edits to older messages are then missed, even inside the lookback window." + ] + }, + "shared_attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The author's server nickname, else global display name, else username. On a message it is the From line, and the graph records the message as sent by that person. On a reply it is the Author line, and the graph records the reply as written by that person." + }, + { + "name": "created_at", + "uses": [ + "Searchable text" + ], + "text": "When the message was sent, written as the Sent line on a message and the Created line on a reply." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the message was last edited, else when it was sent. Searchable on replies, as the Updated line. Not searchable on other messages." + }, + { + "name": "mentions", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Display names of the users mentioned. Known mentions are written into the text as names. The graph records each as mentioned. A mention that cannot be resolved keeps its raw Discord syntax." + }, + { + "name": "attachments", + "uses": [ + "Searchable text" + ], + "text": "Attachment file names, written after `Attachments:`. A message whose only content is a file of an unsupported type is still found by its file name." + }, + { + "name": "Attachment text", + "uses": [ + "Searchable text" + ], + "text": "Text read from PDF and DOCX attachments, searchable with the message." + }, + { + "name": "stickers", + "uses": [ + "Searchable text" + ], + "text": "Sticker names, written after `Stickers:`." + }, + { + "name": "Reply or forward reference", + "uses": [ + "Graph connection" + ], + "text": "The message this one replies to or forwards. Joins a reply to the message it answers, and a forward to its original. Not searchable as a link, though a reply's text ends with the parent message id." + }, + { + "name": "Loom links", + "uses": [ + "Graph connection" + ], + "text": "Loom share or embed links in the text or in embeds, up to 50 per message. Links the message to that Loom video. Not searchable as a link, though the link stays in the text." + }, + { + "name": "additional_metadata.discord_message_id", + "uses": [ + "Query filter" + ], + "text": "The message id. Picks out one message. Not searchable." + }, + { + "name": "additional_metadata.discord_server_id", + "uses": [ + "Query filter" + ], + "text": "The server id. Limits a query to one server. Not searchable." + }, + { + "name": "additional_metadata.discord_channel_id", + "uses": [ + "Query filter" + ], + "text": "The channel or thread id. Limits a query to one channel or thread. Not searchable." + }, + { + "name": "additional_metadata.discord_author_id", + "uses": [ + "Query filter" + ], + "text": "The author's user or bot id. Limits a query to one author, even after a display name change. Not searchable." + }, + { + "name": "additional_metadata.discord_message_type", + "uses": [ + "Query filter" + ], + "text": "Discord's numeric message type. Includes or excludes message types. Not searchable." + }, + { + "name": "additional_metadata.pinned", + "uses": [ + "Query filter" + ], + "text": "Whether the message was pinned when it was synced. Not searchable." + }, + { + "name": "additional_metadata.tts", + "uses": [ + "Query filter" + ], + "text": "Whether the message was sent as text-to-speech. Not searchable." + }, + { + "name": "additional_metadata.has_attachments", + "uses": [ + "Query filter" + ], + "text": "Whether the message has at least one named attachment, even when the file text could not be read. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "A fixed note on every message that Discord permissions are not imported. An access rule you set on the server still applies. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's messages. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `discord`. Not searchable." + }, + { + "name": "channel", + "uses": [ + "Stored only" + ], + "text": "The channel or thread name, so you can see where a result came from. To limit a query to a channel, use `additional_metadata.discord_channel_id`." + }, + { + "name": "server", + "uses": [ + "Stored only" + ], + "text": "The server name. To limit a query to a server, use `additional_metadata.discord_server_id`." + }, + { + "name": "is_edited", + "uses": [ + "Stored only" + ], + "text": "Whether Discord reports the message as edited." + }, + { + "name": "edited_at", + "uses": [ + "Stored only" + ], + "text": "When Discord reports the message was last edited, empty if never." + } + ], + "documents": [ + { + "name": "Messages", + "kind": "message", + "one_document": "One Discord message that is not a reply. A forwarded message is a message too.", + "title": "`#channel` and the author's display name. Search matches the message text, not this title, so a channel name in a query does not limit results to that channel.", + "text": "The message text, with user, role and channel mentions turned into names and custom emoji shown as `:name:`. Then embed titles, descriptions and fields, the poll question and answers, interactive component text and forwarded message text. Then `Attachments:` with file names and `Stickers:` with sticker names. The author is written as a From line and the time as a Sent line. A message with none of these is skipped.", + "date": "When the message was last edited, else when it was sent.", + "link_back": "A discord.com link to the message, when the server and channel ids are known.", + "files": "PDF and DOCX attachments up to 20 MiB are downloaded and read, and their text is searchable with the message. If reading fails, the message is still kept. Other files contribute only their names.", + "attributes": [ + { + "name": "Server", + "uses": [ + "Access rule" + ], + "text": "The selected server. An access rule you set on it governs its messages. Not searchable." + } + ] + }, + { + "name": "Replies", + "kind": "comment", + "one_document": "One message that replies to another message.", + "title": "`#channel` and the author's display name. Search matches the reply text, not this title.", + "text": "Built like a message's text, ending with `Reply to message:` and the parent message id. The author is written as an Author line, with Created and Updated lines.", + "date": "When the reply was last edited, else when it was sent.", + "link_back": "A discord.com link to the reply, when the server and channel ids are known.", + "files": "As for messages: PDF and DOCX attachments up to 20 MiB are read, and other files contribute only their names.", + "attributes": [ + { + "name": "Server", + "uses": [ + "Access rule" + ], + "text": "The selected server. An access rule you set on it governs its replies. Not searchable." + } + ] + } + ], + "example_searches": [ + "What did the community say about the release, limited to the announcements channel's id?", + "Who replied to the bug report, and what did they suggest?", + "What does the setup guide PDF posted in Discord say about configuring the bot?" + ], + "graph": { + "connections": [ + "A reply to the message it answers.", + "A forwarded message to its original.", + "A message to any Loom video it links to, which resolves when that video is synced into the same collection.", + "Channels and servers are kept as labels, not linked.", + "No other links to other tools." + ], + "people": [ + "The author of each message or reply.", + "Users mentioned in a message, by display name.", + "The author's id is a query filter, not a person in the graph." + ], + "from_text": "The message text, embed text and text read from attachments." + }, + "not_synced": [ + "Servers you did not select, and channels and private threads the bot cannot read.", + "Voice and stage audio and video.", + "Forum and media parent objects, apart from the messages in their threads.", + "Attachment contents other than PDF and DOCX, files over 20 MiB, and files that cannot be read.", + "Reactions and poll vote counts.", + "Deletions: deleted messages stay in HydraDB.", + "Member email addresses and Discord permissions. Role names are used only to turn mentions into names." + ] +} diff --git a/scripts/connector_pages/dropbox.json b/scripts/connector_pages/dropbox.json new file mode 100644 index 00000000..a17cc5f0 --- /dev/null +++ b/scripts/connector_pages/dropbox.json @@ -0,0 +1,247 @@ +{ + "description": "Sync the files inside the Dropbox folders you choose, one document per file. With Enforce ACL on, the members of each file's shared folder decide who can find it.", + "opening": [ + "Sync the files inside the Dropbox folders you select, and in every folder below them. Each file is one document. Text from supported files is searchable when HydraDB can download and read the files. A file whose text cannot be read is still findable by its path, size and modified time.", + "With Enforce ACL on, a file can be read only by the members of the shared folder that holds it, or only by the connecting member for files in their own unshared space. Sharing set on a single file is not read. The first sync reaches only files modified in the last 30 days unless you raise `lookback_days`. Files deleted in Dropbox stay in HydraDB, and no author or owner is recorded." + ], + "permissions": { + "carried": true, + "who_can_read": "Each file follows the shared folder that contains it. The folder's members and invitees can read it, and so can members of a group the folder is shared with. A file in the connecting member's own unshared space can be read by that member only.", + "identity": "A member's or invitee's email address. A group is turned into its members' email addresses when the Dropbox Business team scopes are granted.", + "when_unreadable": "If HydraDB cannot read a shared folder's members, or cannot turn a group into its members, the connector reports a permission warning.", + "notes": [ + "Sharing set on an individual file, rather than on its shared folder, is not read.", + "Without `sharing.read`, shared folder members can be unreadable.", + "Without the Business team scopes, a folder shared with a group cannot be fully resolved.", + "A very large folder or group membership list that cannot be read in full counts as unreadable.", + "When a shared folder's members change, a later sync applies the new access to its files, including files that did not change." + ] + }, + "connect": { + "auth": "Dropbox uses an app you create in Dropbox, authorized for offline access: an app key, an app secret and a refresh token.", + "credentials": [ + { + "name": "app_key", + "type": "secret string", + "required": true, + "text": "The Dropbox app key." + }, + { + "name": "app_secret", + "type": "secret string", + "required": true, + "text": "The Dropbox app secret." + }, + { + "name": "refresh_token", + "type": "secret string", + "required": true, + "text": "A long-lived offline refresh token for the connecting account." + } + ], + "permissions_label": "Scopes to give the Dropbox app", + "permissions": [ + { + "name": "account_info.read", + "text": "required. Identifies the account and whether it is a Business account. Without it, team folders are never picked up." + }, + { + "name": "files.metadata.read", + "text": "required. Sees folders, files and what changed." + }, + { + "name": "files.content.read", + "text": "required. Reads file contents. Without it, only name, location and size are known." + }, + { + "name": "sharing.read", + "text": "required. Sees who each folder is shared with, which decides who can find its files." + }, + { + "name": "team_info.read", + "text": "optional, Business only. Tells that the connection is to a team." + }, + { + "name": "members.read", + "text": "optional, Business only." + }, + { + "name": "team_data.member", + "text": "optional, Business only. Reads the team's files on behalf of the member who connected." + }, + { + "name": "groups.read", + "text": "optional, Business only. Reads group members, so a folder shared with a group resolves to people." + } + ], + "steps": [ + { + "title": "Create a Dropbox app", + "text": "Create a Dropbox app with the four required scopes. For a Dropbox Business team, add the four Business scopes too, so team folders are read and group shares resolve to people." + }, + { + "title": "Authorize it offline", + "text": "Authorize the app for offline access with the account to sync, and keep the refresh token." + }, + { + "title": "Create the connector", + "text": "Paste the values as `app_key`, `app_secret` and `refresh_token`." + }, + { + "title": "Select folders", + "text": "HydraDB lists your folders by path. Select the folders to sync. Every folder below a selected one is included. To reach files older than 30 days, raise `lookback_days` when you select them." + } + ], + "account": "One connector reads one Dropbox account. On a Business team, it reads team files on behalf of the member who connected." + }, + "sync": { + "first_sync": "Each selected folder reads back the window set by `lookback_days`, 30 days by default. Files last modified before that window are not synced.", + "changes": "Later syncs pick up the changes Dropbox reports since the last sync. If Dropbox no longer accepts where the last sync stopped, the folder is listed again in full.", + "edits": "An edited file is read again and replaces its document.", + "deletes": "Deleted files are not removed. A file deleted in Dropbox stays searchable in HydraDB." + }, + "documents": [ + { + "name": "Files", + "kind": "custom", + "one_document": "One Dropbox file. Folders are not documents.", + "title": "The file's path, for example `Projects/Acme/contract.pdf`. A file with no path is titled `Dropbox file` and its id.", + "text": "The file's text when it could be read. Otherwise the title followed by `Path`, `Size` and `Modified` lines. The title is searchable in either case.", + "date": "When the file was last modified on Dropbox's servers.", + "link_back": "Opens the file in the Dropbox web app, at its path.", + "files": "Text from supported files is searchable when HydraDB can download and read the files. Files over 50 MiB keep only their details.", + "attributes": [ + { + "name": "path", + "uses": [ + "Searchable text" + ], + "text": "The file's path in Dropbox. It is the title, so it is always searchable, and it is the `Path` line when the file's text could not be read." + }, + { + "name": "size", + "uses": [ + "Searchable text" + ], + "text": "The size in bytes, written as the `Size` line. Searchable only on files whose text could not be read." + }, + { + "name": "server_modified", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the file was last modified on Dropbox's servers. Sets the result date. Written as the `Modified` line, so it is searchable only on files whose text could not be read." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The path of the folder that directly holds the file, `/` at the top level. Limits a query to the files directly in one folder. Files in its subfolders carry their own folder's path. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The same folder path. Another way to limit a query to one folder. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `folder`. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's files. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `dropbox`. Not searchable." + }, + { + "name": "Shared folder members", + "uses": [ + "Access rule" + ], + "text": "The email addresses of the members and invitees of the file's shared folder, including members of shared groups. They decide who can read the file when Enforce ACL is on. Not searchable." + }, + { + "name": "rbac_warning", + "uses": [ + "Stored only" + ], + "text": "Set when the file's sharing could not be fully resolved. It explains the missing permissions and grants no access." + }, + { + "name": "acl_warning", + "uses": [ + "Stored only" + ], + "text": "Set when the sharing of the file's folder could not be read. Explains the failed read." + }, + { + "name": "acl_warning_kind", + "uses": [ + "Stored only" + ], + "text": "`permission_refused` when that warning is set." + }, + { + "name": "rev", + "uses": [ + "Stored only" + ], + "text": "The Dropbox revision id the document was read from." + }, + { + "name": "dropbox_hash", + "uses": [ + "Stored only" + ], + "text": "Dropbox's content hash, for comparing file contents outside HydraDB." + }, + { + "name": "client_modified", + "uses": [ + "Stored only" + ], + "text": "The modified time recorded by the app that uploaded the file. The result date uses the server time instead." + } + ] + } + ], + "example_searches": [ + "What does the Acme contract PDF in the Legal folder say about termination?", + "Which files in the Projects/2026 folder mention the launch date?", + "When was the pricing spreadsheet last changed?" + ], + "graph": { + "connections": [ + "No links between files, and no links to items in other tools. The folder that holds a file is kept as a filter, not a graph link." + ], + "people": [ + "No people are attached to files. Dropbox files carry no author or owner in HydraDB." + ], + "from_text": "The file's text." + }, + "not_synced": [ + "Folders you did not select.", + "Files last modified before the `lookback_days` window on the first sync.", + "Folders themselves, as documents.", + "File comments, version history and Dropbox Paper structure.", + "Who created or last edited a file.", + "Sharing set on an individual file.", + "Text of files over 50 MiB.", + "Deletions: deleted files stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/figma.json b/scripts/connector_pages/figma.json new file mode 100644 index 00000000..f5e04c15 --- /dev/null +++ b/scripts/connector_pages/figma.json @@ -0,0 +1,142 @@ +{ + "description": "Sync a catalogue of the files in the Figma projects you choose: each file's name, project, last modified time and link. Design content is not synced.", + "opening": [ + "Sync a catalogue of the files in the Figma projects you select. Each file is one document holding its name, project, last modified time and link, so a search can find a file by name and take you to it.", + "Design content is not read: frames, text layers, components and comments are not synced. Figma permissions are not imported, so every synced file is visible to everyone who can query the collection unless you set an access rule. The first sync lists only files modified in the last 30 days unless you raise `lookback_days`. Files deleted in Figma stay in HydraDB." + ], + "callouts": { + "connect": { + "kind": "warning", + "text": "Figma setup needs your team ids, because Figma's API cannot list a user's teams. The connection form does not accept them yet, so contact HydraDB before connecting Figma." + } + }, + "permissions": { + "carried": false + }, + "connect": { + "auth": "Figma uses a personal access token.", + "credentials": [ + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "A Figma personal access token." + } + ], + "steps": [ + { + "title": "Create a personal access token", + "text": "In Figma, create a personal access token for a user who can see the projects you want catalogued." + }, + { + "title": "Create the connector", + "text": "Paste the token as `api_token`." + }, + { + "title": "Select projects", + "text": "HydraDB lists the projects of your Figma teams. Select the projects to sync. To reach files older than 30 days, raise `lookback_days` when you select them." + } + ], + "account": "One connector reads what one Figma user's token can see." + }, + "sync": { + "first_sync": "Each selected project reads back the window set by `lookback_days`, 30 days by default. Files last modified before that window are not listed.", + "changes": "Each sync lists the files modified since the last sync.", + "edits": "A file whose last modified time moved is sent again with its new details.", + "deletes": "Deleted files are not removed. A file deleted in Figma stays searchable in HydraDB." + }, + "documents": [ + { + "name": "Files", + "kind": "knowledge_base", + "one_document": "One Figma file's details. Its design content is not included.", + "title": "The file name. A file with no name is titled `Figma file` and its key.", + "text": "The title, then `Project`, `Last modified` and `Link` lines. This is the only searchable text for a file.", + "date": "When the file was last modified.", + "link_back": "Opens the file in Figma.", + "files": "None.", + "attributes": [ + { + "name": "project_name", + "uses": [ + "Searchable text" + ], + "text": "The project name, written as the `Project` line when HydraDB has it. The name is often missing, so to limit a query to a project, use `additional_metadata.figma_project_id`." + }, + { + "name": "last_modified", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the file was last modified, written as the `Last modified` line. Sets the result date." + }, + { + "name": "url", + "uses": [ + "Searchable text" + ], + "text": "The Figma link built from the file key, written as the `Link` line." + }, + { + "name": "additional_metadata.figma_project_id", + "uses": [ + "Query filter" + ], + "text": "The id of the project that holds the file. Limits a query to one project's files. Not searchable." + }, + { + "name": "additional_metadata.figma_file_key", + "uses": [ + "Query filter" + ], + "text": "The file key. Picks out one file. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's files. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `figma`. Not searchable." + }, + { + "name": "thumbnail_url", + "uses": [ + "Stored only" + ], + "text": "The address of the file's thumbnail image, for your own app to show. HydraDB does not read the image." + } + ] + } + ], + "example_searches": [ + "Is there a Figma file for the checkout redesign?", + "Which files in this Figma project changed recently?", + "What is the link to the onboarding flow design?" + ], + "graph": { + "connections": [ + "No links between files, and no links to items in other tools." + ], + "people": [ + "No people are attached." + ], + "from_text": "The file name and, when present, the project name. There is no design content to read." + }, + "not_synced": [ + "Projects you did not select.", + "Files last modified before the `lookback_days` window on the first sync.", + "Design content: frames, text layers and components.", + "Comments.", + "Version history.", + "Thumbnail images. Only their address is kept.", + "Deletions: deleted files stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/fireflies.json b/scripts/connector_pages/fireflies.json new file mode 100644 index 00000000..eb9e3cc6 --- /dev/null +++ b/scripts/connector_pages/fireflies.json @@ -0,0 +1,201 @@ +{ + "description": "Sync meeting transcripts from one Fireflies account, one searchable document per meeting with its AI overview.", + "opening": [ + "Sync meeting transcripts from one Fireflies account. Each meeting is one document with its title, Fireflies' AI overview and the transcript, each line labelled with its speaker.", + "Fireflies permissions are not imported, so every synced meeting is visible to everyone who can query the collection unless you set an access rule. Audio and video are not synced. Each sync reads meetings by meeting date, so a transcript or summary that changes later is not guaranteed to be picked up. Meetings deleted in Fireflies stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Fireflies uses an API key.", + "credentials": [ + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "A Fireflies API key." + } + ], + "steps": [ + { + "title": "Get an API key", + "text": "Get a Fireflies API key for the account whose meetings you want to sync." + }, + { + "title": "Create the connector", + "text": "Paste the key as `api_token`." + }, + { + "title": "Select the account", + "text": "HydraDB lists one item for the whole account. Select it. You cannot pick individual meetings." + } + ], + "account": "One connector reads one Fireflies account." + }, + "sync": { + "first_sync": "Reads meetings from the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads meetings by meeting date, picking up meetings dated since the last sync.", + "edits": "A change to a meeting is picked up only if the meeting's date falls inside a later sync's window.", + "deletes": "Meetings deleted in Fireflies stay searchable in HydraDB." + }, + "documents": [ + { + "name": "Meetings", + "kind": "knowledge_base", + "one_document": "One meeting transcript. A meeting with no transcript sentences, no overview and no gist or short summary is skipped.", + "title": "The meeting title, or `Fireflies meeting ` when it has none.", + "text": "The meeting title, then the AI overview, then the transcript as one `Speaker: text` line per sentence. If there are no sentences and no overview, Fireflies' gist or short summary is used instead. The title is searchable too.", + "date": "The meeting time.", + "link_back": "The transcript in Fireflies.", + "files": "None. Audio and video are not downloaded.", + "attributes": [ + { + "name": "summary", + "uses": [ + "Searchable text" + ], + "text": "Fireflies' AI overview, written before the transcript." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "The meeting time. Sets the result date and decides which meetings each sync reads. Not searchable." + }, + { + "name": "additional_metadata.fireflies_id", + "uses": [ + "Query filter" + ], + "text": "The Fireflies transcript id. Picks out one meeting. Not searchable." + }, + { + "name": "additional_metadata.host_email", + "uses": [ + "Query filter" + ], + "text": "The host's email. Limits a query to meetings one person hosted. Not searchable." + }, + { + "name": "additional_metadata.organizer_email", + "uses": [ + "Query filter" + ], + "text": "The organizer's email. Limits a query to meetings one person organized. Not searchable." + }, + { + "name": "additional_metadata.meeting_link", + "uses": [ + "Query filter" + ], + "text": "The conference link. Finds the meeting held at a given link. It does not link the meeting to Zoom or Google Calendar items. Not searchable." + }, + { + "name": "additional_metadata.calendar_id", + "uses": [ + "Query filter" + ], + "text": "The calendar event id. Finds the transcript for a known calendar event. It does not link the meeting to Google Calendar items. Not searchable." + }, + { + "name": "additional_metadata.participant_count", + "uses": [ + "Query filter" + ], + "text": "How many participant emails the meeting has. Limits a query by meeting size. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's meetings. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `fireflies`. Not searchable." + }, + { + "name": "host", + "uses": [ + "Stored only" + ], + "text": "The host's name, or email when no name was found. To find a host's meetings, filter on `additional_metadata.host_email`." + }, + { + "name": "organizer", + "uses": [ + "Stored only" + ], + "text": "The organizer's name, or email when no name was found. To find an organizer's meetings, filter on `additional_metadata.organizer_email`." + }, + { + "name": "participants", + "uses": [ + "Stored only" + ], + "text": "Participant emails. They are not attached to the meeting as people." + }, + { + "name": "participant_count", + "uses": [ + "Stored only" + ], + "text": "The same count as `additional_metadata.participant_count`, returned with the meeting." + }, + { + "name": "duration", + "uses": [ + "Stored only" + ], + "text": "The meeting length Fireflies reports." + }, + { + "name": "sentence_count", + "uses": [ + "Stored only" + ], + "text": "How many transcript sentences were included." + }, + { + "name": "action_items", + "uses": [ + "Stored only" + ], + "text": "Fireflies' AI action items. They are not part of the searchable text." + }, + { + "name": "keywords", + "uses": [ + "Stored only" + ], + "text": "Fireflies' keyword labels. They are not part of the searchable text." + } + ] + } + ], + "example_searches": [ + "What did we agree with Acme on last week's call?", + "What did Maria say about the migration timeline?", + "Give me the overview of yesterday's planning meeting." + ], + "graph": { + "connections": [ + "No links between meetings or to other tools. The calendar event id and conference link do not link a meeting to Google Calendar or Zoom items." + ], + "people": "The connector does not attach the host, organizer or participants to a meeting as people. Speaker names are part of the transcript text.", + "from_text": "The overview and the speaker-labelled transcript." + }, + "not_synced": [ + "Audio and video recordings.", + "The full attendee list Fireflies keeps. Only participant emails are kept.", + "Fireflies' AI outline and shorthand bullet summaries. Only the overview, action items, keywords and, as a fallback, the gist or short summary are kept.", + "Changes to older meetings whose date falls outside later syncs' windows.", + "Deletions: meetings deleted in Fireflies stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/freshdesk.json b/scripts/connector_pages/freshdesk.json new file mode 100644 index 00000000..7f1e7ddd --- /dev/null +++ b/scripts/connector_pages/freshdesk.json @@ -0,0 +1,318 @@ +{ + "description": "Sync Freshdesk tickets and their replies from one helpdesk. Freshdesk ticket visibility is not imported.", + "opening": [ + "Sync every ticket in one Freshdesk helpdesk, with its replies. Each ticket is one document with its description, requester, assignee, company and group. Each reply is its own document, linked to its ticket.", + "Freshdesk agent scopes are not imported, so every synced ticket and reply is visible to everyone who can query the collection unless you set an access rule. Private agent notes are skipped unless you turn them on. Tickets deleted in Freshdesk stay in HydraDB. Attachments are not synced." + ], + "permissions": { + "carried": false, + "notes": [ + "Freshdesk Global, Group and Restricted agent scopes are not reproduced.", + "If you turn on `include_private_notes`, private agent notes are visible to everyone who can query the collection too.", + "Every ticket and reply carries `additional_metadata.rbac_warning`, saying that Freshdesk visibility is not captured." + ] + }, + "connect": { + "auth": "Freshdesk uses an agent's API key and your helpdesk's subdomain.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "An agent's API key, from the agent's Freshdesk profile settings." + }, + { + "name": "domain", + "type": "string", + "required": true, + "text": "The helpdesk subdomain only, for example `acme` for `acme.freshdesk.com`." + }, + { + "name": "include_private_notes", + "type": "boolean", + "text": "Off by default. Turn it on to also sync private agent notes." + } + ], + "credentials_note": "There is no scope to choose. The key reads the tickets its agent can see under that agent's Global, Group or Restricted ticket scope. Pick an agent with Global scope, or only part of the helpdesk syncs.", + "steps": [ + { + "title": "Copy an agent API key", + "text": "In Freshdesk, open the profile settings of an agent with Global ticket scope and copy the API key." + }, + { + "title": "Create the connector", + "text": "Paste the key as `api_key` and the subdomain as `domain`. Turn on `include_private_notes` only if everyone who can query the collection may read private notes, or set an access rule." + }, + { + "title": "Configure the connector", + "text": "HydraDB lists one account-wide resource, All data. Select it to sync the whole helpdesk as one unit." + } + ], + "account": "One connector reads one Freshdesk helpdesk domain." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads tickets updated since the last sync, together with their replies. Replies are read again only when their ticket changes.", + "edits": "A changed ticket is read again with its replies and updates its documents.", + "deletes": "Deleted tickets are not removed. A ticket synced before it was deleted or marked as spam stays searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "additional_metadata.freshdesk_id", + "uses": [ + "Query filter" + ], + "text": "The ticket id on a ticket, the reply id on a reply. Targets one item, and keeps later syncs on the same document. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "Set on every item, saying that Freshdesk visibility is not captured. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `freshdesk`. Not searchable." + } + ], + "documents": [ + { + "name": "Tickets", + "kind": "ticket", + "one_document": "One ticket. Spam and deleted tickets are skipped.", + "title": "The ticket subject.", + "text": "The plain-text description, converted from HTML when needed, or the subject when the description is empty. Then `Requester`, `Requester email`, `Assignee`, `Company` and `Group` lines. Status, priority and creation time are part of the text too. The subject is searchable too.", + "date": "When the ticket was last updated, else when it was created.", + "link_back": "The ticket in the Freshdesk agent portal.", + "files": "Ticket attachments are not synced.", + "attributes": [ + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "Open, Pending, Resolved or Closed, written as a `Status` line. A custom status is written as its raw number." + }, + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "Low, Medium, High or Urgent, written as a `Priority` line." + }, + { + "name": "requester", + "uses": [ + "Searchable text" + ], + "text": "The requester's name, written as the `Requester` line, where HydraDB can identify the customer." + }, + { + "name": "requester_email", + "uses": [ + "Searchable text" + ], + "text": "The requester's email, written as the `Requester email` line, where HydraDB can connect the address to the customer." + }, + { + "name": "assignee", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The assigned agent's name or email, written as the `Assignee` line. The graph records the ticket as assigned to that agent." + }, + { + "name": "company", + "uses": [ + "Searchable text" + ], + "text": "The requester's company, written as the `Company` line, so every ticket from one company matches." + }, + { + "name": "group", + "uses": [ + "Searchable text" + ], + "text": "The name of the agent group the ticket is assigned to, written as the `Group` line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the ticket was created, written as a `Created` line. Used as the result date only when the update time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the ticket was last updated. Not searchable." + }, + { + "name": "type", + "uses": [ + "Stored only" + ], + "text": "The Freshdesk ticket type." + }, + { + "name": "tags", + "uses": [ + "Stored only" + ], + "text": "The ticket's tags." + }, + { + "name": "requester_id", + "uses": [ + "Stored only" + ], + "text": "The requester's Freshdesk contact id." + }, + { + "name": "responder_id", + "uses": [ + "Stored only" + ], + "text": "The assigned agent's id. The agent's name is in `assignee`." + }, + { + "name": "group_id", + "uses": [ + "Stored only" + ], + "text": "The assigned group's id. The group's name is in `group`." + } + ] + }, + { + "name": "Replies", + "kind": "comment", + "one_document": "One reply or note on a ticket. Empty replies are skipped. Private agent notes are included only when `include_private_notes` is on.", + "title": "`Comment by` and the author's name. Without an author, the first 80 characters of the text.", + "text": "An `Author` line, then the plain-text reply. The creation and update times are part of the text too.", + "date": "When the reply was created, else when it was last updated.", + "link_back": "The parent ticket in the Freshdesk agent portal.", + "files": "Reply attachments are not synced.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The agent who wrote the reply, written as the `Author` line. The graph records the reply as written by that agent. Customers are not named, because Freshdesk contacts are not synced." + }, + { + "name": "from_email", + "uses": [ + "Searchable text" + ], + "text": "The sender's email. Written as the `Author` line only when no agent name is found, which is the case for customer replies." + }, + { + "name": "mentions", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Names mentioned in a private note. The names stay in the note text, and the graph records each as mentioned." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The ticket the reply belongs to. Links the reply to its ticket, so the whole conversation can be returned together." + }, + { + "name": "additional_metadata.freshdesk_ticket_id", + "uses": [ + "Query filter" + ], + "text": "The id of the ticket the reply belongs to. Returns every reply on one ticket. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the reply was created, written as a `Created` line." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the reply was last updated, written as an `Updated` line. Used as the result date only when the creation time is missing." + }, + { + "name": "private", + "uses": [ + "Stored only" + ], + "text": "True for a private agent note. It does not restrict who can read the note." + }, + { + "name": "incoming", + "uses": [ + "Stored only" + ], + "text": "True when the reply came from the requester, so you can tell a customer message from an agent reply." + }, + { + "name": "author_id", + "uses": [ + "Stored only" + ], + "text": "The Freshdesk user id of the reply's author." + } + ] + } + ], + "example_searches": [ + "What did an agent say about a billing issue?", + "Which urgent tickets are assigned to Priya?", + "Which tickets came from Acme Corp?" + ], + "graph": { + "connections": [ + "A reply to its ticket.", + "No links to other tools." + ], + "people": [ + "The assigned agent of each ticket.", + "The author of each agent reply.", + "Names mentioned in a private note.", + "The requester's name and email, and the company, appear in the ticket text, where HydraDB can identify them.", + "Customers who reply are not attached as people. Their email appears in the reply text." + ], + "from_text": "The ticket description with its requester, assignee, company and group lines, and the text of every reply." + }, + "not_synced": [ + "Private agent notes, unless `include_private_notes` is on.", + "Spam and deleted tickets. Replies on them can still be synced.", + "Contacts and companies as documents of their own.", + "Satisfaction ratings, time entries, solution articles and forum posts.", + "Ticket custom fields.", + "Ticket and reply attachments.", + "Deletions: tickets deleted in Freshdesk stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/github.json b/scripts/connector_pages/github.json new file mode 100644 index 00000000..2a548c77 --- /dev/null +++ b/scripts/connector_pages/github.json @@ -0,0 +1,258 @@ +{ + "description": "Sync issues and pull requests, each with its whole discussion, from the GitHub repositories you choose.", + "opening": [ + "The GitHub connector syncs issues and pull requests from selected repositories. Code, commits and diffs are not synced. Each issue and each pull request is one document that carries its body and its whole discussion: conversation comments and, for a pull request, review comments and review summaries.", + "Issues and pull requests link to the issues they reference or close, to their parent issue, and to the Linear issues, Slack messages and Notion pages they link to.", + "A private repository's items are limited to its collaborators and teams only when Enforce ACL is on and HydraDB can read its collaborators. Deleted issues and pull requests stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "Access follows the repository, not the single issue. A public or internal repository can be read by everyone who can query the collection unless you set an access rule. A private repository can be read by its collaborators and by the organization teams that have access to it.", + "identity": "The email address on a collaborator's public GitHub profile. Teams are added as groups.", + "when_unreadable": "If a collaborator hides their profile email, the collaborator list is incomplete, there are too many people to express, or GitHub refuses a request, the connector reports a permission warning.", + "notes": [ + "One collaborator with a hidden public email stops HydraDB from capturing a private repository's audience. Set an access rule on such a repository.", + "Internal repositories are open to everyone who can query the collection. Check that this matches who should see them." + ] + }, + "connect": { + "auth": "GitHub uses a personal access token. The setup steps below use a classic token, which needs `repo`, or `public_repo` for public repositories only. A fine-grained token works if GitHub grants it read access to the repositories you want and to their issues.", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "required": true, + "text": "A GitHub personal access token with read access to repositories and issues." + } + ], + "permissions_label": "Scopes for a classic token", + "permissions": [ + { + "name": "public_repo", + "text": "public repositories only. Use this or `repo`." + }, + { + "name": "repo", + "text": "private and public repositories. Reading a private repository's collaborators for permissions also needs it." + }, + { + "name": "read:org", + "text": "reads which organization teams can access a repository, for permissions. If GitHub refuses it, the connector reports a permission warning." + } + ], + "permissions_note": "A successful token check does not guarantee access to every repository. Confirm that the repositories you need are listed when you select them.", + "steps": [ + { + "title": "Create a token", + "text": "In GitHub, create a personal access token with `repo`, or `public_repo` for public repositories only. Add `read:org` if you want organization team access captured." + }, + { + "title": "Create the connector", + "text": "Paste the token as `access_token`." + }, + { + "title": "Select repositories", + "text": "HydraDB lists every repository the token's user owns, collaborates on, or can see as an organization member. Select the repositories to sync." + } + ], + "account": "One connector reads the repositories one token's user can see.", + "scope_unit": "GitHub account" + }, + "sync": { + "first_sync": "Reaches back 30 days by default, set by `lookback_days`. The window is measured from the repository's most recent activity, not from today, so a quiet repository still brings in its last stretch of work.", + "changes": "Each sync asks GitHub for items updated since the last sync. A changed item is sent again with its whole discussion.", + "edits": "Editing an issue or pull request, or adding a comment, moves its updated time, so the whole item is sent again.", + "deletes": "Deleted issues and pull requests are not removed. An item that disappears from GitHub can stay searchable in HydraDB.", + "notes": [ + "GitHub rate limits apply per token. A large first sync can use its hourly quota." + ] + }, + "documents": [ + { + "name": "Issues and pull requests", + "kind": "ticket", + "one_document": "One issue or one pull request, with its whole discussion inside it. A search result is the issue or pull request, not an individual comment.", + "title": "The issue or pull request title.", + "text": "The issue or pull request body and its discussion are searchable together. Comments and reviews include their author and time. Review comments also include the file, line and reply context. Empty comments are skipped. Labels are written as a `Labels` line, the creation time as a `Created` line, and a sub-issue's parent as a `Parent` line. The title is searchable too.", + "date": "When the issue or pull request was last updated.", + "link_back": "The issue or pull request page on GitHub.", + "files": "Images and files in bodies and comments are not downloaded.", + "attributes": [ + { + "name": "title", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "HydraDB also scans the title for Linear issue keys and links, and links the item to those issues." + }, + { + "name": "body", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The main text. References in it become links: `#123`, `owner/repo#123`, closing keywords, and Linear, Slack and Notion links." + }, + { + "name": "Comments", + "uses": [ + "Searchable text", + "Graph identity", + "Graph connection" + ], + "text": "Each comment, review comment and review summary is searchable with the item. Its author is recorded as a commenter, and references inside it become links of the item." + }, + { + "name": "labels", + "uses": [ + "Searchable text" + ], + "text": "Written as the `Labels` line, so a query can match a label." + }, + { + "name": "created_at", + "uses": [ + "Searchable text" + ], + "text": "Written as the `Created` line." + }, + { + "name": "Item id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The id `owner/repo#number`. It keeps later syncs on the same document, and it is what items in other tools, such as Linear issues, link to." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the item was last updated. It moves with every edit or new comment. Not searchable." + }, + { + "name": "additional_metadata.github_repo", + "uses": [ + "Query filter" + ], + "text": "The repository as `owner/name`. Limits a query to one repository. Not searchable." + }, + { + "name": "additional_metadata.github_issue_number", + "uses": [ + "Query filter" + ], + "text": "The issue or pull request number within a repository. Combine it with `additional_metadata.github_repo` to select one item. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `github`. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "A sub-issue's parent issue, as `owner/repo#number`. Links the sub-issue to its parent, and is written as the `Parent` line." + }, + { + "name": "is_pr", + "uses": [ + "Graph connection" + ], + "text": "Marks a pull request, so closing keywords in its body link it to the issues it closes. Not searchable." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Each `@username` in the body, recorded as a person the item mentions. The field itself is not searchable, but the body it comes from is." + }, + { + "name": "Repository", + "uses": [ + "Access rule" + ], + "text": "The selected repository. Its audience decides who can read every issue and pull request in it. Not searchable." + }, + { + "name": "author", + "uses": [ + "Stored only" + ], + "text": "The login of the person who opened the item. It is not added to the graph as a person." + }, + { + "name": "assignees", + "uses": [ + "Stored only" + ], + "text": "Assignee logins. Not added to the graph." + }, + { + "name": "state", + "uses": [ + "Stored only" + ], + "text": "`open` or `closed`." + }, + { + "name": "closed_at", + "uses": [ + "Stored only" + ], + "text": "When the item was closed." + }, + { + "name": "milestone, milestone_due", + "uses": [ + "Stored only" + ], + "text": "The milestone title and its due date." + } + ] + } + ], + "example_searches": [ + "Which pull request fixed issue `acme/api#412`?", + "Which issues in `acme/api` are labelled bug and mention the login timeout?", + "Which Linear issue does this pull request close?" + ], + "graph": { + "connections": [ + "A sub-issue to its parent issue.", + "An issue or pull request to each issue or pull request it references in its body or discussion.", + "A pull request to each issue its body closes with a closing keyword.", + "An issue or pull request to a Linear issue it links to, or names after a closing word.", + "An issue or pull request to a Slack message or Notion page it links to.", + "In the other direction, Linear issues link to the GitHub pull requests attached to them.", + "References inside code blocks, inline code and HTML comments are ignored." + ], + "people": [ + "The author of each comment, as a commenter.", + "Each `@username` mentioned in the body.", + "The opener and assignees are not attached to the item as people in the graph." + ], + "from_text": "The body and discussion text of each issue and pull request." + }, + "not_synced": [ + "Code, commits and diffs.", + "Releases, wikis, projects and GitHub Discussions.", + "Images and files attached in bodies and comments.", + "Repositories the token's user cannot see." + ] +} diff --git a/scripts/connector_pages/gitlab.json b/scripts/connector_pages/gitlab.json new file mode 100644 index 00000000..429d3057 --- /dev/null +++ b/scripts/connector_pages/gitlab.json @@ -0,0 +1,483 @@ +{ + "description": "Sync issues, merge requests and their notes, Markdown files, releases, project descriptions and commit messages from the GitLab projects you choose. Private-project restrictions need Enforce ACL and readable member emails.", + "opening": [ + "Sync issues, merge requests and their notes, Markdown files on the default branch, releases, project descriptions and commit messages from the GitLab projects you select. Each issue, merge request, note, file, release, project and commit is one document, and a note links to its issue or merge request.", + "A private project's items are limited to its members only when Enforce ACL is on and HydraDB can read every member's email. Confidential issues and internal notes are kept only as empty placeholders. Code and diffs are not synced, and items deleted in GitLab stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "Access follows the project. A public or internal project can be read by everyone who can query the collection. A private project can be read by its active members at any access level, including inherited group members and members of groups the project is shared with. A confidential issue, or an internal or confidential note, is kept only as a placeholder with no content, and with Enforce ACL on no one can read it.", + "identity": "A member's email address, from the member list when GitLab shows it, else from the member's public profile email.", + "when_unreadable": "If a member's email is hidden, the member list is incomplete, there are too many members to express, or no member can be expressed, the connector reports a permission warning for the whole project.", + "notes": [ + "Most GitLab users hide their public email, so a private project often needs an access rule you set.", + "Visibility of single issues is not reproduced, apart from confidential issues.", + "A project GitLab reports as not found may be deleted, or the token may have lost access. HydraDB does not treat it as deleted." + ] + }, + "connect": { + "auth": "GitLab uses a personal, project or group access token with `read_api`.", + "credentials": [ + { + "name": "private_token", + "type": "secret string", + "required": true, + "text": "A GitLab access token with `read_api`." + } + ], + "settings": [ + { + "name": "api_url", + "type": "string", + "text": "The API address of a self-managed GitLab, including `/api/v4`, for example `https://gitlab.example.com/api/v4`. Leave it empty for GitLab.com. Self-managed GitLab is not yet a supported setup." + } + ], + "permissions_label": "Token scope", + "permissions": [ + { + "name": "read_api", + "text": "reads projects, issues, merge requests, notes and repository files, and a private project's members for permissions." + } + ], + "steps": [ + { + "title": "Create a token", + "text": "Create a GitLab access token with `read_api` for a user who is a member of every project you will select." + }, + { + "title": "Create the connector", + "text": "Paste the token as `private_token`. For self-managed GitLab, set `api_url`." + }, + { + "title": "Select projects", + "text": "HydraDB lists the projects the token's user is a member of, up to 2,000. Select the projects to sync." + } + ], + "account": "One connector reads the projects one token's user is a member of." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default. Issues and merge requests are measured by last update, commits by creation and projects by last activity. Markdown files on the default branch can come across even when their last commit is older than the window.", + "changes": "Each sync reads issues and merge requests updated since the last sync, new commits and active projects. When an issue or merge request changes or gets a new comment, all its notes are read again. Markdown files are read again when the default branch gets a commit inside the window. A project with no recent activity can be skipped, releases included.", + "edits": "An edited issue or merge request updates its document. An edited note, or a note made internal, updates only when its issue or merge request changes or gets a new comment. An issue made confidential is replaced by its placeholder only when it is read again. Resetting the default branch to an older commit can leave newer file content in HydraDB.", + "deletes": "Issues, merge requests, notes and files deleted in GitLab stay searchable in HydraDB.", + "notes": [ + "A commit that appears in several selected projects is one document, attributed to the project read last.", + "Markdown files larger than 512 KiB are skipped, and reading a repository stops after 100,000 entries." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.gitlab_project_id", + "uses": [ + "Query filter" + ], + "text": "The numeric project id. Limits a query to one project. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `gitlab`. Not searchable." + }, + { + "name": "Project", + "uses": [ + "Access rule" + ], + "text": "The selected project. Its readers decide who can read every item in it. Not searchable." + }, + { + "name": "object_kind", + "uses": [ + "Stored only" + ], + "text": "The kind of item: `issue`, `merge_request`, `note`, `repository_file`, `commit`, `release` or `project`." + } + ], + "documents": [ + { + "name": "Issues and merge requests", + "kind": "ticket", + "one_document": "One issue or one merge request. Its notes are separate documents.", + "title": "The title. An item with no title is called `GitLab issue` or `GitLab MR` with its id. A confidential issue is titled `Confidential GitLab issue`.", + "text": "The description, else the title, then `Author` and `Assignees` lines, and for a merge request `Reviewers` and `Branch` lines. Labels are written as a `Labels` line and the creation time as a `Created` line. The title and the item id are searchable too. A confidential issue's text is a fixed placeholder sentence.", + "date": "When the item was last updated, else when it was created.", + "link_back": "The issue or merge request page on GitLab. Confidential placeholders have none.", + "files": "Attachments are not downloaded.", + "attributes": [ + { + "name": "Item id", + "uses": [ + "Searchable text" + ], + "text": "`!` for an issue and `!mr` for a merge request. Keeps later syncs on the same document, also when an issue becomes confidential, and a search can match it." + }, + { + "name": "labels", + "uses": [ + "Searchable text" + ], + "text": "Label names, written as the `Labels` line." + }, + { + "name": "author", + "uses": [ + "Searchable text" + ], + "text": "The opener's username, written as the `Author` line. Not attached to the item as a person in the graph." + }, + { + "name": "assignees", + "uses": [ + "Searchable text" + ], + "text": "Assignee names, written as the `Assignees` line. Not attached to the item as people in the graph." + }, + { + "name": "reviewers", + "uses": [ + "Searchable text" + ], + "text": "A merge request's reviewer names, written as the `Reviewers` line." + }, + { + "name": "source_branch, target_branch", + "uses": [ + "Searchable text" + ], + "text": "A merge request's branches, written as the `Branch` line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the item was created, written as the `Created` line. The result date when there is no update time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the item was last updated. Not searchable." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Each `@username` in the description, recorded as a person the item mentions. The field itself is not searchable, but the description it comes from is." + }, + { + "name": "additional_metadata.gitlab_iid", + "uses": [ + "Query filter" + ], + "text": "The issue or merge request number within its project. Combine it with `additional_metadata.gitlab_project_id` to pick out one item. Not searchable." + }, + { + "name": "additional_metadata.gitlab_redacted", + "uses": [ + "Query filter" + ], + "text": "True on a confidential issue's placeholder. Finds placeholders. Not searchable." + }, + { + "name": "state", + "uses": [ + "Stored only" + ], + "text": "`opened`, `closed`, `locked` or `merged`. It is not part of the text, so a query cannot match the state." + }, + { + "name": "closed_at, merged_at", + "uses": [ + "Stored only" + ], + "text": "When the item was closed or merged." + } + ] + }, + { + "name": "Notes", + "kind": "comment", + "one_document": "One note on an issue or merge request. System notes, such as state and label changes, are left out. An internal or confidential note is kept as a placeholder with no content.", + "title": "`Comment on` with the parent's id. A placeholder is titled `Comment on a confidential GitLab issue`. The title is not searchable.", + "text": "The note text, with its author, its creation and update times and its parent's id. A placeholder's text is a fixed sentence.", + "date": "When the note was last updated, else when it was created.", + "link_back": "The note on its issue or merge request page.", + "files": "Attachments are not downloaded.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The note author's username, else name. The graph records the note as written by this person." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The issue or merge request the note belongs to, written as the `Parent` line. Links the note to it." + }, + { + "name": "thread_id", + "uses": [ + "Graph connection" + ], + "text": "Groups every note on one issue or merge request into one thread. Not searchable." + }, + { + "name": "created_at, updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the note was created and last updated. The update time, else the creation time, is the result date." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Each `@username` in the note, recorded as a person the note mentions. The field itself is not searchable, but the note text is." + }, + { + "name": "additional_metadata.gitlab_note_id", + "uses": [ + "Query filter" + ], + "text": "The note id. Picks out one note. Not searchable." + }, + { + "name": "additional_metadata.gitlab_noteable_type", + "uses": [ + "Query filter" + ], + "text": "`Issue` or `MergeRequest`. Keeps only issue notes or only merge request notes. Not searchable." + }, + { + "name": "additional_metadata.gitlab_iid", + "uses": [ + "Query filter" + ], + "text": "The parent's number within its project. With `additional_metadata.gitlab_project_id`, returns every note on one issue or merge request. Not searchable." + }, + { + "name": "additional_metadata.gitlab_redacted", + "uses": [ + "Query filter" + ], + "text": "True on a placeholder note. Finds placeholders. Not searchable." + }, + { + "name": "discussion_id", + "uses": [ + "Stored only" + ], + "text": "The GitLab discussion the note belongs to. Notes in one discussion are not linked as replies to each other." + }, + { + "name": "path, line", + "uses": [ + "Stored only" + ], + "text": "The file and line a diff note was left on." + } + ] + }, + { + "name": "Markdown files", + "kind": "knowledge_base", + "one_document": "One non-empty Markdown file, `.md` or `.mdx`, on the default branch, up to 512 KiB.", + "title": "The file's first heading, else its file name without the extension.", + "text": "The file content. The title is searchable too.", + "date": "The time of the default branch's latest commit when the file was read.", + "link_back": "The file on GitLab.", + "attributes": [ + { + "name": "additional_metadata.gitlab_project_path", + "uses": [ + "Query filter" + ], + "text": "The project path, for example `acme/backend`. Limits a query to one project by path. Not searchable." + }, + { + "name": "additional_metadata.gitlab_path", + "uses": [ + "Query filter" + ], + "text": "The file path in the repository. Picks out one file. Not searchable." + }, + { + "name": "additional_metadata.gitlab_blob_sha", + "uses": [ + "Query filter" + ], + "text": "The content hash of the file version read. Picks out one exact version. Not searchable." + }, + { + "name": "additional_metadata.gitlab_ref", + "uses": [ + "Query filter" + ], + "text": "The branch the file was read from. Not searchable." + }, + { + "name": "path, format", + "uses": [ + "Stored only" + ], + "text": "The repository path, and whether the file is `md` or `mdx`." + } + ] + }, + { + "name": "Commits", + "kind": "custom", + "one_document": "One commit. A commit that appears in several selected projects is one document.", + "title": "The commit title, else the first line of the message, else `GitLab commit` with its short id.", + "text": "The commit message, then an `Author` line. The title is searchable too.", + "date": "When the commit was created, else committed, else authored.", + "link_back": "The commit on GitLab.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text" + ], + "text": "The author's name, written as the `Author` line. Not attached to the commit as a person in the graph." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the commit was created. Not searchable." + }, + { + "name": "additional_metadata.gitlab_sha", + "uses": [ + "Query filter" + ], + "text": "The commit hash. Picks out one commit. Not searchable." + } + ] + }, + { + "name": "Releases", + "kind": "knowledge_base", + "one_document": "One release.", + "title": "The release name, else `Release` with its tag.", + "text": "The release notes, else the title. The title is searchable too.", + "date": "When the release was published, else when it was created.", + "link_back": "The release on GitLab.", + "files": "Release assets are not downloaded.", + "attributes": [ + { + "name": "released_at, created_at", + "uses": [ + "Result date" + ], + "text": "The publish time, else the creation time, is the result date. Not searchable." + }, + { + "name": "additional_metadata.gitlab_tag_name", + "uses": [ + "Query filter" + ], + "text": "The release's Git tag. Picks out one release. Not searchable." + }, + { + "name": "tag_name", + "uses": [ + "Stored only" + ], + "text": "The release's Git tag." + } + ] + }, + { + "name": "Projects", + "kind": "knowledge_base", + "one_document": "One GitLab project.", + "title": "The project name with its namespace, else its path, else its name.", + "text": "The project description, else the title, then `Path` and `Topics` lines. The title is searchable too.", + "date": "The project's last activity, else when it was created.", + "link_back": "The project on GitLab.", + "attributes": [ + { + "name": "path", + "uses": [ + "Searchable text" + ], + "text": "The path with its namespace, written as the `Path` line." + }, + { + "name": "created_at, last_activity_at", + "uses": [ + "Result date" + ], + "text": "The last activity, else creation, is the result date. Not searchable." + }, + { + "name": "default_branch", + "uses": [ + "Stored only" + ], + "text": "The project's default branch." + }, + { + "name": "visibility", + "uses": [ + "Stored only" + ], + "text": "`private`, `internal` or `public`. Who can read the project's items is worked out from its members, not from this value." + } + ] + } + ], + "example_searches": [ + "What did reviewers say on the merge request that changed the payment retry logic?", + "What changed in release v2.4.0?", + "What does the README of acme/backend say about local setup?" + ], + "graph": { + "connections": [ + "A note to its issue or merge request, with all notes on one item grouped into one thread.", + "A placeholder note to its confidential issue.", + "Notes in one GitLab discussion are not linked as replies to each other.", + "References such as `#12` or `!34` are not turned into links, and merge requests are not linked to the issues they close.", + "No links to items in other tools." + ], + "people": [ + "The author of each note.", + "Each `@username` mentioned in an issue, merge request or note.", + "Issue and merge request authors, assignees and reviewers, and commit authors, appear only in the text." + ], + "from_text": "Issue, merge request, note, file, commit and release text." + }, + "not_synced": [ + "Projects the token's user is not a member of.", + "The content of confidential issues and internal notes. Only empty placeholders are kept.", + "System notes, such as state and label changes.", + "Code and diffs. Commits carry only their message, and only Markdown files are read.", + "Pipelines, jobs, branches, tags, wikis, snippets, and label and milestone lists.", + "Issue due dates, weights, time tracking, milestones and epics.", + "Commit statistics and author and committer emails.", + "Markdown files over 512 KiB, empty files, and files beyond the first 100,000 repository entries." + ] +} diff --git a/scripts/connector_pages/gmail.json b/scripts/connector_pages/gmail.json new file mode 100644 index 00000000..dfad7222 --- /dev/null +++ b/scripts/connector_pages/gmail.json @@ -0,0 +1,209 @@ +{ + "description": "Sync emails from the Gmail labels you choose, one document per email. Earlier emails of a thread come along even when they sit outside the label.", + "opening": [ + "Sync emails from the Gmail labels you select in one Gmail account. Each email is one document. A reply links to the email it answers, and earlier emails of its thread are fetched too, even from outside the selected label. Text from supported attachments is searchable with the email when HydraDB can download and read the files.", + "Gmail connects with an App Password, not OAuth. Gmail permissions are not imported, so every synced email is visible to everyone who can query the collection unless you set an access rule on its label. Emails deleted or moved out of a label stay in HydraDB, and label, read and starred changes are not picked up." + ], + "permissions": { + "carried": false, + "notes": [ + "A mailbox is personal in Gmail, but HydraDB does not limit its emails to the mailbox owner. Set an access rule on each label that must stay private.", + "Earlier thread emails fetched from All Mail follow the access rule of the label that brought them in, even when they sit outside that label." + ] + }, + "connect": { + "auth": "Gmail connects over IMAP with your Gmail address and a Google App Password. It does not use your Google password or OAuth.", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "required": true, + "text": "Your Gmail address and the App Password joined by a colon, as one string: `address:app_password`. It is a single field, not two." + } + ], + "steps": [ + { + "title": "Turn on 2-Step Verification", + "text": "Turn on 2-Step Verification for the Google account." + }, + { + "title": "Create an App Password", + "text": "Generate an App Password for the Google account." + }, + { + "title": "Create the connector", + "text": "Paste the Gmail address, a colon and the App Password as `access_token`." + }, + { + "title": "Select labels", + "text": "HydraDB lists every selectable mailbox of the account, such as `INBOX` and your own labels. Select the labels to sync." + } + ], + "account": "One connector reads one Gmail account." + }, + "sync": { + "first_sync": "Each label reaches back the last 30 days by default. You can choose a different window for each label with `lookback_days`. Earlier emails of a new email's thread are also fetched, up to 10 levels back. When they are outside the label or the lookback window, they are looked up in All Mail.", + "changes": "Each sync fetches the emails that arrived in the label since the last sync. Mail moved into a selected label is fetched too when it gets a new IMAP UID, even with an old delivery date.", + "edits": "An email that is already synced is not read again. Label, read and starred changes are not picked up.", + "deletes": "Deleted emails are not removed. An email deleted or moved out of the label stays searchable in HydraDB.", + "notes": [ + "If Gmail resets a mailbox's message numbering, the label is read again from its lookback window." + ] + }, + "documents": [ + { + "name": "Emails", + "kind": "email", + "one_document": "One email. An email without a Message-ID is identified by its IMAP UID instead. Different labels can reuse a UID, so two such emails from different labels can replace each other in the same collection.", + "title": "The email subject.", + "text": "The subject on the first line. Then each non-empty field of the email as a labelled line, sorted by field name: the body, sender, To and CC addresses, Reply-To, delivery time, the account address, the Message-ID, the Message-ID it replies to, the conversation id and the IMAP UID. The body is plain text: HTML is converted and encoded text is decoded. An email with no body uses its subject. The subject is searchable too.", + "date": "When the email was delivered, or its Date header when the delivery time is missing.", + "link_back": "None.", + "files": "Named files inside a multipart email are fetched again and read. Their text becomes searchable when the file type is supported and the fetch succeeds. A file sent as the whole email, not inside a multipart email, is not read as an attachment.", + "attributes": [ + { + "name": "from", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The sender's address, written as a line of the text. The graph records the email as sent by that address." + }, + { + "name": "to", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The To addresses, written as a line of the text. The graph records each address as a recipient." + }, + { + "name": "cc", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The CC addresses, written as a line of the text. The graph records each address as copied." + }, + { + "name": "reply_to", + "uses": [ + "Searchable text" + ], + "text": "The Reply-To addresses, written as a line of the text. They are not added to the graph as people." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "The delivery time, written as a line of the text." + }, + { + "name": "message_id", + "uses": [ + "Searchable text" + ], + "text": "The email's Message-ID, written as a line of the text. It identifies the email across syncs." + }, + { + "name": "in_reply_to", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The Message-ID of the email this one replies to, from the In-Reply-To header or the last References entry. Links the reply to that email." + }, + { + "name": "forwarded_from_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The Message-ID of the forwarded email inside this one, when it holds exactly one. Links the email to it." + }, + { + "name": "gmail_msg_id", + "uses": [ + "Searchable text" + ], + "text": "The email's IMAP UID in the mailbox it was read from, which is All Mail for earlier thread emails. It is not a Gmail API message id." + }, + { + "name": "additional_metadata.thread_id", + "uses": [ + "Searchable text", + "Query filter", + "Graph connection" + ], + "text": "The conversation id: the first Message-ID in the References header, else In-Reply-To, else the email's own Message-ID. Limits a query to one conversation, and groups the conversation's emails in the graph. Also written as a line of the text." + }, + { + "name": "additional_metadata.account_email", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The Gmail account address. Limits a query to emails from one account. Also written as a line of the text." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's emails. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `gmail`. Not searchable." + }, + { + "name": "Notification links", + "uses": [ + "Graph connection" + ], + "text": "Links a GitHub or Linear notification email to the GitHub issue or pull request, or the Linear issue, it is about. Only emails from `notifications@github.com`, `notifications@linear.app` or `notifications@mail.linear.app` that pass Gmail's DKIM check are linked. At most 32 links per email. Not searchable." + }, + { + "name": "Label", + "uses": [ + "Access rule" + ], + "text": "The selected label the email was synced through. An access rule you set on the label governs its emails, including earlier thread emails fetched from All Mail. Not searchable." + } + ] + } + ], + "example_searches": [ + "What did the customer say in their last email about the renewal?", + "Who was copied on the contract thread with Acme?", + "Which emails were about GitHub pull request 123 in our repo?" + ], + "graph": { + "connections": [ + "A reply to the email it answers, by Message-ID.", + "Every email to its conversation.", + "An email to each forwarded email inside it.", + "A GitHub or Linear notification email to the GitHub issue or pull request, or Linear issue, it is about. GitHub items are found from the email's headers. Linear issues are found from links in the email text.", + "Through the API, a selected label can carry an optional calendar binding to one selected Google Calendar calendar in the same collection. A calendar invitation then links to its Google Calendar event when exactly one visible event matches. The account-wide calendar resource cannot be bound, and cancelled invitations are not linked.", "No other links to other tools." + ], + "people": [ + "The sender.", + "The To and CC recipients.", + "Reply-To addresses and the account address are not attached as people. BCC recipients are not read." + ], + "from_text": "The subject, the body and the text read from attachments." + }, + "not_synced": [ + "Emails outside the selected labels, unless fetched as earlier emails of a synced thread. Mailboxes Gmail marks as not selectable.", + "Gmail label assignments, and read and starred state.", + "Email older than the first sync's lookback window, unless it is an earlier email of a synced thread.", + "Deletions: emails deleted or moved out of a label stay in HydraDB.", + "BCC recipients.", + "A file sent as the whole email rather than as an attachment inside it." + ] +} diff --git a/scripts/connector_pages/gong.json b/scripts/connector_pages/gong.json new file mode 100644 index 00000000..d8c0c04d --- /dev/null +++ b/scripts/connector_pages/gong.json @@ -0,0 +1,678 @@ +{ + "description": "Sync recorded Gong calls with their transcripts, AI content and public comments, plus coaching reviews and library placements, from the workspaces you choose. Gong permissions are not imported.", + "opening": [ + "Sync recorded calls from the Gong workspaces you select. Each call is one document holding the call details, linked CRM records, topics, Gong's AI brief, key points, highlights and outline, the full speaker-labelled transcript, and public comments. Each completed coaching review, and each call filed in a library folder, is its own document linked to the call.", + "Gong permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Calls Gong marks private are skipped unless you turn them on. Changes that arrive after a call's re-read window, such as late comments, are missed. Audio and video are not synced." + ], + "permissions": { + "carried": false, + "notes": [ + "Calls Gong marks private, reviews of those calls, and reviews that are not public are skipped unless you turn on `include_private_calls`. With it on, they are synced without their Gong audience. Set an access rule on the workspace if they must stay restricted.", + "A call that Gong does not mark as private or public is synced. A review with no visibility is treated as public.", + "If HydraDB cannot read the privacy of the call behind a review or library placement, the item still syncs, with a permission warning." + ] + }, + "connect": { + "auth": "Gong uses an API key pair, an Access Key and an Access Key Secret, created by a Gong technical administrator.", + "credentials": [ + { + "name": "access_key", + "type": "secret string", + "required": true, + "text": "The Gong Access Key." + }, + { + "name": "access_key_secret", + "type": "secret string", + "required": true, + "text": "The Gong Access Key Secret. Gong shows it once." + }, + { + "name": "api_base_url", + "type": "string", + "text": "The HTTPS API host shown on Gong's API keys page: `api.gong.io`, or your company's subdomain directly before `api.gong.io`. Set it only if Gong shows a company-specific address." + }, + { + "name": "include_private_calls", + "type": "boolean", + "text": "Off by default. Turn it on to also sync private calls and reviews that are not public." + }, + { + "name": "transcript_settle_hours", + "type": "number", + "text": "How many hours of recent calls every sync reads again, to catch late transcripts, briefs and comments. 24 by default." + } + ], + "permissions_label": "Gong API permissions the connector uses", + "permissions": [ + { + "name": "api:calls:read:basic" + }, + { + "name": "api:calls:read:extensive" + }, + { + "name": "api:calls:read:transcript" + }, + { + "name": "api:users:read" + }, + { + "name": "api:workspaces:read" + }, + { + "name": "api:library:read", + "text": "optional. Without it, library placements are skipped." + }, + { + "name": "api:settings:scorecards:read", + "text": "optional. Without it, coaching reviews are skipped." + }, + { + "name": "api:stats:scorecards", + "text": "optional. Without it, coaching reviews are skipped." + } + ], + "permissions_note": "A Gong API key pair covers the whole company and has no scope picker. The list names what the connector reads, not grants you choose. Which optional endpoints your Gong plan allows depends on your subscription.", + "steps": [ + { + "title": "Create an API key", + "text": "In Gong's Admin center, open Settings, Ecosystem, API, API keys, and choose Get API key. Only technical administrators can do this. Copy the Access Key and the Access Key Secret." + }, + { + "title": "Leave the expiry and IP limits empty", + "text": "Leave the key's TTL empty. A key with an expiry stops the connector on that date. Leave Trusted IPs empty unless you add HydraDB's outgoing addresses, or every request fails." + }, + { + "title": "Create the connector", + "text": "Paste the Access Key as `access_key` and the secret as `access_key_secret`. If the API keys page shows a company-specific API address, enter it as `api_base_url`." + }, + { + "title": "Select workspaces", + "text": "HydraDB lists the company's Gong workspaces. Select the ones to sync. Each workspace syncs separately." + } + ], + "account": "One connector reads one Gong company, through its company-wide API key." + }, + "sync": { + "first_sync": "Calls and reviews reach back the window set by `lookback_days`, 30 days by default. For calls, the window reaches back a further `transcript_settle_hours`. Library folders are read in full.", + "changes": "Each sync reads calls by start time, and reads again every call that started within the last `transcript_settle_hours`, 24 by default, to catch late transcripts, briefs and comments. Reviews are read by review time. The workspace library is read in full on every sync.", + "edits": "A call is updated only while its start time is inside the re-read window. Later changes to a call, such as a comment added after that, are missed. Raise `transcript_settle_hours` to keep calls open longer.", + "deletes": "Calls deleted in Gong stay searchable in HydraDB.", + "notes": [ + "The shortest sync interval for Gong is 30 minutes.", + "Gong allows a company 10,000 API calls a day. HydraDB shares that allowance with every other integration on your Gong company." + ] + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `gong`. Not searchable." + } + ], + "documents": [ + { + "name": "Calls", + "kind": "meeting", + "one_document": "One recorded call, with its transcript and public comments.", + "title": "The call title, else `Gong call` and the call id.", + "text": "The title, then `When`, `Duration`, `Direction`, `Scope`, `Host`, `Participants` with their job titles, `Related` CRM records, `Outcome`, `Topics` and `Trackers` lines. Then `Brief`, `Key points`, `Highlights` and `Outline` sections, then `Transcript` with one line per speaker turn. Public comments are searchable with the call.", + "date": "When the call actually started.", + "link_back": "The call in Gong.", + "files": "None. Audio and video are never downloaded.", + "attributes": [ + { + "name": "Transcript", + "uses": [ + "Searchable text" + ], + "text": "The full transcript, one line per speaker turn, when Gong has produced it." + }, + { + "name": "host", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The host's name, written as the `Host` line. The graph records that person as the call's host." + }, + { + "name": "additional_metadata.host_email", + "uses": [ + "Searchable text", + "Query filter", + "Graph identity" + ], + "text": "The host's email. Identifies the host across tools, and limits a query to one host. Written as the `Host` line only when the host's name is missing." + }, + { + "name": "participants", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Each party's name, email, job title and affiliation, written as the `Participants` line. The graph records each as a participant." + }, + { + "name": "Public comments", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The text of each public comment, searchable with the call. The graph records each comment's author." + }, + { + "name": "brief", + "uses": [ + "Searchable text" + ], + "text": "Gong's AI brief, in the `Brief` section." + }, + { + "name": "key_points", + "uses": [ + "Searchable text" + ], + "text": "Gong's AI key points, in the `Key points` section." + }, + { + "name": "highlights", + "uses": [ + "Searchable text" + ], + "text": "Gong's AI highlight headings and items, in the `Highlights` section." + }, + { + "name": "action_items", + "uses": [ + "Searchable text" + ], + "text": "The next steps from Gong's highlights, written as the call's action items." + }, + { + "name": "outline", + "uses": [ + "Searchable text" + ], + "text": "Gong's AI outline sections and items, in the `Outline` section, without timings." + }, + { + "name": "topics", + "uses": [ + "Searchable text" + ], + "text": "The topics discussed, written as the `Topics` line and as the call's labels. Topics with no talk time are left out." + }, + { + "name": "trackers", + "uses": [ + "Searchable text" + ], + "text": "The trackers that fired, with their counts, written as the `Trackers` line. Trackers that did not fire are left out." + }, + { + "name": "crm_context", + "uses": [ + "Searchable text" + ], + "text": "Linked CRM records as `ObjectType: Name`, written as the `Related` line, so a deal or account name finds the call. It does not link the call to a CRM record in the graph." + }, + { + "name": "duration", + "uses": [ + "Searchable text" + ], + "text": "The call length, written as the `Duration` line." + }, + { + "name": "started_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the call actually started, written into the text." + }, + { + "name": "additional_metadata.direction", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "Inbound, Outbound, Conference or Unknown, written as the `Direction` line. Separates inbound from outbound calls." + }, + { + "name": "additional_metadata.scope", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "Internal, External or Unknown, written as the `Scope` line. Limits a query to customer-facing calls." + }, + { + "name": "additional_metadata.call_outcome", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The call outcome, such as Demo booked, written as the `Outcome` line. Limits a query to one outcome." + }, + { + "name": "additional_metadata.crm_object_ids", + "uses": [ + "Query filter" + ], + "text": "Linked CRM records as `ObjectType:id` pairs. Finds every call linked to one CRM opportunity or account. Not searchable." + }, + { + "name": "additional_metadata.primary_user_id", + "uses": [ + "Query filter" + ], + "text": "The host's Gong user id. Limits a query to one rep's calls. Not searchable." + }, + { + "name": "additional_metadata.media", + "uses": [ + "Query filter" + ], + "text": "Video or Audio. Not searchable." + }, + { + "name": "additional_metadata.language", + "uses": [ + "Query filter" + ], + "text": "The detected language. Not searchable." + }, + { + "name": "additional_metadata.is_private", + "uses": [ + "Query filter" + ], + "text": "Gong's private flag. Leaves private calls out of a query when you sync them. Not searchable." + }, + { + "name": "additional_metadata.has_transcript", + "uses": [ + "Query filter" + ], + "text": "Whether the transcript has arrived. Not searchable." + }, + { + "name": "additional_metadata.calendar_event_id", + "uses": [ + "Query filter" + ], + "text": "The calendar event id. Finds the call for a known calendar event. It is not linked to calendar documents. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The workspace id. Limits a query to one workspace. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The workspace name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `workspace`. Not searchable." + }, + { + "name": "scheduled_at", + "uses": [ + "Stored only" + ], + "text": "When the call was scheduled to start. It is not the result date." + }, + { + "name": "purpose", + "uses": [ + "Stored only" + ], + "text": "The call's purpose label." + }, + { + "name": "system", + "uses": [ + "Stored only" + ], + "text": "The conferencing or telephony system that recorded the call." + }, + { + "name": "comment_count", + "uses": [ + "Stored only" + ], + "text": "How many non-empty public comments the call has." + } + ] + }, + { + "name": "Coaching reviews", + "kind": "knowledge_base", + "one_document": "One completed scorecard review of one call.", + "title": "The scorecard name, `review of`, the rep reviewed, and the call date.", + "text": "The title, then `Reviewer`, `Reviewed`, `Reviewed at`, `Method` and `Call id` lines, then each question with its score, selected options and answer text. A question that does not apply shows `N/A`. `Author` and `Updated` lines are part of the text too.", + "date": "When the review was completed, else when the call started.", + "link_back": "None.", + "attributes": [ + { + "name": "answers", + "uses": [ + "Searchable text" + ], + "text": "Each question with its score, selected options and answer text. The structured answers are kept with the review too." + }, + { + "name": "scorecard_name", + "uses": [ + "Searchable text" + ], + "text": "The scorecard's name, in the title." + }, + { + "name": "created_by", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The reviewer, written as the `Author` line. The graph records the review as written by that person." + }, + { + "name": "reviewer", + "uses": [ + "Searchable text" + ], + "text": "The reviewer, or Gong AI, written as the `Reviewer` line." + }, + { + "name": "reviewed_user", + "uses": [ + "Searchable text" + ], + "text": "The rep reviewed, in the title and the `Reviewed` line. The rep is not attached to the review as a person." + }, + { + "name": "review_time", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the review was completed, written as the `Reviewed at` and `Updated` lines. Also kept as the review's created and updated time." + }, + { + "name": "call_started_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the reviewed call started, in the title. Used as the result date only when the review time is missing." + }, + { + "name": "created_by_email", + "uses": [ + "Graph identity" + ], + "text": "The reviewer's email. Identifies the reviewer in the graph. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "The call the review scores. Links the review to that call. Not searchable." + }, + { + "name": "additional_metadata.call_id", + "uses": [ + "Query filter" + ], + "text": "The reviewed call. Returns every review of one call. Not searchable." + }, + { + "name": "additional_metadata.scorecard_id", + "uses": [ + "Query filter" + ], + "text": "The scorecard. Limits a query to one scorecard. Not searchable." + }, + { + "name": "additional_metadata.review_method", + "uses": [ + "Query filter" + ], + "text": "`MANUAL` or `AUTOMATIC`. Separates human and AI reviews. Not searchable." + }, + { + "name": "additional_metadata.reviewer_user_id", + "uses": [ + "Query filter" + ], + "text": "The reviewer's Gong user id. Not searchable." + }, + { + "name": "additional_metadata.reviewer_email", + "uses": [ + "Query filter" + ], + "text": "The reviewer's email. Limits a query to one reviewer. Not searchable." + }, + { + "name": "additional_metadata.reviewed_user_id", + "uses": [ + "Query filter" + ], + "text": "The reviewed rep's Gong user id. Finds every review of one rep. Not searchable." + }, + { + "name": "additional_metadata.reviewed_email", + "uses": [ + "Query filter" + ], + "text": "The reviewed rep's email. Finds every review of one rep. Not searchable." + }, + { + "name": "additional_metadata.visibility_type", + "uses": [ + "Query filter" + ], + "text": "The review's Gong visibility. Leaves out reviews that are not public, when you sync them. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The scorecard's workspace id. Limits a query to one workspace. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The workspace name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `workspace`. Not searchable." + }, + { + "name": "answer_count", + "uses": [ + "Stored only" + ], + "text": "How many answers the review contains." + } + ] + }, + { + "name": "Library placements", + "kind": "knowledge_base", + "one_document": "One call filed in one library folder. A call filed in two folders is two documents.", + "title": "The call title, then `(filed in` and the folder path.", + "text": "The title, then the folder, who filed the call and when, and the curator's note. `Space`, `Author` and `Updated` lines are part of the text too.", + "date": "When the call was filed.", + "link_back": "The placement in Gong, when Gong supplies its address.", + "attributes": [ + { + "name": "note", + "uses": [ + "Searchable text" + ], + "text": "The curator's note, under `Curator note`." + }, + { + "name": "folder_path", + "uses": [ + "Searchable text" + ], + "text": "The folder and up to eight parent folders, in the title and the `Library folder` line." + }, + { + "name": "space_name", + "uses": [ + "Searchable text" + ], + "text": "The folder path, written as the `Space` line, so a folder name finds the call." + }, + { + "name": "call_title", + "uses": [ + "Searchable text" + ], + "text": "The original call title, in the title and the text." + }, + { + "name": "filed_by", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Who filed the call, written as the `Author` line. The graph records the placement as written by that person." + }, + { + "name": "filed_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the call was filed, written as the `Filed at` and `Updated` lines. Also kept as the placement's created and updated time." + }, + { + "name": "created_by_email", + "uses": [ + "Graph identity" + ], + "text": "The filer's email. Identifies the filer in the graph. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "The filed call. Links the placement to that call. Not searchable." + }, + { + "name": "additional_metadata.call_id", + "uses": [ + "Query filter" + ], + "text": "The filed call. Returns every placement of one call. Not searchable." + }, + { + "name": "additional_metadata.folder_id", + "uses": [ + "Query filter" + ], + "text": "The library folder. Limits a query to one folder. Not searchable." + }, + { + "name": "additional_metadata.filed_by_user_id", + "uses": [ + "Query filter" + ], + "text": "The filer's Gong user id. Limits a query to one curator. Not searchable." + }, + { + "name": "additional_metadata.library_container_type", + "uses": [ + "Query filter" + ], + "text": "Always `library_folder`. Separates placements from calls. Not searchable." + }, + { + "name": "space_id", + "uses": [ + "Stored only" + ], + "text": "The library folder id. Filter on it with `additional_metadata.folder_id`." + }, + { + "name": "snippet_from_sec", + "uses": [ + "Stored only" + ], + "text": "Where the filed excerpt starts in the call, in seconds, when only part of the call was filed." + }, + { + "name": "snippet_to_sec", + "uses": [ + "Stored only" + ], + "text": "Where the filed excerpt ends in the call, in seconds." + } + ] + } + ], + "example_searches": [ + "What objections did Acme raise on our last three calls?", + "How did Jordan score on the discovery scorecard last month?", + "Which calls are in the Best discovery calls library folder, and why were they filed?" + ], + "graph": { + "connections": [ + "A coaching review to the call it scores.", + "A library placement to the call it files.", + "CRM record ids and calendar event ids are kept for filtering only. They do not link a call to CRM or calendar documents.", + "No links to other tools." + ], + "people": [ + "The host and every participant of each call, with their email when Gong has it.", + "The author of each public comment.", + "The reviewer of each coaching review, and the person who filed each library placement.", + "The rep reviewed is not attached to the review as a person." + ], + "from_text": "The transcript and Gong's AI content for each call, coaching review answers and curator notes." + }, + "not_synced": [ + "Workspaces you did not select.", + "Emails and other digital interactions, Engage flows and tasks, and forecasts.", + "Audio and video, per-person interaction statistics, and transcript timings.", + "Private calls, reviews of them, and reviews that are not public, unless `include_private_calls` is on.", + "Private and archived library folders, even with `include_private_calls` on.", + "Library placements or coaching reviews when Gong refuses the optional endpoint. Reviews also need access to scorecard definitions.", + "Comments and other changes that arrive after a call's re-read window." + ] +} diff --git a/scripts/connector_pages/google_calendar.json b/scripts/connector_pages/google_calendar.json new file mode 100644 index 00000000..9cebf2dd --- /dev/null +++ b/scripts/connector_pages/google_calendar.json @@ -0,0 +1,202 @@ +{ + "description": "Sync the events on every calendar of one Google account, one searchable event card per event.", + "opening": [ + "Sync events from every calendar on one Google account's calendar list. Each event is one document that reads as a short event card: title, time, place, organizer, attendees and description. A changed occurrence of a recurring meeting links to its series.", + "Google Calendar sharing and event visibility are not imported, so private events are visible to everyone who can query the collection unless you set an access rule. You cannot pick individual calendars: every calendar on the account's list is synced. The first sync picks events by when they were last edited, not by when they take place. An event cancelled or deleted after it was synced stays in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "Private events are synced like any other event." + ] + }, + "connect": { + "auth": "Google Calendar uses a Google OAuth 2.0 client id and client secret, with a refresh token for the Google account to sync.", + "credentials": [ + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The Google OAuth 2.0 client id." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The Google OAuth 2.0 client secret." + }, + { + "name": "refresh_token", + "type": "secret string", + "required": true, + "text": "A refresh token for the Google account, issued with a Calendar read scope such as `calendar.readonly`." + } + ], + "steps": [ + { + "title": "Get a client and refresh token", + "text": "Get a Google OAuth 2.0 client id and secret, and a refresh token for the account whose calendars you want to sync. Issue the token with a Calendar read scope such as `calendar.readonly`." + }, + { + "title": "Create the connector", + "text": "Paste the three values as `client_id`, `client_secret` and `refresh_token`." + }, + { + "title": "Select the account", + "text": "HydraDB lists one item, All data, that covers every calendar on the account's list. Select it." + } + ], + "account": "One connector reads one Google account. Every calendar on that account's calendar list is synced." + }, + "sync": { + "first_sync": "Reads events last edited within the window set by `lookback_days`, 30 days by default. When an event has no edit time, its creation time is used. Events with neither are read regardless. The window is about edits, not meeting dates: an old recurring meeting that was not edited recently may not be picked up, and a future event edited recently is.", + "changes": "Each sync reads, calendar by calendar, the events edited since the last sync.", + "edits": "An edited event is read again and replaces its document.", + "deletes": "Cancelled events are not added. An event cancelled or deleted after it was synced stays searchable in HydraDB." + }, + "documents": [ + { + "name": "Events", + "kind": "custom", + "one_document": "One calendar event. A recurring series is one document for the series, plus one for each occurrence that was changed. An event that appears with the same event id on more than one calendar of the account is one document, and each calendar's copy can replace the other.", + "title": "The event title, or `Calendar event ` when it has none.", + "text": "The title, then a `When` line with the start and end, a `Where` line with the location, an `Organizer` line, an `Attendees` line, then the event description. Descriptions are kept as Google supplies them, so an HTML description keeps its markup. The title is searchable too.", + "date": "When the event was last edited, else when it was created. It is not the time the event takes place.", + "link_back": "None.", + "files": "None. Event attachments are not synced.", + "attributes": [ + { + "name": "organizer", + "uses": [ + "Searchable text" + ], + "text": "The organizer's display name, or email when there is no name, written as the `Organizer` line. The same name is kept as `author`. The organizer is not attached to the event as a person in the graph unless the same email is also among the attendees." + }, + { + "name": "attendees", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Each attendee's email, display name and response status. Names, or emails when there is no name, are written as the `Attendees` line. The graph attaches each attendee to the event by email. Response statuses are kept on the event but are not searchable." + }, + { + "name": "location", + "uses": [ + "Searchable text" + ], + "text": "The free-text location, written as the `Where` line." + }, + { + "name": "start_at", + "uses": [ + "Searchable text" + ], + "text": "The scheduled start, or the date for an all-day event, written in the `When` line. It does not set the result date." + }, + { + "name": "end_at", + "uses": [ + "Searchable text" + ], + "text": "The scheduled end, or the date for an all-day event, written after the start in the `When` line when the event has a start." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the event was last edited. Sets the result date and decides which events each sync reads. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the event was created. Sets the result date only when the event has no edit time. Not searchable." + }, + { + "name": "Recurring series", + "uses": [ + "Graph connection" + ], + "text": "For a changed occurrence, the recurring series event it belongs to. Links the occurrence to the series document. Not searchable." + }, + { + "name": "thread_id", + "uses": [ + "Graph connection" + ], + "text": "The recurring series an occurrence belongs to, empty for one-off events. Groups the occurrences of one series together in the graph. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The calendar's id. Limits a query to one calendar. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The calendar's name. Limits a query to a calendar by name. Not searchable: the calendar name is not part of the event text." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `calendar`. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's events. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `google_calendar`. Not searchable." + }, + { + "name": "status", + "uses": [ + "Stored only" + ], + "text": "`confirmed` or `tentative`. It is not part of the event text." + } + ] + } + ], + "example_searches": [ + "What was the agenda in the description of last Tuesday's planning meeting?", + "Which meetings did Dana organize this month?", + "Where is the offsite being held?" + ], + "graph": { + "connections": [ + "A changed occurrence of a recurring meeting to its series.", + "Changed occurrences of the same series to each other, so they group together.", + "No links to other tools, including Gmail invitations." + ], + "people": [ + "Each attendee, by email.", + "The organizer only when the organizer is also an attendee.", + "Attendee names and response statuses are kept with the event but do not identify people in the graph." + ], + "from_text": "The event card: title, time, place, organizer, attendees and description." + }, + "not_synced": [ + "Calendar sharing and event visibility settings.", + "Event attachments, audio and video, and conference details beyond what the location or description says.", + "Unchanged occurrences of a recurring series as documents of their own.", + "Events last edited before the first sync's window.", + "Cancellations and deletions: an event cancelled or deleted after it was synced stays in HydraDB." + ] +} diff --git a/scripts/connector_pages/google_drive.json b/scripts/connector_pages/google_drive.json new file mode 100644 index 00000000..eb6870a9 --- /dev/null +++ b/scripts/connector_pages/google_drive.json @@ -0,0 +1,261 @@ +{ + "description": "Sync files and folders from the Google Drive folders and shared drives you choose, one document per file or folder. With Enforce ACL on, each file's Drive sharing decides who can find it.", + "opening": [ + "Sync the files inside the Google Drive folders and shared drives you select, including My Drive and every folder below a selected one. Each file and each folder is one document, and each links to its parent folder. Text from supported files is searchable when HydraDB can download and read the files: Google Docs and Slides come across as text, and Sheets as comma-separated values. A file whose text cannot be read is still findable by its name, type, owner and location.", + "Each file's own Drive sharing becomes its access list, and search follows it when Enforce ACL is on. The first sync reaches only files modified in the last 30 days unless you raise `lookback_days`. Files removed in Drive are not deleted from HydraDB. Comments, suggestions and revision history are not synced." + ], + "permissions": { + "carried": true, + "who_can_read": "Each file has its own access list, read from its Drive sharing. A person it is shared with can read it, and so can members of a Google Group it is shared with. A domain share grants that Google Workspace domain. A file shared with anyone becomes readable by everyone who can query the collection only when it is discoverable. An unshared file can be read by its owner.", + "identity": "A person's email address. A Google Group share is turned into its members' email addresses when the Directory scope below is granted.", + "when_unreadable": "If HydraDB cannot read a file's sharing, the connector reports a permission warning and the file carries `additional_metadata.acl_warning`.", + "notes": [ + "A share with anyone who has the link does not make a file readable by everyone.", + "Without the Directory scope, Google Group shares are not turned into members, so a person identified only by email does not match a file shared only with a group.", + "If a Google Group cannot be turned into its members, the group share is kept as it is. Access is not opened up.", + "Sharing changes that do not edit the file are picked up on each sync." + ] + }, + "connect": { + "auth": "Google Drive uses an OAuth client from your Google Cloud project and a refresh token for the Google account that connects. HydraDB sees what that account can see.", + "credentials": [ + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The OAuth client id of your Google Cloud app." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The OAuth client secret of the same app." + }, + { + "name": "refresh_token", + "type": "secret string", + "required": true, + "text": "A refresh token for the connecting Google account, issued with the `drive.readonly` scope." + } + ], + "permissions_label": "Scopes to grant", + "permissions": [ + { + "name": "https://www.googleapis.com/auth/drive.readonly", + "text": "required. Lists My Drive, files shared with the account and shared drives, and reads file details and sharing." + }, + { + "name": "https://www.googleapis.com/auth/admin.directory.group.member.readonly", + "text": "optional, needs Google Workspace admin consent. Turns Google Group shares into member email addresses, for search that follows Drive permissions." + }, + { + "name": "https://www.googleapis.com/auth/drive", + "text": "optional. Full Drive access, not needed to sync." + } + ], + "steps": [ + { + "title": "Create an OAuth client", + "text": "In Google Cloud, create an OAuth client and note its client id and client secret." + }, + { + "title": "Authorize the account", + "text": "Sign in with a Google account that can see the folders and shared drives you want synced, grant `drive.readonly`, and keep the refresh token." + }, + { + "title": "Grant group access, if you use groups", + "text": "If files are shared with Google Groups and search must follow Drive permissions, have a Google Workspace admin consent to `admin.directory.group.member.readonly`." + }, + { + "title": "Create the connector", + "text": "Paste the three values as `client_id`, `client_secret` and `refresh_token`." + }, + { + "title": "Select folders and shared drives", + "text": "HydraDB lists My Drive, your shared drives and folders. Select at least one. Nothing syncs until you do. To reach files older than 30 days, raise `lookback_days` when you select them." + } + ], + "account": "One connector reads what one Google account can see." + }, + "sync": { + "first_sync": "Each selected folder or shared drive reads back the window set by `lookback_days`, 30 days by default. Files last modified before that window are not synced.", + "changes": "Each sync reads files modified since the last sync. Sharing changes are read on every sync, even when the file itself did not change.", + "edits": "An edited file is read again, and its text replaces the old text.", + "deletes": "Files removed in Drive are not deleted from HydraDB. When Drive reports a file as removed, HydraDB makes it private. It is then hidden only when Enforce ACL is on. With Enforce ACL off, it stays searchable.", + "notes": [ + "A file in two selected folders is kept once.", + "A shortcut is synced as the file it points to when that file can be read. Otherwise only the shortcut's details are kept. Shortcuts to folders are not followed." + ] + }, + "documents": [ + { + "name": "Files and folders", + "kind": "custom", + "one_document": "One Drive file or one folder.", + "title": "The shared drive name, the first parent folder name and the file name, joined with slashes, for example `Research/Q3 Findings.pdf`. A name that is missing is left out, and a shared drive's name may be missing. A file with no name is titled `Drive file` and its id.", + "text": "For a file whose text could be read, that text. For a folder, or a file whose text could not be read, the title followed by `Type`, `Owner`, `Link` and `Modified` lines, leaving out empty ones. The title is searchable too.", + "date": "When the file was last modified in Drive.", + "link_back": "Opens the file in Drive. A folder without its own link gets a Drive folder link.", + "files": "Text from supported files is searchable when HydraDB can download and read the files. Google Docs and Slides are exported as text, and Sheets as comma-separated values. Files over 50 MiB, and Google file types other than Docs, Sheets and Slides, keep only their details.", + "attributes": [ + { + "name": "mime_type", + "uses": [ + "Searchable text" + ], + "text": "The Drive file type, written as the `Type` line. Searchable on folders and on files whose text could not be read. On other files it is kept but not searchable." + }, + { + "name": "author", + "uses": [ + "Searchable text" + ], + "text": "The display name, or else the email, of the file's first owner, written as the `Owner` line. Searchable on folders and on files whose text could not be read. On other files it is kept but not searchable. The owner is not attached to the file as a person in the graph." + }, + { + "name": "url", + "uses": [ + "Searchable text" + ], + "text": "The Drive link, written as the `Link` line on folders and on files whose text could not be read. On other files it is the link back only. A Drive folder link that HydraDB builds is not added to the text." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the file was last modified in Drive. Sets the result date and decides which files each sync reads. Written as the `Modified` line, so it is searchable only on folders and on files whose text could not be read." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The shared drive id for a file in a shared drive, otherwise its parent folder id. Limits a query to one shared drive, or to one folder in My Drive. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The shared drive name, or the parent folder name. Limits a query by drive or folder name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "`drive` or `folder`. Says which kind of container the two keys above refer to. Not searchable." + }, + { + "name": "additional_metadata.folder_id", + "uses": [ + "Query filter" + ], + "text": "The first parent folder id, even inside a shared drive. Limits a query to one folder. Not searchable." + }, + { + "name": "additional_metadata.folder_name", + "uses": [ + "Query filter" + ], + "text": "The first parent folder name. Limits a query by folder name. Not searchable." + }, + { + "name": "additional_metadata.acl_warning", + "uses": [ + "Query filter" + ], + "text": "Set when the file's sharing could not be read or a Google Group could not be turned into its members. Finds the files that need attention. It does not grant access. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's files. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `google_drive`. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "The file's first parent folder. Links the file or folder to that folder's document, so a folder and its files are connected. Not searchable." + }, + { + "name": "Drive sharing", + "uses": [ + "Access rule" + ], + "text": "The file's people, group, domain and public shares. Decides who can read it when Enforce ACL is on. Not searchable." + }, + { + "name": "size", + "uses": [ + "Stored only" + ], + "text": "The size in bytes. Empty for Google Docs, Sheets and Slides." + }, + { + "name": "md5_checksum", + "uses": [ + "Stored only" + ], + "text": "Drive's content checksum, for comparing file versions. Empty for Google Docs, Sheets and Slides." + }, + { + "name": "created_at", + "uses": [ + "Stored only" + ], + "text": "When the file was created in Drive. The result date uses the modified time instead." + }, + { + "name": "content_type", + "uses": [ + "Stored only" + ], + "text": "`folder` on folders." + }, + { + "name": "is_container", + "uses": [ + "Stored only" + ], + "text": "True on folders." + } + ] + } + ], + "example_searches": [ + "What does the Q3 findings deck say about onboarding?", + "Which files in the Finance folder mention the 2026 budget?", + "Which pricing files were changed most recently?" + ], + "graph": { + "connections": [ + "A file or folder to its first parent folder.", + "No links to items in other tools." + ], + "people": [ + "No people are attached to files in the graph. The owner is part of the text only on folders and on files whose text could not be read." + ], + "from_text": "The file's text, or for a folder or unread file, its title and detail lines." + }, + "not_synced": [ + "Folders and shared drives you did not select.", + "Files last modified before the `lookback_days` window on the first sync.", + "Comments, suggestions and revision history.", + "Text of files over 50 MiB.", + "Text of Google file types other than Docs, Sheets and Slides.", + "Deletions: removed files stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/google_search_console.json b/scripts/connector_pages/google_search_console.json new file mode 100644 index 00000000..05933474 --- /dev/null +++ b/scripts/connector_pages/google_search_console.json @@ -0,0 +1,151 @@ +{ + "description": "Sync daily search performance for one Google Search Console property, one document per report row with clicks, impressions, click-through rate and average position.", + "opening": [ + "Sync daily search performance reports for one Search Console property. Each report row is one small document: one day for one search query, page, country or device, or one day for the whole property, with its clicks, impressions, click-through rate and average position. A busy site produces one document per query per day.", + "Search Console permissions are not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. Only web search performance is read. Rows that drop out of a later report stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Search Console uses a Google service-account JSON key together with the property to read.", + "credentials": [ + { + "name": "client_secrets", + "type": "secret string", + "required": true, + "text": "The service account's JSON key, pasted whole." + }, + { + "name": "site_url", + "type": "string", + "required": true, + "text": "The Search Console property to read, written as Search Console names it: a URL-prefix property such as `https://example.com/`, or a domain property such as `sc-domain:example.com`." + } + ], + "permissions_label": "Scopes the connector requests", + "permissions": [ + { + "name": "https://www.googleapis.com/auth/webmasters" + }, + { + "name": "https://www.googleapis.com/auth/webmasters.readonly" + } + ], + "steps": [ + { + "title": "Create a service account key", + "text": "In Google Cloud, create a service account and download its JSON key." + }, + { + "title": "Create the connector", + "text": "Paste the key as `client_secrets` and the property as `site_url`." + }, + { + "title": "Select the property", + "text": "HydraDB lists one `All data` resource for the property. Select it. Report types cannot be selected separately." + } + ], + "account": "One connector reads one Search Console property." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the days since the last sync, plus the three days before them again. The current UTC day is not read until the next day. The freshest data Search Console has, which can still change, is included.", + "edits": "Rows for the three re-read days replace their earlier documents, so late changes Search Console makes to those days come across.", + "deletes": "Rows are never removed. A row that drops out of a later report stays searchable in HydraDB.", + "notes": [ + "On a day with more than 50,000 rows in one report, some of that day's rows are skipped." + ] + }, + "documents": [ + { + "name": "Report rows", + "kind": "custom", + "one_document": "One day of one report: one search query, one page, one country or one device, or the whole property for that day.", + "title": "For a query row, the query in quotes followed by ` - search performance ()`. For a page, country, device or keys row, the value followed by ` - search performance ()`. For a whole-property row, `Search performance for ()`.", + "text": "The title, then `Site`, the row's own line (`Query`, `Page`, `Country`, `Device` or `Keys`), `Date`, `Clicks`, `Impressions`, `CTR` and `Avg position` lines. `CTR` is a percentage with two decimals and `Avg position` has one decimal. Empty values are left out.", + "date": "The report day, at midnight UTC.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "query, page, country, device, keys", + "uses": [ + "Searchable text" + ], + "text": "The value the row reports on, written into the title and its own line. The keys report asks only for the date, so its rows repeat the whole-property daily totals." + }, + { + "name": "clicks, impressions, ctr, position", + "uses": [ + "Searchable text" + ], + "text": "The day's metrics, written as the `Clicks`, `Impressions`, `CTR` and `Avg position` lines." + }, + { + "name": "date", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "The report day. It is written into the title and the `Date` line and sets the result date." + }, + { + "name": "site_url", + "uses": [ + "Searchable text" + ], + "text": "The property, written into the `Site` line with everything up to the first colon removed. `https://example.com/` reads as `//example.com/` and `sc-domain:example.com` reads as `example.com`." + }, + { + "name": "additional_metadata.google_search_console_stream", + "uses": [ + "Query filter" + ], + "text": "The report the row came from: `performance_report_query`, `performance_report_page`, `performance_report_date`, `performance_report_country`, `performance_report_device` or `performance_report_keys`. Limits a query to one report, for example only per-query rows. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's rows. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `google-search-console`, with hyphens. A filter on `google_search_console` matches nothing. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The report the row came from, shown when you inspect the item. To limit a query to one report, use `additional_metadata.google_search_console_stream`." + } + ] + } + ], + "example_searches": [ + "How did the search query \"running shoes\" perform on 2026-11-03?", + "How many clicks and impressions did the /pricing page get on 2026-11-03?", + "What was our average position on mobile devices last week?" + ], + "graph": { + "connections": [ + "None. Rows are not linked to each other, to pages or to the property.", + "No links to other tools." + ], + "people": "No people or groups are attached to rows.", + "from_text": "The report text: the site, the query, page, country or device, the date and the metrics." + }, + "not_synced": [ + "Image, video and news search performance. Only web search is read.", + "URL inspection, index coverage, sitemaps and other Search Console reports.", + "Query and page pairs as one combined report.", + "Properties other than the one set in `site_url`.", + "Removals: rows that drop out of a later report stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/googleads.json b/scripts/connector_pages/googleads.json new file mode 100644 index 00000000..7c85011d --- /dev/null +++ b/scripts/connector_pages/googleads.json @@ -0,0 +1,148 @@ +{ + "description": "Sync Google Ads account structure and daily performance reports from the accounts one Google user can access, one searchable document per report row.", + "opening": [ + "Sync account structure and reports from every Google Ads account one Google user can access: accounts and labels, campaigns with their budgets, targeting criteria and labels, ad groups, ads, audiences, keywords, placements, search terms, geography, video, and daily campaign and ad group performance. Each report row is one document, written as `Label: value` lines.", + "Google Ads account access is not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. Rows are kept by each report's key, and some keys leave out the date or the account, so several rows can end up as one document. Items removed in Google Ads stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Google Ads uses a developer token together with a Google OAuth client id, client secret and refresh token. Paste all four.", + "credentials": [ + { + "name": "developer_token", + "type": "secret string", + "required": true, + "text": "Your Google Ads API developer token." + }, + { + "name": "oauth_credentials.client_id", + "type": "secret string", + "required": true, + "text": "A Google OAuth client id." + }, + { + "name": "oauth_credentials.client_secret", + "type": "secret string", + "required": true, + "text": "The secret for that OAuth client." + }, + { + "name": "oauth_credentials.refresh_token", + "type": "secret string", + "required": true, + "text": "A refresh token for a Google user who has access to the Google Ads accounts you want to sync." + } + ], + "steps": [ + { + "title": "Gather the credentials", + "text": "Get your Google Ads API developer token. Then issue a refresh token, through your own Google OAuth client, for a Google user who can access the Google Ads accounts to sync." + }, + { + "title": "Create the connector", + "text": "Paste the developer token as `developer_token`, and the client id, client secret and refresh token as `oauth_credentials.client_id`, `oauth_credentials.client_secret` and `oauth_credentials.refresh_token`." + }, + { + "title": "Select the account-wide resource", + "text": "HydraDB lists one account-wide resource, All data, that covers every account the user can access. Select it. Individual Google Ads accounts are not listed separately." + } + ], + "account": "One connector reads every Google Ads account that one Google user can access, including accounts under a manager account." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Campaign, ad group, budget, demographic, location and geography performance reports are read for the days in each sync's date window.", + "edits": "A row read again updates its document only while the row's report key stays the same. In reports whose key includes a name or status, such as campaign performance, renaming a campaign or changing its status creates a new document and the old one stays. Corrections Google makes later to older days are not guaranteed to be picked up.", + "deletes": "Campaigns, ad groups and ads removed in Google Ads stay searchable in HydraDB.", + "notes": [ + "Manager accounts and disabled accounts appear in the account hierarchy, but their performance and other reports are not read." + ] + }, + "documents": [ + { + "name": "Report rows", + "kind": "custom", + "one_document": "One row of a report, identified by that report's key. Rows that share a key are kept as one document, and the last one read wins. Budget rows for different days share a key, managed placement rows share one key per account and date, and campaign performance rows with the same campaign name, status, date and device share a key even when they come from different accounts.", + "title": "The row's most specific name: its own name or title, else the ad group, budget, audience, label, interest, geo target, video title, campaign or account name, else any other name column. When the row has a `segments__date`, the date follows in parentheses, as in `Spring Sale (2026-11-03)`. A row with no name is titled `Google Ads `.", + "text": "The title on the first line. Then every non-empty column of the row in alphabetical order, as `Label: value`, with the column name turned into words, such as `Metrics Cost Micros`. Nested values are flattened first. Ids and resource names are left out. Rows of `accessible_customers` add a `Resource names` line.", + "date": "The report date, at midnight UTC. A row without a date has no date.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "Report columns", + "uses": [ + "Searchable text" + ], + "text": "Names, statuses, dates and metric values, one `Label: value` line each. No unit conversion is applied: columns such as `cost_micros` and `amount_micros` keep the raw micros values Google Ads reports. Ids and resource names are not part of the text." + }, + { + "name": "segments__date", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "The report day, from `segments__date`, or from `date` when that is the column a report has. It sets the result date and appears as a column line. `segments__date` is also added to the title." + }, + { + "name": "additional_metadata.googleads_stream", + "uses": [ + "Query filter" + ], + "text": "The report the row came from. Limits a query to one report. The values are `accessible_customers`, `customer_hierarchy`, `customer`, `customer_label`, `label`, `campaign_history`, `campaign_budget`, `campaign_criterion`, `campaign_label`, `campaign_performance`, `campaign_performance_by_age_range_and_device`, `campaign_performance_by_gender_and_device`, `campaign_performance_by_location`, `adgroups`, `ad_groups_performance`, `ad_group_ad`, `ad_group_ad_label`, `ad_group_criterion`, `ad_group_label`, `ad_listing_group_criterion`, `audience`, `user_interest`, `geo_performance`, `geo_target_constant`, `keyword_view`, `managed_placement_view`, `search_term_view` and `video`. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's rows. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `googleads`. Limits a query to Google Ads rows. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The report the row came from, shown when you inspect the item. To limit a query to one report, use `additional_metadata.googleads_stream`." + }, + { + "name": "Other report columns", + "uses": [ + "Stored only" + ], + "text": "Every column of the row as Google Ads returned it, including ids and resource names. Kept for inspection only. A query does not match ids or resource names and cannot filter on these columns." + } + ] + } + ], + "example_searches": [ + "How did the Spring Sale campaign perform on mobile on 2026-11-03?", + "What amount in micros is recorded for the budget named Brand Budget?", + "Which keywords are in the Running Shoes ad group, and how did they perform?" + ], + "graph": { + "connections": [ + "None. Rows are not linked to their account, campaign, ad group or ad.", + "Campaign labels are not linked to their campaign. A campaign label row carries the campaign id and the label name, but no campaign name.", + "No links to other tools." + ], + "people": "No people or groups are attached to rows.", + "from_text": "The row text: names, statuses, dates and metric values. Ids and resource names are not part of it." + }, + "not_synced": [ + "Per-click reports.", + "A standalone gender report. Campaign performance by gender and device is synced.", + "Performance and other reports for manager accounts and disabled accounts.", + "Removals: campaigns, ad groups and ads removed in Google Ads stay in HydraDB.", + "Google Ads account access." + ] +} diff --git a/scripts/connector_pages/granola.json b/scripts/connector_pages/granola.json new file mode 100644 index 00000000..e41dc1a1 --- /dev/null +++ b/scripts/connector_pages/granola.json @@ -0,0 +1,184 @@ +{ + "description": "Sync Granola meeting notes from the folders you choose, one searchable document per note with its summary and transcript.", + "opening": [ + "Sync Granola meeting notes from the folders you select. Each note is one document with the meeting details, Granola's AI summary and the transcript, each line labelled with its speaker.", + "Granola sharing is not imported, so every synced note is visible to everyone who can query the collection unless you set an access rule. Only notes the API key can see are synced, and only Business and Enterprise plans can create a key. Notes deleted in Granola stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "An access rule set on a folder applies to the notes that folder's sync returned. A note in several selected folders follows the rule of the first selected folder that returned it." + ] + }, + "connect": { + "auth": "Granola uses an API key. Only Business and Enterprise plans can create one.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "A Granola API key." + } + ], + "credentials_note": "What the key can see decides which notes are synced. A key scoped to workspace or public notes sees more than a personal-only key.", + "steps": [ + { + "title": "Create an API key", + "text": "In the Granola desktop app, open Settings, Connectors, API keys and create a key." + }, + { + "title": "Create the connector", + "text": "Paste the key as `api_key`." + }, + { + "title": "Select folders", + "text": "HydraDB lists the workspace's folders. Select the folders whose notes you want to sync." + } + ], + "account": "One connector reads the notes its API key can see in one Granola workspace." + }, + "sync": { + "first_sync": "Reads notes edited within the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the notes edited since the last sync, with their transcripts.", + "edits": "An edited note is read again and replaces its document. After an edit, the note can be synced without its transcript text if Granola still holds transcript lines from the note's previous version.", + "deletes": "Notes deleted in Granola stay searchable in HydraDB." + }, + "documents": [ + { + "name": "Notes", + "kind": "custom", + "one_document": "One Granola note with its transcript.", + "title": "The note title, or `Granola note ` when it has none.", + "text": "The title, then a `Meeting` line when the calendar event's title differs from the note title, a `When` line, an `Owner` line, an `Attendees` line and a `Folders` line. Then Granola's summary under `Summary`, and the transcript under `Transcript`, one speaker-labelled line per segment, in order. Transcript lines from an older version of the note are left out. The title is searchable too.", + "date": "When the note was last edited, else when it was created.", + "link_back": "The note in Granola's web app.", + "files": "None.", + "attributes": [ + { + "name": "summary", + "uses": [ + "Searchable text" + ], + "text": "Granola's AI summary, written under `Summary`. A query can match it without matching the transcript." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name or email, written as the `Owner` line. The owner is not attached to the note as a person in the graph." + }, + { + "name": "attendees", + "uses": [ + "Searchable text" + ], + "text": "Each attendee's name, or email when there is no name, written as the `Attendees` line. An attendee's email is kept even when the name is shown." + }, + { + "name": "folders", + "uses": [ + "Searchable text" + ], + "text": "The names of the folders the note is in, written as the `Folders` line, so a query can name a folder in plain words." + }, + { + "name": "event_title", + "uses": [ + "Searchable text" + ], + "text": "The linked calendar event's title, written as the `Meeting` line when it differs from the note title." + }, + { + "name": "scheduled_at", + "uses": [ + "Searchable text" + ], + "text": "The linked calendar event's start, written as the `When` line. It does not set the result date." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the note was last edited. Sets the result date and decides which notes each sync reads. Written as the `When` line when the note has no scheduled start." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the note was created. Sets the result date only when there is no edit time. Written as the `When` line only when there is neither a scheduled start nor an edit time." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The id of the note's first folder. Limits a query to notes whose first folder is that folder. A note in several folders matches only its first. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `folder`. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's notes. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `granola`. Not searchable." + }, + { + "name": "Folder", + "uses": [ + "Access rule" + ], + "text": "The first selected folder whose sync returned the note. An access rule you set on that folder applies to the note. It can differ from the folder in `additional_metadata.container_id`. Not searchable." + }, + { + "name": "organiser", + "uses": [ + "Stored only" + ], + "text": "The linked calendar event's organizer email. It is not part of the searchable text and is not attached to the note as a person." + }, + { + "name": "has_transcript", + "uses": [ + "Stored only" + ], + "text": "Whether the transcript made it into the note's text." + } + ] + } + ], + "example_searches": [ + "What did we decide in Monday's roadmap meeting?", + "What did the customer say in the Acme intro call?", + "Summarize my notes in the Hiring folder from last week." + ], + "graph": { + "connections": "No links between notes or to other tools.", + "people": "The connector does not attach the owner, attendees or speakers to a note as people. Their names are part of the note text.", + "from_text": "The whole note: meeting details, summary and transcript." + }, + "not_synced": [ + "Folders you did not select, and notes the API key cannot see.", + "Granola note sharing and permissions.", + "Folders as documents of their own, audio, and transcript lines as documents of their own.", + "The original Markdown summary, the linked calendar event's id, its invite list and its scheduled end time.", + "Deletions: notes deleted in Granola stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/greenhouse.json b/scripts/connector_pages/greenhouse.json new file mode 100644 index 00000000..33738f95 --- /dev/null +++ b/scripts/connector_pages/greenhouse.json @@ -0,0 +1,496 @@ +{ + "description": "Sync candidates, applications, jobs, scheduled interviews and offers from Greenhouse. Applications link to their candidate and jobs, and interviews and offers link to their application.", + "opening": [ + "Sync candidates, applications, jobs, scheduled interviews and offers from one Greenhouse account. Each record is one document. Applications link to their candidate and to each job applied for. Interviews and offers link to their application.", + "Greenhouse permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Private candidates and confidential jobs are not restricted. Selecting jobs limits only jobs and applications: candidates, interviews and offers sync for the whole account. Changes to an offer after it is created may not be picked up, and records deleted in Greenhouse stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "Greenhouse's private flag on candidates and confidential flag on jobs are stored but do not restrict who can read them.", + "An access rule on a job does not cover candidates, interviews or offers, which sync for the whole account." + ] + }, + "connect": { + "auth": "Greenhouse uses a Harvest API key.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "A Greenhouse Harvest API key." + } + ], + "steps": [ + { + "title": "Get a Harvest API key", + "text": "Get a Harvest API key for your Greenhouse account." + }, + { + "title": "Create the connector", + "text": "Paste the key as `api_key`." + }, + { + "title": "Select jobs", + "text": "HydraDB lists your jobs. Select the jobs to sync. Jobs and applications are limited to the jobs you select. Candidates, interviews and offers sync for the whole account whatever you select." + } + ], + "account": "One connector reads one Greenhouse account." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Candidates and interviews are picked up when they are updated, applications when they have new activity, and selected jobs when they are updated. Offers are picked up when they are created.", + "edits": "An edited candidate, application, job or interview replaces its document. Changes to an older offer may not be picked up, so its status can be out of date.", + "deletes": "Records deleted in Greenhouse stay searchable in HydraDB.", + "notes": [ + "A new version of an offer keeps the same offer id, so it replaces the earlier version's document. Earlier versions are not kept." + ] + }, + "shared_attributes": [ + { + "name": "Greenhouse id", + "uses": [ + "Searchable text" + ], + "text": "The record's Greenhouse id, written into the text as its key." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `greenhouse`. Not searchable." + } + ], + "documents": [ + { + "name": "Candidates", + "kind": "ticket", + "one_document": "One candidate.", + "title": "The candidate's first and last name. Otherwise `Greenhouse candidate` and its id.", + "text": "The name, then `Company`, `Title`, `Tags` and `Emails` lines, and each past employment and education. The creation time is part of the text. The title is searchable too.", + "date": "When the candidate was last updated, or created when there is no update time.", + "link_back": "None.", + "files": "Resumes and other candidate attachments are not synced.", + "attributes": [ + { + "name": "first_name, last_name", + "uses": [ + "Searchable text" + ], + "text": "The candidate's name, in the title and the text." + }, + { + "name": "company, job_title", + "uses": [ + "Searchable text" + ], + "text": "The candidate's current employer and job title." + }, + { + "name": "tags", + "uses": [ + "Searchable text" + ], + "text": "The candidate's tags." + }, + { + "name": "Emails", + "uses": [ + "Searchable text" + ], + "text": "The candidate's email addresses, in the text only. They are not kept as a separate field." + }, + { + "name": "employments", + "uses": [ + "Searchable text" + ], + "text": "Each past employer and job title. Employment dates are stored but not searchable." + }, + { + "name": "educations", + "uses": [ + "Searchable text" + ], + "text": "Each school, degree and discipline. Education dates are stored but not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the candidate was created. It is the result date only when there is no update time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the candidate was last updated. Not searchable." + }, + { + "name": "additional_metadata.greenhouse_candidate_id", + "uses": [ + "Query filter" + ], + "text": "The Greenhouse candidate id. Finds one candidate. Not searchable." + }, + { + "name": "is_private", + "uses": [ + "Stored only" + ], + "text": "Greenhouse's private flag. It does not restrict who can read the candidate." + }, + { + "name": "application_ids", + "uses": [ + "Stored only" + ], + "text": "The ids of the candidate's applications. The links to applications come from the application documents." + }, + { + "name": "last_activity_at", + "uses": [ + "Stored only" + ], + "text": "When the candidate last had activity." + } + ] + }, + { + "name": "Applications", + "kind": "ticket", + "one_document": "One application, for a job you selected.", + "title": "`Application:` and the names of the jobs applied for. Otherwise `Greenhouse application` and its id.", + "text": "The title, then `Status`, `Jobs` and `Rejection reason` lines, then each application question with its answer. The title is searchable too.", + "date": "When the application last had activity, or when it was submitted.", + "link_back": "None.", + "attributes": [ + { + "name": "candidate_id", + "uses": [ + "Graph connection" + ], + "text": "Links the application to its candidate. Not searchable." + }, + { + "name": "job_ids", + "uses": [ + "Graph connection" + ], + "text": "Links the application to each job applied for. Not searchable." + }, + { + "name": "job_names", + "uses": [ + "Searchable text" + ], + "text": "The names of the jobs applied for, in the title and the `Jobs` line." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The application status, in the `Status` line." + }, + { + "name": "Rejection reason", + "uses": [ + "Searchable text" + ], + "text": "Any rejection reason, by name. It is in the text only, not kept as a separate field." + }, + { + "name": "Answers", + "uses": [ + "Searchable text" + ], + "text": "Each application question with a non-empty answer. Answers are in the text only, not kept as separate fields." + }, + { + "name": "last_activity_at", + "uses": [ + "Result date" + ], + "text": "When the application last had activity. Not searchable." + }, + { + "name": "applied_at", + "uses": [ + "Result date" + ], + "text": "When the candidate applied. It is the result date only when there is no activity time. Not searchable." + }, + { + "name": "additional_metadata.greenhouse_application_id", + "uses": [ + "Query filter" + ], + "text": "The Greenhouse application id. Finds one application. Not searchable." + }, + { + "name": "rejected_at", + "uses": [ + "Stored only" + ], + "text": "When the application was rejected." + } + ] + }, + { + "name": "Jobs", + "kind": "ticket", + "one_document": "One job you selected.", + "title": "The job name. Otherwise `Greenhouse job` and its id.", + "text": "The name, then `Requisition`, `Status`, `Departments` and `Offices` lines. The creation time is part of the text. The title is searchable too.", + "date": "When the job was opened, or created when there is no open time.", + "link_back": "None.", + "attributes": [ + { + "name": "name", + "uses": [ + "Searchable text" + ], + "text": "The job name, in the title and the text." + }, + { + "name": "requisition_id", + "uses": [ + "Searchable text" + ], + "text": "The requisition reference, in the `Requisition` line." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The job status, in the `Status` line." + }, + { + "name": "departments, offices", + "uses": [ + "Searchable text" + ], + "text": "Department and office names. Office locations are not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the job was created. It is the result date only when there is no open time." + }, + { + "name": "opened_at", + "uses": [ + "Result date" + ], + "text": "When the job was opened. Not searchable." + }, + { + "name": "additional_metadata.greenhouse_job_id", + "uses": [ + "Query filter" + ], + "text": "The Greenhouse job id. Finds one job. Not searchable." + }, + { + "name": "confidential", + "uses": [ + "Stored only" + ], + "text": "Greenhouse's confidential flag. It does not restrict who can read the job." + }, + { + "name": "closed_at", + "uses": [ + "Stored only" + ], + "text": "When the job was closed." + } + ] + }, + { + "name": "Interviews", + "kind": "ticket", + "one_document": "One scheduled interview.", + "title": "`Interview with` and the interviewers' names. Otherwise `Greenhouse interview` and its id.", + "text": "The title, then `Status`, `Start`, `End`, `Location`, `Video conferencing`, `Interviewers` and `Organizer` lines. The creation time is part of the text. The title is searchable too.", + "date": "When the interview was last updated. Otherwise its start time, then its creation time.", + "link_back": "None.", + "attributes": [ + { + "name": "application_id", + "uses": [ + "Graph connection" + ], + "text": "Links the interview to its application. Not searchable." + }, + { + "name": "interviewers", + "uses": [ + "Searchable text" + ], + "text": "Each interviewer's name and email. Names are also in the title. Interviewers are not attached to the interview as people in the graph." + }, + { + "name": "Organizer", + "uses": [ + "Searchable text" + ], + "text": "The organizer's name and email, in the text only." + }, + { + "name": "start", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the interview starts. It is the result date only when there is no update time." + }, + { + "name": "end", + "uses": [ + "Searchable text" + ], + "text": "When the interview ends." + }, + { + "name": "location, video_conferencing_url", + "uses": [ + "Searchable text" + ], + "text": "The interview location and video conferencing link. The link is not a link back to Greenhouse." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The interview status, in the `Status` line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the interview was created. It is the result date only when there is no update or start time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the interview was last updated. Not searchable." + }, + { + "name": "additional_metadata.greenhouse_interview_id", + "uses": [ + "Query filter" + ], + "text": "The Greenhouse interview id. Finds one interview. Not searchable." + }, + { + "name": "Interviewer responses", + "uses": [ + "Stored only" + ], + "text": "Each interviewer's response status." + } + ] + }, + { + "name": "Offers", + "kind": "ticket", + "one_document": "One offer. A new version with the same offer id replaces it.", + "title": "`Greenhouse offer` and its id.", + "text": "`Status`, `Version`, `Sent`, `Resolved` and `Starts` lines. The creation time is part of the text. The title is searchable too.", + "date": "When the offer was last updated, or created when there is no update time.", + "link_back": "None.", + "attributes": [ + { + "name": "application_id", + "uses": [ + "Graph connection" + ], + "text": "Links the offer to its application. Not searchable." + }, + { + "name": "status, version", + "uses": [ + "Searchable text" + ], + "text": "The offer status and version, as recorded when the offer was last read." + }, + { + "name": "sent_at, resolved_at, starts_at", + "uses": [ + "Searchable text" + ], + "text": "When the offer was sent and resolved, and the proposed start date." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the offer was created. It decides when the offer is synced, and it is the result date only when there is no update time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the offer was last updated, as of the last time it was read. A later update does not cause it to be read again. Not searchable." + }, + { + "name": "additional_metadata.greenhouse_offer_id", + "uses": [ + "Query filter" + ], + "text": "The Greenhouse offer id. Finds one offer. Not searchable." + } + ] + } + ], + "example_searches": [ + "Which applications for the backend engineer job are active?", + "Which interviewers and times were recorded for this application?", + "Which offers were accepted, and what start dates do they show?" + ], + "graph": { + "connections": [ + "An application to its candidate.", + "An application to each job applied for.", + "An interview to its application.", + "An offer to its application.", + "No links to other tools." + ], + "people": "Interviewers and organizers are not attached to an interview as people. Their names and emails are in the text only.", + "from_text": "Candidate profiles, application answers, job details, interview details with interviewer and organizer names, and offer terms." + }, + "not_synced": [ + "Jobs you did not select, and applications for them.", + "EEOC self-identification records.", + "Scorecards, interview feedback, candidate notes and activity feed entries.", + "Resumes, photos and other files.", + "Candidate phone numbers, addresses, websites and social links.", + "Earlier versions of an offer.", + "Deletions: records deleted in Greenhouse stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/guru.json b/scripts/connector_pages/guru.json new file mode 100644 index 00000000..c0c81c61 --- /dev/null +++ b/scripts/connector_pages/guru.json @@ -0,0 +1,394 @@ +{ + "description": "Sync cards and their comments from the Guru collections you choose. With Enforce ACL on, the Guru groups that can open a collection decide who can find its cards.", + "opening": [ + "Sync the cards in the Guru collections you select. Each card is one document with its text, collection, verification state and owner. Each comment and each reply is its own document, linked to its card or thread. Attached files can be downloaded and their text added to the card.", + "The Guru groups that can open a collection restrict search when Enforce ACL is on. Private cards are skipped unless you turn on `include_private_cards`. Tags, folders and verifiers are kept but are not searchable. Cards and comments deleted in Guru stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "A card can be read by the members of the Guru groups that can open its collection. A collection open to All Members or All Organization Members can be read by everyone who can query the collection. A private card, synced only when `include_private_cards` is on, can be read by its owner and its collaborators. A comment follows its card.", + "identity": "A member's email address. Guru groups are turned into their active members' email addresses.", + "when_unreadable": "If HydraDB cannot read a collection's group access, or a private card's owner and collaborators, the connector reports a permission warning.", + "notes": [ + "Reading a collection's group access needs the user token of a Guru Admin or of the collection's owner. A collection token cannot read it.", + "Guru Admins are not added to a collection's readers.", + "A group or audience too large to read in full counts as unreadable." + ] + }, + "connect": { + "auth": "Guru uses an API token, paired with either your Guru username for a user token, or a collection id for a collection token. Set exactly one of `email` and `collection_id`. The token reads as the user who generated it.", + "credentials": [ + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "A Guru user token." + }, + { + "name": "email", + "type": "string", + "text": "Your Guru username, usually your email." + } + ], + "alternatives": [ + { + "title": "Collection token", + "credentials": [ + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "A Guru collection token. It is read-only and covers one collection, and it cannot read who can open the collection." + }, + { + "name": "collection_id", + "type": "string", + "text": "The id of the token's collection." + } + ] + } + ], + "settings": [ + { + "name": "include_private_cards", + "type": "boolean", + "text": "Set to `true` to also sync private cards, each readable only by its owner and collaborators. Off by default." + } + ], + "permissions_label": "What the Guru user needs", + "permissions": [ + { + "name": "Read access to each collection", + "text": "required. Cards in collections the user cannot open are never synced." + }, + { + "name": "Manage Apps & Integrations", + "text": "required to generate the token. An Admin can generate it on behalf of the syncing user." + }, + { + "name": "Admin or Collection Owner", + "text": "optional, for search that follows Guru permissions. Reads which groups can open each collection." + } + ], + "steps": [ + { + "title": "Generate a token", + "text": "In Guru, open Manage, Apps & Integrations, API Access and generate a user token, or a collection token for a single collection. For search that follows Guru permissions, use the user token of a Guru Admin or of each collection's owner." + }, + { + "title": "Create the connector", + "text": "Paste the token as `api_token`. For a user token, add your Guru username as `email`. For a collection token, add the collection id as `collection_id`. To sync private cards, set `include_private_cards` to `true`." + }, + { + "title": "Select collections", + "text": "HydraDB lists the collections the token can read. Select the collections to sync. To reach cards older than 30 days, raise `lookback_days` when you select them." + } + ], + "account": "One connector reads what one Guru user, or one collection token, can open." + }, + "sync": { + "first_sync": "Each selected collection reads back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the cards that were edited, verified or commented on since the last sync. Each card's comments are sent again as their own documents.", + "edits": "An edited card is read again and replaces its document.", + "deletes": "Deleted cards are not removed. A card, comment or reply deleted in Guru stays searchable in HydraDB.", + "notes": [ + "If Guru refuses a card's comment list, a change to its comments only can be missed until the card changes again." + ] + }, + "shared_attributes": [ + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the card or comment was last modified, written as the `Updated` line. A card's result date is the later of this and its last verification. A comment's is the later of this and its creation time." + }, + { + "name": "additional_metadata.guru_card_id", + "uses": [ + "Query filter" + ], + "text": "The card id. On a card, picks out that card. On a comment, the card it is on, so one key finds a card and its comments. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The collection id. Limits a query to one collection's cards and comments. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The collection name. Limits a query to one collection by name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `collection`. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's cards and comments. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `guru`. Not searchable." + }, + { + "name": "Collection access", + "uses": [ + "Access rule" + ], + "text": "The Guru groups that can open the card's collection. For a private card, its owner and collaborators instead. A comment uses its card's. Decides who can read the item when Enforce ACL is on. Not searchable." + }, + { + "name": "acl_warning", + "uses": [ + "Stored only" + ], + "text": "Set when a private card's owner and collaborators could not be read. Explains the missing permissions." + } + ], + "documents": [ + { + "name": "Cards", + "kind": "knowledge_base", + "one_document": "One Guru card.", + "title": "The card title. A card with no title is titled `Guru card` and its id.", + "text": "The card content with HTML removed. Plain text and Markdown pass through. If the content has no readable text, the title stands in. The title, author and last-modified time are searchable too.", + "date": "The later of when the card was last modified and when it was last verified, so a re-verified card counts as recent.", + "link_back": "Opens the card in Guru.", + "files": "Attached files can be downloaded and their text added to the card. A file over 25 MiB, of an unsupported type, or that fails to download keeps only its name.", + "attributes": [ + { + "name": "created_by", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The card owner's display name, written as the `Author` line. The graph records the card as written by its owner." + }, + { + "name": "owner", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The card owner's name or email, the same person as `created_by`." + }, + { + "name": "created_by_email", + "uses": [ + "Graph identity" + ], + "text": "The owner's email. Gives the author an email in the graph, so the same person is recognised across tools. Not searchable." + }, + { + "name": "last_verified", + "uses": [ + "Result date" + ], + "text": "When the card was last verified. When it is later than the last edit, it sets the result date. Not searchable." + }, + { + "name": "additional_metadata.verification_state", + "uses": [ + "Query filter" + ], + "text": "The card's trust status, such as `TRUSTED` or `STALE`. Limits a query to trusted cards, or finds stale ones. Not searchable." + }, + { + "name": "share_status", + "uses": [ + "Access rule" + ], + "text": "`TEAM`, `PRIVATE` or `PUBLIC`. Private cards are skipped, or with `include_private_cards` on, readable only by their owner and collaborators. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Stored only" + ], + "text": "When the card was created." + }, + { + "name": "verification_reason", + "uses": [ + "Stored only" + ], + "text": "Guru's reason for the verification state, when there is one." + }, + { + "name": "verification_interval", + "uses": [ + "Stored only" + ], + "text": "How many days pass between required verifications." + }, + { + "name": "verifiers", + "uses": [ + "Stored only" + ], + "text": "The people and groups responsible for verifying the card. Not attached as people in the graph." + }, + { + "name": "verifier_emails", + "uses": [ + "Stored only" + ], + "text": "The verifiers' emails. They do not decide who can read the card." + }, + { + "name": "last_verified_by", + "uses": [ + "Stored only" + ], + "text": "The name of whoever last verified the card." + }, + { + "name": "last_verified_by_email", + "uses": [ + "Stored only" + ], + "text": "That verifier's email." + }, + { + "name": "last_modified_by", + "uses": [ + "Stored only" + ], + "text": "The last editor's name or email. Not attached as a person in the graph." + }, + { + "name": "updated_by", + "uses": [ + "Stored only" + ], + "text": "The last editor's display name." + }, + { + "name": "updated_by_email", + "uses": [ + "Stored only" + ], + "text": "The last editor's email." + }, + { + "name": "tags", + "uses": [ + "Stored only" + ], + "text": "The card's tag names. A query cannot match or filter on them." + }, + { + "name": "folders", + "uses": [ + "Stored only" + ], + "text": "The names of the folders the card is in. A query cannot match or filter on them." + }, + { + "name": "comment_count", + "uses": [ + "Stored only" + ], + "text": "How many comments Guru reports for the card." + }, + { + "name": "attachments", + "uses": [ + "Stored only" + ], + "text": "The file names of the card's attachments." + } + ] + }, + { + "name": "Comments", + "kind": "comment", + "one_document": "One comment that starts a thread on a card, or one reply in a thread. Empty comments are skipped, except a thread opener whose replies have text.", + "title": "`Comment by` the author's name `on` the card title, or `Comment on` the card title.", + "text": "The comment text with markup removed, with `Author`, `Parent`, `Created` and `Updated` lines.", + "date": "The later of when the comment was created and last modified.", + "link_back": "Opens the card the comment is on.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The comment author as name and email, written as the `Author` line. The graph records the comment as written by that person." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The card for a thread opener, or the thread for a reply, written as the `Parent` line. Links the comment to it." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the comment was created, written as the `Created` line." + }, + { + "name": "additional_metadata.guru_comment_id", + "uses": [ + "Query filter" + ], + "text": "The comment id. Picks out one comment. Not searchable." + }, + { + "name": "properties", + "uses": [ + "Stored only" + ], + "text": "The comment's status." + } + ] + } + ], + "example_searches": [ + "What does our Guru card say about the refund policy for annual plans?", + "Which trusted cards in the Sales collection cover competitor pricing?", + "What did people comment on the onboarding checklist card?" + ], + "graph": { + "connections": [ + "A comment that starts a thread to its card.", + "A reply to its thread.", + "No links to items in other tools." + ], + "people": [ + "The owner of each card, with name and email.", + "The author of each comment and reply.", + "Verifiers and editors are kept with the card but not attached as people." + ], + "from_text": "The card text, the text read from attached files, and the comment text." + }, + "not_synced": [ + "Collections you did not select.", + "Cards not edited, verified or commented on within the `lookback_days` window on the first sync.", + "Private cards, unless `include_private_cards` is on.", + "Collections the token's user cannot open.", + "Deletions: deleted cards, comments and replies stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/helpscout.json b/scripts/connector_pages/helpscout.json new file mode 100644 index 00000000..065154d6 --- /dev/null +++ b/scripts/connector_pages/helpscout.json @@ -0,0 +1,252 @@ +{ + "description": "Sync conversations, and every message, reply and internal note in them, from the Help Scout mailboxes you choose. Help Scout permissions are not imported.", + "opening": [ + "Sync conversations from the Help Scout mailboxes you select. Each conversation is one document with its preview, customer, assignee, mailbox and tags. Each customer message, agent reply and internal note is its own document, linked to its conversation. The full text lives in those message documents, not in the conversation.", + "Help Scout permissions are not imported, so every synced conversation and message, including internal notes, is visible to everyone who can query the collection unless you set an access rule. Conversations deleted in Help Scout stay in HydraDB. Help Scout Docs and attachments are not synced." + ], + "permissions": { + "carried": false, + "notes": [ + "Internal notes are synced with every other message. Help Scout's own audience for a note is not imported. Set an access rule on a mailbox whose notes must stay private." + ] + }, + "connect": { + "auth": "Help Scout uses the App ID and App Secret of a Help Scout app. HydraDB gets a fresh access token from them on every sync, so there is no refresh token to manage.", + "credentials": [ + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The App ID of a Help Scout app owned by the account you connect." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The App Secret of that app." + } + ], + "steps": [ + { + "title": "Create a Help Scout app", + "text": "In the Help Scout account you want to connect, create an app and copy its App ID and App Secret." + }, + { + "title": "Create the connector", + "text": "Paste the App ID as `client_id` and the App Secret as `client_secret`." + }, + { + "title": "Select mailboxes", + "text": "HydraDB lists the account's mailboxes. Select the ones to sync. Only conversations in selected mailboxes are synced." + } + ], + "account": "One connector reads one Help Scout account. An app belongs to one account, so each account needs its own app." + }, + "sync": { + "first_sync": "Each selected mailbox reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads conversations that changed since the last sync. A conversation counts as changed when a user updated it or the customer started waiting on it. Every message in a changed conversation is read again.", + "edits": "A changed conversation is read again with all its messages, and updates their documents.", + "deletes": "Deleted conversations and messages are not removed. They stay searchable in HydraDB.", + "notes": [ + "A connector created before mailboxes could be selected syncs the whole account." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.helpscout_id", + "uses": [ + "Query filter" + ], + "text": "The conversation id on a conversation, the thread id on a message. Targets one item, and keeps later syncs on the same document. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `helpscout`. Not searchable." + } + ], + "documents": [ + { + "name": "Conversations", + "kind": "ticket", + "one_document": "One conversation.", + "title": "The conversation subject.", + "text": "The conversation preview, or the subject when the preview is empty. Then `Customer`, `Assignee`, `Mailbox` and `Tags` lines. The status and creation time are part of the text too. The subject is searchable too. The preview is short, so search the messages for the full text.", + "date": "When the conversation was last updated, else when it was created.", + "link_back": "The conversation in Help Scout.", + "attributes": [ + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The conversation status: active, pending, closed or spam, written as a `Status` line." + }, + { + "name": "customer", + "uses": [ + "Searchable text" + ], + "text": "The primary customer's name or email, written as the `Customer` line, where HydraDB can identify the person." + }, + { + "name": "assignee", + "uses": [ + "Searchable text" + ], + "text": "The assigned user's name or email, written as the `Assignee` line, where HydraDB can identify the person." + }, + { + "name": "mailbox", + "uses": [ + "Searchable text" + ], + "text": "The mailbox name, written as the `Mailbox` line, where HydraDB can identify the mailbox. It does not create a link to a mailbox." + }, + { + "name": "tags", + "uses": [ + "Searchable text" + ], + "text": "The tag names, written as the `Tags` line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the conversation was created, written as a `Created` line. Used as the result date only when there is no update time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the conversation was last updated. Not searchable." + }, + { + "name": "state", + "uses": [ + "Stored only" + ], + "text": "Published, draft or deleted." + }, + { + "name": "number", + "uses": [ + "Stored only" + ], + "text": "The conversation number Help Scout shows. It is part of the link back." + }, + { + "name": "mailbox_id", + "uses": [ + "Stored only" + ], + "text": "The mailbox id. The mailbox name is in `mailbox`." + } + ] + }, + { + "name": "Messages", + "kind": "comment", + "one_document": "One customer message, agent reply or internal note that has a body. Status-only entries are skipped.", + "title": "`Comment by` and the author's name. Without an author, the first 80 characters of the text.", + "text": "An `Author` line, then the message body converted from HTML to text. The creation time is part of the text too.", + "date": "When the message was created.", + "link_back": "None. Open the conversation from its own document.", + "files": "Attachments are not synced.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The name or email of whoever wrote the message, else the customer, written as the `Author` line. The graph records the message as written by that person." + }, + { + "name": "mentions", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Names @mentioned in an internal note. The names stay in the note text, and the graph records each as mentioned." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The conversation the message belongs to. Links the message to its conversation, so the whole exchange can be returned together." + }, + { + "name": "additional_metadata.helpscout_conversation_id", + "uses": [ + "Query filter" + ], + "text": "The id of the conversation the message belongs to. Returns every message in one conversation. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the message was created, written as a `Created` line." + }, + { + "name": "type", + "uses": [ + "Stored only" + ], + "text": "`customer`, `message` or `note`, so you can tell a customer message from an internal note." + }, + { + "name": "status", + "uses": [ + "Stored only" + ], + "text": "The message's status in Help Scout." + } + ] + } + ], + "example_searches": [ + "What did the customer say in the latest conversation about a refund?", + "Which open conversations are assigned to Maria?", + "Which conversations mention refunds in the billing mailbox?" + ], + "graph": { + "connections": [ + "A message to its conversation.", + "No links to other tools." + ], + "people": [ + "The author of each message.", + "Names @mentioned in an internal note.", + "The customer, the assignee and the mailbox appear in the conversation text, where HydraDB can identify them." + ], + "from_text": "The conversation preview with its customer, assignee, mailbox and tag lines, and the body of every message." + }, + "not_synced": [ + "Mailboxes you did not select.", + "Help Scout Docs, the knowledge base, which uses a separate API and key.", + "Customer profiles and happiness ratings.", + "Users, teams, workflows, saved replies and mailbox folders, as documents of their own.", + "Conversation custom field values.", + "Attachments.", + "Deletions: deleted conversations and messages stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/hubspot.json b/scripts/connector_pages/hubspot.json new file mode 100644 index 00000000..176bce9e --- /dev/null +++ b/scripts/connector_pages/hubspot.json @@ -0,0 +1,527 @@ +{ + "description": "Sync HubSpot CRM records and logged activities. Owner and team restrictions carry over for deals, contacts and companies, not tickets.", + "opening": [ + "Sync the HubSpot CRM object types you select: deals, tickets, contacts and companies, and the notes, emails, calls, meetings and tasks logged on them. Each record or activity is one document.", + "An activity links to one associated deal, contact or company only when everyone who can read the activity can also read that record. Owner and team restrictions can be captured for deals, contacts and companies, but not tickets. Search applies captured restrictions only with Enforce ACL enabled.", + "Custom CRM properties and files attached to activities are not synced. Deleted and archived records stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "Each deal, contact and company carries HubSpot's owners and the teams that can access it, including parent teams. Its readers are the owners, every member of those teams, every super admin, and the members of the roles you list in `full_visibility_roles`. An activity can be read by everyone who can read any record it is logged on. An activity logged on nothing uses its own owner and teams.", + "identity": "A HubSpot user's or owner's email address.", + "when_unreadable": "If a record names owners or teams but their readers cannot be worked out, the record gets an access warning, which you can find with `additional_metadata.rbac_warning`. A warning does not by itself mean the record is public.", + "notes": [ + "Tickets do not carry HubSpot's owner and team access lists, so owners and teams do not restrict them. Set an access rule on the tickets resource if tickets must be private.", + "If a record carries no owner or team access information, HydraDB does not restrict it based on the owner it shows, and does not raise a warning. An access rule you set on its resource still applies.", + "Queues and archived owners give access to no one.", + "If an activity's parent record is not synced, the activity can be readable by everyone. Sync the deals, contacts and companies your activities are logged on.", + "If HydraDB cannot read which records an activity is logged on, those activities are not synced until a later sync can read them.", + "This is HydraDB's reading of HubSpot owners, teams and roles. It is not a guarantee that HydraDB matches HubSpot's visibility in every case." + ] + }, + "connect": { + "auth": "HubSpot uses an access token from a private app, or an OAuth access token.", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "required": true, + "text": "A HubSpot private-app or OAuth access token. HydraDB does not refresh it, so a short-lived token must be replaced when it expires." + } + ], + "permissions_label": "Scopes for the app, all required", + "permissions": [ + { + "name": "crm.objects.contacts.read", + "text": "contacts." + }, + { + "name": "crm.objects.companies.read", + "text": "companies." + }, + { + "name": "crm.objects.deals.read", + "text": "deals." + }, + { + "name": "tickets", + "text": "tickets." + }, + { + "name": "crm.objects.notes.read", + "text": "notes." + }, + { + "name": "crm.objects.calls.read", + "text": "calls." + }, + { + "name": "crm.objects.emails.read", + "text": "logged emails." + }, + { + "name": "sales-email-read", + "text": "email bodies. Without it, emails sync with their subject only." + }, + { + "name": "crm.objects.meetings.read", + "text": "meetings." + }, + { + "name": "crm.objects.tasks.read", + "text": "tasks." + }, + { + "name": "crm.objects.owners.read", + "text": "record owners, used to work out who can read a record." + }, + { + "name": "settings.users.read", + "text": "users, their teams and super-admin status, used for permissions." + }, + { + "name": "settings.users.teams.read", + "text": "teams, used for permissions." + } + ], + "steps": [ + { + "title": "Create a private app", + "text": "In HubSpot, create a private app or an OAuth app that requests every scope above, and copy its access token." + }, + { + "title": "Create the connector", + "text": "Paste the token as `access_token`." + }, + { + "title": "Select object types", + "text": "HydraDB lists the CRM object types the token can read. Select the ones to sync. Notes, emails, calls, meetings and tasks are offered only when the token can also read contacts, companies, deals and tickets." + }, + { + "title": "Name the roles that see everything", + "text": "When you configure the connector, list in `full_visibility_roles` the names of HubSpot roles whose members can see every record. HubSpot does not report what a role can see, so a member of such a role is otherwise not given access. Leaving the setting out keeps the current list. An empty list clears it." + } + ], + "account": "One connector reads the object types one access token can read." + }, + "sync": { + "first_sync": "Each selected object type reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads records modified since the last sync, and reads owners, users and teams again in full.", + "edits": "An edited record is read again and replaces its document. A change to users or teams can also update who can read records already in HydraDB. A large change can take several syncs, so do not rely on a membership change to remove access right away.", + "deletes": "Deleted and archived HubSpot records are not removed. They stay in HydraDB.", + "notes": [ + "If the token lacks the scope for one object type, that type can be skipped while the others sync.", + "A connector set up before object types could be selected keeps syncing all of them until you configure it again." + ] + }, + "shared_attributes": [ + { + "name": "updated_at", + "uses": [ + "Result date", + "Searchable text" + ], + "text": "The record's modification time. Used for ranking by date when no activity time is available. Searchable on notes and emails. Not searchable on other record types." + }, + { + "name": "created_at", + "uses": [ + "Result date", + "Searchable text" + ], + "text": "The record's creation time. Used for ranking by date only when activity and modification times are missing. Searchable on deals, tickets, notes, emails and calls. Not searchable on contacts, companies, meetings and tasks." + }, + { + "name": "object_type", + "uses": [ + "Searchable text" + ], + "text": "The source object type. Searchable in email details. On other record types it is stored and not searchable. Filter by `additional_metadata.hubspot_object`." + }, + { + "name": "additional_metadata.hubspot_id", + "uses": [ + "Query filter" + ], + "text": "The HubSpot record id. Targets one record, and keeps later syncs on the same document. Not searchable. No HubSpot link is stored, so use this id to find the record in HubSpot." + }, + { + "name": "additional_metadata.hubspot_object", + "uses": [ + "Query filter" + ], + "text": "The object type, such as `deals` or `notes`. Limits a query to one type. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "Set when there was a problem working out who can read the record, such as readers that could not be resolved or a removed team. A warning does not by itself mean the record is public. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `hubspot`. Not searchable." + }, + { + "name": "acl", + "uses": [ + "Access rule" + ], + "text": "The people who can read the record, worked out as described under Permissions. Not searchable." + } + ], + "documents": [ + { + "name": "Deals", + "kind": "ticket", + "one_document": "One deal.", + "title": "The deal name.", + "text": "The deal description, then `Deal`, `Amount`, `Stage`, `Close date` and `Owner` lines. The deal name is searchable too.", + "date": "When the deal was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "amount", + "uses": [ + "Searchable text" + ], + "text": "Written as the `Amount` line." + }, + { + "name": "close_date", + "uses": [ + "Searchable text" + ], + "text": "Written as the `Close date` line." + }, + { + "name": "stage", + "uses": [ + "Searchable text" + ], + "text": "Written as the `Stage` line, as HubSpot's internal stage id, not its display name." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's email, written as the `Owner` line, where HydraDB can identify the person. It does not create an assignee relationship." + }, + { + "name": "pipeline", + "uses": [ + "Stored only" + ], + "text": "HubSpot's pipeline id. It is not turned into a name." + } + ] + }, + { + "name": "Tickets", + "kind": "ticket", + "one_document": "One ticket.", + "title": "The ticket subject.", + "text": "The ticket content. When the content is empty, the subject with `Priority` and `Stage` lines. The subject is searchable either way.", + "date": "When the ticket was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "When the ticket has no content, written as a `Priority` line." + }, + { + "name": "stage", + "uses": [ + "Searchable text" + ], + "text": "Written as a `Stage` line only when the ticket has no content. Otherwise it is stored and not searchable." + }, + { + "name": "owner", + "uses": [ + "Stored only" + ], + "text": "The owner's email. It is not part of the text, and it does not restrict who can read the ticket." + } + ] + }, + { + "name": "Contacts and companies", + "kind": "custom", + "one_document": "One contact, or one company.", + "title": "A contact's first and last name, else their email. A company's name.", + "text": "For a contact, `Name`, `Email`, `Company`, `Phone` and `Job title` lines. For a company, its description, then `Company`, `Domain` and `Industry` lines. The title is searchable too.", + "date": "When the record was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "email", + "uses": [ + "Searchable text" + ], + "text": "A contact's email, so a query can find the person by email." + }, + { + "name": "company", + "uses": [ + "Searchable text" + ], + "text": "A contact's company name." + }, + { + "name": "job_title", + "uses": [ + "Searchable text" + ], + "text": "A contact's job title." + }, + { + "name": "domain", + "uses": [ + "Searchable text" + ], + "text": "A company's website domain, written as the `Domain` line." + }, + { + "name": "industry", + "uses": [ + "Searchable text" + ], + "text": "A company's industry, written as the `Industry` line." + }, + { + "name": "company_id", + "uses": [ + "Graph connection" + ], + "text": "Links a contact to its company's document. Not searchable." + }, + { + "name": "owner", + "uses": [ + "Stored only" + ], + "text": "The owner's email. It is not part of the text." + } + ] + }, + { + "name": "Notes", + "kind": "comment", + "one_document": "One note.", + "title": "Usually the first 80 characters of the note.", + "text": "The note body, converted from HTML to plain text.", + "date": "When the note was logged as happening, else when it was last modified, else when it was created.", + "link_back": "None.", + "files": "Files attached to the note are not synced.", + "attributes": [ + { + "name": "occurred_at", + "uses": [ + "Result date" + ], + "text": "When the note was logged as happening. Not searchable." + }, + { + "name": "owner", + "uses": [ + "Stored only" + ], + "text": "The owner's email. It is not part of the text." + } + ] + }, + { + "name": "Emails", + "kind": "email", + "one_document": "One logged email.", + "title": "The email subject.", + "text": "The plain-text body, else the HTML body converted to text, else the subject. The email's details, such as its direction, sender, recipient, owner and times, are written into the text as a list of fields. The subject is searchable too.", + "date": "When the email happened, else when it was last modified, else when it was created.", + "link_back": "None.", + "files": "Files attached to the email are not synced.", + "attributes": [ + { + "name": "from", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The sender. Part of the email details, and can be attached to the email in the graph." + }, + { + "name": "to", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The recipient. Part of the email details, and can be attached to the email in the graph." + }, + { + "name": "direction", + "uses": [ + "Searchable text" + ], + "text": "Whether the email was inbound or outbound, written into the details." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's email, written into the details." + }, + { + "name": "occurred_at", + "uses": [ + "Result date", + "Searchable text" + ], + "text": "When the email happened, written into the details." + } + ] + }, + { + "name": "Calls", + "kind": "message", + "one_document": "One logged call.", + "title": "Usually the first 80 characters of the call text, which include the call details.", + "text": "The call notes, converted from HTML, then `Call`, `Direction` and `Owner` lines.", + "date": "When the call happened, else when it was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "direction", + "uses": [ + "Searchable text" + ], + "text": "Written as the `Direction` line, so a query can match inbound or outbound calls." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's email, written as the `Owner` line, where HydraDB can identify the person." + }, + { + "name": "occurred_at", + "uses": [ + "Result date" + ], + "text": "When the call happened. Not searchable." + }, + { + "name": "duration_ms", + "uses": [ + "Stored only" + ], + "text": "The call length in milliseconds. It is not searchable." + } + ] + }, + { + "name": "Meetings and tasks", + "kind": "custom", + "one_document": "One logged meeting, or one task.", + "title": "The meeting title, or the task subject.", + "text": "For a meeting, its notes converted from HTML, then `Meeting`, `Location`, `Start` and `Owner` lines. For a task, its body converted from HTML, then `Task`, `Status`, `Priority` and `Owner` lines. The title is searchable too.", + "date": "When the meeting or task happened, else when it was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "location", + "uses": [ + "Searchable text" + ], + "text": "Where the meeting was held, written as the `Location` line." + }, + { + "name": "start_time", + "uses": [ + "Searchable text" + ], + "text": "When the meeting started, written as the `Start` line. The result date is the activity time instead." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "A task's status, written as the `Status` line." + }, + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "A task's priority, written as the `Priority` line." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's email, written as the `Owner` line, where HydraDB can identify the person." + }, + { + "name": "occurred_at", + "uses": [ + "Result date" + ], + "text": "When the meeting or task happened. Not searchable." + }, + { + "name": "end_time", + "uses": [ + "Stored only" + ], + "text": "When the meeting ended. It is not the result date." + } + ] + } + ], + "example_searches": [ + "What was said on the last call with this contact?", + "Which notes and emails are logged on the Acme deal?", + "What did the customer write in their last email?" + ], + "graph": { + "connections": [ + "A contact to its company.", + "A note, email, call, meeting or task to the deal it is logged on. With no deal, to the contact. With no contact, to the company. When several records of one type are associated, the one with the lowest id is used.", + "An activity is linked to that record only if everyone who can read the activity can also read the record.", + "No links to other tools." + ], + "people": [ + "Deal, call, meeting and task owner emails appear in searchable text, where HydraDB can identify the person.", + "Email senders and recipients can also be attached to email records in the graph.", + "Owners stored only on other record types are not identified from that field.", + "A contact's company name." + ], + "from_text": "Deal descriptions, ticket content, and the text of notes, emails, calls, meetings and tasks." + }, + "not_synced": [ + "Object types you did not select.", + "Email bodies, when the token lacks `sales-email-read`: those emails have their subject only.", + "Products, line items, quotes, forms, marketing emails and other HubSpot objects.", + "Files attached to activities.", + "Custom CRM properties.", + "Deletions and archived records." + ] +} diff --git a/scripts/connector_pages/intercom.json b/scripts/connector_pages/intercom.json new file mode 100644 index 00000000..b70f22af --- /dev/null +++ b/scripts/connector_pages/intercom.json @@ -0,0 +1,426 @@ +{ + "description": "Sync Intercom conversations and their replies, Intercom Tickets and published Help Center articles. Conversation and ticket access carries over from the assigned teammate and team when Enforce ACL is on.", + "opening": [ + "Sync Intercom conversations from the teams you select, or from the whole workspace, with every reply in them. Intercom Tickets and published Help Center articles sync for the whole workspace. Each conversation, ticket and article is one document. Each reply is its own document, linked to its conversation. The conversation document holds only the opening message.", + "A conversation and a ticket can be restricted to the assigned teammate and the members of the assigned team. Search applies this only when Enforce ACL is on. Internal notes are skipped unless you turn them on. File attachments are not synced, apart from text in pasted images." + ], + "permissions": { + "carried": true, + "who_can_read": "A conversation, its replies and a ticket can be read by the assigned teammate and the members of the assigned team. These readers take precedence over the resource's. A team resource can be read by the team's members. The All conversations resource is open to everyone who can query the collection unless you set an access rule on it. An unassigned conversation or ticket, and every article, follows its resource.", + "identity": "A teammate's email address.", + "when_unreadable": "If the readers of a conversation or ticket are incomplete or too many, it gets a permission warning, which you can find with `additional_metadata.rbac_warning`. Internal notes on an unassigned conversation get the warning too.", + "notes": [ + "Intercom does not report which teammates can see all conversations. A teammate who is neither the assignee nor in the assigned team cannot read the conversation in HydraDB, even when Intercom lets them see it.", + "Internal notes are synced only when `include_private_notes` is on." + ] + }, + "connect": { + "auth": "Intercom uses an access token from a private app, or an OAuth access token.", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "required": true, + "text": "An Intercom private-app or OAuth access token. An OAuth token reads only the conversations its teammate can see." + }, + { + "name": "include_private_notes", + "type": "boolean", + "text": "Off by default. Turn it on to also sync internal teammate notes." + } + ], + "permissions_label": "Permissions for the token", + "permissions": [ + { + "name": "Read conversations", + "text": "required." + }, + { + "name": "Read users and companies", + "text": "required." + }, + { + "name": "Read admins", + "text": "required." + }, + { + "name": "Read articles", + "text": "optional. Without it, articles are skipped." + }, + { + "name": "Read tickets", + "text": "optional. Without it, or on a plan without Tickets, tickets are skipped." + } + ], + "steps": [ + { + "title": "Create a token", + "text": "Create the token as a teammate with access to all conversations. If that teammate's access is later reduced, an OAuth token silently reads fewer conversations, so create a new token." + }, + { + "title": "Create the connector", + "text": "Paste the token as `access_token`. Turn on `include_private_notes` to also sync internal notes." + }, + { + "title": "Select teams or All conversations", + "text": "HydraDB lists your teams and an All conversations option. Select teams to sync the conversations assigned to them, or All conversations for every conversation the token can see. All conversations takes precedence over teams. Selecting every team still leaves out unassigned conversations." + } + ], + "account": "One connector reads one Intercom workspace." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads conversations, tickets and articles updated since the last sync. Every reply in a changed conversation is read again.", + "edits": "A changed conversation is read again with all its replies, and updates their documents.", + "deletes": "Conversations, tickets and articles deleted in Intercom stay searchable in HydraDB.", + "notes": [ + "If Intercom refuses access to tickets or articles, they are skipped and the rest still syncs." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "Set on a conversation, reply or ticket when its readers could not be worked out, or on an internal note in an unassigned conversation. A warning does not by itself mean the item is public. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `intercom`. Not searchable." + }, + { + "name": "acl", + "uses": [ + "Access rule" + ], + "text": "The teammates who can read a conversation, reply or ticket, worked out as described under Permissions. Articles have none of their own. Not searchable." + } + ], + "documents": [ + { + "name": "Conversations", + "kind": "ticket", + "one_document": "One conversation, holding its opening message.", + "title": "The conversation title, else the opening message's subject. Otherwise a title with the conversation id.", + "text": "The opening message converted from HTML to text, or the title when it is empty. The status, priority, tags, creation time and conversation id are part of the text too. The title is searchable too. Search the replies for the rest of the conversation.", + "date": "When the conversation was last updated, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "Open, closed or snoozed, written as a `Status` line." + }, + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "`priority` or `not_priority`, written as a `Priority` line." + }, + { + "name": "labels", + "uses": [ + "Searchable text" + ], + "text": "The conversation's tag names, written as a `Labels` line, so a tag name in a query matches." + }, + { + "name": "Conversation id", + "uses": [ + "Searchable text" + ], + "text": "The Intercom conversation id, written into the text as the conversation's key. Keeps later syncs on the same document." + }, + { + "name": "linked_ticket_id", + "uses": [ + "Graph connection" + ], + "text": "Links the conversation to the Intercom Ticket it refers to. Not searchable." + }, + { + "name": "additional_metadata.intercom_open", + "uses": [ + "Query filter" + ], + "text": "True while the conversation is open. Keeps only open conversations. Not searchable." + }, + { + "name": "additional_metadata.intercom_read", + "uses": [ + "Query filter" + ], + "text": "True once the conversation has been read. Finds unread conversations. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the conversation was created, written as a `Created` line. Used as the result date only when there is no update time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the conversation was last updated. Not searchable." + }, + { + "name": "author", + "uses": [ + "Stored only" + ], + "text": "The opening message's author as `Name `. The author is not attached to the conversation as a person." + }, + { + "name": "tag_ids", + "uses": [ + "Stored only" + ], + "text": "The ids of the conversation's tags." + }, + { + "name": "topics, topic_ids", + "uses": [ + "Stored only" + ], + "text": "The conversation's Fin AI topic names and their ids. They are not part of the searchable text." + } + ] + }, + { + "name": "Replies", + "kind": "comment", + "one_document": "One reply, or one internal note when `include_private_notes` is on. Parts that only record a state change, and redacted parts, are skipped.", + "title": "`Comment by` and the author. Without an author, the first 80 characters of the text.", + "text": "The reply converted from HTML to text, with its author, conversation id, and created and updated times. A reply that is only a pasted image is kept, and the text in the image is searchable.", + "date": "When the reply was created.", + "link_back": "None.", + "files": "Text in images pasted into a reply is read and searchable. Other files are not synced.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The teammate or customer who wrote the reply, as `Name `. The graph records the reply as written by that person." + }, + { + "name": "mentions", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Names @mentioned in an internal note. The names stay in the note text, and the graph records each as mentioned." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The conversation the reply belongs to, written into the text as its id. Links the reply to its conversation." + }, + { + "name": "additional_metadata.intercom_conversation_id", + "uses": [ + "Query filter" + ], + "text": "The id of the conversation the reply belongs to. Returns every reply in one conversation. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the reply was created, written as a `Created` line." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text" + ], + "text": "When the reply was last updated, written as an `Updated` line. It is not the result date." + }, + { + "name": "part_type", + "uses": [ + "Stored only" + ], + "text": "Whether the part is a reply, a note or another event with text." + } + ] + }, + { + "name": "Tickets", + "kind": "ticket", + "one_document": "One Intercom Ticket.", + "title": "The ticket subject. Otherwise a title with the ticket id.", + "text": "The ticket description converted from HTML to text, or the subject when it is empty. Then a `Reporter` line. The creation time and the ticket id are part of the text too. The subject is searchable too.", + "date": "When the ticket was last updated, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "reporter", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The ticket's contact, written as the `Reporter` line, so tickets from one customer can be found. The graph records the ticket as reported by that person." + }, + { + "name": "additional_metadata.intercom_ticket_id", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The Intercom ticket id. Written into the text as the ticket's key. Targets one ticket, and keeps later syncs on the same document." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the ticket was created, written as a `Created` line. Used as the result date only when the update time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the ticket was last updated. Not searchable." + }, + { + "name": "state", + "uses": [ + "Stored only" + ], + "text": "Open or closed. It is not part of the searchable text." + }, + { + "name": "custom_attributes", + "uses": [ + "Stored only" + ], + "text": "The ticket attributes your workspace defines. They are not part of the searchable text." + } + ] + }, + { + "name": "Articles", + "kind": "knowledge_base", + "one_document": "One published Help Center article. Drafts are skipped.", + "title": "The article title. Otherwise a title with the article id.", + "text": "The article body converted from HTML to text, else its summary, else its title. Then `Author` and `Updated` lines. The title is searchable too.", + "date": "When the article was last updated, else when it was created.", + "link_back": "The article in your Help Center.", + "attributes": [ + { + "name": "description", + "uses": [ + "Searchable text" + ], + "text": "The summary under the title. Searchable when the article body is empty. Otherwise it is kept with the article." + }, + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The teammate who wrote the article, written as the `Author` line. The graph records the article as written by that person." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the article was last updated, written as the `Updated` line." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the article was created. Used as the result date only when the update time is missing. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "The collection or section the article sits in. Places the article under it in the graph. Collections are not documents of their own. Not searchable." + }, + { + "name": "additional_metadata.intercom_article_id", + "uses": [ + "Query filter" + ], + "text": "The Intercom article id. Targets one article, and keeps later syncs on the same document. Not searchable." + }, + { + "name": "collection", + "uses": [ + "Stored only" + ], + "text": "The Help Center collection name, or its id when the name cannot be found." + }, + { + "name": "state", + "uses": [ + "Stored only" + ], + "text": "Always `published`." + } + ] + } + ], + "example_searches": [ + "What did customers say about the checkout bug last week?", + "Which open conversations are tagged billing?", + "What does our Help Center say about resetting a password?" + ], + "graph": { + "connections": [ + "A reply or internal note to its conversation.", + "A conversation to the Intercom Ticket it is linked to.", + "An article to its collection or section.", + "No links to other tools." + ], + "people": [ + "The author of each reply, and names @mentioned in internal notes.", + "The reporter of each ticket.", + "The author of each article.", + "The opening message's author and the assigned teammate are not attached to a conversation as people. Assignment decides who can read it." + ], + "from_text": "The opening message of each conversation, the text of every reply, ticket descriptions and article content." + }, + "not_synced": [ + "Internal teammate notes, unless `include_private_notes` is on.", + "Unassigned conversations, when you select teams instead of All conversations.", + "Draft Help Center articles.", + "Redacted conversation parts.", + "Contacts, companies and segments as documents of their own. Contacts only name people.", + "File attachments, apart from text in pasted images." + ] +} diff --git a/scripts/connector_pages/jira.json b/scripts/connector_pages/jira.json new file mode 100644 index 00000000..74738302 --- /dev/null +++ b/scripts/connector_pages/jira.json @@ -0,0 +1,535 @@ +{ + "description": "Sync issues, comments and worklogs from the Jira Cloud projects you choose. Project and issue-security restrictions apply only with Enforce ACL on and a successful permission read.", + "opening": [ + "Sync issues, comments and worklogs from the Jira Cloud projects you select. Each issue is one document with its description, environment, people, status, labels, issue links and linked pull requests. Each comment and each worklog entry is its own document, linked to its issue.", + "Project and issue-security permissions restrict search only when Enforce ACL is on and HydraDB can read them, which needs a Jira site-admin account. Issue history, watchers and most custom fields are not synced. Edits come across on the next sync. Items deleted in Jira stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "Access follows the project. An issue can be read by the active people who hold Browse Projects on its project. An issue with a security level can be read only by that level's members, and an empty level lets nobody read it. A comment or worklog follows its issue's security level.", + "identity": "A person's email address. For a security level, Jira groups are kept as groups next to their members' emails.", + "when_unreadable": "If HydraDB cannot read a project's Browse holders or an issue's security level, the connector reports a permission warning.", + "notes": [ + "Reading who can browse a project needs a Jira site-admin account.", + "One Browse holder whose email is hidden by Atlassian profile visibility stops HydraDB from capturing the whole project's audience. Set an access rule on such a project.", + "A project with too many readers to express cannot be captured.", + "A security level held by project roles, the reporter, the assignee or a custom field cannot be captured.", + "A comment or worklog whose issue security level cannot be found follows the project's access.", + "If Jira returns a temporary error, the audience captured earlier stays in force." + ] + }, + "connect": { + "auth": "Jira uses an Atlassian API token together with the email of the account that owns it.", + "credentials": [ + { + "name": "domain", + "type": "string", + "required": true, + "text": "Your Atlassian site host, for example `acme.atlassian.net`." + }, + { + "name": "email", + "type": "string", + "required": true, + "text": "The email of the Atlassian account that owns the API token." + }, + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "An Atlassian API token for that account." + } + ], + "permissions_label": "Jira permissions for the account", + "permissions": [ + { + "name": "Browse projects", + "text": "required. Lists projects and their issues." + }, + { + "name": "Browse issues", + "text": "required. Reads issue fields, comments and worklogs." + }, + { + "name": "Administer Jira", + "text": "optional, for permissions. Reading who can browse a project and issue security schemes needs a site-admin account." + }, + { + "name": "Browse users and groups", + "text": "optional, for permissions. Finds each project reader's email and turns a security level's groups into member emails." + } + ], + "steps": [ + { + "title": "Create an API token", + "text": "In your Atlassian account security settings, create an API token for the account HydraDB will use. Give that account the Jira permissions above on every project you will select." + }, + { + "title": "Create the connector", + "text": "Enter your site as `domain`, the account's `email`, and the token as `api_token`." + }, + { + "title": "Select projects", + "text": "HydraDB lists every project the account can see, with its name and key. Select the projects to sync." + } + ], + "account": "One connector reads one Jira Cloud site as the account that owns the token, and sees only what that account can access." + }, + "sync": { + "first_sync": "A newly selected project reads back the window set by `lookback_days`, 30 days by default. The window is measured on when an issue was last updated, not when it was created.", + "changes": "Each sync reads the issues updated since the last sync. Comments and worklogs are read again for every issue in that window.", + "edits": "An edited issue is picked up through its last-updated time and updates its document. Comments and worklogs are read again whenever their issue is picked up.", + "deletes": "Issues, comments and worklogs deleted in Jira stay searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "additional_metadata.project_key", + "uses": [ + "Query filter" + ], + "text": "The project key. Limits a query to one project. Not searchable." + }, + { + "name": "additional_metadata.project_name", + "uses": [ + "Query filter" + ], + "text": "The project name. Another way to limit a query to one project. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The project key, the same value as `additional_metadata.project_key`. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The project name, the same value as `additional_metadata.project_name`. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `project`. Not searchable." + }, + { + "name": "additional_metadata.security_level_id", + "uses": [ + "Query filter", + "Access rule" + ], + "text": "The issue's security level, when one is set. A comment or worklog carries its issue's level. Limits a query to one level, and the level's members decide who can read the item. Not searchable." + }, + { + "name": "additional_metadata.security_level_name", + "uses": [ + "Query filter" + ], + "text": "The name of the issue's security level, when one is set. Limits a query by level name. The level itself, not this name, decides who can read the item. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `jira`. Not searchable." + }, + { + "name": "Project", + "uses": [ + "Access rule" + ], + "text": "The selected project. The people who can browse it decide who can read its items, unless an issue has a security level. Not searchable." + } + ], + "documents": [ + { + "name": "Issues", + "kind": "ticket", + "one_document": "One Jira issue. Its comments and worklogs are separate documents.", + "title": "The issue summary, or `Jira issue` and the issue key, or the numeric id, when there is no summary.", + "text": "A first line with the issue key and type, such as `ENG-123 (Bug)`. Then a `Parent` line and one line per issue link, such as `blocks: ENG-7`, up to 20. Then the description as plain text, with link targets kept and mentions written as names, the `Environment` text, and a `Linked pull requests` list with one pull request address per line. The status, priority, assignee, reporter, type, labels, creation date and resolution date are written as lines too. The title is searchable too.", + "date": "When the issue was last updated, or when it was created if there is no update time.", + "link_back": "The issue's page in Jira, `https:///browse/`.", + "files": "Files attached to the issue are downloaded with the connector's credentials and read, and their text becomes searchable with the issue. A file with no id or download address is skipped. A file that fails to download or is not a supported type keeps only its details.", + "attributes": [ + { + "name": "Issue key", + "uses": [ + "Searchable text" + ], + "text": "The issue key, such as `ENG-123`, or the numeric issue id when there is no key. It keeps later syncs on the same document." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The workflow status name, written as the `Status` line." + }, + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "The priority name, written as the `Priority` line." + }, + { + "name": "issue_type", + "uses": [ + "Searchable text" + ], + "text": "The issue type name, written as the `Type` line and in the first line of the text." + }, + { + "name": "labels", + "uses": [ + "Searchable text" + ], + "text": "The issue's labels, written as the `Labels` line." + }, + { + "name": "assignee", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The assignee's display name, written as the `Assignee` line. The graph records that person as the assignee." + }, + { + "name": "reporter", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The reporter's display name, or the creator's when there is no reporter, written as the `Reporter` line. The graph records that person as the reporter." + }, + { + "name": "Attached files", + "uses": [ + "Searchable text" + ], + "text": "The text read from each attached file, searchable with the issue." + }, + { + "name": "Linked pull requests", + "uses": [ + "Searchable text" + ], + "text": "The addresses of pull requests linked in the issue's Development panel, one per line in the text. If Atlassian changes how it reports them, issues show no linked pull requests rather than an error. They are not linked to GitHub or GitLab items in the graph." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the issue was created, written into the issue details. Sets the result date only when the update time is missing." + }, + { + "name": "resolved_at", + "uses": [ + "Searchable text" + ], + "text": "When the issue was resolved, written into the issue details." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the issue was last updated. Sets the result date and decides when a sync picks the issue up. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The key of the parent issue or epic, written as the `Parent` line. Links the issue to its parent." + }, + { + "name": "linked_issue_ids", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The keys of every linked issue. Up to 20 different keys are written into the text. Every linked issue is linked in the graph." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Names of people @mentioned in the description. The graph records each as mentioned by the issue. The field itself is not searchable, but the description it comes from is." + }, + { + "name": "additional_metadata.jira_key", + "uses": [ + "Query filter" + ], + "text": "The issue key, such as `ENG-123`. Picks out one issue. Not searchable." + }, + { + "name": "additional_metadata.jira_id", + "uses": [ + "Query filter" + ], + "text": "The numeric issue id. Picks out one issue by id. Not searchable." + }, + { + "name": "additional_metadata.jira_parent_id", + "uses": [ + "Query filter" + ], + "text": "The numeric id of the parent issue or epic. Returns the children of one parent. Not searchable." + }, + { + "name": "additional_metadata.jira_link_types", + "uses": [ + "Query filter" + ], + "text": "The link phrases on this issue's side, such as `blocks` or `is blocked by`. Finds issues with a given kind of link. Not searchable." + }, + { + "name": "additional_metadata.jira_self", + "uses": [ + "Query filter" + ], + "text": "The issue's address in the Jira REST API. Mainly shows where the item came from. Not searchable." + }, + { + "name": "due_date", + "uses": [ + "Stored only" + ], + "text": "The issue due date. It is not written into the text." + }, + { + "name": "custom_fields", + "uses": [ + "Stored only" + ], + "text": "The resolution name, component names, fix version names and linked pull request addresses. Only the pull request addresses also appear in the text." + } + ] + }, + { + "name": "Comments", + "kind": "comment", + "one_document": "One comment on an issue.", + "title": "`Comment on ENG-123`, or `Comment on issue` and the numeric issue id when the key is unknown.", + "text": "The comment as plain text. The author, the creation and update times, and the issue key are written with it.", + "date": "When the comment was last updated, or when it was created if there is no update time.", + "link_back": "The issue's page in Jira with the comment focused.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The commenter's display name. The graph records the comment as written by that person." + }, + { + "name": "author_email", + "uses": [ + "Graph identity" + ], + "text": "The commenter's email, when Jira shows it. Identifies the commenter in the graph. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the comment was created. Sets the result date only when the update time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the comment was last updated. Sets the result date." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The key of the issue the comment is on. Links the comment to that issue." + }, + { + "name": "thread_id", + "uses": [ + "Graph connection" + ], + "text": "The issue key. Groups the comments and worklogs of one issue together in the graph. Not searchable." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Names of people @mentioned in the comment. The graph records each as mentioned. The field itself is not searchable, but the comment text is." + }, + { + "name": "additional_metadata.jira_comment_id", + "uses": [ + "Query filter" + ], + "text": "The numeric comment id. Picks out one comment. Not searchable." + }, + { + "name": "additional_metadata.jira_issue_key", + "uses": [ + "Query filter" + ], + "text": "The key of the issue. Returns every comment on one issue. Not searchable." + }, + { + "name": "additional_metadata.jira_issue_id", + "uses": [ + "Query filter" + ], + "text": "The numeric id of the issue. Returns every comment on one issue. Not searchable." + } + ] + }, + { + "name": "Worklogs", + "kind": "comment", + "one_document": "One worklog entry on an issue.", + "title": "`Worklog on ENG-123`, or `Worklog on issue` and the numeric issue id when the key is unknown.", + "text": "A first line such as `Sam logged work on ENG-123 (1h 30m)`, then the worklog note as plain text. The author, the update time and the issue key are written with it.", + "date": "When the worklog was last updated, or when the logged work started if there is no update time.", + "link_back": "The issue's page in Jira with the worklog focused.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The name of the person who logged the work. The graph records the worklog as written by that person." + }, + { + "name": "author_email", + "uses": [ + "Graph identity" + ], + "text": "The email of the person who logged the work, when Jira shows it. Identifies that person in the graph. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the worklog was last updated, written as the `Updated` line. Sets the result date." + }, + { + "name": "started_at", + "uses": [ + "Result date" + ], + "text": "When the logged work started. Sets the result date only when there is no update time. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The key of the issue the work was logged on. Links the worklog to that issue." + }, + { + "name": "thread_id", + "uses": [ + "Graph connection" + ], + "text": "The issue key. Groups the comments and worklogs of one issue together in the graph. Not searchable." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Names of people @mentioned in the worklog note. The graph records each as mentioned. The field itself is not searchable, but the note is." + }, + { + "name": "additional_metadata.jira_worklog_id", + "uses": [ + "Query filter" + ], + "text": "The numeric worklog id. Picks out one worklog. Not searchable." + }, + { + "name": "additional_metadata.jira_issue_key", + "uses": [ + "Query filter" + ], + "text": "The key of the issue. Returns every worklog on one issue. Not searchable." + }, + { + "name": "additional_metadata.jira_issue_id", + "uses": [ + "Query filter" + ], + "text": "The numeric id of the issue. Returns every worklog on one issue. Not searchable." + }, + { + "name": "time_spent_seconds", + "uses": [ + "Stored only" + ], + "text": "The exact number of seconds logged. The text carries a readable duration instead." + } + ] + } + ], + "example_searches": [ + "Which bugs in the ENG project are still In Progress and assigned to Sam?", + "What is blocking ENG-123?", + "How much time was logged on ENG-789, and by whom?" + ], + "graph": { + "connections": [ + "An issue to its parent issue or epic.", + "An issue to each issue it links to. `blocks`, `is blocked by` and `is caused by` keep their direction. `relates to`, `duplicates`, `clones` and `causes` become a plain related link. Other link types become a general link.", + "A comment or worklog to its issue, and the comments and worklogs of one issue to each other.", + "Each item to its project.", + "No links to items in other tools. Linked pull requests stay addresses in the text." + ], + "people": [ + "The assignee and the reporter, or creator, of each issue.", + "The author of each comment and worklog.", + "People @mentioned in a description, comment or worklog note." + ], + "from_text": "The issue description and environment, and the text of each comment and worklog note." + }, + "not_synced": [ + "Projects you did not select.", + "Issue history and watchers.", + "Projects, boards, sprints, versions, components and users as items of their own.", + "Jira admin configuration: screens, schemes, filters, dashboards and custom field definitions.", + "Custom fields other than resolution, components and fix versions.", + "Linked pull requests, when development-status capture is turned off with `include_dev_status`.", + "Comments with no text, and comments or worklogs whose issue cannot be identified." + ] +} diff --git a/scripts/connector_pages/klaviyo.json b/scripts/connector_pages/klaviyo.json new file mode 100644 index 00000000..c94d9921 --- /dev/null +++ b/scripts/connector_pages/klaviyo.json @@ -0,0 +1,197 @@ +{ + "description": "Sync a Klaviyo account's campaigns, flows, lists, segments, email templates and subscriber profiles, one document per record.", + "opening": [ + "Sync a Klaviyo account's campaigns, flows, lists, segments, email templates and subscriber profiles. Each record is one document of `Label: value` lines. Templates also carry their email content as text, and profiles carry their location and custom properties.", + "Klaviyo permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. That includes profiles, whose email, phone number and custom properties are searchable. List and segment membership is not synced. Campaign audience links describe configuration, not message delivery. Records deleted in Klaviyo stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Klaviyo uses a private API key.", + "credentials": [ + { + "name": "auth_token", + "type": "secret string", + "required": true, + "text": "A Klaviyo private API key." + } + ], + "steps": [ + { + "title": "Create the connector", + "text": "Paste a Klaviyo private API key as `auth_token`." + }, + { + "title": "Configure the connector", + "text": "HydraDB lists one account-wide resource, All data. Select it to sync the whole account the key belongs to." + } + ], + "account": "One connector reads one Klaviyo account, the one the key belongs to." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default, by each record's last update time. A record not updated within that window is not synced until it changes.", + "changes": "Each sync reads records whose update time moved past the last sync.", + "edits": "An edited record replaces its document.", + "deletes": "Deleted records are not removed. A record deleted in Klaviyo stays searchable in HydraDB.", + "notes": [ + "A record with no readable update time is skipped.", + "Campaigns on a channel Klaviyo reports as unsupported are skipped." + ] + }, + "shared_attributes": [ + { + "name": "Record attributes", + "uses": [ + "Searchable text" + ], + "text": "Every non-empty attribute with a single value, in alphabetical order as `Label: value`, such as names, statuses, personal details and dates. The `html`, `text`, `company_id`, `message` and `image` attributes are left out of this list." + }, + { + "name": "updated_at, updated", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was last updated. It sets the result date. When it is one of the record's attributes, it is part of the text too." + }, + { + "name": "additional_metadata.klaviyo_id", + "uses": [ + "Query filter" + ], + "text": "The Klaviyo id of the record. Targets one record. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `klaviyo`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The record type, such as `campaigns` or `profiles`, shown when you inspect the item. No published filter limits a query by record type." + }, + { + "name": "Nested details", + "uses": [ + "Stored only" + ], + "text": "Other nested values of the record, including list and segment membership details. Kept for inspection only, not searchable. Campaign audiences and segment definition references also create the graph connections described below." + } + ], + "documents": [ + { + "name": "Campaigns, flows, lists and segments", + "kind": "custom", + "one_document": "One campaign, flow, list or segment. Campaigns cover the email, SMS and mobile push channels.", + "title": "The record's name, or `Klaviyo ` when there is none.", + "text": "The title, then the record's attributes as `Label: value` lines.", + "date": "When the record was last updated.", + "link_back": "The record's address in Klaviyo's API, not a page in the Klaviyo app.", + "files": "None.", + "attributes": [ + { + "name": "name", + "uses": [ + "Searchable text" + ], + "text": "The record's name, written as the title and as an attribute line." + }, + { + "name": "Campaign audiences", + "uses": [ + "Graph connection" + ], + "text": "Configured included list or segment audiences link through `targets`, and excluded audiences through `excludes`. These links describe audience configuration, not message delivery. Not searchable." + }, + { + "name": "Segment definition references", + "uses": [ + "Graph connection" + ], + "text": "Lists or segments referenced in a segment's definition link through `related_to`. A reference in a negative rule does not assert positive membership. Not searchable." + } + ] + }, + { + "name": "Email templates", + "kind": "custom", + "one_document": "One email template.", + "title": "The template's name, or `Klaviyo templates ` when there is none.", + "text": "The title, the template's attributes as `Label: value` lines, then the email content.", + "date": "When the template was last updated.", + "link_back": "The template's address in Klaviyo's API, not a page in the Klaviyo app.", + "files": "None.", + "attributes": [ + { + "name": "html, text", + "uses": [ + "Searchable text" + ], + "text": "The email content: the HTML converted to text, or the plain-text version when there is no HTML." + } + ] + }, + { + "name": "Profiles", + "kind": "custom", + "one_document": "One subscriber profile.", + "title": "The person's first and last name, else their email, else `Klaviyo profiles `.", + "text": "The title, the profile's attributes as `Label: value` lines, such as email and phone number, then a `Location` line and the custom properties.", + "date": "When the profile was last updated.", + "link_back": "The profile's address in Klaviyo's API, not a page in the Klaviyo app.", + "files": "None.", + "attributes": [ + { + "name": "location", + "uses": [ + "Searchable text" + ], + "text": "City, region and country, written as `Location: city, region, country`. Other location details are not searchable." + }, + { + "name": "properties", + "uses": [ + "Searchable text" + ], + "text": "Every non-empty custom property with a single value, in order of property name, as `Label: value`. Custom properties whose value is an object or a list are not searchable." + } + ] + } + ], + "example_searches": [ + "What does the Welcome Series email template say?", + "Which flows are live, and when were they last updated?", + "What city, region and country are recorded for jane@example.com?" + ], + "graph": { + "connections": [ + "Campaigns link to their configured included and excluded list or segment audiences through `targets` and `excludes`, respectively; these links describe audience configuration, not message delivery.", + "Segments link to lists or segments referenced in their definitions through `related_to`; a reference in a negative rule does not assert positive membership.", + "Campaigns are not linked to their templates, and profiles are not linked to their lists or segments.", + "No links to other tools." + ], + "people": "No people are attached to items. A profile's name and email are part of its text only.", + "from_text": "The attribute lines of every record, template email content, and profile locations and custom properties. List membership and other relationships are not in the text, so they cannot be found there." + }, + "not_synced": [ + "Events, such as opens, clicks and orders, and metrics.", + "List and segment membership.", + "Campaign messages and subject lines. Template content is synced as templates.", + "Klaviyo reports, such as campaign values and flow series.", + "Records not updated within the first sync window, until they change.", + "Deletions: records deleted in Klaviyo stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/launchdarkly.json b/scripts/connector_pages/launchdarkly.json new file mode 100644 index 00000000..f62fca74 --- /dev/null +++ b/scripts/connector_pages/launchdarkly.json @@ -0,0 +1,442 @@ +{ + "description": "Sync feature flags with their targeting, segments and environments from the LaunchDarkly projects you choose, plus the account's members, teams and audit log.", + "opening": [ + "Sync feature flags, segments and environments from the LaunchDarkly projects you select, plus the account's members, teams and audit log. Each flag, segment, environment, member, team and audit entry is one document. A flag carries its configuration in every environment: on or off, prerequisites, individual targets, rules, the default rollout and its variations.", + "This is a record of configuration, not live flag evaluation: big-segment membership is not listed, so search cannot tell you every user who gets a variation. Project content follows LaunchDarkly's project view access only when Enforce ACL is on. Members, teams and account-wide audit entries are visible to everyone who can query the collection unless you set an access rule." + ], + "permissions": { + "carried": true, + "who_can_read": "Access follows the project. Flags, segments, environments and audit entries about one project can be read by the members whose LaunchDarkly role lets them view that project. Reader, Writer, Admin and Owner can view every project. No access views none. A member's own custom role replaces the base role, team roles add to it, and preset role statements, role attributes and permission grants are taken into account. Members, teams and audit entries about the account as a whole are not restricted.", + "identity": "A member's email address. Members who were invited but have not joined are left out.", + "when_unreadable": "If HydraDB cannot work out who can view a project, or an audit entry touches several projects or all of them, the connector reports a permission warning.", + "notes": [ + "Only project view access counts. Flag-level and environment-level permission statements are not considered.", + "A project with no viewers, a viewer without an email, or more than 1,000 viewers cannot be captured. Some custom role statements cannot be evaluated either.", + "For permissions, the token's role must be able to read members, teams and custom roles. The built-in Reader role can." + ] + }, + "connect": { + "auth": "LaunchDarkly uses an access token. The Reader role is enough.", + "credentials": [ + { + "name": "auth_token", + "type": "secret string", + "required": true, + "text": "A LaunchDarkly access token, ideally a service token with the Reader role." + } + ], + "permissions_label": "Token role", + "permissions": [ + { + "name": "Reader", + "text": "reads projects, environments, flags, segments, members, teams and the audit log. Writer and Admin add only write access, which the connector never uses." + } + ], + "steps": [ + { + "title": "Create a service token", + "text": "In LaunchDarkly, open Account settings, Authorization, Access tokens, Create token. Keep the role as Reader. Tick This is a service token, so the token keeps working when the person who made it is deactivated. Copy the token: it is shown once." + }, + { + "title": "Create the connector", + "text": "Paste the token as `auth_token`." + }, + { + "title": "Select projects", + "text": "HydraDB lists the projects the token can see, by name and key. Select the projects to sync. Members, teams and the audit log are read for the whole account." + } + ], + "account": "One connector reads one LaunchDarkly account." + }, + "sync": { + "first_sync": "Flags, segments and environments of each selected project, and the account's members and teams, are read in full, whatever their age.", + "changes": "Flags, segments, environments, members and teams are read in full on every sync, and ones that did not change are skipped. The audit log is read from the newest entry already synced.", + "edits": "A change to a flag, segment, environment, member or team is picked up on the next sync.", + "deletes": "Items deleted in LaunchDarkly stay searchable in HydraDB. New links skip items that were deleted.", + "notes": [ + "If LaunchDarkly refuses members, teams or the audit log on the first request, they are skipped. A refusal after some records arrive fails the sync, and so does a rejected token.", + "If one project is refused, the other projects still sync.", + "A new LaunchDarkly organization has one empty project and no flags, so a nearly empty first sync is expected." + ] + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `launchdarkly`. Not searchable." + } + ], + "documents": [ + { + "name": "Feature flags", + "kind": "custom", + "one_document": "One feature flag in one project, with its configuration in every environment.", + "title": "The flag name, else its key.", + "text": "The name and description, then `Kind`, `Project`, `Maintainer` and `Tags` lines, and markers when the flag is temporary or archived. Then one section per environment, in order: on or off, prerequisites, individual user and context targets, rules in order, the default rollout and the off variation. Then each variation's name, value and description. Empty values are left out. A prerequisite's variation can show as a number instead of its name. The title is searchable too.", + "date": "The latest change in any environment, else when the flag was created.", + "link_back": "The flag's targeting page in LaunchDarkly.", + "attributes": [ + { + "name": "flag_key", + "uses": [ + "Searchable text" + ], + "text": "The flag key. Searchable only when the flag has no name and the key is its title." + }, + { + "name": "maintainer", + "uses": [ + "Searchable text" + ], + "text": "The maintainer's name, else their email, written as the `Maintainer` line." + }, + { + "name": "maintainer_id", + "uses": [ + "Graph connection" + ], + "text": "Links the flag to the maintainer's member record. Not searchable." + }, + { + "name": "temporary, archived", + "uses": [ + "Searchable text" + ], + "text": "Written as markers only when true." + }, + { + "name": "Environment, prerequisite and segment references", + "uses": [ + "Graph connection" + ], + "text": "Link the flag to each environment it is configured in, each prerequisite flag and each segment its rules match. Not searchable as links." + }, + { + "name": "created_at, last_modified_at", + "uses": [ + "Result date" + ], + "text": "The latest change, else creation, is the result date. Not searchable." + }, + { + "name": "additional_metadata.launchdarkly_flag_key", + "uses": [ + "Query filter" + ], + "text": "The flag key. Picks out one flag. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The project key. Limits a query to one project. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The project name. Limits a query to one project by name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `project`. Not searchable." + }, + { + "name": "Project", + "uses": [ + "Access rule" + ], + "text": "The flag's project. Who can view the project decides who can read the flag. Not searchable." + } + ] + }, + { + "name": "Segments", + "kind": "custom", + "one_document": "One segment in one project environment.", + "title": "The segment name, else its key.", + "text": "The name and description, `Project`, `Environment` and `Tags` lines, then the included and excluded users and contexts, then rule lines. A big segment's text says its membership is kept outside LaunchDarkly's API, and the members are not listed. The title is searchable too.", + "date": "The last change, else when the segment was created.", + "link_back": "The segment page in LaunchDarkly.", + "attributes": [ + { + "name": "segment_key", + "uses": [ + "Searchable text" + ], + "text": "The segment key. Searchable only when the segment has no name and the key is its title." + }, + { + "name": "included, excluded, included_contexts, excluded_contexts", + "uses": [ + "Searchable text" + ], + "text": "Users and contexts listed in the segment, so a query can find which segments include a user key. Big-segment membership is not listed." + }, + { + "name": "Environment and segment references", + "uses": [ + "Graph connection" + ], + "text": "Link the segment to its environment and to each segment its rules match. Not searchable as links." + }, + { + "name": "created_at, last_modified_at", + "uses": [ + "Result date" + ], + "text": "The last change, else creation, is the result date. Not searchable." + }, + { + "name": "additional_metadata.launchdarkly_segment_key", + "uses": [ + "Query filter" + ], + "text": "The segment key. Picks out one segment. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The project key. Limits a query to one project. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The project name. Limits a query to one project by name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `project`. Not searchable." + }, + { + "name": "Project", + "uses": [ + "Access rule" + ], + "text": "The segment's project. Who can view the project decides who can read the segment. Not searchable." + } + ] + }, + { + "name": "Environments", + "kind": "custom", + "one_document": "One environment of one project.", + "title": "The environment name, else its key.", + "text": "The name, `Project` and `Environment key` lines, `Marked critical`, `Requires confirmation for changes` and `Requires a comment on every change` when set, and a `Tags` line. The title is searchable too.", + "date": "None.", + "link_back": "The environment page in LaunchDarkly.", + "attributes": [ + { + "name": "additional_metadata.launchdarkly_environment_key", + "uses": [ + "Query filter" + ], + "text": "The environment key. Picks out one environment. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The project key. Limits a query to one project. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The project name. Limits a query to one project by name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `project`. Not searchable." + }, + { + "name": "Project", + "uses": [ + "Access rule" + ], + "text": "The environment's project. Who can view the project decides who can read the environment. Not searchable." + } + ] + }, + { + "name": "Members", + "kind": "custom", + "one_document": "One account member.", + "title": "The first and last name, else the email, else `LaunchDarkly member`.", + "text": "The name, then `Email`, `Role`, `Custom roles` and `Teams` lines. The title is searchable too.", + "date": "None.", + "link_back": "None.", + "attributes": [ + { + "name": "email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The member's email, written as the `Email` line. Identifies the member as a person in the graph." + }, + { + "name": "member_role, custom_roles", + "uses": [ + "Searchable text" + ], + "text": "The base role and custom role keys, so a query can find who has which role." + }, + { + "name": "teams", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The member's team names, written as the `Teams` line. Links the member to each team's record." + }, + { + "name": "additional_metadata.launchdarkly_member_id", + "uses": [ + "Query filter" + ], + "text": "The member id. Picks out one member. Not searchable." + } + ] + }, + { + "name": "Teams", + "kind": "custom", + "one_document": "One team.", + "title": "The team name, else its key.", + "text": "The name, the description and a `Team key` line. The title is searchable too.", + "date": "None.", + "link_back": "None.", + "attributes": [ + { + "name": "team_key, description", + "uses": [ + "Searchable text" + ], + "text": "The team key and its written purpose." + }, + { + "name": "additional_metadata.launchdarkly_team_key", + "uses": [ + "Query filter" + ], + "text": "The team key. Picks out one team. Not searchable." + } + ] + }, + { + "name": "Audit log entries", + "kind": "custom", + "one_document": "One audit log entry.", + "title": "The entry title as plain text, else its name, else `LaunchDarkly audit` with its id.", + "text": "The title, a `By` line with the member who made the change, the description, the short description when different, a `Comment` line, and one `Action` line per change with the action and the resource. The title is searchable too.", + "date": "When the change happened.", + "link_back": "The entry in LaunchDarkly.", + "attributes": [ + { + "name": "member", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The member who made the change, by name, else email, written as the `By` line. Links the entry to that member's record." + }, + { + "name": "flags", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The flags the entry touched, as `project/flag`, written in the `Action` lines. Links the entry to those flags. The entry is also linked to the environments, segments, members or teams it touched." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the change happened. Not searchable." + }, + { + "name": "additional_metadata.launchdarkly_audit_id", + "uses": [ + "Query filter" + ], + "text": "The entry id. Picks out one entry. Not searchable." + }, + { + "name": "Project", + "uses": [ + "Access rule" + ], + "text": "An entry about one project follows who can view that project. An entry about the account as a whole is not restricted. An entry about several projects carries a permission warning. Not searchable." + }, + { + "name": "entry_kind, title_verb", + "uses": [ + "Stored only" + ], + "text": "LaunchDarkly's category for the entry and its verb phrase." + } + ] + } + ], + "example_searches": [ + "Which flags does the beta-testers segment gate?", + "Who turned off the payments-v2 flag and what comment did they leave?", + "Which environments require a comment on every change?" + ], + "graph": { + "connections": [ + "A flag to its maintainer member or maintainer team.", + "A flag to each environment it is configured in, and to each prerequisite flag.", + "A flag or segment to each segment its rules match.", + "A segment to its environment.", + "A member to each of their teams.", + "An audit entry to the member who made it, and to the flags, environments, segments, members or teams it touched.", + "Links reach only items this connector has synced, that are not deleted, into the same database and collection.", + "No links to items in other tools." + ], + "people": [ + "Each member, identified by email.", + "A flag's maintainer and an audit entry's author are linked to member records, not attached to the item as people." + ], + "from_text": "Flag descriptions, audit comments and descriptions." + }, + "not_synced": [ + "Flags, segments and environments of projects you did not select.", + "Audit entries about a single project you did not select.", + "Big-segment membership.", + "Per-user targeting values outside the flag configuration.", + "Custom flag properties, experiment definitions and goal ids.", + "Environment and resource approval settings.", + "Environment SDK keys and mobile keys, and members' MFA state and password status.", + "Projects as their own documents.", + "Metrics, experiments, releases and code references." + ] +} diff --git a/scripts/connector_pages/lever.json b/scripts/connector_pages/lever.json new file mode 100644 index 00000000..f60a3d4e --- /dev/null +++ b/scripts/connector_pages/lever.json @@ -0,0 +1,465 @@ +{ + "description": "Sync opportunities, candidates, job postings, contacts, submitted applications and referral forms from Lever. Opportunities link to their contact, and applications link to their candidate when Lever supplies the candidate id.", + "opening": [ + "Sync opportunities, candidates, job postings, contacts, submitted applications and referral forms from one Lever account. Each record is one document. An opportunity links to its contact, and an application links to its candidate when Lever supplies the candidate id. Referral forms are not linked to a candidate.", + "Lever permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Selecting postings limits only postings: everything else syncs for the whole account. Edits to an application or referral form after it is first synced are not guaranteed to be picked up. Archived and deleted records stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "An access rule on a posting does not cover opportunities, candidates, contacts, applications or referral forms, which sync for the whole account." + ] + }, + "connect": { + "auth": "Lever uses an API key.", + "credentials": [ + { + "name": "token", + "type": "secret string", + "required": true, + "text": "A Lever API key." + } + ], + "steps": [ + { + "title": "Get an API key", + "text": "Get a Lever API key for your account." + }, + { + "title": "Create the connector", + "text": "Paste the key as `token`." + }, + { + "title": "Select postings", + "text": "HydraDB lists your job postings. Select the postings to sync. This selection limits postings only. Opportunities, candidates, contacts, applications and referral forms sync for the whole account whatever you select." + } + ], + "account": "One connector reads one Lever account." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Opportunities, candidates and selected postings are picked up when they are updated. Contacts, applications and referral forms are reached only through the candidates read in the same sync. A contact is read when such a candidate refers to it. An application or referral form is read when it was created within the sync window.", + "edits": "An updated opportunity, candidate or posting replaces its document. A contact is read again only when a candidate that refers to it is read. Edits to an application or referral form after it is first synced are not guaranteed to be picked up.", + "deletes": "Records deleted in Lever stay searchable in HydraDB. Archiving a candidate or application in Lever does not remove or hide its document.", + "notes": [ + "An opportunity and a candidate that share an id share one document, so the one read last is the one you see." + ] + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `lever`. Not searchable." + }, + { + "name": "Lever id", + "uses": [ + "Searchable text" + ], + "text": "The record's Lever id, written into the text as its key. Searchable on every record type except contacts." + } + ], + "documents": [ + { + "name": "Opportunities", + "kind": "ticket", + "one_document": "One opportunity. A candidate with the same id shares this document.", + "title": "The person's name. Otherwise `Lever opportunity` and its id.", + "text": "The name, then `Headline`, `Stage`, `Origin`, `Tags` and `Emails` lines. The creation time is part of the text. The title is searchable too.", + "date": "When the opportunity was last updated, or created when there is no update time.", + "link_back": "None.", + "files": "Resumes and other files are not synced.", + "attributes": [ + { + "name": "name, headline", + "uses": [ + "Searchable text" + ], + "text": "The person's name and profile headline. The name forms the title." + }, + { + "name": "Stage", + "uses": [ + "Searchable text" + ], + "text": "The stage's display name. When the name cannot be found, the stage id is written instead." + }, + { + "name": "origin, tags, emails", + "uses": [ + "Searchable text" + ], + "text": "Whether the person applied, was sourced or was referred, their tags and their email addresses." + }, + { + "name": "contact", + "uses": [ + "Graph connection" + ], + "text": "Links the opportunity to its Lever contact. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the opportunity was created. It is the result date only when there is no update time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the opportunity was last updated. Not searchable." + }, + { + "name": "additional_metadata.lever_opportunity_id", + "uses": [ + "Query filter" + ], + "text": "The Lever opportunity id. Finds one opportunity. Not searchable." + }, + { + "name": "owner", + "uses": [ + "Stored only" + ], + "text": "The owner's Lever user id. It is not turned into a name." + } + ] + }, + { + "name": "Candidates", + "kind": "ticket", + "one_document": "One candidate. Lever's candidate and opportunity views of the same record share one document.", + "title": "The candidate's name. Otherwise `Lever candidate` and its id.", + "text": "The name, then `Headline`, `Location`, `Stage`, `Origin`, `Tags`, `Emails` and `Links` lines. The creation time is part of the text. The title is searchable too.", + "date": "When the candidate was last interacted with, or created when there is no interaction time.", + "link_back": "None.", + "files": "Resumes and other files are not synced.", + "attributes": [ + { + "name": "name, headline, location", + "uses": [ + "Searchable text" + ], + "text": "The candidate's name, profile headline and location. The name forms the title." + }, + { + "name": "Stage", + "uses": [ + "Searchable text" + ], + "text": "The stage's display name. When the name cannot be found, the stage id is written instead." + }, + { + "name": "origin, tags, emails", + "uses": [ + "Searchable text" + ], + "text": "Whether the candidate applied, was sourced or was referred, their tags and their email addresses." + }, + { + "name": "links", + "uses": [ + "Searchable text" + ], + "text": "The candidate's profile links on other sites. They are not links back to Lever." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the candidate was created. It is the result date only when there is no interaction time." + }, + { + "name": "last_interaction_at", + "uses": [ + "Result date" + ], + "text": "When the candidate was last interacted with. Not searchable." + }, + { + "name": "additional_metadata.lever_candidate_id", + "uses": [ + "Query filter" + ], + "text": "The Lever candidate id. Finds one candidate. Not searchable." + }, + { + "name": "archived", + "uses": [ + "Stored only" + ], + "text": "Whether Lever marks the candidate as archived. It does not remove or hide the document." + } + ] + }, + { + "name": "Postings", + "kind": "ticket", + "one_document": "One job posting you selected.", + "title": "The posting title. Otherwise `Lever posting` and its id.", + "text": "The title, then `Team`, `Department`, `Location` and `Commitment` lines and the posting description as plain text. The creation time is part of the text. The title is searchable too.", + "date": "When the posting was last updated, or created when there is no update time.", + "link_back": "The posting's public page, or its listing page when there is none.", + "attributes": [ + { + "name": "categories", + "uses": [ + "Searchable text" + ], + "text": "The posting's team, department, location and commitment. Other category values are stored but not searchable." + }, + { + "name": "Description", + "uses": [ + "Searchable text" + ], + "text": "The posting description. Lists and additional sections of the posting are not kept." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the posting was created. It is the result date only when there is no update time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the posting was last updated. Not searchable." + }, + { + "name": "additional_metadata.lever_posting_id", + "uses": [ + "Query filter" + ], + "text": "The Lever posting id. Finds one posting. Not searchable." + }, + { + "name": "owner, user", + "uses": [ + "Stored only" + ], + "text": "The Lever user ids of the posting's owner and creator. They are not turned into names." + } + ] + }, + { + "name": "Contacts", + "kind": "custom", + "one_document": "One contact person that a synced candidate refers to.", + "title": "The contact's name. Otherwise `Lever contact` and its id.", + "text": "`Name`, `Headline`, `Location`, `Emails`, `Phones`, `Links` and `Tags` lines. The title is searchable too.", + "date": "When the contact was last updated, or created when there is no update time.", + "link_back": "None.", + "attributes": [ + { + "name": "name, headline, location", + "uses": [ + "Searchable text" + ], + "text": "The contact's name, headline and location. The name forms the title." + }, + { + "name": "emails, phones", + "uses": [ + "Searchable text" + ], + "text": "The contact's email addresses and phone numbers, in the text only. They do not make the contact a person in the graph." + }, + { + "name": "links, tags", + "uses": [ + "Searchable text" + ], + "text": "The contact's profile links and tags." + }, + { + "name": "updated_at, created_at", + "uses": [ + "Result date" + ], + "text": "When the contact was last updated, or created. Not searchable." + }, + { + "name": "additional_metadata.lever_contact_id", + "uses": [ + "Query filter" + ], + "text": "The Lever contact id. Finds one contact. Not searchable." + } + ] + }, + { + "name": "Applications", + "kind": "ticket", + "one_document": "One submitted application.", + "title": "`Application from` and the applicant's name. Otherwise `Lever application`.", + "text": "`Type`, `Name`, `Email`, `Company`, `Phone` and `Comments` lines, then each custom question with its answer. The creation time is part of the text. The title is searchable too.", + "date": "When the application was created.", + "link_back": "None.", + "attributes": [ + { + "name": "Applicant details", + "uses": [ + "Searchable text" + ], + "text": "The applicant's name, email, company and phone as given on the application. They are in the text only, not kept as separate fields." + }, + { + "name": "type, comments", + "uses": [ + "Searchable text" + ], + "text": "How the application came in, and the applicant's comments." + }, + { + "name": "Answers", + "uses": [ + "Searchable text" + ], + "text": "Each custom question with a non-empty answer, in the text only." + }, + { + "name": "additional_metadata.lever_candidate_id", + "uses": [ + "Query filter", + "Graph connection" + ], + "text": "The candidate id, when Lever supplies it. Limits a query to one candidate's applications, and links the application to the candidate. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the application was created. It is the result date." + }, + { + "name": "additional_metadata.lever_application_id", + "uses": [ + "Query filter" + ], + "text": "The Lever application id. Finds one application. Not searchable." + }, + { + "name": "posting", + "uses": [ + "Stored only" + ], + "text": "The id of the posting applied to. It does not link the application to the posting, and it is not a query filter." + }, + { + "name": "archived", + "uses": [ + "Stored only" + ], + "text": "Lever's archive details for the application. They do not remove or hide the document." + } + ] + }, + { + "name": "Referral forms", + "kind": "ticket", + "one_document": "One completed referral form.", + "title": "The form title. Otherwise `Lever referral` and its id.", + "text": "`Type`, `Stage` and `Instructions` lines, then each question with its answer. The candidate's name is not added. The creation time is part of the text. The title is searchable too.", + "date": "When the form was completed, or created when there is no completion time.", + "link_back": "None.", + "attributes": [ + { + "name": "type, instructions", + "uses": [ + "Searchable text" + ], + "text": "The form type and its instructions." + }, + { + "name": "Stage", + "uses": [ + "Searchable text" + ], + "text": "The stage's display name. When the name cannot be found, the stage id is written instead." + }, + { + "name": "Answers", + "uses": [ + "Searchable text" + ], + "text": "Each question with a non-empty answer." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the form was created. It is the result date only when there is no completion time." + }, + { + "name": "completed_at", + "uses": [ + "Result date" + ], + "text": "When the form was completed. Not searchable." + }, + { + "name": "additional_metadata.lever_referral_id", + "uses": [ + "Query filter" + ], + "text": "The Lever referral id. Finds one referral form. Not searchable." + }, + { + "name": "user, referrer", + "uses": [ + "Stored only" + ], + "text": "The Lever user ids of the person who completed the form and the referrer. They are not turned into names, and the referrer is not linked." + } + ] + } + ], + "example_searches": [ + "Which candidates mention the onsite stage?", + "What comments and answers are recorded in this application?", + "Which postings mention the Engineering department?" + ], + "graph": { + "connections": [ + "An opportunity to its contact.", + "An application to its candidate, when Lever supplies the candidate id.", + "Applications are not linked to their posting, and referral forms are not linked to a candidate.", + "No links to other tools." + ], + "people": "No one is attached to a record as a person. Owners, creators and referrers are kept as Lever user ids only. Candidate and contact names are in the text.", + "from_text": "Profiles, posting descriptions, application comments and answers, and referral form answers." + }, + "not_synced": [ + "Postings you did not select.", + "Interview feedback, notes and scorecards.", + "Resumes and other files.", + "Lever users, requisitions, sources and tags as documents.", + "Whether a posting is open or closed, and posting sections other than its categories and description.", + "Separate fields for contact phone numbers, applicant profile details and question answers. Their values are in the text only.", + "Deletions: records deleted in Lever stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/linear.json b/scripts/connector_pages/linear.json new file mode 100644 index 00000000..5c7484d0 --- /dev/null +++ b/scripts/connector_pages/linear.json @@ -0,0 +1,246 @@ +{ + "description": "Sync issues, with their comments, and Linear Documents from the teams and projects you choose. Private-team restrictions require Enforce ACL and a successful permission read.", + "opening": [ + "Sync issues from the Linear teams or projects you select, and Linear Documents attached to teams, projects, issues and initiatives. Each issue is one document with its description and up to 50 of its comments. Each Linear Document is one page. A sub-issue links to its parent, and an issue links to the GitHub pull requests attached to it.", + "Private-team membership restricts search only when Enforce ACL is on and HydraDB can read the team's members. Projects and Workspace Documents carry no Linear permissions. Issue labels are not synced. Issues and documents deleted in Linear stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "Access follows the team. A public team's issues can be read by everyone who can query the collection. A private team's issues can be read by its active members. A restricted team uses the members of the private team that contains it. A team's Documents resource follows the same rule. A project resource and Workspace Documents carry no Linear permissions, so set an access rule on them to restrict them.", + "identity": "A member's email address, in lower case. Linear bots, apps and deactivated members are left out.", + "when_unreadable": "If HydraDB cannot read a team's full membership, the connector reports a permission warning.", + "notes": [ + "Public-team access includes everyone who can query the collection, including people Linear treats as guests.", + "An issue in both a selected team and a selected project is stored once, and the resource that synced it last decides its access. A project gives no team audience, so set an access rule on any project you select.", + "Documents attached only to an initiative sit under Workspace Documents. A project document can also land there when its project belongs to more teams than HydraDB reads." + ] + }, + "connect": { + "auth": "Linear uses a personal API key.", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "required": true, + "text": "A Linear personal API key." + } + ], + "permissions_label": "Access the key needs", + "permissions": [ + { + "name": "read", + "text": "lists teams and projects, and reads issues, comments and attachments." + } + ], + "steps": [ + { + "title": "Create an API key", + "text": "In Linear, open Settings, Account, Security and access, API keys, and create a key." + }, + { + "title": "Create the connector", + "text": "Paste the key as `access_token`." + }, + { + "title": "Select teams, projects and documents", + "text": "HydraDB lists every team, every project, a ` Documents` resource for each team, and one `Workspace Documents` resource. Select the ones to sync. A team's Documents resource holds the documents of the team, of its projects and of its issues. A document reachable through several teams is synced under one of them only. Workspace Documents holds documents no team claims, in practice documents attached only to an initiative." + } + ], + "account": "One connector reads what one API key's Linear user can see.", + "scope_unit": "Linear account" + }, + "sync": { + "first_sync": "A newly selected resource reads back the window set by `lookback_days`, 30 days by default, measured on when items were last updated.", + "changes": "Each sync reads the issues and documents updated since the last sync.", + "edits": "An edited issue or document is picked up through its last-updated time and updates its document. Comments are read again only when their issue is picked up.", + "deletes": "Deleted issues and documents are not removed. An item that disappears from Linear stays searchable in HydraDB." + }, + "documents": [ + { + "name": "Issues", + "kind": "ticket", + "one_document": "One Linear issue, with up to 50 of its comments inside it. A search result is the issue, not an individual comment.", + "title": "The issue title.", + "text": "The issue's fields, written as `name: value` lines: the description, workflow state, priority and its label, assignee and creator with their emails, creation and update times, team key and name, project name, and the issue's address. Up to 50 comments are searchable with the issue. The title is searchable too.", + "date": "When the issue was last updated.", + "link_back": "The issue's page in Linear.", + "files": "Files uploaded into the description or comments are downloaded with the connector's key and read, and their text is searchable with the issue. Only files stored by Linear's upload service are read. Link attachments, such as GitHub, Figma or plain links, are kept as references and not opened. Up to 50 link attachments are kept per issue.", + "attributes": [ + { + "name": "Issue identifier", + "uses": ["Searchable text"], + "text": "The identifier, such as `ENG-123`, or the issue's id when there is none. It keeps later syncs on the same document." + }, + { + "name": "Comments", + "uses": ["Searchable text", "Graph identity"], + "text": "Up to 50 comments, each with its author, text and time, searchable with the issue. Each comment's author is recorded as a commenter." + }, + { + "name": "Uploaded files", + "uses": ["Searchable text"], + "text": "The text read from each uploaded file, searchable with the issue." + }, + { + "name": "state", + "uses": ["Searchable text"], + "text": "The workflow state name, written as a line." + }, + { + "name": "priority, priority_label", + "uses": ["Searchable text"], + "text": "The priority number and its readable label, written as lines." + }, + { + "name": "assignee, assignee_email", + "uses": ["Searchable text", "Graph identity"], + "text": "The assignee's name, or email when there is no name, and their email, written as lines. The graph records that person as the assignee." + }, + { + "name": "reporter, reporter_email", + "uses": ["Searchable text", "Graph identity"], + "text": "The creator's name, or email when there is no name, and their email, written as lines. The graph records that person as the creator." + }, + { + "name": "team_key, team_name", + "uses": ["Searchable text"], + "text": "The owning team's key and name, written as lines." + }, + { + "name": "project_name", + "uses": ["Searchable text"], + "text": "The issue's project, if any, written as a line." + }, + { + "name": "url", + "uses": ["Searchable text"], + "text": "The issue's Linear address. It is the link back, and it is also written as a `url` line." + }, + { + "name": "created_at", + "uses": ["Searchable text"], + "text": "When the issue was created, written as a line." + }, + { + "name": "updated_at", + "uses": ["Searchable text", "Result date"], + "text": "When the issue was last updated, written as a line. Sets the result date and decides when a sync picks the issue up." + }, + { + "name": "additional_metadata.linear_identifier", + "uses": ["Query filter"], + "text": "The identifier, such as `ENG-123`. Picks out one issue. Not searchable." + }, + { + "name": "additional_metadata.linear_issue_id", + "uses": ["Query filter"], + "text": "The issue's Linear id. Picks out one issue by id. Not searchable." + }, + { + "name": "connector_id", + "uses": ["Query filter"], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": ["Query filter"], + "text": "Always `linear`. Not searchable." + }, + { + "name": "Team or project", + "uses": ["Access rule"], + "text": "The selected team or project the issue was synced under. A private or restricted team's members decide who can read the issue. A project carries no Linear permissions. Not searchable." + } + ] + }, + { + "name": "Documents", + "kind": "knowledge_base", + "one_document": "One Linear Document, attached to a team, project, issue or initiative.", + "title": "The document title.", + "text": "The document's markdown content. The author and the update time are written with it. The title is searchable too.", + "date": "When the document was last updated.", + "link_back": "The document's page in Linear.", + "files": "Files uploaded into the content are downloaded and read, and their text is searchable with the document.", + "attributes": [ + { + "name": "author", + "uses": ["Searchable text", "Graph identity"], + "text": "The creator's name, or email when there is no name. The graph records the document as written by that person." + }, + { + "name": "author_email", + "uses": ["Graph identity"], + "text": "The creator's email. Identifies the author in the graph. Not searchable." + }, + { + "name": "Uploaded files", + "uses": ["Searchable text"], + "text": "The text read from each uploaded file, searchable with the document." + }, + { + "name": "updated_at", + "uses": ["Searchable text", "Result date"], + "text": "When the document was last updated, written as the `Updated` line. Sets the result date and decides when a sync picks the document up." + }, + { + "name": "connector_id", + "uses": ["Query filter"], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": ["Query filter"], + "text": "Always `linear`. Not searchable." + }, + { + "name": "Documents resource", + "uses": ["Access rule"], + "text": "The team's Documents resource the document was synced under. A private or restricted team's members decide who can read it. Workspace Documents carries no Linear permissions. Not searchable." + }, + { + "name": "created_at", + "uses": ["Stored only"], + "text": "When the document was created." + }, + { + "name": "parent_type", + "uses": ["Stored only"], + "text": "What the document is attached to: `project`, `team`, `initiative` or `issue`." + }, + { + "name": "parent_name", + "uses": ["Stored only"], + "text": "The name or identifier of what the document is attached to." + } + ] + } + ], + "example_searches": [ + "What issues are assigned to Dana in the Platform team?", + "What did the comments on ENG-412 conclude?", + "What does our Linear project doc say about the Q4 roadmap?" + ], + "graph": { + "connections": [ + "A sub-issue to its parent issue.", + "An issue to each GitHub pull request attached to it, up to 50. The link reaches the pull request when the GitHub connector also syncs that repository. A repository name capitalized differently from GitHub's does not match.", + "A document is not linked to the team, project, issue or initiative it is attached to.", + "Teams and projects appear only as text on issues, not as links." + ], + "people": [ + "The assignee and the creator of each issue.", + "The author of each embedded comment, as a commenter.", + "The author of each document." + ], + "from_text": "Issue descriptions, embedded comments and document content." + }, + "not_synced": [ + "Teams, projects and Documents resources you did not select.", + "Comments beyond the first 50 on an issue.", + "Issue labels.", + "Projects, cycles, milestones, labels and initiatives as items of their own.", + "The contents of link attachments such as GitHub, Figma and plain links. Only uploaded files are read.", + "Deletions: deleted issues and documents stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/loom.json b/scripts/connector_pages/loom.json new file mode 100644 index 00000000..cd496478 --- /dev/null +++ b/scripts/connector_pages/loom.json @@ -0,0 +1,154 @@ +{ + "description": "Sync the Loom videos whose share links you list, one searchable document per video with its transcript.", + "opening": [ + "Sync the Loom videos whose share links you list. Each video is one document with its title, owner, description and transcript. Discord and Microsoft Teams messages that link to a listed video connect to it in the graph.", + "No Loom account or token is needed, and only the videos you list are synced: there is no workspace-wide listing. Loom permissions are not imported, so once a password-protected video is synced, its transcript is visible to everyone who can query the collection unless you set an access rule. Removing a link from the list does not remove the video from HydraDB, and a video deleted in Loom stays searchable." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Loom needs no API key or sign-in. You list the share links of the videos to sync. A password-protected video also needs its share password.", + "credentials": [ + { + "name": "video_urls", + "type": "string list", + "required": true, + "text": "The share or embed links of the videos to sync." + }, + { + "name": "password", + "type": "secret string", + "text": "A share password used for every protected video that has no password of its own in `video_passwords`." + }, + { + "name": "video_passwords", + "type": "secret string", + "text": "Share passwords for individual videos, as a JSON object keyed by the 32-character video id." + } + ], + "steps": [ + { + "title": "Copy the share links", + "text": "Copy the share link of each Loom video to sync. For a password-protected video, note its share password." + }, + { + "title": "Create the connector", + "text": "Add the links as `video_urls`. For protected videos, add `password`, or `video_passwords` to give each video its own password." + }, + { + "title": "Select videos", + "text": "HydraDB lists one item per link and tries to read each video's title. A link it cannot read as a Loom link fails this step. A video that is missing or private is still listed, with a placeholder title, and can fail or be skipped when it syncs. Select the videos to sync." + } + ], + "account": "One connector reads the videos you list. There is no Loom account behind it. To add a video later, add its share link." + }, + "sync": { + "first_sync": "Syncs every listed video, whatever its age.", + "changes": "Each sync reads every listed video again. Only videos whose content changed are updated.", + "edits": "An edited title, description or transcript is picked up on the next sync.", + "deletes": "Removing a link, or a video that can no longer be read, does not remove its document. A video deleted in Loom stays searchable in HydraDB.", + "notes": [ + "If a video's transcript cannot be read, the video is skipped for that sync, so the transcript already in HydraDB is kept.", + "If the password is rejected for every selected video, the sync fails." + ] + }, + "documents": [ + { + "name": "Videos", + "kind": "knowledge_base", + "one_document": "One listed Loom video with its transcript. A video with no title, owner, description or transcript is skipped.", + "title": "The video title, or `Loom video ` when it has none.", + "text": "The title, an `Owner` line, the description when it differs from the title, then the transcript. The transcript has a `Transcript` heading when other text comes before it. The title is searchable too.", + "date": "When the video was last updated, else when it was created.", + "link_back": "The video's share link on loom.com.", + "files": "None. The video file is not downloaded.", + "attributes": [ + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's display name, written as the `Owner` line. The owner is not attached to the video as a person in the graph." + }, + { + "name": "description", + "uses": [ + "Searchable text" + ], + "text": "The owner's description of the video, written after the `Owner` line." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the video was last updated, written as an `Updated` line. Sets the result date." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the video was created. Sets the result date only when there is no update time. Not searchable." + }, + { + "name": "additional_metadata.loom_video_id", + "uses": [ + "Query filter", + "Graph connection" + ], + "text": "The 32-character video id. Picks out one video. Discord and Microsoft Teams messages that link to the video connect to it by this id. Not searchable." + }, + { + "name": "additional_metadata.owner_name", + "uses": [ + "Query filter" + ], + "text": "The owner's display name. Limits a query to one owner's videos. Not searchable under this key: the same name is searchable through the `Owner` line." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's videos. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `loom`. Not searchable." + }, + { + "name": "has_transcript", + "uses": [ + "Stored only" + ], + "text": "Whether the transcript was included." + } + ] + } + ], + "example_searches": [ + "What does the onboarding walkthrough video say about setting up SSO?", + "Which Discord messages linked to the product demo Loom?", + "What did Alex explain in the Q3 roadmap video?" + ], + "graph": { + "connections": [ + "A Discord or Microsoft Teams message to each listed Loom video it links to, by share or embed link, up to 50 videos per message.", + "The message connects to the video once the video is synced into the same collection as the message. Until then, it points to a placeholder.", + "Videos have no links of their own to other items." + ], + "people": "The connector does not attach the owner to a video as a person. The owner's name is part of the video text.", + "from_text": "The title, owner, description and transcript." + }, + "not_synced": [ + "Videos whose share links you did not list.", + "Video and audio files, comments, reactions and view counts.", + "Removals: a link removed from the list stays in HydraDB, and so does a video deleted in Loom." + ] +} diff --git a/scripts/connector_pages/mailchimp.json b/scripts/connector_pages/mailchimp.json new file mode 100644 index 00000000..c916dc8e --- /dev/null +++ b/scripts/connector_pages/mailchimp.json @@ -0,0 +1,260 @@ +{ + "description": "Sync a Mailchimp account's sent campaigns with their email text, its audience lists and its classic automations. Each campaign links to the list it was sent to.", + "opening": [ + "Sync a Mailchimp account's sent email campaigns, audience lists and classic automations. Each campaign is one document with its settings, open and click rates, and the email text. Each campaign links to the audience list it was sent to.", + "Mailchimp permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Draft and scheduled campaigns, audience members, and the emails inside automations are not synced. Items deleted in Mailchimp stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Mailchimp uses an API key.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "A Mailchimp API key, complete with its data center suffix, such as `-us21`. HydraDB finds your account's Mailchimp address from that suffix." + } + ], + "steps": [ + { + "title": "Create the connector", + "text": "Paste the whole Mailchimp API key, including the data center suffix after the last `-`, as `api_key`." + }, + { + "title": "Configure the connector", + "text": "HydraDB lists one account-wide resource, All data. Select it to sync the whole account." + } + ], + "account": "One connector reads one Mailchimp account." + }, + "sync": { + "first_sync": "Reads every sent campaign, audience list and automation in the account, whatever their age.", + "changes": "Every sync reads all sent campaigns, lists and automations again. Open and click rates are refreshed on each sync.", + "edits": "A changed campaign, list or automation replaces its document.", + "deletes": "Deleted items are not removed. A campaign, list or automation deleted in Mailchimp stays searchable in HydraDB.", + "notes": [ + "Each sent campaign's email text is read with a separate request. If that request fails, the campaign is indexed with its settings only, and email text indexed on an earlier sync is replaced. Some failures, such as a refused request or a request that keeps timing out, can fail the whole sync." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.mailchimp_id", + "uses": [ + "Query filter" + ], + "text": "The Mailchimp id of the campaign, list or automation. Targets one item. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `mailchimp`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The record type, `campaigns`, `lists` or `automations`, shown when you inspect the item. No published filter limits a query by record type." + } + ], + "documents": [ + { + "name": "Campaigns", + "kind": "custom", + "one_document": "One sent campaign, with its email text when Mailchimp returns it.", + "title": "The campaign's internal title, else its subject line, else `Mailchimp campaigns `.", + "text": "The title, then `Subject`, `Preview`, `From`, `List`, `Type`, `Status`, `Sent`, `Open rate` and `Click rate` lines, with the rates as percentages. Then the email text: Mailchimp's plain-text version, or the HTML converted to text when there is no plain-text version.", + "date": "When the campaign was sent, or when it was created if there is no send time.", + "link_back": "The campaign's public archive page.", + "files": "None. Images and files in the email are not fetched. Only the text is kept.", + "attributes": [ + { + "name": "Email text", + "uses": [ + "Searchable text" + ], + "text": "The full email message, from the plain-text version or the converted HTML. The original plain-text and HTML content are not kept on the item." + }, + { + "name": "settings", + "uses": [ + "Searchable text" + ], + "text": "The campaign's title, subject line, preview text and sender name, written as the title and the `Subject`, `Preview` and `From` lines." + }, + { + "name": "recipients", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The audience list the campaign was sent to. Its name is written as the `List` line, and its id links the campaign to that list." + }, + { + "name": "report_summary", + "uses": [ + "Searchable text" + ], + "text": "Open and click rates, written as percentages. They are a snapshot from the latest sync." + }, + { + "name": "type, status", + "uses": [ + "Searchable text" + ], + "text": "The campaign type and status, written as the `Type` and `Status` lines." + }, + { + "name": "send_time", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the campaign was sent, written as the `Sent` line. It sets the result date." + }, + { + "name": "create_time", + "uses": [ + "Result date" + ], + "text": "When the campaign was created. Sets the result date only when there is no send time. Not searchable." + }, + { + "name": "Other campaign fields", + "uses": [ + "Stored only" + ], + "text": "Every other field of the campaign, such as `emails_sent` and tracking settings. Kept for inspection only." + } + ] + }, + { + "name": "Audience lists", + "kind": "custom", + "one_document": "One audience list. Its members are not synced.", + "title": "The list name, or `Mailchimp lists ` when there is none.", + "text": "The title, then `Permission Reminder`, `Members` and `Created` lines.", + "date": "When the list was created.", + "link_back": "The list's public signup form, not the list in Mailchimp.", + "files": "None.", + "attributes": [ + { + "name": "name", + "uses": [ + "Searchable text" + ], + "text": "The list name, written as the title and the first line." + }, + { + "name": "permission_reminder", + "uses": [ + "Searchable text" + ], + "text": "The list's permission reminder: its explanation of how people signed up or gave permission." + }, + { + "name": "stats.member_count", + "uses": [ + "Searchable text" + ], + "text": "How many members the list has, written as the `Members` line." + }, + { + "name": "date_created", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the list was created, written as the `Created` line. It sets the result date." + }, + { + "name": "Other list fields", + "uses": [ + "Stored only" + ], + "text": "Every other field of the list, such as its stats, contact details and campaign defaults. Kept for inspection only." + } + ] + }, + { + "name": "Classic automations", + "kind": "custom", + "one_document": "One automation. The emails inside it are not synced.", + "title": "The automation's title, or `Mailchimp automations ` when there is none.", + "text": "The title, then `From`, `Status`, `Emails Sent` and `Started` lines.", + "date": "When the automation started, or when it was created if there is no start time.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "settings", + "uses": [ + "Searchable text" + ], + "text": "The automation's title and sender name, written as the title and the `From` line." + }, + { + "name": "status, emails_sent", + "uses": [ + "Searchable text" + ], + "text": "The automation's status and how many emails it has sent, as of the latest sync." + }, + { + "name": "start_time", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the automation started, written as the `Started` line. It sets the result date." + }, + { + "name": "create_time", + "uses": [ + "Result date" + ], + "text": "When the automation was created. Sets the result date only when there is no start time. Not searchable." + }, + { + "name": "Other automation fields", + "uses": [ + "Stored only" + ], + "text": "Every other field of the automation. Kept for inspection only." + } + ] + } + ], + "example_searches": [ + "What did the Black Friday campaign email say, and what was its subject line?", + "What were the open and click rates of last month's newsletter?", + "Which automations are running, and how many emails have they sent?" + ], + "graph": { + "connections": [ + "A campaign to the audience list it was sent to.", + "No links to other tools." + ], + "people": "No people or groups are attached to items. Audience members are not synced.", + "from_text": "Campaign email text, and the settings of each campaign, list and automation." + }, + "not_synced": [ + "Draft, scheduled and other campaigns that were not sent.", + "Audience members, segments, segment members and unsubscribes.", + "Per-recipient email activity, such as who opened or clicked.", + "The individual emails inside an automation.", + "Images and attachments inside campaign emails.", + "Deletions: items deleted in Mailchimp stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/microsoft_teams.json b/scripts/connector_pages/microsoft_teams.json new file mode 100644 index 00000000..6d4ed790 --- /dev/null +++ b/scripts/connector_pages/microsoft_teams.json @@ -0,0 +1,423 @@ +{ + "description": "Sync channel posts and replies from the teams you choose, and the chats of the people you choose, one document per message. Team, channel and chat membership restricts search when Enforce ACL is on and HydraDB can read the members.", + "opening": [ + "Sync channel posts and replies from the Microsoft Teams teams you select, and the 1:1, group and meeting chats of the people you select. Each post, reply and chat message is one document. A reply links to its root post and a chat message to its chat, so a conversation is returned together. Text from PDF and DOCX files shared in messages is searchable when HydraDB can download and read the files.", + "With Enforce ACL on, a standard channel's messages can be read by the team's members, a private or shared channel's messages by that channel's members, and a chat's messages by its participants. Private and shared channels are skipped unless you turn on `include_private_channels`. Chats need the optional `Chat.Read.All` permission. Every sync fails until Microsoft approves your app for the Teams protected APIs. A message deleted in Teams becomes a hidden stub rather than being removed." + ], + "permissions": { + "carried": true, + "who_can_read": "A standard channel's messages can be read by the team's members. A private or shared channel's messages can be read by that channel's members, including the members of every team a shared channel is shared with. A chat's messages can be read by its participants.", + "identity": "A member's email address, in lower case.", + "when_unreadable": "If a team, channel or chat member list is missing, empty or cannot be read in full, the message is marked with a permission warning, which you can find with `additional_metadata.rbac_warning`. A partial member list is never applied.", + "notes": [ + "A team or channel with more than 5,000 members cannot be captured. Set an access rule on such a team.", + "Do not rely on a team or channel membership change to update access right away." + ] + }, + "connect": { + "auth": "Microsoft Teams uses a Microsoft Entra ID app registration with application permissions and a client secret. The same app can also back an Outlook connector.", + "credentials": [ + { + "name": "tenant", + "type": "string", + "required": true, + "text": "The Directory (tenant) ID." + }, + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The Application (client) ID." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The client secret's Value, shown once in the Azure portal." + } + ], + "settings": [ + { + "name": "include_private_channels", + "type": "boolean", + "text": "Set to `true` to also sync private and shared channels, restricted to their members. Off by default." + } + ], + "permissions_label": "Microsoft Graph application permissions to grant", + "permissions": [ + { + "name": "Team.ReadBasic.All", + "text": "lists the tenant's teams and reads each selected team's name." + }, + { + "name": "Channel.ReadBasic.All", + "text": "lists the channels of each selected team." + }, + { + "name": "ChannelMessage.Read.All", + "text": "reads channel posts and replies. A Teams protected API." + }, + { + "name": "TeamMember.Read.All", + "text": "reads each team's members, who can read its standard channels." + }, + { + "name": "ChannelMember.Read.All", + "text": "reads private and shared channel members, and the teams a channel is shared with." + }, + { + "name": "User.ReadBasic.All", + "text": "lists people for chat selection, and resolves authors to names and addresses." + }, + { + "name": "Chat.Read.All", + "text": "optional. Reads the chats of the people you select. A Teams protected API. Without it, no chats are offered." + }, + { + "name": "Files.Read.All", + "text": "optional. Lets HydraDB download PDF and DOCX files shared in messages. Messages sync without it, but without the file text." + } + ], + "permissions_note": "Request access to the Teams protected APIs at https://aka.ms/teamsgraph/requestaccess with your app id and tenant id. Until Microsoft approves the app, every Teams sync fails with a 403 error, even though the permissions show as granted.", + "steps": [ + { + "title": "Register an app", + "text": "In Microsoft Entra ID, register an app with no redirect URI and create a client secret. Copy the tenant id, the client id and the secret's Value." + }, + { + "title": "Grant permissions", + "text": "Add the Microsoft Graph application permissions above, not delegated ones, and grant admin consent." + }, + { + "title": "Request protected API access", + "text": "Request access to the Teams protected APIs with your app id and tenant id, and wait for Microsoft's approval." + }, + { + "title": "Create the connector", + "text": "Enter `tenant`, `client_id` and `client_secret`. Set `include_private_channels` to `true` to also sync private and shared channels." + }, + { + "title": "Select teams and people", + "text": "HydraDB lists the tenant's teams and users. Select the teams whose channels to sync. Select a person to sync the chats that person takes part in. Chats are opted in person by person." + }, + { + "title": "Rotate the secret", + "text": "Rotate the client secret before it expires. An expired secret stops every sync." + } + ], + "account": "One connector reads the teams and people you select in one Microsoft 365 tenant." + }, + "sync": { + "first_sync": "Each selected team and person reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the messages modified since the last sync, per team and per selected person's chats. A channel post with a new reply is picked up again, even if the post itself is old.", + "edits": "An edited message is read again and replaces its document. A new reply also makes its root post be read again.", + "deletes": "A message deleted in Teams is replaced on the next sync by a stub with the text `[deleted]`. With Enforce ACL on, nobody can read the stub. The document itself is not removed." + }, + "shared_attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The display name of the person or bot that posted, written as the From line. The graph records the message as sent by that author." + }, + { + "name": "created_at", + "uses": [ + "Searchable text" + ], + "text": "When the message was posted, written as the Sent line." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the message was last modified. Not searchable." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "The names of the people, bots or channels @mentioned. The graph records each as mentioned. This list is not searchable by itself, but the names stay in the message text." + }, + { + "name": "attachments", + "uses": [ + "Searchable text" + ], + "text": "The names of attached files, cards or links. They are searchable only when the message has no text, as its `Shared:` line. Text read from supported files is searchable separately." + }, + { + "name": "additional_metadata.has_attachments", + "uses": [ + "Query filter" + ], + "text": "`true` when the message has a non-inline attachment. Not searchable." + }, + { + "name": "additional_metadata.from_application", + "uses": [ + "Query filter" + ], + "text": "`true` when a bot posted the message. Excludes or isolates bot posts. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "Present when the message's member list could not be read in full. Finds such messages. Not searchable." + }, + { + "name": "additional_metadata.is_deleted", + "uses": [ + "Query filter" + ], + "text": "`true` on the hidden stub left by a deleted message. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's messages. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `microsoft_teams`. Not searchable." + }, + { + "name": "author_email", + "uses": [ + "Stored only" + ], + "text": "The author's email address." + }, + { + "name": "is_edited", + "uses": [ + "Stored only" + ], + "text": "Whether the message was edited." + }, + { + "name": "edited_at", + "uses": [ + "Stored only" + ], + "text": "When the message was last edited." + }, + { + "name": "reaction_count", + "uses": [ + "Stored only" + ], + "text": "How many reactions the message has." + }, + { + "name": "importance", + "uses": [ + "Stored only" + ], + "text": "`high`, `low` or `urgent`, when the message's importance is not normal." + } + ], + "documents": [ + { + "name": "Channel messages", + "kind": "message", + "one_document": "One root post in a channel, or one reply.", + "title": "The post's subject, else the first line of its text cut to about 120 characters, else `Teams message` and its id. Search matches the message text, not this title, so a subject is searchable only when it also appears in the text.", + "text": "The message flattened from HTML, with @mention tags shown as the mentioned name. A post with no text but with attachments reads `Shared:` followed by the attachment names. The author is written as a From line and the posted time as a Sent line.", + "date": "When the message was last modified, else when it was posted.", + "link_back": "The message's Teams web link.", + "files": "Attachment names are kept. Text from PDF and DOCX files up to 50 MiB is searchable separately when `Files.Read.All` is granted and HydraDB can download and read the files. Images embedded in a message are not read.", + "attributes": [ + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "For a reply, the root post it answers. Joins the reply to that post, so the whole conversation can be returned together. Not searchable." + }, + { + "name": "thread_id", + "uses": [ + "Graph connection" + ], + "text": "The root post's id. Groups a root post and its replies into one thread. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The channel's id. Limits a query to one channel. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The channel's name. Limits a query to one channel by name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `channel`. Separates channel messages from chat messages. Not searchable." + }, + { + "name": "additional_metadata.team_id", + "uses": [ + "Query filter" + ], + "text": "The team's id. Limits a query to one team. Not searchable." + }, + { + "name": "additional_metadata.team_name", + "uses": [ + "Query filter" + ], + "text": "The team's name. Limits a query to one team by name. Not searchable." + }, + { + "name": "additional_metadata.channel_membership_type", + "uses": [ + "Query filter" + ], + "text": "`standard`, `private` or `shared`. Not searchable." + }, + { + "name": "additional_metadata.is_reply", + "uses": [ + "Query filter" + ], + "text": "`true` for replies. Keeps only root posts or only replies. Not searchable." + }, + { + "name": "Team or channel", + "uses": [ + "Access rule" + ], + "text": "For a standard channel, the team's members can read the message. For a private or shared channel, the channel's members can. Not searchable." + }, + { + "name": "reply_count", + "uses": [ + "Stored only" + ], + "text": "How many replies a root post had when it was synced." + } + ] + }, + { + "name": "Chat messages", + "kind": "message", + "one_document": "One message in a 1:1, group or meeting chat.", + "title": "The first line of the text cut to about 120 characters, else `Teams chat message` and its id. Search matches the message text, not this title.", + "text": "The message flattened from HTML, or `Shared:` followed by the attachment names when there is no text. The author is written as a From line and the sent time as a Sent line.", + "date": "When the message was last modified, else when it was sent.", + "link_back": "The message's Teams web link.", + "files": "Attachment names are kept. Text from PDF and DOCX files up to 50 MiB is searchable separately when `Files.Read.All` is granted and HydraDB can download and read the files. Images embedded in a message are not read.", + "attributes": [ + { + "name": "thread_id", + "uses": [ + "Graph connection" + ], + "text": "The chat's id. Groups all messages of one chat into one thread. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "Also the chat's id. Keeps a chat's messages together, so earlier messages are read as context. The chat itself is not a document. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The chat's id. Limits a query to one chat. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The chat's topic, or up to four participant names. Limits a query to one chat by name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `chat`. Separates chat messages from channel messages. Not searchable." + }, + { + "name": "additional_metadata.chat_type", + "uses": [ + "Query filter" + ], + "text": "`oneOnOne`, `group` or `meeting`. Not searchable." + }, + { + "name": "additional_metadata.is_reply", + "uses": [ + "Query filter" + ], + "text": "Always `false` for chat messages. Not searchable." + }, + { + "name": "Chat", + "uses": [ + "Access rule" + ], + "text": "The chat's participants can read its messages. Not searchable." + }, + { + "name": "participants", + "uses": [ + "Stored only" + ], + "text": "The names of the chat's participants. They are not attached to the message in the graph." + } + ] + } + ], + "example_searches": [ + "What did the Platform team decide in the incidents channel about the database migration?", + "What did Alex say in our 1:1 chat about the launch date?", + "Show the replies to the post announcing the new on-call rotation." + ], + "graph": { + "connections": [ + "A channel reply to its root post.", + "Every chat message to its chat, so a chat's messages are kept together.", + "A message to any Loom video it links to, which resolves when that video is synced into the same collection.", + "No other links to other tools." + ], + "people": [ + "The author of each message.", + "The people, bots and channels @mentioned in a message.", + "Chat participants are kept with each chat message but not attached in the graph." + ], + "from_text": "The message text." + }, + "not_synced": [ + "Private and shared channels, unless `include_private_channels` is on.", + "Chats of people you did not select, and every chat without `Chat.Read.All`.", + "Shared file formats other than PDF and DOCX, and images embedded in a message.", + "System event messages.", + "Reactions, apart from their count." + ] +} diff --git a/scripts/connector_pages/mixpanel.json b/scripts/connector_pages/mixpanel.json new file mode 100644 index 00000000..3bf68def --- /dev/null +++ b/scripts/connector_pages/mixpanel.json @@ -0,0 +1,270 @@ +{ + "description": "Sync one Mixpanel project's events, daily funnel results, saved cohorts and annotations, with each event's user named from their Mixpanel profile.", + "opening": [ + "Sync one Mixpanel project's events, daily funnel results, saved cohorts and project annotations. Each event is one document that names the event, the user and up to 30 of the event's properties. The user's name and email come from their Mixpanel profile when one exists.", + "Mixpanel permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Events without an insert id can be treated as one event, so some of them can be lost. Annotations sync only with a service account. Cohorts and annotations deleted in Mixpanel stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Mixpanel uses the project's API secret. Add a service account as well to sync annotations.", + "credentials": [ + { + "name": "api_secret", + "type": "secret string", + "required": true, + "text": "The Mixpanel project's API secret." + }, + { + "name": "username", + "type": "string", + "text": "A service account's username, from Organization Settings, Service Accounts. Needed to sync annotations." + }, + { + "name": "password", + "type": "secret string", + "text": "That service account's secret. Set it together with `username` and `project_id`." + }, + { + "name": "project_id", + "type": "string", + "text": "The Mixpanel project id, a number. Required when you use a service account." + } + ], + "steps": [ + { + "title": "Create a service account, for annotations", + "text": "To sync annotations, create a service account in Mixpanel under Organization Settings, Service Accounts. Without one, everything except annotations syncs." + }, + { + "title": "Create the connector", + "text": "Paste the project's API secret as `api_secret`. If you created a service account, add its username as `username`, its secret as `password`, and the project id as `project_id`." + }, + { + "title": "Configure the connector", + "text": "HydraDB lists one account-wide resource, All data. Select it to sync the whole project the credentials reach." + } + ], + "account": "One connector reads one Mixpanel project." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default. Events and annotations reach back at most 365 days, and funnel results at most 90 days.", + "changes": "Events, funnel results and annotations are read by date. Cohorts are read by when they were created.", + "edits": "An event read again with the same insert id, or a funnel day read again, replaces its document. A cohort is read by its creation time, so a later edit to an older cohort may not come across. A change to a user's profile does not update events already synced.", + "deletes": "Deleted cohorts and annotations are not removed. A cohort or annotation deleted in Mixpanel stays searchable in HydraDB.", + "notes": [ + "If a Mixpanel request keeps failing after retries, the sync fails instead of skipping that data.", + "Event times are converted using UTC. The connection form has no project-timezone setting." + ] + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `mixpanel`. Not searchable." + } + ], + "documents": [ + { + "name": "Events", + "kind": "custom", + "one_document": "One event. An event read again with the same insert id updates the same document. Events without an insert id, as older events can be, may be treated as the same event, and all but one of them lost.", + "title": "The event name, or `Mixpanel event ` when there is none.", + "text": "`Event`, `User` and `When` lines, then up to 30 of the event's properties in alphabetical order as `property: value`. Mixpanel's `$` and `mp_reserved_` prefixes are removed from property names. The title is searchable too.", + "date": "The event time in UTC. Times are converted from the project timezone, which defaults to UTC, so events from a project set to another timezone can have shifted times.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "event", + "uses": [ + "Searchable text" + ], + "text": "The event name, written as the title and the `Event` line." + }, + { + "name": "User", + "uses": [ + "Searchable text" + ], + "text": "The user's name and email from their Mixpanel profile, as `name (email)`. When no profile name or email is found, for example because the Mixpanel plan has no user profiles, the line shows the raw `distinct_id` instead. Older events keep the name and email they were synced with." + }, + { + "name": "time", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the event happened, written as the `When` line. It sets the result date." + }, + { + "name": "Event properties", + "uses": [ + "Searchable text" + ], + "text": "Up to 30 non-empty properties with a single value each, such as a plan name. Properties past the 30th, and properties whose value is an object or a list, are not kept or searchable." + }, + { + "name": "additional_metadata.mixpanel_event", + "uses": [ + "Query filter" + ], + "text": "The event name. Limits a query to one event name. Not searchable." + }, + { + "name": "additional_metadata.mixpanel_distinct_id", + "uses": [ + "Query filter" + ], + "text": "The user's `distinct_id`. Limits a query to one user's events, whether or not their profile was found. Not searchable." + } + ] + }, + { + "name": "Funnel days", + "kind": "custom", + "one_document": "One funnel's results for one day.", + "title": "The funnel name, or `Mixpanel funnel :` when there is none.", + "text": "`Funnel` and `Date` lines, then one line per step: `Step N: - count `. The title is searchable too.", + "date": "The funnel day.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "name", + "uses": [ + "Searchable text" + ], + "text": "The funnel name, written as the title and the `Funnel` line." + }, + { + "name": "date", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "The day, written as the `Date` line. It sets the result date when Mixpanel supplies no date and time for the day." + }, + { + "name": "datetime", + "uses": [ + "Result date" + ], + "text": "The date and time Mixpanel supplies for the funnel day. When present, it sets the result date. Not searchable." + }, + { + "name": "funnel_id", + "uses": [ + "Searchable text" + ], + "text": "The funnel id. Searchable only in a title used when the funnel has no name." + }, + { + "name": "additional_metadata.mixpanel_funnel_id", + "uses": [ + "Query filter" + ], + "text": "The funnel id. Limits a query to one funnel. Not searchable." + } + ] + }, + { + "name": "Cohorts", + "kind": "custom", + "one_document": "One saved cohort.", + "title": "The cohort name, or `Mixpanel cohort ` when there is none.", + "text": "The `Cohort` line, the description and a `Members` line with the member count. The title is searchable too.", + "date": "When the cohort was created.", + "link_back": "None.", + "files": "None. The list of members is not synced.", + "attributes": [ + { + "name": "name", + "uses": [ + "Searchable text" + ], + "text": "The cohort name, written as the title and the `Cohort` line." + }, + { + "name": "description", + "uses": [ + "Searchable text" + ], + "text": "The cohort description." + }, + { + "name": "count", + "uses": [ + "Searchable text" + ], + "text": "How many members the cohort has, written as the `Members` line." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the cohort was created, as Mixpanel reports it. Not searchable." + } + ] + }, + { + "name": "Annotations", + "kind": "custom", + "one_document": "One project annotation.", + "title": "The start of the description, up to 80 bytes, or `Mixpanel annotation` followed by its id when there is no description. A long title in a non-Latin script can be cut in the middle of a character.", + "text": "The annotation's description. The title is searchable too.", + "date": "The annotation date.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "description", + "uses": [ + "Searchable text" + ], + "text": "The annotation text, which also supplies the title." + }, + { + "name": "date", + "uses": [ + "Result date" + ], + "text": "The date the annotation is attached to. Not searchable." + } + ] + } + ], + "example_searches": [ + "When did jane@example.com last complete Checkout Completed?", + "How many users reached each step of the Onboarding funnel on 2026-11-02?", + "What is the Power users cohort, and how many members does it have?" + ], + "graph": { + "connections": [ + "None. Events are not linked to funnels, cohorts or each other.", + "No links to other tools." + ], + "people": "No people are attached to items. The user named in an event's `User` line is part of the text only.", + "from_text": "The event, funnel, cohort and annotation text." + }, + "not_synced": [ + "Annotations, when no service account is set.", + "Cohort members.", + "Daily event counts and retention reports.", + "Revenue reports. Mixpanel retired them.", + "User profiles as their own documents. A profile only supplies the name and email shown on events.", + "Event properties past the 30th, and properties whose value is an object or a list.", + "Deletions: cohorts and annotations deleted in Mixpanel stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/monday.json b/scripts/connector_pages/monday.json new file mode 100644 index 00000000..4d3c8eca --- /dev/null +++ b/scripts/connector_pages/monday.json @@ -0,0 +1,242 @@ +{ + "description": "Sync items, subitems and the readable files attached to them from the Monday.com boards you choose. Monday.com permissions are not imported.", + "opening": [ + "Sync items and subitems from the Monday.com boards you select. Each item is one document with its name and every filled column value. Each attached file whose text can be read becomes its own page, linked to its item. Subitems link to their parent, and board-relation columns link items to each other.", + "Monday.com permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Item updates, the comments on an item, are not synced. People columns are text only. Items archived or deleted in Monday.com stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "The token lists only boards its user can open, but synced items do not keep that restriction. Item-level visibility is not reproduced either. Set an access rule on each board that should be restricted.", + "Each selected board shows a warning in connector status that its permissions are not captured." + ] + }, + "connect": { + "auth": "Monday.com uses an API token: a personal token, or an OAuth access token from an app with `boards:read`.", + "credentials": [ + { + "name": "auth_token", + "type": "secret string", + "required": true, + "text": "A Monday.com personal API token, or an OAuth access token." + } + ], + "credentials_note": "Monday.com limits API complexity and daily calls by plan. Very large boards can need a longer sync interval. To rotate a personal token, update the connector with the new token and check that it works before revoking the old one.", + "permissions_label": "Scope for an OAuth app token", + "permissions": [ + { + "name": "boards:read", + "text": "lists boards and reads items and column values." + } + ], + "steps": [ + { + "title": "Get a token", + "text": "In Monday.com, open Profile, Developers, My Access Tokens and copy your personal token, or use an OAuth app token with `boards:read`. Use a user who can open every board you plan to select. Private boards that user cannot open are not listed." + }, + { + "title": "Create the connector", + "text": "Paste the token as `auth_token`." + }, + { + "title": "Select boards", + "text": "HydraDB lists every board the token can see. Select the boards to sync." + } + ], + "account": "One connector reads the boards one token's Monday.com user can open." + }, + "sync": { + "first_sync": "A newly selected board reads back the window set by `lookback_days`, 30 days by default, measured on when items were last updated.", + "changes": "Each sync reads every item and subitem updated since the last sync, and the files on those items. Up to four boards sync at once.", + "edits": "An edited item is picked up through its last-updated time and updates its document. Its files are read again.", + "deletes": "Items archived or deleted in Monday.com stay searchable in HydraDB.", + "notes": [ + "If a board makes no progress for five minutes, that sync fails and the board is tried again on the next sync." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.monday_board_id", + "uses": [ + "Query filter" + ], + "text": "The board id. Limits a query to one board. Not searchable." + }, + { + "name": "additional_metadata.monday_board_name", + "uses": [ + "Query filter" + ], + "text": "The board name. Limits a query to one board by name. Empty when the board name could not be read. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `monday`. Not searchable." + } + ], + "documents": [ + { + "name": "Items", + "kind": "ticket", + "one_document": "One Monday.com item or subitem, at any level.", + "title": "The item name, or `Monday item` and the board and item ids when the name is empty.", + "text": "The item name, then one line per filled column, as `Column title: value`. An item with no column values is just its name. The item key, creation date and parent are written into the item details too. The title is searchable too.", + "date": "When the item was last updated, or when it was created if there is no update time.", + "link_back": "The item's card in Monday.com.", + "files": "Attached files are their own documents, described below.", + "attributes": [ + { + "name": "Column values", + "uses": [ + "Searchable text" + ], + "text": "Each filled column, such as status, people, dates, numbers and text, as `Column title: value`. People columns are text only: owners and assignees are not added to the graph as people." + }, + { + "name": "Item key", + "uses": [ + "Searchable text" + ], + "text": "The board id and item id together. It keeps later syncs on the same document." + }, + { + "name": "created_at", + "uses": [ + "Searchable text" + ], + "text": "When the item was created, written as the `Created` line." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the item was last updated. Sets the result date and decides when a sync picks the item up. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "For a subitem, its parent item, written as the `Parent` line. Links the subitem to its parent." + }, + { + "name": "Board-relation columns", + "uses": [ + "Graph connection" + ], + "text": "Each item a board-relation column points to becomes a link from this item, as long as that item is also synced, which means it is on a selected board. The linked ids themselves are not searchable." + }, + { + "name": "additional_metadata.monday_id", + "uses": [ + "Query filter" + ], + "text": "The item id. Picks out one item. Not searchable." + }, + { + "name": "state", + "uses": [ + "Stored only" + ], + "text": "The item's state: `active`, `archived` or `deleted`." + }, + { + "name": "board_id", + "uses": [ + "Stored only" + ], + "text": "The board id." + }, + { + "name": "board_name", + "uses": [ + "Stored only" + ], + "text": "The board name." + } + ] + }, + { + "name": "Files", + "kind": "knowledge_base", + "one_document": "One file attached to an item, once its text has been read. A file whose text could not be read is not synced.", + "title": "The file name, with `.pdf` or `.docx` added when the name has no extension, or `Monday attachment` and the file id when the name is empty.", + "text": "The text read from the file, or the file name when there is no text. The update time is written as the `Updated` line. The title is searchable too.", + "date": "When the file was last updated, else when it was created, else when its item was last updated.", + "link_back": "The card of the item the file is attached to.", + "attributes": [ + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the file was last updated, written as the `Updated` line. Sets the result date." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "The item the file is attached to. Links the file to that item, so an item and its files are found together. Not searchable." + }, + { + "name": "board_id, board_name", + "uses": [ + "Stored only" + ], + "text": "The board of the item the file is attached to." + }, + { + "name": "item_id", + "uses": [ + "Stored only" + ], + "text": "The id of the item the file is attached to." + }, + { + "name": "file_extension", + "uses": [ + "Stored only" + ], + "text": "`pdf` or `docx`." + } + ] + } + ], + "example_searches": [ + "Which items on the Marketing Campaigns board are marked Stuck?", + "What does the contract PDF attached to the Acme onboarding item say?", + "What are the subitems of the Website Launch item?" + ], + "graph": { + "connections": [ + "A subitem to its parent item.", + "An item to each item in its board-relation columns, when that item is also synced.", + "A file to the item it is attached to.", + "No links to items in other tools." + ], + "people": "No people are attached to items. People columns, such as owners and assignees, are text only.", + "from_text": "The column values of every item, and the text of attached files." + }, + "not_synced": [ + "Boards you did not select, and boards the token's user cannot open.", + "Item updates: the comments and replies on an item.", + "Archived and deleted items. One that was synced earlier stays searchable.", + "Files whose text could not be read.", + "Board views, groups, columns, workspaces and users as items of their own.", + "Monday.com docs and dashboards." + ] +} diff --git a/scripts/connector_pages/notion.json b/scripts/connector_pages/notion.json new file mode 100644 index 00000000..52fb764c --- /dev/null +++ b/scripts/connector_pages/notion.json @@ -0,0 +1,170 @@ +{ + "description": "Sync page text from selected Notion pages and databases, one document per page. Database properties other than titles are not synced.", + "opening": [ + "Sync the Notion databases and top-level pages you share with the connector's integration. Each page is one document: a database row, a selected page, and every sub-page under them. Each sub-page links to the page it sits under.", + "A database row brings in its title and page text only. Status, owner, dates, tags and other properties are not read. Notion page sharing is not imported, so every synced page is visible to everyone who can query the collection unless you set an access rule. Pages deleted or unshared in Notion stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Notion uses an internal integration token.", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "required": true, + "text": "A Notion internal integration token. It starts with `secret_` or `ntn_`." + } + ], + "permissions_label": "Capabilities to give the integration", + "permissions": [ + { + "name": "Read content", + "text": "required. Lets HydraDB search, read pages and blocks, and query databases." + }, + { + "name": "Read user information without email", + "text": "optional. Lets HydraDB check the token and show who created a page." + } + ], + "steps": [ + { + "title": "Create an integration", + "text": "In Notion, create an internal integration with the Read content capability, and copy its token." + }, + { + "title": "Share content with it", + "text": "Share each database and page you want synced with the integration. HydraDB can list only what the integration can see." + }, + { + "title": "Create the connector", + "text": "Paste the token as `access_token`." + }, + { + "title": "Select resources", + "text": "HydraDB lists every database the integration can see, and every page that sits at the top of the workspace. Select at least one database or top-level page." + } + ], + "account": "One connector reads what one integration can see.", + "scope_unit": "Notion workspace" + }, + "sync": { + "first_sync": "A database reaches back 30 days by last edited time by default, set by `lookback_days`. A selected page and its sub-pages are read again on every sync.", + "changes": "For a database, rows edited since the last sync are read again in full, with their sub-pages. For a selected page, the whole page tree is read on every sync, and the pages edited since the last sync are sent.", + "edits": "For a directly selected page tree, edited pages replace their existing documents on the next sync. For a sub-page under a database row, the change is picked up only when the database row is also edited.", + "deletes": "Pages deleted or unshared in Notion are not removed. They stay searchable in HydraDB.", + "notes": [ + "Sub-pages are followed up to 10 levels deep, and blocks up to 20 levels deep.", + "If a sub-page or block is unavailable, its content is omitted. Other accessible content on the page can still sync." + ] + }, + "documents": [ + { + "name": "Pages", + "kind": "knowledge_base", + "one_document": "One Notion page: a database row, a selected page, or any sub-page under them. A sub-page is its own document, not part of its parent's text.", + "title": "The page's title. A page without a title uses its Notion id.", + "text": "The page title at the top, the creator as an `Author` line, and the plain text of the page's blocks in order, one block per line: paragraphs, headings, bulleted and numbered lists, to-dos, toggles, quotes, callouts and code. Text inside toggles and callouts is included.", + "date": "When the page was last edited.", + "link_back": "The page in Notion.", + "files": "Images and files remain links to the originals. Image text is searchable only when image reading is available in your deployment. Do not rely on PDF or Word attachment text being searchable.", + "attributes": [ + { + "name": "created_by", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The creator's display name, or their Notion id if the name cannot be read. It is the `Author` line of the text, and the graph records the page as written by that person." + }, + { + "name": "last_edited_time", + "uses": [ + "Result date" + ], + "text": "When the page was last edited. Not searchable." + }, + { + "name": "additional_metadata.notion_page_id", + "uses": [ + "Query filter" + ], + "text": "The page's Notion id. Limits a query to one page. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's pages. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `notion`. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "For a sub-page, the page it sits under. Links the two, so a page tree is connected in the graph. Not searchable." + }, + { + "name": "created_by_email", + "uses": [ + "Graph identity" + ], + "text": "The creator's email, when Notion returns one. It lets the graph recognise the same person across tools. Not searchable." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "People @mentioned in the page. The graph records each as mentioned by the page. The field itself is not searchable, but the page text it comes from is." + }, + { + "name": "created_at", + "uses": [ + "Stored only" + ], + "text": "When the page was created." + }, + { + "name": "last_edited_by", + "uses": [ + "Stored only" + ], + "text": "The Notion user id of the last editor. It is not turned into a name or a person." + } + ] + } + ], + "example_searches": [ + "What does our onboarding page say about laptop setup?", + "Which Notion pages did Priya create?", + "What sub-pages sit under the Engineering Handbook page?" + ], + "graph": { + "connections": [ + "A sub-page to the page it sits under.", + "No links from Notion pages to other tools. In the other direction, GitHub issues, pull requests and comments that link to a Notion page are linked to it." + ], + "people": [ + "The page's creator, with an email when Notion returns one.", + "People @mentioned in the page." + ], + "from_text": "The page text, including people and projects named in plain text rather than @mentioned. Database properties are not read, so anything kept only in database columns cannot be found." + }, + "not_synced": [ + "Property values other than the title, such as status, owner, dates and tags, are not read.", + "Comments on pages.", + "Pages and databases not shared with the integration.", + "Text in unsupported blocks, such as table rows, equations, embeds and bookmarks.", + "Deletions: deleted pages stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/okta.json b/scripts/connector_pages/okta.json new file mode 100644 index 00000000..39e73f8c --- /dev/null +++ b/scripts/connector_pages/okta.json @@ -0,0 +1,429 @@ +{ + "description": "Sync every user, group and application in your Okta org, plus System Log events. Okta permissions are not carried over.", + "opening": [ + "Sync every user, group and application in your Okta org, plus System Log events. Each user, group, application and log event is one document. A group lists its members, an application its assigned users, and a user the active MFA factors HydraDB found.", + "Okta permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. These records do not prove who has access today or that MFA is off: a missing factor can mean a factor read failed. Users, groups and applications deleted in Okta stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "Okta reads are governed by the admin role on the token, not by anything on a user, group, application or event, so there is nothing per item to import.", + "Application assignments and self-service settings are not treated as read permissions." + ] + }, + "connect": { + "auth": "Okta uses an API token. The token gets the admin role of the person who creates it, so create it while signed in as a Read-only Administrator.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "An Okta API token, from Security, API, Tokens, Create Token." + }, + { + "name": "service_url", + "type": "string", + "required": true, + "text": "Your org's API address with the `/api/v1/` path and the trailing slash: `https://.okta.com/api/v1/`." + } + ], + "credentials_note": "The token stops working if the account that created it is deactivated, and Okta expires a token after 30 days without use.", + "permissions_label": "What the token's admin role needs", + "permissions": [ + { + "name": "Read-only Administrator", + "text": "the role of the person who creates the token." + }, + { + "name": "View users and their details" + }, + { + "name": "View groups and their details" + }, + { + "name": "View applications and their details" + }, + { + "name": "View System Log", + "text": "without it, the sync fails with an error instead of skipping log events." + } + ], + "steps": [ + { + "title": "Sign in as a Read-only Administrator", + "text": "Sign in to the Okta admin console as a Read-only Administrator, so the token gets that role. Use a long-lived admin account." + }, + { + "title": "Create a token", + "text": "Open Security, API, Tokens and create a token. Set where API calls made with this token must come from: Any IP, unless you have a network zone for HydraDB's addresses. Without this setting, creating the token fails with an unclear error." + }, + { + "title": "Check the role", + "text": "In the token list, check the Role column to confirm the role the token got." + }, + { + "title": "Create the connector", + "text": "Paste the token as `api_key` and your org's API address as `service_url`, with `/api/v1/` and the trailing slash." + }, + { + "title": "Nothing to select", + "text": "Okta has no resources to choose. The connector reads the whole org." + } + ], + "account": "One connector reads one Okta org." + }, + "sync": { + "first_sync": "Users, groups, applications, group members, application assignments and MFA factors are read in full. System Log events reach back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the whole directory again, and System Log events newer than the last sync. Users, groups and applications that did not change are skipped.", + "edits": "A change to a user, group or application updates its document. A change only to a group's members, an application's assignments or a user's MFA factors may not show until the group, application or user itself changes.", + "deletes": "Users, groups and applications deleted in Okta stay searchable in HydraDB. A removed MFA factor can stay listed on the user.", + "notes": [ + "MFA factors are read one user at a time, with a one-second pause per user. If one user's factors cannot be read, that user's factors are skipped and the sync goes on. If Okta rejects the token, the sync fails." + ] + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `okta`. Not searchable." + } + ], + "documents": [ + { + "name": "Users", + "kind": "custom", + "one_document": "One Okta user.", + "title": "The first and last name, else the login, else `Okta user` with the user's id.", + "text": "The name, then `Login`, `Email`, `Title`, `Department`, `Manager`, `Organization`, `Location`, `Second Email`, `Mobile Phone`, `Status`, `MFA`, `Created` and `Last Login` lines. Profile attributes outside this list are not synced. The title is searchable too.", + "date": "When the user was last updated in Okta, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The primary email, written as the `Email` line. Identifies the user as a person in the graph. The name does not." + }, + { + "name": "first_name, last_name", + "uses": [ + "Searchable text" + ], + "text": "The user's name, used for the title and the first line." + }, + { + "name": "login", + "uses": [ + "Searchable text" + ], + "text": "The username, written as the `Login` line. It is the title when the user has no name." + }, + { + "name": "job_title, department, organization", + "uses": [ + "Searchable text" + ], + "text": "Written as the `Title`, `Department` and `Organization` lines." + }, + { + "name": "manager", + "uses": [ + "Searchable text" + ], + "text": "The manager's name from the profile, written as the `Manager` line. It does not create the manager link." + }, + { + "name": "managerId", + "uses": [ + "Graph connection" + ], + "text": "Links the user to their manager's user record when it matches exactly one user by id, employee number or login, ignoring case. Not kept as a field. Not searchable." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The account state, written as the `Status` line." + }, + { + "name": "mfa_factors", + "uses": [ + "Searchable text" + ], + "text": "The active factor types and providers HydraDB found, written as the `MFA` line. A missing factor does not prove MFA is off: a user's factor read can fail and be skipped, and a removed factor can stay listed." + }, + { + "name": "created", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the user was created, written as the `Created` line. The result date when the user has no last-updated time." + }, + { + "name": "last_login", + "uses": [ + "Searchable text" + ], + "text": "The last recorded login, written as the `Last Login` line. Not used as the result date." + }, + { + "name": "last_updated", + "uses": [ + "Result date" + ], + "text": "When the user was last updated in Okta. Not searchable." + }, + { + "name": "additional_metadata.okta_user_id", + "uses": [ + "Query filter" + ], + "text": "The Okta user id. Picks out one user. Not searchable." + }, + { + "name": "activated", + "uses": [ + "Stored only" + ], + "text": "When the account was activated." + } + ] + }, + { + "name": "Groups", + "kind": "custom", + "one_document": "One Okta group, with its members.", + "title": "The group name, else `Okta group` with the group's id.", + "text": "The name, then `Description`, `Type`, `Members` and `Created` lines. The title is searchable too.", + "date": "When the group was last updated in Okta, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "description", + "uses": [ + "Searchable text" + ], + "text": "The group description." + }, + { + "name": "group_type", + "uses": [ + "Searchable text" + ], + "text": "Whether the group is managed in Okta, comes from an application, or is built in." + }, + { + "name": "members", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "Up to 200 distinct member names, with a count of the rest and of members without a name. Each member is linked to their user record." + }, + { + "name": "Source application", + "uses": [ + "Graph connection" + ], + "text": "A group that comes from an application is linked to that application's record. Not searchable." + }, + { + "name": "created", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the group was created, written as the `Created` line. The result date when the group has no last-updated time." + }, + { + "name": "last_updated", + "uses": [ + "Result date" + ], + "text": "When the group was last updated in Okta. Not searchable." + }, + { + "name": "additional_metadata.okta_group_id", + "uses": [ + "Query filter" + ], + "text": "The Okta group id. Picks out one group. Not searchable." + }, + { + "name": "member_count", + "uses": [ + "Stored only" + ], + "text": "How many members the group has, including any beyond the 200 names in the text." + } + ] + }, + { + "name": "Applications", + "kind": "custom", + "one_document": "One Okta application, with its assignments.", + "title": "The application label, else its internal name, else `Okta application` with its id.", + "text": "The label, then `App`, `Status`, `Sign-On Mode`, `Assigned Users` and `Created` lines. Assigned groups are not written into the text. The title is searchable too.", + "date": "When the application was last updated in Okta, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "name", + "uses": [ + "Searchable text" + ], + "text": "The internal app name, written as the `App` line. It is the title when the application has no label." + }, + { + "name": "status, sign_on_mode", + "uses": [ + "Searchable text" + ], + "text": "The application state and its sign-on mode, such as `SAML_2_0`." + }, + { + "name": "assigned_users", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "Up to 200 distinct assigned user names, with a count of the rest. Each assigned user is linked to the application." + }, + { + "name": "Assigned groups", + "uses": [ + "Graph connection" + ], + "text": "Each group assigned to the application is linked to it. Not searchable." + }, + { + "name": "created", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the application was created, written as the `Created` line. The result date when the application has no last-updated time." + }, + { + "name": "last_updated", + "uses": [ + "Result date" + ], + "text": "When the application was last updated in Okta. Not searchable." + }, + { + "name": "additional_metadata.okta_application_id", + "uses": [ + "Query filter" + ], + "text": "The Okta application id. Picks out one application. Not searchable." + }, + { + "name": "assigned_user_count, assigned_group_count", + "uses": [ + "Stored only" + ], + "text": "How many users and groups are assigned to the application." + } + ] + }, + { + "name": "System Log events", + "kind": "custom", + "one_document": "One System Log event.", + "title": "The event's display message, else its event type, else `Okta event` with its id.", + "text": "The message, then `Event Type`, `Outcome`, `Actor`, `Severity` and `Published` lines. The title is searchable too.", + "date": "When the event was published.", + "link_back": "None.", + "attributes": [ + { + "name": "event_type", + "uses": [ + "Searchable text" + ], + "text": "The event type, written as the `Event Type` line. It is the title when the event has no display message." + }, + { + "name": "outcome, severity", + "uses": [ + "Searchable text" + ], + "text": "The result with its reason, and the severity." + }, + { + "name": "actor", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "Who performed the action, by display name, else alternate id, else id, written as the `Actor` line. The event is linked to that person's user record." + }, + { + "name": "Targets", + "uses": [ + "Graph connection" + ], + "text": "The users, applications and groups the event acted on. The event is linked to each of their records. Not searchable." + }, + { + "name": "published", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the event happened, written as the `Published` line." + }, + { + "name": "additional_metadata.okta_log_uuid", + "uses": [ + "Query filter" + ], + "text": "The event's Okta id. Picks out one event. Not searchable." + } + ] + } + ], + "example_searches": [ + "Which members are listed for the Engineering-Admins group?", + "Which recorded sign-in events failed yesterday?", + "Who is linked as this user's manager?" + ], + "graph": { + "connections": [ + "A user to their manager.", + "A group to each of its members.", + "A group that comes from an application to that application.", + "An application to each assigned user and group.", + "A System Log event to the user who performed it, and to each user, application or group it acted on.", + "A link is made only when its target was synced by this connector. Each item has at most 200 links.", + "No links to items in other tools." + ], + "people": [ + "Each user, identified by primary email.", + "Groups and applications are linked records, not people.", + "Managers, members, assignees and event actors are linked to user records, not added as separate people." + ], + "from_text": "The text of users, groups, applications and events, including department, organization and location." + }, + "not_synced": [ + "Policies, authorization servers, network zones and admin role assignments.", + "Custom profile attributes outside the fields listed above.", + "System Log events older than the sync window.", + "Member and assignee names beyond 200 per group or application, and links beyond 200 per item.", + "Group memberships and application assignments as their own documents. They are shown on the group or application.", + "Deletions: users, groups and applications deleted in Okta stay in HydraDB, and a removed MFA factor can stay listed on the user." + ] +} diff --git a/scripts/connector_pages/outlook.json b/scripts/connector_pages/outlook.json new file mode 100644 index 00000000..f68ec3d6 --- /dev/null +++ b/scripts/connector_pages/outlook.json @@ -0,0 +1,324 @@ +{ + "description": "Sync emails from the Microsoft 365 mailboxes you choose, one document per email in each mailbox. Each email is restricted to its mailbox owner when Enforce ACL is on and the owner's address can be read.", + "opening": [ + "Sync emails from the Microsoft 365 mailboxes you select. Each email in each mailbox is one document, so a message received by two selected mailboxes is two documents. An email is grouped with the rest of its conversation in that mailbox. Text from supported images and PDF and DOCX attachments is searchable when HydraDB can download and read the files.", + "With Enforce ACL on, an email can be read only by the owner of the mailbox it came from. Recipients do not get access through someone else's mailbox. `Mail.Read` gives the app every mailbox in your tenant unless you limit it in Exchange. Drafts, Junk Email, Deleted Items and a few other folders are not synced, and permanently deleted mail stays in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "Each email can be read only by the owner of the mailbox it was synced from. Recipients appear in the text and the graph, but get no access through another person's copy. To let a recipient find an email, select their mailbox too: their copy carries their own access.", + "identity": "The mailbox address, in lower case.", + "when_unreadable": "If HydraDB cannot resolve a mailbox owner's address, the email is marked with a permission warning, which you can find with `additional_metadata.rbac_warning`.", + "notes": [ + "Shared and delegated mailbox access is not reflected. Only the mailbox's own address can read its emails." + ] + }, + "connect": { + "auth": "Outlook uses a Microsoft Entra ID app registration with application permissions and a client secret. The same app can also back a Microsoft Teams connector.", + "credentials": [ + { + "name": "tenant", + "type": "string", + "required": true, + "text": "The Directory (tenant) ID." + }, + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The Application (client) ID." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The client secret's Value." + } + ], + "credentials_note": "The form also shows `include_private_channels`. It is a Microsoft Teams setting and has no effect on mail.", + "permissions_label": "Microsoft Graph application permissions to grant", + "permissions": [ + { + "name": "User.ReadBasic.All", + "text": "lists mailboxes for you to select, and resolves senders and recipients to names and addresses." + }, + { + "name": "Mail.Read", + "text": "reads the mail of the selected mailboxes." + } + ], + "permissions_note": "`Mail.Read` grants the app every mailbox in the tenant. To limit it to the mailboxes you select, create an Exchange application access policy with `New-ApplicationAccessPolicy`, naming the app id and a group, with `RestrictAccess`. A selected mailbox outside the policy fails its sync with a message that names the policy.", + "steps": [ + { + "title": "Register an app", + "text": "In Microsoft Entra ID, register an app and create a client secret. Copy the tenant id, the client id and the secret's Value." + }, + { + "title": "Grant permissions", + "text": "Add the Microsoft Graph application permissions above, not delegated ones, and grant admin consent." + }, + { + "title": "Limit mailbox access", + "text": "Optional. Create an Exchange application access policy so the app can read only the mailboxes you plan to select." + }, + { + "title": "Create the connector", + "text": "Enter `tenant`, `client_id` and `client_secret`." + }, + { + "title": "Select mailboxes", + "text": "HydraDB lists the tenant's users as mailboxes. Select the mailboxes to sync." + }, + { + "title": "Rotate the secret", + "text": "Rotate the client secret before it expires." + } + ], + "account": "One connector reads the mailboxes you select in one Microsoft 365 tenant." + }, + "sync": { + "first_sync": "Each selected mailbox reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the mail in each selected mailbox whose last-modified time moved since the last sync.", + "edits": "An email moved to another folder or recategorised is read again and replaces its document.", + "deletes": "Mail moved to Deleted Items or Junk Email is replaced by a hidden stub only when it was received at or before the start of the time window that sync reads. With Enforce ACL on, nobody can read the stub. Other deleted mail, and mail deleted permanently, stays searchable in HydraDB." + }, + "documents": [ + { + "name": "Emails", + "kind": "email", + "one_document": "One email in one mailbox. A message received by two selected mailboxes is two documents. Drafts are skipped.", + "title": "The subject, or `Email` and the Message-ID when there is no subject.", + "text": "The subject, the sender, the To and CC lines and the sent time, then the email's text with HTML stripped. When there is no text body, the preview is used, else the title. Bcc recipients are not in the text.", + "date": "When the email was received, else when it was sent, else when it was created.", + "link_back": "The message's Outlook web link.", + "files": "Text from images, including inline images, and from PDF and DOCX attachments is searchable separately when HydraDB can download and read the files. Other attachments keep only their names.", + "attributes": [ + { + "name": "from", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The sender as `Name
`, written as the From line. The graph records the email as sent by that person." + }, + { + "name": "to", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The To recipients, written as the To line. The graph records each as a recipient." + }, + { + "name": "cc", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The CC recipients, written as the CC line. The graph records each as copied." + }, + { + "name": "bcc", + "uses": [ + "Graph identity" + ], + "text": "The Bcc recipients, present only on mail in the sender's own mailbox. The graph records each as a Bcc recipient. Not searchable." + }, + { + "name": "sent_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the email was sent, written as the Date line. The result date when the received time is missing." + }, + { + "name": "received_at", + "uses": [ + "Result date" + ], + "text": "When the email was received. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the email was created. The result date only when the received and sent times are both missing. Not searchable." + }, + { + "name": "additional_metadata.thread_id", + "uses": [ + "Query filter", + "Graph connection" + ], + "text": "The Outlook conversation id. Returns every email of one conversation, and groups the conversation's emails in the graph. Not searchable." + }, + { + "name": "additional_metadata.mailbox_address", + "uses": [ + "Query filter" + ], + "text": "The address of the mailbox the email was synced from. Limits a query to one person's mail. Not searchable." + }, + { + "name": "additional_metadata.mailbox_id", + "uses": [ + "Query filter" + ], + "text": "The Microsoft 365 user id of that mailbox. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The mail folder's id. Limits a query to one folder. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The mail folder's name. Limits a query to one folder by name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Always `mail_folder`. Not searchable." + }, + { + "name": "additional_metadata.folder", + "uses": [ + "Query filter" + ], + "text": "The well-known folder name, such as `inbox`, `sentitems` or `archive`. Not searchable." + }, + { + "name": "additional_metadata.is_sent", + "uses": [ + "Query filter" + ], + "text": "`true` for mail in Sent Items. Keeps only mail the mailbox owner wrote. Not searchable." + }, + { + "name": "additional_metadata.categories", + "uses": [ + "Query filter" + ], + "text": "The email's Outlook categories. Not searchable." + }, + { + "name": "additional_metadata.has_attachments", + "uses": [ + "Query filter" + ], + "text": "`true` when the email has a non-inline attachment. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "Present when the mailbox owner's address could not be resolved. Finds such mail. Not searchable." + }, + { + "name": "additional_metadata.is_deleted", + "uses": [ + "Query filter" + ], + "text": "`true` on the hidden stub that replaces deleted or junked mail. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's emails. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `outlook`. Not searchable." + }, + { + "name": "mailbox", + "uses": [ + "Access rule" + ], + "text": "The address of the mailbox the email was synced from. Its owner is the only reader. Not searchable." + }, + { + "name": "author", + "uses": [ + "Stored only" + ], + "text": "The same value as `from`." + }, + { + "name": "reply_to", + "uses": [ + "Stored only" + ], + "text": "The Reply-To addresses." + }, + { + "name": "message_id", + "uses": [ + "Stored only" + ], + "text": "The internet Message-ID, the same on every mailbox's copy of the email." + }, + { + "name": "attachments", + "uses": [ + "Stored only" + ], + "text": "The names of non-inline attachments. Text read from supported files is searchable separately, not through this list." + }, + { + "name": "importance", + "uses": [ + "Stored only" + ], + "text": "`high` or `low`, when the email's importance is not normal." + }, + { + "name": "updated_at", + "uses": [ + "Stored only" + ], + "text": "When the email was last modified. A change to it makes the next sync read the email again." + } + ] + } + ], + "example_searches": [ + "What did Acme's procurement team email us about the renewal terms?", + "What is the latest message in the Q3 audit conversation?", + "Who was copied on the offer letter email to Jordan?" + ], + "graph": { + "connections": [ + "Every email to its conversation in its mailbox, so the conversation's emails are kept together in time order.", + "No links to other tools. Copies of one email in two mailboxes stay separate documents." + ], + "people": [ + "The sender.", + "The To, CC and Bcc recipients.", + "Reply-To addresses are not attached as people." + ], + "from_text": "The email text." + }, + "not_synced": [ + "Mailboxes you did not select.", + "Drafts, Outbox, Junk Email, Deleted Items, Conversation History and Clutter, and their subfolders.", + "Attachment types other than images, PDF and DOCX. Item and reference attachments are not downloaded.", + "Calendar items and contacts.", + "Permanent deletions: purged mail stays in HydraDB." + ] +} diff --git a/scripts/connector_pages/pagerduty.json b/scripts/connector_pages/pagerduty.json new file mode 100644 index 00000000..1d8b88cf --- /dev/null +++ b/scripts/connector_pages/pagerduty.json @@ -0,0 +1,263 @@ +{ + "description": "Sync incidents from the PagerDuty services you choose, with their alerts, notes and timelines, plus the account's schedules and escalation policies.", + "opening": [ + "Sync incidents from the PagerDuty services you select, plus every schedule and escalation policy in the account. Each incident, schedule and escalation policy is one document. An incident carries its alert summaries, timeline and, by default, its notes and status updates.", + "Incidents follow who can read their service, and schedules and policies follow their owning teams, only when Enforce ACL is on. Schedules keep rotation layers but no dated shifts or overrides, so they cannot tell you who is on call at a given time. Incidents deleted in PagerDuty stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "An incident follows the readers of the service it belongs to. A schedule or escalation policy has its own readers, worked out from its owning teams and each user's role. Account owners and admins can read everything. If an owning team is public, every user can read the item. Otherwise users with a full role read their own teams' items, and managers, responders, observers and full stakeholders also read items that belong to no team. Limited stakeholders get no access to private or teamless items.", + "identity": "A user's email address. Teams are not used as groups.", + "when_unreadable": "If HydraDB cannot work out who can read a service, schedule or escalation policy, the connector reports a permission warning.", + "notes": [ + "An item with no readers, a reader without an email, or more than 1,000 readers cannot be captured. The same applies when a user's role is one HydraDB does not recognise and no owning team is public.", + "A team with no default role recorded is treated as members only.", + "Roles given on single objects to restricted-access users are not read, so those users cannot see the item.", + "Schedule and policy readers are checked again on every sync. If the list cannot be read, nothing is changed and the next sync tries again." + ] + }, + "connect": { + "auth": "PagerDuty uses a read-only REST API key created at the account level, plus the email of a user in that account.", + "credentials": [ + { + "name": "token", + "type": "secret string", + "required": true, + "text": "A read-only REST API key created at the account level. A user-scoped key cannot list services, so there is nothing to select." + }, + { + "name": "email", + "type": "string", + "required": true, + "text": "The email of a user in the PagerDuty account the key belongs to." + } + ], + "settings": [ + { + "name": "fetch_incident_prose", + "type": "boolean", + "text": "On by default. When on, incident notes and status updates are synced with each incident." + }, + { + "name": "since", + "type": "string", + "text": "An earliest incident date. Normal syncs do not use it. They use the history window instead." + } + ], + "steps": [ + { + "title": "Create an API key", + "text": "In PagerDuty, open Integrations, API Access Keys, Create New API Key, and tick Read-only. Create it at the account level, not for a single user." + }, + { + "title": "Create the connector", + "text": "Paste the key as `token` and the email of a user in that account as `email`." + }, + { + "title": "Select services", + "text": "HydraDB lists the services the key can see. Select the services whose incidents to sync. Schedules and escalation policies are read for the whole account, whichever services you select." + } + ], + "account": "One connector reads one PagerDuty account." + }, + "sync": { + "first_sync": "Incidents of each selected service reach back the window set by `lookback_days`, 30 days by default, measured by their last status change. Schedules and escalation policies are read in full.", + "changes": "Each sync reads incidents whose last status change is newer than the last sync, including older incidents that changed. Schedules and escalation policies are read in full on every sync.", + "edits": "An incident is read again when its status changes. A new note or other edit without a status change may not be picked up.", + "deletes": "Incidents, schedules and policies deleted in PagerDuty stay searchable in HydraDB. With Enforce ACL on, a schedule or policy that no longer exists can be hidden from search, but its content is not deleted.", + "notes": [ + "Schedules and escalation policies are skipped if your PagerDuty plan or the key's permissions refuse them." + ] + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": ["Query filter"], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": ["Query filter"], + "text": "Always `pagerduty`. Not searchable." + } + ], + "documents": [ + { + "name": "Incidents", + "kind": "ticket", + "one_document": "One incident, with its alerts, notes, status updates and timeline.", + "title": "The incident title, else its summary, else `PagerDuty incident` with its id.", + "text": "`Status`, `Urgency`, `Priority`, `Service`, `Assigned To` and `Escalation Policy` lines. Then each alert's summary with its severity and context, the notes and status updates with their authors when `fetch_incident_prose` is on, and a timeline of log entry summaries and trigger descriptions in time order. Empty entries and most other alert details are left out. The title and the incident id are searchable too.", + "date": "The last status change, else when the incident was created.", + "link_back": "The incident page in PagerDuty.", + "attributes": [ + { + "name": "Incident id", + "uses": ["Searchable text"], + "text": "PagerDuty's incident id. Keeps later syncs on the same document, and a search can match it." + }, + { + "name": "status", + "uses": ["Searchable text"], + "text": "`triggered`, `acknowledged` or `resolved`, written as the `Status` line." + }, + { + "name": "urgency", + "uses": ["Searchable text"], + "text": "`high` or `low`, written as the `Urgency` line." + }, + { + "name": "service_name", + "uses": ["Searchable text"], + "text": "The incident's service, written as the `Service` line." + }, + { + "name": "created_at", + "uses": ["Searchable text", "Result date"], + "text": "When the incident was created. The result date when there is no last status change." + }, + { + "name": "last_changed_at", + "uses": ["Result date"], + "text": "The last status change. Not searchable." + }, + { + "name": "Escalation policy and merge target", + "uses": ["Graph connection"], + "text": "Links the incident to its escalation policy and, when it was resolved by merging, to the incident it was merged into. Not searchable." + }, + { + "name": "additional_metadata.pagerduty_service_id", + "uses": ["Query filter"], + "text": "The service id. Limits a query to one service. Not searchable." + }, + { + "name": "additional_metadata.pagerduty_service_name", + "uses": ["Query filter"], + "text": "The service name. Limits a query to one service by name. Not searchable." + }, + { + "name": "additional_metadata.pagerduty_team_ids", + "uses": ["Query filter"], + "text": "The owning teams' ids, from the incident or else its service. Limits a query to one team. Not searchable." + }, + { + "name": "additional_metadata.pagerduty_teams", + "uses": ["Query filter"], + "text": "The owning teams' names. Limits a query to one team by name. Not searchable." + }, + { + "name": "Service", + "uses": ["Access rule"], + "text": "The selected service. Its readers decide who can read the incident. Not searchable." + }, + { + "name": "incident_number", + "uses": ["Stored only"], + "text": "The account-wide incident number." + } + ] + }, + { + "name": "Schedules", + "kind": "custom", + "one_document": "One on-call schedule. Rotation layers are included only when PagerDuty returns them with the schedule.", + "title": "The schedule name, else its summary, else a generated title with its id.", + "text": "The name, `Description` and `Time Zone` lines, one `Layer` line per rotation layer with its turn length and the people on it, and a `Used By` line with the escalation policies that use it. The title is searchable too.", + "date": "None.", + "link_back": "The schedule page in PagerDuty.", + "attributes": [ + { + "name": "users", + "uses": ["Searchable text"], + "text": "The people named in the rotation layers, once each. Empty when no layers are returned." + }, + { + "name": "additional_metadata.pagerduty_schedule_id", + "uses": ["Query filter"], + "text": "The schedule id. Picks out one schedule. Not searchable." + }, + { + "name": "additional_metadata.pagerduty_team_ids", + "uses": ["Query filter", "Access rule"], + "text": "The owning teams' ids. Limits a query to one team's schedules. The teams also decide who can read the schedule. Not searchable." + }, + { + "name": "additional_metadata.pagerduty_teams", + "uses": ["Query filter"], + "text": "The owning teams' names. Limits a query to one team by name. Not searchable." + }, + { + "name": "schedule_id", + "uses": ["Stored only"], + "text": "The schedule id." + } + ] + }, + { + "name": "Escalation policies", + "kind": "custom", + "one_document": "One escalation policy.", + "title": "The policy name, else its summary, else a generated title with its id.", + "text": "The name and `Description`, one `Level` line per escalation level with its delay and targets, and a `Services` line with the services it is attached to. The title is searchable too.", + "date": "None.", + "link_back": "The policy page in PagerDuty.", + "attributes": [ + { + "name": "Schedule targets", + "uses": ["Graph connection"], + "text": "Links the policy to each schedule it pages. Not searchable." + }, + { + "name": "additional_metadata.pagerduty_escalation_policy_id", + "uses": ["Query filter"], + "text": "The policy id. Picks out one policy. Not searchable." + }, + { + "name": "additional_metadata.pagerduty_team_ids", + "uses": ["Query filter", "Access rule"], + "text": "The owning teams' ids. Limits a query to one team's policies. The teams also decide who can read the policy. Not searchable." + }, + { + "name": "additional_metadata.pagerduty_teams", + "uses": ["Query filter"], + "text": "The owning teams' names. Limits a query to one team by name. Not searchable." + }, + { + "name": "escalation_policy_id", + "uses": ["Stored only"], + "text": "The policy id." + }, + { + "name": "num_loops", + "uses": ["Stored only"], + "text": "How many times the policy repeats." + } + ] + } + ], + "example_searches": [ + "Who gets paged after the primary on-call for the checkout escalation policy?", + "What happened during last night's database incident and what did responders note?", + "Which high-urgency incidents hit the API service recently?" + ], + "graph": { + "connections": [ + "An incident to its escalation policy.", + "An incident to the incident it was merged into.", + "An escalation policy to each schedule it pages.", + "No links to items in other tools." + ], + "people": "No one is attached as a person in the graph. Assignees, note authors and rotation members appear only in the text.", + "from_text": "Incident text, including alert summaries, notes and status updates, and schedule and policy text." + }, + "not_synced": [ + "Incidents of services you did not select.", + "Incident notes and status updates when `fetch_incident_prose` is off.", + "Dated on-call shifts, schedule overrides and rotation start times.", + "Schedule members when PagerDuty returns no rotation layers.", + "Services, teams and users as their own documents.", + "Alert and notification records on their own. Only alerts inside an incident are searchable.", + "Analytics, postmortems, response plays and on-call shift history." + ] +} diff --git a/scripts/connector_pages/pardot.json b/scripts/connector_pages/pardot.json new file mode 100644 index 00000000..9c32d0af --- /dev/null +++ b/scripts/connector_pages/pardot.json @@ -0,0 +1,262 @@ +{ + "description": "Sync prospects, prospect accounts and opportunities from one Pardot business unit, one document per record.", + "opening": [ + "Sync prospects, prospect accounts and opportunities from one Pardot business unit. Each prospect is one document with their contact details, company, score, grade and notes. Each account and each opportunity is one document too.", + "Pardot permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. That includes prospect emails, phone numbers and notes. Stage or status changes on opportunities created before the sync window are not picked up. Records deleted in Pardot stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Pardot uses a Salesforce connected app's client id and client secret with a refresh token, together with the Pardot business unit id.", + "credentials": [ + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The Salesforce connected app's client id." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The Salesforce connected app's client secret." + }, + { + "name": "refresh_token", + "type": "secret string", + "required": true, + "text": "A Salesforce OAuth refresh token issued through that app. HydraDB exchanges it for an access token at `login.salesforce.com`." + }, + { + "name": "pardot_business_unit_id", + "type": "string", + "required": true, + "text": "The Pardot business unit id." + } + ], + "steps": [ + { + "title": "Gather the credentials", + "text": "Get the client id and client secret of a Salesforce connected app, and issue a refresh token through it. Note your Pardot business unit id." + }, + { + "title": "Create the connector", + "text": "Paste the values as `client_id`, `client_secret`, `refresh_token` and `pardot_business_unit_id`." + }, + { + "title": "Select the business unit", + "text": "HydraDB lists one `All data` resource for the business unit. Select it. Individual record types cannot be selected separately." + } + ], + "account": "One connector reads one Pardot business unit." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads prospects and prospect accounts updated in its window. Opportunities are read by when they were created, so only opportunities created in the window are read.", + "edits": "An updated prospect or account replaces its document. A stage or status change on an opportunity created before the window is not picked up.", + "deletes": "Deleted records are not removed. A prospect, account or opportunity deleted in Pardot stays searchable in HydraDB.", + "notes": [ + "When more than 200 prospects or accounts share the same update time, as after a bulk update, some of them can be skipped.", + "If Pardot refuses access to one record type, that type is skipped and the others still sync. A completed sync does not mean all three types were read." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.pardot_id", + "uses": [ + "Query filter" + ], + "text": "The Pardot id of the record. Targets one record. Not searchable." + }, + { + "name": "additional_metadata.pardot_object", + "uses": [ + "Query filter" + ], + "text": "The record type: `prospects`, `prospect_accounts` or `opportunities`. Limits a query to one type. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `pardot`. Not searchable." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The record type, shown when you inspect the item. To limit a query by type, use `additional_metadata.pardot_object`." + } + ], + "documents": [ + { + "name": "Prospects", + "kind": "custom", + "one_document": "One prospect.", + "title": "The prospect's first and last name, else their email, else `Pardot prospects `.", + "text": "The title, then `Salutation`, `Email`, `Phone`, `Company`, `Job Title`, `Department`, `Industry`, `Website`, `Location`, `Territory`, `Source`, `Score` and `Grade` lines. `Location` joins city, state and country. Then the prospect's notes, or their comments when there are no notes.", + "date": "When the prospect was last updated, or created if there is no update time.", + "link_back": "The prospect's record in Salesforce.", + "files": "None.", + "attributes": [ + { + "name": "email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The prospect's email, written as the `Email` line. It identifies the prospect as a person in the graph." + }, + { + "name": "first_name, last_name", + "uses": [ + "Searchable text" + ], + "text": "The prospect's name, written as the title and first line." + }, + { + "name": "phone, company, job_title, industry, website, city, state, country, territory, source, score, grade", + "uses": [ + "Searchable text" + ], + "text": "Contact, company and scoring details, one labelled line each, with city, state and country joined in the `Location` line." + }, + { + "name": "salutation, department, notes, comments", + "uses": [ + "Searchable text" + ], + "text": "`Salutation` and `Department` lines, and the free-text notes at the end of the text. Notes are used before comments." + }, + { + "name": "created_at, updated_at", + "uses": [ + "Result date" + ], + "text": "When the prospect was created and last updated. The update time, else the creation time, sets the result date. Not searchable." + }, + { + "name": "prospect_account_id", + "uses": [ + "Stored only" + ], + "text": "The id of the prospect account the prospect belongs to. It does not link the prospect to the account and cannot be used as a filter." + } + ] + }, + { + "name": "Prospect accounts", + "kind": "custom", + "one_document": "One prospect account.", + "title": "The account name, or `Pardot prospect_accounts ` when there is none.", + "text": "The title, then `Assignee`, `Created` and `Updated` lines.", + "date": "When the account was last updated, or created if there is no update time.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "name", + "uses": [ + "Searchable text" + ], + "text": "The account name, written as the title and first line." + }, + { + "name": "assignee", + "uses": [ + "Searchable text" + ], + "text": "The full name, else the email, of the Pardot user assigned to the account, written as the `Assignee` line. The assignee is not attached as a person in the graph." + }, + { + "name": "created_at, updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the account was created and last updated, written as the `Created` and `Updated` lines. The update time, else the creation time, sets the result date." + } + ] + }, + { + "name": "Opportunities", + "kind": "ticket", + "one_document": "One opportunity.", + "title": "The opportunity name, or `Pardot opportunities ` when there is none.", + "text": "Details with the opportunity's id, `Status` and `Created`, then a description with the title and `Stage`, `Status`, `Type`, `Value`, `Probability` and `Closed` lines.", + "date": "When the opportunity was last updated, or created if there is no update time.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "stage, type, value, probability, closed_at", + "uses": [ + "Searchable text" + ], + "text": "The opportunity's stage, type, value, probability and close date, one labelled line each." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "`open`, `won` or `lost`, shown in the details and in the description." + }, + { + "name": "id", + "uses": [ + "Searchable text" + ], + "text": "The Pardot id, shown as the opportunity's key in the details." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the opportunity was created, shown as `Created` in the details. Sets the result date when there is no update time." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the opportunity was last updated. Sets the result date when present. Not searchable." + } + ] + } + ], + "example_searches": [ + "What company, job title, score and grade does Pardot record for jane@acme.com?", + "Which opportunities are in the Negotiation stage, and what are they worth?", + "Who is assigned to the Acme Corp prospect account?" + ], + "graph": { + "connections": [ + "None. A prospect is not linked to its account, and opportunities are not linked to prospects or campaigns.", + "No links to other tools." + ], + "people": [ + "Each prospect, identified by their email.", + "An account's assignee is part of the text only and is not attached as a person." + ], + "from_text": "Prospect details and notes, account names and assignees, and opportunity details." + }, + "not_synced": [ + "Visitors, visits, visitor activities, lists, list memberships, users, email clicks and campaigns.", + "Custom prospect and account fields, and other prospect details such as address, annual revenue, employees and opt-out flags.", + "Stage and status changes on opportunities created before the sync window.", + "Deletions: records deleted in Pardot stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/pipedrive.json b/scripts/connector_pages/pipedrive.json new file mode 100644 index 00000000..3d103305 --- /dev/null +++ b/scripts/connector_pages/pipedrive.json @@ -0,0 +1,1065 @@ +{ + "description": "Sync deals, leads, projects, tasks, persons, organizations, activities and notes from one Pipedrive account. Pipedrive visibility settings are not enforced.", + "opening": [ + "Sync a whole Pipedrive account: deals, leads, projects and project tasks, persons, organizations, activities such as calls and meetings, and notes. Each record is one document. Stage, pipeline, organization, person, activity type, product and lead label ids are turned into names. A note or activity links to every deal, person, organization and lead it is attached to.", + "Pipedrive's visibility setting is kept as a filter but does not restrict who can read an item, so every synced item is visible to everyone who can query the collection unless you set an access rule. Records deleted in Pipedrive stay in HydraDB. Pipedrive mail, files and call logs are not synced." + ], + "permissions": { + "carried": false, + "notes": [ + "Pipedrive's `visible_to` setting is stored as `additional_metadata.visible_to`. You can filter on it, but it does not decide who can read an item." + ] + }, + "connect": { + "auth": "Pipedrive uses a personal API token.", + "credentials": [ + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "A Pipedrive personal API token. The connector reads every record this token can see." + } + ], + "steps": [ + { + "title": "Copy an API token", + "text": "In Pipedrive, copy the personal API token of a user who can see the records you want in HydraDB." + }, + { + "title": "Create the connector", + "text": "Paste the token as `api_token`." + }, + { + "title": "Configure the connector", + "text": "Pipelines are offered for selection, but selecting them does not narrow the sync. The connector syncs every record the token can read in the account." + } + ], + "account": "One connector reads one Pipedrive account." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads records whose update time moved past the last sync. A deal's line items are read again whenever the deal changes.", + "edits": "An edited record is read again and updates its document.", + "deletes": "Deleted records are not removed. They stay searchable in HydraDB. A record Pipedrive marks as deleted is flagged, so you can leave it out with `additional_metadata.is_deleted`, or `additional_metadata.active_flag` for notes." + }, + "shared_attributes": [ + { + "name": "additional_metadata.pipedrive_id", + "uses": [ + "Query filter" + ], + "text": "The Pipedrive record id. Ids can repeat across record types, so combine it with `additional_metadata.pipedrive_object` to target one record. Not searchable." + }, + { + "name": "additional_metadata.pipedrive_object", + "uses": [ + "Query filter" + ], + "text": "The record type, such as `deals`, `persons` or `notes`. Limits a query to one type. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `pipedrive`. Not searchable." + } + ], + "documents": [ + { + "name": "Deals", + "kind": "ticket", + "one_document": "One deal.", + "title": "The deal title.", + "text": "The deal title, then `Value` with its currency, `Status`, `Lost reason`, `Stage`, `Pipeline`, `Organization`, `Contact`, `Expected close` and `Owner` lines. Then a `Products` block listing each line item with its quantity, price, currency and comments. The deal's key and creation time are part of the text too.", + "date": "When the deal was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "value", + "uses": [ + "Searchable text" + ], + "text": "The deal amount, written as the `Value` line with `currency`." + }, + { + "name": "currency", + "uses": [ + "Searchable text" + ], + "text": "The deal currency, written with the value." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The deal outcome, written as the `Status` line." + }, + { + "name": "lost_reason", + "uses": [ + "Searchable text" + ], + "text": "Why a lost deal was lost, written as the `Lost reason` line." + }, + { + "name": "stage", + "uses": [ + "Searchable text" + ], + "text": "The stage name, written as the `Stage` line. When the name cannot be found, the stage id is written instead." + }, + { + "name": "pipeline", + "uses": [ + "Searchable text" + ], + "text": "The pipeline name, written as the `Pipeline` line. When the name cannot be found, the pipeline id is written instead." + }, + { + "name": "organization", + "uses": [ + "Searchable text" + ], + "text": "The organization name, written as the `Organization` line." + }, + { + "name": "person", + "uses": [ + "Searchable text" + ], + "text": "The contact person's name, written as the `Contact` line." + }, + { + "name": "org_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "Links the deal to its organization. Written into the text only when the organization's name cannot be found." + }, + { + "name": "person_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "Links the deal to its contact person. Written into the text only when the person's name cannot be found." + }, + { + "name": "products", + "uses": [ + "Searchable text" + ], + "text": "The product names of the deal's line items, written in the `Products` block, so a query can find the deals that include a product." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name or email, written as the `Owner` line, where HydraDB can identify the person." + }, + { + "name": "additional_metadata.expected_close_date", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The expected closing date, written as the `Expected close` line. Limits a query to a range of closing dates." + }, + { + "name": "additional_metadata.is_deleted", + "uses": [ + "Query filter" + ], + "text": "Set when Pipedrive marks the deal as deleted. Leaves deleted deals out of a query. Not searchable." + }, + { + "name": "additional_metadata.is_archived", + "uses": [ + "Query filter" + ], + "text": "Set when the deal is archived. Leaves archived deals out of a query. Not searchable." + }, + { + "name": "additional_metadata.visible_to", + "uses": [ + "Query filter" + ], + "text": "Pipedrive's visibility level for the deal. Filters on that value. It does not decide who can read the deal. Not searchable." + }, + { + "name": "external_id", + "uses": [ + "Searchable text" + ], + "text": "The record type and Pipedrive id together, written into the text as the deal's key. Keeps later syncs on the same document." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the deal was created, written as a `Created` line. Used as the result date only when the modification time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the deal was last modified. Not searchable." + }, + { + "name": "won_time", + "uses": [ + "Stored only" + ], + "text": "When the deal was won." + }, + { + "name": "lost_time", + "uses": [ + "Stored only" + ], + "text": "When the deal was lost." + }, + { + "name": "probability", + "uses": [ + "Stored only" + ], + "text": "The win probability." + }, + { + "name": "mrr", + "uses": [ + "Stored only" + ], + "text": "Monthly recurring revenue." + }, + { + "name": "arr", + "uses": [ + "Stored only" + ], + "text": "Annual recurring revenue." + }, + { + "name": "acv", + "uses": [ + "Stored only" + ], + "text": "Annual contract value." + }, + { + "name": "label_ids", + "uses": [ + "Stored only" + ], + "text": "The deal's label ids. They are not turned into names." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The record type. Filter on it with `additional_metadata.pipedrive_object`." + } + ] + }, + { + "name": "Leads", + "kind": "ticket", + "one_document": "One lead.", + "title": "The lead title.", + "text": "The lead title, then `Value`, `Labels`, `Source`, `Organization`, `Contact`, `Expected close` and `Owner` lines. The lead's key and creation time are part of the text too. When none of a lead's label names can be found, the lead's other filled-in fields are written into the text as a list instead.", + "date": "When the lead was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "value", + "uses": [ + "Searchable text" + ], + "text": "The lead amount, written as the `Value` line with `currency`." + }, + { + "name": "currency", + "uses": [ + "Searchable text" + ], + "text": "The lead currency, written with the value." + }, + { + "name": "labels", + "uses": [ + "Searchable text" + ], + "text": "The lead's label names, written as the `Labels` line." + }, + { + "name": "source_name", + "uses": [ + "Searchable text" + ], + "text": "Where the lead came from, written as the `Source` line." + }, + { + "name": "organization", + "uses": [ + "Searchable text" + ], + "text": "The organization name, written as the `Organization` line." + }, + { + "name": "person", + "uses": [ + "Searchable text" + ], + "text": "The contact person's name, written as the `Contact` line." + }, + { + "name": "org_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "Links the lead to its organization. Written into the text only when the organization's name is missing or the lead is written as a list." + }, + { + "name": "person_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "Links the lead to its contact person. Written into the text only when the person's name is missing or the lead is written as a list." + }, + { + "name": "label_ids", + "uses": [ + "Searchable text" + ], + "text": "The lead's label ids. Written into the text only when the lead is written as a list." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name or email, written as the `Owner` line, where HydraDB can identify the person." + }, + { + "name": "additional_metadata.expected_close_date", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The expected closing date, written as the `Expected close` line. Limits a query to a range of closing dates." + }, + { + "name": "additional_metadata.is_archived", + "uses": [ + "Query filter" + ], + "text": "Set when the lead is archived. Leaves archived leads out of a query. Not searchable." + }, + { + "name": "additional_metadata.visible_to", + "uses": [ + "Query filter" + ], + "text": "Pipedrive's visibility level for the lead. Filters on that value. It does not decide who can read the lead. Not searchable." + }, + { + "name": "external_id", + "uses": [ + "Searchable text" + ], + "text": "The record type and Pipedrive id together, written into the text as the lead's key. Keeps later syncs on the same document." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the lead was created, written as a `Created` line. Used as the result date only when the modification time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the lead was last modified. Written into the text only when the lead is written as a list." + }, + { + "name": "object_type", + "uses": [ + "Searchable text" + ], + "text": "The record type. Written into the text only when the lead is written as a list. Filter on it with `additional_metadata.pipedrive_object`." + } + ] + }, + { + "name": "Projects", + "kind": "ticket", + "one_document": "One project.", + "title": "The project title.", + "text": "The project description. The title, the project's key and its creation time are searchable too. The status, health, dates and owner are not part of the text. Filter on status and health, or follow the project's links, instead.", + "date": "When the project was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "description", + "uses": [ + "Searchable text" + ], + "text": "The project description." + }, + { + "name": "deal_ids", + "uses": [ + "Graph connection" + ], + "text": "Links the project to each linked deal. Not searchable." + }, + { + "name": "org_ids", + "uses": [ + "Graph connection" + ], + "text": "Links the project to each linked organization. Not searchable." + }, + { + "name": "person_ids", + "uses": [ + "Graph connection" + ], + "text": "Links the project to each linked person. Not searchable." + }, + { + "name": "additional_metadata.project_status", + "uses": [ + "Query filter" + ], + "text": "The project status. Limits a query to open, completed, canceled or deleted projects. Not searchable." + }, + { + "name": "additional_metadata.health_status", + "uses": [ + "Query filter" + ], + "text": "The project health. Limits a query to projects that are at risk or off track. Not searchable." + }, + { + "name": "external_id", + "uses": [ + "Searchable text" + ], + "text": "The record type and Pipedrive id together, written into the text as the project's key. Keeps later syncs on the same document." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the project was created, written as a `Created` line. Used as the result date only when the modification time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the project was last modified. Not searchable." + }, + { + "name": "body", + "uses": [ + "Stored only" + ], + "text": "A summary with the project's status, health, start, end and owner. It is not part of the searchable text." + }, + { + "name": "start_date", + "uses": [ + "Stored only" + ], + "text": "When the project starts." + }, + { + "name": "end_date", + "uses": [ + "Stored only" + ], + "text": "When the project ends." + }, + { + "name": "owner", + "uses": [ + "Stored only" + ], + "text": "The owner's name or email." + }, + { + "name": "label_ids", + "uses": [ + "Stored only" + ], + "text": "The project's label ids." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The record type. Filter on it with `additional_metadata.pipedrive_object`." + } + ] + }, + { + "name": "Tasks", + "kind": "ticket", + "one_document": "One project task.", + "title": "The task title.", + "text": "The task description. The title, the task's key and its creation time are searchable too. The project name, assignees and dates are not part of the text. Filter on completion, milestone and priority, or follow the task's links, instead.", + "date": "When the task was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "description", + "uses": [ + "Searchable text" + ], + "text": "The task description." + }, + { + "name": "project_id", + "uses": [ + "Graph connection" + ], + "text": "Links the task to its project. Not searchable." + }, + { + "name": "parent_task_id", + "uses": [ + "Graph connection" + ], + "text": "Links the task to its parent task. Not searchable." + }, + { + "name": "additional_metadata.is_done", + "uses": [ + "Query filter" + ], + "text": "Whether the task is done. Limits a query to unfinished tasks. Not searchable." + }, + { + "name": "additional_metadata.is_milestone", + "uses": [ + "Query filter" + ], + "text": "Whether the task is a milestone. Limits a query to project milestones. Not searchable." + }, + { + "name": "additional_metadata.priority", + "uses": [ + "Query filter" + ], + "text": "The task priority. Limits a query to one priority. Not searchable." + }, + { + "name": "external_id", + "uses": [ + "Searchable text" + ], + "text": "The record type and Pipedrive id together, written into the text as the task's key. Keeps later syncs on the same document." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the task was created, written as a `Created` line. Used as the result date only when the modification time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the task was last modified. Not searchable." + }, + { + "name": "body", + "uses": [ + "Stored only" + ], + "text": "A summary with the task's project, assignees, start, due and completion dates. It is not part of the searchable text." + }, + { + "name": "project", + "uses": [ + "Stored only" + ], + "text": "The project's title." + }, + { + "name": "assignees", + "uses": [ + "Stored only" + ], + "text": "The names of the assigned users. They are not linked to the task as people." + }, + { + "name": "start_date", + "uses": [ + "Stored only" + ], + "text": "When the task starts." + }, + { + "name": "due_date", + "uses": [ + "Stored only" + ], + "text": "When the task is due." + }, + { + "name": "marked_as_done_time", + "uses": [ + "Stored only" + ], + "text": "When the task was completed." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The record type. Filter on it with `additional_metadata.pipedrive_object`." + } + ] + }, + { + "name": "Persons", + "kind": "custom", + "one_document": "One person.", + "title": "The person's name.", + "text": "`Name`, `Emails`, `Phones`, `Organization` and `Owner` lines.", + "date": "When the person was last modified, else when they were created.", + "link_back": "None.", + "attributes": [ + { + "name": "emails", + "uses": [ + "Searchable text" + ], + "text": "The person's email addresses, written as the `Emails` line." + }, + { + "name": "phones", + "uses": [ + "Searchable text" + ], + "text": "The person's phone numbers, written as the `Phones` line." + }, + { + "name": "organization", + "uses": [ + "Searchable text" + ], + "text": "The organization name, written as the `Organization` line." + }, + { + "name": "org_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "Links the person to their organization. Written into the text only when the organization's name cannot be found." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name or email, written as the `Owner` line, where HydraDB can identify the person." + }, + { + "name": "additional_metadata.is_deleted", + "uses": [ + "Query filter" + ], + "text": "Set when Pipedrive marks the person as deleted. Leaves deleted persons out of a query. Not searchable." + }, + { + "name": "additional_metadata.visible_to", + "uses": [ + "Query filter" + ], + "text": "Pipedrive's visibility level for the person. Filters on that value. It does not decide who can read the person. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the person was last modified. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the person was created. Used as the result date only when the modification time is missing. Not searchable." + }, + { + "name": "label_ids", + "uses": [ + "Stored only" + ], + "text": "The person's label ids." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The record type. Filter on it with `additional_metadata.pipedrive_object`." + } + ] + }, + { + "name": "Organizations", + "kind": "custom", + "one_document": "One organization.", + "title": "The organization's name.", + "text": "`Name`, `Address` and `Owner` lines.", + "date": "When the organization was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "address", + "uses": [ + "Searchable text" + ], + "text": "The formatted address, written as the `Address` line." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name or email, written as the `Owner` line, where HydraDB can identify the person." + }, + { + "name": "additional_metadata.is_deleted", + "uses": [ + "Query filter" + ], + "text": "Set when Pipedrive marks the organization as deleted. Leaves deleted organizations out of a query. Not searchable." + }, + { + "name": "additional_metadata.visible_to", + "uses": [ + "Query filter" + ], + "text": "Pipedrive's visibility level for the organization. Filters on that value. It does not decide who can read the organization. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the organization was last modified. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the organization was created. Used as the result date only when the modification time is missing. Not searchable." + }, + { + "name": "label_ids", + "uses": [ + "Stored only" + ], + "text": "The organization's label ids." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The record type. Filter on it with `additional_metadata.pipedrive_object`." + } + ] + }, + { + "name": "Activities", + "kind": "custom", + "one_document": "One activity, such as a call, meeting, task or logged email.", + "title": "The activity subject.", + "text": "The subject, then `Type`, `Due`, `Duration`, `Location` and `Owner` lines, then the activity note converted from HTML to text, and its public description.", + "date": "When the activity was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "activity_type", + "uses": [ + "Searchable text" + ], + "text": "The activity type's name, written as the `Type` line. When the name cannot be found, the type key is written instead." + }, + { + "name": "note", + "uses": [ + "Searchable text" + ], + "text": "The activity note, converted from HTML to text." + }, + { + "name": "public_description", + "uses": [ + "Searchable text" + ], + "text": "The activity's public description." + }, + { + "name": "due_date", + "uses": [ + "Searchable text" + ], + "text": "The due date, written in the `Due` line." + }, + { + "name": "due_time", + "uses": [ + "Searchable text" + ], + "text": "The due time, written in the `Due` line." + }, + { + "name": "duration", + "uses": [ + "Searchable text" + ], + "text": "The scheduled duration, written as the `Duration` line." + }, + { + "name": "location", + "uses": [ + "Searchable text" + ], + "text": "Where the activity takes place, written as the `Location` line." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name or email, written as the `Owner` line, where HydraDB can identify the person." + }, + { + "name": "deal_id", + "uses": [ + "Graph connection" + ], + "text": "Links the activity to its deal. Not searchable." + }, + { + "name": "lead_id", + "uses": [ + "Graph connection" + ], + "text": "Links the activity to its lead. Not searchable." + }, + { + "name": "person_id", + "uses": [ + "Graph connection" + ], + "text": "Links the activity to its contact person. Not searchable." + }, + { + "name": "org_id", + "uses": [ + "Graph connection" + ], + "text": "Links the activity to its organization. Not searchable." + }, + { + "name": "participants", + "uses": [ + "Graph connection" + ], + "text": "Links the activity to each person who took part. Not searchable." + }, + { + "name": "additional_metadata.is_deleted", + "uses": [ + "Query filter" + ], + "text": "Set when Pipedrive marks the activity as deleted. Leaves deleted activities out of a query. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the activity was last modified. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the activity was created. Used as the result date only when the modification time is missing. Not searchable." + }, + { + "name": "type", + "uses": [ + "Stored only" + ], + "text": "The activity type key. Its name is in `activity_type`." + }, + { + "name": "done", + "uses": [ + "Stored only" + ], + "text": "Whether the activity is marked as done." + }, + { + "name": "marked_as_done_time", + "uses": [ + "Stored only" + ], + "text": "When the activity was marked as done." + } + ] + }, + { + "name": "Notes", + "kind": "comment", + "one_document": "One note that has content. Empty notes are skipped.", + "title": "`Comment by` and the author's name. Without an author, the first 80 characters of the text.", + "text": "The note content converted from HTML to text, with the author, the first record it is attached to, and its created and updated times.", + "date": "When the note was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The note's author. The graph records the note as written by that person." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The first deal, person or organization the note is attached to, written as a `Parent` line. Links the note to that record." + }, + { + "name": "lead_id", + "uses": [ + "Graph connection" + ], + "text": "Links the note to the lead it is attached to. Not searchable." + }, + { + "name": "additional_metadata.pipedrive_parent_id", + "uses": [ + "Query filter" + ], + "text": "The id of the first deal, person or organization the note is attached to. Finds the notes on that record. It does not cover a note's other records, or notes attached only to a lead. Not searchable." + }, + { + "name": "additional_metadata.active_flag", + "uses": [ + "Query filter" + ], + "text": "False when Pipedrive marks the note as deleted. Leaves deleted notes out of a query. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the note was last modified, written as an `Updated` line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the note was created, written as a `Created` line. Used as the result date only when the modification time is missing." + }, + { + "name": "parent_type", + "uses": [ + "Stored only" + ], + "text": "The type of the first record the note is attached to." + }, + { + "name": "parent_title", + "uses": [ + "Stored only" + ], + "text": "The title of the first record the note is attached to." + } + ] + } + ], + "example_searches": [ + "Which deals for Acme are open and at what stage?", + "What was discussed in the last call with this person?", + "Which deals include the Enterprise plan product?" + ], + "graph": { + "connections": [ + "A note or activity to every deal, person, organization and lead it is attached to.", + "An activity to each person who took part.", + "A deal or lead to its organization and contact person.", + "A person to their organization.", + "A project to every linked deal, organization and person.", + "A task to its project and its parent task.", + "No links to other tools." + ], + "people": [ + "The author of each note.", + "Owners of deals, leads, persons, organizations and activities appear in the text, where HydraDB can identify them.", + "Project owners and task assignees are kept with the item but not attached to it as people." + ], + "from_text": "Notes, activity notes, deal titles, and project and task descriptions, along with the rest of each record's text." + }, + "not_synced": [ + "Pipedrive mail messages and mail threads.", + "Files, call logs and deal stage-change history.", + "Deal participants and followers.", + "Custom field values.", + "Project boards and phases, task audit users and lead marketing attribution.", + "Records removed from Pipedrive entirely: they stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/posthog.json b/scripts/connector_pages/posthog.json new file mode 100644 index 00000000..05f48cfa --- /dev/null +++ b/scripts/connector_pages/posthog.json @@ -0,0 +1,356 @@ +{ + "description": "Sync people, cohorts, feature flags and annotations from the PostHog projects you select. Events are not synced.", + "opening": [ + "Sync people, cohorts, feature flags and annotations from the PostHog projects you select. Each person is one contact document built from their PostHog properties. Cohorts, feature flags and annotations are one document each, naming their creator.", + "PostHog permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Events, such as pageviews and custom events, are not synced. People deleted in PostHog stay in HydraDB, and feature flags and annotations that PostHog marks deleted stay searchable." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "PostHog uses a personal API key.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "A PostHog personal API key." + }, + { + "name": "project_id", + "type": "string", + "required": true, + "text": "A PostHog project id. It is used when you select no projects. The projects you select take its place." + } + ], + "steps": [ + { + "title": "Create a personal API key", + "text": "In PostHog, create a personal API key." + }, + { + "title": "Create the connector", + "text": "Paste the key as `api_key` and a project id as `project_id`." + }, + { + "title": "Select projects", + "text": "HydraDB lists the projects of the organization the key belongs to, from `https://app.posthog.com`. The connection form has no setting for another PostHog address. Select the projects to sync. Each one syncs separately." + }, + { + "title": "Give each project its own collection", + "text": "If you select more than one project, send each to its own collection. Records of the same type with the same id in two projects can replace each other when they land in the same collection." + } + ], + "account": "One connector reads projects from one PostHog organization, the one the API key belongs to." + }, + "sync": { + "first_sync": "People are read in full, whatever the window. Cohorts, feature flags and annotations reach back the window set by `lookback_days`, 30 days by default.", + "changes": "Every sync reads all people in each selected project again, which is slow for projects with many people. A cohort is picked up again when PostHog recalculates it. Feature flags and annotations are picked up again when they are updated.", + "edits": "An edited item replaces its document.", + "deletes": "Deleted people are not removed. A person deleted in PostHog stays searchable in HydraDB. Feature flags and annotations that PostHog marks deleted are still synced and searchable." + }, + "shared_attributes": [ + { + "name": "additional_metadata.posthog_stream", + "uses": [ + "Query filter" + ], + "text": "The record type: `persons`, `cohorts`, `feature_flags` or `annotations`. Limits a query to one type, for example only people. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `posthog`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The record type, shown when you inspect the item. To limit a query by type, use `additional_metadata.posthog_stream`." + } + ], + "documents": [ + { + "name": "People", + "kind": "contact", + "one_document": "One person in a selected project.", + "title": "`PostHog persons: `, using the person's name, else their first and last name, else their email. `PostHog persons` when there is none.", + "text": "Contact details taken from the person's properties, described below. Then notes with a `Name` line, a `Distinct IDs` line, and every person property that has a single value, in alphabetical order as `property: value`. The title is searchable too.", + "date": "When the person was created.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "display_name, first_name, last_name, email, emails", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The person's name and email, from their properties. The email comes from `email` or `$email`. They identify the person in the graph." + }, + { + "name": "provider_user_id", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The person's first distinct id. It is part of the contact details and identifies the person in the graph." + }, + { + "name": "linkedin_url, x_handle", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Social handles, from `linkedin_url` or `linkedin`, and from `x_handle`, `twitter_handle` or `username`. The first one available identifies the person in the graph." + }, + { + "name": "entity_type", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Always `person`. It makes the contact a person in the graph." + }, + { + "name": "owner, owner_email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The contact owner's name and email, from the person's properties. The graph records the owner as a separate person." + }, + { + "name": "distinct_ids", + "uses": [ + "Searchable text" + ], + "text": "All of the person's distinct ids, written as the `Distinct IDs` line. Only the first one identifies the person in the graph." + }, + { + "name": "job_title, organization_name, organization_id, lifecycle_stage", + "uses": [ + "Searchable text" + ], + "text": "Job, company and lifecycle stage, from matching properties or from `title`, `company`, `company_id` and `stage`." + }, + { + "name": "phones", + "uses": [ + "Searchable text" + ], + "text": "Phone numbers from the `phones`, `phone` and `phone_number` properties. They do not identify the person in the graph." + }, + { + "name": "labels, tags, url", + "uses": [ + "Searchable text" + ], + "text": "Labels, tags and a URL from the person's properties or record. The URL is part of the contact details and is not a link back." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the person was created. It is part of the contact details and sets the result date." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text" + ], + "text": "When the person was last updated, when PostHog provides it. It does not set the result date." + }, + { + "name": "Other person fields", + "uses": [ + "Stored only" + ], + "text": "Every other field of the person record, kept for inspection only." + } + ] + }, + { + "name": "Cohorts", + "kind": "knowledge_base", + "one_document": "One saved cohort.", + "title": "`PostHog cohorts: `.", + "text": "`Name`, `Description` and `Count` lines, with the creator as the author. The title is searchable too.", + "date": "When the cohort was created.", + "link_back": "None.", + "files": "None. The list of members is not synced.", + "attributes": [ + { + "name": "created_by", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The creator's name, or their email when there is no name. It is written as the author, and the graph records the creator as the author." + }, + { + "name": "created_by_email", + "uses": [ + "Graph identity" + ], + "text": "The creator's email, attached to the author in the graph. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the cohort was created. Not searchable." + }, + { + "name": "last_calculation", + "uses": [ + "Stored only" + ], + "text": "When PostHog last recalculated the cohort. A recalculation is what makes a sync pick the cohort up again." + }, + { + "name": "Other cohort fields", + "uses": [ + "Stored only" + ], + "text": "Every other field of the cohort record, kept for inspection only." + } + ] + }, + { + "name": "Feature flags", + "kind": "knowledge_base", + "one_document": "One flag, active or archived.", + "title": "`PostHog feature_flags` followed by the feature flag name. When a feature flag has no name, its key is not used in its place.", + "text": "`Name`, `Key`, `Active` and `Rollout percentage` lines, when present, with the creator as the author and the update time. The rollout percentage is the flag's top-level one. The title is searchable too.", + "date": "When the flag was created.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "created_by", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The creator's name, or their email when there is no name. It is written as the author, and the graph records the creator as the author." + }, + { + "name": "created_by_email", + "uses": [ + "Graph identity" + ], + "text": "The creator's email, attached to the author in the graph. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text" + ], + "text": "When the flag was last updated, when PostHog provides it. It does not set the result date." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the flag was created. Not searchable." + }, + { + "name": "Other flag fields", + "uses": [ + "Stored only" + ], + "text": "Other fields of the flag, including its targeting rules under `filters` and PostHog's `deleted` marker. Kept for inspection only, so targeting rules are not searchable." + } + ] + }, + { + "name": "Annotations", + "kind": "knowledge_base", + "one_document": "One annotation.", + "title": "`PostHog annotations` followed by the first 80 characters of the content, with an ellipsis when it is longer. Just `PostHog annotations` when the content is empty.", + "text": "The annotation content, then `Insight`, `Scope` and `Date marker` lines, when present, with the creator as the author and the update time. The title is searchable too.", + "date": "When the annotation was last updated, or when it was created if PostHog gives no update time.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "created_by", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The creator's name, or their email when there is no name. It is written as the author, and the graph records the creator as the author." + }, + { + "name": "created_by_email", + "uses": [ + "Graph identity" + ], + "text": "The creator's email, attached to the author in the graph. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the annotation was last updated. It is part of the text and sets the result date." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the annotation was created. Sets the result date only when there is no update time. Not searchable." + }, + { + "name": "Other annotation fields", + "uses": [ + "Stored only" + ], + "text": "Every other field of the annotation record, kept for inspection only." + } + ] + } + ], + "example_searches": [ + "Which company and lifecycle stage does PostHog record for jane@acme.com?", + "What are the key, active status and rollout percentage of the new-checkout flag?", + "Which annotations were added around the March release?" + ], + "graph": { + "connections": [ + "None. People, cohorts, feature flags and annotations are not linked to each other.", + "No links to other tools." + ], + "people": [ + "Each person, identified by their name, email, social handle and first distinct id.", + "A person's owner, as a separate person.", + "The creator of cohorts, feature flags and annotations, as their author." + ], + "from_text": "The text of people, cohorts, feature flags and annotations." + }, + "not_synced": [ + "Events, including pageviews, autocapture and custom events.", + "Insights, dashboards, session recordings, experiments and surveys.", + "Projects you did not select.", + "Cohort members. A cohort carries its member count only.", + "Targeting rules of feature flags, in the searchable text.", + "Deletions: people deleted in PostHog stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/quickbooks.json b/scripts/connector_pages/quickbooks.json new file mode 100644 index 00000000..24761ab4 --- /dev/null +++ b/scripts/connector_pages/quickbooks.json @@ -0,0 +1,403 @@ +{ + "description": "Sync customers, invoices, payments, bills and attachments from one QuickBooks Online sandbox company. Invoices and payments link to their customer, and attached files are read so their text is searchable.", + "opening": [ + "Sync customers, invoices, payments, bills and attachments from one QuickBooks Online sandbox company. Each record is one document. Invoices and payments link to their customer. Each attachment is its own document, linked to the records it is attached to, and its file is read so its text is searchable.", + "QuickBooks permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Every sync reads all records of each selected type again, which is slow for companies with many invoices. Records deleted in QuickBooks stay in HydraDB. Vendors, items and accounts are not their own documents." + ], + "permissions": { + "carried": false, + "notes": [ + "Each record type you select is its own resource, so you can set an access rule on one type, such as Invoices, and not on the others." + ] + }, + "connect": { + "auth": "QuickBooks uses the client id and client secret of an Intuit developer app, with a refresh token and the company id of the company you connect.", + "credentials": [ + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The client id of your Intuit developer app, from its Keys & credentials page." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The client secret of the same app." + }, + { + "name": "refresh_token", + "type": "secret string", + "required": true, + "text": "An OAuth refresh token for the company." + }, + { + "name": "realmId", + "type": "string", + "required": true, + "text": "The QuickBooks company id that the refresh token belongs to." + }, + { + "name": "access_token", + "type": "secret string", + "text": "Leave it empty. HydraDB obtains access tokens itself." + } + ], + "credentials_note": "Intuit replaces the refresh token from time to time. HydraDB stores each new refresh token itself.", + "steps": [ + { + "title": "Create an Intuit app", + "text": "In the Intuit developer portal, create an app and copy its client id and client secret." + }, + { + "title": "Get a refresh token and company id", + "text": "Get a refresh token for the sandbox company you want to connect, and that company's id. The Intuit OAuth Playground is one place to get both." + }, + { + "title": "Create the connector", + "text": "Paste the values as `client_id`, `client_secret`, `refresh_token` and `realmId`." + }, + { + "title": "Select record types", + "text": "HydraDB lists five record types: Customers, Invoices, Payments, Bills and Attachments. Select the ones to sync. Each selected type is synced on its own." + } + ], + "account": "One connector reads one QuickBooks Online sandbox company." + }, + "sync": { + "first_sync": "Reads every record of each selected type, whatever its date. `lookback_days` does not narrow it.", + "changes": "Every sync reads every record of each selected type again.", + "edits": "A changed record replaces its document.", + "deletes": "Deleted records are not removed. A record deleted in QuickBooks stays searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was last updated in QuickBooks. It is the result date, and it appears in the text." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was created in QuickBooks. It is the result date only when there is no update time. Searchable on customers. Not searchable on other record types." + }, + { + "name": "additional_metadata.quickbooks_id", + "uses": [ + "Query filter" + ], + "text": "The record's QuickBooks Id, without its record type. Finds a record by its Id. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `quickbooks`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The record type: `Customer`, `Invoice`, `Payment`, `Bill` or `Attachable`." + }, + { + "name": "Other QuickBooks fields", + "uses": [ + "Stored only" + ], + "text": "Every other field QuickBooks returns for the record. Kept for inspection only. A query does not match them and cannot filter on them." + } + ], + "documents": [ + { + "name": "Customers", + "kind": "contact", + "one_document": "One customer, active or inactive.", + "title": "The customer's display name. Otherwise the fully qualified name, the company name, or the first and last name.", + "text": "Contact details: the display name, first and last name, email, phone numbers, website, whether the customer is a person or an organization, the company or parent customer name, and the created and updated times. Then the customer's QuickBooks notes, followed by `Name`, `Company`, `Email`, `Phone` and `Balance` lines. The title is searchable too.", + "date": "When the customer was last updated, or created when there is no update time.", + "link_back": "None.", + "files": "Files attached to a customer arrive as separate attachment documents linked to it.", + "attributes": [ + { + "name": "display_name", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The customer's display name. It forms the title and names the customer in the graph." + }, + { + "name": "first_name", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The customer's given name. Helps form the person's name when there is no display name." + }, + { + "name": "last_name", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The customer's family name. Helps form the person's name when there is no display name." + }, + { + "name": "email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The customer's primary email. Identifies a person customer in the graph." + }, + { + "name": "entity_type", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Organization when the customer has a company name, otherwise person. Decides whether the graph records the customer as a person or as an organization." + }, + { + "name": "provider_user_id", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The customer's QuickBooks Id, for person customers only. Empty for organizations. Identifies the person in the graph." + }, + { + "name": "phones", + "uses": [ + "Searchable text" + ], + "text": "The primary, mobile, alternate and fax numbers, each once. Phone numbers do not identify the customer in the graph." + }, + { + "name": "url", + "uses": [ + "Searchable text" + ], + "text": "The customer's website. It is part of the text, not a link back to QuickBooks." + }, + { + "name": "organization_name", + "uses": [ + "Searchable text" + ], + "text": "The company name for an organization, or the parent customer's name for a person." + }, + { + "name": "organization_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "For a person, the parent customer's id. Links the person to that parent customer. Empty for organizations." + }, + { + "name": "emails", + "uses": [ + "Stored only" + ], + "text": "An empty list. Secondary email addresses are not kept." + } + ] + }, + { + "name": "Invoices", + "kind": "knowledge_base", + "one_document": "One invoice.", + "title": "`Invoice - `.", + "text": "The customer memo, then `Customer`, `Total`, `Balance`, `Invoice date`, `Due date`, `Line items` and `Note` lines, and the update time. The title is searchable too.", + "date": "When the invoice was last updated, or created when there is no update time.", + "link_back": "None.", + "files": "Files attached to an invoice arrive as separate attachment documents linked to it.", + "attributes": [ + { + "name": "CustomerRef", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The customer the invoice belongs to. Its id links the invoice to the customer's document. Its name is in the title and the `Customer` line. The id itself is not searchable." + }, + { + "name": "DocNumber", + "uses": [ + "Searchable text" + ], + "text": "The invoice number, in the title." + }, + { + "name": "Line items", + "uses": [ + "Searchable text" + ], + "text": "Each line's description with its item or account name, written into the `Line items` line. Other line details are not searchable." + } + ] + }, + { + "name": "Payments", + "kind": "knowledge_base", + "one_document": "One customer payment.", + "title": "`Payment - `.", + "text": "The private note, then `Customer`, `Total`, `Payment date` and `Reference` lines, and the update time. The title is searchable too.", + "date": "When the payment was last updated, or created when there is no update time.", + "link_back": "None.", + "files": "Files attached to a payment arrive as separate attachment documents linked to it.", + "attributes": [ + { + "name": "CustomerRef", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The customer who paid. Its id links the payment to the customer's document. Its name is in the title and the `Customer` line. The id itself is not searchable." + }, + { + "name": "PaymentRefNum", + "uses": [ + "Searchable text" + ], + "text": "The payment reference, in the title and the `Reference` line." + } + ] + }, + { + "name": "Bills", + "kind": "knowledge_base", + "one_document": "One vendor bill.", + "title": "`Bill - `.", + "text": "The private note, then `Vendor`, `Total`, `Balance`, `Bill date`, `Due date` and `Line items` lines, and the update time. The title is searchable too.", + "date": "When the bill was last updated, or created when there is no update time.", + "link_back": "None.", + "files": "Files attached to a bill arrive as separate attachment documents linked to it.", + "attributes": [ + { + "name": "VendorRef", + "uses": [ + "Searchable text" + ], + "text": "The vendor's name, in the title and the `Vendor` line. Vendors are not their own documents, so a bill is not linked to a vendor." + }, + { + "name": "DocNumber", + "uses": [ + "Searchable text" + ], + "text": "The bill number, in the title." + }, + { + "name": "Line items", + "uses": [ + "Searchable text" + ], + "text": "Each line's description with its item or account name, written into the `Line items` line. Other line details are not searchable." + } + ] + }, + { + "name": "Attachments", + "kind": "knowledge_base", + "one_document": "One attachment: a file or a note.", + "title": "The file name.", + "text": "When the file's text is read, that text is the document's text. Otherwise, the attachment note, then `File name`, `Content type` and `File size` lines. The title and the update time are searchable either way.", + "date": "When the attachment was last updated, or created when there is no update time.", + "link_back": "None.", + "files": "The file is downloaded and its text is read. A file larger than 50 MiB is not downloaded, and only its note and file details are searchable.", + "attributes": [ + { + "name": "File text", + "uses": [ + "Searchable text" + ], + "text": "The text read from the file, such as a PDF attached to an invoice." + }, + { + "name": "Note", + "uses": [ + "Searchable text" + ], + "text": "The attachment note. Searchable only when the file's text was not read. Read file text takes its place." + }, + { + "name": "ContentType, Size", + "uses": [ + "Searchable text" + ], + "text": "The file's media type and size. Searchable only when the file's text was not read. Otherwise kept for inspection." + }, + { + "name": "AttachableRef", + "uses": [ + "Graph connection" + ], + "text": "Every QuickBooks record the file is attached to. Links the attachment to each of those records. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "The first record the file is attached to. The graph places the attachment under that record. Not searchable, and not a query filter." + } + ] + } + ], + "example_searches": [ + "What is the outstanding balance on invoices for Acme Corp?", + "What does the contract PDF attached to invoice 1042 say?", + "Which bills from Office Depot still have a balance?" + ], + "graph": { + "connections": [ + "An invoice to its customer.", + "A payment to its customer.", + "An attachment to every record it is attached to, and under the first of them.", + "A person customer to its parent customer, when it has one.", + "Bills are not linked to a vendor.", + "No links to other tools." + ], + "people": [ + "Each customer: as a person, or as an organization when it has a company name.", + "For a person customer with a parent customer, the parent as their organization.", + "Vendors are not attached as people or organizations. They appear in bill text only." + ], + "from_text": "Customer notes, invoice memos, payment and bill notes, line items and attachment text." + }, + "not_synced": [ + "Record types you did not select.", + "Vendors, items, accounts, estimates, sales receipts, credit memos, journal entries and other QuickBooks record types. Vendors, items and accounts appear only as names in bills and line items.", + "QuickBooks reports, such as profit and loss or the balance sheet.", + "Deletions: records deleted in QuickBooks stay in HydraDB.", + "The text of files larger than 50 MiB." + ], + "callouts": { + "opening": { + "kind": "warning", + "text": "QuickBooks connects to sandbox companies only. The connection form has no setting to reach a live QuickBooks company." + }, + "connect": { + "kind": "warning", + "text": "Connect a QuickBooks sandbox company. Connecting a live company is not supported by the connection form." + } + } +} diff --git a/scripts/connector_pages/recurly.json b/scripts/connector_pages/recurly.json new file mode 100644 index 00000000..5a553f1f --- /dev/null +++ b/scripts/connector_pages/recurly.json @@ -0,0 +1,249 @@ +{ + "description": "Sync customer accounts, invoices, subscriptions and transactions from one Recurly site. Invoices, subscriptions and transactions link to their account.", + "opening": [ + "Sync customer accounts, invoices, subscriptions and transactions from one Recurly site. Each record is one document with a readable summary, with amounts shown in their currency, such as `49.99 USD`. Invoices, subscriptions and transactions link to the account they belong to.", + "Recurly permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Records deleted in Recurly stay in HydraDB. Plans, coupons, adjustments and billing info are not synced as documents." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Recurly uses a private API key together with your site's subdomain.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "A Recurly private API key." + }, + { + "name": "subdomain", + "type": "string", + "required": true, + "text": "Your Recurly site code, for example `acme` for `acme.recurly.com`." + }, + { + "name": "user_agent", + "type": "string", + "text": "Filled in automatically. Leave it empty." + } + ], + "steps": [ + { + "title": "Get a private API key", + "text": "Get a private API key for your Recurly site." + }, + { + "title": "Create the connector", + "text": "Paste the key as `api_key` and your site code as `subdomain`." + }, + { + "title": "Select the site", + "text": "Select the `All data` resource. It syncs accounts, invoices, subscriptions and transactions together. You cannot select these record types separately." + } + ], + "account": "One connector reads one Recurly site." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads accounts, invoices and subscriptions updated since the last sync, and transactions collected since the last sync.", + "edits": "An edited account, invoice or subscription replaces its document. Transactions are found by when they were collected, so a later change to a collected transaction's status may not be picked up.", + "deletes": "Deleted records are not removed. A record deleted in Recurly stays searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the record was last updated in Recurly. When there is none, the creation time is used, and for a transaction then the collection time. Not searchable." + }, + { + "name": "additional_metadata.recurly_id", + "uses": [ + "Query filter" + ], + "text": "The Recurly record id. Finds one account, invoice, subscription or transaction. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `recurly`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The record type: `accounts`, `invoices`, `subscriptions` or `transactions`." + }, + { + "name": "Other Recurly fields", + "uses": [ + "Stored only" + ], + "text": "Every other field Recurly returns for the record, such as an account's address, custom fields, cc emails and VAT number. Kept for inspection only. A query does not match them and cannot filter on them." + } + ], + "documents": [ + { + "name": "Accounts", + "kind": "custom", + "one_document": "One customer account.", + "title": "The company. Otherwise the first and last name, then the email, then the account code.", + "text": "`Name`, `Company`, `Email`, `Code` and `State` lines. The title is searchable too.", + "date": "When the account was last updated, or created when there is no update time.", + "link_back": "None.", + "attributes": [ + { + "name": "email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The account's email, in the `Email` line and the title when there is no company or name. Identifies the account as a person in the graph." + }, + { + "name": "username", + "uses": [ + "Graph identity" + ], + "text": "The account's username, when Recurly has one. Identifies the account as a person in the graph, even without an email. Not searchable." + }, + { + "name": "company, first_name, last_name, code", + "uses": [ + "Searchable text" + ], + "text": "The company, name and account code, in the title and the `Name`, `Company` and `Code` lines." + }, + { + "name": "state", + "uses": [ + "Searchable text" + ], + "text": "The account's state, in the `State` line." + } + ] + }, + { + "name": "Invoices", + "kind": "custom", + "one_document": "One invoice.", + "title": "`Invoice - `, with the account shown as its company, name, email or code.", + "text": "The customer notes, then `Account`, `State`, `Total` and `Balance` with the currency, `Due date` and `Line items` lines. Each line item shows its description. The title is searchable too.", + "date": "When the invoice was last updated, or created when there is no update time.", + "link_back": "None.", + "files": "Invoice PDFs are not downloaded.", + "attributes": [ + { + "name": "account", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The account the invoice belongs to. Its id links the invoice to the account's document. Its name is in the title and the `Account` line. The id itself is not searchable." + }, + { + "name": "number", + "uses": [ + "Searchable text" + ], + "text": "The invoice number, in the title." + }, + { + "name": "line_items", + "uses": [ + "Searchable text" + ], + "text": "Each line's description, in the `Line items` line. Other line details are not searchable." + } + ] + }, + { + "name": "Subscriptions", + "kind": "custom", + "one_document": "One subscription.", + "title": "` subscription - `.", + "text": "The customer notes, then `Plan`, `Account`, `State`, `Amount` (the unit amount with its currency), `Quantity` and `Current period ends` lines. The title is searchable too.", + "date": "When the subscription was last updated, or created when there is no update time.", + "link_back": "None.", + "attributes": [ + { + "name": "account", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The subscribed account. Its id links the subscription to the account's document. Its name is in the title and the `Account` line. The id itself is not searchable." + }, + { + "name": "plan", + "uses": [ + "Searchable text" + ], + "text": "The plan name, in the title and the `Plan` line. Plans are not their own documents." + } + ] + }, + { + "name": "Transactions", + "kind": "custom", + "one_document": "One payment transaction.", + "title": "`Transaction - `.", + "text": "The customer message, then `Account`, `Amount`, `Status`, `Type`, `Origin`, `Invoice` (the invoice number) and `Collected at` lines. The title is searchable too.", + "date": "When the transaction was last updated. Otherwise when it was created, then when it was collected.", + "link_back": "None.", + "attributes": [ + { + "name": "account", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The paying account. Its id links the transaction to the account's document. Its name is in the title and the `Account` line. The id itself is not searchable." + }, + { + "name": "invoice", + "uses": [ + "Searchable text" + ], + "text": "The invoice number, in the `Invoice` line. It is text only. The transaction is not linked to the invoice's document." + } + ] + } + ], + "example_searches": [ + "What is the outstanding balance on Acme Corp's latest Recurly invoice?", + "Which plan is Acme Corp subscribed to, and when does the current period end?", + "Did the payment from jane@example.com on 2026-11-02 succeed?" + ], + "graph": { + "connections": [ + "An invoice to its account.", + "A subscription to its account.", + "A transaction to its account.", + "Transactions are not linked to their invoice. The invoice number is in the text only.", + "No links to other tools." + ], + "people": [ + "Each account, as a person identified by its email and username." + ], + "from_text": "Account details, customer notes and messages, plan names, line items and the rest of each record's summary." + }, + "not_synced": [ + "Billing info, adjustments, coupons, coupon redemptions, plans and plan add-ons as documents.", + "Invoice PDFs.", + "Account custom fields, addresses and billing details as searchable text. They are stored for inspection only.", + "Deletions: records deleted in Recurly stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/sendgrid.json b/scripts/connector_pages/sendgrid.json new file mode 100644 index 00000000..52dea79e --- /dev/null +++ b/scripts/connector_pages/sendgrid.json @@ -0,0 +1,105 @@ +{ + "description": "Sync single-send campaigns, contact lists, segments and email templates from one SendGrid account, one document per record.", + "opening": [ + "Sync the single-send campaigns, contact lists, segments and email templates of one SendGrid account. Each record is one document: a readable summary of its fields, plus any email subject and content the record carries. SendGrid usually leaves email HTML and plain-text content out of these records, so many single sends and templates are searchable by their name, subject and settings only.", + "SendGrid permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Individual contacts, sent emails, suppressions and statistics are not synced. Every sync reads all four record types in full." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "SendGrid uses an API key.", + "credentials": [ + { + "name": "api_key", + "type": "secret string", + "required": true, + "text": "A SendGrid API key." + } + ], + "steps": [ + { + "title": "Create the connector", + "text": "Paste a SendGrid API key as `api_key`." + }, + { + "title": "Select the account", + "text": "HydraDB offers one resource that covers the whole SendGrid account. Select it to sync." + } + ], + "account": "One connector reads one SendGrid account, in full." + }, + "sync": { + "first_sync": "Reads every single send, list, segment and template, whatever its age.", + "changes": "Each sync reads all four record types in full again.", + "edits": "A changed record replaces its document. A record with no SendGrid id is identified by a hash of its content instead, so a change to it can create a new document rather than update the old one.", + "deletes": "Records deleted in SendGrid stay searchable in HydraDB." + }, + "documents": [ + { + "name": "Single sends, lists, segments and templates", + "kind": "custom", + "one_document": "One single send, one list, one segment or one template.", + "title": "The record's name. A record with no name is titled `Sendgrid` with its record type and id.", + "text": "The title on the first line. Then every simple field of the record as a `Label: value` line, in alphabetical order, leaving out ids and content fields. For a template, one line per version with its name and subject. Then the email subject and the email content, with HTML converted to text, when the record includes them.", + "date": "For a single send, its scheduled send time. For a segment or template, when it was last updated, else when it was created. A list has no date.", + "link_back": "None.", + "files": "None.", + "attributes": [ + { + "name": "Record fields", + "uses": [ + "Searchable text" + ], + "text": "Every field SendGrid returned is kept on the document. Simple values are searchable through their lines in the text. Nested values are kept but not searchable, apart from template version names and subjects." + }, + { + "name": "additional_metadata.sendgrid_id", + "uses": [ + "Query filter" + ], + "text": "The record's SendGrid id, or a hash of its content when it has none. Picks out one record. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `sendgrid`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "Whether the record is a single send, list, segment or template." + } + ] + } + ], + "example_searches": [ + "What was the subject line of our March newsletter single send?", + "Which marketing lists do we have, and how many contacts are in them?", + "Which email templates exist for onboarding?" + ], + "graph": { + "connections": "The connector creates no links. A single send is not linked to the lists, segments or template it uses.", + "people": "The connector does not attach records to people.", + "from_text": "The record text." + }, + "not_synced": [ + "Individual contacts and recipients.", + "Individual sent emails.", + "Bounces, blocks, spam reports, invalid emails and suppression lists and groups.", + "Senders.", + "Send and automation statistics.", + "Email content that SendGrid leaves out of these records." + ] +} diff --git a/scripts/connector_pages/sentry.json b/scripts/connector_pages/sentry.json new file mode 100644 index 00000000..59afa915 --- /dev/null +++ b/scripts/connector_pages/sentry.json @@ -0,0 +1,294 @@ +{ + "description": "Sync issues and error events from the Sentry projects you choose, plus the organization's projects, teams and members. Sentry permissions are not carried over.", + "opening": [ + "Sync issues and error events from the Sentry projects you select, plus project, team and member records. Each issue, event, project, team and member is one document. Teams and members cover the whole organization, even when you select only a few projects.", + "Sentry access controls are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. An event is not linked to the issue it belongs to. Issue comments, stack traces and breadcrumbs are not synced." + ], + "permissions": { + "carried": false, + "notes": [ + "Sentry team-based project access is not reproduced." + ] + }, + "connect": { + "auth": "Sentry uses an internal integration token.", + "credentials": [ + { + "name": "api_token", + "type": "secret string", + "required": true, + "text": "The token of a Sentry internal integration, created under Organization settings, Developer settings." + } + ], + "settings": [ + { + "name": "organization", + "type": "string", + "text": "The organization slug. If you leave it out, HydraDB uses the first organization the token returns, and warns if the token reaches more than one." + } + ], + "permissions_label": "Scopes to give the internal integration", + "permissions": [ + { + "name": "org:read" + }, + { + "name": "project:read" + }, + { + "name": "event:read" + } + ], + "steps": [ + { + "title": "Create an internal integration", + "text": "In Sentry, open your organization's Developer settings and create an internal integration with `org:read`, `project:read` and `event:read`. Copy its token." + }, + { + "title": "Create the connector", + "text": "Paste the token as `api_token`. If the token reaches more than one organization, set `organization` to the one you want." + }, + { + "title": "Select projects", + "text": "HydraDB lists the projects the token can see, by slug. Listing stops after 20 pages. Select the projects to sync." + } + ], + "account": "One connector reads one Sentry organization." + }, + "sync": { + "first_sync": "Issues and events reach back the window set by `lookback_days`, 30 days by default. Issues are measured by when they were last seen, events by when they were created. Selected projects, teams and members are read in full, whatever their age.", + "changes": "Each sync reads issues seen again since the last sync and events created since then. Selected projects, teams and members are read in full on every sync.", + "edits": "An issue is read again when it recurs. A change of status or assignee without a new occurrence may not be picked up.", + "deletes": "Resolving or ignoring an issue changes its status. It does not remove the document. An item deleted in Sentry stays searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": ["Query filter"], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": ["Query filter"], + "text": "Always `sentry`. Not searchable." + } + ], + "documents": [ + { + "name": "Issues", + "kind": "ticket", + "one_document": "One Sentry issue: a group of similar errors.", + "title": "The issue title. An issue with no title is called `Sentry issue` with its id.", + "text": "The title, then a `Culprit` line, the exception type and value, and `File`, `Function`, `Level` and `Project` lines. The status, the assignee and the issue's short id are searchable too.", + "date": "When the issue was last seen, else when it was first seen.", + "link_back": "The issue page in Sentry.", + "attributes": [ + { + "name": "Issue id", + "uses": ["Searchable text"], + "text": "The short id, such as `PROJECT-123`, else the numeric id. Keeps later syncs on the same document, and a search can match it." + }, + { + "name": "status", + "uses": ["Searchable text"], + "text": "`resolved`, `unresolved` or `ignored`, so a query can match the issue's status." + }, + { + "name": "assignee", + "uses": ["Searchable text", "Graph connection", "Graph identity"], + "text": "The assigned user's or team's name, else their email, written as an `Assignee` line. A team assignment also links the issue to that team's record through `related_to`, using the Sentry team ID. A user assignment does not link to an organization member record." + }, + { + "name": "Project id", + "uses": ["Graph connection"], + "text": "The Sentry project ID links the issue to its project's record through `part_of`. Not searchable." + }, + { + "name": "culprit", + "uses": ["Searchable text"], + "text": "The code location Sentry blames, written as the `Culprit` line." + }, + { + "name": "level", + "uses": ["Searchable text"], + "text": "The severity, written as the `Level` line." + }, + { + "name": "first_seen, last_seen", + "uses": ["Result date"], + "text": "When the issue first and last occurred. The last occurrence, else the first, is the result date. Not searchable." + }, + { + "name": "additional_metadata.sentry_id", + "uses": ["Query filter"], + "text": "The numeric issue id. Picks out one issue. Not searchable." + }, + { + "name": "additional_metadata.sentry_short_id", + "uses": ["Query filter"], + "text": "The short id, such as `PROJECT-123`. Picks out one issue. This key is not searchable, but the short id is part of the issue text." + }, + { + "name": "num_comments, user_count", + "uses": ["Stored only"], + "text": "How many comments the issue has and how many users it affected." + }, + { + "name": "logger, platform", + "uses": ["Stored only"], + "text": "The logger and platform that produced the issue." + } + ] + }, + { + "name": "Error events", + "kind": "ticket", + "one_document": "One error event.", + "title": "The event title, else its message. An event with neither is called `Sentry event` with its id.", + "text": "The title, then `Message`, `Culprit`, `Location`, `Platform` and `Project` lines. The event id is searchable too.", + "date": "When the event was created.", + "link_back": "None.", + "attributes": [ + { + "name": "Event id", + "uses": ["Searchable text"], + "text": "The Sentry event id. Keeps later syncs on the same document, and a search can match it." + }, + { + "name": "message, culprit, location, platform", + "uses": ["Searchable text"], + "text": "The event message, the blamed code location, the location and the platform, each written as its own line." + }, + { + "name": "project_id, parent_id", + "uses": ["Searchable text", "Graph connection"], + "text": "The event's project, as `project:`, written in the `Project` and `Parent` lines. Links the event to its project's record." + }, + { + "name": "Event time", + "uses": ["Result date"], + "text": "When the event was created. Not searchable." + }, + { + "name": "group_id", + "uses": ["Stored only"], + "text": "The id of the issue the event belongs to. It does not link the event to the issue." + } + ] + }, + { + "name": "Projects and teams", + "kind": "knowledge_base", + "one_document": "One Sentry project or team.", + "title": "The name, else the slug. A record with neither gets a generated title with its id.", + "text": "The name and a `Slug` line. A project also has `Platform` and `Status` lines. The title is searchable too.", + "date": "When the project or team was created.", + "link_back": "None.", + "attributes": [ + { + "name": "Project id", + "uses": ["Graph connection"], + "text": "A project's id, as `project:`. Issues and events of the project link to this record. Not searchable." + }, + { + "name": "Owning team ids", + "uses": ["Graph connection"], + "text": "The Sentry team IDs link a project to each owning team's record through `part_of`. Not searchable." + }, + { + "name": "Team id", + "uses": ["Graph connection"], + "text": "The Sentry team ID identifies the record that assigned issues and owned projects link to. Not searchable." + }, + { + "name": "Creation time", + "uses": ["Result date"], + "text": "When the project or team was created. Not searchable." + }, + { + "name": "object_type", + "uses": ["Stored only"], + "text": "`project` or `team`." + } + ] + }, + { + "name": "Members", + "kind": "contact", + "one_document": "One organization member.", + "title": "The member's name, else their email. A member with neither gets a generated title with their id.", + "text": "The name, then `Email`, `Role` and `Invite status` lines, and any contact details Sentry reports, such as names, organization, emails, phone numbers, a profile link and the creation and update times. The title is searchable too.", + "date": "When the membership was created.", + "link_back": "The member's profile link, when Sentry reports one.", + "attributes": [ + { + "name": "email, emails", + "uses": ["Searchable text", "Graph identity"], + "text": "The member's primary and other emails. Identify the member as a person in the graph." + }, + { + "name": "display_name, provider_user_id", + "uses": ["Searchable text", "Graph identity"], + "text": "The member's display name and Sentry user id. Name the member as a person in the graph." + }, + { + "name": "first_name, last_name, job_title, organization_name, organization_id, lifecycle_stage", + "uses": ["Searchable text"], + "text": "Names, organization, role and invite status, when reported." + }, + { + "name": "owner, owner_email", + "uses": ["Searchable text", "Graph identity"], + "text": "The record owner and their email, when reported. The graph records the owner as a person." + }, + { + "name": "phones", + "uses": ["Searchable text"], + "text": "Phone numbers, when reported. They do not identify the person in the graph." + }, + { + "name": "url", + "uses": ["Searchable text"], + "text": "The profile link, when reported. Also the link back." + }, + { + "name": "created_at", + "uses": ["Searchable text", "Result date"], + "text": "When the membership was created." + }, + { + "name": "updated_at", + "uses": ["Searchable text"], + "text": "The last reported update, else the creation time. The graph also records it as when the member was last updated." + } + ] + } + ], + "example_searches": [ + "Which unresolved Sentry issues mention a timeout in the payments project?", + "Who is assigned to PAYMENTS-482?", + "Which file and function raise the KeyError issue?" + ], + "graph": { + "connections": [ + "An error event to its project's record.", + "Issues link to their project through `part_of` and, when assigned to a team, to that team through `related_to`. Projects link to each owning team through `part_of`.", + "These links use Sentry's project and team IDs, not display names, and are fully resolved only after the target is indexed in the same database and collection.", + "Event-to-issue and user-assignee-to-member links are not provided. An event's numeric group ID does not identify the issue's short ID, and a user ID is distinct from an organization member ID.", + "Stack traces are not read for links to code.", + "No links to items in other tools." + ], + "people": [ + "The assignee of each issue.", + "Each organization member, identified by email." + ], + "from_text": "Issue and event titles, messages, culprits and exception text." + }, + "not_synced": [ + "Projects you did not select.", + "Issue comments and activity. Only the comment count is kept.", + "Stack traces, breadcrumbs and tags beyond the issue summary.", + "Releases, alerts, performance data and replays.", + "Sentry team-based project access." + ] +} diff --git a/scripts/connector_pages/servicenow.json b/scripts/connector_pages/servicenow.json new file mode 100644 index 00000000..5d2e65b3 --- /dev/null +++ b/scripts/connector_pages/servicenow.json @@ -0,0 +1,554 @@ +{ + "description": "Sync knowledge articles, catalog items, ticket rows and custom-table rows from the ServiceNow resources you choose. ServiceNow read access carries over where its rules can be read and Enforce ACL is on.", + "opening": [ + "Sync the ServiceNow knowledge bases, service catalogs, ticket tables and custom tables you select. Each knowledge article, catalog item and table row is one document. Comments and work notes are searchable with the record they belong to, and attachments are read when the service account can download them and their format is supported.", + "Readers come from knowledge-base and catalog-item criteria and from table read rules. Rules with conditions or scripts cannot be captured, and standard ticket tables often use them. Search applies captured readers only when Enforce ACL is on. Work notes share their record's readers. Rows deleted in ServiceNow stay in HydraDB." + ], + "permissions": { + "carried": true, + "who_can_read": "A knowledge article can be read by the users its knowledge base's Can Read criteria allow, minus those its Cannot Read criteria exclude. A knowledge base with no criteria follows the instance's policy for that case. When the instance turns on article-level criteria, an article is limited further to users both allow. A catalog item can be read by the users its own criteria allow. Catalogs themselves carry no readers. A ticket or custom-table row can be read by users who hold the roles its table's read rules require, across the table and its parent tables, including roles held through a group. Comments and work notes share their record's readers. Rules that resolve to no users leave the item readable by no one.", + "identity": "A ServiceNow user's email address.", + "when_unreadable": "If a read rule has a condition or script, uses advanced user criteria, or yields more users than HydraDB can capture, the connector reports a permission warning.", + "notes": [ + "Standard ticket-table read rules often use scripts, so on many instances ticket readers cannot be captured. Set an access rule on such tables.", + "If an article's own criteria cannot be read, the article follows its knowledge base's readers, with a warning. That can be wider than the article's own rule.", + "Work notes are marked internal in ServiceNow, but they have no separate readers in HydraDB." + ] + }, + "connect": { + "auth": "ServiceNow uses an OAuth application with the client credentials grant. Its OAuth Application User is a dedicated service account. Basic authentication is not supported, and HydraDB never stores a user password.", + "credentials": [ + { + "name": "instance", + "type": "string", + "required": true, + "text": "The instance name only, for example `acme` for `acme.service-now.com`." + }, + { + "name": "client_id", + "type": "string", + "required": true, + "text": "The client id of the OAuth application." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The client secret of that application." + } + ], + "permissions_label": "Roles for the service account", + "permissions": [ + { + "name": "admin", + "text": "required. Reads every selected table, the lists HydraDB offers for selection, comments, work notes and attachments." + }, + { + "name": "snc_read_only", + "text": "required. Blocks every write from the service account, so it can only read." + } + ], + "permissions_note": "Reading permissions needs `admin` and `snc_read_only`, or read access to `sys_security_acl`, `sys_security_acl_role`, `user_criteria`, `sys_user`, `sys_user_has_role`, `sys_group_has_role` and `sys_user_grmember`.", + "steps": [ + { + "title": "Create a service account", + "text": "In ServiceNow, create a dedicated web-service user and give it the `admin` and `snc_read_only` roles. Set its timezone to GMT, so date windows line up as expected." + }, + { + "title": "Create an OAuth application", + "text": "Create an OAuth application for the client credentials grant, and set the service user as its OAuth Application User." + }, + { + "title": "Create the connector", + "text": "Enter the instance name, not the URL, as `instance`, then the client id and client secret." + }, + { + "title": "Select resources", + "text": "HydraDB lists the instance's knowledge bases, service catalogs, ticket tables and custom tables. Select the ones to sync. Nothing outside your selection is read. Each ticket table reads only rows of its exact class, so selecting a parent table does not bring in its child tables' rows, and selecting both never indexes a row twice." + } + ], + "account": "One connector reads one ServiceNow instance." + }, + "sync": { + "first_sync": "Each selected resource reaches back the window set by `lookback_days`, 30 days by default. Only published, latest-version articles and active catalog items are read.", + "changes": "Each selected resource syncs on its own and reads rows updated since the last sync. A record whose comment, work note or attachment changed is read again too.", + "edits": "An updated row is read again and updates its document. A new version of an article updates the same document, keyed by the article number.", + "deletes": "Rows deleted in ServiceNow stay searchable in HydraDB. An article that is retired, or a catalog item that is deactivated, is not removed when it stops being read.", + "notes": [ + "A service account without access to comments and work notes can get an empty answer instead of an error, so a ticket can sync without them.", + "A catalog item in several selected catalogs is one document, filed under the selected catalog with the lowest id." + ] + }, + "shared_attributes": [ + { + "name": "comments", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Comments and work notes the service account can read, each with its author and time, searchable with the record. The graph records each author." + }, + { + "name": "attachments", + "uses": [ + "Searchable text" + ], + "text": "Text read from attached files that downloaded and parsed successfully, searchable with the record. Each keeps a link to the original file." + }, + { + "name": "additional_metadata.servicenow_table", + "uses": [ + "Query filter" + ], + "text": "The source table, such as `incident` or `kb_knowledge`. Limits a query to one table. Not searchable." + }, + { + "name": "additional_metadata.servicenow_kind", + "uses": [ + "Query filter" + ], + "text": "Whether the item is an article, catalog item, ticket or custom row. Not searchable." + }, + { + "name": "additional_metadata.servicenow_sys_id", + "uses": [ + "Query filter" + ], + "text": "The row's current sys_id. Targets one row. For articles, use the number instead, because a new version has a new sys_id. Not searchable." + }, + { + "name": "additional_metadata.sys_class_name", + "uses": [ + "Query filter" + ], + "text": "The row's ServiceNow class, when supplied. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The selected knowledge base, catalog or table. Limits a query to it. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The name of the selected knowledge base, catalog or table, when available. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "Whether the item came from a knowledge base, a catalog or a table. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `servicenow`. Not searchable." + }, + { + "name": "acl", + "uses": [ + "Access rule" + ], + "text": "The users who can read the item, worked out as described under Permissions. Not searchable." + } + ], + "documents": [ + { + "name": "Knowledge articles", + "kind": "knowledge_base", + "one_document": "One knowledge article, in its published latest version.", + "title": "The short description, else the article number. Otherwise `ServiceNow article` and its id.", + "text": "The article text converted from HTML, else its wiki text, else the short description. The author and an `Updated` line are part of the text too. The title is searchable too.", + "date": "When the article was last updated, else when it was created.", + "link_back": "The article in the ServiceNow knowledge view, by its number.", + "files": "Attachments the service account can download are read when their format is supported, up to 25 MiB by default. Image fields are not read. Not every file yields text.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The article's author. The graph records the article as written by that person." + }, + { + "name": "additional_metadata.author_email", + "uses": [ + "Query filter", + "Graph identity" + ], + "text": "The author's email. Limits a query to one author, and identifies the author in the graph. Not searchable." + }, + { + "name": "additional_metadata.number", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The article number. Keeps every version of the article on one document, builds the link back, and becomes the title when there is no short description. Targets one article." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the article was last updated, written as an `Updated` line." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the article was created. Used as the result date only when the update time is missing. Not searchable." + }, + { + "name": "additional_metadata.workflow_state", + "uses": [ + "Query filter" + ], + "text": "The article's workflow state. Only published articles are synced. Not searchable." + }, + { + "name": "additional_metadata.article_version", + "uses": [ + "Query filter" + ], + "text": "The article's version, when supplied. Not searchable." + }, + { + "name": "additional_metadata.kb_category", + "uses": [ + "Query filter" + ], + "text": "The knowledge category. Limits a query to one category. Not searchable." + }, + { + "name": "additional_metadata.language", + "uses": [ + "Query filter" + ], + "text": "The article's language code. Not searchable." + }, + { + "name": "updated_by", + "uses": [ + "Stored only" + ], + "text": "The user name of the last editor. The editor is not attached to the article as a person." + }, + { + "name": "published_at", + "uses": [ + "Stored only" + ], + "text": "When the article was published. It is not the result date." + } + ] + }, + { + "name": "Catalog items", + "kind": "knowledge_base", + "one_document": "One active catalog item.", + "title": "The item name, else the short description. Otherwise `ServiceNow catalog item` and its id.", + "text": "The short description, then the full description converted from HTML. An `Updated` line is part of the text too. The title is searchable too.", + "date": "When the item was last updated, else when it was created.", + "link_back": "The catalog item in ServiceNow.", + "files": "Attachments the service account can download are read when their format is supported, up to 25 MiB by default. Image fields are not read. Not every file yields text.", + "attributes": [ + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the item was last updated, written as an `Updated` line." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the item was created. Used as the result date only when the update time is missing. Not searchable." + }, + { + "name": "additional_metadata.number", + "uses": [ + "Query filter" + ], + "text": "The item's number, when it has one. Targets one item. Not searchable." + }, + { + "name": "additional_metadata.category", + "uses": [ + "Query filter" + ], + "text": "The item's category. Limits a query to one category. Not searchable." + }, + { + "name": "updated_by", + "uses": [ + "Stored only" + ], + "text": "The user name of the last editor." + } + ] + }, + { + "name": "Tickets", + "kind": "ticket", + "one_document": "One row of a selected ticket table, such as an incident, problem, change request, request, requested item or catalog task, with its comments and work notes.", + "title": "The short description, else the ticket number. Otherwise `ServiceNow`, the table name and the row id.", + "text": "The description, then labeled sections when present: `Close notes`, `Resolution notes`, `Cause notes`, `Fix notes`, `Workaround`, `Implementation plan`, `Backout plan`, `Test plan` and `Justification`. The status, priority, assignee, reporter, ticket type, resolution date, parent and creation time are part of the text too, with the ticket's key. The title is searchable too.", + "date": "When the row was last updated, else when it was created.", + "link_back": "The record form in ServiceNow.", + "files": "Attachments the service account can download are read when their format is supported, up to 25 MiB by default. Image fields are not read. Not every file yields text.", + "attributes": [ + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The displayed state." + }, + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "The displayed priority." + }, + { + "name": "assignee", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The assigned person's name. The graph records the ticket as assigned to that person." + }, + { + "name": "additional_metadata.assignee_email", + "uses": [ + "Query filter", + "Graph identity" + ], + "text": "The assignee's email. Limits a query to one assignee, and identifies the assignee in the graph. Not searchable." + }, + { + "name": "reporter", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The caller, requested-for person or opener. The graph records the ticket as reported by that person." + }, + { + "name": "additional_metadata.reporter_email", + "uses": [ + "Query filter", + "Graph identity" + ], + "text": "The reporter's email. Limits a query to one reporter, and identifies the reporter in the graph. Not searchable." + }, + { + "name": "ticket_type", + "uses": [ + "Searchable text" + ], + "text": "The table's label, such as Incident." + }, + { + "name": "resolved_at", + "uses": [ + "Searchable text" + ], + "text": "When the ticket was resolved. It is not the result date." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The ticket's parent, else its requested item, else its request. Places the ticket under that record when its table is selected." + }, + { + "name": "additional_metadata.number", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The ticket number. Targets one ticket. Becomes the title when there is no short description." + }, + { + "name": "external_id", + "uses": [ + "Searchable text" + ], + "text": "The row's id, written into the text as the ticket's key. Keeps later syncs on the same document." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the row was created, written as a `Created` line. Used as the result date only when the update time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the row was last updated. Not searchable." + }, + { + "name": "additional_metadata.assignment_group", + "uses": [ + "Query filter" + ], + "text": "The assignment group's name. Limits a query to one group. Not searchable." + }, + { + "name": "additional_metadata.state_code", + "uses": [ + "Query filter" + ], + "text": "The raw state code. Not searchable." + }, + { + "name": "additional_metadata.priority_code", + "uses": [ + "Query filter" + ], + "text": "The raw priority code. Not searchable." + }, + { + "name": "additional_metadata.impact_code", + "uses": [ + "Query filter" + ], + "text": "The raw impact code. Not searchable." + }, + { + "name": "additional_metadata.urgency_code", + "uses": [ + "Query filter" + ], + "text": "The raw urgency code. Not searchable." + }, + { + "name": "additional_metadata.category", + "uses": [ + "Query filter" + ], + "text": "The ticket's category. Not searchable." + }, + { + "name": "due_date", + "uses": [ + "Stored only" + ], + "text": "The ticket's deadline." + }, + { + "name": "custom_fields", + "uses": [ + "Stored only" + ], + "text": "Impact, urgency, severity, subcategory, close and resolution codes, contact type, approval, risk, referenced names, and opened and closed dates." + } + ] + }, + { + "name": "Custom table rows", + "kind": "custom", + "one_document": "One row of a selected custom table.", + "title": "The table's display field, else `name`, `u_name`, the number or the short description. Otherwise `ServiceNow`, the table name and the row id.", + "text": "The row's non-empty text columns as `Label: value` lines, converted from HTML. The title is used when there are none.", + "date": "When the row was last updated, else when it was created.", + "link_back": "The record form in ServiceNow.", + "files": "Attachments the service account can download are read when their format is supported, up to 25 MiB by default. Image fields are not read. Not every file yields text.", + "attributes": [ + { + "name": "Text columns", + "uses": [ + "Searchable text" + ], + "text": "The row's non-empty text columns, with their display labels." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the row was last updated. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the row was created. Used as the result date only when the update time is missing. Not searchable." + }, + { + "name": "additional_metadata.number", + "uses": [ + "Query filter" + ], + "text": "The row's number, when it has one. Targets one row. Not searchable." + }, + { + "name": "table", + "uses": [ + "Stored only" + ], + "text": "The custom table's name. Filter on it with `additional_metadata.servicenow_table`." + } + ] + } + ], + "example_searches": [ + "How was the VPN outage incident resolved?", + "What does the knowledge base say about requesting a new laptop?", + "What work notes were left on change CHG0030012?" + ], + "graph": { + "connections": [ + "A ticket to its parent, else its requested item, else its request, and to any other of the three.", + "A ticket to its problem and to the record that caused it.", + "A ticket to its change request.", + "A link reaches a record only when that record's table is selected.", + "Each item is grouped under the knowledge base, catalog or table it came from.", + "No links to other tools." + ], + "people": [ + "The assignee and reporter of each ticket.", + "The author of each article.", + "The author of each comment and work note.", + "The assignment group is a filter, not a person or group in the graph." + ], + "from_text": "Descriptions, resolution and plan notes, comments and work notes, article text, and text read from attachments." + }, + "not_synced": [ + "Knowledge bases, catalogs and tables you did not select.", + "Unpublished and older article versions, and inactive catalog items.", + "Users, groups, CMDB items, journal entries and attachments as documents of their own.", + "Image fields, files over the download limit, and files whose text cannot be read.", + "Comments, work notes and attachments the service account cannot read." + ] +} diff --git a/scripts/connector_pages/sharepoint.json b/scripts/connector_pages/sharepoint.json new file mode 100644 index 00000000..285a78c5 --- /dev/null +++ b/scripts/connector_pages/sharepoint.json @@ -0,0 +1,360 @@ +{ + "description": "Sync files, site pages and list rows from the SharePoint Online sites you choose, one document per item. SharePoint permissions are not imported.", + "opening": [ + "Sync three kinds of content from the SharePoint Online sites you select: files in document libraries, site pages including news posts, and the rows of the site's lists. Each file, page and list row is one document. Text from supported files is searchable when HydraDB can download and read the files. A file whose text cannot be read is still findable by its name, library and folder path.", + "SharePoint permissions are not imported, so everything synced is visible to everyone who can query the collection unless you set an access rule. The first sync reaches only items modified in the last 30 days, files included, unless you raise `lookback_days`. Items deleted in SharePoint stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "SharePoint site and item permissions are not reproduced. Set an access rule on each site that must be restricted.", + "Every synced item carries `additional_metadata.rbac_warning`, a notice that SharePoint permissions were not captured." + ] + }, + "connect": { + "auth": "SharePoint uses a Microsoft Entra app registration with app-only access: a client id and client secret, with no signed-in user.", + "credentials": [ + { + "name": "tenant", + "type": "string", + "required": true, + "text": "Your Entra Directory (tenant) ID, as a GUID or its friendly name." + }, + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The Application (client) ID of the Entra app." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The client secret's Value, not its Secret ID." + } + ], + "credentials_note": "SharePoint is its own connector. Connecting it does not sync Microsoft Teams chat or Outlook mail.", + "permissions_label": "Microsoft Graph application permissions", + "permissions": [ + { + "name": "Sites.Read.All", + "text": "lists the tenant's sites and reads document libraries, site pages and lists with their columns and rows." + }, + { + "name": "Files.Read.All", + "text": "reads file details and downloads files so their text can be read." + } + ], + "permissions_note": "Both must be application permissions with tenant-wide admin consent. Delegated permissions do not work.", + "steps": [ + { + "title": "Register an Entra app", + "text": "In Microsoft Entra, register an app for app-only access and create a client secret." + }, + { + "title": "Grant permissions", + "text": "Add the Microsoft Graph application permissions `Sites.Read.All` and `Files.Read.All`, then grant tenant-wide admin consent." + }, + { + "title": "Create the connector", + "text": "Enter `tenant`, `client_id` and `client_secret`." + }, + { + "title": "Select sites", + "text": "HydraDB lists the tenant's sites. Select the sites to sync. Everything in a selected site is synced: its document libraries, pages and lists. You cannot select a single library or list. To reach items older than 30 days, raise `lookback_days` when you select them." + } + ], + "account": "One connector reads one Microsoft Entra tenant. `Sites.Read.All` covers every site in the tenant, but HydraDB reads only the sites you select." + }, + "sync": { + "first_sync": "Each selected site reads back the window set by `lookback_days`, 30 days by default. This applies to files too: a file not modified within the window is not synced, even on the first sync.", + "changes": "Each sync reads files, pages and list rows modified since the last sync.", + "edits": "A changed file, page or row is read again and replaces its document.", + "deletes": "Deleted files, pages and list rows are not removed. They stay searchable in HydraDB.", + "notes": [ + "If SharePoint refuses access to a list, the sync fails." + ] + }, + "shared_attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The creator's display name, or email if there is no name, written as the `Author` line. The graph records the item as written by that person." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the item was last modified, written as the `Updated` line. Sets the result date." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "The document library id for a file, the site id for a page, or the list id for a list row. Limits a query to one library, site or list. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "The library name for a file, the site name for a page, or the list name for a list row. Limits a query by that name. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "`drive` for a file, `site` for a page, `list` for a list row. Says what the two keys above refer to. Not searchable." + }, + { + "name": "additional_metadata.sharepoint_site_id", + "uses": [ + "Query filter" + ], + "text": "The site id. Limits a query to one site across its files, pages and list rows. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "A notice that SharePoint permissions were not captured. Present on every item. An access rule you set still applies. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `sharepoint`. Not searchable." + }, + { + "name": "site_id", + "uses": [ + "Stored only" + ], + "text": "The site's id." + }, + { + "name": "created_at", + "uses": [ + "Stored only" + ], + "text": "When the item was created. The result date uses the modified time instead." + } + ], + "documents": [ + { + "name": "Files", + "kind": "knowledge_base", + "one_document": "One file in a document library. Folders are not documents.", + "title": "The library name, folder path and file name joined with slashes, for example `Documents/Reports/2026/Q3.pdf`. A file with no name is titled `SharePoint file` and its id.", + "text": "The file's text when it could be read. Otherwise the title followed by `Type`, `Library`, `Path`, `Author`, `Link` and `Modified` lines, leaving out empty ones. The title, author and modified time are searchable in either case.", + "date": "When the file was last modified.", + "link_back": "Opens the file in SharePoint.", + "files": "Text from supported files is searchable when HydraDB can download and read the files. Files over 50 MiB keep only their details. Web pages (`.aspx`) and OneNote files (`.one`, `.onetoc2`) are not synced as files.", + "attributes": [ + { + "name": "drive_name", + "uses": [ + "Searchable text" + ], + "text": "The document library name. Starts the title, and is the `Library` line when the file's text could not be read." + }, + { + "name": "path", + "uses": [ + "Searchable text" + ], + "text": "The folder path inside the library. Part of the title, so files can be found by folder, and the `Path` line when the file's text could not be read." + }, + { + "name": "mime_type", + "uses": [ + "Searchable text" + ], + "text": "The file type as SharePoint reports it, written as the `Type` line. Searchable only on files whose text could not be read." + }, + { + "name": "url", + "uses": [ + "Searchable text" + ], + "text": "The file's SharePoint link. Written as the `Link` line only on files whose text could not be read." + }, + { + "name": "additional_metadata.sharepoint_drive_id", + "uses": [ + "Query filter" + ], + "text": "The document library id. Limits a query to one library. Not searchable." + }, + { + "name": "additional_metadata.sharepoint_item_id", + "uses": [ + "Query filter" + ], + "text": "The file id, unique only inside its library. Picks out one file. Not searchable." + }, + { + "name": "site_name", + "uses": [ + "Stored only" + ], + "text": "The site's display name. To limit a query to a site, use `additional_metadata.sharepoint_site_id`." + }, + { + "name": "drive_id", + "uses": [ + "Stored only" + ], + "text": "The document library's id." + }, + { + "name": "size", + "uses": [ + "Stored only" + ], + "text": "The file size in bytes." + } + ] + }, + { + "name": "Site pages", + "kind": "knowledge_base", + "one_document": "One site page or news post.", + "title": "The page title, else its name. A page with neither is titled `SharePoint page` and its id.", + "text": "The text of the page's web parts, with markup removed. The title, author and modified time are searchable too.", + "date": "When the page was last modified.", + "link_back": "Opens the page in SharePoint.", + "attributes": [ + { + "name": "additional_metadata.sharepoint_page_id", + "uses": [ + "Query filter" + ], + "text": "The page id, unique only inside its site. Picks out one page. Not searchable." + }, + { + "name": "site_name", + "uses": [ + "Stored only" + ], + "text": "The site's display name. To limit a query to a site, use `additional_metadata.container_name` or `additional_metadata.sharepoint_site_id`." + }, + { + "name": "page_layout", + "uses": [ + "Stored only" + ], + "text": "`article`, `home` or `newsLink`." + }, + { + "name": "is_news_post", + "uses": [ + "Stored only" + ], + "text": "Whether the page was promoted as a news post." + } + ] + }, + { + "name": "List rows", + "kind": "knowledge_base", + "one_document": "One row of a SharePoint list. Folder rows are skipped.", + "title": "The list name, a colon, and the row's Title column. When Title is empty, the first column with a value is used, and otherwise the row id.", + "text": "The title, a `List` line with the list and site names, then the row's columns in list order as labelled lines, then `Author`, `Modified` and `Link` lines. Empty values are left out. Hidden, reserved and most read-only columns are left out, and so are values that cannot be shown as text. If a list's column definitions cannot be read, its column values are left out. Columns are searchable as text, not as separate filters.", + "date": "When the row was last modified.", + "link_back": "The row's display form in SharePoint, else the row's web link.", + "files": "None. Files attached to list rows are not downloaded.", + "attributes": [ + { + "name": "list_name", + "uses": [ + "Searchable text" + ], + "text": "The list's display name. Starts the title and the `List` line." + }, + { + "name": "site_name", + "uses": [ + "Searchable text" + ], + "text": "The site's display name, written in the `List` line." + }, + { + "name": "url", + "uses": [ + "Searchable text" + ], + "text": "The row's link, written as the `Link` line." + }, + { + "name": "additional_metadata.sharepoint_list_id", + "uses": [ + "Query filter" + ], + "text": "The list id. Limits a query to one list. Not searchable." + }, + { + "name": "additional_metadata.sharepoint_list_item_id", + "uses": [ + "Query filter" + ], + "text": "The row id, unique only inside its list. Picks out one row. Not searchable." + }, + { + "name": "list_id", + "uses": [ + "Stored only" + ], + "text": "The list's id." + }, + { + "name": "list_template", + "uses": [ + "Stored only" + ], + "text": "The list template, such as `genericList`, `events` or `tasks`." + } + ] + } + ], + "example_searches": [ + "What does the travel policy PDF on the HR site say about per diem?", + "Which items in the Projects list mention the Platform team?", + "Find the Q3 board deck in the Finance Documents library." + ], + "graph": { + "connections": [ + "No links between items, and no links to items in other tools. Site, library and list are kept as filters, not as graph links." + ], + "people": [ + "The creator of each file, page and list row." + ], + "from_text": "The file text, the page text and the list row's columns." + }, + "not_synced": [ + "Sites you did not select.", + "Items last modified before the `lookback_days` window on the first sync, files included.", + "SharePoint site and item permissions.", + "Personal OneDrive, OneNote notebooks, comments, and metadata columns on library files.", + "Files attached to list rows, hidden lists and system lists.", + "Hidden, reserved and most read-only list columns, values that cannot be shown as text, and lookup-type columns beyond twelve per list.", + "Text of files over 50 MiB.", + "Deletions: deleted files, pages and list rows stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/shortcut.json b/scripts/connector_pages/shortcut.json new file mode 100644 index 00000000..8aa2c57f --- /dev/null +++ b/scripts/connector_pages/shortcut.json @@ -0,0 +1,238 @@ +{ + "description": "Sync every story and epic in the Shortcut workspace your token can read. Shortcut permissions are not imported.", + "opening": [ + "Sync every story and epic in the Shortcut workspace the token can read. There is nothing to select. Each story and each epic is one document with its description. A story links to its epic and to its parent story.", + "Shortcut permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Comments, tasks, files, owners and requesters are not synced, and a story's workflow state is kept only as a number. Stories and epics deleted in Shortcut stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "No per-team or per-story visibility is captured. To restrict the whole connector, set an access rule on its resource." + ] + }, + "connect": { + "auth": "Shortcut uses an API token.", + "credentials": [ + { + "name": "token", + "type": "secret string", + "required": true, + "text": "A Shortcut API token." + } + ], + "steps": [ + { + "title": "Create an API token", + "text": "In Shortcut, create an API token." + }, + { + "title": "Create the connector", + "text": "Paste the token as `token`." + }, + { + "title": "Configure the connector", + "text": "There is nothing to select. The connector syncs every story and epic the token can read." + } + ], + "account": "One connector reads the Shortcut workspace one token can read." + }, + "sync": { + "first_sync": "Reads back the window set by `lookback_days`, 30 days by default, measured on when stories and epics were last updated.", + "changes": "Each sync reads the stories and epics updated since the last sync. A story found both in the workspace and in a legacy Project is stored once.", + "edits": "An edited story or epic is picked up through its last-updated time and updates its document.", + "deletes": "Stories and epics deleted in Shortcut stay searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `shortcut`. Not searchable." + } + ], + "documents": [ + { + "name": "Stories", + "kind": "ticket", + "one_document": "One Shortcut story, including stories in legacy Projects.", + "title": "The story name, or `Shortcut story` and its id when the name is empty.", + "text": "The story description. The labels, the creation date and the story id are written as lines too. The title is searchable too.", + "date": "When the story was last updated, or when it was created if there is no update time.", + "link_back": "The story's page in Shortcut.", + "attributes": [ + { + "name": "Story id", + "uses": [ + "Searchable text" + ], + "text": "The Shortcut story id. It keeps later syncs on the same document." + }, + { + "name": "labels", + "uses": [ + "Searchable text" + ], + "text": "Label names, written as the `Labels` line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text" + ], + "text": "When the story was created, written as the `Created` line." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the story was last updated. Sets the result date and decides when a sync picks the story up. Not searchable." + }, + { + "name": "epic_id", + "uses": [ + "Graph connection" + ], + "text": "The epic the story belongs to. Links the story to that epic. Not searchable." + }, + { + "name": "parent_story_id", + "uses": [ + "Graph connection" + ], + "text": "The story this story is a sub-task of. Links the story to that parent. Not searchable." + }, + { + "name": "additional_metadata.shortcut_id", + "uses": [ + "Query filter" + ], + "text": "The story id. Picks out one story. Not searchable." + }, + { + "name": "story_type", + "uses": [ + "Stored only" + ], + "text": "`feature`, `bug` or `chore`. It is not written into the text." + }, + { + "name": "workflow_state", + "uses": [ + "Stored only" + ], + "text": "The workflow state's numeric id, not its name." + }, + { + "name": "completed", + "uses": [ + "Stored only" + ], + "text": "Whether the story is completed." + }, + { + "name": "project_id", + "uses": [ + "Stored only" + ], + "text": "The legacy Project id, often empty." + } + ] + }, + { + "name": "Epics", + "kind": "ticket", + "one_document": "One Shortcut epic.", + "title": "The epic name, or `Shortcut epic` and its id when the name is empty.", + "text": "The epic description. The creation date and the epic id are written as lines too. The title is searchable too.", + "date": "When the epic was last updated, or when it was created if there is no update time.", + "link_back": "The epic's page in Shortcut.", + "attributes": [ + { + "name": "Epic id", + "uses": [ + "Searchable text" + ], + "text": "`epic:` and the epic id, so it never clashes with a story id. Stories link to this id." + }, + { + "name": "created_at", + "uses": [ + "Searchable text" + ], + "text": "When the epic was created, written as the `Created` line." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the epic was last updated. Sets the result date and decides when a sync picks the epic up. Not searchable." + }, + { + "name": "additional_metadata.shortcut_id", + "uses": [ + "Query filter" + ], + "text": "The epic id, without the `epic:` prefix. Picks out one epic. Not searchable." + }, + { + "name": "additional_metadata.shortcut_kind", + "uses": [ + "Query filter" + ], + "text": "Always `epic`. Limits a query to epics. Not searchable." + }, + { + "name": "state", + "uses": [ + "Stored only" + ], + "text": "`to do`, `in progress` or `done`. It is not written into the text." + }, + { + "name": "completed", + "uses": [ + "Stored only" + ], + "text": "Whether the epic is completed." + }, + { + "name": "type", + "uses": [ + "Stored only" + ], + "text": "Always `epic`." + } + ] + } + ], + "example_searches": [ + "What does the story about the export bug say?", + "Which stories are labelled customer-request?", + "What is the Billing v2 epic about?" + ], + "graph": { + "connections": [ + "A story to its epic.", + "A story to its parent story.", + "No links to items in other tools." + ], + "people": "No people are attached to stories or epics. Owners, requesters and followers are not synced.", + "from_text": "Story and epic descriptions." + }, + "not_synced": [ + "Story comments, tasks (checklists), files and linked files.", + "Story owners, requesters and followers.", + "Readable workflow state names. Only the state's numeric id is kept.", + "Members, labels, milestones, iterations, categories, objectives and groups as items of their own." + ] +} diff --git a/scripts/connector_pages/slack.json b/scripts/connector_pages/slack.json new file mode 100644 index 00000000..1afeb94e --- /dev/null +++ b/scripts/connector_pages/slack.json @@ -0,0 +1,264 @@ +{ + "description": "Sync messages and replies from selected Slack channels. Private-channel restrictions require Enforce ACL and a successful permission read.", + "opening": [ + "Sync messages and replies from the public and private Slack channels you select in one workspace. Each message and each thread reply is one document, and a reply links to the message that started its thread. Shared files are downloaded and their text is searchable with the message when the download and text reading succeed.", + "Private-channel membership restricts search only when Enforce ACL is on and HydraDB can read the channel's members. Direct messages are not synced. Edits and deletions made in Slack after a message is synced are not picked up." + ], + "permissions": { + "carried": true, + "who_can_read": "A public channel's messages can be read by everyone who can query the collection. A private channel's messages can be read by its members. HydraDB reads this once per channel on each sync. There is no per-message permission.", + "identity": "A member's email address, in lower case. Bots and deactivated users have no email and are left out.", + "when_unreadable": "If HydraDB cannot read a channel's privacy, members or member emails, the connector reports a permission warning.", + "notes": [ + "A private channel with more than 1,000 members who have emails, or more than 3,000 members in all, cannot be captured. Set an access rule on such a channel.", + "Without `users:read.email`, permissions cannot be captured for any private channel." + ] + }, + "connect": { + "auth": "Slack uses a token from a Slack app installed in your workspace. A bot token or a user token works.", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "required": true, + "text": "A Slack bot token, which starts with `xoxb-`, or a user token, which starts with `xoxp-`." + } + ], + "permissions_label": "Scopes to add to the Slack app", + "permissions": [ + { + "name": "channels:read", + "text": "lists public channels for you to select." + }, + { + "name": "channels:history" + }, + { + "name": "groups:read", + "text": "lists private channels for you to select." + }, + { + "name": "groups:history" + }, + { + "name": "users:read" + }, + { + "name": "users:read.email", + "text": "without it, permissions cannot be captured for any private channel." + }, + { + "name": "files:read" + } + ], + "permissions_note": "If neither `channels:read` nor `groups:read` is granted, connecting fails with a message that names the missing scope.", + "steps": [ + { + "title": "Create a Slack app", + "text": "Create a Slack app for your workspace and add the scopes above." + }, + { + "title": "Install it", + "text": "Install the app in the workspace and copy its token." + }, + { + "title": "Create the connector", + "text": "Paste the token as `access_token`." + }, + { + "title": "Select channels", + "text": "HydraDB lists the non-archived channels the token can see. For each channel, it shows privacy, app membership and member count. Select the channels to sync." + } + ], + "account": "One token covers one Slack workspace.", + "scope_unit": "Slack workspace" + }, + "sync": { + "first_sync": "A newly selected channel reads back the window set by `lookback_days`, 30 days by default.", + "changes": "New messages and replies are synced from recent history. New replies on older threads are checked every 6 hours by default. That check covers channel history over multiple syncs, so older replies may arrive later.", + "edits": "A routine sync does not pick up an edit to a message that is already synced.", + "deletes": "Deleted messages are not removed. A message deleted in Slack stays searchable in HydraDB." + }, + "documents": [ + { + "name": "Messages", + "kind": "message", + "one_document": "One Slack message: a message posted in a channel, or a single reply in a thread.", + "title": "The channel name with `#`, a colon and the message's first line, cut to about 80 characters, for example `#general: Deploy is done`. A reply reads `#general thread: ...`. A message with no text is titled `Slack message`. When a message has text, search matches the message, not this title, so a channel name in a query does not reliably limit results to that channel.", + "text": "The message text, with mentions turned into display names. Then the pretext, title and text of any legacy attachments, and one `[file: name]` line per shared file. The sender is written as a `From` line and the time as a `Sent` line.", + "date": "The message's Slack timestamp.", + "link_back": "A Slack permalink to the message. A reply links to itself inside its thread. Empty if the workspace address could not be read.", + "files": "Each shared file is downloaded and read, and its text becomes searchable with the message. A file is skipped if Slack gave no download address, the download fails, or the file is too large.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The display name of the person or bot that posted, written as the `From` line. The graph records the message as sent by that person. If the name could not be read, the raw Slack id is kept, and later syncs do not go back to fix it." + }, + { + "name": "Shared files", + "uses": [ + "Searchable text" + ], + "text": "The text read from each shared file, searchable with the message." + }, + { + "name": "created_at", + "uses": [ + "Result date", + "Searchable text" + ], + "text": "The message time, written as the `Sent` line." + }, + { + "name": "mentions", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Display names of people mentioned in the message. The graph records each as mentioned." + }, + { + "name": "additional_metadata.slack_ts", + "uses": [ + "Query filter" + ], + "text": "The message's Slack timestamp. Picks out one exact message. Not searchable." + }, + { + "name": "additional_metadata.slack_thread_ts", + "uses": [ + "Query filter" + ], + "text": "The timestamp of the thread's first message, empty outside a thread. Limits a query to one thread. Not searchable." + }, + { + "name": "additional_metadata.slack_subtype", + "uses": [ + "Query filter" + ], + "text": "Slack's message subtype, such as `bot_message` or `file_share`. Includes or excludes bot posts and file shares. Not searchable." + }, + { + "name": "additional_metadata.slack_bot_id", + "uses": [ + "Query filter" + ], + "text": "The bot id when a bot posted the message. Includes or excludes one bot's messages. Not searchable." + }, + { + "name": "additional_metadata.slack_reply_count", + "uses": [ + "Query filter" + ], + "text": "How many replies the thread has. Finds thread starters by how many replies they drew. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's messages. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `slack`. Not searchable." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "For a reply, the message that started its thread. Joins the reply to that message, so the whole conversation can be returned together. Not searchable." + }, + { + "name": "thread_id", + "uses": [ + "Graph connection" + ], + "text": "The thread a message belongs to. Groups every message of one thread together in the graph. Not searchable." + }, + { + "name": "Channel", + "uses": [ + "Access rule" + ], + "text": "The selected channel. For a private channel, its members decide who can read its messages. Not searchable." + }, + { + "name": "attachment_count", + "uses": [ + "Stored only" + ], + "text": "How many legacy attachments the message had." + }, + { + "name": "file_count", + "uses": [ + "Stored only" + ], + "text": "How many shared files Slack listed, including any that could not be downloaded." + }, + { + "name": "is_edited", + "uses": [ + "Stored only" + ], + "text": "Whether Slack marked the message as edited when it was read. Later edits are not picked up automatically." + }, + { + "name": "edited_by", + "uses": [ + "Stored only" + ], + "text": "The display name of the editor, when edited. The editor is not added to the graph as a person." + }, + { + "name": "edited_at", + "uses": [ + "Stored only" + ], + "text": "The edit time, when edited. The result date stays the original message time." + }, + { + "name": "slack_files", + "uses": [ + "Stored only" + ], + "text": "The details Slack supplied for each shared file, kept even when a file's text could not be read." + } + ] + } + ], + "example_searches": [ + "What did the team decide about the release last week?", + "What did Priya say in the thread about the pricing change?", + "Which messages were posted by the alerts bot?" + ], + "graph": { + "connections": [ + "A thread reply to the message that started the thread.", + "Every message to its thread, including a message nobody replied to.", + "No links to items in other tools." + ], + "people": [ + "The sender of each message.", + "People mentioned in a message.", + "An editor is kept with the message but not added to the graph." + ], + "from_text": "The message text, legacy attachment text and shared file text. Each reply is read together with the text of its thread's first message." + }, + "not_synced": [ + "Archived channels: HydraDB does not list them for selection.", + "Direct messages and group direct messages.", + "System messages: joins, leaves, renames, topic and purpose changes, pins, bots being added or removed, and thread broadcasts.", + "Edits and deletions made after a message was synced.", + "Reactions." + ] +} diff --git a/scripts/connector_pages/smartsheet.json b/scripts/connector_pages/smartsheet.json new file mode 100644 index 00000000..3728211a --- /dev/null +++ b/scripts/connector_pages/smartsheet.json @@ -0,0 +1,109 @@ +{ + "description": "Sync every row of the Smartsheet sheets you choose, one searchable document per row. Smartsheet sharing is not imported.", + "opening": [ + "Sync every row of the Smartsheet sheets you select. Each row is one document, with each non-empty cell written as a column-and-value line.", + "Smartsheet sharing is not imported, so every synced row is visible to everyone who can query the collection unless you set an access rule. Attachments and discussions are not synced. Rows deleted in Smartsheet stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "Smartsheet sharing is not reproduced. Set an access rule on each sheet that should be restricted." + ] + }, + "connect": { + "auth": "Smartsheet uses an API access token.", + "credentials": [ + { + "name": "smartsheet_access_token", + "type": "secret string", + "required": true, + "text": "A Smartsheet API access token for a user who can read the sheets." + } + ], + "steps": [ + { + "title": "Generate a token", + "text": "In Smartsheet, generate an API access token for a user who can view the sheets you want." + }, + { + "title": "Create the connector", + "text": "Paste the token as `smartsheet_access_token`." + }, + { + "title": "Select sheets", + "text": "HydraDB lists the sheets the token can read. Select the sheets to sync. Each row of a selected sheet becomes one document." + } + ], + "account": "One connector reads the sheets one token's Smartsheet user can view." + }, + "sync": { + "first_sync": "A newly selected sheet reads back the window set by `lookback_days`, 30 days by default, measured on when rows were last modified.", + "changes": "Each sync reads the rows modified since the last sync.", + "edits": "A row with a changed cell is read again and updates the same document.", + "deletes": "Deleted rows are not removed. A row deleted in Smartsheet stays searchable in HydraDB." + }, + "documents": [ + { + "name": "Rows", + "kind": "knowledge_base", + "one_document": "One row of a selected sheet.", + "title": "The first non-empty cell in a column named `name`, `title`, `subject` or `task name`, in any case, taking columns in alphabetical order. Otherwise the first other non-empty value. Otherwise the sheet name and `row`.", + "text": "The title, then one `Column: value` line per non-empty cell, with columns in alphabetical order, not sheet order. Cross-sheet references and predecessors appear as cell text.", + "date": "When the row was last modified.", + "link_back": "The sheet that holds the row, not the row itself.", + "files": "Row attachments are not synced.", + "attributes": [ + { + "name": "Cells", + "uses": ["Searchable text"], + "text": "Every non-empty cell, as `Column: value`. Columns are not individual query filters. Contact and assignee columns are text only, not people in the graph." + }, + { + "name": "modified_at", + "uses": ["Result date"], + "text": "When the row was last modified. Sets the result date and decides when a sync picks the row up. Not searchable." + }, + { + "name": "additional_metadata.smartsheet_sheet", + "uses": ["Query filter"], + "text": "The sheet name in snake case, such as `project_tracker`. Limits a query to one sheet's rows. Different sheet names can end up with the same value, so it is not a unique sheet id. Not searchable." + }, + { + "name": "connector_id", + "uses": ["Query filter"], + "text": "Limits a query to this connector's rows. Not searchable." + }, + { + "name": "provider", + "uses": ["Query filter"], + "text": "Always `smartsheet`. Not searchable." + }, + { + "name": "row_id", + "uses": ["Stored only"], + "text": "The numeric row id. Together with the sheet, it decides which document a later sync updates." + } + ] + } + ], + "example_searches": [ + "Which rows in the Project Tracker sheet are marked At Risk?", + "What is the due date and owner of the Vendor onboarding task?", + "Which rows in the Hiring Plan sheet changed this week?" + ], + "graph": { + "connections": [ + "Each row is grouped under its sheet. Sheets are not items of their own.", + "No links between rows or to other tools. Cross-sheet references and predecessors are cell text only." + ], + "people": "No people are attached to rows. Contact and assignee columns are text only.", + "from_text": "All cell values of each row." + }, + "not_synced": [ + "Sheets you did not select.", + "Row attachments, discussions and comments.", + "Cell formatting, formulas and column-type details. Only cell values are kept.", + "Smartsheet sharing.", + "Deletions: deleted rows stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/stripe.json b/scripts/connector_pages/stripe.json new file mode 100644 index 00000000..09807504 --- /dev/null +++ b/scripts/connector_pages/stripe.json @@ -0,0 +1,212 @@ +{ + "description": "Sync customers, invoices, subscriptions and charges from one Stripe account. Invoices, subscriptions and charges link to their customer.", + "opening": [ + "Sync customers, invoices, subscriptions and charges from one Stripe account. Each record is one document with a readable summary, and an invoice carries its line items. Invoices, subscriptions and charges link to their customer.", + "Stripe permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Other Stripe objects, such as products, refunds and payouts, are not synced. Deletions in Stripe are not detected." + ], + "callouts": { + "opening": { + "kind": "warning", + "text": "Searchable amounts assume two decimal places. For a currency such as JPY, an amount of 100 is shown as 1.00, so the searchable text understates it by a factor of 100. Original stored amounts are unchanged." + } + }, + "permissions": { + "carried": false + }, + "connect": { + "auth": "Stripe uses a secret key together with the account id.", + "credentials": [ + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "A Stripe secret key, `sk_live_...` or `sk_test_...`, with read access to the account's resources." + }, + { + "name": "account_id", + "type": "string", + "required": true, + "text": "The Stripe account id, `acct_...`." + } + ], + "steps": [ + { + "title": "Create the connector", + "text": "Paste the secret key as `client_secret` and the account id as `account_id`." + }, + { + "title": "Select the account", + "text": "Select the account's `All data` resource. It syncs customers, invoices, subscriptions and charges together. You cannot select these record types separately." + } + ], + "account": "One connector reads one Stripe account. A test-mode key reads test data and a live-mode key reads live data." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync lists records created in the sync window, and reads Stripe's events for updates in the same window.", + "edits": "An update, such as an invoice being paid, arrives as an event and replaces the record's document.", + "deletes": "Deletions in Stripe are not detected. A deleted record stays in HydraDB.", + "notes": [ + "Updates are read from events that reach back 30 days. After a long pause, updates to older records can be missed." + ] + }, + "shared_attributes": [ + { + "name": "created", + "uses": [ + "Result date" + ], + "text": "When the record was created. It stays the result date after the record is updated, so ranking by date follows creation time. Not searchable." + }, + { + "name": "additional_metadata.stripe_id", + "uses": [ + "Query filter" + ], + "text": "The Stripe id: `cus_...`, `in_...`, `sub_...` or `ch_...`. Targets one record. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `stripe`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The record type: `customers`, `invoices`, `subscriptions` or `charges`." + }, + { + "name": "Other Stripe fields", + "uses": [ + "Stored only" + ], + "text": "Every other field Stripe returns for the record, such as a customer's address, metadata or invoice settings. Kept for inspection only. A query does not match them and cannot filter on them." + } + ], + "documents": [ + { + "name": "Customers", + "kind": "custom", + "one_document": "One customer.", + "title": "The customer's name, or their email when there is no name.", + "text": "The customer's description, then `Name`, `Email`, `Phone` and `Balance` lines, with the balance in its currency. The title is searchable too.", + "date": "When the customer was created.", + "link_back": "None.", + "attributes": [ + { + "name": "email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The customer's email. It identifies the customer as a person in the graph, appears in the `Email` line, and is the title when there is no name." + } + ] + }, + { + "name": "Invoices", + "kind": "custom", + "one_document": "One invoice, with its line items.", + "title": "`Invoice - `, using the customer's name or email.", + "text": "The invoice description, then `Customer`, `Email`, `Status`, `Total`, `Amount due`, `Amount paid`, `Due date` and `Line items` lines. Each line item shows its description and amount. The title is searchable too.", + "date": "When the invoice was created.", + "link_back": "None.", + "files": "Invoice PDFs are not downloaded.", + "attributes": [ + { + "name": "Line items", + "uses": [ + "Searchable text" + ], + "text": "Each line's description and amount, written into the `Line items` line." + }, + { + "name": "customer", + "uses": [ + "Graph connection" + ], + "text": "The customer id. Links the invoice to its customer. The id itself is not searchable. The customer's name or email is part of the text." + } + ] + }, + { + "name": "Subscriptions", + "kind": "custom", + "one_document": "One subscription.", + "title": "The plan's nickname or name, or the plan id, followed by `subscription`.", + "text": "`Plan`, `Status`, `Amount`, `Quantity`, `Customer`, `Started` and `Current period end` lines. `Amount` is the plan price with its currency and interval, for example `49.00 USD/month`. The title is searchable too.", + "date": "When the subscription was created.", + "link_back": "None.", + "attributes": [ + { + "name": "plan", + "uses": [ + "Searchable text" + ], + "text": "The plan nickname or name, or the plan id when neither is available, forms the title followed by `subscription`. Its price and billing interval form the searchable `Amount` line. Product or price details that live only in other fields are not searchable." + }, + { + "name": "customer", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The customer id links the subscription to its customer. The searchable `Customer` line uses the customer's name when known, or the id otherwise." + } + ] + }, + { + "name": "Charges", + "kind": "custom", + "one_document": "One charge.", + "title": "The charge description, or `Charge - ` when there is none.", + "text": "The charge description, then `Customer`, `Amount`, `Status`, `Receipt email` and `Failure message` lines. `Customer` is the first of the billing name, billing email, receipt email, customer name and customer id that is present. The title is searchable too.", + "date": "When the charge was created.", + "link_back": "None.", + "attributes": [ + { + "name": "customer", + "uses": [ + "Graph connection" + ], + "text": "The customer id. Links the charge to its customer. The id itself is not searchable unless it is the only customer detail, in which case it fills the `Customer` line." + } + ] + } + ], + "example_searches": [ + "What status, amount due and amount paid are recorded for Acme Corp's invoice INV-0042?", + "What plan is jane@example.com subscribed to, and when does the current period end?", + "Why did the charge for jane@example.com fail?" + ], + "graph": { + "connections": [ + "An invoice to its customer.", + "A subscription to its customer.", + "A charge to its customer.", + "Charges are not linked to their invoice, and invoices are not linked to their subscription.", + "No links to other tools." + ], + "people": [ + "Each customer, identified by their email." + ], + "from_text": "Descriptions, plan names and the rest of each record's summary." + }, + "not_synced": [ + "Products, prices and plans as their own documents.", + "Events, payouts, refunds, disputes, balance transactions and other Stripe objects.", + "Deletions in Stripe.", + "Invoice PDFs and hosted invoice pages." + ] +} diff --git a/scripts/connector_pages/supabase.json b/scripts/connector_pages/supabase.json new file mode 100644 index 00000000..7ddf0250 --- /dev/null +++ b/scripts/connector_pages/supabase.json @@ -0,0 +1,122 @@ +{ + "description": "Receive inserts, updates and deletes from the Supabase tables you choose, one document per row. Rows that existed before you set it up are not loaded.", + "opening": [ + "Supabase sends each insert, update and delete on the tables you choose to HydraDB, through Database Webhooks you add in Supabase. Each row is one document, with one searchable line per content column. HydraDB needs no Supabase credentials and does not read your database.", + "Rows that existed before you added the webhooks do not come across. Row-level security is not imported, so every row is visible to everyone who can query the collection unless you set an access rule. Deleting a row in Supabase asks HydraDB to remove its document, which can stay if the row is still being indexed or a newer change has replaced it. Changes sent while the connector is paused are lost." + ], + "callouts": { + "connect": { + "kind": "warning", + "text": "A row is identified by its table name and primary key only. If two Supabase projects or connectors send a table with the same name to the same collection, rows with the same key overwrite each other. Send them to separate collections." + } + }, + "permissions": { + "carried": false, + "notes": [ + "Supabase row-level security policies are not reproduced." + ] + }, + "connect": { + "auth": "HydraDB stores no Supabase credentials. Each Supabase webhook sends its changes with a HydraDB API key and the connector id in its headers.", + "credentials": [ + { + "name": "tables", + "type": "string list", + "required": true, + "text": "The tables to accept, schema-qualified, one per line, for example `public.orders`. A change for any other table is refused." + } + ], + "steps": [ + { + "title": "List your tables", + "text": "Create the Supabase connector in HydraDB and list the tables you want as `tables`, schema-qualified. A query over `information_schema.tables` can produce the list. An entry in a system schema, or an invalid entry, is rejected." + }, + { + "title": "Describe each table, if needed", + "text": "Through the API, you can send a schema for a table in `provider_metadata.schema` when you add it. A schema can name the primary key, the role of each column, a title template, the timestamp column and foreign keys. Without one, the primary key is `id` and the column rules under What gets synced apply." + }, + { + "title": "Add a webhook for each table", + "text": "In Supabase, add a Database Webhook on each table for `INSERT`, `UPDATE` and `DELETE` that sends a POST request to HydraDB's `/webhooks/supabase` endpoint." + }, + { + "title": "Set the webhook headers", + "text": "Set the `Authorization` header to `Bearer` followed by a HydraDB API key, and the `X-HydraDB-Connector` header to the connector id." + } + ], + "account": "One connector covers the tables you list in it." + }, + "sync": { + "first_sync": "Nothing is loaded when you connect. Only changes made after the webhooks exist arrive. To bring in an existing row, change it or send its change again.", + "changes": "Each insert or update arrives as it happens and updates the row's document. An insert with no content columns is skipped.", + "edits": "An update replaces the row's document. A primary-key change asks HydraDB to remove the document under the old key. An update that empties every content column asks HydraDB to remove the row's document under its current key and any replaced key. As with a delete, a document can stay if it is still being indexed or a newer change has replaced it.", + "deletes": "A delete asks HydraDB to remove the row's document. The document can stay if the row is still being indexed when the delete arrives, or a newer change has already replaced it.", + "notes": [ + "While the connector is paused, every change, deletes included, is refused, and Supabase does not send it again.", + "A change for a table you did not list is refused with an error, so a misconfigured webhook is visible.", + "Changes count against HydraDB's ingestion rate limit. A bulk update sends one request per row." + ], + "scheduled": false + }, + "documents": [ + { + "name": "Rows", + "kind": "custom", + "one_document": "One row of a listed table, identified by its table and primary key.", + "title": "The table's title template with column values filled in. Without a template, the table name and the row's primary key.", + "text": "One `column: value` line per non-empty content column, sorted by column name. Nested JSON is written as compact JSON. Without a schema, `id` is the key, timestamp columns, status columns and columns ending in `_id` are kept out of the text, columns starting with `_` are ignored, and every other column is content. Column roles in a schema override these rules. The title is searchable too, so a title template can put a key or status value into searchable text.", + "date": "The value of the timestamp column named in the table's schema. Without one, the row has no date.", + "link_back": "None.", + "attributes": [ + { + "name": "Content columns", + "uses": [ + "Searchable text" + ], + "text": "Each content column's value, one line per column." + }, + { + "name": "Timestamp column", + "uses": [ + "Result date" + ], + "text": "The column the schema names as the timestamp. Its value is the result date. This date is not searchable as a separate field." + }, + { + "name": "Foreign keys", + "uses": [ + "Graph connection" + ], + "text": "Each foreign key named in the schema, when it has a value, links the row to the row it references. One declaration covers one column, so a key made of several columns cannot be linked. Not searchable." + }, + { + "name": "table, row_key, updated_at", + "uses": [ + "Stored only" + ], + "text": "The table name, the row's key and its timestamp value." + } + ] + } + ], + "example_searches": [ + "What do our orders rows say about delayed shipments?", + "Which support_tickets rows mention a refund?" + ], + "graph": { + "connections": [ + "A row to each row its schema's foreign keys reference.", + "Each row is grouped under its table.", + "No links to items in other tools." + ], + "people": "No one is attached to a row as a person.", + "from_text": "The content columns of each row." + }, + "not_synced": [ + "Rows that existed before the webhooks were added.", + "Tables not listed in the connector. Their changes are refused.", + "Changes sent while the connector is paused.", + "Columns with the ignore role. Columns starting with `_` are ignored unless a schema gives them another role.", + "Row-level security policies." + ] +} diff --git a/scripts/connector_pages/surveymonkey.json b/scripts/connector_pages/surveymonkey.json new file mode 100644 index 00000000..74c7cb23 --- /dev/null +++ b/scripts/connector_pages/surveymonkey.json @@ -0,0 +1,234 @@ +{ + "description": "Sync the SurveyMonkey surveys you choose: each survey's questionnaire, and each response as question and answer pairs linked to its survey.", + "opening": [ + "Sync the SurveyMonkey surveys you select. Each survey is one document with its page text and question wording. Each response is one document of question and answer pairs, linked to its survey. A respondent who gave an email is attached to the response as a person.", + "SurveyMonkey team sharing is not imported, so every synced survey and response is visible to everyone who can query the collection unless you set an access rule. On SurveyMonkey Basic plans, only 25 responses per survey come through. Surveys and responses deleted in SurveyMonkey stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "Every synced survey and response carries a fixed `additional_metadata.rbac_warning` note saying SurveyMonkey sharing is not captured. The note does not decide who can read the item. An access rule you set still applies." + ] + }, + "connect": { + "auth": "SurveyMonkey uses an app access token.", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "required": true, + "text": "The access token of a SurveyMonkey app with the scopes below." + } + ], + "permissions_label": "Scopes the token needs", + "permissions": [ + { + "name": "surveys_read", + "text": "View Surveys, to list surveys and read their pages and questions." + }, + { + "name": "responses_read_detail", + "text": "View Response Details, to read responses with readable answers." + } + ], + "steps": [ + { + "title": "Create a SurveyMonkey app", + "text": "Create an app in SurveyMonkey and give its token View Surveys and View Response Details. A draft app's token expires after 90 days unless you deploy the app. Replace the token in the connector before then." + }, + { + "title": "Create the connector", + "text": "Paste the app's access token as `access_token`." + }, + { + "title": "Select surveys", + "text": "HydraDB lists the surveys the token can see, by title. Only the first 100 surveys are listed. Select the surveys to sync. Each one syncs separately." + } + ], + "account": "One connector reads the surveys one SurveyMonkey token can see." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default, by when each survey and response was last modified, or created if there is no modification time.", + "changes": "Each sync reads the questionnaires and responses of each selected survey that were modified in its window.", + "edits": "A modified questionnaire or response replaces its document. A questionnaire last modified before the window is not read, even while its new responses sync.", + "deletes": "Deleted surveys and responses are not removed. A survey or response deleted in SurveyMonkey stays searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "additional_metadata.surveymonkey_id", + "uses": [ + "Query filter" + ], + "text": "The SurveyMonkey id of the survey or response. Targets one item. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "A fixed note that SurveyMonkey sharing is not captured. It does not decide who can read the item. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `surveymonkey`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The record type, `survey_details` or `simplified_responses`, shown when you inspect the item." + } + ], + "documents": [ + { + "name": "Surveys", + "kind": "knowledge_base", + "one_document": "One selected survey's questionnaire.", + "title": "The survey title, else its nickname, else `SurveyMonkey survey `.", + "text": "The nickname when it differs from the title, then each page's title and description and every question, one per line, in survey order. Answer choices are not part of the text. The title is searchable too.", + "date": "When the survey was last modified, or created if there is no modification time.", + "link_back": "The survey's preview page, else its analyze page, else its address in SurveyMonkey's API.", + "files": "None.", + "attributes": [ + { + "name": "nickname", + "uses": [ + "Searchable text" + ], + "text": "The survey's alternate name. It is the title when there is no survey title, and is written into the text when it differs from the title." + }, + { + "name": "Pages and questions", + "uses": [ + "Searchable text" + ], + "text": "Each page's title and description and each question's wording, in the order the survey shows them." + }, + { + "name": "date_modified, date_created", + "uses": [ + "Result date" + ], + "text": "When the survey was last modified and created. The modification time, else the creation time, sets the result date. Not searchable." + }, + { + "name": "Answer choices", + "uses": [ + "Stored only" + ], + "text": "The answer choices each question offers, when SurveyMonkey supplies them. Kept for inspection only. A choice a respondent selected is searchable on their response." + }, + { + "name": "Other survey fields", + "uses": [ + "Stored only" + ], + "text": "Other survey fields SurveyMonkey returns. Kept for inspection only." + } + ] + }, + { + "name": "Responses", + "kind": "custom", + "one_document": "One response to a selected survey.", + "title": "`SurveyMonkey response `. The title does not name the survey.", + "text": "The title, then `Respondent` and `Email` lines, then a `Q:` line with the question and an `A:` line with the answer for each answered question. Several answers to one question are joined with `;`. Unanswered questions are left out.", + "date": "When the response was last modified, or created if there is no modification time.", + "link_back": "The response's analyze page, else its address in SurveyMonkey's API.", + "files": "None. Only answer text is kept.", + "attributes": [ + { + "name": "email_address", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The respondent's email, when the survey collected it, written as the `Email` line. It attaches the respondent to the response as a person in the graph." + }, + { + "name": "first_name, last_name", + "uses": [ + "Searchable text" + ], + "text": "The respondent's name, when collected, written as the `Respondent` line." + }, + { + "name": "Questions and answers", + "uses": [ + "Searchable text" + ], + "text": "Each answered question's wording and the readable answer text." + }, + { + "name": "survey_id", + "uses": [ + "Graph connection" + ], + "text": "The survey the response belongs to. Links the response to its survey. Not searchable." + }, + { + "name": "additional_metadata.surveymonkey_survey_id", + "uses": [ + "Query filter" + ], + "text": "The survey id. Limits a query to the responses of one survey. Not searchable." + }, + { + "name": "date_modified, date_created", + "uses": [ + "Result date" + ], + "text": "When the response was last modified and created. The modification time, else the creation time, sets the result date. Not searchable." + }, + { + "name": "ip_address, custom_variables, metadata, quiz_results, response_status", + "uses": [ + "Stored only" + ], + "text": "Submission details, when present: the respondent's IP address, custom variables, metadata, quiz results and response status. Kept for inspection only." + }, + { + "name": "Other response fields", + "uses": [ + "Stored only" + ], + "text": "Other response fields SurveyMonkey returns. Kept for inspection only." + } + ] + } + ], + "example_searches": [ + "What questions does the Q3 customer satisfaction survey ask?", + "What did respondents answer to \"How likely are you to recommend us?\" in the NPS survey?", + "What did jane@example.com say in their survey response?" + ], + "graph": { + "connections": [ + "A response to its survey.", + "No links to other tools." + ], + "people": [ + "The respondent of each response, identified by their email, when the survey collected it." + ], + "from_text": "The questionnaire text and each response's questions and answers." + }, + "not_synced": [ + "Surveys you did not select, and surveys past the first 100 listed.", + "Responses past 25 per survey on SurveyMonkey Basic plans.", + "Collectors and contacts.", + "The answer choices a question offers, in the survey's searchable text.", + "SurveyMonkey team sharing.", + "Deletions: surveys and responses deleted in SurveyMonkey stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/twilio.json b/scripts/connector_pages/twilio.json new file mode 100644 index 00000000..5f1f19a6 --- /dev/null +++ b/scripts/connector_pages/twilio.json @@ -0,0 +1,357 @@ +{ + "description": "Sync a Twilio account's SMS and MMS messages, voice calls with Twilio's transcriptions, conferences and debugger alerts, one document each.", + "opening": [ + "Sync the communication logs of one Twilio account and the subaccounts its credentials can reach. Each SMS or MMS message, each voice call, each conference and each debugger alert is one document. A call includes the text of Twilio's own transcriptions of its recordings. HydraDB does not transcribe audio, and recordings and MMS media files are not downloaded.", + "Twilio permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Phone numbers are searchable text, not people. Items deleted in Twilio stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Twilio uses your Account SID and Auth Token.", + "credentials": [ + { + "name": "account_sid", + "type": "string", + "required": true, + "text": "The Twilio Account SID." + }, + { + "name": "auth_token", + "type": "secret string", + "required": true, + "text": "The account's Auth Token." + } + ], + "settings": [ + { + "name": "messages_update_overlap_hours", + "type": "string", + "text": "Hours of message history each sync reads again to catch later changes, such as a new delivery status. Sent as a string. 168 by default. `0` turns the overlap off." + }, + { + "name": "recordings_update_overlap_hours", + "type": "string", + "text": "Hours of recording history each sync reads again to catch later changes. Sent as a string. 24 by default. `0` turns the overlap off." + } + ], + "advanced_settings": [ + { + "name": "user_agent", + "type": "string", + "text": "The user agent sent to Twilio. A default is set." + } + ], + "steps": [ + { + "title": "Copy your credentials", + "text": "In the Twilio console, copy the Account SID and Auth Token." + }, + { + "title": "Create the connector", + "text": "Enter `account_sid` and `auth_token`." + }, + { + "title": "Select the account", + "text": "HydraDB offers one resource that covers the whole account. Select it to sync." + } + ], + "account": "One connector reads one Twilio account, plus every subaccount its credentials can reach. You cannot pick subaccounts one by one." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Messages are found by send time. Calls, conferences and alerts are found by their last update. After the first sync, each sync also reads the last `messages_update_overlap_hours` of messages again.", + "edits": "A message update, such as a new delivery status, is caught when it happens inside the overlap. An update to a call that ended long ago is not guaranteed to be picked up. A new recording or transcription does not on its own update a call that is already synced. A change to a message's media or a conference's participants updates that message or conference.", + "deletes": "Messages, calls, conferences and alerts deleted in Twilio stay searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "additional_metadata.twilio_sid", + "uses": [ + "Query filter" + ], + "text": "The message, call, conference or alert SID. Picks out one item. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `twilio`. Not searchable." + } + ], + "documents": [ + { + "name": "Messages", + "kind": "message", + "one_document": "One SMS or MMS message.", + "title": "The message text, or `Twilio message` and its SID. Search matches the message text, not this title.", + "text": "`SMS` with the direction, then `From:` with the sending number and `to` with the receiving number, then the message text, then `Media:` with each attachment's content type. The send time is written as a Sent line when Twilio reports one.", + "date": "When the message was sent, else when it was created, else when it was last updated.", + "link_back": "None.", + "files": "MMS media is listed by content type. The files are not downloaded.", + "attributes": [ + { + "name": "from", + "uses": [ + "Searchable text" + ], + "text": "The sending number. It is text only and is not attached as a person in the graph." + }, + { + "name": "to", + "uses": [ + "Searchable text" + ], + "text": "The receiving number. It is text only and is not attached as a person in the graph." + }, + { + "name": "direction", + "uses": [ + "Searchable text" + ], + "text": "The direction, such as `inbound` or `outbound-api`." + }, + { + "name": "sent_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the message was sent, written as the Sent line when present." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When Twilio created the message. The result date when the send time is missing. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the message last changed. The result date only when the send and creation times are both missing. Not searchable." + }, + { + "name": "status", + "uses": [ + "Stored only" + ], + "text": "The delivery status, such as `delivered` or `failed`. It is not searchable and not a filter." + }, + { + "name": "media_count", + "uses": [ + "Stored only" + ], + "text": "How many media items came with the message." + } + ] + }, + { + "name": "Calls", + "kind": "meeting", + "one_document": "One voice call.", + "title": "`Call`, the direction and the phone numbers that are available. With no numbers, `Twilio call` and its SID.", + "text": "`Call` with the direction, `From:` and `To:` numbers, `Status:`, `Duration:` in seconds, `Caller:` and `Answered By:`. Then `Transcript:` with the text of every Twilio transcription of the call's recordings. The creation time is written as a Started line. The title is searchable too.", + "date": "When the call started, else when it was created, else when it was last updated.", + "link_back": "None.", + "files": "None. Recordings are not downloaded. Only Twilio's own transcription text is used.", + "attributes": [ + { + "name": "from", + "uses": [ + "Searchable text" + ], + "text": "The caller's number, formatted when available. In the title and the text. Not attached as a person." + }, + { + "name": "to", + "uses": [ + "Searchable text" + ], + "text": "The called number. In the title and the text. Not attached as a person." + }, + { + "name": "direction", + "uses": [ + "Searchable text" + ], + "text": "The call's direction. In the title and the text." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The call status, such as `completed`, `no-answer` or `busy`, written as the Status line." + }, + { + "name": "duration", + "uses": [ + "Searchable text" + ], + "text": "The call length in seconds, written as the Duration line." + }, + { + "name": "start_time", + "uses": [ + "Result date" + ], + "text": "When the call started. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When Twilio created the call record, written as the Started line. It can differ from the actual start. The result date when the start time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the call record last changed. The result date only when the start and creation times are both missing. Not searchable." + }, + { + "name": "end_time", + "uses": [ + "Stored only" + ], + "text": "When the call ended." + }, + { + "name": "has_transcript", + "uses": [ + "Stored only" + ], + "text": "Whether transcription text was included." + } + ] + }, + { + "name": "Conferences", + "kind": "meeting", + "one_document": "One conference call.", + "title": "The conference's friendly name, or `Twilio conference` and its SID.", + "text": "`Status:`, `Region:` and `Ended:` with the reason, then `Participants:` with each participant's label and call SID. The creation time is written as a Started line. The title is searchable too.", + "date": "When the conference was last updated, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "participants", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The participants' labels, written as the Participants line. The graph records each as a participant, by label, not by email address." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The conference status, written as the Status line." + }, + { + "name": "started_at", + "uses": [ + "Searchable text" + ], + "text": "When the conference was created, written as the Started line." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the conference last changed. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the conference was created. The result date when the update time is missing. Not searchable as its own field, though the same time is the Started line." + } + ] + }, + { + "name": "Alerts", + "kind": "ticket", + "one_document": "One Twilio debugger alert, an error or a warning.", + "title": "The alert text, or `Twilio alert` and its SID.", + "text": "The alert text, then `Level:`, `Error code:`, `Request:` with the method and URL, and `More info:` with a link. The alert SID is written as a Key line, the log level as Status and Priority lines, and the time as a Created line. The title is searchable too.", + "date": "When the alert was last updated, else when it was generated.", + "link_back": "The alert's address in Twilio's API.", + "attributes": [ + { + "name": "SID", + "uses": [ + "Searchable text" + ], + "text": "The alert's SID, written as the Key line." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "The log level, written as the Status line." + }, + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "The log level, written as the Priority line." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the alert was generated, else when Twilio created it, written as the Created line. The result date when the update time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the alert last changed. Not searchable." + } + ] + } + ], + "example_searches": [ + "Which outbound calls went unanswered yesterday?", + "What did the caller say on the recorded support call this morning?", + "What errors did our Twilio account raise about the request URL?" + ], + "graph": { + "connections": "The connector creates no links. A call is not linked to its conference or recordings: transcription text is part of the call document.", + "people": [ + "Conference participants, by their labels.", + "Phone numbers are text only. They are not attached as people." + ], + "from_text": "Message text, call details and transcripts, conference details and alert text." + }, + "not_synced": [ + "Recording audio and MMS media files.", + "Transcripts of recordings that Twilio did not transcribe. HydraDB does not transcribe audio.", + "Phone number inventories, balances, keys, usage records, addresses, applications, queues and other account configuration.", + "Deletions: items deleted in Twilio stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/twitter.json b/scripts/connector_pages/twitter.json new file mode 100644 index 00000000..99c636ba --- /dev/null +++ b/scripts/connector_pages/twitter.json @@ -0,0 +1,467 @@ +{ + "description": "Sync posts from the X accounts you list and, optionally, the connected account's direct messages. X permissions are not carried over, so direct messages are not private in HydraDB unless you set an access rule.", + "opening": [ + "Sync posts from the X (Twitter) accounts you list and, optionally, the direct messages of the account that authorized the connector. Each post is one document and includes the text of the post it quotes, replies to or retweets, when available. Direct messages are grouped into one document per conversation per time window, which can repeat up to 12 earlier messages for context.", + "X permissions are not imported, so direct messages are visible to everyone who can query the collection unless you set an access rule on the inbox. Retweets are skipped by default. Media is not fetched. Edited posts are not guaranteed to be refreshed, and deleted posts and messages stay in HydraDB. Reads count against your own X developer app." + ], + "permissions": { + "carried": false, + "notes": [ + "Direct messages are private on X, but HydraDB does not limit them to the inbox owner. Set an access rule on the inbox before you sync it." + ] + }, + "connect": { + "auth": "X uses your own X developer app. For posts, use an app-only bearer token or a user access token. Direct messages need a user access token from the inbox owner, with a refresh token and your app's OAuth client credentials so syncing continues after the access token expires.", + "credentials": [ + { + "name": "bearer_token", + "type": "secret string", + "text": "An app-only bearer token for your X developer app. Reads posts only." + } + ], + "alternatives": [ + { + "title": "User access token, for posts and direct messages", + "credentials": [ + { + "name": "access_token", + "type": "secret string", + "text": "An OAuth 2.0 user access token from the inbox owner. Needed for direct messages." + }, + { + "name": "refresh_token", + "type": "secret string", + "text": "The matching refresh token. Without it, direct message syncing stops when the access token expires, after about two hours." + }, + { + "name": "client_id", + "type": "secret string", + "text": "Your app's OAuth client id, used to renew the access token." + }, + { + "name": "client_secret", + "type": "secret string", + "text": "Your app's OAuth client secret. The app must be a confidential client." + } + ] + } + ], + "settings": [ + { + "name": "handles", + "type": "string list", + "text": "The X handles, or numeric user ids, whose posts to sync." + }, + { + "name": "exclude_retweets", + "type": "boolean", + "text": "Skip retweets. On by default." + }, + { + "name": "exclude_replies", + "type": "boolean", + "text": "Skip replies. Off by default." + }, + { + "name": "sync_profiles", + "type": "boolean", + "text": "Also read the profiles of the accounts you list, for display names and follower counts. Each profile costs one user read. Off by default." + } + ], + "advanced_settings": [ + { + "name": "max_posts_per_account_per_sync", + "type": "number", + "text": "The most posts read per account in one sync, 500 by default and at least 5. Use a whole number. Posts dropped because they fall outside the time window still count." + }, + { + "name": "max_dms_per_sync", + "type": "number", + "text": "The most direct message events read in one sync, 1,000 by default and at least 5. Use a whole number." + }, + { + "name": "max_backfill_days", + "type": "number", + "text": "How far back a first sync reaches when no history window is set, 90 days by default. Use a whole number. Configuring the connector sets a window, which takes its place." + }, + { + "name": "dm_event_types", + "type": "string", + "text": "Which direct message event types to read. `MessageCreate` by default." + } + ], + "permissions_label": "For direct messages", + "permissions": [ + { + "name": "dm.read", + "text": "scope on the user access token." + }, + { + "name": "tweet.read", + "text": "scope on the user access token." + }, + { + "name": "users.read", + "text": "scope on the user access token." + }, + { + "name": "offline.access", + "text": "scope on the user access token, so a refresh token is issued." + }, + { + "name": "Read and write and Direct message", + "text": "app permission." + } + ], + "permissions_note": "Changing the app's permission level later invalidates tokens already issued.", + "steps": [ + { + "title": "Prepare your X developer app", + "text": "Use your own X developer app. Reads are billed to it. For direct messages, give it the Read and write and Direct message permission and make it a confidential client." + }, + { + "title": "Get a token", + "text": "For posts only, get an app-only bearer token. For direct messages, have the inbox owner authorize the app with the scopes above, and keep the access token and refresh token." + }, + { + "title": "Create the connector", + "text": "Paste `bearer_token`, or paste `access_token`, `refresh_token`, `client_id` and `client_secret`. List the accounts to follow in `handles`." + }, + { + "title": "Select accounts and the inbox", + "text": "HydraDB looks up each handle or id and lists it as an account to sync. A handle that cannot be found is rejected. With a user access token, HydraDB also lists the owner's inbox. Select the accounts, and select the inbox to sync direct messages." + } + ], + "account": "One connector reads the posts of the accounts you list, and at most one inbox: that of the account that authorized its access token." + }, + "sync": { + "first_sync": "Each selected account and the inbox reach back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads the posts and direct messages created since the last sync. Direct message history that did not fit in one sync continues on later syncs with whatever is left of the read cap, so a busy inbox can delay older history.", + "edits": "Edits are not tracked. An edited post is not guaranteed to be refreshed.", + "deletes": "Posts and direct messages deleted on X stay searchable in HydraDB.", + "notes": [ + "The sync interval for this connector must be between 10 minutes and 6 hours.", + "A direct message window is as long as the sync interval, kept between 10 minutes and 6 hours. Changing the interval changes the window for future syncs only. Documents already written keep the old size." + ] + }, + "shared_attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The handle, without `@`, of the post's author or of whoever opened a direct message window, written as the From line. The graph records the item as sent by that account." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the post was published, or when the newest message in a direct message window was sent, written as the Sent line." + }, + { + "name": "thread_id", + "uses": [ + "Graph connection" + ], + "text": "The X conversation id. Groups every post, or every direct message window, of one conversation into one thread. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "For a post, the author's numeric user id. For direct messages, the conversation id. Not searchable." + }, + { + "name": "additional_metadata.container_name", + "uses": [ + "Query filter" + ], + "text": "For a post, the author's `@handle`. For direct messages, `DM with` and the participants' handles. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "`twitter_account` for posts and `twitter_dm_conversation` for direct messages. Separates the two. Not searchable." + }, + { + "name": "additional_metadata.conversation_id", + "uses": [ + "Query filter" + ], + "text": "The X conversation id. Limits a query to one thread or direct message conversation. Not searchable." + }, + { + "name": "additional_metadata.urls", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The full URLs of shared links. Finds items that link to a given URL. Searchable on posts, where the full URLs are in the text. Not searchable as a field on direct messages." + }, + { + "name": "additional_metadata.referenced_post_id", + "uses": [ + "Query filter" + ], + "text": "For a post, the post it replies to, quotes or retweets. For a direct message window, the first post shared in it. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `twitter`. Not searchable." + } + ], + "documents": [ + { + "name": "Posts", + "kind": "message", + "one_document": "One post.", + "title": "The post text on one line, cut to about 80 characters, or `Post by @handle` when there is no text. Search matches the post text, not this title.", + "text": "`Name (@handle) on X`, then the post text with t.co short links replaced by their full URLs, then the text of the quoted, replied-to or retweeted post, labelled `Quoting`, `In reply to` or `Retweet of`. The author is written as a From line and the time as a Sent line.", + "date": "When the post was published.", + "link_back": "The post's x.com link.", + "files": "None. Media is not fetched.", + "attributes": [ + { + "name": "additional_metadata.mentions", + "uses": [ + "Searchable text", + "Query filter", + "Graph identity" + ], + "text": "Handles mentioned in the post. Finds posts that mention a handle. The graph records each as mentioned. The handles also appear in the post text." + }, + { + "name": "parent_id", + "uses": [ + "Graph connection" + ], + "text": "For a reply, the post it answers. Joins the reply to that post. Quotes and retweets are not linked this way. Not searchable." + }, + { + "name": "additional_metadata.author_handle", + "uses": [ + "Query filter" + ], + "text": "The author's handle. Limits a query to one author. Not searchable." + }, + { + "name": "additional_metadata.author_name", + "uses": [ + "Query filter" + ], + "text": "The author's display name. Not searchable." + }, + { + "name": "additional_metadata.author_id", + "uses": [ + "Query filter" + ], + "text": "The author's numeric id. Keeps working after a handle change. Not searchable." + }, + { + "name": "additional_metadata.author_followers", + "uses": [ + "Query filter" + ], + "text": "The author's follower count when the post was synced, only when `sync_profiles` is on. Not searchable." + }, + { + "name": "additional_metadata.lang", + "uses": [ + "Query filter" + ], + "text": "The post's detected language. Not searchable." + }, + { + "name": "additional_metadata.is_reply", + "uses": [ + "Query filter" + ], + "text": "Whether the post is a reply. Not searchable." + }, + { + "name": "additional_metadata.is_retweet", + "uses": [ + "Query filter" + ], + "text": "Whether the post is a retweet. Not searchable." + }, + { + "name": "additional_metadata.is_quote", + "uses": [ + "Query filter" + ], + "text": "Whether the post quotes another post. Not searchable." + }, + { + "name": "additional_metadata.hashtags", + "uses": [ + "Query filter" + ], + "text": "Hashtags, without `#`. Limits a query to a hashtag. This field is not searchable, but hashtags stay in the post text." + }, + { + "name": "Followed account", + "uses": [ + "Access rule" + ], + "text": "The selected account. An access rule you set on it governs its posts. Not searchable." + } + ] + }, + { + "name": "Direct messages", + "kind": "message", + "one_document": "All messages of one conversation inside one time window. The window is as long as the sync interval, between 10 minutes and 6 hours. A later sync rewrites the same window document with the complete window.", + "title": "Built from the window's opening message and how many messages followed.", + "text": "A single message shows its direction, sender and text, with the text of a shared post or a media count. A longer exchange shows each speaker and message, with up to 12 messages from the previous exchange under `Earlier in the conversation` and the current window under `New messages`. A media count appears only for a message with no text. Each window is marked as a direct message.", + "date": "When the newest message in the window was sent.", + "link_back": "None.", + "files": "None. Media is counted, not fetched.", + "attributes": [ + { + "name": "mentions", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The known participants' handles. The graph records each as mentioned. The handles can also appear in the text with each speaker." + }, + { + "name": "additional_metadata.author_handle", + "uses": [ + "Query filter" + ], + "text": "The handle of the window's opening sender only, not of every sender in it. Not searchable." + }, + { + "name": "additional_metadata.author_name", + "uses": [ + "Query filter" + ], + "text": "The name of the window's opening sender. Not searchable." + }, + { + "name": "additional_metadata.author_id", + "uses": [ + "Query filter" + ], + "text": "The numeric id of the window's opening sender. Not searchable." + }, + { + "name": "additional_metadata.is_outbound", + "uses": [ + "Query filter" + ], + "text": "`true` only when every new message in the window was sent from the inbox. `false` covers both mixed and entirely inbound windows. Not searchable." + }, + { + "name": "additional_metadata.message_count", + "uses": [ + "Query filter" + ], + "text": "How many messages the window holds. Not searchable." + }, + { + "name": "additional_metadata.context_message_count", + "uses": [ + "Query filter" + ], + "text": "How many earlier messages the window repeats for context. Not searchable." + }, + { + "name": "additional_metadata.participants", + "uses": [ + "Query filter" + ], + "text": "The handles of known participants. Members who never wrote in the history HydraDB read can be missing. Not searchable." + }, + { + "name": "additional_metadata.participant_ids", + "uses": [ + "Query filter" + ], + "text": "Member ids, only when X provides them. Usually incomplete. Not searchable." + }, + { + "name": "additional_metadata.is_group_conversation", + "uses": [ + "Query filter" + ], + "text": "`true` when the conversation is known to have more than two members. `false` or missing does not prove a one-to-one conversation. Not searchable." + }, + { + "name": "additional_metadata.account_handle", + "uses": [ + "Query filter" + ], + "text": "The inbox owner's handle, when a message sent from the inbox shows it. Not searchable." + }, + { + "name": "additional_metadata.counterpart_handles", + "uses": [ + "Query filter" + ], + "text": "The known participants other than the inbox owner. Left out when the owner's handle is not known. Not searchable." + }, + { + "name": "additional_metadata.media_keys", + "uses": [ + "Query filter" + ], + "text": "X media keys. Marks windows that carried media. The media itself is not fetched. Not searchable." + }, + { + "name": "Inbox", + "uses": [ + "Access rule" + ], + "text": "The selected inbox. An access rule you set on it governs its direct messages. Not searchable." + } + ] + } + ], + "example_searches": [ + "What has @competitor posted about pricing this month?", + "Which posts from accounts we follow link to our blog?", + "What did @jane and I discuss in direct messages about the partnership?" + ], + "graph": { + "connections": [ + "A reply to the post it answers.", + "Every post, and every direct message window, to its conversation.", + "Quotes and retweets are not linked. Their text is included in the post instead.", + "No links to other tools." + ], + "people": [ + "The author of each post, and the opening sender of each direct message window.", + "Handles mentioned in a post, and the known participants of a direct message conversation." + ], + "from_text": "The post or exchange text, including quoted posts and full link URLs." + }, + "not_synced": [ + "Media files.", + "Lists of liked or bookmarked posts.", + "Direct messages, unless you connect with a user access token and select the inbox.", + "Retweets, unless you turn off `exclude_retweets`. Replies, when `exclude_replies` is on.", + "Profiles as their own documents, and bios, images and other profile fields.", + "Replies by accounts you did not list, unless their text arrives as part of a listed account's post.", + "Deletions and edits after a post or message was synced." + ] +} diff --git a/scripts/connector_pages/typeform.json b/scripts/connector_pages/typeform.json new file mode 100644 index 00000000..a9463a27 --- /dev/null +++ b/scripts/connector_pages/typeform.json @@ -0,0 +1,244 @@ +{ + "description": "Sync forms and their completed and partial responses from the Typeform workspaces you choose. Each response links to its form.", + "opening": [ + "Sync forms and responses from the Typeform workspaces you select, including forms created later. Each form is one document with its numbered questions and answer options. Each completed or partial response is one document of question and answer pairs, linked to its form. Text in uploaded files can be searchable with the response.", + "Typeform workspace membership is not imported, so every synced form and response is visible to everyone who can query the collection unless you set an access rule. That includes respondent emails and other answers. Forms and responses deleted in Typeform stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Typeform uses a personal access token. Accounts hosted in the EU also set a region.", + "credentials": [ + { + "name": "token", + "type": "secret string", + "required": true, + "text": "A Typeform personal access token with the scopes below." + }, + { + "name": "region", + "type": "string", + "text": "The Typeform data center: `us`, the default, `eu` for EU accounts, or `eu_new` for EU accounts created from August 2025. An EU account without it is read from the US data center." + } + ], + "permissions_label": "Scopes the token needs", + "permissions": [ + { + "name": "forms:read", + "text": "to list the forms in each selected workspace and read their questions." + }, + { + "name": "responses:read", + "text": "to read completed and partial responses and their answers." + }, + { + "name": "workspaces:read", + "text": "to list workspaces and the forms in each." + } + ], + "steps": [ + { + "title": "Create a personal access token", + "text": "In Typeform, create a personal access token with `forms:read`, `responses:read` and `workspaces:read`." + }, + { + "title": "Create the connector", + "text": "Paste the token as `token`. If the Typeform account is hosted in the EU, set `region` to `eu`, or to `eu_new` for an account created from August 2025." + }, + { + "title": "Select workspaces", + "text": "HydraDB lists the workspaces the token can see. Select the ones to sync. Every form in a selected workspace syncs, including forms created later. Each workspace syncs separately." + } + ], + "account": "One connector reads the workspaces one Typeform token can see, in one region." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads forms updated since the last sync, completed responses by when they were submitted, and partial responses by their `staged_at` time. Response reads overlap the previous sync by 30 minutes. A form not updated in the window is read again only when it gets new responses.", + "edits": "An updated form replaces its document. A partial response and its completed version share one document, so they are not duplicated. Later changes to a response outside its time window are not guaranteed to come across.", + "deletes": "Deleted forms and responses are not removed. A form or response deleted in Typeform stays searchable in HydraDB. A form that is deleted, or a workspace the token can no longer see, is skipped, and its earlier documents stay." + }, + "shared_attributes": [ + { + "name": "additional_metadata.typeform_id", + "uses": [ + "Query filter" + ], + "text": "The form id on a form, and the response id on a response. Targets one item. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `typeform`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The record type, `forms`, `responses` or `partial_responses`, shown when you inspect the item. To limit a query to completed or partial responses, use `additional_metadata.typeform_response_type`." + } + ], + "documents": [ + { + "name": "Forms", + "kind": "knowledge_base", + "one_document": "One form, with its current questions.", + "title": "The form title.", + "text": "The form's questions in order, numbered, with sub-questions indented and numbered 2.1 and so on. A question with choices is followed by an `Options` line. The title is searchable too.", + "date": "When the form was last updated, or created if there is no update time.", + "link_back": "The public form, else its address in Typeform's API.", + "files": "None.", + "attributes": [ + { + "name": "Questions and options", + "uses": [ + "Searchable text" + ], + "text": "Every question of the form and the answer options it offers." + }, + { + "name": "last_updated_at, created_at", + "uses": [ + "Result date" + ], + "text": "When the form was last updated and created. The update time, else the creation time, sets the result date. Not searchable." + }, + { + "name": "Other form fields", + "uses": [ + "Stored only" + ], + "text": "Every other field of the form. Kept for inspection only." + } + ] + }, + { + "name": "Responses", + "kind": "custom", + "one_document": "One completed or partial response.", + "title": "`Response to ` or `Partial response to `. Without a form title, `Typeform response ` or `Typeform partial response `.", + "text": "The title, then a `Q:` line with the question and an `A:` line with the answer for each answer, in the form's question order. Choices show as their labels, yes or no questions as yes or no, file uploads as the file name, and payments as name and amount. Then `Hidden fields`, `Score`, `Browser`, `Platform` and `Came from` lines.", + "date": "When the response was submitted, else its `staged_at` time, else its `landed_at` time.", + "link_back": "None.", + "files": "Files uploaded in answers. Supported files are downloaded with your token and their text is searchable with the response. If a file cannot be downloaded or read, only its name is searchable.", + "attributes": [ + { + "name": "Answers", + "uses": [ + "Searchable text" + ], + "text": "Each answer, labelled by its question, so a search can match the question and the answer together." + }, + { + "name": "File uploads", + "uses": [ + "Searchable text" + ], + "text": "Each uploaded file's name, in its answer, and the file's text when it can be read." + }, + { + "name": "hidden", + "uses": [ + "Searchable text" + ], + "text": "Hidden fields passed to the form, written as the `Hidden fields` line." + }, + { + "name": "calculated_score", + "uses": [ + "Searchable text" + ], + "text": "The response's score, written as the `Score` line only for forms that define a score." + }, + { + "name": "referer", + "uses": [ + "Searchable text" + ], + "text": "The page the respondent came from, written as the `Came from` line with only its host and path. The full address is kept for inspection." + }, + { + "name": "additional_metadata.typeform_browser", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The respondent's browser family, written as the `Browser` line. Limits a query to responses from one browser family." + }, + { + "name": "additional_metadata.typeform_platform", + "uses": [ + "Searchable text", + "Query filter" + ], + "text": "The respondent's device class, written as the `Platform` line. Limits a query to responses from one device class." + }, + { + "name": "additional_metadata.typeform_response_type", + "uses": [ + "Query filter" + ], + "text": "`completed` or `partial`. Includes or leaves out responses that were never submitted. Not searchable." + }, + { + "name": "additional_metadata.typeform_form_id", + "uses": [ + "Query filter" + ], + "text": "The form id. Limits a query to the responses of one form. Not searchable." + }, + { + "name": "form_id", + "uses": [ + "Graph connection" + ], + "text": "The form the response belongs to. Links the response to its form. Not searchable." + }, + { + "name": "submitted_at, staged_at, landed_at", + "uses": [ + "Result date" + ], + "text": "Response times. The first one present, in this order, sets the result date. Not searchable." + }, + { + "name": "Other response fields", + "uses": [ + "Stored only" + ], + "text": "Every other field of the response. Kept for inspection only." + } + ] + } + ], + "example_searches": [ + "What questions does the Customer Onboarding form ask, and what options does question 3 offer?", + "What did respondents answer to \"What is your biggest challenge?\" on the Feedback form?", + "What does the resume PDF uploaded in the job application response say?" + ], + "graph": { + "connections": [ + "A response to its form.", + "No links to other tools." + ], + "people": "No people are attached to items. A respondent's name or email in an answer is part of the text only.", + "from_text": "Form questions and options, response answers, and the text of uploaded files." + }, + "not_synced": [ + "Workspaces you did not select.", + "Respondents' network ids and user agents.", + "Typeform workspace membership.", + "Deletions: forms and responses deleted in Typeform stay in HydraDB." + ] +} diff --git a/scripts/connector_pages/wrike.json b/scripts/connector_pages/wrike.json new file mode 100644 index 00000000..f65e6012 --- /dev/null +++ b/scripts/connector_pages/wrike.json @@ -0,0 +1,226 @@ +{ + "description": "Sync tasks and their comments from the Wrike spaces you choose. Wrike sharing is not imported.", + "opening": [ + "Sync tasks and their comments from the Wrike spaces you select, including tasks anywhere inside each space. Each task is one document with its description and status. Each comment on a task is its own document, linked to the task. A subtask links to each of its parent tasks.", + "Wrike sharing is not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. Assignees, folders, projects, custom fields and attachments are not synced. Tasks and comments deleted in Wrike stay in HydraDB." + ], + "permissions": { + "carried": false, + "notes": [ + "Wrike sharing is not captured. Set an access rule on each space that should be restricted." + ] + }, + "connect": { + "auth": "Wrike uses a permanent access token.", + "credentials": [ + { + "name": "token", + "type": "secret string", + "required": true, + "text": "A Wrike permanent access token." + } + ], + "steps": [ + { + "title": "Create a token", + "text": "In Wrike, open Apps and Integrations, API, and create a permanent access token for a user who can see the spaces you will select." + }, + { + "title": "Create the connector", + "text": "Paste the token as `token`." + }, + { + "title": "Select spaces", + "text": "HydraDB lists your Wrike spaces. Select the spaces to sync. Tasks anywhere inside a selected space are synced." + } + ], + "account": "One connector reads what one token's Wrike user can see." + }, + "sync": { + "first_sync": "A newly selected space reads back the window set by `lookback_days`, 30 days by default, measured on when tasks were last updated.", + "changes": "Each sync reads the tasks updated since the last sync in each selected space. It then reads the comments on those tasks and keeps the ones updated since the last sync.", + "edits": "An edited task is picked up through its last-updated time and updates its document. An edited comment is picked up only when its task is read in the same sync, so a comment edit can be missed.", + "deletes": "Tasks and comments deleted in Wrike stay searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `wrike`. Not searchable." + } + ], + "documents": [ + { + "name": "Tasks", + "kind": "ticket", + "one_document": "One Wrike task. Its comments are separate documents.", + "title": "The task title, or `Wrike task` and its id when the title is empty.", + "text": "The task description as plain text, or the brief description when there is none. The status and the task id are written as lines too. The title is searchable too.", + "date": "When the task was last updated, or when it was created if there is no update time.", + "link_back": "The task's Wrike permalink.", + "files": "Attachments are not synced.", + "attributes": [ + { + "name": "Task id", + "uses": [ + "Searchable text" + ], + "text": "The Wrike task id. It keeps later syncs on the same document." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "`Active`, `Completed`, `Deferred` or `Cancelled`, written as the `Status` line." + }, + { + "name": "updated_date", + "uses": [ + "Result date" + ], + "text": "When the task was last updated. Sets the result date and decides when a sync picks the task up. Not searchable." + }, + { + "name": "Parent tasks", + "uses": [ + "Graph connection" + ], + "text": "The tasks this task is a subtask of. A task can have several. Links the task to each parent. Not searchable." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Names of people @mentioned in the description, leaving out group mentions. The graph records each as mentioned by the task. The field itself is not searchable, but the description is." + }, + { + "name": "additional_metadata.wrike_task_id", + "uses": [ + "Query filter" + ], + "text": "The Wrike task id. Picks out one task. Not searchable." + }, + { + "name": "importance", + "uses": [ + "Stored only" + ], + "text": "`High`, `Normal` or `Low`. It is not written into the text." + }, + { + "name": "created_date", + "uses": [ + "Stored only" + ], + "text": "When the task was created. It is not written into the text." + }, + { + "name": "completed_date", + "uses": [ + "Stored only" + ], + "text": "When the task was completed." + } + ] + }, + { + "name": "Comments", + "kind": "comment", + "one_document": "One comment on a task.", + "title": "`Wrike comment` and the comment id. The title carries no content, so search matches the comment text.", + "text": "The comment as plain text. The author and the task id are written with it.", + "date": "When the comment was created, or updated if there is no creation time.", + "link_back": "None.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The author's first and last name from Wrike contacts, or the author's id when no name is found, written as the `Author` line. The graph records the comment as written by that person." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The id of the task the comment is on, written as the `Parent` line. Links the comment to that task, so a task and its discussion are found together." + }, + { + "name": "mentions", + "uses": [ + "Graph identity" + ], + "text": "Names of people @mentioned in the comment. The graph records each as mentioned. The field itself is not searchable, but the comment text is." + }, + { + "name": "additional_metadata.wrike_comment_id", + "uses": [ + "Query filter" + ], + "text": "The Wrike comment id. Picks out one comment. Not searchable." + }, + { + "name": "additional_metadata.wrike_task_id", + "uses": [ + "Query filter" + ], + "text": "The id of the task. Returns every comment on one task. Not searchable." + }, + { + "name": "author_id", + "uses": [ + "Stored only" + ], + "text": "The author's Wrike contact id." + }, + { + "name": "created_date, updated_date", + "uses": [ + "Stored only" + ], + "text": "When the comment was created and last updated, as Wrike sends them." + } + ] + } + ], + "example_searches": [ + "What does the Wrike task about the vendor contract say?", + "Which Wrike tasks are Deferred?", + "Who commented on the budget review task?" + ], + "graph": { + "connections": [ + "A subtask to each of its parent tasks.", + "A comment to its task.", + "No links to items in other tools." + ], + "people": [ + "The author of each comment.", + "People @mentioned in task descriptions and comments.", + "Task assignees are not synced." + ], + "from_text": "Task descriptions and comment text." + }, + "not_synced": [ + "Spaces you did not select.", + "Folders, projects and spaces as items of their own.", + "Comments on folders and projects.", + "Task assignees, custom fields and dependencies.", + "Attachments.", + "Timelogs, workflows and custom field definitions." + ] +} diff --git a/scripts/connector_pages/xero.json b/scripts/connector_pages/xero.json new file mode 100644 index 00000000..0f16672c --- /dev/null +++ b/scripts/connector_pages/xero.json @@ -0,0 +1,380 @@ +{ + "description": "Sync contacts, invoices, payments and bank transactions from one Xero organisation, with files attached to contacts, invoices and bank transactions. Records link to their contact, and payments link to their invoice.", + "opening": [ + "Sync contacts, invoices, payments and bank transactions from one Xero organisation. Each record is one document. Invoices and bank transactions link to their contact, and payments link to the invoice they settle. Files attached to contacts, invoices and bank transactions are separate documents, and their text is searchable when the file can be downloaded and read.", + "Xero permissions are not imported, so every synced record is visible to everyone who can query the collection unless you set an access rule. Records deleted in Xero stay in HydraDB. Accounts, items, credit notes, quotes and other Xero objects are not synced." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Xero uses the client id and client secret of a Xero developer app, with a refresh token and the id of the organisation you connect.", + "credentials": [ + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The client id of your Xero app, from its Configuration page." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The client secret of the same app." + }, + { + "name": "refresh_token", + "type": "secret string", + "required": true, + "text": "A refresh token from completing Xero's OAuth flow for the organisation." + }, + { + "name": "tenant_id", + "type": "secret string", + "required": true, + "text": "The id of the Xero organisation the tokens belong to." + }, + { + "name": "access_token", + "type": "secret string", + "text": "Leave it empty. HydraDB obtains access tokens itself." + } + ], + "credentials_note": "A Xero refresh token can be used only once. Each time it is used, Xero issues a new one, and HydraDB stores it itself.", + "steps": [ + { + "title": "Create a Xero app", + "text": "In the Xero developer portal, create an app and copy its client id and client secret." + }, + { + "title": "Authorise the organisation", + "text": "Complete Xero's OAuth flow for the organisation you want to connect. Copy the refresh token and the organisation's tenant id." + }, + { + "title": "Create the connector", + "text": "Paste the values as `client_id`, `client_secret`, `refresh_token` and `tenant_id`. Saving the connector does not test the credentials, because a test would use up the single-use refresh token. The first sync is the test." + }, + { + "title": "Select the organisation", + "text": "Select the `All data` resource. It syncs contacts, invoices, payments, bank transactions and their attached files together. You cannot select individual contacts or invoices." + } + ], + "account": "One connector reads one Xero organisation." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads contacts, invoices, payments and bank transactions updated since the last sync. Attached files are checked for the contacts, invoices and bank transactions in that window.", + "edits": "An updated record replaces its document.", + "deletes": "Deleted records are not removed. A record deleted in Xero stays searchable in HydraDB." + }, + "shared_attributes": [ + { + "name": "additional_metadata.xero_id", + "uses": [ + "Query filter" + ], + "text": "The Xero id: the contact id, the invoice, payment or bank transaction id, or the attachment id. Finds one record. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's records. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `xero`. Not searchable." + }, + { + "name": "stream_type", + "uses": [ + "Stored only" + ], + "text": "The record type, such as `contacts` or `invoices`." + }, + { + "name": "Other Xero fields", + "uses": [ + "Stored only" + ], + "text": "The other fields HydraDB reads from Xero for the record. Kept for inspection only. A query does not match them and cannot filter on them." + } + ], + "documents": [ + { + "name": "Contacts", + "kind": "contact", + "one_document": "One contact: a customer or a supplier.", + "title": "The contact's name. Otherwise the first and last name.", + "text": "Contact details: the name, first and last name, email, phone numbers, lifecycle stage (the contact status), URL (the website), whether the contact is a person or an organization, the organization name and the update time. Then the name again, followed by `Email`, `Phones`, `Website`, `Status` and `Account number` lines. The title is searchable too.", + "date": "When the contact was last updated in Xero.", + "link_back": "None.", + "files": "Files attached to a contact arrive as separate attachment documents linked to it.", + "attributes": [ + { + "name": "display_name", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The contact's name. It forms the title, and names a person contact in the graph." + }, + { + "name": "first_name", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The contact's first name. Forms the title when there is no name, and makes the contact a person." + }, + { + "name": "last_name", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The contact's last name. Forms the title when there is no name, and makes the contact a person." + }, + { + "name": "email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The contact's email address. Identifies a person contact in the graph." + }, + { + "name": "entity_type", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Person when the contact has a first or last name, otherwise organization. Decides whether the graph records the contact as a person." + }, + { + "name": "provider_user_id", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The Xero contact id. Identifies a person contact in the graph. An organization contact is not made a person from it." + }, + { + "name": "phones", + "uses": [ + "Searchable text" + ], + "text": "The contact's phone numbers, without their area and country codes joined on." + }, + { + "name": "organization_name", + "uses": [ + "Searchable text" + ], + "text": "The contact's name, when it differs from the person's name. Adds the organization to the contact details. It does not link the person to a separate company." + }, + { + "name": "ContactStatus, Website, AccountNumber", + "uses": [ + "Searchable text" + ], + "text": "The contact's status, website and account number." + }, + { + "name": "UpdatedDateUTC", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the contact was last updated. It is the result date and appears in the contact details as `Updated`." + } + ] + }, + { + "name": "Invoices", + "kind": "knowledge_base", + "one_document": "One sales or purchase invoice.", + "title": "`Invoice - `. When a part is missing, the record type and id are used instead.", + "text": "The reference, then `Contact`, `Type`, `Status`, `Total` and `Amount due` with the currency, `Due date` and `Line items` lines. The title is searchable too.", + "date": "When the invoice was last updated in Xero.", + "link_back": "The URL set on the invoice in Xero, when there is one. Otherwise none.", + "files": "Files attached to an invoice arrive as separate attachment documents linked to it.", + "attributes": [ + { + "name": "Contact", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The contact the invoice belongs to. Its id links the invoice to the contact's document. Its name is in the title and the `Contact` line. The id itself is not searchable." + }, + { + "name": "InvoiceNumber", + "uses": [ + "Searchable text" + ], + "text": "The invoice number, in the title." + }, + { + "name": "Line items", + "uses": [ + "Searchable text" + ], + "text": "Each line's description. Quantities, prices and account codes are stored but not searchable." + }, + { + "name": "UpdatedDateUTC", + "uses": [ + "Result date" + ], + "text": "When the invoice was last updated. Not searchable." + } + ] + }, + { + "name": "Payments", + "kind": "knowledge_base", + "one_document": "One payment against an invoice.", + "title": "`Payment - `. When a part is missing, the record type and id are used instead.", + "text": "The reference, then `Contact`, `Invoice` (the invoice number), `Amount`, `Type`, `Status` and `Date` lines. The title is searchable too.", + "date": "When the payment was last updated in Xero.", + "link_back": "None.", + "attributes": [ + { + "name": "Invoice", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The invoice the payment settles. Its id links the payment to the invoice's document. The invoice number and contact name are in the text, and the contact name can be in the title." + }, + { + "name": "Amount", + "uses": [ + "Searchable text" + ], + "text": "The payment amount, with its currency when Xero supplies one. In the title and the `Amount` line." + }, + { + "name": "UpdatedDateUTC", + "uses": [ + "Result date" + ], + "text": "When the payment was last updated. Not searchable." + } + ] + }, + { + "name": "Bank transactions", + "kind": "knowledge_base", + "one_document": "One bank transaction.", + "title": "`Bank transaction - `. When a part is missing, the record type and id are used instead.", + "text": "The reference, then `Contact`, `Type`, `Status`, `Total`, `Date` and `Line items` lines. The title is searchable too.", + "date": "When the transaction was last updated in Xero.", + "link_back": "The URL set on the transaction in Xero, when there is one. Otherwise none.", + "files": "Files attached to a bank transaction arrive as separate attachment documents linked to it.", + "attributes": [ + { + "name": "Contact", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The contact the transaction belongs to. Its id links the transaction to the contact's document. Its name is in the title and the `Contact` line. The id itself is not searchable." + }, + { + "name": "Line items", + "uses": [ + "Searchable text" + ], + "text": "Each line's description. Quantities, prices and account codes are stored but not searchable." + }, + { + "name": "UpdatedDateUTC", + "uses": [ + "Result date" + ], + "text": "When the transaction was last updated. Not searchable." + } + ] + }, + { + "name": "Attached files", + "kind": "custom", + "one_document": "One file attached to a contact, an invoice or a bank transaction.", + "title": "The file name, or the attachment id when there is none.", + "text": "When the file is read, its text, followed by a `Data` section with the parent record's id and type. When it is not read, `Parent`, `Parent type`, `File` and `Content type` lines. The title is searchable either way.", + "date": "None. HydraDB does not keep when a file was added or changed.", + "link_back": "None that opens in the Xero app.", + "files": "Supported files are downloaded and read. When a file cannot be downloaded or read, only its details are searchable.", + "attributes": [ + { + "name": "File text", + "uses": [ + "Searchable text" + ], + "text": "The text read from the file, such as a receipt PDF." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The Xero id of the contact, invoice or bank transaction the file is attached to. Links the file to that record, and the graph places the file under it. Not a query filter." + }, + { + "name": "ParentType", + "uses": [ + "Searchable text" + ], + "text": "`contacts`, `invoices` or `bank_transactions`: the kind of record the file is attached to." + }, + { + "name": "MimeType", + "uses": [ + "Searchable text" + ], + "text": "The file's media type. Searchable only when the file was not read. Otherwise kept for inspection." + }, + { + "name": "ContentLength", + "uses": [ + "Stored only" + ], + "text": "The file size in bytes." + } + ] + } + ], + "example_searches": [ + "What is still due on invoice INV-0042 for Acme Ltd?", + "Which payments settled invoice INV-0042, and when?", + "What is the email and phone number for supplier Office Supplies Co?" + ], + "graph": { + "connections": [ + "An invoice to its contact.", + "A bank transaction to its contact.", + "A payment to the invoice it settles.", + "An attached file to its contact, invoice or bank transaction, and under that record.", + "No links to other tools." + ], + "people": [ + "Each contact with a first or last name, as a person, identified by name, email and Xero contact id.", + "Other contacts are organizations. A person contact is not linked to a separate company." + ], + "from_text": "References, line descriptions, contact details and the text of attached files." + }, + "not_synced": [ + "Accounts, items, credit notes, purchase orders, quotes, journals, manual journals and other Xero objects.", + "Archived contacts. The connection form does not offer an option to include them.", + "Files attached to anything other than contacts, invoices and bank transactions.", + "Deletions: records deleted in Xero stay in HydraDB.", + "When an attached file was added or changed." + ] +} diff --git a/scripts/connector_pages/zendesk.json b/scripts/connector_pages/zendesk.json new file mode 100644 index 00000000..21ee301e --- /dev/null +++ b/scripts/connector_pages/zendesk.json @@ -0,0 +1,322 @@ +{ + "description": "Sync Zendesk Support tickets and their comments from the brands you choose. Group-based ticket access carries over when Enforce ACL is on and HydraDB can work out the readers.", + "opening": [ + "Sync Zendesk Support tickets from the brands you select, with every comment on them: public replies and internal notes. Each ticket is one document and each comment is its own document, linked to its ticket. PDF and DOCX files attached to comments are read, and their text is searchable with the comment.", + "A ticket assigned to a group can be restricted to that group's members, the assignee, the requester and Zendesk admins. A ticket with no assigned group carries no Zendesk permissions. Search applies these restrictions only when Enforce ACL is on. Authorize as a Zendesk administrator, or only that person's own tickets sync. Satisfaction ratings and Help Center articles are not synced." + ], + "permissions": { + "carried": true, + "who_can_read": "A ticket with an assigned group can be read by the group's members, the assignee, the requester and Zendesk admins. A comment can be read by its ticket's readers. The requester cannot read an internal note, unless they also have access as an admin, the assignee or a group member.", + "identity": "A Zendesk user's email address.", + "when_unreadable": "If a group's memberships are missing or incomplete, a member cannot be identified, a ticket has too many readers, or a comment's ticket cannot be found, the item gets a permission warning, which you can find with `additional_metadata.rbac_warning`.", + "notes": [ + "A ticket with no assigned group carries no Zendesk permissions and gets no warning. It follows the access rule you set on its resource. With no rule, it is visible to everyone who can query the collection, and so are its comments, including internal notes.", + "Readers come from the assigned group and the people named on the ticket. Other Zendesk visibility settings are not reproduced.", + "Readers are worked out when a ticket is synced. Do not rely on a change to Zendesk group membership to remove access right away." + ] + }, + "connect": { + "auth": "Zendesk uses an OAuth access token, with a refresh token and the OAuth client id and secret so HydraDB can renew it. OAuth is the recommended option for a new connection. An existing Zendesk API token also works.", + "credentials": [ + { + "name": "subdomain", + "type": "string", + "required": true, + "text": "Your Zendesk subdomain, for example `acme` for `acme.zendesk.com`." + }, + { + "name": "access_token", + "type": "secret string", + "text": "An OAuth access token." + }, + { + "name": "refresh_token", + "type": "secret string", + "text": "The OAuth refresh token, used to renew the access token." + }, + { + "name": "client_id", + "type": "string", + "text": "The OAuth client id." + }, + { + "name": "client_secret", + "type": "secret string", + "text": "The OAuth client secret." + } + ], + "alternatives": [ + { + "title": "Existing API token", + "credentials": [ + { + "name": "api_token", + "type": "secret string", + "text": "A Zendesk API token. Send it with `subdomain` and `email`." + }, + { + "name": "email", + "type": "string", + "text": "The email of the Zendesk user the API token belongs to." + } + ] + } + ], + "permissions_label": "What the connection needs", + "permissions": [ + { + "name": "read", + "text": "OAuth scope." + }, + { + "name": "Administrator", + "text": "the Zendesk role of the person who authorizes. Otherwise only that person's own tickets sync." + } + ], + "steps": [ + { + "title": "Authorize as an administrator", + "text": "Sign in to Zendesk as an administrator and authorize the connection with the `read` scope." + }, + { + "title": "Create the connector", + "text": "Enter `subdomain` and the OAuth token fields." + }, + { + "title": "Select brands", + "text": "HydraDB lists the account's brands. Select the ones to sync. Tickets from every brand are still read from Zendesk and filtered afterwards. A comment follows its ticket's brand." + } + ], + "account": "One connector reads one Zendesk subdomain." + }, + "sync": { + "first_sync": "Each selected brand reaches back the window set by `lookback_days`, 30 days by default. Comments come with the tickets in that window.", + "changes": "Each sync reads tickets changed since the last sync, with their comments.", + "edits": "A changed ticket is read again with its comments and updates their documents.", + "deletes": "Tickets deleted in Zendesk stay searchable in HydraDB.", + "notes": [ + "Zendesk users, groups, group memberships and organizations are read for the whole account on every sync, whatever brands you select. They name people and decide who can read a ticket. They are not documents of their own." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.zendesk_id", + "uses": [ + "Query filter" + ], + "text": "The ticket id on a ticket, the comment id on a comment. Targets one item, and keeps later syncs on the same document. Not searchable." + }, + { + "name": "additional_metadata.rbac_warning", + "uses": [ + "Query filter" + ], + "text": "Set when HydraDB could not fully work out who can read the item, or when a group that granted access was deleted. A warning does not by itself mean the item is public. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `zendesk`. Not searchable." + }, + { + "name": "acl", + "uses": [ + "Access rule" + ], + "text": "The people who can read the item, worked out as described under Permissions. Not searchable." + } + ], + "documents": [ + { + "name": "Tickets", + "kind": "ticket", + "one_document": "One ticket.", + "title": "The ticket subject. A ticket without one gets a title with its ticket id.", + "text": "The ticket description, or the subject when the description is empty. Then `Requester`, `Assignee`, `Organization` and `Group` lines. The status, priority and creation time are part of the text too. The subject is searchable too.", + "date": "When the ticket was last updated, else when it was created.", + "link_back": "The ticket in the Zendesk agent interface.", + "files": "None on the ticket itself. Attachments are on its comments.", + "attributes": [ + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "New, open, pending, hold, solved or closed, written as a `Status` line." + }, + { + "name": "priority", + "uses": [ + "Searchable text" + ], + "text": "Urgent, high, normal or low, written as a `Priority` line." + }, + { + "name": "requester", + "uses": [ + "Searchable text" + ], + "text": "The requester's name, written as the `Requester` line, where HydraDB can identify the customer." + }, + { + "name": "assignee", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The assigned agent's name, written as the `Assignee` line. The graph records the ticket as assigned to that agent." + }, + { + "name": "organization", + "uses": [ + "Searchable text" + ], + "text": "The organization's name, written as the `Organization` line, where HydraDB can identify the company." + }, + { + "name": "group", + "uses": [ + "Searchable text" + ], + "text": "The assigned group's name, written as the `Group` line. Who can read the ticket is worked out from the group's members, not from this name." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the ticket was created, written as a `Created` line. Used as the result date only when the update time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the ticket was last updated. Not searchable." + }, + { + "name": "type", + "uses": [ + "Stored only" + ], + "text": "Problem, incident, question or task." + }, + { + "name": "tags", + "uses": [ + "Stored only" + ], + "text": "The ticket's tags. They are not part of the searchable text." + }, + { + "name": "api_url", + "uses": [ + "Stored only" + ], + "text": "The ticket's address in the Zendesk API. The link back is the agent interface address." + } + ] + }, + { + "name": "Comments", + "kind": "comment", + "one_document": "One comment on a ticket: a public reply or an internal note.", + "title": "`Comment by` and the author's name. Without an author, the first 80 characters of the comment.", + "text": "An `Author` line, then the plain text of the comment, or `Attachment:` and the file name for a comment that has only an attachment. The ticket id and the creation time are part of the text too.", + "date": "When the comment was created.", + "link_back": "None. Open the ticket from its own document.", + "files": "PDF and DOCX attachments up to 25 MiB are downloaded and read, and their text is searchable with the comment. An attachment that fails HydraDB's checks is skipped. Documents in other formats are not read.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The name of the person who wrote the comment, written as the `Author` line. The graph records the comment as written by that person." + }, + { + "name": "mentions", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Names @mentioned in an internal note. The names stay in the note text, and the graph records each as mentioned." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The ticket the comment belongs to, written into the text as the ticket id. Links the comment to its ticket. The ticket's text is read together with the comment." + }, + { + "name": "additional_metadata.zendesk_ticket_id", + "uses": [ + "Query filter" + ], + "text": "The id of the ticket the comment belongs to. Returns every comment on one ticket. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the comment was created, written as a `Created` line." + }, + { + "name": "public", + "uses": [ + "Access rule" + ], + "text": "True for a public reply, false for an internal note. The requester cannot read an internal note through being the requester. Not searchable." + }, + { + "name": "author_id", + "uses": [ + "Stored only" + ], + "text": "The Zendesk user id of the comment's author." + } + ] + } + ], + "example_searches": [ + "What did we tell Acme about the export bug?", + "Which urgent tickets are open for the billing group?", + "What did an agent write on ticket 123?" + ], + "graph": { + "connections": [ + "A comment to its ticket.", + "No links to other tools." + ], + "people": [ + "The assigned agent of each ticket.", + "The author of each comment.", + "Names @mentioned in an internal note.", + "The requester, the organization and the group appear in the ticket text, where HydraDB can identify them." + ], + "from_text": "The ticket description with its requester, assignee, organization and group lines, the comment text, and the text of attached PDF and DOCX files. Each comment is read together with its ticket's text." + }, + "not_synced": [ + "Brands you did not select.", + "Satisfaction ratings.", + "Help Center articles and community posts.", + "Ticket audits, macros, ticket fields and forms, SLA policies and metric events.", + "Ticket custom fields.", + "Attached documents in formats other than PDF and DOCX." + ] +} diff --git a/scripts/connector_pages/zoho_crm.json b/scripts/connector_pages/zoho_crm.json new file mode 100644 index 00000000..4869fc52 --- /dev/null +++ b/scripts/connector_pages/zoho_crm.json @@ -0,0 +1,837 @@ +{ + "description": "Sync records, notes and file attachments from the Zoho CRM modules you choose, including custom modules. Zoho CRM permissions are not imported.", + "opening": [ + "Sync the Zoho CRM modules you select: leads, contacts, accounts, deals, tasks, cases, notes, and custom and other modules. Each record is one document, with its description and its other visible fields as labeled lines. Each note and each file attached to a record is its own document, linked to that record. Uploaded files in supported formats are read, and their text is searchable.", + "Zoho CRM sharing and permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. In a module that has only a creation date, edits to older records can be missed. Records deleted in Zoho CRM stay in HydraDB." + ], + "callouts": { + "synced": { + "kind": "note", + "text": "Zoho CRM items are stored with the provider value `zoho-crm`, with a hyphen. Use that value when you filter on `provider`." + } + }, + "permissions": { + "carried": false, + "notes": [ + "Zoho CRM module visibility, record owners and record sharing are not reproduced." + ] + }, + "connect": { + "auth": "Zoho CRM uses an OAuth client id and secret with a refresh token for the account.", + "credentials": [ + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The Zoho OAuth client id." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The Zoho OAuth client secret." + }, + { + "name": "refresh_token", + "type": "secret string", + "required": true, + "text": "A Zoho OAuth refresh token for the account." + }, + { + "name": "data_center", + "type": "string", + "text": "The Zoho data center of the account, such as `com`, `in`, `eu`, `com.au`, `jp` or `ca`. Defaults to `com`, the US data center. A refresh token works only in its own data center." + } + ], + "steps": [ + { + "title": "Create an OAuth client", + "text": "In Zoho, create an OAuth client and generate a refresh token for the account you want to sync." + }, + { + "title": "Create the connector", + "text": "Paste the client id, client secret and refresh token. If your Zoho account is not in the US data center, set `data_center`, or the token is rejected." + }, + { + "title": "Select modules", + "text": "HydraDB lists the modules in the account. Select the ones to sync. Only selected modules sync." + } + ], + "account": "One connector reads one Zoho CRM account." + }, + "sync": { + "first_sync": "Reaches back the window set by `lookback_days`, 30 days by default. A module with no modification or creation date is read in full.", + "changes": "A module with a modification date picks up records changed since the last sync. A module with only a creation date picks up new records. A module with neither is read in full on every sync. Files are listed only for records synced in the same sync.", + "edits": "An edited record updates its document when its module has a modification date or is read in full. In a module with only a creation date, edits to older records can be missed.", + "deletes": "Records deleted in Zoho CRM stay searchable in HydraDB.", + "notes": [ + "Zoho users are read on every sync to name record owners. They are not documents of their own." + ] + }, + "shared_attributes": [ + { + "name": "additional_metadata.zoho_crm_id", + "uses": [ + "Query filter" + ], + "text": "The Zoho CRM record id. Targets one record, and keeps later syncs on the same document. Not searchable." + }, + { + "name": "additional_metadata.zoho_crm_module", + "uses": [ + "Query filter" + ], + "text": "The module's API name in lower case, such as `deals`. Limits a query to one module. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `zoho-crm`, with a hyphen. Not searchable." + }, + { + "name": "Other module fields", + "uses": [ + "Searchable text" + ], + "text": "Every other visible field of the module, written as labeled lines. A link to another record is written as that record's name or email. Hidden fields are left out." + } + ], + "documents": [ + { + "name": "Leads, contacts and accounts", + "kind": "contact", + "one_document": "One lead, contact or account.", + "title": "For a lead or contact, the full name, else the first and last name, the company or the email. For an account, the account name. Otherwise a title with the record id.", + "text": "The description, then `Label: value` lines. Leads: `Name`, `Company`, `Status`, `Email` and `Owner`. Contacts: `Name`, `Account`, `Email`, `Title` and `Owner`. Accounts: `Account`, `Industry`, `Website` and `Owner`. Then the module's other fields, then the owner's email. The name is searchable too.", + "date": "When the record was last modified, else when it was created.", + "link_back": "The record's URL field, else its website, when it has one. This can be the company's website rather than the record in Zoho CRM.", + "files": "Files attached to the record are their own documents.", + "attributes": [ + { + "name": "display_name", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The person's or account's name. For a lead or contact, the graph treats the record as that person." + }, + { + "name": "entity_type", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "Person for leads and contacts, organization for accounts. Decides whether the record stands for a person in the graph." + }, + { + "name": "email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The primary email, else another email on the record. Identifies the person in the graph." + }, + { + "name": "emails", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The record's other email addresses. Connected to the same person in the graph." + }, + { + "name": "first_name", + "uses": [ + "Searchable text" + ], + "text": "The first name." + }, + { + "name": "last_name", + "uses": [ + "Searchable text" + ], + "text": "The last name." + }, + { + "name": "phones", + "uses": [ + "Searchable text" + ], + "text": "The record's phone numbers, so a person can be found by phone." + }, + { + "name": "job_title", + "uses": [ + "Searchable text" + ], + "text": "The person's title or designation." + }, + { + "name": "organization_name", + "uses": [ + "Searchable text" + ], + "text": "The account name on a contact, the company name on a lead." + }, + { + "name": "organization_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The id of a contact's account. Links the contact to the account as a member." + }, + { + "name": "company", + "uses": [ + "Searchable text" + ], + "text": "A lead's company, written as the `Company` line." + }, + { + "name": "status", + "uses": [ + "Searchable text" + ], + "text": "A lead's status, written as the `Status` line." + }, + { + "name": "account_name", + "uses": [ + "Searchable text" + ], + "text": "A contact's account name, written as the `Account` line." + }, + { + "name": "industry", + "uses": [ + "Searchable text" + ], + "text": "An account's industry, written as the `Industry` line." + }, + { + "name": "website", + "uses": [ + "Searchable text" + ], + "text": "An account's website, written as the `Website` line." + }, + { + "name": "lifecycle_stage", + "uses": [ + "Searchable text" + ], + "text": "The contact status, lead status or account type." + }, + { + "name": "labels", + "uses": [ + "Searchable text" + ], + "text": "The record's labels." + }, + { + "name": "tags", + "uses": [ + "Searchable text" + ], + "text": "The record's tags." + }, + { + "name": "url", + "uses": [ + "Searchable text" + ], + "text": "The record's URL field, else its website. Used as the link back." + }, + { + "name": "provider_user_id", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The Zoho CRM record id. Identifies the person in the graph, and keeps later syncs on the same document." + }, + { + "name": "owner", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The owner's name or email, written as the `Owner` line. The graph records the owner of the record." + }, + { + "name": "owner_email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The owner's email. Identifies the owner in the graph." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was created. Used as the result date only when the modification time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was last modified." + }, + { + "name": "name", + "uses": [ + "Stored only" + ], + "text": "A copy of the record's name." + }, + { + "name": "owner_id", + "uses": [ + "Stored only" + ], + "text": "The owner's Zoho user id." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`." + } + ] + }, + { + "name": "Deals, tasks and cases", + "kind": "ticket", + "one_document": "One deal, task or case.", + "title": "A deal's name. For a task or case, its subject or title. Otherwise a title with the record id.", + "text": "For a deal, the description, then `Deal`, `Account`, `Stage`, `Amount`, `Closing date` and `Owner` lines, then its other fields. For a task or case, all its fields as labeled lines. The title and creation time are searchable too.", + "date": "When the record was last modified, else when it was created.", + "link_back": "None.", + "files": "Files attached to the record are their own documents.", + "attributes": [ + { + "name": "amount", + "uses": [ + "Searchable text" + ], + "text": "A deal's amount, written as the `Amount` line." + }, + { + "name": "stage", + "uses": [ + "Searchable text" + ], + "text": "A deal's stage, written as the `Stage` line." + }, + { + "name": "closing_date", + "uses": [ + "Searchable text" + ], + "text": "A deal's expected closing date, written as the `Closing date` line. It is not the result date." + }, + { + "name": "account_name", + "uses": [ + "Searchable text" + ], + "text": "The linked account's name, written as the `Account` line." + }, + { + "name": "email", + "uses": [ + "Searchable text" + ], + "text": "The record's email field, when it has one." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name, written as the `Owner` line." + }, + { + "name": "owner_email", + "uses": [ + "Searchable text" + ], + "text": "The owner's email." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was created, written as a `Created` line. Used as the result date only when the modification time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the record was last modified. Not searchable." + }, + { + "name": "name", + "uses": [ + "Stored only" + ], + "text": "A copy of the record's title." + }, + { + "name": "owner_id", + "uses": [ + "Stored only" + ], + "text": "The owner's Zoho user id." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`." + } + ] + }, + { + "name": "Notes", + "kind": "comment", + "one_document": "One note. Notes with neither content nor a title are skipped.", + "title": "`Comment by` and the note owner's name or email. Without one, the first 80 characters of the text.", + "text": "A `Parent` line naming the record the note is on, with its id, module and name. Then the note content, or the note title when there is no content, then the note's other fields. The author and the created and updated times are part of the text too.", + "date": "When the note was last modified, else when it was created.", + "link_back": "None.", + "attributes": [ + { + "name": "author", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The note owner's name or email. The graph records the note as written by that person." + }, + { + "name": "note_title", + "uses": [ + "Searchable text" + ], + "text": "The note's title. Searchable when the note has no content. Otherwise it is kept with the note." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The record the note is on, written in the `Parent` line. Links the note to that record, in any module." + }, + { + "name": "parent_name", + "uses": [ + "Searchable text" + ], + "text": "The name of the record the note is on, written in the `Parent` line." + }, + { + "name": "parent_module", + "uses": [ + "Searchable text" + ], + "text": "The module of the record the note is on, written in the `Parent` line when it is known." + }, + { + "name": "additional_metadata.zoho_crm_parent_id", + "uses": [ + "Query filter" + ], + "text": "The id of the record the note is on. Returns every note on one record. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the note was created, written as a `Created` line. Used as the result date only when the modification time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the note was last modified, written as an `Updated` line." + }, + { + "name": "owner", + "uses": [ + "Stored only" + ], + "text": "A copy of the note owner. The author is the searchable value." + }, + { + "name": "owner_id", + "uses": [ + "Stored only" + ], + "text": "The note owner's Zoho user id." + }, + { + "name": "owner_email", + "uses": [ + "Stored only" + ], + "text": "The note owner's email." + } + ] + }, + { + "name": "Attachments", + "kind": "knowledge_base", + "one_document": "One file attached to a record.", + "title": "The file name. Otherwise a title with the attachment id.", + "text": "The file name with `File type`, `Size` and `Parent name` lines, the file's other fields, the owner and an `Updated` line. When the file was downloaded and read, its text is searchable too.", + "date": "When the attachment was last modified, else when it was created.", + "link_back": "None.", + "files": "Uploaded files in supported formats up to 50 MiB are downloaded and read. Larger files keep only their details. Link attachments are not downloaded. Files attached to notes are not synced.", + "attributes": [ + { + "name": "file_type", + "uses": [ + "Searchable text" + ], + "text": "The file type Zoho reports, written as the `File type` line. It is not always a MIME type." + }, + { + "name": "size", + "uses": [ + "Searchable text" + ], + "text": "The file size in bytes, written as the `Size` line." + }, + { + "name": "parent_name", + "uses": [ + "Searchable text" + ], + "text": "The name of the record the file is attached to, written as the `Parent name` line." + }, + { + "name": "parent_id", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The record the file is attached to. Links the file to that record when its module is known. Written into the text only when the record's name is missing." + }, + { + "name": "parent_module", + "uses": [ + "Searchable text", + "Graph connection" + ], + "text": "The module of the record the file is attached to. Makes sure the link goes to the right kind of record. Written into the text only when the record's name is missing." + }, + { + "name": "additional_metadata.zoho_crm_parent_id", + "uses": [ + "Query filter" + ], + "text": "The id of the record the file is attached to. Returns every file on one record. Not searchable." + }, + { + "name": "additional_metadata.zoho_crm_parent_module", + "uses": [ + "Query filter" + ], + "text": "The module of the record the file is attached to. Finds files by their record's module. Not searchable." + }, + { + "name": "additional_metadata.zoho_crm_parent_kind", + "uses": [ + "Query filter" + ], + "text": "The kind of record the file is attached to. Finds files by that kind. Not searchable." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the attachment was last modified, written as the `Updated` line." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the attachment was created. Used as the result date only when the modification time is missing. Not searchable." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "Always `attachments`." + } + ] + }, + { + "name": "Solutions and custom modules", + "kind": "knowledge_base", + "one_document": "One record of the Solutions module, or of a custom or other module not listed on this page.", + "title": "The record's name, subject or title. Otherwise a title with the record id.", + "text": "Every field of the record as labeled lines, then the owner and an `Updated` line. The title is searchable too.", + "date": "When the record was last modified, else when it was created.", + "link_back": "None.", + "files": "Files attached to the record are their own documents.", + "attributes": [ + { + "name": "email", + "uses": [ + "Searchable text" + ], + "text": "The record's email field, when it has one." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name." + }, + { + "name": "owner_email", + "uses": [ + "Searchable text" + ], + "text": "The owner's email." + }, + { + "name": "updated_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was last modified, written as the `Updated` line." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the record was created. Used as the result date only when the modification time is missing. Not searchable." + }, + { + "name": "name", + "uses": [ + "Stored only" + ], + "text": "A copy of the record's title." + }, + { + "name": "owner_id", + "uses": [ + "Stored only" + ], + "text": "The owner's Zoho user id." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`." + } + ] + }, + { + "name": "Events, meetings and calls", + "kind": "meeting", + "one_document": "One event, meeting or call record.", + "title": "The record's name, subject or title. Otherwise a title with the record id.", + "text": "Every field of the record as labeled lines, then the owner. The title is searchable too.", + "date": "When the record was last modified, else when it was created.", + "link_back": "None.", + "files": "Files attached to the record are their own documents.", + "attributes": [ + { + "name": "email", + "uses": [ + "Searchable text" + ], + "text": "The record's email field, when it has one." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name." + }, + { + "name": "owner_email", + "uses": [ + "Searchable text" + ], + "text": "The owner's email." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the record was last modified. Not searchable." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the record was created. Used as the result date only when the modification time is missing. Not searchable." + }, + { + "name": "name", + "uses": [ + "Stored only" + ], + "text": "A copy of the record's title." + }, + { + "name": "owner_id", + "uses": [ + "Stored only" + ], + "text": "The owner's Zoho user id." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`." + } + ] + }, + { + "name": "Emails", + "kind": "email", + "one_document": "One record of an email module.", + "title": "The record's name, subject or title. Otherwise a title with the record id.", + "text": "Every field of the record as labeled lines, then the owner. The title and creation time are searchable too.", + "date": "When the record was last modified, else when it was created.", + "link_back": "None.", + "files": "Files attached to the record are their own documents.", + "attributes": [ + { + "name": "email", + "uses": [ + "Searchable text" + ], + "text": "The record's email field, when it has one." + }, + { + "name": "owner", + "uses": [ + "Searchable text" + ], + "text": "The owner's name." + }, + { + "name": "owner_email", + "uses": [ + "Searchable text" + ], + "text": "The owner's email." + }, + { + "name": "created_at", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "When the record was created, written as the email's date. Used as the result date only when the modification time is missing." + }, + { + "name": "updated_at", + "uses": [ + "Result date" + ], + "text": "When the record was last modified. Not searchable." + }, + { + "name": "name", + "uses": [ + "Stored only" + ], + "text": "A copy of the record's title." + }, + { + "name": "owner_id", + "uses": [ + "Stored only" + ], + "text": "The owner's Zoho user id." + }, + { + "name": "object_type", + "uses": [ + "Stored only" + ], + "text": "The module name in lower case. Filter on it with `additional_metadata.zoho_crm_module`." + } + ] + } + ], + "example_searches": [ + "Which deals for Acme are at the Negotiation stage?", + "What notes were left on this lead?", + "What does the contract attached to the Acme account say?" + ], + "graph": { + "connections": [ + "A note to the record it is on, in any module.", + "A file to the record it is attached to.", + "A deal or contact to its account, and a contact to its account as a member.", + "Any record to every record named in its lookup fields, up to 100 per record.", + "No links to other tools." + ], + "people": [ + "A lead or contact stands for that person, identified by name and email.", + "The owner of each lead, contact and account.", + "The author of each note.", + "Owners of other records appear only in their text." + ], + "from_text": "Descriptions, note content, the text read from attached files, and the other fields of each record." + }, + "not_synced": [ + "Modules you did not select.", + "Hidden, unreadable and virtual fields.", + "Profiles, roles, territories, currencies and organization settings.", + "The contents of link attachments, and the text of files over 50 MiB.", + "Files attached to notes.", + "Zoho CRM sharing and permissions." + ] +} diff --git a/scripts/connector_pages/zoom.json b/scripts/connector_pages/zoom.json new file mode 100644 index 00000000..c97d2172 --- /dev/null +++ b/scripts/connector_pages/zoom.json @@ -0,0 +1,238 @@ +{ + "description": "Sync a Zoom account's cloud recordings with their transcripts, plus its scheduled meetings and webinars.", + "opening": [ + "Sync a Zoom account's cloud recordings, scheduled meetings and webinars. Each recording is one document with the text of its transcript, captions, summary and timeline files, and links to the scheduled meeting it came from. Each scheduled meeting and each webinar is one document with its topic, time, host and agenda.", + "Zoom permissions are not imported, so every synced item is visible to everyone who can query the collection unless you set an access rule. HydraDB does not transcribe video: only the text files Zoom produces are searchable. A transcript that becomes available after its recording was synced is not guaranteed to be added. Recordings and meetings deleted in Zoom stay in HydraDB." + ], + "permissions": { + "carried": false + }, + "connect": { + "auth": "Zoom uses a Server-to-Server OAuth app that you create in the Zoom Marketplace.", + "credentials": [ + { + "name": "account_id", + "type": "secret string", + "required": true, + "text": "The app's Account ID." + }, + { + "name": "client_id", + "type": "secret string", + "required": true, + "text": "The app's Client ID." + }, + { + "name": "client_secret", + "type": "secret string", + "required": true, + "text": "The app's Client Secret." + } + ], + "permissions_label": "Scopes the connector reads with", + "permissions": [ + { + "name": "user:read:admin", + "text": "lists the account's users, to name hosts and to find each user's meetings and webinars." + }, + { + "name": "cloud_recording:read:admin" + }, + { + "name": "meeting:read:admin" + }, + { + "name": "webinar:read:admin" + } + ], + "permissions_note": "If Zoom refuses a request because of your plan or a missing scope, that part returns nothing and the rest still syncs. A plan without webinars syncs no webinars. If the user list is refused, no scheduled meetings or webinars are synced.", + "steps": [ + { + "title": "Create a Server-to-Server OAuth app", + "text": "In the Zoom Marketplace, create a Server-to-Server OAuth app and add the scopes above." + }, + { + "title": "Copy its credentials", + "text": "Copy the app's Account ID, Client ID and Client Secret." + }, + { + "title": "Create the connector", + "text": "Paste them as `account_id`, `client_id` and `client_secret`." + }, + { + "title": "Select the account", + "text": "HydraDB lists one item for the whole Zoom account. Select it." + } + ], + "account": "One connector reads one Zoom account. Recordings are read across the account. Scheduled meetings and webinars are read for each user on the account." + }, + "sync": { + "first_sync": "Reads recordings that started within the window set by `lookback_days`, 30 days by default.", + "changes": "Each sync reads recordings, scheduled meetings and webinars by start time, and reads the account's users again in full.", + "edits": "A change to an older scheduled meeting or webinar that does not touch its start time may not be picked up. A transcript that becomes available after its recording was synced is not guaranteed to be added.", + "deletes": "Recordings, meetings and webinars deleted in Zoom stay searchable in HydraDB.", + "notes": [ + "If a transcript, caption, summary or timeline file fails to download, the recording is still synced without that file's text." + ] + }, + "shared_attributes": [ + { + "name": "host", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The host's name, or email when there is no name, written as the `Host` line. The graph records the item as hosted by that person." + }, + { + "name": "start_time", + "uses": [ + "Searchable text", + "Result date" + ], + "text": "The start time: when a recording started, or when a meeting or webinar is scheduled to start. Written in the `When` line and, as `started_at`, a `Started` line. Sets the result date and decides which items each sync reads." + }, + { + "name": "duration", + "uses": [ + "Searchable text" + ], + "text": "The length in minutes, written as the `Duration` line." + }, + { + "name": "additional_metadata.host_id", + "uses": [ + "Query filter" + ], + "text": "The host's Zoom user id, also kept as `host_id`. Limits a query to one host's items. Not searchable." + }, + { + "name": "additional_metadata.container_id", + "uses": [ + "Query filter" + ], + "text": "On recordings, the Zoom account id. On scheduled meetings and webinars, the id of the Zoom user they belong to, so it limits a query to one user's meetings. Not searchable." + }, + { + "name": "additional_metadata.container_type", + "uses": [ + "Query filter" + ], + "text": "`zoom_account` on recordings and `zoom_user` on scheduled meetings and webinars. Separates recordings from scheduled meetings and webinars. Not searchable." + }, + { + "name": "connector_id", + "uses": [ + "Query filter" + ], + "text": "Limits a query to this connector's items. Not searchable." + }, + { + "name": "provider", + "uses": [ + "Query filter" + ], + "text": "Always `zoom`. Not searchable." + } + ], + "documents": [ + { + "name": "Recordings", + "kind": "meeting", + "one_document": "One cloud recording, with the text of its files.", + "title": "The meeting topic, or `Zoom recording ` when it has none.", + "text": "The topic, a `When` line, a `Duration` line in minutes and a `Host` line. Then, under `Transcript`, the transcript and caption text, followed by any summary or timeline text. Timings in transcript and caption files are removed. Summary and timeline files are kept as Zoom supplies them. The topic is searchable too.", + "date": "When the recording started.", + "link_back": "The recording's share link in Zoom.", + "files": "Only the text files Zoom produces: transcript, captions, summary and timeline. Their text joins the recording's text. Video and audio files are not downloaded.", + "attributes": [ + { + "name": "host_email", + "uses": [ + "Searchable text", + "Graph identity" + ], + "text": "The host's email. Lets the graph identify the host as the same person in other tools. Searchable only when the host has no name and the email is used as the `Host` line." + }, + { + "name": "recording_count", + "uses": [ + "Stored only" + ], + "text": "How many recording files Zoom reported." + }, + { + "name": "total_size", + "uses": [ + "Stored only" + ], + "text": "The total size of the recording files, in bytes." + }, + { + "name": "has_transcript", + "uses": [ + "Stored only" + ], + "text": "Whether any transcript, caption, summary or timeline text was added. A summary or timeline alone sets it, so it does not prove that spoken transcript text is present." + } + ] + }, + { + "name": "Scheduled meetings and webinars", + "kind": "meeting", + "one_document": "One scheduled meeting or one webinar.", + "title": "The topic, or `Zoom meeting ` or `Zoom webinar ` when it has none.", + "text": "The topic, a `When` line, a `Duration` line in minutes and a `Host` line, then the agenda. The topic is searchable too.", + "date": "The scheduled start, else when the meeting or webinar was created.", + "link_back": "The join link.", + "attributes": [ + { + "name": "agenda", + "uses": [ + "Searchable text" + ], + "text": "The agenda, written after the header lines." + }, + { + "name": "created_at", + "uses": [ + "Result date" + ], + "text": "When the meeting or webinar was created. Sets the result date only when there is no scheduled start. Not searchable." + }, + { + "name": "webinar_id", + "uses": [ + "Stored only" + ], + "text": "The webinar's numeric id, on webinars only." + } + ] + } + ], + "example_searches": [ + "What was discussed in last Thursday's all-hands recording?", + "What is on the agenda for next week's board meeting?", + "Which recordings did Lee host this month?" + ], + "graph": { + "connections": [ + "A recording to the scheduled meeting it recorded.", + "No links to other tools." + ], + "people": [ + "The host of each recording, scheduled meeting and webinar.", + "On recordings, the host's email as well, so the host can be matched to the same person in other tools.", + "Meeting participants are not synced, so they are not attached as people." + ], + "from_text": "The text of each recording's transcript, caption, summary and timeline files, and each scheduled meeting's and webinar's agenda." + }, + "not_synced": [ + "Audio and video recording files.", + "Participant lists and in-meeting chat messages.", + "Timings and cue details in transcript and caption files.", + "A file's text when its download fails or the file is unavailable.", + "Items Zoom refuses because of your plan or the app's scopes.", + "Deletions: recordings and meetings deleted in Zoom stay in HydraDB." + ] +} diff --git a/scripts/dashboard_provider_names.json b/scripts/dashboard_provider_names.json new file mode 100644 index 00000000..ef09851a --- /dev/null +++ b/scripts/dashboard_provider_names.json @@ -0,0 +1,83 @@ +{ + "provenance": { + "repository": "hydra-db/dashboard-2.0", + "commit": "59ff1bb3c4b0f590f361ea8f67f16c7405501ec5", + "rule": "For each production provider: the name of its static entry in next-app/src/lib/providers.ts, looked up through displayIdForBackendKey, else prettifyKey(provider). This is the name the dashboard's connector catalog shows." + }, + "names": { + "airtable": "Airtable", + "asana": "Asana", + "attio": "Attio", + "avoma": "Avoma", + "bamboohr": "BambooHR", + "bigquery": "BigQuery", + "bookstack": "BookStack", + "calendly": "Calendly", + "clickup": "ClickUp", + "coda": "Superhuman", + "confluence": "Confluence", + "contentful": "Contentful", + "copper": "Copper", + "datadog": "Datadog", + "discord": "Discord", + "dropbox": "Dropbox", + "figma": "Figma", + "fireflies": "Fireflies", + "freshdesk": "Freshdesk", + "github": "GitHub", + "gitlab": "GitLab", + "gmail": "Gmail", + "gong": "Gong", + "google_calendar": "Google Calendar", + "google_drive": "Google Drive", + "google_search_console": "Google Search Console", + "googleads": "Google Ads", + "granola": "Granola", + "greenhouse": "Greenhouse", + "guru": "Guru", + "helpscout": "Help Scout", + "hubspot": "HubSpot", + "intercom": "Intercom", + "jira": "Jira", + "klaviyo": "Klaviyo", + "launchdarkly": "LaunchDarkly", + "lever": "Lever", + "linear": "Linear", + "loom": "Loom", + "mailchimp": "Mailchimp", + "microsoft_teams": "Microsoft Teams", + "mixpanel": "Mixpanel", + "monday": "Monday.com", + "notion": "Notion", + "okta": "Okta", + "outlook": "Outlook", + "pagerduty": "PagerDuty", + "pardot": "Pardot", + "pipedrive": "Pipedrive", + "posthog": "PostHog", + "quickbooks": "QuickBooks", + "recurly": "Recurly", + "sendgrid": "SendGrid", + "sentry": "Sentry", + "servicenow": "ServiceNow", + "sharepoint": "SharePoint", + "shortcut": "Shortcut", + "slack": "Slack", + "smartsheet": "Smartsheet", + "stripe": "Stripe", + "supabase": "Supabase", + "surveymonkey": "SurveyMonkey", + "twilio": "Twilio", + "twitter": "Twitter", + "typeform": "Typeform", + "wrike": "Wrike", + "xero": "Xero", + "zendesk": "Zendesk", + "zoho_crm": "Zoho CRM", + "zoom": "Zoom" + }, + "formerly": { + "coda": "Coda" + }, + "formerly_reason": "The dashboard brands coda as Superhuman and keeps \"formerly Coda\" in its description so a search for Coda finds it. The docs page description does the same." +} diff --git a/scripts/generate_connector_pages.py b/scripts/generate_connector_pages.py new file mode 100644 index 00000000..9da22741 --- /dev/null +++ b/scripts/generate_connector_pages.py @@ -0,0 +1,553 @@ +"""Generate one page per connector enabled in production, plus the providers overview. + +scripts/production_providers.json is refreshed from GET /connectors/providers on production. +Every provider's page body is rendered from its copy file in scripts/connector_pages/. A provider without one stops the run. +""" +import argparse +from collections import namedtuple +import html +import json +from pathlib import Path +import re + + +ROOT = Path(__file__).resolve().parents[1] +SNAPSHOT = ROOT / "scripts/connector_capabilities.json" +PRODUCTION = ROOT / "scripts/production_providers.json" +NAMES = ROOT / "scripts/dashboard_provider_names.json" +TITLE_LOGOS = ROOT / "connector-logos.css" +LOGOS = ROOT / "images/connectors" +DIRECTORY = ROOT / "essentials/v2/connectors" +INDEX = ROOT / "essentials/v2/connector-providers.mdx" +COPY = ROOT / "scripts/connector_pages" +GUIDE = "/essentials/v2/connectors" +SCOPED_PROVIDER_EXAMPLES = { + "slack": ("slack-account-a", "slack-account-b"), + "github": ("github-account-a", "github-account-b"), + "linear": ("linear-account-a", "linear-account-b"), + "notion": ("notion-account-a", "notion-account-b"), +} +NAVIGATION = ROOT / "docs.json" +NAVIGATION_GROUP = "Connector catalog" +# Sidebar and overview order: what customers connect most comes first. +GROUPS = { + "Messaging & email": {"messaging", "email", "social"}, + "Tickets & project management": {"project_management"}, + "Docs & cloud storage": {"docs", "knowledge", "storage", "cms", "design"}, + "Meetings & calendar": {"communications", "calendar", "scheduling"}, + "Engineering": {"dev_tools", "monitoring", "security"}, + "Marketing & analytics": {"marketing", "analytics", "forms"}, + "HR & finance": {"hr", "finance"}, + "CRM & support": {"crm", "sales", "support"}, +} +PROVIDER_GROUPS = { + "airtable": "Docs & cloud storage", + "microsoft_teams": "Messaging & email", + "outlook": "Messaging & email", + "twilio": "Messaging & email", +} +# Order inside each group: the tools a company is most likely to run come first. +# A provider missing from its list follows the listed ones, by name. +PROVIDER_ORDER = { + "Messaging & email": ["slack", "gmail", "outlook", "microsoft_teams", "discord", "sendgrid", "twilio", "twitter"], + "Tickets & project management": ["jira", "linear", "asana", "clickup", "monday", "smartsheet", "wrike", "shortcut"], + "Docs & cloud storage": ["confluence", "notion", "google_drive", "dropbox", "sharepoint", "bookstack", "airtable", + "guru", "coda", "contentful", "figma"], + "Meetings & calendar": ["google_calendar", "zoom", "calendly", "fireflies", "granola", "loom", "avoma"], + "Engineering": ["github", "gitlab", "sentry", "datadog", "pagerduty", "supabase", "launchdarkly", "okta"], + "Marketing & analytics": ["posthog", "mixpanel", "bigquery", "google_search_console", "googleads", "mailchimp", + "klaviyo", "pardot", "typeform", "surveymonkey"], + "HR & finance": ["stripe", "quickbooks", "xero", "recurly", "bamboohr", "greenhouse", "lever"], + "CRM & support": ["hubspot", "zendesk", "intercom", "gong", "pipedrive", "freshdesk", "servicenow", "attio", + "zoho_crm", "helpscout", "copper"], +} +Logo = namedtuple("Logo", "light dark") + + +def ordered(title, members): + """Members of one group in PROVIDER_ORDER, then any unlisted provider in the name order they arrived in.""" + rank = {provider: position for position, provider in enumerate(PROVIDER_ORDER[title])} + return sorted(members, key=lambda item: rank.get(item["production_id"], len(rank))) + + +def slug(identifier): + return identifier.replace("_", "-") + + +def group(row): + if row["provider"] in PROVIDER_GROUPS: + return PROVIDER_GROUPS[row["provider"]] + return next(title for title, categories in GROUPS.items() if row["category"] in categories) + + +PLACEHOLDER_MARK = 'data-placeholder="monogram"' +INKS = {"light": "#363636", "dark": "#cccccc"} + + +def url(path): + return f"/{path.relative_to(ROOT)}" + + +def is_placeholder(path): + return PLACEHOLDER_MARK in path.read_text() + + +def artwork(identifier): + """The dashboard's own mark. Monochrome marks ship a light-mode and a dark-mode file; multi-colour marks ship one file for both.""" + single, light, dark = (LOGOS / f"{slug(identifier)}{suffix}.svg" for suffix in ("", "-light", "-dark")) + if light.is_file() and dark.is_file() and not is_placeholder(light): + return Logo(url(light), url(dark)) + return Logo(url(single), None) if single.is_file() else None + + +def logo(identifier): + return artwork(identifier) or Logo(*(url(LOGOS / f"{slug(identifier)}-{theme}.svg") for theme in INKS)) + + +def monogram(name, ink): + return "\n".join([ + f'', + f'{html.escape(name[0].upper())}', + "", "", + ]) + + +def placeholder_logos(providers): + """The one place that decides which providers show a placeholder: those with no dashboard artwork. Adding real artwork drops the placeholder on the next run.""" + return { + LOGOS / f"{slug(provider['provider'])}-{theme}.svg": monogram(provider["display_name"], ink) + for provider in providers if artwork(provider["provider"]) is None + for theme, ink in INKS.items() + } + + +def images(found, alt, class_name): + if found.dark is None: + return [f'{alt}'] + return [ + f'{alt}', + f'{alt}', + ] + + +def title_logos(providers): + """Mintlify has no title icon slot, so the logo is drawn before #page-title on the page whose path names the provider.""" + page = lambda identifier, theme="html": f'{theme}[data-current-path$="/essentials/v2/connectors/{slug(identifier)}"] #page-title::before' + lines = [ + "/* Generated by scripts/generate_connector_pages.py. Each connector page shows its logo before the title. */", + 'html[data-current-path*="/essentials/v2/connectors/"] #page-title::before {', + " display: inline-block;", " width: 1.1em;", " height: 1.1em;", " margin-right: 0.35em;", " vertical-align: -0.19em;", + " background-position: center;", " background-repeat: no-repeat;", " background-size: 70%;", + " background-color: rgba(0, 0, 0, 0.04);", " box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.09);", " border-radius: 0.22em;", "}", + 'html.dark[data-current-path*="/essentials/v2/connectors/"] #page-title::before {', + " background-color: rgba(255, 255, 255, 0.05);", " box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09);", "}", + ] + for provider in providers: + found = logo(provider["provider"]) + lines.append(f'{page(provider["provider"])} {{ content: ""; background-image: url("{found.light}"); }}') + if found.dark: + lines.append(f'{page(provider["provider"], "html.dark")} {{ background-image: url("{found.dark}"); }}') + return "\n".join(lines) + "\n" + + +def card(provider, found): + href = f"/essentials/v2/connectors/{slug(provider['provider'])}" + if found.dark is None: + icon = f' icon="{found.light}"' + else: + icon = f" icon={{<>{''.join(images(found, '', 'connector-card-logo'))}}}" + return f' ' + + +def navigation(by_group): + """Rewrites only the connector catalog group of docs.json, so hand-kept groups keep their layout.""" + text = NAVIGATION.read_text() + marker = text.index(f'"group": "{NAVIGATION_GROUP}"') + start = text.rindex("{", 0, marker) + depth = 0 + for end in range(start, len(text)): + depth += {"{": 1, "}": -1}.get(text[end], 0) + if depth == 0: + break + indent = text[text.rindex("\n", 0, start) + 1:start] + entry = { + "group": NAVIGATION_GROUP, "public": True, + "pages": [str(INDEX.relative_to(ROOT).with_suffix(""))] + [ + {"group": title, "pages": [f"essentials/v2/connectors/{slug(provider['provider'])}" for provider in members]} + for title, members in by_group.items() + ], + } + block = json.dumps(entry, indent=2).replace("\n", "\n" + indent) + return text[:start] + block + text[end + 1:] + + +# Badges a customer sees on each attribute. The legend is printed once, on the providers overview. +USES = { + "Searchable text": "part of the text a query matches.", + "Query filter": "a key you can filter a query on, typed exactly as shown.", + "Result date": "the date shown for the result. HydraDB uses it, among other signals, when it ranks results by date.", + "Graph connection": "links the item to another item in the knowledge graph.", + "Graph identity": "names a person or group, and the graph attaches the item to them.", + "Access rule": "decides who can read the item.", + "Stored only": "kept on the item and shown when you inspect it. A query does not match it and cannot filter on it.", +} +STORED_ONLY = "Stored only" +SEARCHABLE = "Searchable text" +CLASSES = { + "email": ("Email", "an email message, with its sender, recipients, subject and thread."), + "message": ("Message", "a chat or conversation message, with its author and thread."), + "ticket": ("Ticket", "an issue, task or support ticket, with its workflow and ownership details."), + "knowledge_base": ("Page", "a page, article or other document-style content."), + "contact": ("Contact", "a person or organization record."), + "comment": ("Comment", "a comment that belongs to another item or thread."), + "meeting": ("Meeting", "a meeting or calendar event."), + "custom": ("Record", "a record that fits none of the other classes."), + "container": ("Container", "a project, channel, folder or space that holds other items."), + "iteration": ("Iteration", "a sprint, cycle or release with dates, a state and a goal."), +} +COPY_KEYS = {"description", "opening", "permissions", "connect", "sync", "documents", "graph", "not_synced"} +OPTIONAL_COPY_KEYS = {"callouts", "shared_attributes", "example_searches"} +CONNECT_KEYS = {"auth", "credentials", "steps", "account"} +FIELD_TYPES = {"secret string", "string", "string list", "boolean", "number"} +SYNC_KEYS = {"first_sync", "changes", "edits", "deletes"} +OPTIONAL_SYNC_KEYS = {"notes", "scheduled"} +OPTIONAL_CONNECT_KEYS = {"alternatives", "credentials_note", "settings", "advanced_settings", "permissions_label", "permissions", "permissions_note", "examples", "scope_unit"} +CALLOUT_SECTIONS = {"opening", "permissions", "connect", "sync", "synced", "graph"} +MAX_EXAMPLE_SEARCHES = 3 + + +def attribute_problems(item): + uses = item.get("uses") or [] + name = item.get("name") + if not uses or any(use not in USES for use in uses): + return [f"{name}: uses {uses}"] + if STORED_ONLY in uses and len(uses) > 1: + return [f"{name}: {STORED_ONLY} cannot be combined with another use"] + if SEARCHABLE not in uses and STORED_ONLY not in uses and "not searchable" not in item.get("text", "").lower(): + return [f"{name}: an attribute with no search use must say it is not searchable"] + return [] + + +def connect_fields(connect): + return [*connect.get("credentials", []), *connect.get("settings", []), *connect.get("advanced_settings", []), + *(item for option in connect.get("alternatives", []) for item in option["credentials"])] + + +def load_copy(identifier): + """Returns the provider's checked-in page copy. Raises ValueError on a copy file that is missing or cannot render.""" + path = COPY / f"{identifier}.json" + if not path.is_file(): + raise ValueError(f"{path.relative_to(ROOT)}: every production provider needs a copy file") + copy = json.loads(path.read_text()) + problems = [f"missing {key}" for key in sorted(COPY_KEYS - copy.keys())] + problems += [f"unknown {key}" for key in sorted(copy.keys() - COPY_KEYS - OPTIONAL_COPY_KEYS)] + connect = copy.get("connect", {}) + problems += [f"connect missing {key}" for key in sorted(CONNECT_KEYS - connect.keys())] + problems += [f"connect unknown {key}" for key in sorted(connect.keys() - CONNECT_KEYS - OPTIONAL_CONNECT_KEYS)] + problems += [f"{item.get('name')}: type {item.get('type')}" for item in connect_fields(connect) if item.get("type") not in FIELD_TYPES] + sync = copy.get("sync", {}) + problems += [f"sync missing {key}" for key in sorted(SYNC_KEYS - sync.keys())] + problems += [f"sync unknown {key}" for key in sorted(sync.keys() - SYNC_KEYS - OPTIONAL_SYNC_KEYS)] + if not isinstance(sync.get("scheduled", True), bool): + problems.append("sync.scheduled must be true or false") + if not isinstance(copy.get("permissions", {}).get("cloud_outcome", True), bool): + problems.append("permissions.cloud_outcome must be true or false") + if identifier in SCOPED_PROVIDER_EXAMPLES and not connect.get("scope_unit"): + problems.append("connect.scope_unit names what one provider_account_scope covers") + for section in copy.get("callouts", {}): + if section not in CALLOUT_SECTIONS: + problems.append(f"callout for unknown section {section}") + for document in copy.get("documents", []): + if document.get("kind") not in CLASSES: + problems.append(f"{document.get('name')}: unknown kind {document.get('kind')}") + if not document.get("attributes"): + problems.append(f"{document.get('name')}: no attributes") + for item in all_attributes(copy): + problems += attribute_problems(item) + if len(copy.get("example_searches", [])) > MAX_EXAMPLE_SEARCHES: + problems.append(f"example_searches has more than {MAX_EXAMPLE_SEARCHES} entries") + if not isinstance(copy.get("permissions", {}).get("carried"), bool): + problems.append("permissions.carried must be true or false") + if problems: + raise ValueError(f"{path.relative_to(ROOT)}: {'; '.join(problems)}") + return copy + + +def all_attributes(copy): + return [*copy.get("shared_attributes", []), *(attribute for document in copy.get("documents", []) for attribute in document.get("attributes", []))] + + +def attribute(value): + return html.escape(value, quote=False).replace('"', """) + + +def mdx(text): + """Escapes JSX-significant characters outside inline code so copy reads as plain Markdown.""" + parts = re.split(r"(`[^`]*`)", text) + return "".join(part if part.startswith("`") else part.replace("{", "{").replace("}", "}").replace("<", "<").replace(">", ">") for part in parts) + + +def field(name, kind, text, required=False): + return [f'', mdx(text), "", ""] + + +def fields(items): + return [line for item in items for line in field(item["name"], item["type"], item["text"], item.get("required", False))] + + +def accordion(title, lines): + return [f'', "", *lines, "", ""] + + +def callout(copy, section): + found = copy.get("callouts", {}).get(section) + if not found: + return [] + tag = found["kind"].capitalize() + return [f"<{tag}>", mdx(found["text"]), f"", ""] + + +def labelled(label, value): + return f"- **{label}:** {mdx(value)}" + + +def bullets(value): + return [f"- {mdx(item)}" for item in value] if isinstance(value, list) else [mdx(value)] + + +def attributes(items): + """Every use an attribute has shows as its own badge. Stored-only fields fold into one accordion per record type.""" + shown = [item for item in items if STORED_ONLY not in item["uses"]] + stored = [item for item in items if STORED_ONLY in item["uses"]] + lines = [line for item in shown for line in field(item["name"], ", ".join(use for use in USES if use in item["uses"]), item["text"])] + if stored: + lines += accordion(f"Stored only, not searchable ({len(stored)})", [line for item in stored for line in field(item["name"], STORED_ONLY, item["text"])]) + return lines + + +def opening_section(provider, copy, beta): + lines = [line for paragraph in copy["opening"] for line in (mdx(paragraph), "")] + lines += callout(copy, "opening") + if beta: + lines += ["", f"{mdx(provider['display_name'])} is in beta.", "", ""] + return lines + + +def permissions_section(provider, copy, acl_supported): + name = mdx(provider["display_name"]) + permissions = copy["permissions"] + if permissions["carried"] != acl_supported: + raise ValueError(f"{provider['production_id']}: permissions.carried is {permissions['carried']} but production reports acl_supported {acl_supported}") + lines = ["## Permissions", ""] + if permissions["carried"]: + cloud = " On HydraDB Cloud, with Enforce ACL on, such an item follows the access rule you set on its resource. With no rule, it is hidden from search. Self-hosted deployments can be configured differently. Permission warnings appear in [Get Connector Status](/api-reference/v2/endpoint/get-connector-status)." + lines += [ + f"Turn on **Enforce ACL** for this connector to make search follow {name} permissions. With Enforce ACL off, HydraDB does not enforce them. Only a workspace owner or writer signed in to HydraDB can turn it on. API-key requests must omit `enforce_acl`, including `false`. See [Enforce ACL]({GUIDE}#enforce-acl).", + "", *callout(copy, "permissions"), + labelled("Who can read an item", permissions["who_can_read"]), + labelled("How a person is identified", permissions["identity"]), + labelled("When permissions cannot be read", permissions["when_unreadable"]) + (cloud if permissions.get("cloud_outcome", True) else ""), + *bullets(permissions.get("notes", [])), "", + f"You can also [set your own rule on a resource]({GUIDE}#set-your-own-rule-on-a-resource).", "", + ] + else: + lines += [ + "", + f"{name} permissions are not imported, so **Enforce ACL** is unavailable for this connector. Every synced item is visible to everyone who can query the collection, unless you [set an access rule on the resource]({GUIDE}#set-your-own-rule-on-a-resource).", + "", "", *callout(copy, "permissions"), + ] + if permissions.get("notes"): + lines += [*bullets(permissions["notes"]), ""] + lines += [f"API-key requests must omit `enforce_acl`, including `false`. See [ACL on synced content]({GUIDE}#5-acl-native-rbac-awareness).", ""] + return lines + + +def connect_section(provider, copy): + name = mdx(provider["display_name"]) + connect = copy["connect"] + lines = ["## Before you connect", "", *callout(copy, "connect"), "### Credentials", "", mdx(connect["auth"]), "", *fields(connect["credentials"])] + if connect.get("alternatives"): + lines += accordion("Other credential options", [line for option in connect["alternatives"] for line in (f"**{mdx(option['title'])}**", "", *fields(option["credentials"]))]) + if connect.get("credentials_note"): + lines += [mdx(connect["credentials_note"]), ""] + if connect.get("settings"): + lines += ["**Connector settings**", "", *fields(connect["settings"])] + if connect.get("advanced_settings"): + lines += accordion(f"Connector-wide defaults ({len(connect['advanced_settings'])})", fields(connect["advanced_settings"])) + if connect.get("permissions"): + lines += [f"**{connect.get('permissions_label', 'Permissions to grant')}**", ""] + lines += [f"- `{item['name']}`" + (f": {mdx(item['text'])}" if item.get("text") else "") for item in connect["permissions"]] + lines.append("") + if connect.get("permissions_note"): + lines += [mdx(connect["permissions_note"]), ""] + lines += ["### Set it up", "", ""] + for step in connect["steps"]: + lines += [f' ', f" {mdx(step['text'])}", " "] + lines += ["", ""] + for example in connect.get("examples", []): + lines += [mdx(example["intro"]), "", ""] + for tab in example["tabs"]: + lines += [f"```json {tab['title']}", json.dumps(tab["json"], indent=2), "```"] + lines += ["", ""] + lines += [mdx(connect["account"]), ""] + if provider["provider"] in SCOPED_PROVIDER_EXAMPLES: + first, second = SCOPED_PROVIDER_EXAMPLES[provider["provider"]] + lines += [ + f"To connect more than one {mdx(connect['scope_unit'])}, give each connector its own `provider_account_scope`, such as `{first}` and `{second}`. These are labels you choose, not {name}'s own account ids, and HydraDB does not check them. Two connectors that share a scope and write to the same collection can overwrite each other's items. See [several accounts from one provider]({GUIDE}#6-connect-several-accounts-from-one-provider).", + "", + ] + lines += accordion("Connect through the API", [ + f"Use provider `{provider['production_id']}` with [Create Connector](/api-reference/v2/endpoint/create-connector). Then call [Discover Connector Resources](/api-reference/v2/endpoint/discover-connector-resources) to list the resources the connector can sync, and [Configure Connector](/api-reference/v2/endpoint/configure-connector) to choose what to sync.", + "", + ]) + return lines + + +def sync_section(copy): + sync = copy["sync"] + lines = [ + "## Keeping in sync", "", *callout(copy, "sync"), + labelled("First sync", sync["first_sync"]), labelled("New and changed items", sync["changes"]), + labelled("Edits", sync["edits"]), labelled("Deletions", sync["deletes"]), + *bullets(sync.get("notes", [])), "", + ] + if sync.get("scheduled", True): + lines += ["After the first sync, HydraDB syncs every hour by default. Set `sync_interval_seconds` on the connector to change it.", ""] + return lines + + +def synced_section(provider, copy): + lines = ["## What gets synced", "", *callout(copy, "synced")] + if copy.get("shared_attributes"): + lines += [f"### On every {mdx(provider['display_name'])} item", "", *attributes(copy["shared_attributes"])] + for document in copy["documents"]: + lines += [f"### {document['name']}", ""] + lines += [labelled(label, document[key]) for label, key in (("One document", "one_document"), ("Title", "title"), ("Text", "text"), ("Date", "date"), ("Link back", "link_back"), ("Files", "files")) if document.get(key)] + lines += ["", *attributes(document["attributes"])] + if copy.get("example_searches"): + lines += ["**Example searches**", "", *bullets(copy["example_searches"]), ""] + return lines + + +def graph_section(provider, copy): + name = mdx(provider["display_name"]) + graph = copy["graph"] + return [ + "## How it fits into the graph", "", *callout(copy, "graph"), + *(f"- {mdx(document['name'])} use the {CLASSES[document['kind']][0]} class." for document in copy["documents"]), + "", f"[Graph classes](/essentials/v2/connector-providers#graph-classes) explains each class.", "", + f"**Connections {name} creates**", "", *bullets(graph["connections"]), + "", "**People and groups**", "", *bullets(graph["people"]), + "", "**Found in the text**", "", + f"{mdx(graph['from_text'])} HydraDB identifies people, organizations, projects and other named things in this text. To steer what it looks for, use [custom instructions]({GUIDE}#4-custom-ingestion-instructions).", + "", + ] + + +def not_synced_section(copy): + return ["## Not synced", "", *bullets(copy["not_synced"]), ""] + + +def copy_body(provider, copy, beta, acl_supported): + return [ + *opening_section(provider, copy, beta), + *permissions_section(provider, copy, acl_supported), + *connect_section(provider, copy), + *sync_section(copy), + *synced_section(provider, copy), + *graph_section(provider, copy), + *not_synced_section(copy), + ] + + +def pages(): + production = {slug(row["provider"]): row for row in json.loads(PRODUCTION.read_text())["providers"]} + enabled = {key: group(row) for key, row in production.items()} + names = json.loads(NAMES.read_text()) + snapshot = json.loads(SNAPSHOT.read_text()) + providers = [] + for item in snapshot["providers"]: + if slug(item["provider"]) in production: + production_id = production[slug(item["provider"])]["provider"] + providers.append({**item, "production_id": production_id, "display_name": names["names"][production_id]}) + providers.sort(key=lambda item: item["display_name"].casefold()) + output = {} + for provider in providers: + identifier = provider["provider"] + name = provider["display_name"] + row = production[slug(identifier)] + found = logo(identifier) + copy = load_copy(provider["production_id"]) + lines = [ + "---", f"title: {json.dumps(name)}", + f"description: {json.dumps(copy['description'])}", + f"icon: {json.dumps(found.light)}", + "---", "", + *copy_body(provider, copy, row["is_beta"], row["acl_supported"]), + ] + output[DIRECTORY / f"{slug(identifier)}.mdx"] = "\n".join(lines) + by_group = {title: ordered(title, [provider for provider in providers if enabled[slug(provider["provider"])] == title]) + for title in GROUPS} + lines = [ + "---", 'title: "Connector catalog"', 'sidebarTitle: "Catalog"', + 'description: "Every app HydraDB can sync, grouped by what it is for."', "---", "", + f"Pick an app to see what it syncs and what it needs. The setup steps every connector shares are in the [connectors guide]({GUIDE}).", "", + ] + for title, members in by_group.items(): + lines.extend([f"## {title}", "", "", *(card(provider, logo(provider["provider"])) for provider in members), "", ""]) + lines.extend([ + "## How to read a connector page", "", + "Every page has the same sections, in this order:", "", + "- **Permissions:** whether the app's own permissions decide who can read an item.", + "- **Before you connect:** the credentials and steps the app needs.", + "- **Keeping in sync:** how history, edits and deletions arrive.", + "- **What gets synced:** what one document is, and each attribute HydraDB keeps.", + "- **How it fits into the graph:** the class of each item and the connections it gets.", + "- **Not synced:** what does not come across.", "", + "### Attribute labels", "", + '', "", + *(f"- **{label}:** {meaning}" for label, meaning in USES.items()), "", + "An attribute without the Searchable text label says so in its description.", "", + "", "", + "### Graph classes", "", + '', "", + "Similar items from different apps share a class. Each connector page says which details its items carry.", "", + *(f"- **{title}:** {meaning}" for title, meaning in CLASSES.values()), "", + f"HydraDB also finds people, organizations, projects and other named things in the text of every item. To steer what it looks for, use [custom instructions]({GUIDE}#4-custom-ingestion-instructions).", "", + "", "", + "## Related", "", + f"- [Connectors]({GUIDE}): shared setup and sync workflow", + f"- [Several accounts from one provider]({GUIDE}#6-connect-several-accounts-from-one-provider): keep two accounts of the same app apart", + "- [List connector providers](/api-reference/v2/endpoint/list-connector-providers): availability and credential fields for your deployment", "", + ]) + output[INDEX] = "\n".join(lines) + output[NAVIGATION] = navigation(by_group) + output[TITLE_LOGOS] = title_logos(providers) + output.update(placeholder_logos(providers)) + return output + + +def stale_placeholders(generated): + return {path for path in LOGOS.glob("*.svg") if is_placeholder(path)} - generated.keys() + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--check", action="store_true") + args = parser.parse_args() + generated = pages() + if args.check: + stale = [str(path.relative_to(ROOT)) for path, content in generated.items() + if not path.exists() or path.read_text() != content] + extra = set(DIRECTORY.glob("*.mdx")) - generated.keys() | stale_placeholders(generated) + if stale or extra: + raise SystemExit(f"Connector pages are stale: {stale + sorted(str(path.relative_to(ROOT)) for path in extra)}") + placeholders = sum(1 for path in generated if path.parent == LOGOS) // 2 + print(f"{len(generated) - 3 - 2 * placeholders} connector pages, the overview, the navigation group, the title logos and {placeholders} placeholder logos match the snapshot") + else: + DIRECTORY.mkdir(parents=True, exist_ok=True) + for path in set(DIRECTORY.glob("*.mdx")) - generated.keys() | stale_placeholders(generated): + path.unlink() + for path, content in generated.items(): + if not path.exists() or path.read_text() != content: + path.write_text(content) diff --git a/scripts/generate_llms_index.py b/scripts/generate_llms_index.py index 7f8b93fd..0dcf4187 100644 --- a/scripts/generate_llms_index.py +++ b/scripts/generate_llms_index.py @@ -1,6 +1,4 @@ import argparse -import json -import os from pathlib import Path import re @@ -19,34 +17,11 @@ def page_paths(value): def generate(): - config = json.loads((ROOT / "docs.json").read_text()) - versions = {version["version"]: page_paths(version) for version in config["navigation"]["versions"]} - legacy = versions["v1"] - versions["v2"] - {"continuity-assurance"} - groups = {"Current v2 documentation": [], "Integration and connector details": [], "Site information": [], "Legacy v1 reference (not maintained)": []} - for directory, subdirs, files in os.walk(ROOT): - subdirs[:] = sorted(name for name in subdirs if not name.startswith(".") and name not in {"node_modules", "archive", "snippets"}) - for filename in sorted(files): - if not filename.endswith(".mdx"): - continue - path = Path(directory) / filename - slug = path.relative_to(ROOT).with_suffix("").as_posix() - title = re.search(r'^title:\s*[\'\"]?(.*?)[\'\"]?\s*$', path.read_text(), re.M) - title = title.group(1) if title else slug - title = title.replace("[", "\\[").replace("]", "\\]") - if slug in legacy: - group = "Legacy v1 reference (not maintained)" - elif slug in versions["v2"] or "/v2/" in slug: - group = "Current v2 documentation" - elif slug.startswith(("plugins/", "connectors/")): - group = "Integration and connector details" - else: - group = "Site information" - groups[group].append((slug, f"- [{title}](https://docs.hydradb.com/{slug}.md)")) - lines = ["# HydraDB Documentation", "", "> Documentation for HydraDB's supported v2 API, SDKs, integrations, and cookbooks. Legacy v1 pages are listed separately and aren't compatible with current SDK installs.", "", "Start with the v2 quickstart. The Agent Integration Guide explains the API contract; this index lists every non-archive documentation page, including linked detail pages outside the navigation."] - for heading, pages in groups.items(): - lines.extend(["", f"## {heading}", ""]) - lines.extend(line for _, line in sorted(pages)) - return "\n".join(lines) + "\n" + """llms.txt carries the Agent Integration Guide, so an agent that fetches either reads the same text.""" + source = (ROOT / "AGENTS.mdx").read_text() + front, body = re.match(r"---\n(.*?)\n---\n(.*)", source, re.S).groups() + field = lambda name: re.search(rf'^{name}:\s*[\'"]?(.*?)[\'"]?\s*$', front, re.M).group(1) + return f"# {field('title')}\n\n> {field('description')}\n\n{body.strip()}\n" if __name__ == "__main__": @@ -58,6 +33,6 @@ def generate(): if args.check: if not destination.exists() or destination.read_text() != content: raise SystemExit("llms.txt is stale; run python scripts/generate_llms_index.py") - print("llms.txt matches all non-archive documentation pages") + print("llms.txt matches the Agent Integration Guide") else: destination.write_text(content) diff --git a/scripts/production_filter_keys.json b/scripts/production_filter_keys.json new file mode 100644 index 00000000..442ac668 --- /dev/null +++ b/scripts/production_filter_keys.json @@ -0,0 +1,662 @@ +{ + "provenance": { + "source": "GET /connectors/providers?id= on production, saved 2026-11-16", + "rule": "Each provider's filterable_fields[].filter_key, the exact keys a query's metadata_filters accepts as published." + }, + "filter_keys": { + "airtable": [ + "additional_metadata.airtable_base_id", + "additional_metadata.airtable_table_id", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.rbac_warning", + "connector_id", + "provider" + ], + "asana": [ + "additional_metadata.asana_gid", + "additional_metadata.asana_kind", + "additional_metadata.asana_task_gid", + "additional_metadata.assignee_gid", + "additional_metadata.author_gid", + "additional_metadata.owner_gid", + "connector_id", + "provider" + ], + "attio": [ + "additional_metadata.call_recording_id", + "additional_metadata.comment_id", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.deadline_at", + "additional_metadata.entry_id", + "additional_metadata.is_completed", + "additional_metadata.meeting_id", + "additional_metadata.note_id", + "additional_metadata.object_id", + "additional_metadata.parent_record_id", + "additional_metadata.participants", + "additional_metadata.record_id", + "additional_metadata.resolved_at", + "additional_metadata.speakers", + "additional_metadata.status", + "additional_metadata.task_id", + "additional_metadata.thread_id", + "connector_id", + "provider" + ], + "avoma": [ + "additional_metadata.attendee_count", + "additional_metadata.avoma_meeting_id", + "additional_metadata.avoma_review_id", + "additional_metadata.crm_object_ids", + "additional_metadata.crm_object_types", + "additional_metadata.meeting_state", + "additional_metadata.organizer_email", + "additional_metadata.recording_uuid", + "additional_metadata.scorecard_id", + "additional_metadata.scored_by_email", + "additional_metadata.scored_for_email", + "connector_id", + "provider" + ], + "bamboohr": [ + "additional_metadata.bamboohr_employee_id", + "additional_metadata.bamboohr_time_off_id", + "connector_id", + "provider" + ], + "bigquery": [ + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "connector_id", + "provider" + ], + "bookstack": [ + "additional_metadata.bookstack_book_id", + "additional_metadata.bookstack_chapter_id", + "additional_metadata.bookstack_id", + "additional_metadata.bookstack_type", + "connector_id", + "provider" + ], + "calendly": [ + "additional_metadata.calendly_uri", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "connector_id", + "provider" + ], + "clickup": [ + "additional_metadata.clickup_comment_id", + "additional_metadata.clickup_task_id", + "additional_metadata.rbac_warning", + "connector_id", + "provider" + ], + "coda": [ + "additional_metadata.coda_doc_id", + "additional_metadata.coda_page_id", + "additional_metadata.coda_row_id", + "additional_metadata.coda_table_id", + "connector_id", + "provider" + ], + "confluence": [ + "additional_metadata.confluence_attachment_id", + "additional_metadata.confluence_file_id", + "additional_metadata.confluence_media_type", + "additional_metadata.confluence_page_id", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "connector_id", + "provider" + ], + "contentful": [ + "additional_metadata.contentful_entry_id", + "additional_metadata.contentful_task_id", + "connector_id", + "provider" + ], + "copper": [ + "additional_metadata.copper_id", + "additional_metadata.copper_object", + "additional_metadata.copper_parent_id", + "connector_id", + "provider" + ], + "datadog": [ + "additional_metadata.datadog_stream", + "connector_id", + "provider" + ], + "discord": [ + "additional_metadata.discord_author_id", + "additional_metadata.discord_channel_id", + "additional_metadata.discord_message_id", + "additional_metadata.discord_message_type", + "additional_metadata.discord_server_id", + "additional_metadata.has_attachments", + "additional_metadata.pinned", + "additional_metadata.rbac_warning", + "additional_metadata.tts", + "connector_id", + "provider" + ], + "dropbox": [ + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "connector_id", + "provider" + ], + "figma": [ + "additional_metadata.figma_file_key", + "additional_metadata.figma_project_id", + "connector_id", + "provider" + ], + "fireflies": [ + "additional_metadata.calendar_id", + "additional_metadata.fireflies_id", + "additional_metadata.host_email", + "additional_metadata.meeting_link", + "additional_metadata.organizer_email", + "additional_metadata.participant_count", + "connector_id", + "provider" + ], + "freshdesk": [ + "additional_metadata.freshdesk_id", + "additional_metadata.freshdesk_ticket_id", + "additional_metadata.rbac_warning", + "connector_id", + "provider" + ], + "github": [ + "additional_metadata.github_issue_number", + "additional_metadata.github_repo", + "connector_id", + "provider" + ], + "gitlab": [ + "additional_metadata.gitlab_blob_sha", + "additional_metadata.gitlab_iid", + "additional_metadata.gitlab_note_id", + "additional_metadata.gitlab_noteable_type", + "additional_metadata.gitlab_path", + "additional_metadata.gitlab_project_id", + "additional_metadata.gitlab_project_path", + "additional_metadata.gitlab_redacted", + "additional_metadata.gitlab_ref", + "additional_metadata.gitlab_sha", + "additional_metadata.gitlab_tag_name", + "connector_id", + "provider" + ], + "gmail": [ + "additional_metadata.account_email", + "additional_metadata.gmail_label_ids", + "additional_metadata.thread_id", + "connector_id", + "provider" + ], + "gong": [ + "additional_metadata.calendar_event_id", + "additional_metadata.call_id", + "additional_metadata.call_outcome", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.crm_object_ids", + "additional_metadata.direction", + "additional_metadata.filed_by_user_id", + "additional_metadata.folder_id", + "additional_metadata.has_transcript", + "additional_metadata.host_email", + "additional_metadata.is_private", + "additional_metadata.language", + "additional_metadata.library_container_type", + "additional_metadata.media", + "additional_metadata.meeting_url", + "additional_metadata.primary_user_id", + "additional_metadata.review_method", + "additional_metadata.reviewed_email", + "additional_metadata.reviewed_user_id", + "additional_metadata.reviewer_email", + "additional_metadata.reviewer_user_id", + "additional_metadata.scope", + "additional_metadata.scorecard_id", + "additional_metadata.visibility_type", + "connector_id", + "provider" + ], + "google_calendar": [ + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "connector_id", + "provider" + ], + "google_drive": [ + "additional_metadata.acl_warning", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.folder_id", + "additional_metadata.folder_name", + "connector_id", + "provider" + ], + "google_search_console": [ + "additional_metadata.google_search_console_stream", + "connector_id", + "provider" + ], + "googleads": [ + "additional_metadata.googleads_stream", + "connector_id", + "provider" + ], + "granola": [ + "additional_metadata.container_id", + "additional_metadata.container_type", + "connector_id", + "provider" + ], + "greenhouse": [ + "additional_metadata.greenhouse_application_id", + "additional_metadata.greenhouse_candidate_id", + "additional_metadata.greenhouse_interview_id", + "additional_metadata.greenhouse_job_id", + "additional_metadata.greenhouse_offer_id", + "connector_id", + "provider" + ], + "guru": [ + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.guru_card_id", + "additional_metadata.guru_comment_id", + "additional_metadata.verification_state", + "connector_id", + "provider" + ], + "helpscout": [ + "additional_metadata.helpscout_conversation_id", + "additional_metadata.helpscout_id", + "connector_id", + "provider" + ], + "hubspot": [ + "additional_metadata.hubspot_id", + "additional_metadata.hubspot_object", + "additional_metadata.rbac_warning", + "connector_id", + "provider" + ], + "intercom": [ + "additional_metadata.intercom_article_id", + "additional_metadata.intercom_conversation_id", + "additional_metadata.intercom_open", + "additional_metadata.intercom_read", + "additional_metadata.intercom_ticket_id", + "additional_metadata.rbac_warning", + "connector_id", + "provider" + ], + "jira": [ + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.jira_comment_id", + "additional_metadata.jira_id", + "additional_metadata.jira_issue_id", + "additional_metadata.jira_issue_key", + "additional_metadata.jira_key", + "additional_metadata.jira_link_types", + "additional_metadata.jira_parent_id", + "additional_metadata.jira_self", + "additional_metadata.jira_worklog_id", + "additional_metadata.project_key", + "additional_metadata.project_name", + "additional_metadata.security_level_id", + "additional_metadata.security_level_name", + "connector_id", + "provider" + ], + "klaviyo": [ + "additional_metadata.klaviyo_id", + "connector_id", + "provider" + ], + "launchdarkly": [ + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.launchdarkly_audit_id", + "additional_metadata.launchdarkly_environment_key", + "additional_metadata.launchdarkly_flag_key", + "additional_metadata.launchdarkly_member_id", + "additional_metadata.launchdarkly_segment_key", + "additional_metadata.launchdarkly_team_key", + "connector_id", + "provider" + ], + "lever": [ + "additional_metadata.lever_application_id", + "additional_metadata.lever_candidate_id", + "additional_metadata.lever_contact_id", + "additional_metadata.lever_opportunity_id", + "additional_metadata.lever_posting_id", + "additional_metadata.lever_referral_id", + "connector_id", + "provider" + ], + "linear": [ + "additional_metadata.linear_identifier", + "additional_metadata.linear_issue_id", + "connector_id", + "provider" + ], + "loom": [ + "additional_metadata.loom_video_id", + "additional_metadata.owner_name", + "connector_id", + "provider" + ], + "mailchimp": [ + "additional_metadata.mailchimp_id", + "connector_id", + "provider" + ], + "microsoft_teams": [ + "additional_metadata.categories", + "additional_metadata.channel_membership_type", + "additional_metadata.chat_type", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.folder", + "additional_metadata.from_application", + "additional_metadata.has_attachments", + "additional_metadata.is_deleted", + "additional_metadata.is_reply", + "additional_metadata.is_sent", + "additional_metadata.mailbox_address", + "additional_metadata.mailbox_id", + "additional_metadata.rbac_warning", + "additional_metadata.team_id", + "additional_metadata.team_name", + "additional_metadata.thread_id", + "connector_id", + "provider" + ], + "mixpanel": [ + "additional_metadata.mixpanel_distinct_id", + "additional_metadata.mixpanel_event", + "additional_metadata.mixpanel_funnel_id", + "connector_id", + "provider" + ], + "monday": [ + "additional_metadata.monday_board_id", + "additional_metadata.monday_board_name", + "additional_metadata.monday_id", + "connector_id", + "provider" + ], + "notion": [ + "additional_metadata.notion_page_id", + "connector_id", + "provider" + ], + "okta": [ + "additional_metadata.okta_application_id", + "additional_metadata.okta_group_id", + "additional_metadata.okta_log_uuid", + "additional_metadata.okta_user_id", + "connector_id", + "provider" + ], + "outlook": [ + "additional_metadata.categories", + "additional_metadata.channel_membership_type", + "additional_metadata.chat_type", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.folder", + "additional_metadata.from_application", + "additional_metadata.has_attachments", + "additional_metadata.is_deleted", + "additional_metadata.is_reply", + "additional_metadata.is_sent", + "additional_metadata.mailbox_address", + "additional_metadata.mailbox_id", + "additional_metadata.rbac_warning", + "additional_metadata.team_id", + "additional_metadata.team_name", + "additional_metadata.thread_id", + "connector_id", + "provider" + ], + "pagerduty": [ + "additional_metadata.pagerduty_escalation_policy_id", + "additional_metadata.pagerduty_schedule_id", + "additional_metadata.pagerduty_service_id", + "additional_metadata.pagerduty_service_name", + "additional_metadata.pagerduty_team_ids", + "additional_metadata.pagerduty_teams", + "connector_id", + "provider" + ], + "pardot": [ + "additional_metadata.pardot_id", + "additional_metadata.pardot_object", + "connector_id", + "provider" + ], + "pipedrive": [ + "additional_metadata.active_flag", + "additional_metadata.expected_close_date", + "additional_metadata.health_status", + "additional_metadata.is_archived", + "additional_metadata.is_deleted", + "additional_metadata.is_done", + "additional_metadata.is_milestone", + "additional_metadata.pipedrive_id", + "additional_metadata.pipedrive_object", + "additional_metadata.pipedrive_parent_id", + "additional_metadata.priority", + "additional_metadata.project_status", + "additional_metadata.visible_to", + "connector_id", + "provider" + ], + "posthog": [ + "additional_metadata.posthog_stream", + "connector_id", + "provider" + ], + "quickbooks": [ + "additional_metadata.quickbooks_id", + "connector_id", + "provider" + ], + "recurly": [ + "additional_metadata.recurly_id", + "connector_id", + "provider" + ], + "sendgrid": [ + "additional_metadata.sendgrid_id", + "connector_id", + "provider" + ], + "sentry": [ + "additional_metadata.sentry_id", + "additional_metadata.sentry_short_id", + "connector_id", + "provider" + ], + "servicenow": [ + "additional_metadata.article_version", + "additional_metadata.assignee_email", + "additional_metadata.assignment_group", + "additional_metadata.author_email", + "additional_metadata.category", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.impact_code", + "additional_metadata.kb_category", + "additional_metadata.language", + "additional_metadata.number", + "additional_metadata.priority_code", + "additional_metadata.reporter_email", + "additional_metadata.servicenow_kind", + "additional_metadata.servicenow_sys_id", + "additional_metadata.servicenow_table", + "additional_metadata.state_code", + "additional_metadata.sys_class_name", + "additional_metadata.urgency_code", + "additional_metadata.workflow_state", + "connector_id", + "provider" + ], + "sharepoint": [ + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.rbac_warning", + "additional_metadata.sharepoint_drive_id", + "additional_metadata.sharepoint_item_id", + "additional_metadata.sharepoint_list_id", + "additional_metadata.sharepoint_list_item_id", + "additional_metadata.sharepoint_page_id", + "additional_metadata.sharepoint_site_id", + "connector_id", + "provider" + ], + "shortcut": [ + "additional_metadata.shortcut_id", + "additional_metadata.shortcut_kind", + "connector_id", + "provider" + ], + "slack": [ + "additional_metadata.channel_id", + "additional_metadata.channel_name", + "additional_metadata.slack_bot_id", + "additional_metadata.slack_reply_count", + "additional_metadata.slack_subtype", + "additional_metadata.slack_thread_ts", + "additional_metadata.slack_ts", + "connector_id", + "provider" + ], + "smartsheet": [ + "additional_metadata.smartsheet_sheet", + "connector_id", + "provider" + ], + "stripe": [ + "additional_metadata.stripe_id", + "connector_id", + "provider" + ], + "supabase": [], + "surveymonkey": [ + "additional_metadata.rbac_warning", + "additional_metadata.surveymonkey_id", + "additional_metadata.surveymonkey_survey_id", + "connector_id", + "provider" + ], + "twilio": [ + "additional_metadata.twilio_sid", + "connector_id", + "provider" + ], + "twitter": [ + "additional_metadata.account_handle", + "additional_metadata.author_followers", + "additional_metadata.author_handle", + "additional_metadata.author_id", + "additional_metadata.author_name", + "additional_metadata.container_id", + "additional_metadata.container_name", + "additional_metadata.container_type", + "additional_metadata.context_message_count", + "additional_metadata.conversation_id", + "additional_metadata.counterpart_handles", + "additional_metadata.hashtags", + "additional_metadata.is_group_conversation", + "additional_metadata.is_outbound", + "additional_metadata.is_quote", + "additional_metadata.is_reply", + "additional_metadata.is_retweet", + "additional_metadata.lang", + "additional_metadata.media_keys", + "additional_metadata.mentions", + "additional_metadata.message_count", + "additional_metadata.participant_ids", + "additional_metadata.participants", + "additional_metadata.referenced_post_id", + "additional_metadata.urls", + "connector_id", + "provider" + ], + "typeform": [ + "additional_metadata.typeform_browser", + "additional_metadata.typeform_form_id", + "additional_metadata.typeform_id", + "additional_metadata.typeform_platform", + "additional_metadata.typeform_response_type", + "connector_id", + "provider" + ], + "wrike": [ + "additional_metadata.wrike_comment_id", + "additional_metadata.wrike_task_id", + "connector_id", + "provider" + ], + "xero": [ + "additional_metadata.xero_id", + "connector_id", + "provider" + ], + "zendesk": [ + "additional_metadata.rbac_warning", + "additional_metadata.zendesk_id", + "additional_metadata.zendesk_ticket_id", + "connector_id", + "provider" + ], + "zoho_crm": [ + "additional_metadata.acl_warning", + "additional_metadata.zoho_crm_id", + "additional_metadata.zoho_crm_module", + "additional_metadata.zoho_crm_parent_id", + "additional_metadata.zoho_crm_parent_kind", + "additional_metadata.zoho_crm_parent_module", + "connector_id", + "provider" + ], + "zoom": [ + "additional_metadata.container_id", + "additional_metadata.container_type", + "additional_metadata.host_id", + "connector_id", + "provider" + ] + } +} diff --git a/scripts/production_providers.json b/scripts/production_providers.json new file mode 100644 index 00000000..f6a094c4 --- /dev/null +++ b/scripts/production_providers.json @@ -0,0 +1,424 @@ +{ + "providers": [ + { + "provider": "airtable", + "category": "productivity", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "asana", + "category": "project_management", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "attio", + "category": "crm", + "is_beta": true, + "acl_supported": true + }, + { + "provider": "avoma", + "category": "communications", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "bamboohr", + "category": "hr", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "bigquery", + "category": "analytics", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "bookstack", + "category": "docs", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "calendly", + "category": "scheduling", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "clickup", + "category": "project_management", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "coda", + "category": "docs", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "confluence", + "category": "docs", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "contentful", + "category": "cms", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "copper", + "category": "crm", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "datadog", + "category": "monitoring", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "discord", + "category": "messaging", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "dropbox", + "category": "storage", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "figma", + "category": "design", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "fireflies", + "category": "communications", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "freshdesk", + "category": "support", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "github", + "category": "dev_tools", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "gitlab", + "category": "dev_tools", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "gmail", + "category": "email", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "gong", + "category": "sales", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "google_calendar", + "category": "calendar", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "google_drive", + "category": "storage", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "google_search_console", + "category": "analytics", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "googleads", + "category": "marketing", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "granola", + "category": "communications", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "greenhouse", + "category": "hr", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "guru", + "category": "knowledge", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "helpscout", + "category": "support", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "hubspot", + "category": "crm", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "intercom", + "category": "support", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "jira", + "category": "project_management", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "klaviyo", + "category": "marketing", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "launchdarkly", + "category": "dev_tools", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "lever", + "category": "hr", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "linear", + "category": "project_management", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "loom", + "category": "communications", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "mailchimp", + "category": "marketing", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "microsoft_teams", + "category": "productivity", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "mixpanel", + "category": "analytics", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "monday", + "category": "project_management", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "notion", + "category": "docs", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "okta", + "category": "security", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "outlook", + "category": "productivity", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "pagerduty", + "category": "monitoring", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "pardot", + "category": "marketing", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "pipedrive", + "category": "crm", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "posthog", + "category": "analytics", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "quickbooks", + "category": "finance", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "recurly", + "category": "finance", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "sendgrid", + "category": "email", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "sentry", + "category": "dev_tools", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "servicenow", + "category": "support", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "sharepoint", + "category": "docs", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "shortcut", + "category": "project_management", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "slack", + "category": "messaging", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "smartsheet", + "category": "project_management", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "stripe", + "category": "finance", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "supabase", + "category": "dev_tools", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "surveymonkey", + "category": "forms", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "twilio", + "category": "communications", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "twitter", + "category": "social", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "typeform", + "category": "forms", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "wrike", + "category": "project_management", + "is_beta": false, + "acl_supported": false + }, + { + "provider": "xero", + "category": "finance", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "zendesk", + "category": "support", + "is_beta": false, + "acl_supported": true + }, + { + "provider": "zoho_crm", + "category": "crm", + "is_beta": true, + "acl_supported": false + }, + { + "provider": "zoom", + "category": "communications", + "is_beta": true, + "acl_supported": false + } + ] +} diff --git a/scripts/test_connector_pages.py b/scripts/test_connector_pages.py new file mode 100644 index 00000000..15c16293 --- /dev/null +++ b/scripts/test_connector_pages.py @@ -0,0 +1,591 @@ +import json +import re +import unittest + +from generate_connector_pages import COPY, DIRECTORY, LOGOS as LOGO_DIRECTORY, PLACEHOLDER_MARK, ROOT, SNAPSHOT, SCOPED_PROVIDER_EXAMPLES, PROVIDER_ORDER, artwork, load_copy, logo, mdx, pages, placeholder_logos +from generate_llms_index import page_paths + + +PRODUCTION = json.loads((ROOT / "scripts/production_providers.json").read_text())["providers"] +PRODUCTION_SLUGS = {provider["provider"].replace("_", "-") for provider in PRODUCTION} +LOGOS = ROOT / "images/connectors" +INDEX = ROOT / "essentials/v2/connector-providers.mdx" +TITLE_LOGOS = ROOT / "connector-logos.css" +DASHBOARD_NAMES = json.loads((ROOT / "scripts/dashboard_provider_names.json").read_text()) +FILTER_KEYS = json.loads((ROOT / "scripts/production_filter_keys.json").read_text())["filter_keys"] +COPY_SECTIONS = ["Permissions", "Before you connect", "Keeping in sync", "What gets synced", "How it fits into the graph", "Not synced"] +# The badge vocabulary a customer reads on every attribute. The overview defines each one; provider pages do not repeat it. +BADGES = ("Searchable text", "Query filter", "Result date", "Graph connection", "Graph identity", "Access rule", "Stored only") +GRAPH_CLASSES = ("Email", "Message", "Ticket", "Page", "Contact", "Comment", "Meeting", "Record", "Container", "Iteration") +# Wording that describes HydraDB's machinery or hedges instead of stating the outcome. Checked on pages rendered from copy files and the overview. +COPY_PAGE_TERMS = ( + "declared", "declares", "shared model", "second pass", "walks", "walked", "acl_supported", "entities", "backfill", + "depending on your deployment", "matched to messages through", "fails open", "fail-open", +) +# How a connector is built is not a customer's concern. No connector page or the overview may name it. +INTERNAL_TERMS = ( + "moveit", "classic", "native", "golang", "go-native", "python", "tap", "taps", "singer", "lance", "lancedb", + "normalizer", "normaliser", "renderer", "worker", "workers", "temporal", "kafka", "milvus", "falkordb", "turbolay", + "dynamodb", "mongodb", "engine", "engines", "appkind", "app_kind", "connector_type", "app source", "app-source", + "stream", "streams", "pipeline", "pipelines", "webhook", "webhooks", "feature flag", "environment variable", + "kill switch", "claim check", "drain", "tombstone", "tombstones", "lake", "resolver", "fetcher", "adapter", + "enricher", "linkref", +) +INTERNAL_PATTERNS = ( + r"\b[A-Z][A-Z0-9]*_[A-Z0-9_]*[A-Z0-9]\b", + r"\b[\w/-]+\.(?:go|py)\b", + r"\b(?:AppKind|AppFields|AppProvider|AppExternalID|AppRelations|AppKnowledge\w*|AppMetadata|ACLOrigin\w*)\b", +) +# Words the provider itself shows the customer, each confirmed in that provider's reviewed fact file. +PROVIDER_VOCABULARY = { + "airtable": {"LAST_MODIFIED_TIME"}, # Airtable's own formula function, named in the setup step the customer follows. + "copper": {"pipeline", "pipelines"}, # Copper's opportunity pipelines, which the customer sets up in Copper. + "datadog": {"declared"}, # Datadog's "declared incident" and its declaration time, shown on every incident. + "github": {"classic"}, # GitHub's "classic" personal access tokens, which the customer creates. + "gitlab": {"pipelines"}, # GitLab's CI/CD pipelines, named in Not synced so customers know they are left out. + "hubspot": {"pipeline", "pipelines"}, # HubSpot's deal pipeline, a field the customer sees on every deal. + "launchdarkly": {"feature flag"}, # LaunchDarkly's own name for the flags it syncs. + "mailchimp": {"classic"}, # Mailchimp's "classic automations", told apart from Customer Journeys. + "okta": {"SAML_2_0"}, # An Okta sign-on mode value, shown as Okta returns it. + "pipedrive": {"pipeline", "pipelines"}, # Pipedrive's deal pipelines, a field the customer sees on every deal. + "posthog": {"feature flag"}, # PostHog's product name for the flags it syncs. + "supabase": {"webhook", "webhooks"}, # Supabase's Database Webhooks integration, which the customer installs. +} +OLD_TEMPLATE = ( + "to bring the following content into HydraDB", "The provider description lists these indexed object types", + "does not enumerate fixed indexed object types", "## What syncs", "## Connect\n", "## Common mistakes", "## Related", + "A provider page describes indexed content", "Synced content is not automatically private to each person", + "supplies the credential fields for your deployment", "using that account's credentials where required", + "Shared destinations are allowed", +) + + +def copy_pages(): + return {path.stem: (DIRECTORY / f"{path.stem.replace('_', '-')}.mdx").read_text() for path in sorted(COPY.glob("*.json"))} + + +def body(text): + return text.split("\n---\n", 1)[1] + + +def section(text, title): + return text.split(f"\n## {title}\n", 1)[1].split("\n## ", 1)[0] + + +def title_logos(slug): + css = TITLE_LOGOS.read_text() if TITLE_LOGOS.is_file() else "" + rules = re.findall(rf'^(html(?:\.dark)?)\[data-current-path\$="/essentials/v2/connectors/{slug}"\] #page-title::before \{{[^}}]*url\("/images/connectors/([^"]+)"\)', css, re.M) + return dict(rules) + + +def page_icon(text): + match = re.search(r'^icon: "([^"]+)"$', text.split("\n---\n", 1)[0], re.M) + return match.group(1) if match else None + + +class ConnectorPagesTest(unittest.TestCase): + def test_scoped_provider_examples_are_distinct_and_match_the_guide(self): + guide = (ROOT / "essentials/v2/connectors.mdx").read_text() + rows = re.findall(r"^\| `(slack|github|linear|notion)` \| `([^`]+)` \| `([^`]+)` \|$", guide, re.M) + mapping = {provider: (first, second) for provider, first, second in rows} + self.assertEqual({"slack", "github", "linear", "notion"}, set(mapping)) + self.assertEqual(SCOPED_PROVIDER_EXAMPLES, mapping) + self.assertIn("does not derive or validate the native account identity or reject duplicate scopes", guide) + self.assertIn("Filter on `connector_id`", guide) + self.assertIn("same database and collection", guide) + for provider, pair in mapping.items(): + self.assertTrue(all(value.strip() for value in pair)) + self.assertNotEqual(pair[0], pair[1]) + text = (DIRECTORY / f"{provider}.mdx").read_text() + with self.subTest(provider=provider): + self.assertIn("`provider_account_scope`", text) + for value in pair: + self.assertIn(f"`{value}`", text) + self.assertIn("labels you choose", text) + self.assertIn("own account ids", text) + + def test_all_provider_pages_keep_one_account_per_connector_and_human_enforcement(self): + paths = list(DIRECTORY.glob("*.mdx")) + self.assertEqual(len(PRODUCTION), len(paths)) + for path in paths: + text = path.read_text() + with self.subTest(provider=path.stem): + self.assertRegex(text, r"\nOne (connector|token) (reads|covers) ") + self.assertIn("API-key requests must omit `enforce_acl`", text) + self.assertIn("including `false`", text) + self.assertNotRegex(text, r"(?i)(?:multiple|several|two) accounts per connector") + self.assertNotIn("With acl_supported on for the provider", text) + + def test_copy_text_is_safe_mdx_outside_inline_code(self): + self.assertEqual("Use <client_id> or ``", mdx("Use or ``")) + self.assertEqual('{"table": "a.b"} and `{"table": "a.b"}`', mdx('{"table": "a.b"} and `{"table": "a.b"}`')) + + def test_provider_pages_match_the_source_snapshot(self): + generated = pages() + for path, content in generated.items(): + with self.subTest(page=str(path.relative_to(ROOT))): + self.assertEqual(content, path.read_text()) + self.assertEqual(set(DIRECTORY.glob("*.mdx")), {path for path in generated if path.parent == DIRECTORY}) + + def test_every_provider_page_is_registered_and_linked_from_the_catalog(self): + config = json.loads((ROOT / "docs.json").read_text()) + registered = page_paths(config["navigation"]["versions"][0]) + index = (ROOT / "essentials/v2/connector-providers.mdx").read_text() + for path in DIRECTORY.glob("*.mdx"): + slug = str(path.relative_to(ROOT).with_suffix("")) + self.assertIn(slug, registered) + self.assertIn(f'href="/{slug}"', index) + self.assertIn("/essentials/v2/connector-providers", (ROOT / "essentials/v2/connectors.mdx").read_text()) + + def test_snapshot_records_source_commits_and_preserves_unknown_object_types(self): + snapshot = json.loads(SNAPSHOT.read_text()) + provenance = snapshot["provenance"] + self.assertTrue(provenance["application"]["commit"].startswith("d76958b5")) + self.assertTrue(provenance["dashboard"]["commit"].startswith("f611226e")) + self.assertRegex(provenance["export_sha256"], r"^[a-f0-9]{64}$") + providers = {provider["provider"]: provider for provider in snapshot["providers"]} + self.assertEqual(98, len(providers)) + for identifier in ("airtable", "bigquery", "smartsheet", "supabase"): + self.assertEqual([], providers[identifier]["indexed_object_types"]) + self.assertNotIn("zoho", providers) + self.assertNotIn("googleanalytics", providers) + self.assertEqual("Zoho CRM", providers["zoho-crm"]["name"]) + self.assertEqual("Google Analytics", providers["ga4"]["name"]) + self.assertIn("no history backfill", providers["supabase"]["summary"].lower()) + + def test_every_production_provider_renders_from_its_copy_file(self): + for row in PRODUCTION: + with self.subTest(provider=row["provider"]): + copy = load_copy(row["provider"]) + text = (DIRECTORY / f"{row['provider'].replace('_', '-')}.mdx").read_text() + self.assertIn(f"description: {json.dumps(copy['description'])}\n", text) + self.assertEqual({row["provider"] for row in PRODUCTION}, {path.stem for path in COPY.glob("*.json")}) + + def test_a_provider_without_a_copy_file_stops_the_run(self): + with self.assertRaisesRegex(ValueError, r"zz_missing_probe\.json: every production provider needs a copy file"): + load_copy("zz_missing_probe") + + def test_pages_exist_exactly_for_the_production_providers(self): + self.assertEqual(70, len(PRODUCTION_SLUGS)) + self.assertEqual(PRODUCTION_SLUGS, {path.stem for path in DIRECTORY.glob("*.mdx")}) + snapshot = {provider["provider"].replace("_", "-") for provider in json.loads(SNAPSHOT.read_text())["providers"]} + self.assertLessEqual(PRODUCTION_SLUGS, snapshot) + + def test_every_logo_is_shown_and_every_shown_logo_exists(self): + files = {path.name for path in LOGOS.glob("*.svg")} + index = INDEX.read_text() + shown = set() + for slug in PRODUCTION_SLUGS: + pair = {f"{slug}-light.svg", f"{slug}-dark.svg"} + expected = sorted(pair) if pair <= files else [f"{slug}.svg"] + page = (DIRECTORY / f"{slug}.mdx").read_text() + card = re.search(rf'', index) + with self.subTest(provider=slug): + self.assertIsNotNone(card) + card_images = sorted(re.findall(r'/images/connectors/([^"]+)"', card.group(1))) + self.assertEqual(expected, card_images) + self.assertEqual(f"/images/connectors/{slug}-light.svg" if len(expected) == 2 else expected and f"/images/connectors/{expected[0]}" or None, page_icon(page)) + logos = title_logos(slug) + if len(expected) == 2: + self.assertEqual({"html": f"{slug}-light.svg", "html.dark": f"{slug}-dark.svg"}, logos) + else: + self.assertEqual({"html": expected[0]} if expected else {}, logos) + shown.update(expected) + self.assertEqual(files, shown) + + def test_no_page_body_shows_a_standalone_logo(self): + for slug in PRODUCTION_SLUGS: + with self.subTest(provider=slug): + self.assertNotIn("') + + def test_monochrome_marks_change_only_their_ink_between_themes(self): + pairs = sorted(path.name[: -len("-light.svg")] for path in LOGOS.glob("*-light.svg")) + placeholders = ["copper", "klaviyo", "lever", "pardot", "recurly"] + self.assertEqual(sorted(["attio", "datadog", "github", "gong", "guru", "launchdarkly", "notion", "pipedrive", "sentry", "smartsheet", "twitter", "typeform", "zendesk", *placeholders]), pairs) + for slug in pairs: + light, dark = ((LOGOS / f"{slug}-{theme}.svg").read_text() for theme in ("light", "dark")) + inks = lambda text: set(re.findall(r'(?:fill|stroke)="(#[0-9a-fA-F]+)"', text)) + with self.subTest(provider=slug): + self.assertEqual({"#363636"}, inks(light)) + self.assertEqual({"#cccccc"}, inks(dark)) + self.assertEqual(light.replace("#363636", "#cccccc"), dark) + self.assertFalse((LOGOS / f"{slug}.svg").exists()) + + def test_logos_sit_on_the_dashboard_tile_in_both_themes(self): + css = (ROOT / "style.css").read_text() + self.assertRegex(css, r'\nimg\[src\*="/images/connectors/"\]\s*\{[^}]*background-color:\s*rgba\(0, 0, 0, 0\.04\)') + self.assertRegex(css, r'\.dark img\[src\*="/images/connectors/"\]\s*\{[^}]*background-color:\s*rgba\(255, 255, 255, 0\.05\)') + self.assertRegex(css, r'\.dark img\[src\*="/images/connectors/"\]\[src\*="-light\.svg"\]\s*\{[^}]*background-color:\s*rgba\(255, 255, 255, 0\.88\)') + + def test_navigation_groups_connectors_into_collapsed_categories(self): + config = json.loads((ROOT / "docs.json").read_text()) + registered = {page for page in page_paths(config["navigation"]["versions"][0]) if page.startswith("essentials/v2/connectors/")} + self.assertEqual(PRODUCTION_SLUGS, {page.rsplit("/", 1)[1] for page in registered}) + for page in registered: + self.assertTrue((ROOT / f"{page}.mdx").is_file(), page) + group = next(item for item in config["navigation"]["versions"][0]["tabs"][0]["groups"] if item["group"] == "Connector catalog") + self.assertEqual("essentials/v2/connector-providers", group["pages"][0]) + categories = group["pages"][1:] + self.assertEqual(8, len(categories)) + index = INDEX.read_text() + for category in categories: + with self.subTest(category=category["group"]): + self.assertNotIn("expanded", category) + self.assertTrue(all(isinstance(page, str) for page in category["pages"])) + slugs = [page.rsplit("/", 1)[1] for page in category["pages"]] + self.assertEqual([name.replace("_", "-") for name in PROVIDER_ORDER[category["group"]]], slugs) + section = index.split(f"## {category['group']}\n", 1)[1].split("\n## ", 1)[0] + self.assertEqual([f"/{page}" for page in category["pages"]], re.findall(r'href="([^"]+)"', section)) + self.assertEqual(len(PRODUCTION_SLUGS), sum(len(category["pages"]) for category in categories)) + + def test_each_group_opens_with_the_tools_companies_run_most(self): + self.assertEqual(["slack", "gmail", "outlook", "microsoft_teams", "discord", "sendgrid", "twilio"], PROVIDER_ORDER["Messaging & email"][:7]) + self.assertEqual(["jira", "linear", "asana", "clickup", "monday", "smartsheet"], PROVIDER_ORDER["Tickets & project management"][:6]) + self.assertEqual(["confluence", "notion", "google_drive", "dropbox", "sharepoint", "bookstack"], PROVIDER_ORDER["Docs & cloud storage"][:6]) + + +class PageOpeningAndOrderTest(unittest.TestCase): + def test_no_page_opens_with_filler(self): + for path in sorted(DIRECTORY.glob("*.mdx")): + text = body(path.read_text()) + with self.subTest(page=path.stem): + for phrase in ("connector to bring", "the following content", "provider description lists"): + self.assertNotIn(phrase, text) + self.assertNotRegex(text, r"Use the [^.\n]* connector to") + self.assertRegex(text, r"^\n*\S", "no blank gap under the title block") + self.assertNotRegex(text, r"(?im)^(this section|the following|below are)") + + def test_groups_follow_the_order_customers_connect_most(self): + order = ["Messaging & email", "Tickets & project management", "Docs & cloud storage", "Meetings & calendar", "Engineering", "Marketing & analytics", "HR & finance", "CRM & support"] + config = json.loads((ROOT / "docs.json").read_text()) + group = next(item for item in config["navigation"]["versions"][0]["tabs"][0]["groups"] if item["group"] == "Connector catalog") + self.assertEqual(order, [category["group"] for category in group["pages"][1:]]) + self.assertEqual(order, [title for title in re.findall(r"^## (.+)$", INDEX.read_text(), re.M) if title in order]) + + +class PlaceholderLogoTest(unittest.TestCase): + def test_every_production_provider_has_a_logo_file(self): + for row in PRODUCTION: + found = logo(row["provider"]) + with self.subTest(provider=row["provider"]): + for path in filter(None, found): + self.assertTrue((ROOT / path.lstrip("/")).is_file(), path) + text = (DIRECTORY / f"{row['provider'].replace('_', '-')}.mdx").read_text() + self.assertIn(f'icon: "{found.light}"', text) + self.assertIn(f'url("{found.light}")', TITLE_LOGOS.read_text()) + self.assertIn(found.light, INDEX.read_text()) + + def test_placeholders_are_neutral_monograms_for_providers_without_artwork(self): + names = DASHBOARD_NAMES["names"] + placeholder_files = {path.name for path in LOGO_DIRECTORY.glob("*.svg") if PLACEHOLDER_MARK in path.read_text()} + missing = sorted(row["provider"] for row in PRODUCTION if artwork(row["provider"]) is None) + self.assertEqual(["copper", "klaviyo", "lever", "pardot", "recurly"], missing) + self.assertEqual({f"{slug}-{theme}.svg" for slug in missing for theme in ("light", "dark")}, placeholder_files) + for provider in missing: + light = (LOGO_DIRECTORY / f"{provider}-light.svg").read_text() + with self.subTest(provider=provider): + self.assertEqual([names[provider][0].upper()], re.findall(r">([^<]+)", light)) + self.assertNotRegex(light, r"') + try: + self.assertEqual({}, placeholder_logos(providers)) + self.assertEqual("/images/connectors/copper.svg", logo("copper").light) + generated = pages() + self.assertNotIn(LOGO_DIRECTORY / "copper-light.svg", generated) + self.assertIn('url("/images/connectors/copper.svg")', generated[TITLE_LOGOS]) + finally: + real.unlink() + + +class ConnectorCopyPagesTest(unittest.TestCase): + def test_every_provider_has_a_valid_copy_file(self): + for row in PRODUCTION: + with self.subTest(provider=row["provider"]): + for document in load_copy(row["provider"])["documents"]: + self.assertTrue(document["attributes"], document["name"]) + + def test_a_copy_file_missing_a_section_or_label_is_rejected(self): + broken = json.loads((COPY / "slack.json").read_text()) + del broken["not_synced"] + broken["documents"][0]["attributes"][0]["uses"] = ["Indexed"] + broken["connect"]["credentials"][0]["type"] = "integer" + broken["sync"]["scheduled"] = "no" + path = COPY / "zz_broken_copy_probe.json" + path.write_text(json.dumps(broken)) + try: + with self.assertRaisesRegex(ValueError, r"missing not_synced.*: type integer.*sync.scheduled must be true or false.*uses \['Indexed'\]"): + load_copy("zz_broken_copy_probe") + finally: + path.unlink() + + def test_copy_pages_have_every_section_in_order(self): + pages_by_provider = copy_pages() + self.assertEqual({row["provider"] for row in PRODUCTION}, set(pages_by_provider)) + for provider, text in pages_by_provider.items(): + with self.subTest(provider=provider): + self.assertEqual(COPY_SECTIONS, re.findall(r"^## (.+)$", text, re.M)) + intro = body(text).split("\n## ", 1)[0].strip() + self.assertTrue(intro, "the page opens with what the connector brings in") + + def test_no_page_names_how_a_connector_is_built(self): + pages_to_check = {path.stem: body(path.read_text()) for path in DIRECTORY.glob("*.mdx")} + pages_to_check["connector-providers"] = body(INDEX.read_text()) + for page, text in sorted(pages_to_check.items()): + allowed = PROVIDER_VOCABULARY.get(page.replace("-", "_"), set()) + prose_only = re.sub(r"\]\([^)]*\)", "]", text) + with self.subTest(page=page): + found = [term for term in INTERNAL_TERMS if term not in allowed and re.search(rf"(?i)(?\n(.*?)\n', section(text, "What gets synced"), re.S) + with self.subTest(provider=provider): + self.assertTrue(fields) + for name, kind, description in fields: + uses = kind.split(", ") + self.assertTrue(kind, name) + self.assertLessEqual(set(uses), set(BADGES), name) + self.assertEqual([badge for badge in BADGES if badge in uses], uses, f"{name}: badges in legend order") + if "Stored only" in uses: + self.assertEqual(["Stored only"], uses, name) + elif "Searchable text" not in uses: + self.assertIn("not searchable", description.lower(), f"{name} has no search use, so it must say so") + + def test_permissions_section_matches_production(self): + acl = {row["provider"]: row["acl_supported"] for row in PRODUCTION} + for provider, text in copy_pages().items(): + permissions = section(text, "Permissions") + with self.subTest(provider=provider): + carries = permissions.lstrip().startswith("Turn on **Enforce ACL** for this connector") + self.assertEqual(acl[provider], carries) + if not acl[provider]: + self.assertIn("Every synced item is visible to everyone who can query the collection", permissions) + self.assertIn("/essentials/v2/connectors#set-your-own-rule-on-a-resource", permissions) + + def test_copy_pages_keep_nothing_from_the_old_template(self): + for provider, text in copy_pages().items(): + with self.subTest(provider=provider): + for sentence in OLD_TEMPLATE: + self.assertNotIn(sentence, text) + + def test_overview_explains_how_to_read_a_page(self): + index = INDEX.read_text() + self.assertIn("## How to read a connector page", index) + self.assertGreater(index.index("## How to read a connector page"), index.rindex("")) + opening = index.split("---", 2)[2].split("## ", 1)[0] + self.assertIn("](/essentials/v2/connectors)", opening) + self.assertEqual(1, len([line for line in opening.splitlines() if line.strip()]), "the catalog starts right under one line") + self.assertIn("#6-connect-several-accounts-from-one-provider", index.split("## Related", 1)[1]) + + +class ConnectorGraphLinksMergeTest(unittest.TestCase): + def test_sentry_copy_and_page_keep_project_team_links_and_limits(self): + copy = load_copy("sentry") + for text in (json.dumps(copy), (DIRECTORY / "sentry.mdx").read_text()): + with self.subTest(source="copy" if text.startswith("{") else "page"): + self.assertIn("Issues link to their project through `part_of`", text) + self.assertIn("assigned to a team, to that team through `related_to`", text) + self.assertIn("Projects link to each owning team through `part_of`", text) + self.assertIn("Sentry's project and team IDs, not display names", text) + self.assertIn("target is indexed in the same database and collection", text) + self.assertIn("An event's numeric group ID does not identify the issue's short ID", text) + self.assertIn("a user ID is distinct from an organization member ID", text) + self.assertNotIn("an issue is not linked to its project", text) + + def test_klaviyo_copy_and_page_keep_audience_configuration_links(self): + copy = load_copy("klaviyo") + for text in (json.dumps(copy), (DIRECTORY / "klaviyo.mdx").read_text()): + with self.subTest(source="copy" if text.startswith("{") else "page"): + self.assertIn("included and excluded list or segment audiences through `targets` and `excludes`, respectively", text) + self.assertIn("audience configuration, not message delivery", text) + self.assertIn("Segments link to lists or segments referenced in their definitions through `related_to`", text) + self.assertIn("a reference in a negative rule does not assert positive membership", text) + self.assertIn("profiles are not linked to their lists or segments", text) + self.assertNotIn("records are not linked to each other", text) + + +class RevisedPageDesignTest(unittest.TestCase): + def test_permissions_come_first_and_setup_has_real_subheadings(self): + for provider, text in copy_pages().items(): + connect = section(text, "Before you connect") + with self.subTest(provider=provider): + self.assertEqual(COPY_SECTIONS, re.findall(r"^## (.+)$", text, re.M)) + self.assertEqual(["Credentials", "Set it up"], re.findall(r"^### (.+)$", connect, re.M)) + + def test_provider_pages_leave_the_label_legend_to_the_overview(self): + legend = ("part of the text a query matches", "What the labels mean", "kept on the item and shown when you inspect it") + for provider, text in copy_pages().items(): + with self.subTest(provider=provider): + for phrase in legend: + self.assertNotIn(phrase, text) + + def test_no_good_to_know_and_at_most_three_example_searches(self): + for provider, text in copy_pages().items(): + with self.subTest(provider=provider): + self.assertNotIn("## Good to know", text) + self.assertNotIn("## Questions this lets you answer", text) + if "**Example searches**" in text: + examples = text.split("**Example searches**\n\n", 1)[1].split("\n\n", 1)[0] + self.assertLessEqual(len(examples.splitlines()), 3) + + def test_not_synced_stays_visible_and_accordions_hold_only_stored_or_optional_detail(self): + for provider, text in copy_pages().items(): + with self.subTest(provider=provider): + self.assertNotIn("(.*?)', text, re.S): + self.assertNotIn("not kept", title.lower()) + kinds = set(re.findall(r'")) + self.assertIn("**Enforce ACL** is unavailable for this connector", permissions.split("", 1)[0]) + + def test_the_hourly_schedule_shows_only_for_scheduled_connectors(self): + hourly = "HydraDB syncs every hour by default" + for provider, text in copy_pages().items(): + with self.subTest(provider=provider): + self.assertEqual(load_copy(provider)["sync"].get("scheduled", True), hourly in section(text, "Keeping in sync")) + self.assertNotIn(hourly, (DIRECTORY / "supabase.mdx").read_text()) + + def test_numeric_settings_use_the_number_type(self): + for provider, text in copy_pages().items(): + with self.subTest(provider=provider): + self.assertNotIn("A whole number", text) + self.assertIn('', (DIRECTORY / "twitter.mdx").read_text()) + + def test_graph_section_names_each_item_class_without_generic_promises(self): + for provider, text in copy_pages().items(): + graph = section(text, "How it fits into the graph") + documents = re.findall(r"^### (.+)$", section(text, "What gets synced"), re.M) + with self.subTest(provider=provider): + for document in documents: + if document.startswith("On every "): + continue + self.assertRegex(graph, rf"(?m)^- {re.escape(document)} use the ({'|'.join(GRAPH_CLASSES)}) class\.$") + self.assertNotIn("kept with its author and its thread", graph) + self.assertNotIn("There is no per-connector setup", graph) + + def test_overview_collapses_the_labels_and_graph_classes_below_the_grid(self): + index = INDEX.read_text() + end = index.split("")[-1] + labels = end.split("### Attribute labels", 1)[1].split("### Graph classes", 1)[0] + classes = end.split("### Graph classes", 1)[1].split("## Related", 1)[0] + for part in (labels, classes): + self.assertEqual(1, part.count("")) + for badge in BADGES: + self.assertIn(f"- **{badge}:** ", labels.split(" resources, or None before configure. + self.discovered = [["C1", "C2"], ["C3"]] # Two pages, so pagination is exercised. + self.connector_status = ("active", "healthy") + self.failing = set() # Resource IDs whose last sync failed. + self.retryable = True # Whether waiting can fix those failures. + self.quiet = "ok" # Status of the resources that did not fail. + self.acl_warnings = {} # resource_id -> why its permissions could not be read. + self.page_acl_warnings = {} self.status = "completed" self.calls = [] for owner, name, handler in [ @@ -105,6 +111,11 @@ def __init__(self, test, client): (client.connectors, "create", self.connector_create), (client.connectors, "discover", self.connector_discover), (client.connectors, "configure", self.connector_configure), + (client.connectors, "status", self.connector_status_call), + (client.connectors, "list", self.connector_list), + (client, "list_providers", self.provider_catalog), + (client.connectors, "list_resources", self.connector_resources), + (client.connectors, "update_resource_acl", self.connector_update_resource), ]: label = name if owner is client else f"{type(owner).__name__}.{name}" setattr(owner, name, self.checked(label, getattr(owner, name), handler)) @@ -131,32 +142,121 @@ def create(self, database, database_metadata_schema=None): def database_status(self, database): return sdk.HandlerEnvelopeTenantsInfraStatusResponseV2( data=sdk.TenantsInfraStatusResponseV2( + database=database, infra=sdk.TenantsInfraV2(ready_for_ingestion=True) ) ) - def connector_create(self, **kwargs): - self.test.assertNotIn("enforce_acl", kwargs) # Needs a dashboard session. - return sdk.HandlerConnectorCreateResponse(connector_id="conn_1") + # Providers that copy the app's permissions onto each source, per + # "What each provider captures" in essentials/v2/connectors.mdx. + CAPTURES_ACL = {"slack", "google_drive", "github", "confluence", "jira"} - def connector_discover(self, id): - return sdk.HandlerDiscoverResponseBody(resources=[ - sdk.HandlerDiscoveredResourceDto(id="C1", resource_type="channel", name="general") + def connector_create(self, provider, name, database, collection, credentials, + provider_account_scope=None): + self.test.assertTrue(credentials and all(credentials.values()), "credentials must not be empty") + if provider in {"slack", "github", "linear", "notion"}: + self.test.assertTrue(provider_account_scope, f"{provider} needs provider_account_scope") + else: + self.test.assertIsNone(provider_account_scope, f"{provider} has no account scope") + self.test.assertNotIn(name, [c.name for c in self.connectors if c.database == database], + "one connector per account") + connector_id = f"conn_{len(self.connectors) + 1}" + self.connectors.append(sdk.HandlerConnectorApiView( + connector_id=connector_id, provider=provider, name=name, database=database, + collection=collection, provider_account_scope=provider_account_scope, + lifecycle="pending_setup", + )) + self.configured[connector_id] = None + self.collections.add(collection) + self.restricted.add(collection) + return sdk.HandlerConnectorCreateResponse(connector_id=connector_id) + + def provider_catalog(self, id=None): + self.test.assertIsNone(id, "the catalog, not one provider, reports acl_supported") + return sdk.HandlerProviderListResponse(providers=[ + sdk.HandlerCatalogConnector.model_validate( + {"provider": p, "acl_supported": p in self.CAPTURES_ACL}) + for p in sorted(self.CAPTURES_ACL | {"gmail", "notion"}) ]) - def connector_configure(self, id, resources): + def connector_list(self, provider=None): + return sdk.HandlerConnectorListResponse( + connectors=[c for c in self.connectors if provider in (None, c.provider)] + ) + + def connector(self, connector_id): + found = [c for c in self.connectors if c.connector_id == connector_id] + self.test.assertTrue(found, f"unknown connector {connector_id}") + return found[0] + + def connector_status_call(self, id): + self.connector(id) + if self.configured[id] is None: + return sdk.HandlerConnectorStatusResponse( + connector_id=id, lifecycle="pending_setup", status="degraded") + lifecycle, status = self.connector_status + return sdk.HandlerConnectorStatusResponse( + connector_id=id, lifecycle=lifecycle, status=status, + resources=[ + sdk.HandlerConnectorResourceStatus( + resource_id=r["resource_id"], display_name=r["name"], + status="failed" if r["resource_id"] in self.failing else self.quiet, + message="permission denied" if r["resource_id"] in self.failing else None, + retryable=self.retryable if r["resource_id"] in self.failing else None, + acl_warning=self.acl_warnings.get(r["resource_id"]), + page_acl_warning=self.page_acl_warnings.get(r["resource_id"])) + for r in self.configured[id] + ]) + + def connector_resources(self, id): + self.connector(id) + return sdk.HandlerConnectorResourcesResponse(resources=[ + sdk.ConnectorsResource(connector_id=id, resource_id=r["resource_id"], acl=r.get("acl")) + for r in self.configured[id] or [] + ]) + + def connector_update_resource(self, id, resource_id, request): + self.test.assertLessEqual(set(request), {"acl", "custom_instructions"}) + found = [r for r in self.configured[id] if r["resource_id"] == resource_id] + self.test.assertTrue(found, f"unknown resource {resource_id}") + self.test.assertIsInstance(request.get("acl", []), list) + found[0].update(request) + return {"connector_id": id, "resource_id": resource_id, **request} + + def connector_discover(self, id, cursor=None, limit=None): + connector = self.connector(id) + self.test.assertLessEqual(limit or 100, 100) + pages = self.discovered + index = 0 if cursor is None else int(cursor) + return sdk.HandlerDiscoverResponseBody( + provider=connector.provider, + resources=[sdk.HandlerDiscoveredResourceDto(id=r, resource_type="channel", name=r.lower()) + for r in pages[index]], + has_more=index + 1 < len(pages), + next_cursor=str(index + 1) if index + 1 < len(pages) else None, + ) + + def connector_configure(self, id, resources, lookback_days=None): + test = self.test + connector = self.connector(id) + test.assertTrue(resources, "configure rejects an empty resources list") + wanted = {r for page in self.discovered for r in page} + test.assertEqual(wanted, {r["resource_id"] for r in resources}, "configure every discovered resource") for resource in resources: sdk.HandlerResourceMapping(**resource) - self.test.assertLessEqual(set(resource), {"resource_id", "resource_type", "name"}) - return sdk.HandlerConfigureResponse() + test.assertLessEqual(set(resource), {"resource_id", "resource_type", "name", "acl"}) + if connector.provider not in self.CAPTURES_ACL: + test.assertIsNotNone(resource.get("acl"), + f"{connector.provider} captures no permissions: set acl on its resources") + self.configured[id] = resources + return sdk.HandlerConfigureResponse(connector_id=id) def ingest(self, type, database, collection, documents=None, document_metadata=None, - app_knowledge=None, memories=None): + memories=None): # No app_knowledge: app content comes through connectors. test = self.test self.collections.add(collection) ids = [] if type == "memory": - test.assertIsNone(app_knowledge) for item in json.loads(memories): test.assertLessEqual(set(item), MEMORY_KEYS) test.assertEqual(1, ("text" in item) + ("user_assistant_pairs" in item)) @@ -171,20 +271,10 @@ def ingest(self, type, database, collection, documents=None, document_metadata=N test.assertEqual(len(documents), len(items)) for (filename, handle, content_type), item in zip(documents, items): test.assertLessEqual(set(item), DOCUMENT_METADATA_KEYS) + test.assertLessEqual(set(item.get("metadata", {})), self.declared) test.assertIn(Path(filename).suffix, UPLOAD_EXTENSIONS, filename) test.assertTrue(handle.read(), f"{filename} is empty") ids.append(item["id"]) - for item in json.loads(app_knowledge or "[]"): - test.assertLessEqual(set(item), APP_SOURCE_KEYS) - test.assertIn(item["kind"], KINDS) - test.assertEqual(item["kind"], item["fields"]["kind"]) - test.assertLessEqual( - set(item["fields"]) - {"kind"}, KIND_FIELDS[item["kind"]], item["id"] - ) - test.assertLessEqual(set(item.get("metadata", {})), self.declared) - if item.get("acl"): - self.restricted.add(collection) - ids.append(item["id"]) test.assertTrue(ids) test.assertTrue(all(re.fullmatch(r"[^,\s]+", i) for i in ids), ids) return sdk.HandlerEnvelopeIngestionV2IngestResponse( @@ -220,9 +310,11 @@ def query(self, **kwargs): test.assertEqual(1, len(value)) test.assertLessEqual(set(value), OPERATORS) if self.restricted & set(scopes): - test.assertIn("acl", kwargs, "a query over restricted sources must send the caller's acl") + test.assertIn("acl", kwargs, "a query over connector-synced sources must send the caller's acl") if "acl" in kwargs: - test.assertTrue(kwargs["acl"] and all(isinstance(p, str) for p in kwargs["acl"])) + test.assertTrue(kwargs["acl"]) + for principal in kwargs["acl"]: + test.assertRegex(principal, r"^(?:[^@\s]+@[^@\s]+\.\w+|domain:\S+|group:\S+:\S+)$") # Public fields only: `sources` and other internal fields stay unset, # as .github/verify_v2_public_contract.py requires of the public result. chunk = sdk.SearchV2Chunk( @@ -267,18 +359,39 @@ def test_cursor_search_preserves_graph_linked_context_and_file_paths(self): "additional_metadata": {"path": "src/auth.py"}, "path": "src/auth.py", }], "graph_context": {"query_paths": [{"combined_context": "Router calls validate_token."}]}, - "additional_context": {"policy": { + "additional_graph_context": {"policy": { "id": "policy", "chunk_content": "Service tokens require the admin scope.", }}, }, context) + canonical = {"canonical_policy": {"id": "canonical_policy", "chunk_content": "Use MFA."}} + result = NS(data=NS(json=lambda **kwargs: json.dumps({ + "chunks": [], "graph_context": {}, + "additional_graph_context": canonical, + "additional_context": {"legacy_policy": {"id": "legacy_policy"}}, + }))) + context = json.loads(scope["search_code"]("How is authentication enforced?")) + self.assertEqual(canonical, context["additional_graph_context"]) + + @staticmethod + def optional_credentials(source): + """Environment variables for providers a cookbook connects only when they are set.""" + names = re.findall(r'for provider in \(([^)]*)\)', source) + providers = re.findall(r'"(\w+)"', " ".join(names)) + variables = {} + for p in providers: + variables[f"{p.upper()}_CREDENTIALS"] = '{"api_token": "test"}' + variables[f"{p.upper()}_SITE"] = f"acme-{p}.example.com" + return variables + def run_cookbook(self, path): setup = python_blocks(SETUP)["hydra.py"] files = python_blocks(path) self.assertTrue(files, f"{path.name} has no labelled Python blocks") with tempfile.TemporaryDirectory() as directory, mock.patch.dict( - os.environ, {"HYDRADB_API_KEY": "test", "OPENAI_API_KEY": "test"} - ), mock.patch.dict(sys.modules, {"openai": fake_openai()}), mock.patch("time.sleep"), \ + os.environ, {"HYDRADB_API_KEY": "test", "OPENAI_API_KEY": "test", **APP_CREDENTIALS, + **self.optional_credentials(path.read_text())} + ), mock.patch.dict(sys.modules, {"openai": fake_openai()}), bounded_sleep(), \ mock.patch("builtins.print"): previous = os.getcwd() os.chdir(directory) @@ -301,10 +414,266 @@ def test_every_cookbook_runs_against_the_sdk_signatures(self): for path in COOKBOOKS: with self.subTest(cookbook=path.name): stubs = self.run_cookbook(path) - for step in ("DatabasesClient.create", "DatabasesClient.status", - "ContextClient.ingest", "ContextClient.status", "query"): + steps = ["DatabasesClient.create", "DatabasesClient.status", "query"] + if path.stem in CONNECTOR_COOKBOOKS: + steps += ["ConnectorsClient.list", "ConnectorsClient.create", "ConnectorsClient.discover", + "ConnectorsClient.configure", "ConnectorsClient.status"] + else: + steps += ["ContextClient.ingest", "ContextClient.status"] + self.assertNotIn("ConnectorsClient.create", stubs.calls) + for step in steps: self.assertIn(step, stubs.calls) + def test_connect_reuses_only_the_same_account(self): + hydra, stubs = self.load_setup() + token = {"access_token": "x"} + with bounded_sleep(): + first = hydra.connect("slack", "T1", "db", "docs", token) + again = hydra.connect("slack", "T1", "db", "docs", token) + workspace = hydra.connect("slack", "T2", "db", "docs", token) + collection = hydra.connect("slack", "T1", "db", "other", token) + self.assertEqual(first, again) + self.assertEqual(3, len({first, workspace, collection})) + self.assertEqual(3, stubs.calls.count("ConnectorsClient.create")) + self.assertEqual(3, stubs.calls.count("ConnectorsClient.configure")) + self.assertEqual({"T1", "T2"}, {c.provider_account_scope for c in stubs.connectors}) + + def test_connect_gives_each_mailbox_its_own_connector(self): + hydra, stubs = self.load_setup() + with bounded_sleep(): + work = hydra.connect("gmail", "maya@acme.com", "db", "docs", {"refresh_token": "a"}, + acl=["maya@acme.com"]) + home = hydra.connect("gmail", "maya@home.org", "db", "docs", {"refresh_token": "b"}, + acl=["maya@acme.com"]) + self.assertNotEqual(work, home) + self.assertEqual(2, stubs.calls.count("ConnectorsClient.create")) + self.assertEqual(2, stubs.calls.count("ConnectorsClient.configure")) + + def test_connect_keeps_ambiguous_collection_account_pairs_separate(self): + for provider, credential in (("gmail", "refresh_token"), ("slack", "access_token")): + with self.subTest(provider=provider): + hydra, stubs = self.load_setup() + first_args = (provider, "carol@example.com", "db", "alice-bob", {credential: "first"}) + second_args = (provider, "bob-carol@example.com", "db", "alice", {credential: "second"}) + with bounded_sleep(): + first = hydra.connect(*first_args, acl=["carol@example.com"]) + original = copy.deepcopy(stubs.configured[first]) + second = hydra.connect(*second_args, acl=["bob-carol@example.com"]) + self.assertEqual(original, stubs.configured[first], "the second account changed the first account's resources or ACLs") + self.assertNotEqual(first, second) + self.assertEqual(first, hydra.connect(*first_args, acl=["carol@example.com"])) + self.assertEqual(second, hydra.connect(*second_args, acl=["bob-carol@example.com"])) + self.assertEqual(2, stubs.calls.count("ConnectorsClient.create")) + self.assertEqual(2, stubs.calls.count("ConnectorsClient.configure")) + self.assertNotEqual(stubs.connector(first).name, stubs.connector(second).name) + if provider == "gmail": + stubs.connectors = [connector.model_copy(update={"provider_account_scope": ""}) + for connector in stubs.connectors] + with bounded_sleep(): + self.assertEqual(first, hydra.connect(*first_args, acl=["carol@example.com"])) + self.assertEqual(second, hydra.connect(*second_args, acl=["bob-carol@example.com"])) + self.assertEqual(2, stubs.calls.count("ConnectorsClient.create")) + for connector_id, args, acl in ((first, first_args, ["carol@example.com"]), + (second, second_args, ["bob-carol@example.com"])): + connector = stubs.connector(connector_id) + self.assertEqual((args[0], args[2], args[3]), + (connector.provider, connector.database, connector.collection)) + self.assertEqual(args[1] if provider == "slack" else "", connector.provider_account_scope) + self.assertTrue(all(resource["acl"] == acl for resource in stubs.configured[connector_id])) + + def test_connect_name_includes_the_database_identity(self): + hydra, stubs = self.load_setup() + with bounded_sleep(): + first = hydra.connect("slack", "caller-chosen-account", "db-a", "docs", {"access_token": "x"}) + second = hydra.connect("slack", "caller-chosen-account", "db-b", "docs", {"access_token": "x"}) + self.assertNotEqual(first, second) + self.assertNotEqual(stubs.connector(first).name, stubs.connector(second).name) + self.assertEqual({"db-a", "db-b"}, {connector.database for connector in stubs.connectors}) + + def test_connect_rejects_same_name_with_missing_or_mismatched_identity_before_writes(self): + cases = [("slack", field, value) for field, value in ( + ("provider", "github"), ("database", "other-db"), ("collection", "other-collection"), + ("provider_account_scope", "other-caller-chosen-account"), + ("provider_account_scope", ""), + ("provider", None), ("database", None), ("collection", None), + ("provider_account_scope", None), ("connector_id", None), + )] + [("gmail", "provider_account_scope", "unexpected-account-scope")] + for configured in (False, True): + for provider, field, value in cases: + with self.subTest(configured=configured, provider=provider, field=field, value=value): + hydra, stubs = self.load_setup() + credential = "refresh_token" if provider == "gmail" else "access_token" + args = (provider, "caller-chosen-account", "db", "docs", {credential: "x"}) + with bounded_sleep(): + connector_id = hydra.connect(*args, acl=["first@example.com"]) + stubs.connectors[0] = stubs.connectors[0].model_copy(update={field: value}) + if not configured: + stubs.configured[connector_id] = None + before = copy.deepcopy(stubs.configured) + start = len(stubs.calls) + with bounded_sleep(), self.assertRaisesRegex(RuntimeError, "identity"): + hydra.connect(*args, acl=["second@example.com"]) + self.assertEqual(before, stubs.configured) + self.assertEqual(["ConnectorsClient.list"], stubs.calls[start:]) + + def test_connect_does_not_reuse_legacy_ambiguous_names(self): + hydra, stubs = self.load_setup() + args = ("gmail", "carol@example.com", "db", "alice-bob", {"refresh_token": "x"}) + with bounded_sleep(): + first = hydra.connect(*args, acl=["first@example.com"]) + original = copy.deepcopy(stubs.configured[first]) + old_name = "cookbook-gmail-alice-bob-carol@example.com" + stubs.connectors[0] = stubs.connectors[0].model_copy(update={"name": old_name}) + second = hydra.connect(*args, acl=["second@example.com"]) + self.assertNotEqual(first, second) + self.assertEqual(original, stubs.configured[first]) + self.assertNotEqual(old_name, stubs.connector(second).name) + + def test_connect_rejects_multiple_same_name_connectors_before_acl_writes(self): + hydra, stubs = self.load_setup() + args = ("slack", "caller-chosen-account", "db", "docs", {"access_token": "x"}) + with bounded_sleep(): + first = hydra.connect(*args, acl=["first@example.com"]) + hydra.connect("slack", "another-account", "other-db", "docs", {"access_token": "x"}, acl=["other@example.com"]) + stubs.connectors[1] = stubs.connectors[1].model_copy(update={"name": stubs.connector(first).name}) + before = copy.deepcopy(stubs.configured) + start = len(stubs.calls) + with bounded_sleep(), self.assertRaisesRegex(RuntimeError, "identity"): + hydra.connect(*args, acl=["second@example.com"]) + self.assertEqual(before, stubs.configured) + self.assertEqual(["ConnectorsClient.list"], stubs.calls[start:]) + + def test_connect_configures_every_page_of_resources(self): + hydra, stubs = self.load_setup() + with bounded_sleep(): + connector_id = hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}, lookback_days=90) + self.assertEqual(["C1", "C2", "C3"], [r["resource_id"] for r in stubs.configured[connector_id]]) + self.assertEqual(2, stubs.calls.count("ConnectorsClient.discover")) + + def test_connect_finishes_a_connector_left_unconfigured(self): + hydra, stubs = self.load_setup() + stubs.discovered = [[]] # The first run finds nothing and stops before configure. + with bounded_sleep(), self.assertRaisesRegex(RuntimeError, "can reach nothing to sync"): + hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}) + stubs.discovered = [["C1"]] + with bounded_sleep(): + connector_id = hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}) + self.assertEqual(1, stubs.calls.count("ConnectorsClient.create")) + self.assertEqual(["C1"], [r["resource_id"] for r in stubs.configured[connector_id]]) + + def test_connect_sets_acl_for_a_provider_that_captures_none(self): + hydra, stubs = self.load_setup() + with bounded_sleep(): + connector_id = hydra.connect("gmail", "a@acme.com", "db", "docs", {"refresh_token": "x"}, + acl=["a@acme.com"]) + self.assertTrue(all(r["acl"] == ["a@acme.com"] for r in stubs.configured[connector_id])) + with bounded_sleep(), self.assertRaisesRegex(ValueError, "notion captures no permissions"): + hydra.connect("notion", "ws1", "db", "docs", {"token": "x"}) + self.assertNotIn("ConnectorsClient.create", stubs.calls[stubs.calls.index("list_providers"):]) + + def test_connect_stops_when_permissions_could_not_be_read(self): + for field in ("acl_warnings", "page_acl_warnings"): + with self.subTest(field=field): + hydra, stubs = self.load_setup() + setattr(stubs, field, {"C2": "provider returned 403"}) + gave_up = mock.patch("time.sleep", side_effect=AssertionError("connect kept polling")) + with gave_up, self.assertRaisesRegex(RuntimeError, "could not read the permissions of c2. Pass"): + hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}) + + def test_connect_accepts_unread_permissions_when_an_acl_is_set(self): + hydra, stubs = self.load_setup() + stubs.acl_warnings = {"C2": "provider returned 403"} + with bounded_sleep(): + connector_id = hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}, + acl=["domain:acme.com"]) + self.assertTrue(all(r["acl"] == ["domain:acme.com"] for r in stubs.configured[connector_id])) + + def test_connect_replaces_the_acl_of_a_connector_it_reuses(self): + hydra, stubs = self.load_setup() + args = ("gmail", "a@acme.com", "db", "docs", {"refresh_token": "x"}) + with bounded_sleep(): + connector_id = hydra.connect(*args, acl=["domain:acme.com"]) + self.assertEqual(connector_id, hydra.connect(*args, acl=["a@acme.com"])) + self.assertTrue(all(r["acl"] == ["a@acme.com"] for r in stubs.configured[connector_id])) + self.assertEqual(3, stubs.calls.count("ConnectorsClient.update_resource_acl")) + self.assertEqual(1, stubs.calls.count("ConnectorsClient.configure")) + + def test_connect_leaves_a_stored_acl_alone_when_none_is_passed(self): + hydra, stubs = self.load_setup() + args = ("slack", "T1", "db", "docs", {"access_token": "x"}) + with bounded_sleep(): + connector_id = hydra.connect(*args, acl=["domain:acme.com"]) + hydra.connect(*args) + self.assertTrue(all(r["acl"] == ["domain:acme.com"] for r in stubs.configured[connector_id])) + self.assertNotIn("ConnectorsClient.update_resource_acl", stubs.calls) + + def test_connect_treats_an_empty_acl_as_nobody_not_as_unset(self): + hydra, stubs = self.load_setup() + args = ("gmail", "a@acme.com", "db", "docs", {"refresh_token": "x"}) + with bounded_sleep(): + connector_id = hydra.connect(*args, acl=[]) + self.assertTrue(all(r["acl"] == [] for r in stubs.configured[connector_id])) + with bounded_sleep(): + hydra.connect(*args, acl=["a@acme.com"]) + hydra.connect(*args, acl=[]) + self.assertTrue(all(r["acl"] == [] for r in stubs.configured[connector_id])) + + def test_connect_reports_a_connector_that_synced_only_part(self): + hydra, stubs = self.load_setup() + stubs.connector_status = ("active", "degraded") + stubs.failing = {"C2"} + stubs.quiet = "empty" # A resource with nothing new is not a failure. + gave_up = mock.patch("time.sleep", side_effect=AssertionError("connect kept polling")) + with gave_up, self.assertRaisesRegex(RuntimeError, "incomplete: c2: permission denied$"): + hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}) + + def test_connect_stops_when_a_first_sync_fails_for_good(self): + hydra, stubs = self.load_setup() + stubs.connector_status = ("ingesting", "degraded") + stubs.failing = {"C1"} + stubs.retryable = False + gave_up = mock.patch("time.sleep", side_effect=AssertionError("connect kept polling")) + with gave_up, self.assertRaisesRegex(RuntimeError, "cannot sync c1: permission denied$"): + hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}) + + def test_connect_names_the_failing_resources_when_it_times_out(self): + hydra, stubs = self.load_setup() + stubs.connector_status = ("ingesting", "degraded") + stubs.failing = {"C1"} # Retryable, so connect keeps waiting. + with bounded_sleep(), mock.patch("time.time", side_effect=[0, 0, 10, 10_000, 10_000]), \ + self.assertRaisesRegex(TimeoutError, "c1: permission denied"): + hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}, timeout=60) + + def test_connect_stops_on_every_state_that_cannot_recover(self): + for lifecycle, status in (("ingesting", "failed"), ("paused", "paused"), ("active", "failed"), + ("ingesting", "capped"), ("reconnect", "degraded")): + with self.subTest(lifecycle=lifecycle, status=status): + hydra, stubs = self.load_setup() + stubs.connector_status = (lifecycle, status) + gave_up = mock.patch("time.sleep", side_effect=AssertionError("connect kept polling")) + with gave_up, self.assertRaisesRegex(RuntimeError, "connector is"): + hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}) + + def test_connect_gives_up_after_its_timeout(self): + hydra, stubs = self.load_setup() + stubs.connector_status = ("ingesting", "checking") # An account with nothing to sync never goes active. + with bounded_sleep(), mock.patch("time.time", side_effect=[0, 0, 10, 10_000, 10_000]), \ + self.assertRaisesRegex(TimeoutError, "synced nothing"): + hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}, timeout=60) + + def test_connect_reports_zero_and_immediate_timeouts_without_polling(self): + for timeout, times in ((0, [0, 0]), (60, [0, 100])): + with self.subTest(timeout=timeout): + hydra, stubs = self.load_setup() + with bounded_sleep(), mock.patch("time.time", side_effect=times), \ + self.assertRaises(TimeoutError) as raised: + hydra.connect("slack", "caller-chosen-account", "db", "docs", {"access_token": "x"}, timeout=timeout) + message = str(raised.exception) + self.assertIn(f"synced nothing within {timeout} seconds", message) + self.assertIn("first-sync polling did not run for conn_1", message) + self.assertEqual(1, stubs.calls.count("ConnectorsClient.status")) + self.assertEqual(["C1", "C2", "C3"], [r["resource_id"] for r in stubs.configured["conn_1"]]) + def load_setup(self): """Import hydra.py with stubbed SDK methods, outside any cookbook.""" hydra = types.ModuleType("hydra") diff --git a/scripts/test_docs_consistency.py b/scripts/test_docs_consistency.py index 566eb837..c020906e 100644 --- a/scripts/test_docs_consistency.py +++ b/scripts/test_docs_consistency.py @@ -10,8 +10,25 @@ DEPRECATED_API_KEY = "HYDRA" + "_DB_API_KEY" +def hidden_pages(): + """Pages in a hidden navigation group: old copies kept for reference, not maintained.""" + def pages(value): + if isinstance(value, str): + return {value} + if isinstance(value, list): + return set().union(set(), *(pages(item) for item in value)) + if isinstance(value, dict): + return set().union(set(), *(pages(item) for key, item in value.items() if key in {"pages", "groups", "tabs", "anchors", "dropdowns"})) + return set() + config = json.loads((ROOT / "docs.json").read_text()) + return {ROOT / f"{slug}.mdx" for version in config["navigation"]["versions"] if version.get("hidden") for slug in pages(version)} + + def live_files(pattern: str): + hidden = hidden_pages() for path in ROOT.rglob(pattern): + if path in hidden: + continue relative = path.relative_to(ROOT) if not set(relative.parts).intersection({ ".git", @@ -49,10 +66,9 @@ def test_plugin_deprecation_notes_keep_old_api_key_name(self): ) matches.extend([str(path.relative_to(ROOT))] * count) - self.assertCountEqual( - ["plugins/claude-code.mdx", "plugins/cli.mdx", "plugins/mcp.mdx"], - matches, - ) + # The CLI and MCP pages name only the current variable. The Claude Code + # page keeps one note for people upgrading from the old name. + self.assertCountEqual(["plugins/claude-code.mdx"], matches) @@ -72,7 +88,7 @@ def test_recall_pages_use_correct_spelling(self): SHARED_FACTS = { "max_results default and maximum": { "AGENTS.mdx": r"\| `max_results` \| [^|]*\| default (\d+); max (\d+) \|", - "essentials/v2/query.mdx": r"\| `max_results` \|[^|]*Default `(\d+)`, maximum `(\d+)`", + "essentials/v2/query.mdx": r"`max_results`(?:\s*| \|)[^|<]*Default `(\d+)`, maximum `(\d+)`", "api-reference/v2/endpoint/query.mdx": r'name="max_results"[^|]*\|[^|]*to `(?P\d+)`\. Defaults to `(?P\d+)`', }, @@ -83,20 +99,216 @@ def test_recall_pages_use_correct_spelling(self): "metadata size limit": { "AGENTS.mdx": r"\| `metadata` \| [^|]*max (\d+ KiB)", "essentials/v2/context.mdx": r"\| `metadata` \| [^|]*Up to (\d+ KiB)", - "essentials/v2/metadata.mdx": r"\| `metadata` \| [^|]*\| (\d+ KiB)", + "essentials/v2/metadata.mdx": r"\| `metadata`(?: \(stored\))? \|(?: [^|]*\|)? (\d+ KiB)", }, "additional_metadata size limit": { "AGENTS.mdx": r"\| `additional_metadata` \| [^|]*max (\d+ KiB)", "essentials/v2/context.mdx": r"\| `additional_metadata` \| [^|]*Up to (\d+ KiB)", - "essentials/v2/metadata.mdx": r"\| `additional_metadata` \| [^|]*\| (\d+ KiB)", + "essentials/v2/metadata.mdx": r"\| `additional_metadata`(?: \(stored\))? \|(?: [^|]*\|)? (\d+ KiB)", }, "collections per query": { - "essentials/v2/query.mdx": r"\*\*Several collections:\*\*[^\n]*Up to (\d+);", + "essentials/v2/query.mdx": r"\*\*Several collections:\*\*[^\n]*[Uu]p to (\d+)[; ]", "api-reference/v2/endpoint/query.mdx": r"at most (\d+) collections", }, } INDEXING_STATUSES = ["queued", "processing", "graph_creation", "completed", "errored"] -APP_SOURCE_KINDS = ["email", "message", "ticket", "knowledge_base", "comment", "meeting", "custom"] + + +class UnifiedNarrativeTest(unittest.TestCase): + def read(self, relative): + return (ROOT / relative).read_text(encoding="utf-8") + + def test_cookbook_migration_requires_verified_identity(self): + intro = self.read("snippets/cookbook-setup.mdx").split("```python hydra.py", 1)[0] + self.assertIn("**Existing deployments:**", intro) + migration = intro.split("**Existing deployments:**", 1)[1] + for phrase in ( + "does not adopt legacy connectors", "remote syncs can continue", + "Before switching", "client.connectors.list()", "`connector_id`", + "`(provider, database, collection, account)`", "ownership", + "trusted server configuration and credentials", "`provider_account_scope` where applicable", + "connector names are not proof of ownership", "only under that verified identity", + "without legacy-name adoption, automatic ACL reassignment, or blanket pause/delete", + ): + self.assertIn(phrase, migration) + + def test_inference_opt_out_does_not_promise_no_graph_processing(self): + for relative in ("essentials/v2/context.mdx", "api-reference/v2/endpoint/ingest-context.mdx"): + text = self.read(relative) + with self.subTest(page=relative): + self.assertIn("additional memory enrichment", text) + self.assertIn("entity/graph extraction may still run", text) + self.assertNotIn("Explicit `false` stores the text verbatim", text) + self.assertNotIn("without preprocessing", text) + + def test_query_method_and_alpha_defaults_do_not_confuse_auto_mode(self): + text = self.read("essentials/v2/query.mdx") + method = re.search(r"`query_by`\s*(.*?)", text, re.S) + self.assertIsNotNone(method) + values = set(re.findall(r'`"([^"]+)"`', method.group(1))) + spec = json.loads(self.read("api-reference/v2/openapi.json")) + self.assertEqual({"hybrid", "text"}, values) + self.assertEqual(set(spec["components"]["schemas"]["search.QueryBy"]["enum"]), values) + self.assertIn('`"hybrid"` (the default)', method.group(1)) + self.assertRegex(self.read("api-reference/v2/endpoint/query.mdx"), r'name="query_by"[^\n]*default=`"hybrid"`') + self.assertNotIn("auto", method.group(1)) + alpha = next(line for line in text.splitlines() if line.startswith("- `alpha`")) + self.assertIn("Default `0.8`", alpha) + self.assertIn('`"auto"` also resolves to `0.8`', alpha) + self.assertNotIn('which `"auto"`', alpha) + self.assertIn('`"auto"` (the default)', text.split('`mode`', 1)[1].split('', 1)[0]) + self.assertIn("auto selector", self.read("plugins/cli.mdx")) + + def test_connector_enforcement_requires_a_human_session_even_for_false(self): + text = self.read("essentials/v2/connectors.mdx") + section = text.split("## 5. ACL", 1)[1].split("### Examples", 1)[0] + for phrase in ("signed-in human", "owner or writer", "API-key clients must omit", "even `false`", "dashboard", "Enforce ACL", "`acl_supported: true`", "`false`", "persistent", "warning"): + self.assertIn(phrase, section) + self.assertIn("valid private ACLs", section) + self.assertNotRegex(section, r"API.key[^.\n]*send[^.\n]*false") + + def test_memory_authorization_covers_mutations_and_adjacent_examples(self): + text = self.read("essentials/v2/context.mdx") + memory = text.split("## Ingesting memory", 1)[1].split("## Wait for indexing", 1)[0] + self.assertIn("updates and deletes", memory) + self.assertIn("authorize", memory) + self.assertIn("source ID", memory) + self.assertIn("verified session", memory) + self.assertIn('collection=verified_session["memory_collection"]', memory) + self.assertIn("collection: verifiedSession.memoryCollection", memory) + self.assertIn('"collection=$SESSION_MEMORY_COLLECTION"', memory) + + def test_cli_shell_examples_do_not_recommend_api_keys_in_argv(self): + text = self.read("plugins/cli.mdx") + shell_blocks = re.findall(r"```(?:bash|sh|shell)[^\n]*\n(.*?)```", text, re.S) + self.assertTrue(shell_blocks) + for source in shell_blocks: + commands = "\n".join(line for line in source.splitlines() if not line.lstrip().startswith("#")) + commands = commands.replace("\\\n", " ") + self.assertNotRegex(commands, r"\bhydradb\b[^\n]*--api-key(?:[=\s]|$)") + self.assertNotRegex(commands, r"\bhydradb\s+config\s+set\s+api_key\b") + self.assertIn("masked prompt", text) + self.assertIn("`0600`", text) + self.assertIn("inject `HYDRADB_API_KEY` through your environment or secret manager", text) + + def test_memory_scope_is_derived_from_the_signed_in_session(self): + text = self.read("essentials/v2/context.mdx") + memory = text.split("## Ingesting memory", 1)[1].split("## Wait for indexing", 1)[0] + self.assertIn("signed-in session", memory) + self.assertIn("does not authenticate", memory) + self.assertIn("every ingest, status check, and query", memory) + self.assertIn("`infer: true` (default)", memory) + self.assertIn("`infer: false`", memory) + + def test_legacy_memory_instructions_are_not_public_guidance(self): + for relative in ( + "essentials/v2/context.mdx", + "api-reference/v2/endpoint/ingest-context.mdx", + "cookbooks/v2/personal-assistant.mdx", + ): + self.assertNotIn("custom_instructions", self.read(relative), relative) + guide = self.read("AGENTS.mdx") + memories = guide.split("### Memories")[-1].split("## 7.", 1)[0] + self.assertNotIn("custom_instructions", memories) + self.assertIn("`custom_instructions` on the connector", guide) + self.assertIn("custom_instructions", self.read("essentials/v2/connectors.mdx")) + + def test_query_names_and_defaults_match_the_canonical_contract(self): + for relative in ( + "AGENTS.mdx", + "essentials/v2/query.mdx", + "api-reference/v2/endpoint/query.mdx", + ): + text = self.read(relative) + with self.subTest(relative=relative): + self.assertIn("query_explicit_relations", text) + self.assertIn("additional_graph_context", text) + self.assertIn("data.additional_graph_context", text) + self.assertNotRegex(text, r'(?:Default|default|omitted means)[^\n|]*`0\.4`') + reference = self.read("api-reference/v2/endpoint/query.mdx") + self.assertRegex(reference, r'name="type"[^\n]*default=`"all"`') + self.assertRegex(reference, r'name="recency_bias"[^\n]*default=`0\.6`') + self.assertIn('name="query_explicit_relations"', reference) + self.assertIn('name="additional_graph_context"', reference) + self.assertIn("request-time hint", reference) + self.assertIn("response map", reference) + context = self.read("essentials/v2/context.mdx") + self.assertIn("`relations.ids`", context) + self.assertNotIn("`explicit_relations`", context) + + def test_cli_authentication_does_not_require_a_database_or_key_in_argv(self): + text = self.read("plugins/cli.mdx") + self.assertIn("hydradb login\n", text) + self.assertNotIn("hydradb login --", text) + self.assertNotIn("--api-key", text) + self.assertIn("masked prompt", text) + self.assertIn("`0600`", text) + self.assertIn("hydradb database list", text) + self.assertIn("hydradb config set database my-db", text) + self.assertIn("hydradb database create my-db", text) + self.assertIn("### Deprecated aliases", text) + self.assertIn("### Persistent configuration", text) + self.assertIn("`--kind`", text) + self.assertIn("knowledge text", text.split("| `--markdown`", 1)[1].split("\n", 1)[0]) + self.assertIn("| `--additional-graph-context`", text) + self.assertIn("`--additional_graph_context` is also accepted", text) + self.assertIn("`response_warnings`", text) + self.assertIn("effective `scope`", text) + + def test_client_auto_selection_is_not_documented_as_a_backend_wire_type(self): + context = self.read("essentials/v2/context.mdx") + self.assertIn("client-side selection", context) + self.assertIn("defaults to `type=knowledge`", context) + self.assertIn("`auto` is not an API wire value", context) + self.assertNotIn("`type=traces`", context) + self.assertIn("default is `\"knowledge\"`", self.read("AGENTS.mdx")) + self.assertIn('default=`"knowledge"`', self.read("api-reference/v2/endpoint/ingest-context.mdx")) + + def test_mcp_api_key_connection_can_choose_its_scope_after_authentication(self): + text = self.read("plugins/mcp.mdx") + quickstart = text.split("## Configuration", 1)[0] + self.assertNotIn('"X-HydraDB-Database"', quickstart) + self.assertNotIn('"HYDRADB_DATABASE"', quickstart) + self.assertIn("hydradb_databases", text) + self.assertIn("hydradb_database_create", text) + self.assertNotIn("names no database is refused", text) + self.assertIn("`scope_notice`", text) + self.assertIn("`warnings_omitted`", text) + self.assertIn("rejected before an API call", text) + + def test_repaired_local_links_have_stable_targets(self): + links = { + "essentials/v2/context.mdx": ("link-sources-deterministically", "## Link sources deterministically"), + "essentials/v2/connectors.mdx": ("6-connect-several-accounts-from-one-provider", "## 6. Connect several accounts from one provider"), + "essentials/v2/metadata-2.mdx": ("metadata-and-additional-metadata", "## Metadata and additional metadata"), + "plugins/cli.mdx": ("persistent-configuration", "### Persistent configuration"), + "plugins/mcp.mdx": ("api-key-headers", "### API key headers"), + } + for relative, (anchor, target) in links.items(): + text = self.read(relative) + with self.subTest(relative=relative): + self.assertIn(f"](#{anchor})", text) + self.assertIn(target, text) + + def test_byog_endpoints_have_navigable_reference_pages(self): + routes = { + "byog-query-managed": "POST /byog", + "byog-query": "POST /byog/query", + "byog-create-database": "POST /byog/databases", + "byog-delete-database": "DELETE /byog/databases", + "byog-list-collections": "GET /byog/collections", + "byog-delete-collection": "DELETE /byog/collections", + } + config = self.read("docs.json") + for page, operation in routes.items(): + relative = f"api-reference/v2/endpoint/{page}" + text = self.read(f"{relative}.mdx") + with self.subTest(operation=operation): + self.assertIn(f'"{relative}"', config) + self.assertIn(f'openapi: "api-reference/v2/openapi.json {operation}"', text) + self.assertIn("", text) + self.assertIn("$HYDRADB_API_KEY", text) + self.assertIn("## Related resources", text) class SharedFactsTest(unittest.TestCase): @@ -115,8 +327,13 @@ def test_shared_facts_agree_across_pages(self): self.assertEqual(1, len(set(values.values())), values) def test_indexing_statuses_are_the_same_everywhere(self): + # The reference page is the one place that must list every status. + reference = self.read("api-reference/v2/endpoint/source-status.mdx") + for status in INDEXING_STATUSES: + self.assertIn(f"`{status}`", reference) sentence = re.search(r"moves forward through ([^:]*):", self.read("essentials/v2/context.mdx")) - self.assertEqual(INDEXING_STATUSES, re.findall(r"`(\w+)`", sentence.group(1))) + if sentence: # The guide may spell the sequence out; if it does, it must match. + self.assertEqual(INDEXING_STATUSES, re.findall(r"`(\w+)`", sentence.group(1))) used = set() for path in live_files("*.mdx"): if "/v2/" in str(path) or path.name == "AGENTS.mdx": @@ -126,14 +343,20 @@ def test_indexing_statuses_are_the_same_everywhere(self): self.assertTrue(used) self.assertLessEqual(used, set(INDEXING_STATUSES)) - def test_app_source_kinds_are_the_same_everywhere(self): - listed = ", ".join(f"`{kind}`" for kind in APP_SOURCE_KINDS[:-1]) + f", or `{APP_SOURCE_KINDS[-1]}`" - for relative in ("essentials/v2/context.mdx", "api-reference/v2/endpoint/ingest-context.mdx"): - self.assertIn(listed, self.read(relative), relative) - table = re.findall(r"^\| `(\w+)` \| [^|]+ \| `", self.read("essentials/v2/context.mdx"), re.M) - self.assertEqual(APP_SOURCE_KINDS, table) - guide = re.search(r"Kinds in OpenAPI[^.]*\.", self.read("AGENTS.mdx")).group(0) - self.assertEqual(set(APP_SOURCE_KINDS), set(re.findall(r"`(\w+)`", guide))) + def test_app_sources_are_documented_only_under_connectors(self): + """App content reaches HydraDB through connectors, so no other page teaches app_knowledge.""" + pattern = re.compile(r"app[_ ]knowledge|appKnowledge|app_relations|app[ -]sources?", re.I) + offenders = [] + pages = [p for p in live_files("*.mdx") if "/v2/" in str(p) or p.name == "AGENTS.mdx"] + pages += sorted((ROOT / "snippets").glob("*.mdx")) + for path in pages: + relative = str(path.relative_to(ROOT)) + if relative == "essentials/v2/connectors.mdx" or "connector" in path.name: + continue + for number, line in enumerate(path.read_text(encoding="utf-8").split("\n"), 1): + if pattern.search(line): + offenders.append(f"{relative}:{number}") + self.assertEqual([], offenders) def test_supported_file_formats_match_the_api_reference(self): def extensions(relative, start, end): @@ -208,5 +431,41 @@ def test_guides_do_not_show_internal_query_fields(self): path.relative_to(ROOT)) + +def v2_pages(): + for path in live_files("*.mdx"): + relative = path.relative_to(ROOT).as_posix() + if "/v2/" in f"/{relative}" or relative == "AGENTS.mdx": + yield relative, path.read_text(encoding="utf-8") + + +class PublishedQueryContractTest(unittest.TestCase): + """The production query contract the guides teach (PRO-1618 review, 2026-11-16).""" + + def test_withdrawn_query_aliases_and_notices_are_not_documented(self): + withdrawn = re.compile( + r"enrichment_enabled_by_default|inference_enabled_by_default" + r"|alias(?:es)?\b[^.\n]*`context`|> `context`" + ) + offenders = [f"{relative}: {m.group(0)}" for relative, text in v2_pages() for m in withdrawn.finditer(text)] + self.assertEqual([], offenders) + + def test_declared_links_use_the_deterministic_relations_name(self): + offenders = [ + f"{relative}: {m.group(0)}" + for relative, text in v2_pages() + for m in re.finditer(r"(?i)forceful[ -]relations?\b", text) + ] + self.assertEqual([], offenders) + + def test_memory_ingest_path_is_not_called_legacy(self): + offenders = [ + f"{relative}: {m.group(0)}" + for relative, text in v2_pages() + for m in re.finditer(r"(?i)legacy\s+`?memor", text) + ] + self.assertEqual([], offenders) + + if __name__ == "__main__": unittest.main() diff --git a/scripts/test_docs_discovery.py b/scripts/test_docs_discovery.py index abba7918..77712c98 100644 --- a/scripts/test_docs_discovery.py +++ b/scripts/test_docs_discovery.py @@ -6,20 +6,15 @@ class DocsDiscoveryTest(unittest.TestCase): - def test_index_is_current_and_does_not_redirect_back_to_the_guide(self): - self.assertEqual(generate(), (ROOT / "llms.txt").read_text()) + def test_llms_txt_is_the_agent_guide(self): + """llms.txt and the Agent Integration Guide page must say the same thing.""" + text = (ROOT / "llms.txt").read_text() + self.assertEqual(generate(), text) + guide = (ROOT / "AGENTS.mdx").read_text().split("---\n", 2)[2].strip() + self.assertTrue(text.endswith(guide + "\n")) + self.assertTrue(text.startswith("# Complete Agent Integration Guide\n\n> ")) config = json.loads((ROOT / "docs.json").read_text()) self.assertFalse({"/llms.txt", "/llms-full.txt"} & {redirect["source"] for redirect in config["redirects"]}) - links = re.findall(r'https://docs\.hydradb\.com/([^\s)]+)\.md\)', generate()) - expected = {path.relative_to(ROOT).with_suffix("").as_posix() for path in ROOT.rglob("*.mdx") if not any(part.startswith(".") or part in {"node_modules", "archive", "snippets"} for part in path.relative_to(ROOT).parts)} - self.assertEqual(expected, set(links)) - self.assertEqual(len(links), len(set(links))) - self.assertIn("AGENTS", links) - self.assertIn("plugins/cursor", links) - self.assertIn("api-reference/v2/endpoint/sync-connector", links) - for slug in links: - self.assertTrue((ROOT / f"{slug}.mdx").is_file(), slug) - self.assertFalse(slug.startswith(("archive/", "snippets/")), slug) def test_each_legacy_api_page_has_the_shared_rendered_warning(self): config = json.loads((ROOT / "docs.json").read_text()) diff --git a/scripts/test_docs_examples.py b/scripts/test_docs_examples.py index 9133c7c6..b7d1149d 100644 --- a/scripts/test_docs_examples.py +++ b/scripts/test_docs_examples.py @@ -34,7 +34,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parent)) from test_cookbooks import ( # noqa: E402 - APP_SOURCE_KEYS, DOCUMENT_METADATA_KEYS, KIND_FIELDS, KINDS, MEMORY_KEYS, + DOCUMENT_METADATA_KEYS, MEMORY_KEYS, ) ROOT = Path(__file__).resolve().parents[1] @@ -80,6 +80,12 @@ def resolve(schema): return schema +# Documented fields the generated spec does not declare yet. The spec is synced +# from the application and is never edited by hand, so a field whose release is +# pending is listed here until the sync brings it in. Remove the entry then. +PENDING_SPEC_FIELDS = set() + + def unknown_keys(value, schema, path=""): """List keys in value that the schema does not declare, recursively.""" schema = resolve(schema) @@ -94,7 +100,8 @@ def unknown_keys(value, schema, path=""): unknown = [] for key, child in value.items(): if key not in properties: - unknown.append(f"{path}.{key}") + if f"{path}.{key}" not in PENDING_SPEC_FIELDS: + unknown.append(f"{path}.{key}") else: unknown += unknown_keys(child, properties[key], f"{path}.{key}") return unknown @@ -172,8 +179,10 @@ def respond(self, template, method, query, body): if key == ("GET", "/databases/status"): return 200, envelope({"database": query["database"][0], "infra": {"ready_for_ingestion": True}}) + if key == ("GET", "/databases/{database}/metadata-schema"): + return 200, envelope({"database": "acme_corp", "fields": []}) if key == ("POST", "/context/ingest"): - items = json.loads(body.get("memories") or body.get("app_knowledge") + items = json.loads(body.get("memories") or body.get("document_metadata") or "[{}]") return 202, envelope({"success": True, "results": [ {"id": item.get("id", f"source_{n}"), "status": "queued"} @@ -195,10 +204,19 @@ def respond(self, template, method, query, body): return 200, envelope({"feedback_id": "fb_1"}) if key == ("POST", "/connectors"): return 201, {"connector_id": "conn_1", "provider": body.get("provider"), "status": "active"} + if key == ("GET", "/connectors/providers"): + if query.get("id"): + return 200, {"provider": query["id"][0], "connector_type": query["id"][0], + "indexed_object_types": [], "searchable_fields": [], "filterable_fields": []} + return 200, {"providers": []} if key == ("GET", "/connectors/{id}/discover"): - return 200, {"resources": [{"id": "C1", "resource_type": "channel", "name": "general"}]} + return 200, {"provider": "slack", "resources": [{"id": "C1", "resource_type": "channel", "name": "general"}]} if key == ("POST", "/connectors/{id}/configure"): - return 200, {} + return 200, {"connector_id": "conn_1"} + if key == ("PATCH", "/connectors/{id}"): + return 200, {"connector_id": "conn_1"} + if key == ("PATCH", "/connectors/{id}/resources/{resource_id}"): + return 200, {"connector_id": "conn_1", "resource_id": "C1", **body} if key == ("GET", "/connectors/{id}/status"): return 200, {"connector_id": "conn_1", "status": "active"} if key == ("GET", "/context/inspect"): @@ -222,13 +240,8 @@ def check_ingest_items(self, body, where): test.assertEqual(1, ("text" in item) + ("user_assistant_pairs" in item), where) for item in json.loads(body.get("document_metadata") or "[]"): test.assertLessEqual(set(item), DOCUMENT_METADATA_KEYS, where) - for item in json.loads(body.get("app_knowledge") or "[]"): - test.assertEqual("knowledge", body["type"], where) - test.assertLessEqual(set(item), APP_SOURCE_KEYS, where) - test.assertIn(item.get("kind"), KINDS, where) - fields = item.get("fields", {}) - test.assertEqual(item["kind"], fields.get("kind"), where) - test.assertLessEqual(set(fields) - {"kind"}, KIND_FIELDS[item["kind"]], f"{where}: {item.get('id')}") + # App content comes through connectors; examples must not hand-write it. + test.assertNotIn("app_knowledge", body, where) def handle(self, request): try: @@ -292,10 +305,14 @@ def __init__(self, *args, **kwargs): return module +from test_docs_consistency import hidden_pages # noqa: E402 + +HIDDEN_PAGES = hidden_pages() V2_PAGES = [GUIDE] + sorted( page for folder in ("get-started/v2", "essentials/v2", "api-reference/v2", "plugins") for page in (ROOT / folder).rglob("*.mdx") + if page not in HIDDEN_PAGES ) @@ -470,7 +487,56 @@ def test_every_typescript_block_type_checks(self): self.assertEqual(0, result.returncode, result.stdout + result.stderr) finally: shutil.rmtree(work, ignore_errors=True) - self.assertGreaterEqual(count, 100) + self.assertGreaterEqual(count, 85) + + +class CookbookPermissionDiagnostics(unittest.TestCase): + def test_permission_warning_distinguishes_local_abort_from_remote_sync(self): + import test_cookbooks + + for field, response_field in (("acl_warnings", "acl_warning"), ("page_acl_warnings", "page_acl_warning")): + with self.subTest(field=field): + hydra, stubs = test_cookbooks.CookbookTest.load_setup(self) + getattr(stubs, field)["C2"] = "provider returned 403" + with mock.patch.object(hydra.client.connectors, "pause") as pause, \ + mock.patch.object(hydra.client.connectors, "delete") as delete, \ + mock.patch("time.sleep", side_effect=AssertionError("connect kept polling")), \ + self.assertRaises(RuntimeError) as raised: + hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}) + message = str(raised.exception) + for phrase in ("only the cookbook", "does not pause", "may already be readable by every caller", "scheduled syncs may continue", "Pass acl"): + self.assertIn(phrase, message) + pause.assert_not_called() + delete.assert_not_called() + self.assertEqual(1, stubs.calls.count("ConnectorsClient.configure")) + self.assertNotIn("ConnectorsClient.update_resource_acl", stubs.calls) + self.assertTrue(all("acl" not in resource for resource in stubs.configured["conn_1"])) + status = hydra.client.connectors.status("conn_1") + self.assertEqual("active", status.lifecycle) + resource = next(resource for resource in status.resources if resource.resource_id == "C2") + self.assertEqual("provider returned 403", getattr(resource, response_field)) + + def test_explicit_resource_acl_recovers_without_erasing_provider_warning(self): + import test_cookbooks + + for field, response_field in (("acl_warnings", "acl_warning"), ("page_acl_warnings", "page_acl_warning")): + with self.subTest(field=field): + hydra, stubs = test_cookbooks.CookbookTest.load_setup(self) + getattr(stubs, field)["C2"] = "provider returned 403" + with test_cookbooks.bounded_sleep(), self.assertRaises(RuntimeError): + hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}) + with test_cookbooks.bounded_sleep(), \ + mock.patch.object(hydra.client.connectors, "pause") as pause, \ + mock.patch.object(hydra.client.connectors, "delete") as delete: + connector_id = hydra.connect("slack", "T1", "db", "docs", {"access_token": "x"}, acl=["domain:acme.com"]) + self.assertEqual("conn_1", connector_id) + self.assertTrue(all(resource["acl"] == ["domain:acme.com"] for resource in stubs.configured[connector_id])) + self.assertEqual(3, stubs.calls.count("ConnectorsClient.update_resource_acl")) + pause.assert_not_called() + delete.assert_not_called() + status = hydra.client.connectors.status(connector_id) + resource = next(resource for resource in status.resources if resource.resource_id == "C2") + self.assertEqual("provider returned 403", getattr(resource, response_field)) class EndpointPages(unittest.TestCase): @@ -517,12 +583,17 @@ def test_documented_fields_exist_in_the_spec(self): # for this operation's request body. leaf = name.split(".")[-1].split("[")[0] self.assertIn(f'"{leaf}"', FULL_TEXT.get(template, SPEC_TEXT), f"{page.name}: {name}") - self.assertGreaterEqual(checked, 60) + self.assertGreaterEqual(checked, 55) class JsonAndCurlExamples(unittest.TestCase): REFERENCE = [page for page in V2_PAGES if "plugins" not in page.parts] + def test_pending_fields_are_still_missing_from_the_spec(self): + """An entry must leave PENDING_SPEC_FIELDS as soon as the spec declares it.""" + declared = {f".{name}" for schema in SCHEMAS.values() for name in schema.get("properties", {})} + self.assertEqual(set(), PENDING_SPEC_FIELDS & declared) + def test_json_blocks_parse_and_use_public_fields(self): count = 0 for page in self.REFERENCE: @@ -547,7 +618,7 @@ def test_json_blocks_parse_and_use_public_fields(self): if isinstance(sample, dict) and "query" in sample and "database" in sample \ and "params" not in sample: self.assertEqual([], unknown_keys(sample, request_schema(operation("POST", "/query")[1]))) - self.assertGreaterEqual(count, 120) + self.assertGreaterEqual(count, 85) @staticmethod def curl_calls(source): @@ -599,7 +670,7 @@ def test_curl_blocks_match_the_spec(self): if bound and source.strip() in request_example: self.assertEqual(bound, (method, operation(method, path)[0]), "the request example does not call the endpoint this page documents") - self.assertGreaterEqual(calls, 80) + self.assertGreaterEqual(calls, 70) def test_status_values_are_the_documented_ones(self): pages = V2_PAGES + sorted((ROOT / "cookbooks/v2").glob("*.mdx")) + sorted((ROOT / "snippets").glob("*.mdx")) diff --git a/snippets/cookbook-setup.mdx b/snippets/cookbook-setup.mdx index 554e719a..c59c8936 100644 --- a/snippets/cookbook-setup.mdx +++ b/snippets/cookbook-setup.mdx @@ -4,9 +4,17 @@ - An OpenAI API key, set as `OPENAI_API_KEY`. HydraDB returns context, not answers, so any model works; swap the `answer` function below for your own. - Python 3.10 or later, with the SDKs: `pip install "hydradb-sdk>=2.1.7,<3" openai`. -Save this as `hydra.py`. Every cookbook imports it. It holds what every HydraDB application does around its own logic: wait for the database, check what an ingest accepted, wait for indexing, and pass query results to a model. +Save this as `hydra.py`. Every cookbook imports it. It holds what every HydraDB application does around its own logic: wait for the database, connect an app, check what an ingest accepted, wait for indexing, and pass query results to a model. + +If `connect` raises because provider permissions could not be read, it aborts only the cookbook. It does not pause or delete the remote connector: content without a valid ACL may already be readable by every caller, and scheduled syncs may continue. Inspect the persistent `acl_warning` / `page_acl_warning` in connector status, then repair provider permissions or rerun `connect` with an explicit resource `acl` to restrict that content. Existing valid private ACLs and revocations remain enforced. + +`connect` hashes the complete `(provider, database, collection, account)` tuple for its lookup name and checks returned connector metadata before reuse. `account` is your application's stable account label, not a validated native account identity. Resolve it from trusted server configuration and authorize the caller separately; a connector name is not authentication. An incomplete, mismatched, or ambiguous same-name identity raises before resource or ACL changes. The `timeout` bounds first-sync polling after setup; zero or an already-expired deadline raises `TimeoutError` with a diagnostic instead of polling. + +**Existing deployments:** The hashed helper intentionally does not adopt legacy connectors, so older remote syncs can continue alongside a new one. Before switching, list connectors with `client.connectors.list()` and record their `connector_id` values. Verify full `(provider, database, collection, account)` ownership using trusted server configuration and credentials, checking `provider_account_scope` where applicable; connector names are not proof of ownership. Reconcile duplicate remote syncs only under that verified identity, without legacy-name adoption, automatic ACL reassignment, or blanket pause/delete. ```python hydra.py +import hashlib +import json import os import time @@ -32,6 +40,123 @@ def create_database(database, schema=None): time.sleep(5) +# Providers that take an account scope. Without one, two accounts whose +# sources share an ID overwrite each other. +SCOPED = {"slack", "github", "linear", "notion"} + + +def connect(provider, account, database, collection, credentials, + acl=None, lookback_days=30, timeout=1800): + """Connect one app account, sync what its credentials can reach, and wait for the first sync. + + account names the account the credentials belong to: a Slack workspace ID, + a mailbox address, a Jira site. Each account gets its own connector. + Pass acl for a provider that does not capture permissions, such as Gmail or + Notion. Without it, everything that provider syncs is readable by every caller. + connect refuses such a provider before setup when acl is left out. If a + permission read fails after sync, it stops only the cookbook, not the remote + connector: content without a valid ACL may already be public, and scheduled + syncs may continue. Inspect the persistent status warnings and pass an + explicit resource acl or repair provider permissions. Valid private ACLs + remain enforced. An empty explicit list lets nobody read the content. + The credentials are used when the connector + is created; to rotate them later, call client.connectors.update. + """ + if acl is None: # Then only the provider's own permissions restrict this content. + catalog = client.list_providers().providers or [] + if not any(p.provider == provider and getattr(p, "acl_supported", False) for p in catalog): + raise ValueError(f"{provider} captures no permissions: pass acl to say who may read it") + identity = json.dumps([provider, database, collection, account], separators=(",", ":")) + name = "cookbook-" + hashlib.sha256(identity.encode("utf-8")).hexdigest() + connectors = client.connectors.list().connectors or [] + existing = [c for c in connectors if c.name == name] + if existing: # This account was connected on an earlier run. + if len(existing) != 1: + raise RuntimeError(f"Cannot verify connector identity: multiple connectors named {name}") + connector = existing[0] + scope_matches = ( + connector.provider_account_scope == account if provider in SCOPED + else connector.provider_account_scope in (None, "") + ) + if (not connector.connector_id + or (connector.provider, connector.database, connector.collection) != (provider, database, collection) + or not scope_matches): + raise RuntimeError(f"Cannot verify connector identity for {name}; no resources or ACLs were changed") + connector_id = connector.connector_id + else: + scope = {"provider_account_scope": account} if provider in SCOPED else {} + connector_id = client.connectors.create( + provider=provider, + name=name, + database=database, + collection=collection, + credentials=credentials, + **scope, + ).connector_id + + if client.connectors.status(connector_id).lifecycle == "pending_setup": + resources, cursor = [], None + while True: # Discover returns up to 100 resources per page. + page = client.connectors.discover(connector_id, cursor=cursor, limit=100) + resources += page.resources or [] + if not page.has_more: + break + cursor = page.next_cursor + if not resources: + raise RuntimeError(f"The {provider} credentials can reach nothing to sync") + rule = {} if acl is None else {"acl": acl} + client.connectors.configure( + connector_id, + lookback_days=lookback_days, + resources=[ + {"resource_id": r.id, "resource_type": r.resource_type, "name": r.name, **rule} + for r in resources + ], + ) + elif acl is not None: # Already configured: set the rule asked for now on every resource. + for resource in client.connectors.list_resources(connector_id).resources or []: + client.connectors.update_resource_acl( + connector_id, resource.resource_id, request={"acl": acl} + ) + + detail = f"first-sync polling did not run for {connector_id}" + deadline = time.time() + timeout + while time.time() < deadline: + status = client.connectors.status(connector_id) + if status.status in ("failed", "paused", "capped") or status.lifecycle == "reconnect": + raise RuntimeError(f"The {provider} connector is {status.status}: {status.error}") + failed = [r for r in status.resources or [] if r.status == "failed"] + detail = "; ".join(f"{r.display_name or r.resource_id}: {r.message}" for r in failed) + if any(r.retryable is False for r in failed): # Waiting will not fix these. + raise RuntimeError(f"The {provider} connector cannot sync {detail}") + if status.lifecycle == "active": + unread = [ + r.display_name or r.resource_id + for r in status.resources or [] + if r.acl_warning or r.page_acl_warning + ] + if acl is None and unread: # Synced without permissions: readable by everyone. + raise RuntimeError( + f"The {provider} connector could not read the permissions of " + + ", ".join(unread) + + ". Pass acl to restrict them." + + " This exception stops only the cookbook; it does not pause or delete the remote connector." + + " Content without a valid ACL may already be readable by every caller, and scheduled syncs may continue." + + " Inspect acl_warning/page_acl_warning in connector status and repair provider permissions or rerun with an explicit resource acl." + ) + if status.status == "healthy": + return connector_id + raise RuntimeError( + f"The {provider} connector is {status.status}, so its content is incomplete: " + + (detail or str(status.error)) + ) + time.sleep(10) + raise TimeoutError( + f"The {provider} connector synced nothing within {timeout} seconds" + + (f" ({detail})" if detail else "") + ) + + def source_ids(result): """Return the IDs an ingest accepted. Raise if it rejected any item.""" for item in result.data.results: diff --git a/style.css b/style.css index a1fa5413..da868c1a 100644 --- a/style.css +++ b/style.css @@ -82,3 +82,24 @@ .peer.is-not-custom.is-not-center ~ [class~="peer-[.is-not-custom]:peer-[.is-not-center]:max-w-8xl"] { max-width: 104rem !important; } + +/* Connector logos sit on the dashboard's neutral tile. A frontmatter icon is one for both themes, so the sidebar shows a monochrome mark's light-mode file in dark mode too; it takes the dashboard's light backing there. */ +img[src*="/images/connectors/"] { + background-color: rgba(0, 0, 0, 0.04) !important; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.09); + border-radius: 4px; + padding: 2px; +} +.dark img[src*="/images/connectors/"] { + background-color: rgba(255, 255, 255, 0.05) !important; + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09); +} +.dark img[src*="/images/connectors/"][src*="-light.svg"] { + background-color: rgba(255, 255, 255, 0.88) !important; + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); +} +img.connector-card-logo { + width: 24px; + height: 24px; + margin: 0; +}