Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "credal"

[tool.poetry]
name = "credal"
version = "0.1.3"
version = "0.1.4"
description = ""
readme = "README.md"
authors = []
Expand Down
297 changes: 10 additions & 287 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -930,15 +930,15 @@ client.document_catalog.upload_document_contents(
<dl>
<dd>

**custom_metadata:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — Optional JSON representing any custom metadata for this document
**custom_metadata:** `typing.Optional[typing.Dict[str, CustomMetadataValue]]` — Optional JSON representing any custom metadata for this document

</dd>
</dl>

<dl>
<dd>

**collection_id:** `typing.Optional[str]` — If specified, document will also be added to a particular document collection
**collection_id:** `typing.Optional[str]` — If specified, the document will also be added to the provided document collection. The document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To await this process and have this endpoint return only when that embedding process is complete, use the `awaitVectorStoreSync` parameter.

</dd>
</dl>
Expand All @@ -962,6 +962,14 @@ client.document_catalog.upload_document_contents(
<dl>
<dd>

**await_vector_store_sync:** `typing.Optional[bool]` — If specified, the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
Expand Down Expand Up @@ -1788,291 +1796,6 @@ client.document_collections.update_mongo_collection_sync(
</dl>


</dd>
</dl>
</details>

## PermissionsService
<details><summary><code>client.permissions_service.<a href="src/credal/permissions_service/client.py">check_resource_authorization_for_user</a>(...)</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Admin endpoint to check whether the specified user is authorized to read the specified resource.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from credal import CredalApi
from credal.common import ResourceIdentifier_ExternalResourceId

client = CredalApi(
api_key="YOUR_API_KEY",
)
client.permissions_service.check_resource_authorization_for_user(
resource_identifier=ResourceIdentifier_ExternalResourceId(
external_resource_id="170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
resource_type="GOOGLE_DRIVE_ITEM",
),
user_email="[email protected]",
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**resource_identifier:** `ResourceIdentifier` — The resource identifier for which you want to check authorization.

</dd>
</dl>

<dl>
<dd>

**user_email:** `str` — The user email to check authorization for.

</dd>
</dl>

<dl>
<dd>

**disable_cache:** `typing.Optional[bool]` — If specified, Credal will bypass the permissions cache and check current permissions for this resource

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.permissions_service.<a href="src/credal/permissions_service/client.py">check_bulk_resources_authorization_for_user</a>(...)</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Admin endpoint to check whether the specified user is authorized to read the specified set of resources.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from credal import CredalApi
from credal.common import (
ResourceIdentifier_ExternalResourceId,
ResourceIdentifier_Url,
)

client = CredalApi(
api_key="YOUR_API_KEY",
)
client.permissions_service.check_bulk_resources_authorization_for_user(
resource_identifiers=[
ResourceIdentifier_Url(
url="https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit",
),
ResourceIdentifier_ExternalResourceId(
external_resource_id="sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
resource_type="ZENDESK_TICKET",
),
],
user_email="[email protected]",
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**resource_identifiers:** `typing.Sequence[ResourceIdentifier]` — The set of resource identifier for which you want to check authorization. Currently limited to 20 resources.

</dd>
</dl>

<dl>
<dd>

**user_email:** `str` — The user email to check authorization for.

</dd>
</dl>

<dl>
<dd>

**disable_cache:** `typing.Optional[bool]` — If specified, Credal will bypass the permissions cache and check current permissions for all resources specified.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.permissions_service.<a href="src/credal/permissions_service/client.py">list_cached_authorized_resources_for_user</a>(...)</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Admin endpoint to list all resources that the specified user is authorized to read. Note this endpoint returns cached results and may not be up-to-date. You can use the checkResourceAuthorizationForUser endpoint with disableCache set to true to get the most up-to-date results.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from credal import CredalApi

client = CredalApi(
api_key="YOUR_API_KEY",
)
client.permissions_service.list_cached_authorized_resources_for_user(
user_email="[email protected]",
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**user_email:** `str` — The user email to list authorized resources for.

</dd>
</dl>

<dl>
<dd>

**resource_type:** `typing.Optional[ResourceType]` — The type of resource you want to list. If not specified, all resource types will be listed.

</dd>
</dl>

<dl>
<dd>

**limit:** `typing.Optional[int]` — The maximum number of resources to return. Defaults to 100.

</dd>
</dl>

<dl>
<dd>

**offset:** `typing.Optional[int]` — The offset to use for pagination. If not specified, the first page of results will be returned.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down
Loading