vortex-python-sdk 0.4.0__tar.gz → 0.7.0__tar.gz
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.
- {vortex_python_sdk-0.4.0/src/vortex_python_sdk.egg-info → vortex_python_sdk-0.7.0}/PKG-INFO +1 -1
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/pyproject.toml +1 -1
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0/src/vortex_python_sdk.egg-info}/PKG-INFO +1 -1
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_sdk/__init__.py +7 -1
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_sdk/types.py +42 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_sdk/vortex.py +156 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/CHANGELOG.md +0 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/LICENSE +0 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/MANIFEST.in +0 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/README.md +0 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/setup.cfg +0 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_python_sdk.egg-info/SOURCES.txt +0 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_python_sdk.egg-info/dependency_links.txt +0 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_python_sdk.egg-info/requires.txt +0 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_python_sdk.egg-info/top_level.txt +0 -0
- {vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_sdk/py.typed +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vortex-python-sdk"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.7.0"
|
|
8
8
|
description = "Vortex Python SDK for invitation management and JWT generation"
|
|
9
9
|
authors = [{name = "TeamVortexSoftware", email = "support@vortexsoftware.com"}]
|
|
10
10
|
readme = "README.md"
|
|
@@ -11,6 +11,9 @@ from .types import (
|
|
|
11
11
|
ApiResponse,
|
|
12
12
|
ApiResponseJson,
|
|
13
13
|
AuthenticatedUser,
|
|
14
|
+
AutojoinDomain,
|
|
15
|
+
AutojoinDomainsResponse,
|
|
16
|
+
ConfigureAutojoinRequest,
|
|
14
17
|
CreateInvitationRequest,
|
|
15
18
|
GroupInput,
|
|
16
19
|
IdentifierInput,
|
|
@@ -24,7 +27,7 @@ from .types import (
|
|
|
24
27
|
)
|
|
25
28
|
from .vortex import Vortex
|
|
26
29
|
|
|
27
|
-
__version__ = "0.0
|
|
30
|
+
__version__ = "0.7.0"
|
|
28
31
|
__author__ = "TeamVortexSoftware"
|
|
29
32
|
__email__ = "support@vortexsoftware.com"
|
|
30
33
|
|
|
@@ -42,6 +45,9 @@ __all__ = [
|
|
|
42
45
|
"CreateInvitationRequest",
|
|
43
46
|
"AcceptInvitationRequest",
|
|
44
47
|
"AcceptInvitationsRequest", # Alias for AcceptInvitationRequest
|
|
48
|
+
"AutojoinDomain",
|
|
49
|
+
"AutojoinDomainsResponse",
|
|
50
|
+
"ConfigureAutojoinRequest",
|
|
45
51
|
"ApiResponse",
|
|
46
52
|
"ApiResponseJson",
|
|
47
53
|
"ApiRequestBody",
|
|
@@ -131,6 +131,11 @@ class JwtPayload(BaseModel):
|
|
|
131
131
|
class InvitationTarget(BaseModel):
|
|
132
132
|
type: Literal["email", "phone", "share", "internal"]
|
|
133
133
|
value: str
|
|
134
|
+
name: Optional[str] = None # Display name of the person being invited
|
|
135
|
+
avatar_url: Optional[str] = Field(None, alias="avatarUrl") # Avatar URL for the person being invited
|
|
136
|
+
|
|
137
|
+
class Config:
|
|
138
|
+
populate_by_name = True
|
|
134
139
|
|
|
135
140
|
|
|
136
141
|
class AcceptUser(BaseModel):
|
|
@@ -215,6 +220,7 @@ class InvitationResult(BaseModel):
|
|
|
215
220
|
metadata: Optional[Dict[str, Any]] = None
|
|
216
221
|
pass_through: Optional[str] = Field(None, alias="passThrough")
|
|
217
222
|
source: Optional[str] = None
|
|
223
|
+
subtype: Optional[str] = None # Customer-defined subtype for analytics segmentation
|
|
218
224
|
creator_name: Optional[str] = Field(None, alias="creatorName")
|
|
219
225
|
creator_avatar_url: Optional[str] = Field(None, alias="creatorAvatarUrl")
|
|
220
226
|
|
|
@@ -281,6 +287,11 @@ class CreateInvitationTarget(BaseModel):
|
|
|
281
287
|
"""Target for creating an invitation"""
|
|
282
288
|
type: Literal["email", "phone", "internal"]
|
|
283
289
|
value: str
|
|
290
|
+
name: Optional[str] = None # Display name of the person being invited
|
|
291
|
+
avatar_url: Optional[str] = Field(None, alias="avatarUrl") # Avatar URL for the person being invited
|
|
292
|
+
|
|
293
|
+
class Config:
|
|
294
|
+
populate_by_name = True
|
|
284
295
|
|
|
285
296
|
|
|
286
297
|
class Inviter(BaseModel):
|
|
@@ -331,6 +342,7 @@ class BackendCreateInvitationRequest(BaseModel):
|
|
|
331
342
|
inviter: Inviter
|
|
332
343
|
groups: Optional[List[CreateInvitationGroup]] = None
|
|
333
344
|
source: Optional[str] = None
|
|
345
|
+
subtype: Optional[str] = None # Customer-defined subtype for analytics segmentation (e.g., 'pymk', 'find-friends')
|
|
334
346
|
template_variables: Optional[Dict[str, str]] = Field(None, alias="templateVariables")
|
|
335
347
|
metadata: Optional[Dict[str, Any]] = None
|
|
336
348
|
unfurl_config: Optional[UnfurlConfig] = Field(None, alias="unfurlConfig")
|
|
@@ -348,3 +360,33 @@ class CreateInvitationResponse(BaseModel):
|
|
|
348
360
|
|
|
349
361
|
class Config:
|
|
350
362
|
populate_by_name = True
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
# --- Types for autojoin domain management ---
|
|
366
|
+
|
|
367
|
+
class AutojoinDomain(BaseModel):
|
|
368
|
+
"""Autojoin domain configuration"""
|
|
369
|
+
id: str
|
|
370
|
+
domain: str
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
class AutojoinDomainsResponse(BaseModel):
|
|
374
|
+
"""Response from autojoin API endpoints"""
|
|
375
|
+
autojoin_domains: List[AutojoinDomain] = Field(alias="autojoinDomains")
|
|
376
|
+
invitation: Optional[InvitationResult] = None
|
|
377
|
+
|
|
378
|
+
class Config:
|
|
379
|
+
populate_by_name = True
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
class ConfigureAutojoinRequest(BaseModel):
|
|
383
|
+
"""Request body for configuring autojoin domains"""
|
|
384
|
+
scope: str
|
|
385
|
+
scope_type: str = Field(alias="scopeType")
|
|
386
|
+
scope_name: Optional[str] = Field(None, alias="scopeName")
|
|
387
|
+
domains: List[str]
|
|
388
|
+
widget_id: str = Field(alias="widgetId")
|
|
389
|
+
metadata: Optional[Dict[str, Any]] = None
|
|
390
|
+
|
|
391
|
+
class Config:
|
|
392
|
+
populate_by_name = True
|
|
@@ -13,7 +13,9 @@ logger = logging.getLogger(__name__)
|
|
|
13
13
|
|
|
14
14
|
from .types import (
|
|
15
15
|
AcceptUser,
|
|
16
|
+
AutojoinDomainsResponse,
|
|
16
17
|
BackendCreateInvitationRequest,
|
|
18
|
+
ConfigureAutojoinRequest,
|
|
17
19
|
CreateInvitationGroup,
|
|
18
20
|
CreateInvitationResponse,
|
|
19
21
|
CreateInvitationTarget,
|
|
@@ -781,6 +783,160 @@ class Vortex:
|
|
|
781
783
|
)
|
|
782
784
|
return CreateInvitationResponse(**response)
|
|
783
785
|
|
|
786
|
+
async def get_autojoin_domains(
|
|
787
|
+
self, scope_type: str, scope: str
|
|
788
|
+
) -> AutojoinDomainsResponse:
|
|
789
|
+
"""
|
|
790
|
+
Get autojoin domains configured for a specific scope
|
|
791
|
+
|
|
792
|
+
Args:
|
|
793
|
+
scope_type: The type of scope (e.g., "organization", "team", "project")
|
|
794
|
+
scope: The scope identifier (customer's group ID)
|
|
795
|
+
|
|
796
|
+
Returns:
|
|
797
|
+
AutojoinDomainsResponse with autojoin_domains and associated invitation
|
|
798
|
+
|
|
799
|
+
Example:
|
|
800
|
+
result = await vortex.get_autojoin_domains("organization", "acme-org")
|
|
801
|
+
print(result.autojoin_domains) # [AutojoinDomain(id='...', domain='acme.com')]
|
|
802
|
+
"""
|
|
803
|
+
from urllib.parse import quote
|
|
804
|
+
|
|
805
|
+
response = await self._vortex_api_request(
|
|
806
|
+
"GET",
|
|
807
|
+
f"/invitations/by-scope/{quote(scope_type, safe='')}/{quote(scope, safe='')}/autojoin",
|
|
808
|
+
)
|
|
809
|
+
return AutojoinDomainsResponse(**response)
|
|
810
|
+
|
|
811
|
+
def get_autojoin_domains_sync(
|
|
812
|
+
self, scope_type: str, scope: str
|
|
813
|
+
) -> AutojoinDomainsResponse:
|
|
814
|
+
"""
|
|
815
|
+
Get autojoin domains configured for a specific scope (synchronous)
|
|
816
|
+
|
|
817
|
+
Args:
|
|
818
|
+
scope_type: The type of scope (e.g., "organization", "team", "project")
|
|
819
|
+
scope: The scope identifier (customer's group ID)
|
|
820
|
+
|
|
821
|
+
Returns:
|
|
822
|
+
AutojoinDomainsResponse with autojoin_domains and associated invitation
|
|
823
|
+
|
|
824
|
+
Example:
|
|
825
|
+
result = vortex.get_autojoin_domains_sync("organization", "acme-org")
|
|
826
|
+
print(result.autojoin_domains) # [AutojoinDomain(id='...', domain='acme.com')]
|
|
827
|
+
"""
|
|
828
|
+
from urllib.parse import quote
|
|
829
|
+
|
|
830
|
+
response = self._vortex_api_request_sync(
|
|
831
|
+
"GET",
|
|
832
|
+
f"/invitations/by-scope/{quote(scope_type, safe='')}/{quote(scope, safe='')}/autojoin",
|
|
833
|
+
)
|
|
834
|
+
return AutojoinDomainsResponse(**response)
|
|
835
|
+
|
|
836
|
+
async def configure_autojoin(
|
|
837
|
+
self,
|
|
838
|
+
scope: str,
|
|
839
|
+
scope_type: str,
|
|
840
|
+
domains: List[str],
|
|
841
|
+
widget_id: str,
|
|
842
|
+
scope_name: Optional[str] = None,
|
|
843
|
+
metadata: Optional[Dict[str, Any]] = None,
|
|
844
|
+
) -> AutojoinDomainsResponse:
|
|
845
|
+
"""
|
|
846
|
+
Configure autojoin domains for a specific scope
|
|
847
|
+
|
|
848
|
+
This endpoint syncs autojoin domains - it will add new domains, remove domains
|
|
849
|
+
not in the provided list, and deactivate the autojoin invitation if all domains
|
|
850
|
+
are removed (empty array).
|
|
851
|
+
|
|
852
|
+
Args:
|
|
853
|
+
scope: The scope identifier (customer's group ID)
|
|
854
|
+
scope_type: The type of scope (e.g., "organization", "team")
|
|
855
|
+
domains: Array of domains to configure for autojoin
|
|
856
|
+
widget_id: The widget configuration ID
|
|
857
|
+
scope_name: Optional display name for the scope
|
|
858
|
+
metadata: Optional metadata to attach to the invitation
|
|
859
|
+
|
|
860
|
+
Returns:
|
|
861
|
+
AutojoinDomainsResponse with updated autojoin_domains and associated invitation
|
|
862
|
+
|
|
863
|
+
Example:
|
|
864
|
+
result = await vortex.configure_autojoin(
|
|
865
|
+
scope="acme-org",
|
|
866
|
+
scope_type="organization",
|
|
867
|
+
domains=["acme.com", "acme.org"],
|
|
868
|
+
widget_id="widget-123",
|
|
869
|
+
scope_name="Acme Corporation",
|
|
870
|
+
)
|
|
871
|
+
"""
|
|
872
|
+
request = ConfigureAutojoinRequest(
|
|
873
|
+
scope=scope,
|
|
874
|
+
scope_type=scope_type,
|
|
875
|
+
domains=domains,
|
|
876
|
+
widget_id=widget_id,
|
|
877
|
+
scope_name=scope_name,
|
|
878
|
+
metadata=metadata,
|
|
879
|
+
)
|
|
880
|
+
|
|
881
|
+
response = await self._vortex_api_request(
|
|
882
|
+
"POST",
|
|
883
|
+
"/invitations/autojoin",
|
|
884
|
+
data=request.model_dump(by_alias=True, exclude_none=True),
|
|
885
|
+
)
|
|
886
|
+
return AutojoinDomainsResponse(**response)
|
|
887
|
+
|
|
888
|
+
def configure_autojoin_sync(
|
|
889
|
+
self,
|
|
890
|
+
scope: str,
|
|
891
|
+
scope_type: str,
|
|
892
|
+
domains: List[str],
|
|
893
|
+
widget_id: str,
|
|
894
|
+
scope_name: Optional[str] = None,
|
|
895
|
+
metadata: Optional[Dict[str, Any]] = None,
|
|
896
|
+
) -> AutojoinDomainsResponse:
|
|
897
|
+
"""
|
|
898
|
+
Configure autojoin domains for a specific scope (synchronous)
|
|
899
|
+
|
|
900
|
+
This endpoint syncs autojoin domains - it will add new domains, remove domains
|
|
901
|
+
not in the provided list, and deactivate the autojoin invitation if all domains
|
|
902
|
+
are removed (empty array).
|
|
903
|
+
|
|
904
|
+
Args:
|
|
905
|
+
scope: The scope identifier (customer's group ID)
|
|
906
|
+
scope_type: The type of scope (e.g., "organization", "team")
|
|
907
|
+
domains: Array of domains to configure for autojoin
|
|
908
|
+
widget_id: The widget configuration ID
|
|
909
|
+
scope_name: Optional display name for the scope
|
|
910
|
+
metadata: Optional metadata to attach to the invitation
|
|
911
|
+
|
|
912
|
+
Returns:
|
|
913
|
+
AutojoinDomainsResponse with updated autojoin_domains and associated invitation
|
|
914
|
+
|
|
915
|
+
Example:
|
|
916
|
+
result = vortex.configure_autojoin_sync(
|
|
917
|
+
scope="acme-org",
|
|
918
|
+
scope_type="organization",
|
|
919
|
+
domains=["acme.com", "acme.org"],
|
|
920
|
+
widget_id="widget-123",
|
|
921
|
+
scope_name="Acme Corporation",
|
|
922
|
+
)
|
|
923
|
+
"""
|
|
924
|
+
request = ConfigureAutojoinRequest(
|
|
925
|
+
scope=scope,
|
|
926
|
+
scope_type=scope_type,
|
|
927
|
+
domains=domains,
|
|
928
|
+
widget_id=widget_id,
|
|
929
|
+
scope_name=scope_name,
|
|
930
|
+
metadata=metadata,
|
|
931
|
+
)
|
|
932
|
+
|
|
933
|
+
response = self._vortex_api_request_sync(
|
|
934
|
+
"POST",
|
|
935
|
+
"/invitations/autojoin",
|
|
936
|
+
data=request.model_dump(by_alias=True, exclude_none=True),
|
|
937
|
+
)
|
|
938
|
+
return AutojoinDomainsResponse(**response)
|
|
939
|
+
|
|
784
940
|
async def close(self) -> None:
|
|
785
941
|
"""Close the HTTP client"""
|
|
786
942
|
await self._client.aclose()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_python_sdk.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_python_sdk.egg-info/requires.txt
RENAMED
|
File without changes
|
{vortex_python_sdk-0.4.0 → vortex_python_sdk-0.7.0}/src/vortex_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|