Skip to content

Commit f4459b0

Browse files
feat(api): api update
1 parent e409b46 commit f4459b0

File tree

8 files changed

+75
-4
lines changed

8 files changed

+75
-4
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 191
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-e11bef0288245dae9a5f8118e178318824c2a2ba33fd9f7e49d2dee0c5c66b6b.yml
3-
openapi_spec_hash: 780de21830cb6079c38c8a1e8e836b14
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-47d955d6b9631b4ad43668426ff3867e9d7566926680ea2b4c4bd16869ccaff5.yml
3+
openapi_spec_hash: d8f3bb32c233225f85b20b69318dada9
44
config_hash: 1a836d20bb988f001cc66d1526f71306

src/whop_sdk/resources/apps.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@ def update(
166166
icon: Optional[app_update_params.Icon] | Omit = omit,
167167
name: Optional[str] | Omit = omit,
168168
oauth_client_type: Optional[Literal["public", "confidential"]] | Omit = omit,
169+
openapi_path: Optional[str] | Omit = omit,
169170
redirect_uris: Optional[SequenceNotStr[str]] | Omit = omit,
170171
required_scopes: Optional[List[Literal["read_user"]]] | Omit = omit,
172+
skills_path: Optional[str] | Omit = omit,
171173
status: Optional[AppStatuses] | Omit = omit,
172174
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
173175
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -208,11 +210,16 @@ def update(
208210
209211
oauth_client_type: How this app authenticates at the OAuth token endpoint.
210212
213+
openapi_path: The URL path to the OpenAPI spec file of the app, such as
214+
'/assets/openapi.json'.
215+
211216
redirect_uris: The whitelisted OAuth callback URLs that users are redirected to after
212217
authorizing the app
213218
214219
required_scopes: The permission scopes the app will request from users when they install it.
215220
221+
skills_path: The URL path to the skills directory of the app, such as '/assets/skills/'.
222+
216223
status: The status of an experience interface
217224
218225
extra_headers: Send extra headers
@@ -239,8 +246,10 @@ def update(
239246
"icon": icon,
240247
"name": name,
241248
"oauth_client_type": oauth_client_type,
249+
"openapi_path": openapi_path,
242250
"redirect_uris": redirect_uris,
243251
"required_scopes": required_scopes,
252+
"skills_path": skills_path,
244253
"status": status,
245254
},
246255
app_update_params.AppUpdateParams,
@@ -489,8 +498,10 @@ async def update(
489498
icon: Optional[app_update_params.Icon] | Omit = omit,
490499
name: Optional[str] | Omit = omit,
491500
oauth_client_type: Optional[Literal["public", "confidential"]] | Omit = omit,
501+
openapi_path: Optional[str] | Omit = omit,
492502
redirect_uris: Optional[SequenceNotStr[str]] | Omit = omit,
493503
required_scopes: Optional[List[Literal["read_user"]]] | Omit = omit,
504+
skills_path: Optional[str] | Omit = omit,
494505
status: Optional[AppStatuses] | Omit = omit,
495506
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
496507
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -531,11 +542,16 @@ async def update(
531542
532543
oauth_client_type: How this app authenticates at the OAuth token endpoint.
533544
545+
openapi_path: The URL path to the OpenAPI spec file of the app, such as
546+
'/assets/openapi.json'.
547+
534548
redirect_uris: The whitelisted OAuth callback URLs that users are redirected to after
535549
authorizing the app
536550
537551
required_scopes: The permission scopes the app will request from users when they install it.
538552
553+
skills_path: The URL path to the skills directory of the app, such as '/assets/skills/'.
554+
539555
status: The status of an experience interface
540556
541557
extra_headers: Send extra headers
@@ -562,8 +578,10 @@ async def update(
562578
"icon": icon,
563579
"name": name,
564580
"oauth_client_type": oauth_client_type,
581+
"openapi_path": openapi_path,
565582
"redirect_uris": redirect_uris,
566583
"required_scopes": required_scopes,
584+
"skills_path": skills_path,
567585
"status": status,
568586
},
569587
app_update_params.AppUpdateParams,

src/whop_sdk/types/app_list_response.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,26 @@ class AppListResponse(BaseModel):
117117
Maximum 30 characters.
118118
"""
119119

120+
openapi_path: Optional[str] = None
121+
"""
122+
The URL path template for a specific view of this app, appended to the base
123+
domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
124+
not configured.
125+
"""
126+
127+
origin: Optional[str] = None
128+
"""
129+
The full origin URL for this app's proxied domain (e.g.,
130+
'https://myapp.apps.whop.com'). Null if no proxy domain is configured.
131+
"""
132+
133+
skills_path: Optional[str] = None
134+
"""
135+
The URL path template for a specific view of this app, appended to the base
136+
domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
137+
not configured.
138+
"""
139+
120140
status: AppStatuses
121141
"""The current visibility status of this app on the Whop app store.
122142

src/whop_sdk/types/app_update_params.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ class AppUpdateParams(TypedDict, total=False):
5151
oauth_client_type: Optional[Literal["public", "confidential"]]
5252
"""How this app authenticates at the OAuth token endpoint."""
5353

54+
openapi_path: Optional[str]
55+
"""
56+
The URL path to the OpenAPI spec file of the app, such as
57+
'/assets/openapi.json'.
58+
"""
59+
5460
redirect_uris: Optional[SequenceNotStr[str]]
5561
"""
5662
The whitelisted OAuth callback URLs that users are redirected to after
@@ -60,6 +66,9 @@ class AppUpdateParams(TypedDict, total=False):
6066
required_scopes: Optional[List[Literal["read_user"]]]
6167
"""The permission scopes the app will request from users when they install it."""
6268

69+
skills_path: Optional[str]
70+
"""The URL path to the skills directory of the app, such as '/assets/skills/'."""
71+
6372
status: Optional[AppStatuses]
6473
"""The status of an experience interface"""
6574

src/whop_sdk/types/shared/app.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,19 @@ class App(BaseModel):
205205
Maximum 30 characters.
206206
"""
207207

208+
openapi_path: Optional[str] = None
209+
"""
210+
The URL path template for a specific view of this app, appended to the base
211+
domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
212+
not configured.
213+
"""
214+
215+
origin: Optional[str] = None
216+
"""
217+
The full origin URL for this app's proxied domain (e.g.,
218+
'https://myapp.apps.whop.com'). Null if no proxy domain is configured.
219+
"""
220+
208221
redirect_uris: List[str]
209222
"""
210223
The whitelisted OAuth callback URLs that users are redirected to after
@@ -217,6 +230,13 @@ class App(BaseModel):
217230
required and optional permissions with justifications.
218231
"""
219232

233+
skills_path: Optional[str] = None
234+
"""
235+
The URL path template for a specific view of this app, appended to the base
236+
domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is
237+
not configured.
238+
"""
239+
220240
stats: Optional[Stats] = None
221241
"""
222242
Aggregate usage statistics for this app, including daily, weekly, and monthly

src/whop_sdk/types/shared/app_view_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
__all__ = ["AppViewType"]
66

7-
AppViewType: TypeAlias = Literal["hub", "discover", "dash", "dashboard", "analytics"]
7+
AppViewType: TypeAlias = Literal["hub", "discover", "dash", "dashboard", "analytics", "skills", "openapi"]

src/whop_sdk/types/shared_params/app_view_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
__all__ = ["AppViewType"]
88

9-
AppViewType: TypeAlias = Literal["hub", "discover", "dash", "dashboard", "analytics"]
9+
AppViewType: TypeAlias = Literal["hub", "discover", "dash", "dashboard", "analytics", "skills", "openapi"]

tests/api_resources/test_apps.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ def test_method_update_with_all_params(self, client: Whop) -> None:
133133
icon={"id": "id"},
134134
name="name",
135135
oauth_client_type="public",
136+
openapi_path="openapi_path",
136137
redirect_uris=["string"],
137138
required_scopes=["read_user"],
139+
skills_path="skills_path",
138140
status="live",
139141
)
140142
assert_matches_type(App, app, path=["response"])
@@ -339,8 +341,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncWhop) -> N
339341
icon={"id": "id"},
340342
name="name",
341343
oauth_client_type="public",
344+
openapi_path="openapi_path",
342345
redirect_uris=["string"],
343346
required_scopes=["read_user"],
347+
skills_path="skills_path",
344348
status="live",
345349
)
346350
assert_matches_type(App, app, path=["response"])

0 commit comments

Comments
 (0)