@mapped/schema-graph-react-apollo 2.3.5 → 2.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1942,13 +1942,119 @@ export type ConnectorEntityImportResponse = {
1942
1942
  job?: Maybe<BaseJob>;
1943
1943
  };
1944
1944
 
1945
+ /**
1946
+ * Narrows the entities of one namespace. `previewConnectorEntities` (as `list.filter`) is the searchable listing; `listConnectorEntities` rejects a non-blank `searchQuery` with `UNIMPLEMENTED`.
1947
+ *
1948
+ * | Field | `listConnectorEntities` | `previewConnectorEntities` |
1949
+ * |---|---|---|
1950
+ * | `id` | `eq` / `in` | `eq` / `in` |
1951
+ * | `refId`, `mappingKey` | `eq` / `in` | ignored; use `searchQuery` |
1952
+ * | `mergingState` | the first of `eq`, `in`, `ne` that is set | `eq`, `in` and `ne` together, against the state the entity would have after this save |
1953
+ * | `lastChangeDate` | every operator set, so `gte` + `lte` is a closed range; an entity never merged matches no bound | same |
1954
+ * | `lastChangeKind` | the first of `eq`, `in`, `ne` that is set | same |
1955
+ * | `searchQuery` | rejected | the grammar below |
1956
+ *
1957
+ * **searchQuery**
1958
+ *
1959
+ * Up to three parts, separated by whitespace, in any order, all combined with AND. Canonical order:
1960
+ *
1961
+ * ```text
1962
+ * #tags gridv1:TOKEN free text
1963
+ * ```
1964
+ *
1965
+ * **Free text**
1966
+ *
1967
+ * - Split on whitespace; every word must appear, as a case-insensitive substring, somewhere in the entity. Word order does not matter.
1968
+ * - Searched: `refId`, the `exactType` and `baseType` names, every `context` value, and every field value of any type (displayed, default and saved), including an entity reference's readable parts.
1969
+ * - Platform ids (`id`, `mappedId`, `mappingKey`, `legacyMappingKey`, and the ids inside an entity reference) match only a word of 8 or more characters: a pasted id finds its entity, a short word such as `2` never matches every entity through a shared id prefix.
1970
+ * - Never searched: `sourceType`, context keys starting with `__`, field slugs, labels and `options`, boolean values, and platform state such as `mergingState` (use the hashtags).
1971
+ *
1972
+ * **Hashtags**
1973
+ *
1974
+ * Case-insensitive and whitespace-bounded; several are combined with AND. Each keeps the entities carrying that tag in `context.__preview.tags`:
1975
+ *
1976
+ * - `#selected`: selected after this save.
1977
+ * - `#added`: this save adds it to the graph.
1978
+ * - `#updated`: already in the graph, and its values change (by a user, a rule, or the source system since its last merge).
1979
+ * - `#deleted`: a user or a rule unselected it, so this save deletes it from the graph; never a missing entity.
1980
+ * - `#missing`: merged, but the source system no longer reports it, so every save deletes it; never tagged `deleted`.
1981
+ * - `#firstSeen`: first imported after the namespace's last save, selected or not; none until the namespace has been saved or merged once.
1982
+ * - `#unresolved`: added or updated, with an entity reference pointing at nothing in the graph. It runs the graph check: if the check cannot complete, the request fails with `ABORTED` (retry) or `RESOURCE_EXHAUSTED` (too many references) instead of returning an empty page.
1983
+ *
1984
+ * Any other `#word`, and a tag glued to another word (`abc#added`), is free text.
1985
+ *
1986
+ * **Grid token**
1987
+ *
1988
+ * A column filter and sort, at most one per query: `gridv1:` followed by the unpadded base64url encoding of this JSON (MUI X DataGrid's filter and sort models; other keys are ignored, both models are optional):
1989
+ *
1990
+ * ```json
1991
+ * {
1992
+ * "filterModel": {
1993
+ * "items": [{ "field": "floor", "operator": ">=", "value": 2 }],
1994
+ * "logicOperator": "and"
1995
+ * },
1996
+ * "sortModel": [{ "field": "name", "sort": "asc" }]
1997
+ * }
1998
+ * ```
1999
+ *
2000
+ * - `logicOperator` is `and` (the default) or `or`, over a flat list of items. `sort` is `asc`, `desc`, or `null` (ignored).
2001
+ * - `field` is a field slug, `@` followed by a context key (non-string values compare as their JSON), or one of the reserved keys `refId`, `mappingKey`, `mappedId`, `legacyMappingKey`. A field slug the namespace does not declare is ignored; a context key starting with `__` is rejected.
2002
+ * - Columns compare as numbers (`FLOOR_LEVEL` fields), by presence only (`ENTITY_REF` fields, whose names are resolved client-side; not sortable), or as text (every other field and key). Operators:
2003
+ *
2004
+ * ```text
2005
+ * operator text number entity reference
2006
+ * contains, doesNotContain yes - -
2007
+ * equals, =, is / doesNotEqual, !=, not yes yes -
2008
+ * startsWith, endsWith yes - -
2009
+ * isEmpty, isNotEmpty yes yes yes
2010
+ * isAnyOf (value is an array) yes yes -
2011
+ * >, >=, <, <= - yes -
2012
+ * ```
2013
+ *
2014
+ * - Values compare against the displayed value (after rules and unsaved edits). Text equality and `isAnyOf` ignore case and accents; `contains`, `startsWith` and `endsWith` ignore case only. Blank text counts as empty. An item with no usable value (missing, blank, `NaN`, an empty array) is ignored.
2015
+ * - Sort keys apply in order: natural order ("Room 2" before "Room 10"), case-insensitive, empty values last in both directions, ties broken by entity `id`.
2016
+ * - Filters and sorts the listing before pagination; never changes the counts.
2017
+ * - Limits, counted before ignored fields are dropped: 50 filter items, 200 `isAnyOf` values summed over the whole query, 10 sort keys, and a 32 KiB encoded payload.
2018
+ * - A second token, an unknown `gridvN` version, a payload that is not base64url JSON of this shape, an unknown operator, an operator the column cannot take, a sort on an entity reference, or a limit exceeded fails with `INVALID_ARGUMENT` and a message starting `Invalid grid query:`.
2019
+ *
2020
+ * **Example**
2021
+ *
2022
+ * For a namespace with fields `floor` (`FLOOR_LEVEL`), `building` (`ENTITY_REF`) and `name` (`NAME`): entities this save adds, on floor 2 or above, whose `department` context is IT or Facilities, with a building set, containing "lobby", sorted by name.
2023
+ *
2024
+ * ```text
2025
+ * #added gridv1:eyJmaWx0ZXJNb2RlbCI6eyJpdGVtcyI6W3siZmllbGQiOiJmbG9vciIsIm9wZXJhdG9yIjoiPj0iLCJ2YWx1ZSI6Mn0seyJmaWVsZCI6IkBkZXBhcnRtZW50Iiwib3BlcmF0b3IiOiJpc0FueU9mIiwidmFsdWUiOlsiSVQiLCJGYWNpbGl0aWVzIl19LHsiZmllbGQiOiJidWlsZGluZyIsIm9wZXJhdG9yIjoiaXNOb3RFbXB0eSJ9XSwibG9naWNPcGVyYXRvciI6ImFuZCJ9LCJzb3J0TW9kZWwiOlt7ImZpZWxkIjoibmFtZSIsInNvcnQiOiJhc2MifV19 lobby
2026
+ * ```
2027
+ *
2028
+ * The token decodes to:
2029
+ *
2030
+ * ```json
2031
+ * {
2032
+ * "filterModel": {
2033
+ * "items": [
2034
+ * { "field": "floor", "operator": ">=", "value": 2 },
2035
+ * { "field": "@department", "operator": "isAnyOf", "value": ["IT", "Facilities"] },
2036
+ * { "field": "building", "operator": "isNotEmpty" }
2037
+ * ],
2038
+ * "logicOperator": "and"
2039
+ * },
2040
+ * "sortModel": [{ "field": "name", "sort": "asc" }]
2041
+ * }
2042
+ * ```
2043
+ */
1945
2044
  export type ConnectorEntityListFilterInput = {
2045
+ /** Entity ids to keep, by eq or in. */
1946
2046
  id?: Maybe<IdFilterExpressionInput>;
2047
+ /** When a merge last changed the entity in the graph; every operator set applies, so gte with lte is a closed range, and an entity never merged matches no bound. */
1947
2048
  lastChangeDate?: Maybe<TimestampFilterExpressionInput>;
2049
+ /** What the last merge did to the entity; only the first operator set among eq, in and ne applies. */
1948
2050
  lastChangeKind?: Maybe<ConnectorEntityChangeKindFilterExpressionInput>;
2051
+ /** Mapping keys to keep, by eq or in; applied by listConnectorEntities only, previewConnectorEntities ignores it. */
1949
2052
  mappingKey?: Maybe<IdFilterExpressionInput>;
2053
+ /** Merging states to keep; listConnectorEntities applies the first operator set among eq, in and ne, previewConnectorEntities applies all of them to the state the entity would have after the save. */
1950
2054
  mergingState?: Maybe<ConnectorEntityMergingStateFilterExpressionInput>;
2055
+ /** Source-system ids to keep, by eq or in; applied by listConnectorEntities only, previewConnectorEntities ignores it. */
1951
2056
  refId?: Maybe<IdFilterExpressionInput>;
2057
+ /** Free text, hashtag filters and an optional grid filter and sort token, honoured by previewConnectorEntities only (listConnectorEntities rejects it); see the type description for the grammar and an example. */
1952
2058
  searchQuery?: Maybe<Scalars['String']>;
1953
2059
  };
1954
2060
 
@@ -13964,12 +13964,12 @@
13964
13964
  {
13965
13965
  "kind": "INPUT_OBJECT",
13966
13966
  "name": "ConnectorEntityListFilterInput",
13967
- "description": null,
13967
+ "description": "Narrows the entities of one namespace. `previewConnectorEntities` (as `list.filter`) is the searchable listing; `listConnectorEntities` rejects a non-blank `searchQuery` with `UNIMPLEMENTED`.\n\n| Field | `listConnectorEntities` | `previewConnectorEntities` |\n|---|---|---|\n| `id` | `eq` / `in` | `eq` / `in` |\n| `refId`, `mappingKey` | `eq` / `in` | ignored; use `searchQuery` |\n| `mergingState` | the first of `eq`, `in`, `ne` that is set | `eq`, `in` and `ne` together, against the state the entity would have after this save |\n| `lastChangeDate` | every operator set, so `gte` + `lte` is a closed range; an entity never merged matches no bound | same |\n| `lastChangeKind` | the first of `eq`, `in`, `ne` that is set | same |\n| `searchQuery` | rejected | the grammar below |\n\n**searchQuery**\n\nUp to three parts, separated by whitespace, in any order, all combined with AND. Canonical order:\n\n```text\n#tags gridv1:TOKEN free text\n```\n\n**Free text**\n\n- Split on whitespace; every word must appear, as a case-insensitive substring, somewhere in the entity. Word order does not matter.\n- Searched: `refId`, the `exactType` and `baseType` names, every `context` value, and every field value of any type (displayed, default and saved), including an entity reference's readable parts.\n- Platform ids (`id`, `mappedId`, `mappingKey`, `legacyMappingKey`, and the ids inside an entity reference) match only a word of 8 or more characters: a pasted id finds its entity, a short word such as `2` never matches every entity through a shared id prefix.\n- Never searched: `sourceType`, context keys starting with `__`, field slugs, labels and `options`, boolean values, and platform state such as `mergingState` (use the hashtags).\n\n**Hashtags**\n\nCase-insensitive and whitespace-bounded; several are combined with AND. Each keeps the entities carrying that tag in `context.__preview.tags`:\n\n- `#selected`: selected after this save.\n- `#added`: this save adds it to the graph.\n- `#updated`: already in the graph, and its values change (by a user, a rule, or the source system since its last merge).\n- `#deleted`: a user or a rule unselected it, so this save deletes it from the graph; never a missing entity.\n- `#missing`: merged, but the source system no longer reports it, so every save deletes it; never tagged `deleted`.\n- `#firstSeen`: first imported after the namespace's last save, selected or not; none until the namespace has been saved or merged once.\n- `#unresolved`: added or updated, with an entity reference pointing at nothing in the graph. It runs the graph check: if the check cannot complete, the request fails with `ABORTED` (retry) or `RESOURCE_EXHAUSTED` (too many references) instead of returning an empty page.\n\nAny other `#word`, and a tag glued to another word (`abc#added`), is free text.\n\n**Grid token**\n\nA column filter and sort, at most one per query: `gridv1:` followed by the unpadded base64url encoding of this JSON (MUI X DataGrid's filter and sort models; other keys are ignored, both models are optional):\n\n```json\n{\n \"filterModel\": {\n \"items\": [{ \"field\": \"floor\", \"operator\": \">=\", \"value\": 2 }],\n \"logicOperator\": \"and\"\n },\n \"sortModel\": [{ \"field\": \"name\", \"sort\": \"asc\" }]\n}\n```\n\n- `logicOperator` is `and` (the default) or `or`, over a flat list of items. `sort` is `asc`, `desc`, or `null` (ignored).\n- `field` is a field slug, `@` followed by a context key (non-string values compare as their JSON), or one of the reserved keys `refId`, `mappingKey`, `mappedId`, `legacyMappingKey`. A field slug the namespace does not declare is ignored; a context key starting with `__` is rejected.\n- Columns compare as numbers (`FLOOR_LEVEL` fields), by presence only (`ENTITY_REF` fields, whose names are resolved client-side; not sortable), or as text (every other field and key). Operators:\n\n```text\noperator text number entity reference\ncontains, doesNotContain yes - -\nequals, =, is / doesNotEqual, !=, not yes yes -\nstartsWith, endsWith yes - -\nisEmpty, isNotEmpty yes yes yes\nisAnyOf (value is an array) yes yes -\n>, >=, <, <= - yes -\n```\n\n- Values compare against the displayed value (after rules and unsaved edits). Text equality and `isAnyOf` ignore case and accents; `contains`, `startsWith` and `endsWith` ignore case only. Blank text counts as empty. An item with no usable value (missing, blank, `NaN`, an empty array) is ignored.\n- Sort keys apply in order: natural order (\"Room 2\" before \"Room 10\"), case-insensitive, empty values last in both directions, ties broken by entity `id`.\n- Filters and sorts the listing before pagination; never changes the counts.\n- Limits, counted before ignored fields are dropped: 50 filter items, 200 `isAnyOf` values summed over the whole query, 10 sort keys, and a 32 KiB encoded payload.\n- A second token, an unknown `gridvN` version, a payload that is not base64url JSON of this shape, an unknown operator, an operator the column cannot take, a sort on an entity reference, or a limit exceeded fails with `INVALID_ARGUMENT` and a message starting `Invalid grid query:`.\n\n**Example**\n\nFor a namespace with fields `floor` (`FLOOR_LEVEL`), `building` (`ENTITY_REF`) and `name` (`NAME`): entities this save adds, on floor 2 or above, whose `department` context is IT or Facilities, with a building set, containing \"lobby\", sorted by name.\n\n```text\n#added gridv1:eyJmaWx0ZXJNb2RlbCI6eyJpdGVtcyI6W3siZmllbGQiOiJmbG9vciIsIm9wZXJhdG9yIjoiPj0iLCJ2YWx1ZSI6Mn0seyJmaWVsZCI6IkBkZXBhcnRtZW50Iiwib3BlcmF0b3IiOiJpc0FueU9mIiwidmFsdWUiOlsiSVQiLCJGYWNpbGl0aWVzIl19LHsiZmllbGQiOiJidWlsZGluZyIsIm9wZXJhdG9yIjoiaXNOb3RFbXB0eSJ9XSwibG9naWNPcGVyYXRvciI6ImFuZCJ9LCJzb3J0TW9kZWwiOlt7ImZpZWxkIjoibmFtZSIsInNvcnQiOiJhc2MifV19 lobby\n```\n\nThe token decodes to:\n\n```json\n{\n \"filterModel\": {\n \"items\": [\n { \"field\": \"floor\", \"operator\": \">=\", \"value\": 2 },\n { \"field\": \"@department\", \"operator\": \"isAnyOf\", \"value\": [\"IT\", \"Facilities\"] },\n { \"field\": \"building\", \"operator\": \"isNotEmpty\" }\n ],\n \"logicOperator\": \"and\"\n },\n \"sortModel\": [{ \"field\": \"name\", \"sort\": \"asc\" }]\n}\n```",
13968
13968
  "fields": null,
13969
13969
  "inputFields": [
13970
13970
  {
13971
13971
  "name": "id",
13972
- "description": null,
13972
+ "description": "Entity ids to keep, by eq or in.",
13973
13973
  "type": {
13974
13974
  "kind": "INPUT_OBJECT",
13975
13975
  "name": "IDFilterExpressionInput",
@@ -13981,7 +13981,7 @@
13981
13981
  },
13982
13982
  {
13983
13983
  "name": "lastChangeDate",
13984
- "description": null,
13984
+ "description": "When a merge last changed the entity in the graph; every operator set applies, so gte with lte is a closed range, and an entity never merged matches no bound.",
13985
13985
  "type": {
13986
13986
  "kind": "INPUT_OBJECT",
13987
13987
  "name": "TimestampFilterExpressionInput",
@@ -13993,7 +13993,7 @@
13993
13993
  },
13994
13994
  {
13995
13995
  "name": "lastChangeKind",
13996
- "description": null,
13996
+ "description": "What the last merge did to the entity; only the first operator set among eq, in and ne applies.",
13997
13997
  "type": {
13998
13998
  "kind": "INPUT_OBJECT",
13999
13999
  "name": "ConnectorEntityChangeKindFilterExpressionInput",
@@ -14005,7 +14005,7 @@
14005
14005
  },
14006
14006
  {
14007
14007
  "name": "mappingKey",
14008
- "description": null,
14008
+ "description": "Mapping keys to keep, by eq or in; applied by listConnectorEntities only, previewConnectorEntities ignores it.",
14009
14009
  "type": {
14010
14010
  "kind": "INPUT_OBJECT",
14011
14011
  "name": "IDFilterExpressionInput",
@@ -14017,7 +14017,7 @@
14017
14017
  },
14018
14018
  {
14019
14019
  "name": "mergingState",
14020
- "description": null,
14020
+ "description": "Merging states to keep; listConnectorEntities applies the first operator set among eq, in and ne, previewConnectorEntities applies all of them to the state the entity would have after the save.",
14021
14021
  "type": {
14022
14022
  "kind": "INPUT_OBJECT",
14023
14023
  "name": "ConnectorEntityMergingStateFilterExpressionInput",
@@ -14029,7 +14029,7 @@
14029
14029
  },
14030
14030
  {
14031
14031
  "name": "refId",
14032
- "description": null,
14032
+ "description": "Source-system ids to keep, by eq or in; applied by listConnectorEntities only, previewConnectorEntities ignores it.",
14033
14033
  "type": {
14034
14034
  "kind": "INPUT_OBJECT",
14035
14035
  "name": "IDFilterExpressionInput",
@@ -14041,7 +14041,7 @@
14041
14041
  },
14042
14042
  {
14043
14043
  "name": "searchQuery",
14044
- "description": null,
14044
+ "description": "Free text, hashtag filters and an optional grid filter and sort token, honoured by previewConnectorEntities only (listConnectorEntities rejects it); see the type description for the grammar and an example.",
14045
14045
  "type": {
14046
14046
  "kind": "SCALAR",
14047
14047
  "name": "String",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapped/schema-graph-react-apollo",
3
- "version": "2.3.5",
3
+ "version": "2.3.7",
4
4
  "license": "MIT",
5
5
  "description": "Mapped Graph TypeScript typings for react-apollo",
6
6
  "repository": {