vortex-python-sdk 0.3.0__tar.gz → 0.6.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.6.0}/PKG-INFO +7 -10
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/README.md +6 -9
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/pyproject.toml +1 -1
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0/src/vortex_python_sdk.egg-info}/PKG-INFO +7 -10
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/src/vortex_sdk/types.py +36 -7
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/src/vortex_sdk/vortex.py +6 -6
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/CHANGELOG.md +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/LICENSE +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/MANIFEST.in +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/setup.cfg +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/src/vortex_python_sdk.egg-info/SOURCES.txt +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/src/vortex_python_sdk.egg-info/dependency_links.txt +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/src/vortex_python_sdk.egg-info/requires.txt +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/src/vortex_python_sdk.egg-info/top_level.txt +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/src/vortex_sdk/__init__.py +0 -0
- {vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.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.6.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.6.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.6.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,8 +129,13 @@ 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
|
+
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):
|
|
@@ -194,6 +199,7 @@ class InvitationResult(BaseModel):
|
|
|
194
199
|
status: Literal[
|
|
195
200
|
"queued",
|
|
196
201
|
"sending",
|
|
202
|
+
"sent",
|
|
197
203
|
"delivered",
|
|
198
204
|
"accepted",
|
|
199
205
|
"shared",
|
|
@@ -214,6 +220,7 @@ class InvitationResult(BaseModel):
|
|
|
214
220
|
metadata: Optional[Dict[str, Any]] = None
|
|
215
221
|
pass_through: Optional[str] = Field(None, alias="passThrough")
|
|
216
222
|
source: Optional[str] = None
|
|
223
|
+
subtype: Optional[str] = None # Customer-defined subtype for analytics segmentation
|
|
217
224
|
creator_name: Optional[str] = Field(None, alias="creatorName")
|
|
218
225
|
creator_avatar_url: Optional[str] = Field(None, alias="creatorAvatarUrl")
|
|
219
226
|
|
|
@@ -280,6 +287,11 @@ class CreateInvitationTarget(BaseModel):
|
|
|
280
287
|
"""Target for creating an invitation"""
|
|
281
288
|
type: Literal["email", "phone", "internal"]
|
|
282
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
|
|
283
295
|
|
|
284
296
|
|
|
285
297
|
class Inviter(BaseModel):
|
|
@@ -289,8 +301,8 @@ class Inviter(BaseModel):
|
|
|
289
301
|
"""
|
|
290
302
|
user_id: str = Field(alias="userId")
|
|
291
303
|
user_email: Optional[str] = Field(None, alias="userEmail")
|
|
292
|
-
|
|
293
|
-
|
|
304
|
+
user_name: Optional[str] = Field(None, alias="userName")
|
|
305
|
+
user_avatar_url: Optional[str] = Field(None, alias="userAvatarUrl")
|
|
294
306
|
|
|
295
307
|
class Config:
|
|
296
308
|
populate_by_name = True
|
|
@@ -306,6 +318,21 @@ class CreateInvitationGroup(BaseModel):
|
|
|
306
318
|
populate_by_name = True
|
|
307
319
|
|
|
308
320
|
|
|
321
|
+
class UnfurlConfig(BaseModel):
|
|
322
|
+
"""
|
|
323
|
+
Configuration for link unfurl (Open Graph) metadata.
|
|
324
|
+
Controls how the invitation link appears when shared on social platforms or messaging apps.
|
|
325
|
+
"""
|
|
326
|
+
title: Optional[str] = None # og:title
|
|
327
|
+
description: Optional[str] = None # og:description
|
|
328
|
+
image: Optional[str] = None # og:image - must be HTTPS
|
|
329
|
+
type: Optional[Literal["website", "article", "video", "music", "book", "profile", "product"]] = None # og:type
|
|
330
|
+
site_name: Optional[str] = Field(None, alias="siteName") # og:site_name
|
|
331
|
+
|
|
332
|
+
class Config:
|
|
333
|
+
populate_by_name = True
|
|
334
|
+
|
|
335
|
+
|
|
309
336
|
class BackendCreateInvitationRequest(BaseModel):
|
|
310
337
|
"""
|
|
311
338
|
Request body for creating an invitation via the public API (backend SDK use).
|
|
@@ -315,8 +342,10 @@ class BackendCreateInvitationRequest(BaseModel):
|
|
|
315
342
|
inviter: Inviter
|
|
316
343
|
groups: Optional[List[CreateInvitationGroup]] = None
|
|
317
344
|
source: Optional[str] = None
|
|
345
|
+
subtype: Optional[str] = None # Customer-defined subtype for analytics segmentation (e.g., 'pymk', 'find-friends')
|
|
318
346
|
template_variables: Optional[Dict[str, str]] = Field(None, alias="templateVariables")
|
|
319
347
|
metadata: Optional[Dict[str, Any]] = None
|
|
348
|
+
unfurl_config: Optional[UnfurlConfig] = Field(None, alias="unfurlConfig")
|
|
320
349
|
|
|
321
350
|
class Config:
|
|
322
351
|
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.6.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.6.0}/src/vortex_python_sdk.egg-info/requires.txt
RENAMED
|
File without changes
|
{vortex_python_sdk-0.3.0 → vortex_python_sdk-0.6.0}/src/vortex_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|