Skip to content

Commit a75e651

Browse files
committed
fix docstrings
1 parent 2fb098e commit a75e651

File tree

14 files changed

+322
-330
lines changed

14 files changed

+322
-330
lines changed

src/workos/_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
from .webhooks._resource import Webhooks, AsyncWebhooks
2929
from .widgets._resource import Widgets, AsyncWidgets
3030
from .audit_logs._resource import AuditLogs, AsyncAuditLogs
31-
from .actions import Actions, AsyncActions
3231
from .passwordless import AsyncPasswordless, Passwordless
33-
from .pkce import PKCE
3432
from .vault import AsyncVault, Vault
33+
from .actions import Actions, AsyncActions
34+
from .pkce import PKCE
3535

3636

3737
class WorkOSClient(_SyncBase):

src/workos/admin_portal/_resource.py

Lines changed: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,34 @@ def generate_link(
3030
) -> PortalLinkResponse:
3131
"""Generate a Portal Link
3232
33-
Generate a Portal Link scoped to an Organization.
34-
35-
Args:
36-
return_url: The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
37-
success_url: The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
38-
organization: An [Organization](https://workos.com/docs/reference/organization) identifier.
39-
intent:
40-
The intent of the Admin Portal.
41-
- `sso` - Launch Admin Portal for creating SSO connections
42-
- `dsync` - Launch Admin Portal for creating Directory Sync connections
43-
- `audit_logs` - Launch Admin Portal for viewing Audit Logs
44-
- `log_streams` - Launch Admin Portal for creating Log Streams
45-
- `domain_verification` - Launch Admin Portal for Domain Verification
46-
- `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates
47-
- `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key
48-
intent_options: Options to configure the Admin Portal based on the intent.
49-
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
50-
51-
Returns:
52-
PortalLinkResponse
53-
54-
Raises:
55-
BadRequestError: If the request is malformed (400).
56-
AuthorizationError: If the request is forbidden (403).
57-
NotFoundError: If the resource is not found (404).
58-
UnprocessableEntityError: If the request data is unprocessable (422).
59-
AuthenticationError: If the API key is invalid (401).
60-
RateLimitExceededError: If rate limited (429).
61-
ServerError: If the server returns a 5xx error.
33+
Generate a Portal Link scoped to an Organization.
34+
35+
Args:
36+
return_url: The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
37+
success_url: The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
38+
organization: An [Organization](https://workos.com/docs/reference/organization) identifier.
39+
intent: The intent of the Admin Portal.
40+
- `sso` - Launch Admin Portal for creating SSO connections
41+
- `dsync` - Launch Admin Portal for creating Directory Sync connections
42+
- `audit_logs` - Launch Admin Portal for viewing Audit Logs
43+
- `log_streams` - Launch Admin Portal for creating Log Streams
44+
- `domain_verification` - Launch Admin Portal for Domain Verification
45+
- `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates
46+
- `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key
47+
intent_options: Options to configure the Admin Portal based on the intent.
48+
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
49+
50+
Returns:
51+
PortalLinkResponse
52+
53+
Raises:
54+
BadRequestError: If the request is malformed (400).
55+
AuthorizationError: If the request is forbidden (403).
56+
NotFoundError: If the resource is not found (404).
57+
UnprocessableEntityError: If the request data is unprocessable (422).
58+
AuthenticationError: If the API key is invalid (401).
59+
RateLimitExceededError: If rate limited (429).
60+
ServerError: If the server returns a 5xx error.
6261
"""
6362
body: Dict[str, Any] = {
6463
k: v
@@ -100,35 +99,34 @@ async def generate_link(
10099
) -> PortalLinkResponse:
101100
"""Generate a Portal Link
102101
103-
Generate a Portal Link scoped to an Organization.
104-
105-
Args:
106-
return_url: The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
107-
success_url: The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
108-
organization: An [Organization](https://workos.com/docs/reference/organization) identifier.
109-
intent:
110-
The intent of the Admin Portal.
111-
- `sso` - Launch Admin Portal for creating SSO connections
112-
- `dsync` - Launch Admin Portal for creating Directory Sync connections
113-
- `audit_logs` - Launch Admin Portal for viewing Audit Logs
114-
- `log_streams` - Launch Admin Portal for creating Log Streams
115-
- `domain_verification` - Launch Admin Portal for Domain Verification
116-
- `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates
117-
- `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key
118-
intent_options: Options to configure the Admin Portal based on the intent.
119-
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
120-
121-
Returns:
122-
PortalLinkResponse
123-
124-
Raises:
125-
BadRequestError: If the request is malformed (400).
126-
AuthorizationError: If the request is forbidden (403).
127-
NotFoundError: If the resource is not found (404).
128-
UnprocessableEntityError: If the request data is unprocessable (422).
129-
AuthenticationError: If the API key is invalid (401).
130-
RateLimitExceededError: If rate limited (429).
131-
ServerError: If the server returns a 5xx error.
102+
Generate a Portal Link scoped to an Organization.
103+
104+
Args:
105+
return_url: The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
106+
success_url: The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
107+
organization: An [Organization](https://workos.com/docs/reference/organization) identifier.
108+
intent: The intent of the Admin Portal.
109+
- `sso` - Launch Admin Portal for creating SSO connections
110+
- `dsync` - Launch Admin Portal for creating Directory Sync connections
111+
- `audit_logs` - Launch Admin Portal for viewing Audit Logs
112+
- `log_streams` - Launch Admin Portal for creating Log Streams
113+
- `domain_verification` - Launch Admin Portal for Domain Verification
114+
- `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates
115+
- `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key
116+
intent_options: Options to configure the Admin Portal based on the intent.
117+
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
118+
119+
Returns:
120+
PortalLinkResponse
121+
122+
Raises:
123+
BadRequestError: If the request is malformed (400).
124+
AuthorizationError: If the request is forbidden (403).
125+
NotFoundError: If the resource is not found (404).
126+
UnprocessableEntityError: If the request data is unprocessable (422).
127+
AuthenticationError: If the API key is invalid (401).
128+
RateLimitExceededError: If rate limited (429).
129+
ServerError: If the server returns a 5xx error.
132130
"""
133131
body: Dict[str, Any] = {
134132
k: v

src/workos/api_keys/_resource.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ def list_organization_api_keys(
9595
9696
Args:
9797
organization_id: Unique identifier of the Organization.
98-
limit: Maximum number of records to return (1-100, default: 10).
99-
before: Pagination cursor for previous page.
100-
after: Pagination cursor for next page.
101-
order: Sort order.
98+
limit: Upper limit on the number of objects to return, between `1` and `100`.
99+
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
100+
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
101+
order: Order the results by the creation time.
102102
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
103103
104104
Returns:
@@ -255,10 +255,10 @@ async def list_organization_api_keys(
255255
256256
Args:
257257
organization_id: Unique identifier of the Organization.
258-
limit: Maximum number of records to return (1-100, default: 10).
259-
before: Pagination cursor for previous page.
260-
after: Pagination cursor for next page.
261-
order: Sort order.
258+
limit: Upper limit on the number of objects to return, between `1` and `100`.
259+
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
260+
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
261+
order: Order the results by the creation time.
262262
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
263263
264264
Returns:

src/workos/audit_logs/_resource.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ def list_actions(
109109
Get a list of all Audit Log actions in the current environment.
110110
111111
Args:
112-
limit: Maximum number of records to return (1-100, default: 10).
113-
before: Pagination cursor for previous page.
114-
after: Pagination cursor for next page.
115-
order: Sort order.
112+
limit: Upper limit on the number of objects to return, between `1` and `100`.
113+
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
114+
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
115+
order: Order the results by the creation time.
116116
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
117117
118118
Returns:
@@ -159,10 +159,10 @@ def list_action_schemas(
159159
160160
Args:
161161
action_name: The name of the Audit Log action.
162-
limit: Maximum number of records to return (1-100, default: 10).
163-
before: Pagination cursor for previous page.
164-
after: Pagination cursor for next page.
165-
order: Sort order.
162+
limit: Upper limit on the number of objects to return, between `1` and `100`.
163+
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
164+
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
165+
order: Order the results by the creation time.
166166
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
167167
168168
Returns:
@@ -464,10 +464,10 @@ async def list_actions(
464464
Get a list of all Audit Log actions in the current environment.
465465
466466
Args:
467-
limit: Maximum number of records to return (1-100, default: 10).
468-
before: Pagination cursor for previous page.
469-
after: Pagination cursor for next page.
470-
order: Sort order.
467+
limit: Upper limit on the number of objects to return, between `1` and `100`.
468+
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
469+
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
470+
order: Order the results by the creation time.
471471
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
472472
473473
Returns:
@@ -514,10 +514,10 @@ async def list_action_schemas(
514514
515515
Args:
516516
action_name: The name of the Audit Log action.
517-
limit: Maximum number of records to return (1-100, default: 10).
518-
before: Pagination cursor for previous page.
519-
after: Pagination cursor for next page.
520-
order: Sort order.
517+
limit: Upper limit on the number of objects to return, between `1` and `100`.
518+
before: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
519+
after: An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
520+
order: Order the results by the creation time.
521521
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
522522
523523
Returns:

0 commit comments

Comments
 (0)