archastro.platform.v1.resources.invites

 1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
 2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
 3# Content hash: ba40910ad7e2
 4
 5from __future__ import annotations
 6
 7from typing import TypedDict
 8
 9from ...runtime.http_client import HttpClient, SyncHttpClient
10from ...types.users import UserInvite
11
12
13class InviteAcceptInput(TypedDict):
14    "Accept an invite"
15
16    key: str
17    "Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response."
18
19
20class AsyncInviteResource:
21    def __init__(self, http: HttpClient):
22        self._http = http
23
24    async def accept(self, input: InviteAcceptInput) -> UserInvite:
25        """
26        Accept an invite
27        Accepts an invite on behalf of the authenticated user and adds them to the
28        associated team or thread. The invite `key` is passed in the request body
29        rather than the URL so it never appears in access logs, `Referer` headers,
30        or error-reporter URL captures.
31        This endpoint requires an authenticated end-user session. S2S secret-key
32        tokens and unauthenticated requests are rejected with `401`. If the
33        authenticated user is already a member of the invite's target, the request
34        returns `409`. Both per-IP and per-user rate limits apply; exceeding either
35        returns `429`.
36
37        Args:
38            input: Request body.
39            input.key: Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.
40
41        Returns:
42            The accepted invite, including its ID, key, metadata, optional thread scope, creator, and creation timestamp.
43        """
44        return await self._http.request(
45            "/api/v1/invites/accept",
46            method="POST",
47            body=input,
48            response_type=UserInvite,
49        )
50
51
52class InviteResource:
53    def __init__(self, http: SyncHttpClient):
54        self._http = http
55
56    def accept(self, input: InviteAcceptInput) -> UserInvite:
57        """
58        Accept an invite
59        Accepts an invite on behalf of the authenticated user and adds them to the
60        associated team or thread. The invite `key` is passed in the request body
61        rather than the URL so it never appears in access logs, `Referer` headers,
62        or error-reporter URL captures.
63        This endpoint requires an authenticated end-user session. S2S secret-key
64        tokens and unauthenticated requests are rejected with `401`. If the
65        authenticated user is already a member of the invite's target, the request
66        returns `409`. Both per-IP and per-user rate limits apply; exceeding either
67        returns `429`.
68
69        Args:
70            input: Request body.
71            input.key: Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.
72
73        Returns:
74            The accepted invite, including its ID, key, metadata, optional thread scope, creator, and creation timestamp.
75        """
76        return self._http.request(
77            "/api/v1/invites/accept",
78            method="POST",
79            body=input,
80            response_type=UserInvite,
81        )
class InviteAcceptInput(typing.TypedDict):
14class InviteAcceptInput(TypedDict):
15    "Accept an invite"
16
17    key: str
18    "Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response."

Accept an invite

key: str

Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.

class AsyncInviteResource:
21class AsyncInviteResource:
22    def __init__(self, http: HttpClient):
23        self._http = http
24
25    async def accept(self, input: InviteAcceptInput) -> UserInvite:
26        """
27        Accept an invite
28        Accepts an invite on behalf of the authenticated user and adds them to the
29        associated team or thread. The invite `key` is passed in the request body
30        rather than the URL so it never appears in access logs, `Referer` headers,
31        or error-reporter URL captures.
32        This endpoint requires an authenticated end-user session. S2S secret-key
33        tokens and unauthenticated requests are rejected with `401`. If the
34        authenticated user is already a member of the invite's target, the request
35        returns `409`. Both per-IP and per-user rate limits apply; exceeding either
36        returns `429`.
37
38        Args:
39            input: Request body.
40            input.key: Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.
41
42        Returns:
43            The accepted invite, including its ID, key, metadata, optional thread scope, creator, and creation timestamp.
44        """
45        return await self._http.request(
46            "/api/v1/invites/accept",
47            method="POST",
48            body=input,
49            response_type=UserInvite,
50        )
AsyncInviteResource(http: archastro.platform.runtime.http_client.HttpClient)
22    def __init__(self, http: HttpClient):
23        self._http = http
async def accept( self, input: InviteAcceptInput) -> archastro.platform.types.users.UserInvite:
25    async def accept(self, input: InviteAcceptInput) -> UserInvite:
26        """
27        Accept an invite
28        Accepts an invite on behalf of the authenticated user and adds them to the
29        associated team or thread. The invite `key` is passed in the request body
30        rather than the URL so it never appears in access logs, `Referer` headers,
31        or error-reporter URL captures.
32        This endpoint requires an authenticated end-user session. S2S secret-key
33        tokens and unauthenticated requests are rejected with `401`. If the
34        authenticated user is already a member of the invite's target, the request
35        returns `409`. Both per-IP and per-user rate limits apply; exceeding either
36        returns `429`.
37
38        Args:
39            input: Request body.
40            input.key: Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.
41
42        Returns:
43            The accepted invite, including its ID, key, metadata, optional thread scope, creator, and creation timestamp.
44        """
45        return await self._http.request(
46            "/api/v1/invites/accept",
47            method="POST",
48            body=input,
49            response_type=UserInvite,
50        )

Accept an invite Accepts an invite on behalf of the authenticated user and adds them to the associated team or thread. The invite key is passed in the request body rather than the URL so it never appears in access logs, Referer headers, or error-reporter URL captures. This endpoint requires an authenticated end-user session. S2S secret-key tokens and unauthenticated requests are rejected with 401. If the authenticated user is already a member of the invite's target, the request returns 409. Both per-IP and per-user rate limits apply; exceeding either returns 429.

Arguments:
  • input: Request body.
  • input.key: Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.
Returns:

The accepted invite, including its ID, key, metadata, optional thread scope, creator, and creation timestamp.

class InviteResource:
53class InviteResource:
54    def __init__(self, http: SyncHttpClient):
55        self._http = http
56
57    def accept(self, input: InviteAcceptInput) -> UserInvite:
58        """
59        Accept an invite
60        Accepts an invite on behalf of the authenticated user and adds them to the
61        associated team or thread. The invite `key` is passed in the request body
62        rather than the URL so it never appears in access logs, `Referer` headers,
63        or error-reporter URL captures.
64        This endpoint requires an authenticated end-user session. S2S secret-key
65        tokens and unauthenticated requests are rejected with `401`. If the
66        authenticated user is already a member of the invite's target, the request
67        returns `409`. Both per-IP and per-user rate limits apply; exceeding either
68        returns `429`.
69
70        Args:
71            input: Request body.
72            input.key: Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.
73
74        Returns:
75            The accepted invite, including its ID, key, metadata, optional thread scope, creator, and creation timestamp.
76        """
77        return self._http.request(
78            "/api/v1/invites/accept",
79            method="POST",
80            body=input,
81            response_type=UserInvite,
82        )
InviteResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
54    def __init__(self, http: SyncHttpClient):
55        self._http = http
def accept( self, input: InviteAcceptInput) -> archastro.platform.types.users.UserInvite:
57    def accept(self, input: InviteAcceptInput) -> UserInvite:
58        """
59        Accept an invite
60        Accepts an invite on behalf of the authenticated user and adds them to the
61        associated team or thread. The invite `key` is passed in the request body
62        rather than the URL so it never appears in access logs, `Referer` headers,
63        or error-reporter URL captures.
64        This endpoint requires an authenticated end-user session. S2S secret-key
65        tokens and unauthenticated requests are rejected with `401`. If the
66        authenticated user is already a member of the invite's target, the request
67        returns `409`. Both per-IP and per-user rate limits apply; exceeding either
68        returns `429`.
69
70        Args:
71            input: Request body.
72            input.key: Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.
73
74        Returns:
75            The accepted invite, including its ID, key, metadata, optional thread scope, creator, and creation timestamp.
76        """
77        return self._http.request(
78            "/api/v1/invites/accept",
79            method="POST",
80            body=input,
81            response_type=UserInvite,
82        )

Accept an invite Accepts an invite on behalf of the authenticated user and adds them to the associated team or thread. The invite key is passed in the request body rather than the URL so it never appears in access logs, Referer headers, or error-reporter URL captures. This endpoint requires an authenticated end-user session. S2S secret-key tokens and unauthenticated requests are rejected with 401. If the authenticated user is already a member of the invite's target, the request returns 409. Both per-IP and per-user rate limits apply; exceeding either returns 429.

Arguments:
  • input: Request body.
  • input.key: Opaque invite key identifying the invite to accept. Obtained from an invite link or a previous invite creation response.
Returns:

The accepted invite, including its ID, key, metadata, optional thread scope, creator, and creation timestamp.