Skip to content

Commit 73df429

Browse files
author
gitlab-ci-token
committed
1 parent 505e7f6 commit 73df429

4 files changed

Lines changed: 348 additions & 0 deletions

File tree

‎docs/core/invitations-and-permissions/user-invitations.md‎

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
| <span class="http-badge http-post">POST</span> | `/api/user-invitations/approve/` | [Approve a requested invitation](#approve-a-requested-invitation) |
1818
| <span class="http-badge http-post">POST</span> | `/api/user-invitations/{uuid}/cancel/` | [Cancel an invitation](#cancel-an-invitation) |
1919
| <span class="http-badge http-post">POST</span> | `/api/user-invitations/{uuid}/check/` | [Check invitation validity](#check-invitation-validity) |
20+
| <span class="http-badge http-post">POST</span> | `/api/user-invitations/check-duplicates/` | [Check for duplicate invitations](#check-for-duplicate-invitations) |
2021
| <span class="http-badge http-post">POST</span> | `/api/user-invitations/{uuid}/delete/` | [Delete an invitation (staff only)](#delete-an-invitation-staff-only) |
2122
| <span class="http-badge http-post">POST</span> | `/api/user-invitations/reject/` | [Reject a requested invitation](#reject-a-requested-invitation) |
2223
| <span class="http-badge http-post">POST</span> | `/api/user-invitations/{uuid}/send/` | [Resend an invitation](#resend-an-invitation) |
@@ -954,6 +955,92 @@ Checks if an invitation is pending and returns its email and whether a civil num
954955

955956
---
956957

958+
### Check for duplicate invitations
959+
960+
Returns pending invitations that already exist for the same email and role within the given scope.
961+
962+
963+
=== "HTTPie"
964+
965+
```bash
966+
http \
967+
POST \
968+
https://api.example.com/api/user-invitations/check-duplicates/ \
969+
Authorization:"Token YOUR_API_TOKEN" \
970+
scope="string-value" \
971+
invitations:='[]'
972+
```
973+
974+
=== "Python"
975+
976+
```python
977+
from waldur_api_client.client import AuthenticatedClient
978+
from waldur_api_client.models.invitation_duplicate_check_request import InvitationDuplicateCheckRequest # (1)
979+
from waldur_api_client.api.user_invitations import user_invitations_check_duplicates # (2)
980+
981+
client = AuthenticatedClient(
982+
base_url="https://api.example.com", token="YOUR_API_TOKEN"
983+
)
984+
985+
body_data = InvitationDuplicateCheckRequest(
986+
scope="string-value",
987+
invitations=[]
988+
)
989+
response = user_invitations_check_duplicates.sync(
990+
client=client,
991+
body=body_data
992+
)
993+
994+
print(response)
995+
```
996+
997+
998+
1. **Model Source:** [`InvitationDuplicateCheckRequest`](https://github.com/waldur/py-client/blob/main/waldur_api_client/models/invitation_duplicate_check_request.py)
999+
2. **API Source:** [`user_invitations_check_duplicates`](https://github.com/waldur/py-client/blob/main/waldur_api_client/api/user_invitations/user_invitations_check_duplicates.py)
1000+
1001+
=== "TypeScript"
1002+
1003+
```typescript
1004+
import { userInvitationsCheckDuplicates } from 'waldur-js-client';
1005+
1006+
try {
1007+
const response = await userInvitationsCheckDuplicates({
1008+
auth: "Token YOUR_API_TOKEN",
1009+
body: {
1010+
"scope": "string-value",
1011+
"invitations": []
1012+
}
1013+
});
1014+
console.log('Success:', response);
1015+
} catch (error) {
1016+
console.error('Error:', error);
1017+
}
1018+
```
1019+
1020+
1021+
=== "Request Body (required)"
1022+
1023+
| Field | Type | Required | Description |
1024+
|---|---|---|---|
1025+
| `scope` | string | ✓ | URL of the scope (Customer or Project) for this invitation list |
1026+
| `invitations` | array of objects | ✓ | |
1027+
| `invitations.email` | string (email) | ✓ | |
1028+
| `invitations.role` | string (uuid) | ✓ | UUID of the role to grant to the invited user |
1029+
1030+
1031+
=== "Responses"
1032+
1033+
**`200`** -
1034+
1035+
| Field | Type |
1036+
|---|---|
1037+
| `duplicates` | array of objects |
1038+
| `duplicates.email` | string (email) |
1039+
| `duplicates.role` | string (uuid) |
1040+
| `duplicates.existing_invitation_uuid` | string (uuid) |
1041+
1042+
---
1043+
9571044
### Delete an invitation (staff only)
9581045

9591046
Deletes an invitation. This action is restricted to staff users.

‎docs/core/structure/users.md‎

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ A User object on its own has limited capabilities beyond logging in and managing
1818
| <span class="http-badge http-get">GET</span> | `/api/users/{uuid}/` | [Retrieve](#retrieve) |
1919
| <span class="http-badge http-post">POST</span> | `/api/users/` | [Create](#create) |
2020
| <span class="http-badge http-post">POST</span> | `/api/users/{uuid}/pull_remote_user/` | [Synchronize user details from eduTEAMS](#synchronize-user-details-from-eduteams) |
21+
| <span class="http-badge http-post">POST</span> | `/api/users/{uuid}/update_actions/` | [Recalculate user actions for a specific user](#recalculate-user-actions-for-a-specific-user) |
2122
| <span class="http-badge http-put">PUT</span> | `/api/users/{uuid}/` | [Update](#update) |
2223
| <span class="http-badge http-patch">PATCH</span> | `/api/users/{uuid}/` | [Partial Update](#partial-update) |
2324
| <span class="http-badge http-delete">DELETE</span> | `/api/users/{uuid}/` | [Delete](#delete) |
@@ -38,6 +39,7 @@ A User object on its own has limited capabilities beyond logging in and managing
3839
| <span class="http-badge http-post">POST</span> | `/api/users/confirm_email/` | [Confirm email change](#confirm-email-change) |
3940
| <span class="http-badge http-post">POST</span> | `/api/users/{uuid}/refresh_token/` | [Refresh user auth token](#refresh-user-auth-token) |
4041
| <span class="http-badge http-post">POST</span> | `/api/users/scim_sync_all/` | [Trigger SCIM synchronization for all users](#trigger-scim-synchronization-for-all-users) |
42+
| <span class="http-badge http-post">POST</span> | `/api/users/{uuid}/send_notification/` | [Send action notification to a specific user](#send-action-notification-to-a-specific-user) |
4143

4244
---
4345
## Core CRUD
@@ -559,6 +561,90 @@ A User object on its own has limited capabilities beyond logging in and managing
559561

560562
---
561563

564+
### Recalculate user actions for a specific user
565+
566+
Staff-only action to trigger recalculation of user actions for a specific user.
567+
568+
569+
=== "HTTPie"
570+
571+
```bash
572+
http \
573+
POST \
574+
https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/update_actions/ \
575+
Authorization:"Token YOUR_API_TOKEN"
576+
```
577+
578+
=== "Python"
579+
580+
```python
581+
from waldur_api_client.client import AuthenticatedClient
582+
from waldur_api_client.models.update_actions_request import UpdateActionsRequest # (1)
583+
from waldur_api_client.api.users import users_update_actions # (2)
584+
585+
client = AuthenticatedClient(
586+
base_url="https://api.example.com", token="YOUR_API_TOKEN"
587+
)
588+
589+
body_data = UpdateActionsRequest()
590+
response = users_update_actions.sync(
591+
uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
592+
client=client,
593+
body=body_data
594+
)
595+
596+
print(response)
597+
```
598+
599+
600+
1. **Model Source:** [`UpdateActionsRequest`](https://github.com/waldur/py-client/blob/main/waldur_api_client/models/update_actions_request.py)
601+
2. **API Source:** [`users_update_actions`](https://github.com/waldur/py-client/blob/main/waldur_api_client/api/users/users_update_actions.py)
602+
603+
=== "TypeScript"
604+
605+
```typescript
606+
import { usersUpdateActions } from 'waldur-js-client';
607+
608+
try {
609+
const response = await usersUpdateActions({
610+
auth: "Token YOUR_API_TOKEN",
611+
path: {
612+
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
613+
}
614+
});
615+
console.log('Success:', response);
616+
} catch (error) {
617+
console.error('Error:', error);
618+
}
619+
```
620+
621+
622+
=== "Path Parameters"
623+
624+
| Name | Type | Required |
625+
|---|---|---|
626+
| `uuid` | string (uuid) | ✓ |
627+
628+
629+
=== "Request Body"
630+
631+
| Field | Type | Required | Description |
632+
|---|---|---|---|
633+
| `provider_action_type` | string | | Optional provider action type to update. If not provided, updates all providers. |
634+
635+
636+
=== "Responses"
637+
638+
**`202`** -
639+
640+
| Field | Type |
641+
|---|---|
642+
| `status` | string |
643+
| `message` | string |
644+
| `provider_action_type` | string |
645+
646+
---
647+
562648
### Update
563649

564650

@@ -2376,3 +2462,74 @@ Staff-only action to queue SCIM synchronization for all users.
23762462
| `detail` | string |
23772463

23782464
---
2465+
2466+
### Send action notification to a specific user
2467+
2468+
Staff-only action to send a pending actions digest notification to a specific user.
2469+
2470+
2471+
=== "HTTPie"
2472+
2473+
```bash
2474+
http \
2475+
POST \
2476+
https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/send_notification/ \
2477+
Authorization:"Token YOUR_API_TOKEN"
2478+
```
2479+
2480+
=== "Python"
2481+
2482+
```python
2483+
from waldur_api_client.client import AuthenticatedClient
2484+
from waldur_api_client.api.users import users_send_notification # (1)
2485+
2486+
client = AuthenticatedClient(
2487+
base_url="https://api.example.com", token="YOUR_API_TOKEN"
2488+
)
2489+
response = users_send_notification.sync(
2490+
uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
2491+
client=client
2492+
)
2493+
2494+
print(response)
2495+
```
2496+
2497+
2498+
1. **API Source:** [`users_send_notification`](https://github.com/waldur/py-client/blob/main/waldur_api_client/api/users/users_send_notification.py)
2499+
2500+
=== "TypeScript"
2501+
2502+
```typescript
2503+
import { usersSendNotification } from 'waldur-js-client';
2504+
2505+
try {
2506+
const response = await usersSendNotification({
2507+
auth: "Token YOUR_API_TOKEN",
2508+
path: {
2509+
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
2510+
}
2511+
});
2512+
console.log('Success:', response);
2513+
} catch (error) {
2514+
console.error('Error:', error);
2515+
}
2516+
```
2517+
2518+
2519+
=== "Path Parameters"
2520+
2521+
| Name | Type | Required |
2522+
|---|---|---|
2523+
| `uuid` | string (uuid) | ✓ |
2524+
2525+
2526+
=== "Responses"
2527+
2528+
**`202`** -
2529+
2530+
| Field | Type |
2531+
|---|---|
2532+
| `status` | string |
2533+
| `message` | string |
2534+
2535+
---

‎docs/marketplace/automation/user-actions.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
| `page` | integer | A page number within the paginated result set. |
8181
| `page_size` | integer | Number of results to return per page. |
8282
| `urgency` | string | _Enum: `high`, `low`, `medium`_ |
83+
| `user_uuid` | string (uuid) | Filter by user UUID (staff only). |
8384

8485

8586
=== "Responses"

0 commit comments

Comments
 (0)