vortex-python-sdk 0.3.0__tar.gz → 0.4.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.3.0/src/vortex_python_sdk.egg-info → vortex_python_sdk-0.4.0}/PKG-INFO +7 -10
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/README.md +6 -9
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/pyproject.toml +1 -1
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0/src/vortex_python_sdk.egg-info}/PKG-INFO +7 -10
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_sdk/types.py +24 -7
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_sdk/vortex.py +6 -6
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/CHANGELOG.md +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/LICENSE +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/MANIFEST.in +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/setup.cfg +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_python_sdk.egg-info/SOURCES.txt +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_python_sdk.egg-info/dependency_links.txt +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_python_sdk.egg-info/requires.txt +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_python_sdk.egg-info/top_level.txt +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_sdk/__init__.py +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_sdk/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vortex-python-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Vortex Python SDK for invitation management and JWT generation
|
|
5
5
|
Author-email: TeamVortexSoftware <support@vortexsoftware.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -84,26 +84,23 @@ vortex = Vortex(api_key="your-vortex-api-key", base_url="https://custom-api.exam
|
|
|
84
84
|
user = {
|
|
85
85
|
"id": "user-123",
|
|
86
86
|
"email": "user@example.com",
|
|
87
|
-
"
|
|
87
|
+
"user_name": "Jane Doe", # Optional: user's display name
|
|
88
|
+
"user_avatar_url": "https://example.com/avatars/jane.jpg", # Optional: user's avatar URL
|
|
89
|
+
"admin_scopes": ["autojoin"] # Optional: grants autojoin admin privileges
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
jwt = vortex.generate_jwt(user=user)
|
|
91
93
|
print(f"JWT: {jwt}")
|
|
92
94
|
|
|
93
|
-
# With additional properties
|
|
94
|
-
jwt = vortex.generate_jwt(
|
|
95
|
-
user=user,
|
|
96
|
-
role="admin",
|
|
97
|
-
department="Engineering"
|
|
98
|
-
)
|
|
99
|
-
|
|
100
95
|
# Or using type-safe models
|
|
101
96
|
from vortex_sdk import User
|
|
102
97
|
|
|
103
98
|
user = User(
|
|
104
99
|
id="user-123",
|
|
105
100
|
email="user@example.com",
|
|
106
|
-
|
|
101
|
+
user_name="Jane Doe", # Optional
|
|
102
|
+
user_avatar_url="https://example.com/avatars/jane.jpg", # Optional
|
|
103
|
+
admin_scopes=["autojoin"] # Optional
|
|
107
104
|
)
|
|
108
105
|
|
|
109
106
|
jwt = vortex.generate_jwt(user=user)
|
|
@@ -46,26 +46,23 @@ vortex = Vortex(api_key="your-vortex-api-key", base_url="https://custom-api.exam
|
|
|
46
46
|
user = {
|
|
47
47
|
"id": "user-123",
|
|
48
48
|
"email": "user@example.com",
|
|
49
|
-
"
|
|
49
|
+
"user_name": "Jane Doe", # Optional: user's display name
|
|
50
|
+
"user_avatar_url": "https://example.com/avatars/jane.jpg", # Optional: user's avatar URL
|
|
51
|
+
"admin_scopes": ["autojoin"] # Optional: grants autojoin admin privileges
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
jwt = vortex.generate_jwt(user=user)
|
|
53
55
|
print(f"JWT: {jwt}")
|
|
54
56
|
|
|
55
|
-
# With additional properties
|
|
56
|
-
jwt = vortex.generate_jwt(
|
|
57
|
-
user=user,
|
|
58
|
-
role="admin",
|
|
59
|
-
department="Engineering"
|
|
60
|
-
)
|
|
61
|
-
|
|
62
57
|
# Or using type-safe models
|
|
63
58
|
from vortex_sdk import User
|
|
64
59
|
|
|
65
60
|
user = User(
|
|
66
61
|
id="user-123",
|
|
67
62
|
email="user@example.com",
|
|
68
|
-
|
|
63
|
+
user_name="Jane Doe", # Optional
|
|
64
|
+
user_avatar_url="https://example.com/avatars/jane.jpg", # Optional
|
|
65
|
+
admin_scopes=["autojoin"] # Optional
|
|
69
66
|
)
|
|
70
67
|
|
|
71
68
|
jwt = vortex.generate_jwt(user=user)
|
|
@@ -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.4.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"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vortex-python-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Vortex Python SDK for invitation management and JWT generation
|
|
5
5
|
Author-email: TeamVortexSoftware <support@vortexsoftware.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -84,26 +84,23 @@ vortex = Vortex(api_key="your-vortex-api-key", base_url="https://custom-api.exam
|
|
|
84
84
|
user = {
|
|
85
85
|
"id": "user-123",
|
|
86
86
|
"email": "user@example.com",
|
|
87
|
-
"
|
|
87
|
+
"user_name": "Jane Doe", # Optional: user's display name
|
|
88
|
+
"user_avatar_url": "https://example.com/avatars/jane.jpg", # Optional: user's avatar URL
|
|
89
|
+
"admin_scopes": ["autojoin"] # Optional: grants autojoin admin privileges
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
jwt = vortex.generate_jwt(user=user)
|
|
91
93
|
print(f"JWT: {jwt}")
|
|
92
94
|
|
|
93
|
-
# With additional properties
|
|
94
|
-
jwt = vortex.generate_jwt(
|
|
95
|
-
user=user,
|
|
96
|
-
role="admin",
|
|
97
|
-
department="Engineering"
|
|
98
|
-
)
|
|
99
|
-
|
|
100
95
|
# Or using type-safe models
|
|
101
96
|
from vortex_sdk import User
|
|
102
97
|
|
|
103
98
|
user = User(
|
|
104
99
|
id="user-123",
|
|
105
100
|
email="user@example.com",
|
|
106
|
-
|
|
101
|
+
user_name="Jane Doe", # Optional
|
|
102
|
+
user_avatar_url="https://example.com/avatars/jane.jpg", # Optional
|
|
103
|
+
admin_scopes=["autojoin"] # Optional
|
|
107
104
|
)
|
|
108
105
|
|
|
109
106
|
jwt = vortex.generate_jwt(user=user)
|
|
@@ -61,16 +61,16 @@ class User(BaseModel):
|
|
|
61
61
|
- email: User's email address
|
|
62
62
|
|
|
63
63
|
Optional fields:
|
|
64
|
-
-
|
|
65
|
-
-
|
|
64
|
+
- user_name: User's display name
|
|
65
|
+
- user_avatar_url: User's avatar URL (must be HTTPS, max 2000 chars)
|
|
66
66
|
- admin_scopes: List of admin scopes (e.g., ['autojoin'])
|
|
67
67
|
|
|
68
68
|
Additional fields are allowed via extra parameter
|
|
69
69
|
"""
|
|
70
70
|
id: str
|
|
71
71
|
email: str
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
user_name: Optional[str] = Field(None, alias="userName")
|
|
73
|
+
user_avatar_url: Optional[str] = Field(None, alias="userAvatarUrl")
|
|
74
74
|
admin_scopes: Optional[List[str]] = None
|
|
75
75
|
|
|
76
76
|
class Config:
|
|
@@ -129,7 +129,7 @@ class JwtPayload(BaseModel):
|
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
class InvitationTarget(BaseModel):
|
|
132
|
-
type: Literal["email", "phone"]
|
|
132
|
+
type: Literal["email", "phone", "share", "internal"]
|
|
133
133
|
value: str
|
|
134
134
|
|
|
135
135
|
|
|
@@ -194,6 +194,7 @@ class InvitationResult(BaseModel):
|
|
|
194
194
|
status: Literal[
|
|
195
195
|
"queued",
|
|
196
196
|
"sending",
|
|
197
|
+
"sent",
|
|
197
198
|
"delivered",
|
|
198
199
|
"accepted",
|
|
199
200
|
"shared",
|
|
@@ -289,8 +290,8 @@ class Inviter(BaseModel):
|
|
|
289
290
|
"""
|
|
290
291
|
user_id: str = Field(alias="userId")
|
|
291
292
|
user_email: Optional[str] = Field(None, alias="userEmail")
|
|
292
|
-
|
|
293
|
-
|
|
293
|
+
user_name: Optional[str] = Field(None, alias="userName")
|
|
294
|
+
user_avatar_url: Optional[str] = Field(None, alias="userAvatarUrl")
|
|
294
295
|
|
|
295
296
|
class Config:
|
|
296
297
|
populate_by_name = True
|
|
@@ -306,6 +307,21 @@ class CreateInvitationGroup(BaseModel):
|
|
|
306
307
|
populate_by_name = True
|
|
307
308
|
|
|
308
309
|
|
|
310
|
+
class UnfurlConfig(BaseModel):
|
|
311
|
+
"""
|
|
312
|
+
Configuration for link unfurl (Open Graph) metadata.
|
|
313
|
+
Controls how the invitation link appears when shared on social platforms or messaging apps.
|
|
314
|
+
"""
|
|
315
|
+
title: Optional[str] = None # og:title
|
|
316
|
+
description: Optional[str] = None # og:description
|
|
317
|
+
image: Optional[str] = None # og:image - must be HTTPS
|
|
318
|
+
type: Optional[Literal["website", "article", "video", "music", "book", "profile", "product"]] = None # og:type
|
|
319
|
+
site_name: Optional[str] = Field(None, alias="siteName") # og:site_name
|
|
320
|
+
|
|
321
|
+
class Config:
|
|
322
|
+
populate_by_name = True
|
|
323
|
+
|
|
324
|
+
|
|
309
325
|
class BackendCreateInvitationRequest(BaseModel):
|
|
310
326
|
"""
|
|
311
327
|
Request body for creating an invitation via the public API (backend SDK use).
|
|
@@ -317,6 +333,7 @@ class BackendCreateInvitationRequest(BaseModel):
|
|
|
317
333
|
source: Optional[str] = None
|
|
318
334
|
template_variables: Optional[Dict[str, str]] = Field(None, alias="templateVariables")
|
|
319
335
|
metadata: Optional[Dict[str, Any]] = None
|
|
336
|
+
unfurl_config: Optional[UnfurlConfig] = Field(None, alias="unfurlConfig")
|
|
320
337
|
|
|
321
338
|
class Config:
|
|
322
339
|
populate_by_name = True
|
|
@@ -126,13 +126,13 @@ class Vortex:
|
|
|
126
126
|
"expires": expires,
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
# Add
|
|
130
|
-
if user.
|
|
131
|
-
jwt_payload["
|
|
129
|
+
# Add userName if present
|
|
130
|
+
if user.user_name:
|
|
131
|
+
jwt_payload["userName"] = user.user_name
|
|
132
132
|
|
|
133
|
-
# Add
|
|
134
|
-
if user.
|
|
135
|
-
jwt_payload["
|
|
133
|
+
# Add userAvatarUrl if present
|
|
134
|
+
if user.user_avatar_url:
|
|
135
|
+
jwt_payload["userAvatarUrl"] = user.user_avatar_url
|
|
136
136
|
|
|
137
137
|
# Add adminScopes if present
|
|
138
138
|
if user.admin_scopes:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_python_sdk.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_python_sdk.egg-info/requires.txt
RENAMED
|
File without changes
|
{vortex_python_sdk-0.3.0 → vortex_python_sdk-0.4.0}/src/vortex_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|