entryscape 1.3.0__py3-none-any.whl

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.
Files changed (82) hide show
  1. entryscape/__init__.py +219 -0
  2. entryscape/api/__init__.py +26 -0
  3. entryscape/api/app_token_api.py +835 -0
  4. entryscape/api/auth_api.py +965 -0
  5. entryscape/api/catalog_api.py +4473 -0
  6. entryscape/api/contact_api.py +3135 -0
  7. entryscape/api/dataservice_api.py +3135 -0
  8. entryscape/api/dataset_api.py +3804 -0
  9. entryscape/api/distribution_api.py +3135 -0
  10. entryscape/api/document_api.py +2740 -0
  11. entryscape/api/idea_api.py +2740 -0
  12. entryscape/api/job_api.py +360 -0
  13. entryscape/api/model_api.py +2446 -0
  14. entryscape/api/model_class_api.py +2611 -0
  15. entryscape/api/model_diagram_api.py +2611 -0
  16. entryscape/api/model_field_api.py +2611 -0
  17. entryscape/api/model_form_api.py +2611 -0
  18. entryscape/api/model_namespace_api.py +2611 -0
  19. entryscape/api/model_property_api.py +2611 -0
  20. entryscape/api/organization_api.py +3135 -0
  21. entryscape/api/search_api.py +1513 -0
  22. entryscape/api/showcase_api.py +2740 -0
  23. entryscape/api/suggestion_api.py +2740 -0
  24. entryscape/api/terminology_api.py +1726 -0
  25. entryscape/api/upload_api.py +814 -0
  26. entryscape/api_client.py +763 -0
  27. entryscape/api_response.py +20 -0
  28. entryscape/configuration.py +673 -0
  29. entryscape/exceptions.py +222 -0
  30. entryscape/models/__init__.py +71 -0
  31. entryscape/models/app_token.py +156 -0
  32. entryscape/models/app_token_create_request.py +98 -0
  33. entryscape/models/app_token_create_response.py +169 -0
  34. entryscape/models/app_token_status.py +35 -0
  35. entryscape/models/app_token_verify_request.py +109 -0
  36. entryscape/models/entity_list_item.py +175 -0
  37. entryscape/models/entity_list_response.py +139 -0
  38. entryscape/models/entity_reference.py +189 -0
  39. entryscape/models/entity_type.py +57 -0
  40. entryscape/models/error.py +135 -0
  41. entryscape/models/facet_field.py +115 -0
  42. entryscape/models/facet_field_values_inner.py +100 -0
  43. entryscape/models/facet_list.py +113 -0
  44. entryscape/models/facet_list_available_inner.py +107 -0
  45. entryscape/models/job_response.py +112 -0
  46. entryscape/models/job_status.py +189 -0
  47. entryscape/models/job_status_progress.py +100 -0
  48. entryscape/models/job_status_value.py +37 -0
  49. entryscape/models/job_type.py +37 -0
  50. entryscape/models/list_catalogs_entry_type_parameter.py +37 -0
  51. entryscape/models/list_catalogs_graph_type_parameter.py +44 -0
  52. entryscape/models/list_catalogs_resource_type_parameter.py +37 -0
  53. entryscape/models/login_request.py +108 -0
  54. entryscape/models/login_response.py +115 -0
  55. entryscape/models/metadata_format.py +38 -0
  56. entryscape/models/metadata_request.py +99 -0
  57. entryscape/models/parent_reference.py +130 -0
  58. entryscape/models/search_request.py +158 -0
  59. entryscape/models/search_request_filters.py +144 -0
  60. entryscape/models/search_request_filters_graph_type.py +44 -0
  61. entryscape/models/search_request_filters_resource_type.py +37 -0
  62. entryscape/models/search_request_sort.py +38 -0
  63. entryscape/models/search_request_sort_order.py +35 -0
  64. entryscape/models/search_response.py +175 -0
  65. entryscape/models/search_result.py +175 -0
  66. entryscape/models/search_result_graph_type.py +44 -0
  67. entryscape/models/search_result_resource_type.py +37 -0
  68. entryscape/models/search_sort_order_parameter.py +35 -0
  69. entryscape/models/terminology_import_mode.py +35 -0
  70. entryscape/models/validation_profile.py +36 -0
  71. entryscape/models/validation_response.py +149 -0
  72. entryscape/models/validation_result.py +162 -0
  73. entryscape/models/validation_severity.py +36 -0
  74. entryscape/models/validation_summary.py +122 -0
  75. entryscape/models/whoami_response.py +104 -0
  76. entryscape/py.typed +0 -0
  77. entryscape/rest.py +210 -0
  78. entryscape-1.3.0.dist-info/METADATA +696 -0
  79. entryscape-1.3.0.dist-info/RECORD +82 -0
  80. entryscape-1.3.0.dist-info/WHEEL +5 -0
  81. entryscape-1.3.0.dist-info/licenses/LICENSE.txt +165 -0
  82. entryscape-1.3.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3135 @@
1
+ """
2
+ EntryScape API
3
+
4
+ This API provides structured access to EntryScape data following DCAT-AP standards. All entity endpoints follow a consistent pattern: - GET /{entity} - List all entities - POST /{entity} - Create a new entity (DCAT types only) - GET /{entity}/{context_id}/{entry_id} - Get entity reference info - DELETE /{entity}/{context_id}/{entry_id} - Delete an entity (DCAT types only) - GET /{entity}/{context_id}/{entry_id}/metadata - Get raw RDF metadata - PUT /{entity}/{context_id}/{entry_id}/metadata - Replace raw RDF metadata (JSON-LD, Turtle, RDF/XML, or N-Triples passthrough) ## Reading and consistency Reads of a single entity — `GET /{entity}/{context_id}/{entry_id}` and its `/metadata` — go straight to the store and always reflect the latest write. Lists and search do not. They are answered from a search index that is updated asynchronously, so for a short interval after a write: - an entry that was just created may be missing from the list it belongs to, while reading it by id already works; - an entry that was just deleted may still appear; - `results` counts what the index holds, not what the store holds. Write a client that tolerates this: after creating an entry, use the id the create returned rather than searching for what you just wrote. `results` is also an upper bound rather than an exact count when the caller cannot read every hit (see the field's own description). Separately, responses are cached for 15 minutes by default, which is a second and unrelated source of staleness. A write invalidates the cache entries it affects, but a read that lands in the indexing gap can cache a list that does not yet show it. ## Authentication Most endpoints require an authenticated session. Reading public data works without authentication, while creating, updating, and deleting entities requires a valid user session. 1. **Log in** with `POST /auth/login`, supplying an EntryStore username and password. The response returns an `auth_token`. 2. **Send the token** on subsequent requests via the `X-Auth-Token` header. This is the recommended method for SDK and programmatic access. Browser clients can instead rely on the `auth_token` cookie, which the server sets automatically on login (`SameSite=Lax; Secure`). 3. **Inspect the session** with `GET /auth/whoami`, which returns the current user or an anonymous/guest identity when no valid token is supplied. 4. **Log out** with `POST /auth/logout` to invalidate the token and clear the cookie. ### Writes and CSRF Send the token as the `X-Auth-Token` **header** and there is nothing else to do: creates, updates and deletes work as they are, which is how the SDKs and the MCP server are built. The `auth_token` cookie is different. A cookie is attached by the browser automatically, so a state-changing request authenticated by it alone is what cross-site request forgery abuses, and those requests additionally need a double-submit token: read the `XSRF-TOKEN` cookie the server sets on any response and send its value back as the `X-XSRF-TOKEN` header. Without it the request is rejected with `403` before it reaches the endpoint. A custom header cannot be forged this way — cross-origin JavaScript cannot set one without a CORS preflight, which this API grants only to configured origins — so the header is the recommended path for anything that is not a browser session. ### App Tokens An app token identifies an integration. Create one with `POST /app-token` (unauthenticated). Creation requires an email address: the token starts in the `pending` state and a 6-digit code is emailed to the owner. Confirm the code with `POST /app-token/verify` to activate the token and receive its value, which is shown only once — store it securely. `GET /app-token/{app_token_id}` then returns its details and quota usage, authenticated by the token itself via the `X-App-Token` header. **The `X-App-Token` header is accepted only by `GET /app-token/{app_token_id}`.** No other operation reads it, and the read quota is recorded but not yet enforced: reading public data needs no token of any kind, and sending an app token with a read neither grants nor meters anything. Metered public read access is the intent of the two-token model, not a description of this release — see the `security` declared on each operation for what it actually accepts. ## SDKs Generated clients for Python, TypeScript, JavaScript and C# wrap every operation below, and each operation on this page shows the SDK call beside the `curl` command. Two of them install from a public registry: ``` pip install entryscape # Python npm install @entryscape/api-client # TypeScript and JavaScript ``` `@entryscape/api-client` ships an ESM and a CommonJS build, so `import` and `require()` both work and TypeScript is not required to use it — the name describes what it is written in, not what you have to write. There is a separate generated JavaScript SDK, and it is deliberately **not** on npm; this package is the npm client for both languages. Every SDK, including the C# and JavaScript ones, is also published as a tarball. The downloads are linked in the sidebar, they are the route to take when a registry is unreachable or a build has to vendor its dependencies, and each archive carries the SDK's own README: - **Python** — `pip install entryscape`, or `python-sdk.tar.gz`. - **TypeScript and JavaScript** — `npm install @entryscape/api-client`, or `typescript-sdk.tar.gz`. - **JavaScript (the separate generated client)** — not published to a registry, by design; `javascript-sdk.tar.gz` only. - **C#** — not published to NuGet yet; `csharp-sdk.tar.gz` only. - **MCP server** — `npx -y @entryscape/mcp-server`, or `mcp-server.tar.gz`. ## MCP Server A Model Context Protocol (MCP) server is generated from this specification and published alongside the SDKs (`@entryscape/mcp-server`), exposing the API as tools for AI assistants and agents. Each operation becomes one tool named after its `operationId` — `listDatasets`, `createCatalog`, `search`, `getJobStatus`. The `auth` operations are the exception: the server reads its token once at startup, so a `login` tool could install nothing and a `logout` tool would only invalidate the token the server was started with. On connect the server also hands the assistant a short set of rules that hold across every tool: a token is bound to one EntryStore instance, the search index lags a write, uploads finish as jobs. ### Install The server is on npm, and MCP servers are normally launched straight from there, so nothing has to be installed first: ``` npx -y @entryscape/mcp-server ``` `npm install -g @entryscape/mcp-server` works too and puts an `entryscape-mcp` binary on `PATH`. It is also listed in the MCP Registry as `com.entryscape/mcp-server`, which is where clients and marketplaces look it up. Without npm, download `mcp-server.tar.gz` from the SDK downloads and unpack it. The package ships prebuilt; install its runtime dependency once: ``` mkdir entryscape-mcp && tar -xzf mcp-server.tar.gz -C entryscape-mcp cd entryscape-mcp && npm install --omit=dev ``` ### Configure The server is a stdio MCP server configured through environment variables, read once at startup: - `ENTRYSCAPE_API_URL` — base URL of the API server, path included. Required: there is no default, and the server refuses to start without it. - `ENTRYSCAPE_AUTH_TOKEN` — a session token from `POST /auth/login`, sent as the `X-Auth-Token` header. Optional: without it reads see public entries and every write is refused. A token is valid only for the EntryStore instance that issued it. - `ENTRYSCAPE_ENTRYSTORE_HOST` — the EntryStore instance the API server should use, for example `dev.entryscape.com/store/`. Unset means the API server's own default. - `ENTRYSCAPE_MCP_UPLOAD_ROOT` — the directory the upload tools may read files from. **Unset means uploads are disabled**: `addFileToDistribution`, `replaceFileInDistribution` and `importTerminology` refuse and say so. - `ENTRYSCAPE_MCP_TAGS` — comma-separated tags to serve tools for, for example `catalog,dataset,distribution,search`. Unset serves every tool. The package's `README.md` lists the remaining variables (timeouts and size caps). Register the server with any MCP-capable client by adding it to the client's `mcpServers` configuration: ```json { \"mcpServers\": { \"entryscape\": { \"command\": \"npx\", \"args\": [\"-y\", \"@entryscape/mcp-server\"], \"env\": { \"ENTRYSCAPE_API_URL\": \"https://<your EntryScape API host>\", \"ENTRYSCAPE_AUTH_TOKEN\": \"your-session-token\" } } } } ``` From an unpacked download instead, the command is `\"command\": \"node\", \"args\": [\"/path/to/entryscape-mcp/dist/bin/entryscape-mcp.js\"]`. ### Claude Code The unpacked package is also a Claude Code plugin, so one install gives the server and the skills below together. Claude Code installs plugins from marketplaces, and the package carries a one-entry marketplace pointing at itself: ``` claude plugin marketplace add /path/to/entryscape-mcp claude plugin install entryscape@entryscape --scope user ``` The plugin passes `ENTRYSCAPE_API_URL`, `ENTRYSCAPE_AUTH_TOKEN`, `ENTRYSCAPE_ENTRYSTORE_HOST`, `ENTRYSCAPE_MCP_TAGS` and `ENTRYSCAPE_MCP_UPLOAD_ROOT` through from the shell Claude Code was started in, so set them there. To try the plugin for one session without installing it, start Claude Code with `--plugin-dir /path/to/entryscape-mcp`. ### Skills `skills/` in the package holds procedures that span several tools, in the Agent Skills format (a `SKILL.md` with `name` and `description`): which tools to call in which order, what to check between calls, and where to stop. Claude Code loads them from the plugin; other clients that read the format can be pointed at the directory. The `find` skill covers discovery, facets and selective metadata reads; `publish-dataset` takes a dataset from catalog to validated distribution with its file; `edit-metadata` changes an entry that already exists without dropping the rest of its graph, models included; `migrate-from-taskrunner` moves an integration off the deprecated Taskrunner API. Every tool a skill names is checked against this specification when the package is built. ## Deprecation Policy When endpoints or features are deprecated: 1. The operation is marked with `deprecated: true` in this spec 2. The operation description documents the replacement endpoint and sunset date 3. Deprecated endpoints remain functional for at least 6 months after announcement 4. The server returns a `Sunset` header with the planned removal date 5. After the sunset date, the endpoint may be removed in a future release
5
+
6
+ The version of the OpenAPI document: 1.3.0
7
+ Contact: contact@entryscape.com
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from datetime import datetime
19
+ from pydantic import Field, StrictBool, StrictStr, field_validator
20
+ from typing import Any, Dict, Optional
21
+ from typing_extensions import Annotated
22
+ from entryscape.models.entity_list_response import EntityListResponse
23
+ from entryscape.models.entity_reference import EntityReference
24
+ from entryscape.models.list_catalogs_entry_type_parameter import (
25
+ ListCatalogsEntryTypeParameter,
26
+ )
27
+ from entryscape.models.list_catalogs_graph_type_parameter import (
28
+ ListCatalogsGraphTypeParameter,
29
+ )
30
+ from entryscape.models.list_catalogs_resource_type_parameter import (
31
+ ListCatalogsResourceTypeParameter,
32
+ )
33
+ from entryscape.models.metadata_format import MetadataFormat
34
+ from entryscape.models.metadata_request import MetadataRequest
35
+ from entryscape.models.validation_profile import ValidationProfile
36
+ from entryscape.models.validation_response import ValidationResponse
37
+
38
+ from entryscape.api_client import ApiClient, RequestSerialized
39
+ from entryscape.api_response import ApiResponse
40
+ from entryscape.rest import RESTResponseType
41
+
42
+
43
+ class ContactApi:
44
+ """NOTE: This class is auto generated by OpenAPI Generator
45
+ Ref: https://openapi-generator.tech
46
+
47
+ Do not edit the class manually.
48
+ """
49
+
50
+ def __init__(self, api_client=None) -> None:
51
+ if api_client is None:
52
+ api_client = ApiClient.get_default()
53
+ self.api_client = api_client
54
+
55
+ @validate_call
56
+ async def create_contact(
57
+ self,
58
+ context: Annotated[
59
+ str,
60
+ Field(
61
+ strict=True,
62
+ description="The context (catalog) ID where the new entity will be created",
63
+ ),
64
+ ],
65
+ metadata_request: Annotated[
66
+ MetadataRequest,
67
+ Field(
68
+ description="With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
69
+ ),
70
+ ],
71
+ x_entrystore_host: Annotated[
72
+ Optional[StrictStr],
73
+ Field(
74
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
75
+ ),
76
+ ] = None,
77
+ entrystore_host: Annotated[
78
+ Optional[StrictStr],
79
+ Field(
80
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
81
+ ),
82
+ ] = None,
83
+ _request_timeout: Union[
84
+ None,
85
+ Annotated[StrictFloat, Field(gt=0)],
86
+ Tuple[
87
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
88
+ ],
89
+ ] = None,
90
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
91
+ _content_type: Optional[StrictStr] = None,
92
+ _headers: Optional[Dict[StrictStr, Any]] = None,
93
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
94
+ ) -> EntityReference:
95
+ """Create contact
96
+
97
+ Creates a new contact in the specified context. The request body must contain valid vCard metadata in JSON-LD format. The `@type` must be `vcard:Kind` — that is the only type this endpoint accepts, and anything else is rejected with `400`. A contact already in the store may carry `vcard:Organization` or `vcard:Individual` instead, and both are read back and matched by a type-filtered search; they just cannot be created here. Requires authentication with write access to the target context.
98
+
99
+ :param context: The context (catalog) ID where the new entity will be created (required)
100
+ :type context: str
101
+ :param metadata_request: With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
102
+ :type metadata_request: MetadataRequest
103
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
104
+ :type x_entrystore_host: str
105
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
106
+ :type entrystore_host: str
107
+ :param _request_timeout: timeout setting for this request. If one
108
+ number provided, it will be total request
109
+ timeout. It can also be a pair (tuple) of
110
+ (connection, read) timeouts.
111
+ :type _request_timeout: int, tuple(int, int), optional
112
+ :param _request_auth: set to override the auth_settings for an a single
113
+ request; this effectively ignores the
114
+ authentication in the spec for a single request.
115
+ :type _request_auth: dict, optional
116
+ :param _content_type: force content-type for the request.
117
+ :type _content_type: str, Optional
118
+ :param _headers: set to override the headers for a single
119
+ request; this effectively ignores the headers
120
+ in the spec for a single request.
121
+ :type _headers: dict, optional
122
+ :param _host_index: set to override the host_index for a single
123
+ request; this effectively ignores the host_index
124
+ in the spec for a single request.
125
+ :type _host_index: int, optional
126
+ :return: Returns the result object.
127
+ """ # noqa: E501
128
+
129
+ _param = self._create_contact_serialize(
130
+ context=context,
131
+ metadata_request=metadata_request,
132
+ x_entrystore_host=x_entrystore_host,
133
+ entrystore_host=entrystore_host,
134
+ _request_auth=_request_auth,
135
+ _content_type=_content_type,
136
+ _headers=_headers,
137
+ _host_index=_host_index,
138
+ )
139
+
140
+ _response_types_map: Dict[str, Optional[str]] = {
141
+ "201": "EntityReference",
142
+ "400": "Error",
143
+ "401": "Error",
144
+ "403": "Error",
145
+ "404": "Error",
146
+ "409": "Error",
147
+ "422": "ValidationResponse",
148
+ "500": "Error",
149
+ "503": "Error",
150
+ }
151
+ response_data = await self.api_client.call_api(
152
+ *_param, _request_timeout=_request_timeout
153
+ )
154
+ await response_data.read()
155
+ return self.api_client.response_deserialize(
156
+ response_data=response_data,
157
+ response_types_map=_response_types_map,
158
+ ).data
159
+
160
+ @validate_call
161
+ async def create_contact_with_http_info(
162
+ self,
163
+ context: Annotated[
164
+ str,
165
+ Field(
166
+ strict=True,
167
+ description="The context (catalog) ID where the new entity will be created",
168
+ ),
169
+ ],
170
+ metadata_request: Annotated[
171
+ MetadataRequest,
172
+ Field(
173
+ description="With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
174
+ ),
175
+ ],
176
+ x_entrystore_host: Annotated[
177
+ Optional[StrictStr],
178
+ Field(
179
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
180
+ ),
181
+ ] = None,
182
+ entrystore_host: Annotated[
183
+ Optional[StrictStr],
184
+ Field(
185
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
186
+ ),
187
+ ] = None,
188
+ _request_timeout: Union[
189
+ None,
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Tuple[
192
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
193
+ ],
194
+ ] = None,
195
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
196
+ _content_type: Optional[StrictStr] = None,
197
+ _headers: Optional[Dict[StrictStr, Any]] = None,
198
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
199
+ ) -> ApiResponse[EntityReference]:
200
+ """Create contact
201
+
202
+ Creates a new contact in the specified context. The request body must contain valid vCard metadata in JSON-LD format. The `@type` must be `vcard:Kind` — that is the only type this endpoint accepts, and anything else is rejected with `400`. A contact already in the store may carry `vcard:Organization` or `vcard:Individual` instead, and both are read back and matched by a type-filtered search; they just cannot be created here. Requires authentication with write access to the target context.
203
+
204
+ :param context: The context (catalog) ID where the new entity will be created (required)
205
+ :type context: str
206
+ :param metadata_request: With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
207
+ :type metadata_request: MetadataRequest
208
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
209
+ :type x_entrystore_host: str
210
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
211
+ :type entrystore_host: str
212
+ :param _request_timeout: timeout setting for this request. If one
213
+ number provided, it will be total request
214
+ timeout. It can also be a pair (tuple) of
215
+ (connection, read) timeouts.
216
+ :type _request_timeout: int, tuple(int, int), optional
217
+ :param _request_auth: set to override the auth_settings for an a single
218
+ request; this effectively ignores the
219
+ authentication in the spec for a single request.
220
+ :type _request_auth: dict, optional
221
+ :param _content_type: force content-type for the request.
222
+ :type _content_type: str, Optional
223
+ :param _headers: set to override the headers for a single
224
+ request; this effectively ignores the headers
225
+ in the spec for a single request.
226
+ :type _headers: dict, optional
227
+ :param _host_index: set to override the host_index for a single
228
+ request; this effectively ignores the host_index
229
+ in the spec for a single request.
230
+ :type _host_index: int, optional
231
+ :return: Returns the result object.
232
+ """ # noqa: E501
233
+
234
+ _param = self._create_contact_serialize(
235
+ context=context,
236
+ metadata_request=metadata_request,
237
+ x_entrystore_host=x_entrystore_host,
238
+ entrystore_host=entrystore_host,
239
+ _request_auth=_request_auth,
240
+ _content_type=_content_type,
241
+ _headers=_headers,
242
+ _host_index=_host_index,
243
+ )
244
+
245
+ _response_types_map: Dict[str, Optional[str]] = {
246
+ "201": "EntityReference",
247
+ "400": "Error",
248
+ "401": "Error",
249
+ "403": "Error",
250
+ "404": "Error",
251
+ "409": "Error",
252
+ "422": "ValidationResponse",
253
+ "500": "Error",
254
+ "503": "Error",
255
+ }
256
+ response_data = await self.api_client.call_api(
257
+ *_param, _request_timeout=_request_timeout
258
+ )
259
+ await response_data.read()
260
+ return self.api_client.response_deserialize(
261
+ response_data=response_data,
262
+ response_types_map=_response_types_map,
263
+ )
264
+
265
+ @validate_call
266
+ async def create_contact_without_preload_content(
267
+ self,
268
+ context: Annotated[
269
+ str,
270
+ Field(
271
+ strict=True,
272
+ description="The context (catalog) ID where the new entity will be created",
273
+ ),
274
+ ],
275
+ metadata_request: Annotated[
276
+ MetadataRequest,
277
+ Field(
278
+ description="With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
279
+ ),
280
+ ],
281
+ x_entrystore_host: Annotated[
282
+ Optional[StrictStr],
283
+ Field(
284
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
285
+ ),
286
+ ] = None,
287
+ entrystore_host: Annotated[
288
+ Optional[StrictStr],
289
+ Field(
290
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
291
+ ),
292
+ ] = None,
293
+ _request_timeout: Union[
294
+ None,
295
+ Annotated[StrictFloat, Field(gt=0)],
296
+ Tuple[
297
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
298
+ ],
299
+ ] = None,
300
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
301
+ _content_type: Optional[StrictStr] = None,
302
+ _headers: Optional[Dict[StrictStr, Any]] = None,
303
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
304
+ ) -> RESTResponseType:
305
+ """Create contact
306
+
307
+ Creates a new contact in the specified context. The request body must contain valid vCard metadata in JSON-LD format. The `@type` must be `vcard:Kind` — that is the only type this endpoint accepts, and anything else is rejected with `400`. A contact already in the store may carry `vcard:Organization` or `vcard:Individual` instead, and both are read back and matched by a type-filtered search; they just cannot be created here. Requires authentication with write access to the target context.
308
+
309
+ :param context: The context (catalog) ID where the new entity will be created (required)
310
+ :type context: str
311
+ :param metadata_request: With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
312
+ :type metadata_request: MetadataRequest
313
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
314
+ :type x_entrystore_host: str
315
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
316
+ :type entrystore_host: str
317
+ :param _request_timeout: timeout setting for this request. If one
318
+ number provided, it will be total request
319
+ timeout. It can also be a pair (tuple) of
320
+ (connection, read) timeouts.
321
+ :type _request_timeout: int, tuple(int, int), optional
322
+ :param _request_auth: set to override the auth_settings for an a single
323
+ request; this effectively ignores the
324
+ authentication in the spec for a single request.
325
+ :type _request_auth: dict, optional
326
+ :param _content_type: force content-type for the request.
327
+ :type _content_type: str, Optional
328
+ :param _headers: set to override the headers for a single
329
+ request; this effectively ignores the headers
330
+ in the spec for a single request.
331
+ :type _headers: dict, optional
332
+ :param _host_index: set to override the host_index for a single
333
+ request; this effectively ignores the host_index
334
+ in the spec for a single request.
335
+ :type _host_index: int, optional
336
+ :return: Returns the result object.
337
+ """ # noqa: E501
338
+
339
+ _param = self._create_contact_serialize(
340
+ context=context,
341
+ metadata_request=metadata_request,
342
+ x_entrystore_host=x_entrystore_host,
343
+ entrystore_host=entrystore_host,
344
+ _request_auth=_request_auth,
345
+ _content_type=_content_type,
346
+ _headers=_headers,
347
+ _host_index=_host_index,
348
+ )
349
+
350
+ _response_types_map: Dict[str, Optional[str]] = {
351
+ "201": "EntityReference",
352
+ "400": "Error",
353
+ "401": "Error",
354
+ "403": "Error",
355
+ "404": "Error",
356
+ "409": "Error",
357
+ "422": "ValidationResponse",
358
+ "500": "Error",
359
+ "503": "Error",
360
+ }
361
+ response_data = await self.api_client.call_api(
362
+ *_param, _request_timeout=_request_timeout
363
+ )
364
+ return response_data.response
365
+
366
+ def _create_contact_serialize(
367
+ self,
368
+ context,
369
+ metadata_request,
370
+ x_entrystore_host,
371
+ entrystore_host,
372
+ _request_auth,
373
+ _content_type,
374
+ _headers,
375
+ _host_index,
376
+ ) -> RequestSerialized:
377
+
378
+ _host = None
379
+
380
+ _collection_formats: Dict[str, str] = {}
381
+
382
+ _path_params: Dict[str, str] = {}
383
+ _query_params: List[Tuple[str, str]] = []
384
+ _header_params: Dict[str, Optional[str]] = _headers or {}
385
+ _form_params: List[Tuple[str, str]] = []
386
+ _files: Dict[
387
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
388
+ ] = {}
389
+ _body_params: Optional[bytes] = None
390
+
391
+ # process the path parameters
392
+ # process the query parameters
393
+ if entrystore_host is not None:
394
+
395
+ _query_params.append(("entrystore_host", entrystore_host))
396
+
397
+ if context is not None:
398
+
399
+ _query_params.append(("context", context))
400
+
401
+ # process the header parameters
402
+ if x_entrystore_host is not None:
403
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
404
+ # process the form parameters
405
+ # process the body parameter
406
+ if metadata_request is not None:
407
+ _body_params = metadata_request
408
+
409
+ # set the HTTP header `Accept`
410
+ if "Accept" not in _header_params:
411
+ _header_params["Accept"] = self.api_client.select_header_accept(
412
+ ["application/json"]
413
+ )
414
+
415
+ # set the HTTP header `Content-Type`
416
+ if _content_type:
417
+ _header_params["Content-Type"] = _content_type
418
+ else:
419
+ _default_content_type = self.api_client.select_header_content_type(
420
+ ["application/ld+json"]
421
+ )
422
+ if _default_content_type is not None:
423
+ _header_params["Content-Type"] = _default_content_type
424
+
425
+ # authentication setting
426
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
427
+
428
+ return self.api_client.param_serialize(
429
+ method="POST",
430
+ resource_path="/contact",
431
+ path_params=_path_params,
432
+ query_params=_query_params,
433
+ header_params=_header_params,
434
+ body=_body_params,
435
+ post_params=_form_params,
436
+ files=_files,
437
+ auth_settings=_auth_settings,
438
+ collection_formats=_collection_formats,
439
+ _host=_host,
440
+ _request_auth=_request_auth,
441
+ )
442
+
443
+ @validate_call
444
+ async def delete_contact(
445
+ self,
446
+ context_id: Annotated[
447
+ str,
448
+ Field(
449
+ strict=True,
450
+ description="The context (catalog) identifier in EntryStore",
451
+ ),
452
+ ],
453
+ entry_id: Annotated[
454
+ str,
455
+ Field(strict=True, description="The entry identifier within the context"),
456
+ ],
457
+ x_entrystore_host: Annotated[
458
+ Optional[StrictStr],
459
+ Field(
460
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
461
+ ),
462
+ ] = None,
463
+ entrystore_host: Annotated[
464
+ Optional[StrictStr],
465
+ Field(
466
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
467
+ ),
468
+ ] = None,
469
+ _request_timeout: Union[
470
+ None,
471
+ Annotated[StrictFloat, Field(gt=0)],
472
+ Tuple[
473
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
474
+ ],
475
+ ] = None,
476
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
477
+ _content_type: Optional[StrictStr] = None,
478
+ _headers: Optional[Dict[StrictStr, Any]] = None,
479
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
480
+ ) -> None:
481
+ """Delete contact
482
+
483
+ Deletes a specific contact and its associated metadata. This operation is irreversible. Requires authentication with write access to the entry's context.
484
+
485
+ :param context_id: The context (catalog) identifier in EntryStore (required)
486
+ :type context_id: str
487
+ :param entry_id: The entry identifier within the context (required)
488
+ :type entry_id: str
489
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
490
+ :type x_entrystore_host: str
491
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
492
+ :type entrystore_host: str
493
+ :param _request_timeout: timeout setting for this request. If one
494
+ number provided, it will be total request
495
+ timeout. It can also be a pair (tuple) of
496
+ (connection, read) timeouts.
497
+ :type _request_timeout: int, tuple(int, int), optional
498
+ :param _request_auth: set to override the auth_settings for an a single
499
+ request; this effectively ignores the
500
+ authentication in the spec for a single request.
501
+ :type _request_auth: dict, optional
502
+ :param _content_type: force content-type for the request.
503
+ :type _content_type: str, Optional
504
+ :param _headers: set to override the headers for a single
505
+ request; this effectively ignores the headers
506
+ in the spec for a single request.
507
+ :type _headers: dict, optional
508
+ :param _host_index: set to override the host_index for a single
509
+ request; this effectively ignores the host_index
510
+ in the spec for a single request.
511
+ :type _host_index: int, optional
512
+ :return: Returns the result object.
513
+ """ # noqa: E501
514
+
515
+ _param = self._delete_contact_serialize(
516
+ context_id=context_id,
517
+ entry_id=entry_id,
518
+ x_entrystore_host=x_entrystore_host,
519
+ entrystore_host=entrystore_host,
520
+ _request_auth=_request_auth,
521
+ _content_type=_content_type,
522
+ _headers=_headers,
523
+ _host_index=_host_index,
524
+ )
525
+
526
+ _response_types_map: Dict[str, Optional[str]] = {
527
+ "204": None,
528
+ "400": "Error",
529
+ "401": "Error",
530
+ "403": "Error",
531
+ "404": "Error",
532
+ "409": "Error",
533
+ "500": "Error",
534
+ "503": "Error",
535
+ }
536
+ response_data = await self.api_client.call_api(
537
+ *_param, _request_timeout=_request_timeout
538
+ )
539
+ await response_data.read()
540
+ return self.api_client.response_deserialize(
541
+ response_data=response_data,
542
+ response_types_map=_response_types_map,
543
+ ).data
544
+
545
+ @validate_call
546
+ async def delete_contact_with_http_info(
547
+ self,
548
+ context_id: Annotated[
549
+ str,
550
+ Field(
551
+ strict=True,
552
+ description="The context (catalog) identifier in EntryStore",
553
+ ),
554
+ ],
555
+ entry_id: Annotated[
556
+ str,
557
+ Field(strict=True, description="The entry identifier within the context"),
558
+ ],
559
+ x_entrystore_host: Annotated[
560
+ Optional[StrictStr],
561
+ Field(
562
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
563
+ ),
564
+ ] = None,
565
+ entrystore_host: Annotated[
566
+ Optional[StrictStr],
567
+ Field(
568
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
569
+ ),
570
+ ] = None,
571
+ _request_timeout: Union[
572
+ None,
573
+ Annotated[StrictFloat, Field(gt=0)],
574
+ Tuple[
575
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
576
+ ],
577
+ ] = None,
578
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
579
+ _content_type: Optional[StrictStr] = None,
580
+ _headers: Optional[Dict[StrictStr, Any]] = None,
581
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
582
+ ) -> ApiResponse[None]:
583
+ """Delete contact
584
+
585
+ Deletes a specific contact and its associated metadata. This operation is irreversible. Requires authentication with write access to the entry's context.
586
+
587
+ :param context_id: The context (catalog) identifier in EntryStore (required)
588
+ :type context_id: str
589
+ :param entry_id: The entry identifier within the context (required)
590
+ :type entry_id: str
591
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
592
+ :type x_entrystore_host: str
593
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
594
+ :type entrystore_host: str
595
+ :param _request_timeout: timeout setting for this request. If one
596
+ number provided, it will be total request
597
+ timeout. It can also be a pair (tuple) of
598
+ (connection, read) timeouts.
599
+ :type _request_timeout: int, tuple(int, int), optional
600
+ :param _request_auth: set to override the auth_settings for an a single
601
+ request; this effectively ignores the
602
+ authentication in the spec for a single request.
603
+ :type _request_auth: dict, optional
604
+ :param _content_type: force content-type for the request.
605
+ :type _content_type: str, Optional
606
+ :param _headers: set to override the headers for a single
607
+ request; this effectively ignores the headers
608
+ in the spec for a single request.
609
+ :type _headers: dict, optional
610
+ :param _host_index: set to override the host_index for a single
611
+ request; this effectively ignores the host_index
612
+ in the spec for a single request.
613
+ :type _host_index: int, optional
614
+ :return: Returns the result object.
615
+ """ # noqa: E501
616
+
617
+ _param = self._delete_contact_serialize(
618
+ context_id=context_id,
619
+ entry_id=entry_id,
620
+ x_entrystore_host=x_entrystore_host,
621
+ entrystore_host=entrystore_host,
622
+ _request_auth=_request_auth,
623
+ _content_type=_content_type,
624
+ _headers=_headers,
625
+ _host_index=_host_index,
626
+ )
627
+
628
+ _response_types_map: Dict[str, Optional[str]] = {
629
+ "204": None,
630
+ "400": "Error",
631
+ "401": "Error",
632
+ "403": "Error",
633
+ "404": "Error",
634
+ "409": "Error",
635
+ "500": "Error",
636
+ "503": "Error",
637
+ }
638
+ response_data = await self.api_client.call_api(
639
+ *_param, _request_timeout=_request_timeout
640
+ )
641
+ await response_data.read()
642
+ return self.api_client.response_deserialize(
643
+ response_data=response_data,
644
+ response_types_map=_response_types_map,
645
+ )
646
+
647
+ @validate_call
648
+ async def delete_contact_without_preload_content(
649
+ self,
650
+ context_id: Annotated[
651
+ str,
652
+ Field(
653
+ strict=True,
654
+ description="The context (catalog) identifier in EntryStore",
655
+ ),
656
+ ],
657
+ entry_id: Annotated[
658
+ str,
659
+ Field(strict=True, description="The entry identifier within the context"),
660
+ ],
661
+ x_entrystore_host: Annotated[
662
+ Optional[StrictStr],
663
+ Field(
664
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
665
+ ),
666
+ ] = None,
667
+ entrystore_host: Annotated[
668
+ Optional[StrictStr],
669
+ Field(
670
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
671
+ ),
672
+ ] = None,
673
+ _request_timeout: Union[
674
+ None,
675
+ Annotated[StrictFloat, Field(gt=0)],
676
+ Tuple[
677
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
678
+ ],
679
+ ] = None,
680
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
681
+ _content_type: Optional[StrictStr] = None,
682
+ _headers: Optional[Dict[StrictStr, Any]] = None,
683
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
684
+ ) -> RESTResponseType:
685
+ """Delete contact
686
+
687
+ Deletes a specific contact and its associated metadata. This operation is irreversible. Requires authentication with write access to the entry's context.
688
+
689
+ :param context_id: The context (catalog) identifier in EntryStore (required)
690
+ :type context_id: str
691
+ :param entry_id: The entry identifier within the context (required)
692
+ :type entry_id: str
693
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
694
+ :type x_entrystore_host: str
695
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
696
+ :type entrystore_host: str
697
+ :param _request_timeout: timeout setting for this request. If one
698
+ number provided, it will be total request
699
+ timeout. It can also be a pair (tuple) of
700
+ (connection, read) timeouts.
701
+ :type _request_timeout: int, tuple(int, int), optional
702
+ :param _request_auth: set to override the auth_settings for an a single
703
+ request; this effectively ignores the
704
+ authentication in the spec for a single request.
705
+ :type _request_auth: dict, optional
706
+ :param _content_type: force content-type for the request.
707
+ :type _content_type: str, Optional
708
+ :param _headers: set to override the headers for a single
709
+ request; this effectively ignores the headers
710
+ in the spec for a single request.
711
+ :type _headers: dict, optional
712
+ :param _host_index: set to override the host_index for a single
713
+ request; this effectively ignores the host_index
714
+ in the spec for a single request.
715
+ :type _host_index: int, optional
716
+ :return: Returns the result object.
717
+ """ # noqa: E501
718
+
719
+ _param = self._delete_contact_serialize(
720
+ context_id=context_id,
721
+ entry_id=entry_id,
722
+ x_entrystore_host=x_entrystore_host,
723
+ entrystore_host=entrystore_host,
724
+ _request_auth=_request_auth,
725
+ _content_type=_content_type,
726
+ _headers=_headers,
727
+ _host_index=_host_index,
728
+ )
729
+
730
+ _response_types_map: Dict[str, Optional[str]] = {
731
+ "204": None,
732
+ "400": "Error",
733
+ "401": "Error",
734
+ "403": "Error",
735
+ "404": "Error",
736
+ "409": "Error",
737
+ "500": "Error",
738
+ "503": "Error",
739
+ }
740
+ response_data = await self.api_client.call_api(
741
+ *_param, _request_timeout=_request_timeout
742
+ )
743
+ return response_data.response
744
+
745
+ def _delete_contact_serialize(
746
+ self,
747
+ context_id,
748
+ entry_id,
749
+ x_entrystore_host,
750
+ entrystore_host,
751
+ _request_auth,
752
+ _content_type,
753
+ _headers,
754
+ _host_index,
755
+ ) -> RequestSerialized:
756
+
757
+ _host = None
758
+
759
+ _collection_formats: Dict[str, str] = {}
760
+
761
+ _path_params: Dict[str, str] = {}
762
+ _query_params: List[Tuple[str, str]] = []
763
+ _header_params: Dict[str, Optional[str]] = _headers or {}
764
+ _form_params: List[Tuple[str, str]] = []
765
+ _files: Dict[
766
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
767
+ ] = {}
768
+ _body_params: Optional[bytes] = None
769
+
770
+ # process the path parameters
771
+ if context_id is not None:
772
+ _path_params["context_id"] = context_id
773
+ if entry_id is not None:
774
+ _path_params["entry_id"] = entry_id
775
+ # process the query parameters
776
+ if entrystore_host is not None:
777
+
778
+ _query_params.append(("entrystore_host", entrystore_host))
779
+
780
+ # process the header parameters
781
+ if x_entrystore_host is not None:
782
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
783
+ # process the form parameters
784
+ # process the body parameter
785
+
786
+ # set the HTTP header `Accept`
787
+ if "Accept" not in _header_params:
788
+ _header_params["Accept"] = self.api_client.select_header_accept(
789
+ ["application/json"]
790
+ )
791
+
792
+ # authentication setting
793
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
794
+
795
+ return self.api_client.param_serialize(
796
+ method="DELETE",
797
+ resource_path="/contact/{context_id}/{entry_id}",
798
+ path_params=_path_params,
799
+ query_params=_query_params,
800
+ header_params=_header_params,
801
+ body=_body_params,
802
+ post_params=_form_params,
803
+ files=_files,
804
+ auth_settings=_auth_settings,
805
+ collection_formats=_collection_formats,
806
+ _host=_host,
807
+ _request_auth=_request_auth,
808
+ )
809
+
810
+ @validate_call
811
+ async def get_contact(
812
+ self,
813
+ context_id: Annotated[
814
+ str,
815
+ Field(
816
+ strict=True,
817
+ description="The context (catalog) identifier in EntryStore",
818
+ ),
819
+ ],
820
+ entry_id: Annotated[
821
+ str,
822
+ Field(strict=True, description="The entry identifier within the context"),
823
+ ],
824
+ x_entrystore_host: Annotated[
825
+ Optional[StrictStr],
826
+ Field(
827
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
828
+ ),
829
+ ] = None,
830
+ entrystore_host: Annotated[
831
+ Optional[StrictStr],
832
+ Field(
833
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
834
+ ),
835
+ ] = None,
836
+ _request_timeout: Union[
837
+ None,
838
+ Annotated[StrictFloat, Field(gt=0)],
839
+ Tuple[
840
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
841
+ ],
842
+ ] = None,
843
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
844
+ _content_type: Optional[StrictStr] = None,
845
+ _headers: Optional[Dict[StrictStr, Any]] = None,
846
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
847
+ ) -> EntityReference:
848
+ """Get contact
849
+
850
+ Returns basic reference information for a specific contact. Use the /metadata sub-endpoint to retrieve the full vCard metadata. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
851
+
852
+ :param context_id: The context (catalog) identifier in EntryStore (required)
853
+ :type context_id: str
854
+ :param entry_id: The entry identifier within the context (required)
855
+ :type entry_id: str
856
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
857
+ :type x_entrystore_host: str
858
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
859
+ :type entrystore_host: str
860
+ :param _request_timeout: timeout setting for this request. If one
861
+ number provided, it will be total request
862
+ timeout. It can also be a pair (tuple) of
863
+ (connection, read) timeouts.
864
+ :type _request_timeout: int, tuple(int, int), optional
865
+ :param _request_auth: set to override the auth_settings for an a single
866
+ request; this effectively ignores the
867
+ authentication in the spec for a single request.
868
+ :type _request_auth: dict, optional
869
+ :param _content_type: force content-type for the request.
870
+ :type _content_type: str, Optional
871
+ :param _headers: set to override the headers for a single
872
+ request; this effectively ignores the headers
873
+ in the spec for a single request.
874
+ :type _headers: dict, optional
875
+ :param _host_index: set to override the host_index for a single
876
+ request; this effectively ignores the host_index
877
+ in the spec for a single request.
878
+ :type _host_index: int, optional
879
+ :return: Returns the result object.
880
+ """ # noqa: E501
881
+
882
+ _param = self._get_contact_serialize(
883
+ context_id=context_id,
884
+ entry_id=entry_id,
885
+ x_entrystore_host=x_entrystore_host,
886
+ entrystore_host=entrystore_host,
887
+ _request_auth=_request_auth,
888
+ _content_type=_content_type,
889
+ _headers=_headers,
890
+ _host_index=_host_index,
891
+ )
892
+
893
+ _response_types_map: Dict[str, Optional[str]] = {
894
+ "200": "EntityReference",
895
+ "400": "Error",
896
+ "401": "Error",
897
+ "404": "Error",
898
+ "500": "Error",
899
+ "503": "Error",
900
+ }
901
+ response_data = await self.api_client.call_api(
902
+ *_param, _request_timeout=_request_timeout
903
+ )
904
+ await response_data.read()
905
+ return self.api_client.response_deserialize(
906
+ response_data=response_data,
907
+ response_types_map=_response_types_map,
908
+ ).data
909
+
910
+ @validate_call
911
+ async def get_contact_with_http_info(
912
+ self,
913
+ context_id: Annotated[
914
+ str,
915
+ Field(
916
+ strict=True,
917
+ description="The context (catalog) identifier in EntryStore",
918
+ ),
919
+ ],
920
+ entry_id: Annotated[
921
+ str,
922
+ Field(strict=True, description="The entry identifier within the context"),
923
+ ],
924
+ x_entrystore_host: Annotated[
925
+ Optional[StrictStr],
926
+ Field(
927
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
928
+ ),
929
+ ] = None,
930
+ entrystore_host: Annotated[
931
+ Optional[StrictStr],
932
+ Field(
933
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
934
+ ),
935
+ ] = None,
936
+ _request_timeout: Union[
937
+ None,
938
+ Annotated[StrictFloat, Field(gt=0)],
939
+ Tuple[
940
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
941
+ ],
942
+ ] = None,
943
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
944
+ _content_type: Optional[StrictStr] = None,
945
+ _headers: Optional[Dict[StrictStr, Any]] = None,
946
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
947
+ ) -> ApiResponse[EntityReference]:
948
+ """Get contact
949
+
950
+ Returns basic reference information for a specific contact. Use the /metadata sub-endpoint to retrieve the full vCard metadata. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
951
+
952
+ :param context_id: The context (catalog) identifier in EntryStore (required)
953
+ :type context_id: str
954
+ :param entry_id: The entry identifier within the context (required)
955
+ :type entry_id: str
956
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
957
+ :type x_entrystore_host: str
958
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
959
+ :type entrystore_host: str
960
+ :param _request_timeout: timeout setting for this request. If one
961
+ number provided, it will be total request
962
+ timeout. It can also be a pair (tuple) of
963
+ (connection, read) timeouts.
964
+ :type _request_timeout: int, tuple(int, int), optional
965
+ :param _request_auth: set to override the auth_settings for an a single
966
+ request; this effectively ignores the
967
+ authentication in the spec for a single request.
968
+ :type _request_auth: dict, optional
969
+ :param _content_type: force content-type for the request.
970
+ :type _content_type: str, Optional
971
+ :param _headers: set to override the headers for a single
972
+ request; this effectively ignores the headers
973
+ in the spec for a single request.
974
+ :type _headers: dict, optional
975
+ :param _host_index: set to override the host_index for a single
976
+ request; this effectively ignores the host_index
977
+ in the spec for a single request.
978
+ :type _host_index: int, optional
979
+ :return: Returns the result object.
980
+ """ # noqa: E501
981
+
982
+ _param = self._get_contact_serialize(
983
+ context_id=context_id,
984
+ entry_id=entry_id,
985
+ x_entrystore_host=x_entrystore_host,
986
+ entrystore_host=entrystore_host,
987
+ _request_auth=_request_auth,
988
+ _content_type=_content_type,
989
+ _headers=_headers,
990
+ _host_index=_host_index,
991
+ )
992
+
993
+ _response_types_map: Dict[str, Optional[str]] = {
994
+ "200": "EntityReference",
995
+ "400": "Error",
996
+ "401": "Error",
997
+ "404": "Error",
998
+ "500": "Error",
999
+ "503": "Error",
1000
+ }
1001
+ response_data = await self.api_client.call_api(
1002
+ *_param, _request_timeout=_request_timeout
1003
+ )
1004
+ await response_data.read()
1005
+ return self.api_client.response_deserialize(
1006
+ response_data=response_data,
1007
+ response_types_map=_response_types_map,
1008
+ )
1009
+
1010
+ @validate_call
1011
+ async def get_contact_without_preload_content(
1012
+ self,
1013
+ context_id: Annotated[
1014
+ str,
1015
+ Field(
1016
+ strict=True,
1017
+ description="The context (catalog) identifier in EntryStore",
1018
+ ),
1019
+ ],
1020
+ entry_id: Annotated[
1021
+ str,
1022
+ Field(strict=True, description="The entry identifier within the context"),
1023
+ ],
1024
+ x_entrystore_host: Annotated[
1025
+ Optional[StrictStr],
1026
+ Field(
1027
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1028
+ ),
1029
+ ] = None,
1030
+ entrystore_host: Annotated[
1031
+ Optional[StrictStr],
1032
+ Field(
1033
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1034
+ ),
1035
+ ] = None,
1036
+ _request_timeout: Union[
1037
+ None,
1038
+ Annotated[StrictFloat, Field(gt=0)],
1039
+ Tuple[
1040
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1041
+ ],
1042
+ ] = None,
1043
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1044
+ _content_type: Optional[StrictStr] = None,
1045
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1046
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1047
+ ) -> RESTResponseType:
1048
+ """Get contact
1049
+
1050
+ Returns basic reference information for a specific contact. Use the /metadata sub-endpoint to retrieve the full vCard metadata. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1051
+
1052
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1053
+ :type context_id: str
1054
+ :param entry_id: The entry identifier within the context (required)
1055
+ :type entry_id: str
1056
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1057
+ :type x_entrystore_host: str
1058
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1059
+ :type entrystore_host: str
1060
+ :param _request_timeout: timeout setting for this request. If one
1061
+ number provided, it will be total request
1062
+ timeout. It can also be a pair (tuple) of
1063
+ (connection, read) timeouts.
1064
+ :type _request_timeout: int, tuple(int, int), optional
1065
+ :param _request_auth: set to override the auth_settings for an a single
1066
+ request; this effectively ignores the
1067
+ authentication in the spec for a single request.
1068
+ :type _request_auth: dict, optional
1069
+ :param _content_type: force content-type for the request.
1070
+ :type _content_type: str, Optional
1071
+ :param _headers: set to override the headers for a single
1072
+ request; this effectively ignores the headers
1073
+ in the spec for a single request.
1074
+ :type _headers: dict, optional
1075
+ :param _host_index: set to override the host_index for a single
1076
+ request; this effectively ignores the host_index
1077
+ in the spec for a single request.
1078
+ :type _host_index: int, optional
1079
+ :return: Returns the result object.
1080
+ """ # noqa: E501
1081
+
1082
+ _param = self._get_contact_serialize(
1083
+ context_id=context_id,
1084
+ entry_id=entry_id,
1085
+ x_entrystore_host=x_entrystore_host,
1086
+ entrystore_host=entrystore_host,
1087
+ _request_auth=_request_auth,
1088
+ _content_type=_content_type,
1089
+ _headers=_headers,
1090
+ _host_index=_host_index,
1091
+ )
1092
+
1093
+ _response_types_map: Dict[str, Optional[str]] = {
1094
+ "200": "EntityReference",
1095
+ "400": "Error",
1096
+ "401": "Error",
1097
+ "404": "Error",
1098
+ "500": "Error",
1099
+ "503": "Error",
1100
+ }
1101
+ response_data = await self.api_client.call_api(
1102
+ *_param, _request_timeout=_request_timeout
1103
+ )
1104
+ return response_data.response
1105
+
1106
+ def _get_contact_serialize(
1107
+ self,
1108
+ context_id,
1109
+ entry_id,
1110
+ x_entrystore_host,
1111
+ entrystore_host,
1112
+ _request_auth,
1113
+ _content_type,
1114
+ _headers,
1115
+ _host_index,
1116
+ ) -> RequestSerialized:
1117
+
1118
+ _host = None
1119
+
1120
+ _collection_formats: Dict[str, str] = {}
1121
+
1122
+ _path_params: Dict[str, str] = {}
1123
+ _query_params: List[Tuple[str, str]] = []
1124
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1125
+ _form_params: List[Tuple[str, str]] = []
1126
+ _files: Dict[
1127
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1128
+ ] = {}
1129
+ _body_params: Optional[bytes] = None
1130
+
1131
+ # process the path parameters
1132
+ if context_id is not None:
1133
+ _path_params["context_id"] = context_id
1134
+ if entry_id is not None:
1135
+ _path_params["entry_id"] = entry_id
1136
+ # process the query parameters
1137
+ if entrystore_host is not None:
1138
+
1139
+ _query_params.append(("entrystore_host", entrystore_host))
1140
+
1141
+ # process the header parameters
1142
+ if x_entrystore_host is not None:
1143
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
1144
+ # process the form parameters
1145
+ # process the body parameter
1146
+
1147
+ # set the HTTP header `Accept`
1148
+ if "Accept" not in _header_params:
1149
+ _header_params["Accept"] = self.api_client.select_header_accept(
1150
+ ["application/json"]
1151
+ )
1152
+
1153
+ # authentication setting
1154
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
1155
+
1156
+ return self.api_client.param_serialize(
1157
+ method="GET",
1158
+ resource_path="/contact/{context_id}/{entry_id}",
1159
+ path_params=_path_params,
1160
+ query_params=_query_params,
1161
+ header_params=_header_params,
1162
+ body=_body_params,
1163
+ post_params=_form_params,
1164
+ files=_files,
1165
+ auth_settings=_auth_settings,
1166
+ collection_formats=_collection_formats,
1167
+ _host=_host,
1168
+ _request_auth=_request_auth,
1169
+ )
1170
+
1171
+ @validate_call
1172
+ async def get_contact_metadata(
1173
+ self,
1174
+ context_id: Annotated[
1175
+ str,
1176
+ Field(
1177
+ strict=True,
1178
+ description="The context (catalog) identifier in EntryStore",
1179
+ ),
1180
+ ],
1181
+ entry_id: Annotated[
1182
+ str,
1183
+ Field(strict=True, description="The entry identifier within the context"),
1184
+ ],
1185
+ x_entrystore_host: Annotated[
1186
+ Optional[StrictStr],
1187
+ Field(
1188
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1189
+ ),
1190
+ ] = None,
1191
+ entrystore_host: Annotated[
1192
+ Optional[StrictStr],
1193
+ Field(
1194
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1195
+ ),
1196
+ ] = None,
1197
+ format: Annotated[
1198
+ Optional[MetadataFormat],
1199
+ Field(
1200
+ description="Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format "
1201
+ ),
1202
+ ] = None,
1203
+ _request_timeout: Union[
1204
+ None,
1205
+ Annotated[StrictFloat, Field(gt=0)],
1206
+ Tuple[
1207
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1208
+ ],
1209
+ ] = None,
1210
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1211
+ _content_type: Optional[StrictStr] = None,
1212
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1213
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1214
+ ) -> Dict[str, object]:
1215
+ """Get contact metadata
1216
+
1217
+ Returns raw DCAT-AP metadata for a specific contact. The response format can be specified using the `format` query parameter. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1218
+
1219
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1220
+ :type context_id: str
1221
+ :param entry_id: The entry identifier within the context (required)
1222
+ :type entry_id: str
1223
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1224
+ :type x_entrystore_host: str
1225
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1226
+ :type entrystore_host: str
1227
+ :param format: Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format
1228
+ :type format: MetadataFormat
1229
+ :param _request_timeout: timeout setting for this request. If one
1230
+ number provided, it will be total request
1231
+ timeout. It can also be a pair (tuple) of
1232
+ (connection, read) timeouts.
1233
+ :type _request_timeout: int, tuple(int, int), optional
1234
+ :param _request_auth: set to override the auth_settings for an a single
1235
+ request; this effectively ignores the
1236
+ authentication in the spec for a single request.
1237
+ :type _request_auth: dict, optional
1238
+ :param _content_type: force content-type for the request.
1239
+ :type _content_type: str, Optional
1240
+ :param _headers: set to override the headers for a single
1241
+ request; this effectively ignores the headers
1242
+ in the spec for a single request.
1243
+ :type _headers: dict, optional
1244
+ :param _host_index: set to override the host_index for a single
1245
+ request; this effectively ignores the host_index
1246
+ in the spec for a single request.
1247
+ :type _host_index: int, optional
1248
+ :return: Returns the result object.
1249
+ """ # noqa: E501
1250
+
1251
+ _param = self._get_contact_metadata_serialize(
1252
+ context_id=context_id,
1253
+ entry_id=entry_id,
1254
+ x_entrystore_host=x_entrystore_host,
1255
+ entrystore_host=entrystore_host,
1256
+ format=format,
1257
+ _request_auth=_request_auth,
1258
+ _content_type=_content_type,
1259
+ _headers=_headers,
1260
+ _host_index=_host_index,
1261
+ )
1262
+
1263
+ _response_types_map: Dict[str, Optional[str]] = {
1264
+ "200": "Dict[str, object]",
1265
+ "400": "Error",
1266
+ "401": "Error",
1267
+ "404": "Error",
1268
+ "500": "Error",
1269
+ "503": "Error",
1270
+ }
1271
+ response_data = await self.api_client.call_api(
1272
+ *_param, _request_timeout=_request_timeout
1273
+ )
1274
+ await response_data.read()
1275
+ return self.api_client.response_deserialize(
1276
+ response_data=response_data,
1277
+ response_types_map=_response_types_map,
1278
+ ).data
1279
+
1280
+ @validate_call
1281
+ async def get_contact_metadata_with_http_info(
1282
+ self,
1283
+ context_id: Annotated[
1284
+ str,
1285
+ Field(
1286
+ strict=True,
1287
+ description="The context (catalog) identifier in EntryStore",
1288
+ ),
1289
+ ],
1290
+ entry_id: Annotated[
1291
+ str,
1292
+ Field(strict=True, description="The entry identifier within the context"),
1293
+ ],
1294
+ x_entrystore_host: Annotated[
1295
+ Optional[StrictStr],
1296
+ Field(
1297
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1298
+ ),
1299
+ ] = None,
1300
+ entrystore_host: Annotated[
1301
+ Optional[StrictStr],
1302
+ Field(
1303
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1304
+ ),
1305
+ ] = None,
1306
+ format: Annotated[
1307
+ Optional[MetadataFormat],
1308
+ Field(
1309
+ description="Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format "
1310
+ ),
1311
+ ] = None,
1312
+ _request_timeout: Union[
1313
+ None,
1314
+ Annotated[StrictFloat, Field(gt=0)],
1315
+ Tuple[
1316
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1317
+ ],
1318
+ ] = None,
1319
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1320
+ _content_type: Optional[StrictStr] = None,
1321
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1322
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1323
+ ) -> ApiResponse[Dict[str, object]]:
1324
+ """Get contact metadata
1325
+
1326
+ Returns raw DCAT-AP metadata for a specific contact. The response format can be specified using the `format` query parameter. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1327
+
1328
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1329
+ :type context_id: str
1330
+ :param entry_id: The entry identifier within the context (required)
1331
+ :type entry_id: str
1332
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1333
+ :type x_entrystore_host: str
1334
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1335
+ :type entrystore_host: str
1336
+ :param format: Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format
1337
+ :type format: MetadataFormat
1338
+ :param _request_timeout: timeout setting for this request. If one
1339
+ number provided, it will be total request
1340
+ timeout. It can also be a pair (tuple) of
1341
+ (connection, read) timeouts.
1342
+ :type _request_timeout: int, tuple(int, int), optional
1343
+ :param _request_auth: set to override the auth_settings for an a single
1344
+ request; this effectively ignores the
1345
+ authentication in the spec for a single request.
1346
+ :type _request_auth: dict, optional
1347
+ :param _content_type: force content-type for the request.
1348
+ :type _content_type: str, Optional
1349
+ :param _headers: set to override the headers for a single
1350
+ request; this effectively ignores the headers
1351
+ in the spec for a single request.
1352
+ :type _headers: dict, optional
1353
+ :param _host_index: set to override the host_index for a single
1354
+ request; this effectively ignores the host_index
1355
+ in the spec for a single request.
1356
+ :type _host_index: int, optional
1357
+ :return: Returns the result object.
1358
+ """ # noqa: E501
1359
+
1360
+ _param = self._get_contact_metadata_serialize(
1361
+ context_id=context_id,
1362
+ entry_id=entry_id,
1363
+ x_entrystore_host=x_entrystore_host,
1364
+ entrystore_host=entrystore_host,
1365
+ format=format,
1366
+ _request_auth=_request_auth,
1367
+ _content_type=_content_type,
1368
+ _headers=_headers,
1369
+ _host_index=_host_index,
1370
+ )
1371
+
1372
+ _response_types_map: Dict[str, Optional[str]] = {
1373
+ "200": "Dict[str, object]",
1374
+ "400": "Error",
1375
+ "401": "Error",
1376
+ "404": "Error",
1377
+ "500": "Error",
1378
+ "503": "Error",
1379
+ }
1380
+ response_data = await self.api_client.call_api(
1381
+ *_param, _request_timeout=_request_timeout
1382
+ )
1383
+ await response_data.read()
1384
+ return self.api_client.response_deserialize(
1385
+ response_data=response_data,
1386
+ response_types_map=_response_types_map,
1387
+ )
1388
+
1389
+ @validate_call
1390
+ async def get_contact_metadata_without_preload_content(
1391
+ self,
1392
+ context_id: Annotated[
1393
+ str,
1394
+ Field(
1395
+ strict=True,
1396
+ description="The context (catalog) identifier in EntryStore",
1397
+ ),
1398
+ ],
1399
+ entry_id: Annotated[
1400
+ str,
1401
+ Field(strict=True, description="The entry identifier within the context"),
1402
+ ],
1403
+ x_entrystore_host: Annotated[
1404
+ Optional[StrictStr],
1405
+ Field(
1406
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1407
+ ),
1408
+ ] = None,
1409
+ entrystore_host: Annotated[
1410
+ Optional[StrictStr],
1411
+ Field(
1412
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1413
+ ),
1414
+ ] = None,
1415
+ format: Annotated[
1416
+ Optional[MetadataFormat],
1417
+ Field(
1418
+ description="Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format "
1419
+ ),
1420
+ ] = None,
1421
+ _request_timeout: Union[
1422
+ None,
1423
+ Annotated[StrictFloat, Field(gt=0)],
1424
+ Tuple[
1425
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1426
+ ],
1427
+ ] = None,
1428
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1429
+ _content_type: Optional[StrictStr] = None,
1430
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1431
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1432
+ ) -> RESTResponseType:
1433
+ """Get contact metadata
1434
+
1435
+ Returns raw DCAT-AP metadata for a specific contact. The response format can be specified using the `format` query parameter. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1436
+
1437
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1438
+ :type context_id: str
1439
+ :param entry_id: The entry identifier within the context (required)
1440
+ :type entry_id: str
1441
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1442
+ :type x_entrystore_host: str
1443
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1444
+ :type entrystore_host: str
1445
+ :param format: Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format
1446
+ :type format: MetadataFormat
1447
+ :param _request_timeout: timeout setting for this request. If one
1448
+ number provided, it will be total request
1449
+ timeout. It can also be a pair (tuple) of
1450
+ (connection, read) timeouts.
1451
+ :type _request_timeout: int, tuple(int, int), optional
1452
+ :param _request_auth: set to override the auth_settings for an a single
1453
+ request; this effectively ignores the
1454
+ authentication in the spec for a single request.
1455
+ :type _request_auth: dict, optional
1456
+ :param _content_type: force content-type for the request.
1457
+ :type _content_type: str, Optional
1458
+ :param _headers: set to override the headers for a single
1459
+ request; this effectively ignores the headers
1460
+ in the spec for a single request.
1461
+ :type _headers: dict, optional
1462
+ :param _host_index: set to override the host_index for a single
1463
+ request; this effectively ignores the host_index
1464
+ in the spec for a single request.
1465
+ :type _host_index: int, optional
1466
+ :return: Returns the result object.
1467
+ """ # noqa: E501
1468
+
1469
+ _param = self._get_contact_metadata_serialize(
1470
+ context_id=context_id,
1471
+ entry_id=entry_id,
1472
+ x_entrystore_host=x_entrystore_host,
1473
+ entrystore_host=entrystore_host,
1474
+ format=format,
1475
+ _request_auth=_request_auth,
1476
+ _content_type=_content_type,
1477
+ _headers=_headers,
1478
+ _host_index=_host_index,
1479
+ )
1480
+
1481
+ _response_types_map: Dict[str, Optional[str]] = {
1482
+ "200": "Dict[str, object]",
1483
+ "400": "Error",
1484
+ "401": "Error",
1485
+ "404": "Error",
1486
+ "500": "Error",
1487
+ "503": "Error",
1488
+ }
1489
+ response_data = await self.api_client.call_api(
1490
+ *_param, _request_timeout=_request_timeout
1491
+ )
1492
+ return response_data.response
1493
+
1494
+ def _get_contact_metadata_serialize(
1495
+ self,
1496
+ context_id,
1497
+ entry_id,
1498
+ x_entrystore_host,
1499
+ entrystore_host,
1500
+ format,
1501
+ _request_auth,
1502
+ _content_type,
1503
+ _headers,
1504
+ _host_index,
1505
+ ) -> RequestSerialized:
1506
+
1507
+ _host = None
1508
+
1509
+ _collection_formats: Dict[str, str] = {}
1510
+
1511
+ _path_params: Dict[str, str] = {}
1512
+ _query_params: List[Tuple[str, str]] = []
1513
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1514
+ _form_params: List[Tuple[str, str]] = []
1515
+ _files: Dict[
1516
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1517
+ ] = {}
1518
+ _body_params: Optional[bytes] = None
1519
+
1520
+ # process the path parameters
1521
+ if context_id is not None:
1522
+ _path_params["context_id"] = context_id
1523
+ if entry_id is not None:
1524
+ _path_params["entry_id"] = entry_id
1525
+ # process the query parameters
1526
+ if entrystore_host is not None:
1527
+
1528
+ _query_params.append(("entrystore_host", entrystore_host))
1529
+
1530
+ if format is not None:
1531
+
1532
+ _query_params.append(("format", format.value))
1533
+
1534
+ # process the header parameters
1535
+ if x_entrystore_host is not None:
1536
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
1537
+ # process the form parameters
1538
+ # process the body parameter
1539
+
1540
+ # set the HTTP header `Accept`
1541
+ if "Accept" not in _header_params:
1542
+ _header_params["Accept"] = self.api_client.select_header_accept(
1543
+ [
1544
+ "application/ld+json",
1545
+ "application/rdf+json",
1546
+ "text/turtle",
1547
+ "application/n-triples",
1548
+ "application/rdf+xml",
1549
+ "application/json",
1550
+ ]
1551
+ )
1552
+
1553
+ # authentication setting
1554
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
1555
+
1556
+ return self.api_client.param_serialize(
1557
+ method="GET",
1558
+ resource_path="/contact/{context_id}/{entry_id}/metadata",
1559
+ path_params=_path_params,
1560
+ query_params=_query_params,
1561
+ header_params=_header_params,
1562
+ body=_body_params,
1563
+ post_params=_form_params,
1564
+ files=_files,
1565
+ auth_settings=_auth_settings,
1566
+ collection_formats=_collection_formats,
1567
+ _host=_host,
1568
+ _request_auth=_request_auth,
1569
+ )
1570
+
1571
+ @validate_call
1572
+ async def list_contacts(
1573
+ self,
1574
+ x_entrystore_host: Annotated[
1575
+ Optional[StrictStr],
1576
+ Field(
1577
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1578
+ ),
1579
+ ] = None,
1580
+ entrystore_host: Annotated[
1581
+ Optional[StrictStr],
1582
+ Field(
1583
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1584
+ ),
1585
+ ] = None,
1586
+ limit: Annotated[
1587
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1588
+ Field(description="Results per page"),
1589
+ ] = None,
1590
+ offset: Annotated[
1591
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1592
+ Field(description="Results to skip before the first one returned"),
1593
+ ] = None,
1594
+ cursor: Annotated[
1595
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1596
+ Field(
1597
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
1598
+ ),
1599
+ ] = None,
1600
+ query: Annotated[
1601
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1602
+ Field(
1603
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
1604
+ ),
1605
+ ] = None,
1606
+ sort: Annotated[
1607
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1608
+ Field(
1609
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
1610
+ ),
1611
+ ] = None,
1612
+ context: Annotated[
1613
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]],
1614
+ Field(
1615
+ description="Filter by context ID. Can be specified multiple times to include entries from multiple contexts. "
1616
+ ),
1617
+ ] = None,
1618
+ rdf_type: Annotated[
1619
+ Optional[Annotated[str, Field(strict=True, max_length=2048)]],
1620
+ Field(description="Only entries with this rdf:type URI"),
1621
+ ] = None,
1622
+ public: Annotated[
1623
+ Optional[StrictBool],
1624
+ Field(
1625
+ description="true: only publicly readable entries; false: only non-public entries"
1626
+ ),
1627
+ ] = None,
1628
+ created_after: Annotated[
1629
+ Optional[datetime], Field(description="Created at or after this instant")
1630
+ ] = None,
1631
+ created_before: Annotated[
1632
+ Optional[datetime], Field(description="Created before this instant")
1633
+ ] = None,
1634
+ modified_after: Annotated[
1635
+ Optional[datetime], Field(description="Modified at or after this instant")
1636
+ ] = None,
1637
+ modified_before: Annotated[
1638
+ Optional[datetime], Field(description="Modified before this instant")
1639
+ ] = None,
1640
+ entry_type: Annotated[
1641
+ Optional[ListCatalogsEntryTypeParameter],
1642
+ Field(
1643
+ description="Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata "
1644
+ ),
1645
+ ] = None,
1646
+ graph_type: Annotated[
1647
+ Optional[ListCatalogsGraphTypeParameter],
1648
+ Field(
1649
+ description="Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution "
1650
+ ),
1651
+ ] = None,
1652
+ resource_type: Annotated[
1653
+ Optional[ListCatalogsResourceTypeParameter],
1654
+ Field(
1655
+ description="Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data) "
1656
+ ),
1657
+ ] = None,
1658
+ _request_timeout: Union[
1659
+ None,
1660
+ Annotated[StrictFloat, Field(gt=0)],
1661
+ Tuple[
1662
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1663
+ ],
1664
+ ] = None,
1665
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1666
+ _content_type: Optional[StrictStr] = None,
1667
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1668
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1669
+ ) -> EntityListResponse:
1670
+ """List contacts
1671
+
1672
+ Returns a paginated list of all contacts. Contacts provide contact information for resources (vCard). Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
1673
+
1674
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1675
+ :type x_entrystore_host: str
1676
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1677
+ :type entrystore_host: str
1678
+ :param limit: Results per page
1679
+ :type limit: int
1680
+ :param offset: Results to skip before the first one returned
1681
+ :type offset: int
1682
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
1683
+ :type cursor: str
1684
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
1685
+ :type query: str
1686
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
1687
+ :type sort: str
1688
+ :param context: Filter by context ID. Can be specified multiple times to include entries from multiple contexts.
1689
+ :type context: str
1690
+ :param rdf_type: Only entries with this rdf:type URI
1691
+ :type rdf_type: str
1692
+ :param public: true: only publicly readable entries; false: only non-public entries
1693
+ :type public: bool
1694
+ :param created_after: Created at or after this instant
1695
+ :type created_after: datetime
1696
+ :param created_before: Created before this instant
1697
+ :type created_before: datetime
1698
+ :param modified_after: Modified at or after this instant
1699
+ :type modified_after: datetime
1700
+ :param modified_before: Modified before this instant
1701
+ :type modified_before: datetime
1702
+ :param entry_type: Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata
1703
+ :type entry_type: ListCatalogsEntryTypeParameter
1704
+ :param graph_type: Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution
1705
+ :type graph_type: ListCatalogsGraphTypeParameter
1706
+ :param resource_type: Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data)
1707
+ :type resource_type: ListCatalogsResourceTypeParameter
1708
+ :param _request_timeout: timeout setting for this request. If one
1709
+ number provided, it will be total request
1710
+ timeout. It can also be a pair (tuple) of
1711
+ (connection, read) timeouts.
1712
+ :type _request_timeout: int, tuple(int, int), optional
1713
+ :param _request_auth: set to override the auth_settings for an a single
1714
+ request; this effectively ignores the
1715
+ authentication in the spec for a single request.
1716
+ :type _request_auth: dict, optional
1717
+ :param _content_type: force content-type for the request.
1718
+ :type _content_type: str, Optional
1719
+ :param _headers: set to override the headers for a single
1720
+ request; this effectively ignores the headers
1721
+ in the spec for a single request.
1722
+ :type _headers: dict, optional
1723
+ :param _host_index: set to override the host_index for a single
1724
+ request; this effectively ignores the host_index
1725
+ in the spec for a single request.
1726
+ :type _host_index: int, optional
1727
+ :return: Returns the result object.
1728
+ """ # noqa: E501
1729
+
1730
+ _param = self._list_contacts_serialize(
1731
+ x_entrystore_host=x_entrystore_host,
1732
+ entrystore_host=entrystore_host,
1733
+ limit=limit,
1734
+ offset=offset,
1735
+ cursor=cursor,
1736
+ query=query,
1737
+ sort=sort,
1738
+ context=context,
1739
+ rdf_type=rdf_type,
1740
+ public=public,
1741
+ created_after=created_after,
1742
+ created_before=created_before,
1743
+ modified_after=modified_after,
1744
+ modified_before=modified_before,
1745
+ entry_type=entry_type,
1746
+ graph_type=graph_type,
1747
+ resource_type=resource_type,
1748
+ _request_auth=_request_auth,
1749
+ _content_type=_content_type,
1750
+ _headers=_headers,
1751
+ _host_index=_host_index,
1752
+ )
1753
+
1754
+ _response_types_map: Dict[str, Optional[str]] = {
1755
+ "200": "EntityListResponse",
1756
+ "400": "Error",
1757
+ "401": "Error",
1758
+ "500": "Error",
1759
+ "503": "Error",
1760
+ }
1761
+ response_data = await self.api_client.call_api(
1762
+ *_param, _request_timeout=_request_timeout
1763
+ )
1764
+ await response_data.read()
1765
+ return self.api_client.response_deserialize(
1766
+ response_data=response_data,
1767
+ response_types_map=_response_types_map,
1768
+ ).data
1769
+
1770
+ @validate_call
1771
+ async def list_contacts_with_http_info(
1772
+ self,
1773
+ x_entrystore_host: Annotated[
1774
+ Optional[StrictStr],
1775
+ Field(
1776
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1777
+ ),
1778
+ ] = None,
1779
+ entrystore_host: Annotated[
1780
+ Optional[StrictStr],
1781
+ Field(
1782
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1783
+ ),
1784
+ ] = None,
1785
+ limit: Annotated[
1786
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1787
+ Field(description="Results per page"),
1788
+ ] = None,
1789
+ offset: Annotated[
1790
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1791
+ Field(description="Results to skip before the first one returned"),
1792
+ ] = None,
1793
+ cursor: Annotated[
1794
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1795
+ Field(
1796
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
1797
+ ),
1798
+ ] = None,
1799
+ query: Annotated[
1800
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1801
+ Field(
1802
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
1803
+ ),
1804
+ ] = None,
1805
+ sort: Annotated[
1806
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1807
+ Field(
1808
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
1809
+ ),
1810
+ ] = None,
1811
+ context: Annotated[
1812
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]],
1813
+ Field(
1814
+ description="Filter by context ID. Can be specified multiple times to include entries from multiple contexts. "
1815
+ ),
1816
+ ] = None,
1817
+ rdf_type: Annotated[
1818
+ Optional[Annotated[str, Field(strict=True, max_length=2048)]],
1819
+ Field(description="Only entries with this rdf:type URI"),
1820
+ ] = None,
1821
+ public: Annotated[
1822
+ Optional[StrictBool],
1823
+ Field(
1824
+ description="true: only publicly readable entries; false: only non-public entries"
1825
+ ),
1826
+ ] = None,
1827
+ created_after: Annotated[
1828
+ Optional[datetime], Field(description="Created at or after this instant")
1829
+ ] = None,
1830
+ created_before: Annotated[
1831
+ Optional[datetime], Field(description="Created before this instant")
1832
+ ] = None,
1833
+ modified_after: Annotated[
1834
+ Optional[datetime], Field(description="Modified at or after this instant")
1835
+ ] = None,
1836
+ modified_before: Annotated[
1837
+ Optional[datetime], Field(description="Modified before this instant")
1838
+ ] = None,
1839
+ entry_type: Annotated[
1840
+ Optional[ListCatalogsEntryTypeParameter],
1841
+ Field(
1842
+ description="Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata "
1843
+ ),
1844
+ ] = None,
1845
+ graph_type: Annotated[
1846
+ Optional[ListCatalogsGraphTypeParameter],
1847
+ Field(
1848
+ description="Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution "
1849
+ ),
1850
+ ] = None,
1851
+ resource_type: Annotated[
1852
+ Optional[ListCatalogsResourceTypeParameter],
1853
+ Field(
1854
+ description="Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data) "
1855
+ ),
1856
+ ] = None,
1857
+ _request_timeout: Union[
1858
+ None,
1859
+ Annotated[StrictFloat, Field(gt=0)],
1860
+ Tuple[
1861
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1862
+ ],
1863
+ ] = None,
1864
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1865
+ _content_type: Optional[StrictStr] = None,
1866
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1867
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1868
+ ) -> ApiResponse[EntityListResponse]:
1869
+ """List contacts
1870
+
1871
+ Returns a paginated list of all contacts. Contacts provide contact information for resources (vCard). Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
1872
+
1873
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1874
+ :type x_entrystore_host: str
1875
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1876
+ :type entrystore_host: str
1877
+ :param limit: Results per page
1878
+ :type limit: int
1879
+ :param offset: Results to skip before the first one returned
1880
+ :type offset: int
1881
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
1882
+ :type cursor: str
1883
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
1884
+ :type query: str
1885
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
1886
+ :type sort: str
1887
+ :param context: Filter by context ID. Can be specified multiple times to include entries from multiple contexts.
1888
+ :type context: str
1889
+ :param rdf_type: Only entries with this rdf:type URI
1890
+ :type rdf_type: str
1891
+ :param public: true: only publicly readable entries; false: only non-public entries
1892
+ :type public: bool
1893
+ :param created_after: Created at or after this instant
1894
+ :type created_after: datetime
1895
+ :param created_before: Created before this instant
1896
+ :type created_before: datetime
1897
+ :param modified_after: Modified at or after this instant
1898
+ :type modified_after: datetime
1899
+ :param modified_before: Modified before this instant
1900
+ :type modified_before: datetime
1901
+ :param entry_type: Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata
1902
+ :type entry_type: ListCatalogsEntryTypeParameter
1903
+ :param graph_type: Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution
1904
+ :type graph_type: ListCatalogsGraphTypeParameter
1905
+ :param resource_type: Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data)
1906
+ :type resource_type: ListCatalogsResourceTypeParameter
1907
+ :param _request_timeout: timeout setting for this request. If one
1908
+ number provided, it will be total request
1909
+ timeout. It can also be a pair (tuple) of
1910
+ (connection, read) timeouts.
1911
+ :type _request_timeout: int, tuple(int, int), optional
1912
+ :param _request_auth: set to override the auth_settings for an a single
1913
+ request; this effectively ignores the
1914
+ authentication in the spec for a single request.
1915
+ :type _request_auth: dict, optional
1916
+ :param _content_type: force content-type for the request.
1917
+ :type _content_type: str, Optional
1918
+ :param _headers: set to override the headers for a single
1919
+ request; this effectively ignores the headers
1920
+ in the spec for a single request.
1921
+ :type _headers: dict, optional
1922
+ :param _host_index: set to override the host_index for a single
1923
+ request; this effectively ignores the host_index
1924
+ in the spec for a single request.
1925
+ :type _host_index: int, optional
1926
+ :return: Returns the result object.
1927
+ """ # noqa: E501
1928
+
1929
+ _param = self._list_contacts_serialize(
1930
+ x_entrystore_host=x_entrystore_host,
1931
+ entrystore_host=entrystore_host,
1932
+ limit=limit,
1933
+ offset=offset,
1934
+ cursor=cursor,
1935
+ query=query,
1936
+ sort=sort,
1937
+ context=context,
1938
+ rdf_type=rdf_type,
1939
+ public=public,
1940
+ created_after=created_after,
1941
+ created_before=created_before,
1942
+ modified_after=modified_after,
1943
+ modified_before=modified_before,
1944
+ entry_type=entry_type,
1945
+ graph_type=graph_type,
1946
+ resource_type=resource_type,
1947
+ _request_auth=_request_auth,
1948
+ _content_type=_content_type,
1949
+ _headers=_headers,
1950
+ _host_index=_host_index,
1951
+ )
1952
+
1953
+ _response_types_map: Dict[str, Optional[str]] = {
1954
+ "200": "EntityListResponse",
1955
+ "400": "Error",
1956
+ "401": "Error",
1957
+ "500": "Error",
1958
+ "503": "Error",
1959
+ }
1960
+ response_data = await self.api_client.call_api(
1961
+ *_param, _request_timeout=_request_timeout
1962
+ )
1963
+ await response_data.read()
1964
+ return self.api_client.response_deserialize(
1965
+ response_data=response_data,
1966
+ response_types_map=_response_types_map,
1967
+ )
1968
+
1969
+ @validate_call
1970
+ async def list_contacts_without_preload_content(
1971
+ self,
1972
+ x_entrystore_host: Annotated[
1973
+ Optional[StrictStr],
1974
+ Field(
1975
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1976
+ ),
1977
+ ] = None,
1978
+ entrystore_host: Annotated[
1979
+ Optional[StrictStr],
1980
+ Field(
1981
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1982
+ ),
1983
+ ] = None,
1984
+ limit: Annotated[
1985
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1986
+ Field(description="Results per page"),
1987
+ ] = None,
1988
+ offset: Annotated[
1989
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1990
+ Field(description="Results to skip before the first one returned"),
1991
+ ] = None,
1992
+ cursor: Annotated[
1993
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1994
+ Field(
1995
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
1996
+ ),
1997
+ ] = None,
1998
+ query: Annotated[
1999
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
2000
+ Field(
2001
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
2002
+ ),
2003
+ ] = None,
2004
+ sort: Annotated[
2005
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
2006
+ Field(
2007
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
2008
+ ),
2009
+ ] = None,
2010
+ context: Annotated[
2011
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]],
2012
+ Field(
2013
+ description="Filter by context ID. Can be specified multiple times to include entries from multiple contexts. "
2014
+ ),
2015
+ ] = None,
2016
+ rdf_type: Annotated[
2017
+ Optional[Annotated[str, Field(strict=True, max_length=2048)]],
2018
+ Field(description="Only entries with this rdf:type URI"),
2019
+ ] = None,
2020
+ public: Annotated[
2021
+ Optional[StrictBool],
2022
+ Field(
2023
+ description="true: only publicly readable entries; false: only non-public entries"
2024
+ ),
2025
+ ] = None,
2026
+ created_after: Annotated[
2027
+ Optional[datetime], Field(description="Created at or after this instant")
2028
+ ] = None,
2029
+ created_before: Annotated[
2030
+ Optional[datetime], Field(description="Created before this instant")
2031
+ ] = None,
2032
+ modified_after: Annotated[
2033
+ Optional[datetime], Field(description="Modified at or after this instant")
2034
+ ] = None,
2035
+ modified_before: Annotated[
2036
+ Optional[datetime], Field(description="Modified before this instant")
2037
+ ] = None,
2038
+ entry_type: Annotated[
2039
+ Optional[ListCatalogsEntryTypeParameter],
2040
+ Field(
2041
+ description="Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata "
2042
+ ),
2043
+ ] = None,
2044
+ graph_type: Annotated[
2045
+ Optional[ListCatalogsGraphTypeParameter],
2046
+ Field(
2047
+ description="Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution "
2048
+ ),
2049
+ ] = None,
2050
+ resource_type: Annotated[
2051
+ Optional[ListCatalogsResourceTypeParameter],
2052
+ Field(
2053
+ description="Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data) "
2054
+ ),
2055
+ ] = None,
2056
+ _request_timeout: Union[
2057
+ None,
2058
+ Annotated[StrictFloat, Field(gt=0)],
2059
+ Tuple[
2060
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2061
+ ],
2062
+ ] = None,
2063
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2064
+ _content_type: Optional[StrictStr] = None,
2065
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2066
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2067
+ ) -> RESTResponseType:
2068
+ """List contacts
2069
+
2070
+ Returns a paginated list of all contacts. Contacts provide contact information for resources (vCard). Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
2071
+
2072
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2073
+ :type x_entrystore_host: str
2074
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2075
+ :type entrystore_host: str
2076
+ :param limit: Results per page
2077
+ :type limit: int
2078
+ :param offset: Results to skip before the first one returned
2079
+ :type offset: int
2080
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
2081
+ :type cursor: str
2082
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
2083
+ :type query: str
2084
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
2085
+ :type sort: str
2086
+ :param context: Filter by context ID. Can be specified multiple times to include entries from multiple contexts.
2087
+ :type context: str
2088
+ :param rdf_type: Only entries with this rdf:type URI
2089
+ :type rdf_type: str
2090
+ :param public: true: only publicly readable entries; false: only non-public entries
2091
+ :type public: bool
2092
+ :param created_after: Created at or after this instant
2093
+ :type created_after: datetime
2094
+ :param created_before: Created before this instant
2095
+ :type created_before: datetime
2096
+ :param modified_after: Modified at or after this instant
2097
+ :type modified_after: datetime
2098
+ :param modified_before: Modified before this instant
2099
+ :type modified_before: datetime
2100
+ :param entry_type: Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata
2101
+ :type entry_type: ListCatalogsEntryTypeParameter
2102
+ :param graph_type: Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution
2103
+ :type graph_type: ListCatalogsGraphTypeParameter
2104
+ :param resource_type: Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data)
2105
+ :type resource_type: ListCatalogsResourceTypeParameter
2106
+ :param _request_timeout: timeout setting for this request. If one
2107
+ number provided, it will be total request
2108
+ timeout. It can also be a pair (tuple) of
2109
+ (connection, read) timeouts.
2110
+ :type _request_timeout: int, tuple(int, int), optional
2111
+ :param _request_auth: set to override the auth_settings for an a single
2112
+ request; this effectively ignores the
2113
+ authentication in the spec for a single request.
2114
+ :type _request_auth: dict, optional
2115
+ :param _content_type: force content-type for the request.
2116
+ :type _content_type: str, Optional
2117
+ :param _headers: set to override the headers for a single
2118
+ request; this effectively ignores the headers
2119
+ in the spec for a single request.
2120
+ :type _headers: dict, optional
2121
+ :param _host_index: set to override the host_index for a single
2122
+ request; this effectively ignores the host_index
2123
+ in the spec for a single request.
2124
+ :type _host_index: int, optional
2125
+ :return: Returns the result object.
2126
+ """ # noqa: E501
2127
+
2128
+ _param = self._list_contacts_serialize(
2129
+ x_entrystore_host=x_entrystore_host,
2130
+ entrystore_host=entrystore_host,
2131
+ limit=limit,
2132
+ offset=offset,
2133
+ cursor=cursor,
2134
+ query=query,
2135
+ sort=sort,
2136
+ context=context,
2137
+ rdf_type=rdf_type,
2138
+ public=public,
2139
+ created_after=created_after,
2140
+ created_before=created_before,
2141
+ modified_after=modified_after,
2142
+ modified_before=modified_before,
2143
+ entry_type=entry_type,
2144
+ graph_type=graph_type,
2145
+ resource_type=resource_type,
2146
+ _request_auth=_request_auth,
2147
+ _content_type=_content_type,
2148
+ _headers=_headers,
2149
+ _host_index=_host_index,
2150
+ )
2151
+
2152
+ _response_types_map: Dict[str, Optional[str]] = {
2153
+ "200": "EntityListResponse",
2154
+ "400": "Error",
2155
+ "401": "Error",
2156
+ "500": "Error",
2157
+ "503": "Error",
2158
+ }
2159
+ response_data = await self.api_client.call_api(
2160
+ *_param, _request_timeout=_request_timeout
2161
+ )
2162
+ return response_data.response
2163
+
2164
+ def _list_contacts_serialize(
2165
+ self,
2166
+ x_entrystore_host,
2167
+ entrystore_host,
2168
+ limit,
2169
+ offset,
2170
+ cursor,
2171
+ query,
2172
+ sort,
2173
+ context,
2174
+ rdf_type,
2175
+ public,
2176
+ created_after,
2177
+ created_before,
2178
+ modified_after,
2179
+ modified_before,
2180
+ entry_type,
2181
+ graph_type,
2182
+ resource_type,
2183
+ _request_auth,
2184
+ _content_type,
2185
+ _headers,
2186
+ _host_index,
2187
+ ) -> RequestSerialized:
2188
+
2189
+ _host = None
2190
+
2191
+ _collection_formats: Dict[str, str] = {}
2192
+
2193
+ _path_params: Dict[str, str] = {}
2194
+ _query_params: List[Tuple[str, str]] = []
2195
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2196
+ _form_params: List[Tuple[str, str]] = []
2197
+ _files: Dict[
2198
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2199
+ ] = {}
2200
+ _body_params: Optional[bytes] = None
2201
+
2202
+ # process the path parameters
2203
+ # process the query parameters
2204
+ if entrystore_host is not None:
2205
+
2206
+ _query_params.append(("entrystore_host", entrystore_host))
2207
+
2208
+ if limit is not None:
2209
+
2210
+ _query_params.append(("limit", limit))
2211
+
2212
+ if offset is not None:
2213
+
2214
+ _query_params.append(("offset", offset))
2215
+
2216
+ if cursor is not None:
2217
+
2218
+ _query_params.append(("cursor", cursor))
2219
+
2220
+ if query is not None:
2221
+
2222
+ _query_params.append(("query", query))
2223
+
2224
+ if sort is not None:
2225
+
2226
+ _query_params.append(("sort", sort))
2227
+
2228
+ if context is not None:
2229
+
2230
+ _query_params.append(("context", context))
2231
+
2232
+ if rdf_type is not None:
2233
+
2234
+ _query_params.append(("rdf_type", rdf_type))
2235
+
2236
+ if public is not None:
2237
+
2238
+ _query_params.append(("public", public))
2239
+
2240
+ if created_after is not None:
2241
+ if isinstance(created_after, datetime):
2242
+ _query_params.append(
2243
+ (
2244
+ "created_after",
2245
+ created_after.strftime(
2246
+ self.api_client.configuration.datetime_format
2247
+ ),
2248
+ )
2249
+ )
2250
+ else:
2251
+ _query_params.append(("created_after", created_after))
2252
+
2253
+ if created_before is not None:
2254
+ if isinstance(created_before, datetime):
2255
+ _query_params.append(
2256
+ (
2257
+ "created_before",
2258
+ created_before.strftime(
2259
+ self.api_client.configuration.datetime_format
2260
+ ),
2261
+ )
2262
+ )
2263
+ else:
2264
+ _query_params.append(("created_before", created_before))
2265
+
2266
+ if modified_after is not None:
2267
+ if isinstance(modified_after, datetime):
2268
+ _query_params.append(
2269
+ (
2270
+ "modified_after",
2271
+ modified_after.strftime(
2272
+ self.api_client.configuration.datetime_format
2273
+ ),
2274
+ )
2275
+ )
2276
+ else:
2277
+ _query_params.append(("modified_after", modified_after))
2278
+
2279
+ if modified_before is not None:
2280
+ if isinstance(modified_before, datetime):
2281
+ _query_params.append(
2282
+ (
2283
+ "modified_before",
2284
+ modified_before.strftime(
2285
+ self.api_client.configuration.datetime_format
2286
+ ),
2287
+ )
2288
+ )
2289
+ else:
2290
+ _query_params.append(("modified_before", modified_before))
2291
+
2292
+ if entry_type is not None:
2293
+
2294
+ _query_params.append(("entry_type", entry_type.value))
2295
+
2296
+ if graph_type is not None:
2297
+
2298
+ _query_params.append(("graph_type", graph_type.value))
2299
+
2300
+ if resource_type is not None:
2301
+
2302
+ _query_params.append(("resource_type", resource_type.value))
2303
+
2304
+ # process the header parameters
2305
+ if x_entrystore_host is not None:
2306
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
2307
+ # process the form parameters
2308
+ # process the body parameter
2309
+
2310
+ # set the HTTP header `Accept`
2311
+ if "Accept" not in _header_params:
2312
+ _header_params["Accept"] = self.api_client.select_header_accept(
2313
+ ["application/json"]
2314
+ )
2315
+
2316
+ # authentication setting
2317
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
2318
+
2319
+ return self.api_client.param_serialize(
2320
+ method="GET",
2321
+ resource_path="/contact",
2322
+ path_params=_path_params,
2323
+ query_params=_query_params,
2324
+ header_params=_header_params,
2325
+ body=_body_params,
2326
+ post_params=_form_params,
2327
+ files=_files,
2328
+ auth_settings=_auth_settings,
2329
+ collection_formats=_collection_formats,
2330
+ _host=_host,
2331
+ _request_auth=_request_auth,
2332
+ )
2333
+
2334
+ @validate_call
2335
+ async def update_contact_metadata(
2336
+ self,
2337
+ context_id: Annotated[
2338
+ str,
2339
+ Field(
2340
+ strict=True,
2341
+ description="The context (catalog) identifier in EntryStore",
2342
+ ),
2343
+ ],
2344
+ entry_id: Annotated[
2345
+ str,
2346
+ Field(strict=True, description="The entry identifier within the context"),
2347
+ ],
2348
+ metadata_request: Annotated[
2349
+ MetadataRequest,
2350
+ Field(
2351
+ description="Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
2352
+ ),
2353
+ ],
2354
+ x_entrystore_host: Annotated[
2355
+ Optional[StrictStr],
2356
+ Field(
2357
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2358
+ ),
2359
+ ] = None,
2360
+ entrystore_host: Annotated[
2361
+ Optional[StrictStr],
2362
+ Field(
2363
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2364
+ ),
2365
+ ] = None,
2366
+ _request_timeout: Union[
2367
+ None,
2368
+ Annotated[StrictFloat, Field(gt=0)],
2369
+ Tuple[
2370
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2371
+ ],
2372
+ ] = None,
2373
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2374
+ _content_type: Optional[StrictStr] = None,
2375
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2376
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2377
+ ) -> Dict[str, object]:
2378
+ """Update contact metadata
2379
+
2380
+ Replaces the vCard metadata for a specific contact. The request body is forwarded directly to EntryStore without structural transformation; use the Content-Type header to select the RDF serialization (application/ld+json, text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json). This is a full replacement, not a partial update. Requires authentication with write access to the entry's context.
2381
+
2382
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2383
+ :type context_id: str
2384
+ :param entry_id: The entry identifier within the context (required)
2385
+ :type entry_id: str
2386
+ :param metadata_request: Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
2387
+ :type metadata_request: MetadataRequest
2388
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2389
+ :type x_entrystore_host: str
2390
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2391
+ :type entrystore_host: str
2392
+ :param _request_timeout: timeout setting for this request. If one
2393
+ number provided, it will be total request
2394
+ timeout. It can also be a pair (tuple) of
2395
+ (connection, read) timeouts.
2396
+ :type _request_timeout: int, tuple(int, int), optional
2397
+ :param _request_auth: set to override the auth_settings for an a single
2398
+ request; this effectively ignores the
2399
+ authentication in the spec for a single request.
2400
+ :type _request_auth: dict, optional
2401
+ :param _content_type: force content-type for the request.
2402
+ :type _content_type: str, Optional
2403
+ :param _headers: set to override the headers for a single
2404
+ request; this effectively ignores the headers
2405
+ in the spec for a single request.
2406
+ :type _headers: dict, optional
2407
+ :param _host_index: set to override the host_index for a single
2408
+ request; this effectively ignores the host_index
2409
+ in the spec for a single request.
2410
+ :type _host_index: int, optional
2411
+ :return: Returns the result object.
2412
+ """ # noqa: E501
2413
+
2414
+ _param = self._update_contact_metadata_serialize(
2415
+ context_id=context_id,
2416
+ entry_id=entry_id,
2417
+ metadata_request=metadata_request,
2418
+ x_entrystore_host=x_entrystore_host,
2419
+ entrystore_host=entrystore_host,
2420
+ _request_auth=_request_auth,
2421
+ _content_type=_content_type,
2422
+ _headers=_headers,
2423
+ _host_index=_host_index,
2424
+ )
2425
+
2426
+ _response_types_map: Dict[str, Optional[str]] = {
2427
+ "200": "Dict[str, object]",
2428
+ "400": "Error",
2429
+ "401": "Error",
2430
+ "403": "Error",
2431
+ "404": "Error",
2432
+ "409": "Error",
2433
+ "422": "ValidationResponse",
2434
+ "500": "Error",
2435
+ "503": "Error",
2436
+ }
2437
+ response_data = await self.api_client.call_api(
2438
+ *_param, _request_timeout=_request_timeout
2439
+ )
2440
+ await response_data.read()
2441
+ return self.api_client.response_deserialize(
2442
+ response_data=response_data,
2443
+ response_types_map=_response_types_map,
2444
+ ).data
2445
+
2446
+ @validate_call
2447
+ async def update_contact_metadata_with_http_info(
2448
+ self,
2449
+ context_id: Annotated[
2450
+ str,
2451
+ Field(
2452
+ strict=True,
2453
+ description="The context (catalog) identifier in EntryStore",
2454
+ ),
2455
+ ],
2456
+ entry_id: Annotated[
2457
+ str,
2458
+ Field(strict=True, description="The entry identifier within the context"),
2459
+ ],
2460
+ metadata_request: Annotated[
2461
+ MetadataRequest,
2462
+ Field(
2463
+ description="Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
2464
+ ),
2465
+ ],
2466
+ x_entrystore_host: Annotated[
2467
+ Optional[StrictStr],
2468
+ Field(
2469
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2470
+ ),
2471
+ ] = None,
2472
+ entrystore_host: Annotated[
2473
+ Optional[StrictStr],
2474
+ Field(
2475
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2476
+ ),
2477
+ ] = None,
2478
+ _request_timeout: Union[
2479
+ None,
2480
+ Annotated[StrictFloat, Field(gt=0)],
2481
+ Tuple[
2482
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2483
+ ],
2484
+ ] = None,
2485
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2486
+ _content_type: Optional[StrictStr] = None,
2487
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2488
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2489
+ ) -> ApiResponse[Dict[str, object]]:
2490
+ """Update contact metadata
2491
+
2492
+ Replaces the vCard metadata for a specific contact. The request body is forwarded directly to EntryStore without structural transformation; use the Content-Type header to select the RDF serialization (application/ld+json, text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json). This is a full replacement, not a partial update. Requires authentication with write access to the entry's context.
2493
+
2494
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2495
+ :type context_id: str
2496
+ :param entry_id: The entry identifier within the context (required)
2497
+ :type entry_id: str
2498
+ :param metadata_request: Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
2499
+ :type metadata_request: MetadataRequest
2500
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2501
+ :type x_entrystore_host: str
2502
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2503
+ :type entrystore_host: str
2504
+ :param _request_timeout: timeout setting for this request. If one
2505
+ number provided, it will be total request
2506
+ timeout. It can also be a pair (tuple) of
2507
+ (connection, read) timeouts.
2508
+ :type _request_timeout: int, tuple(int, int), optional
2509
+ :param _request_auth: set to override the auth_settings for an a single
2510
+ request; this effectively ignores the
2511
+ authentication in the spec for a single request.
2512
+ :type _request_auth: dict, optional
2513
+ :param _content_type: force content-type for the request.
2514
+ :type _content_type: str, Optional
2515
+ :param _headers: set to override the headers for a single
2516
+ request; this effectively ignores the headers
2517
+ in the spec for a single request.
2518
+ :type _headers: dict, optional
2519
+ :param _host_index: set to override the host_index for a single
2520
+ request; this effectively ignores the host_index
2521
+ in the spec for a single request.
2522
+ :type _host_index: int, optional
2523
+ :return: Returns the result object.
2524
+ """ # noqa: E501
2525
+
2526
+ _param = self._update_contact_metadata_serialize(
2527
+ context_id=context_id,
2528
+ entry_id=entry_id,
2529
+ metadata_request=metadata_request,
2530
+ x_entrystore_host=x_entrystore_host,
2531
+ entrystore_host=entrystore_host,
2532
+ _request_auth=_request_auth,
2533
+ _content_type=_content_type,
2534
+ _headers=_headers,
2535
+ _host_index=_host_index,
2536
+ )
2537
+
2538
+ _response_types_map: Dict[str, Optional[str]] = {
2539
+ "200": "Dict[str, object]",
2540
+ "400": "Error",
2541
+ "401": "Error",
2542
+ "403": "Error",
2543
+ "404": "Error",
2544
+ "409": "Error",
2545
+ "422": "ValidationResponse",
2546
+ "500": "Error",
2547
+ "503": "Error",
2548
+ }
2549
+ response_data = await self.api_client.call_api(
2550
+ *_param, _request_timeout=_request_timeout
2551
+ )
2552
+ await response_data.read()
2553
+ return self.api_client.response_deserialize(
2554
+ response_data=response_data,
2555
+ response_types_map=_response_types_map,
2556
+ )
2557
+
2558
+ @validate_call
2559
+ async def update_contact_metadata_without_preload_content(
2560
+ self,
2561
+ context_id: Annotated[
2562
+ str,
2563
+ Field(
2564
+ strict=True,
2565
+ description="The context (catalog) identifier in EntryStore",
2566
+ ),
2567
+ ],
2568
+ entry_id: Annotated[
2569
+ str,
2570
+ Field(strict=True, description="The entry identifier within the context"),
2571
+ ],
2572
+ metadata_request: Annotated[
2573
+ MetadataRequest,
2574
+ Field(
2575
+ description="Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
2576
+ ),
2577
+ ],
2578
+ x_entrystore_host: Annotated[
2579
+ Optional[StrictStr],
2580
+ Field(
2581
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2582
+ ),
2583
+ ] = None,
2584
+ entrystore_host: Annotated[
2585
+ Optional[StrictStr],
2586
+ Field(
2587
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2588
+ ),
2589
+ ] = None,
2590
+ _request_timeout: Union[
2591
+ None,
2592
+ Annotated[StrictFloat, Field(gt=0)],
2593
+ Tuple[
2594
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2595
+ ],
2596
+ ] = None,
2597
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2598
+ _content_type: Optional[StrictStr] = None,
2599
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2600
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2601
+ ) -> RESTResponseType:
2602
+ """Update contact metadata
2603
+
2604
+ Replaces the vCard metadata for a specific contact. The request body is forwarded directly to EntryStore without structural transformation; use the Content-Type header to select the RDF serialization (application/ld+json, text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json). This is a full replacement, not a partial update. Requires authentication with write access to the entry's context.
2605
+
2606
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2607
+ :type context_id: str
2608
+ :param entry_id: The entry identifier within the context (required)
2609
+ :type entry_id: str
2610
+ :param metadata_request: Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
2611
+ :type metadata_request: MetadataRequest
2612
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2613
+ :type x_entrystore_host: str
2614
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2615
+ :type entrystore_host: str
2616
+ :param _request_timeout: timeout setting for this request. If one
2617
+ number provided, it will be total request
2618
+ timeout. It can also be a pair (tuple) of
2619
+ (connection, read) timeouts.
2620
+ :type _request_timeout: int, tuple(int, int), optional
2621
+ :param _request_auth: set to override the auth_settings for an a single
2622
+ request; this effectively ignores the
2623
+ authentication in the spec for a single request.
2624
+ :type _request_auth: dict, optional
2625
+ :param _content_type: force content-type for the request.
2626
+ :type _content_type: str, Optional
2627
+ :param _headers: set to override the headers for a single
2628
+ request; this effectively ignores the headers
2629
+ in the spec for a single request.
2630
+ :type _headers: dict, optional
2631
+ :param _host_index: set to override the host_index for a single
2632
+ request; this effectively ignores the host_index
2633
+ in the spec for a single request.
2634
+ :type _host_index: int, optional
2635
+ :return: Returns the result object.
2636
+ """ # noqa: E501
2637
+
2638
+ _param = self._update_contact_metadata_serialize(
2639
+ context_id=context_id,
2640
+ entry_id=entry_id,
2641
+ metadata_request=metadata_request,
2642
+ x_entrystore_host=x_entrystore_host,
2643
+ entrystore_host=entrystore_host,
2644
+ _request_auth=_request_auth,
2645
+ _content_type=_content_type,
2646
+ _headers=_headers,
2647
+ _host_index=_host_index,
2648
+ )
2649
+
2650
+ _response_types_map: Dict[str, Optional[str]] = {
2651
+ "200": "Dict[str, object]",
2652
+ "400": "Error",
2653
+ "401": "Error",
2654
+ "403": "Error",
2655
+ "404": "Error",
2656
+ "409": "Error",
2657
+ "422": "ValidationResponse",
2658
+ "500": "Error",
2659
+ "503": "Error",
2660
+ }
2661
+ response_data = await self.api_client.call_api(
2662
+ *_param, _request_timeout=_request_timeout
2663
+ )
2664
+ return response_data.response
2665
+
2666
+ def _update_contact_metadata_serialize(
2667
+ self,
2668
+ context_id,
2669
+ entry_id,
2670
+ metadata_request,
2671
+ x_entrystore_host,
2672
+ entrystore_host,
2673
+ _request_auth,
2674
+ _content_type,
2675
+ _headers,
2676
+ _host_index,
2677
+ ) -> RequestSerialized:
2678
+
2679
+ _host = None
2680
+
2681
+ _collection_formats: Dict[str, str] = {}
2682
+
2683
+ _path_params: Dict[str, str] = {}
2684
+ _query_params: List[Tuple[str, str]] = []
2685
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2686
+ _form_params: List[Tuple[str, str]] = []
2687
+ _files: Dict[
2688
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2689
+ ] = {}
2690
+ _body_params: Optional[bytes] = None
2691
+
2692
+ # process the path parameters
2693
+ if context_id is not None:
2694
+ _path_params["context_id"] = context_id
2695
+ if entry_id is not None:
2696
+ _path_params["entry_id"] = entry_id
2697
+ # process the query parameters
2698
+ if entrystore_host is not None:
2699
+
2700
+ _query_params.append(("entrystore_host", entrystore_host))
2701
+
2702
+ # process the header parameters
2703
+ if x_entrystore_host is not None:
2704
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
2705
+ # process the form parameters
2706
+ # process the body parameter
2707
+ if metadata_request is not None:
2708
+ _body_params = metadata_request
2709
+
2710
+ # set the HTTP header `Accept`
2711
+ if "Accept" not in _header_params:
2712
+ _header_params["Accept"] = self.api_client.select_header_accept(
2713
+ ["application/ld+json", "application/json"]
2714
+ )
2715
+
2716
+ # set the HTTP header `Content-Type`
2717
+ if _content_type:
2718
+ _header_params["Content-Type"] = _content_type
2719
+ else:
2720
+ _default_content_type = self.api_client.select_header_content_type(
2721
+ ["application/ld+json"]
2722
+ )
2723
+ if _default_content_type is not None:
2724
+ _header_params["Content-Type"] = _default_content_type
2725
+
2726
+ # authentication setting
2727
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
2728
+
2729
+ return self.api_client.param_serialize(
2730
+ method="PUT",
2731
+ resource_path="/contact/{context_id}/{entry_id}/metadata",
2732
+ path_params=_path_params,
2733
+ query_params=_query_params,
2734
+ header_params=_header_params,
2735
+ body=_body_params,
2736
+ post_params=_form_params,
2737
+ files=_files,
2738
+ auth_settings=_auth_settings,
2739
+ collection_formats=_collection_formats,
2740
+ _host=_host,
2741
+ _request_auth=_request_auth,
2742
+ )
2743
+
2744
+ @validate_call
2745
+ async def validate_contact(
2746
+ self,
2747
+ context_id: Annotated[
2748
+ str,
2749
+ Field(
2750
+ strict=True,
2751
+ description="The context (catalog) identifier in EntryStore",
2752
+ ),
2753
+ ],
2754
+ entry_id: Annotated[
2755
+ str,
2756
+ Field(strict=True, description="The entry identifier within the context"),
2757
+ ],
2758
+ profile: Annotated[
2759
+ ValidationProfile,
2760
+ Field(
2761
+ description="DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) "
2762
+ ),
2763
+ ],
2764
+ x_entrystore_host: Annotated[
2765
+ Optional[StrictStr],
2766
+ Field(
2767
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2768
+ ),
2769
+ ] = None,
2770
+ entrystore_host: Annotated[
2771
+ Optional[StrictStr],
2772
+ Field(
2773
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2774
+ ),
2775
+ ] = None,
2776
+ _request_timeout: Union[
2777
+ None,
2778
+ Annotated[StrictFloat, Field(gt=0)],
2779
+ Tuple[
2780
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2781
+ ],
2782
+ ] = None,
2783
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2784
+ _content_type: Optional[StrictStr] = None,
2785
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2786
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2787
+ ) -> ValidationResponse:
2788
+ """Validate contact metadata
2789
+
2790
+ Retrieves the stored metadata for this contact point entry from EntryStore and validates it against the SHACL shapes for the requested profile (a DCAT-AP profile, or the domain's custom shapes with profile=custom). No request body is needed — the endpoint operates on the entry's existing metadata, similar to how the `/metadata` endpoint returns it. Returns a detailed report with any violations, warnings, or informational findings. A 200 response with `conforms: false` is expected when the metadata has issues — it means validation completed successfully. `conforms: true` alone does not mean the metadata was checked. If no shape in the profile targets the entry — usually because its `rdf:type` is missing or wrong — the report conforms with nothing in it. `summary.targetedShapes` counts the shapes that had something to check; `0` means nothing was. Authentication is optional. Public entries can be validated without authentication. Authenticated requests may validate additional non-public entries.
2791
+
2792
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2793
+ :type context_id: str
2794
+ :param entry_id: The entry identifier within the context (required)
2795
+ :type entry_id: str
2796
+ :param profile: DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) (required)
2797
+ :type profile: ValidationProfile
2798
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2799
+ :type x_entrystore_host: str
2800
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2801
+ :type entrystore_host: str
2802
+ :param _request_timeout: timeout setting for this request. If one
2803
+ number provided, it will be total request
2804
+ timeout. It can also be a pair (tuple) of
2805
+ (connection, read) timeouts.
2806
+ :type _request_timeout: int, tuple(int, int), optional
2807
+ :param _request_auth: set to override the auth_settings for an a single
2808
+ request; this effectively ignores the
2809
+ authentication in the spec for a single request.
2810
+ :type _request_auth: dict, optional
2811
+ :param _content_type: force content-type for the request.
2812
+ :type _content_type: str, Optional
2813
+ :param _headers: set to override the headers for a single
2814
+ request; this effectively ignores the headers
2815
+ in the spec for a single request.
2816
+ :type _headers: dict, optional
2817
+ :param _host_index: set to override the host_index for a single
2818
+ request; this effectively ignores the host_index
2819
+ in the spec for a single request.
2820
+ :type _host_index: int, optional
2821
+ :return: Returns the result object.
2822
+ """ # noqa: E501
2823
+
2824
+ _param = self._validate_contact_serialize(
2825
+ context_id=context_id,
2826
+ entry_id=entry_id,
2827
+ profile=profile,
2828
+ x_entrystore_host=x_entrystore_host,
2829
+ entrystore_host=entrystore_host,
2830
+ _request_auth=_request_auth,
2831
+ _content_type=_content_type,
2832
+ _headers=_headers,
2833
+ _host_index=_host_index,
2834
+ )
2835
+
2836
+ _response_types_map: Dict[str, Optional[str]] = {
2837
+ "200": "ValidationResponse",
2838
+ "400": "Error",
2839
+ "401": "Error",
2840
+ "404": "Error",
2841
+ "500": "Error",
2842
+ "503": "Error",
2843
+ }
2844
+ response_data = await self.api_client.call_api(
2845
+ *_param, _request_timeout=_request_timeout
2846
+ )
2847
+ await response_data.read()
2848
+ return self.api_client.response_deserialize(
2849
+ response_data=response_data,
2850
+ response_types_map=_response_types_map,
2851
+ ).data
2852
+
2853
+ @validate_call
2854
+ async def validate_contact_with_http_info(
2855
+ self,
2856
+ context_id: Annotated[
2857
+ str,
2858
+ Field(
2859
+ strict=True,
2860
+ description="The context (catalog) identifier in EntryStore",
2861
+ ),
2862
+ ],
2863
+ entry_id: Annotated[
2864
+ str,
2865
+ Field(strict=True, description="The entry identifier within the context"),
2866
+ ],
2867
+ profile: Annotated[
2868
+ ValidationProfile,
2869
+ Field(
2870
+ description="DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) "
2871
+ ),
2872
+ ],
2873
+ x_entrystore_host: Annotated[
2874
+ Optional[StrictStr],
2875
+ Field(
2876
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2877
+ ),
2878
+ ] = None,
2879
+ entrystore_host: Annotated[
2880
+ Optional[StrictStr],
2881
+ Field(
2882
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2883
+ ),
2884
+ ] = None,
2885
+ _request_timeout: Union[
2886
+ None,
2887
+ Annotated[StrictFloat, Field(gt=0)],
2888
+ Tuple[
2889
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2890
+ ],
2891
+ ] = None,
2892
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2893
+ _content_type: Optional[StrictStr] = None,
2894
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2895
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2896
+ ) -> ApiResponse[ValidationResponse]:
2897
+ """Validate contact metadata
2898
+
2899
+ Retrieves the stored metadata for this contact point entry from EntryStore and validates it against the SHACL shapes for the requested profile (a DCAT-AP profile, or the domain's custom shapes with profile=custom). No request body is needed — the endpoint operates on the entry's existing metadata, similar to how the `/metadata` endpoint returns it. Returns a detailed report with any violations, warnings, or informational findings. A 200 response with `conforms: false` is expected when the metadata has issues — it means validation completed successfully. `conforms: true` alone does not mean the metadata was checked. If no shape in the profile targets the entry — usually because its `rdf:type` is missing or wrong — the report conforms with nothing in it. `summary.targetedShapes` counts the shapes that had something to check; `0` means nothing was. Authentication is optional. Public entries can be validated without authentication. Authenticated requests may validate additional non-public entries.
2900
+
2901
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2902
+ :type context_id: str
2903
+ :param entry_id: The entry identifier within the context (required)
2904
+ :type entry_id: str
2905
+ :param profile: DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) (required)
2906
+ :type profile: ValidationProfile
2907
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2908
+ :type x_entrystore_host: str
2909
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2910
+ :type entrystore_host: str
2911
+ :param _request_timeout: timeout setting for this request. If one
2912
+ number provided, it will be total request
2913
+ timeout. It can also be a pair (tuple) of
2914
+ (connection, read) timeouts.
2915
+ :type _request_timeout: int, tuple(int, int), optional
2916
+ :param _request_auth: set to override the auth_settings for an a single
2917
+ request; this effectively ignores the
2918
+ authentication in the spec for a single request.
2919
+ :type _request_auth: dict, optional
2920
+ :param _content_type: force content-type for the request.
2921
+ :type _content_type: str, Optional
2922
+ :param _headers: set to override the headers for a single
2923
+ request; this effectively ignores the headers
2924
+ in the spec for a single request.
2925
+ :type _headers: dict, optional
2926
+ :param _host_index: set to override the host_index for a single
2927
+ request; this effectively ignores the host_index
2928
+ in the spec for a single request.
2929
+ :type _host_index: int, optional
2930
+ :return: Returns the result object.
2931
+ """ # noqa: E501
2932
+
2933
+ _param = self._validate_contact_serialize(
2934
+ context_id=context_id,
2935
+ entry_id=entry_id,
2936
+ profile=profile,
2937
+ x_entrystore_host=x_entrystore_host,
2938
+ entrystore_host=entrystore_host,
2939
+ _request_auth=_request_auth,
2940
+ _content_type=_content_type,
2941
+ _headers=_headers,
2942
+ _host_index=_host_index,
2943
+ )
2944
+
2945
+ _response_types_map: Dict[str, Optional[str]] = {
2946
+ "200": "ValidationResponse",
2947
+ "400": "Error",
2948
+ "401": "Error",
2949
+ "404": "Error",
2950
+ "500": "Error",
2951
+ "503": "Error",
2952
+ }
2953
+ response_data = await self.api_client.call_api(
2954
+ *_param, _request_timeout=_request_timeout
2955
+ )
2956
+ await response_data.read()
2957
+ return self.api_client.response_deserialize(
2958
+ response_data=response_data,
2959
+ response_types_map=_response_types_map,
2960
+ )
2961
+
2962
+ @validate_call
2963
+ async def validate_contact_without_preload_content(
2964
+ self,
2965
+ context_id: Annotated[
2966
+ str,
2967
+ Field(
2968
+ strict=True,
2969
+ description="The context (catalog) identifier in EntryStore",
2970
+ ),
2971
+ ],
2972
+ entry_id: Annotated[
2973
+ str,
2974
+ Field(strict=True, description="The entry identifier within the context"),
2975
+ ],
2976
+ profile: Annotated[
2977
+ ValidationProfile,
2978
+ Field(
2979
+ description="DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) "
2980
+ ),
2981
+ ],
2982
+ x_entrystore_host: Annotated[
2983
+ Optional[StrictStr],
2984
+ Field(
2985
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2986
+ ),
2987
+ ] = None,
2988
+ entrystore_host: Annotated[
2989
+ Optional[StrictStr],
2990
+ Field(
2991
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2992
+ ),
2993
+ ] = None,
2994
+ _request_timeout: Union[
2995
+ None,
2996
+ Annotated[StrictFloat, Field(gt=0)],
2997
+ Tuple[
2998
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2999
+ ],
3000
+ ] = None,
3001
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3002
+ _content_type: Optional[StrictStr] = None,
3003
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3004
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3005
+ ) -> RESTResponseType:
3006
+ """Validate contact metadata
3007
+
3008
+ Retrieves the stored metadata for this contact point entry from EntryStore and validates it against the SHACL shapes for the requested profile (a DCAT-AP profile, or the domain's custom shapes with profile=custom). No request body is needed — the endpoint operates on the entry's existing metadata, similar to how the `/metadata` endpoint returns it. Returns a detailed report with any violations, warnings, or informational findings. A 200 response with `conforms: false` is expected when the metadata has issues — it means validation completed successfully. `conforms: true` alone does not mean the metadata was checked. If no shape in the profile targets the entry — usually because its `rdf:type` is missing or wrong — the report conforms with nothing in it. `summary.targetedShapes` counts the shapes that had something to check; `0` means nothing was. Authentication is optional. Public entries can be validated without authentication. Authenticated requests may validate additional non-public entries.
3009
+
3010
+ :param context_id: The context (catalog) identifier in EntryStore (required)
3011
+ :type context_id: str
3012
+ :param entry_id: The entry identifier within the context (required)
3013
+ :type entry_id: str
3014
+ :param profile: DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) (required)
3015
+ :type profile: ValidationProfile
3016
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
3017
+ :type x_entrystore_host: str
3018
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
3019
+ :type entrystore_host: str
3020
+ :param _request_timeout: timeout setting for this request. If one
3021
+ number provided, it will be total request
3022
+ timeout. It can also be a pair (tuple) of
3023
+ (connection, read) timeouts.
3024
+ :type _request_timeout: int, tuple(int, int), optional
3025
+ :param _request_auth: set to override the auth_settings for an a single
3026
+ request; this effectively ignores the
3027
+ authentication in the spec for a single request.
3028
+ :type _request_auth: dict, optional
3029
+ :param _content_type: force content-type for the request.
3030
+ :type _content_type: str, Optional
3031
+ :param _headers: set to override the headers for a single
3032
+ request; this effectively ignores the headers
3033
+ in the spec for a single request.
3034
+ :type _headers: dict, optional
3035
+ :param _host_index: set to override the host_index for a single
3036
+ request; this effectively ignores the host_index
3037
+ in the spec for a single request.
3038
+ :type _host_index: int, optional
3039
+ :return: Returns the result object.
3040
+ """ # noqa: E501
3041
+
3042
+ _param = self._validate_contact_serialize(
3043
+ context_id=context_id,
3044
+ entry_id=entry_id,
3045
+ profile=profile,
3046
+ x_entrystore_host=x_entrystore_host,
3047
+ entrystore_host=entrystore_host,
3048
+ _request_auth=_request_auth,
3049
+ _content_type=_content_type,
3050
+ _headers=_headers,
3051
+ _host_index=_host_index,
3052
+ )
3053
+
3054
+ _response_types_map: Dict[str, Optional[str]] = {
3055
+ "200": "ValidationResponse",
3056
+ "400": "Error",
3057
+ "401": "Error",
3058
+ "404": "Error",
3059
+ "500": "Error",
3060
+ "503": "Error",
3061
+ }
3062
+ response_data = await self.api_client.call_api(
3063
+ *_param, _request_timeout=_request_timeout
3064
+ )
3065
+ return response_data.response
3066
+
3067
+ def _validate_contact_serialize(
3068
+ self,
3069
+ context_id,
3070
+ entry_id,
3071
+ profile,
3072
+ x_entrystore_host,
3073
+ entrystore_host,
3074
+ _request_auth,
3075
+ _content_type,
3076
+ _headers,
3077
+ _host_index,
3078
+ ) -> RequestSerialized:
3079
+
3080
+ _host = None
3081
+
3082
+ _collection_formats: Dict[str, str] = {}
3083
+
3084
+ _path_params: Dict[str, str] = {}
3085
+ _query_params: List[Tuple[str, str]] = []
3086
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3087
+ _form_params: List[Tuple[str, str]] = []
3088
+ _files: Dict[
3089
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3090
+ ] = {}
3091
+ _body_params: Optional[bytes] = None
3092
+
3093
+ # process the path parameters
3094
+ if context_id is not None:
3095
+ _path_params["context_id"] = context_id
3096
+ if entry_id is not None:
3097
+ _path_params["entry_id"] = entry_id
3098
+ # process the query parameters
3099
+ if entrystore_host is not None:
3100
+
3101
+ _query_params.append(("entrystore_host", entrystore_host))
3102
+
3103
+ if profile is not None:
3104
+
3105
+ _query_params.append(("profile", profile.value))
3106
+
3107
+ # process the header parameters
3108
+ if x_entrystore_host is not None:
3109
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
3110
+ # process the form parameters
3111
+ # process the body parameter
3112
+
3113
+ # set the HTTP header `Accept`
3114
+ if "Accept" not in _header_params:
3115
+ _header_params["Accept"] = self.api_client.select_header_accept(
3116
+ ["application/json"]
3117
+ )
3118
+
3119
+ # authentication setting
3120
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
3121
+
3122
+ return self.api_client.param_serialize(
3123
+ method="GET",
3124
+ resource_path="/contact/{context_id}/{entry_id}/validate",
3125
+ path_params=_path_params,
3126
+ query_params=_query_params,
3127
+ header_params=_header_params,
3128
+ body=_body_params,
3129
+ post_params=_form_params,
3130
+ files=_files,
3131
+ auth_settings=_auth_settings,
3132
+ collection_formats=_collection_formats,
3133
+ _host=_host,
3134
+ _request_auth=_request_auth,
3135
+ )