workos 5.28.0__py3-none-any.whl → 5.29.0__py3-none-any.whl

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.
workos/__about__.py CHANGED
@@ -12,7 +12,7 @@ __package_name__ = "workos"
12
12
 
13
13
  __package_url__ = "https://github.com/workos-inc/workos-python"
14
14
 
15
- __version__ = "5.28.0"
15
+ __version__ = "5.29.0"
16
16
 
17
17
  __author__ = "WorkOS"
18
18
 
workos/organizations.py CHANGED
@@ -1,5 +1,7 @@
1
1
  from typing import Optional, Protocol, Sequence
2
2
 
3
+ from workos.types.feature_flags import FeatureFlag
4
+ from workos.types.feature_flags.list_filters import FeatureFlagListFilters
3
5
  from workos.types.metadata import Metadata
4
6
  from workos.types.organizations.domain_data_input import DomainDataInput
5
7
  from workos.types.organizations.list_filters import OrganizationListFilters
@@ -24,6 +26,10 @@ OrganizationsListResource = WorkOSListResource[
24
26
  Organization, OrganizationListFilters, ListMetadata
25
27
  ]
26
28
 
29
+ FeatureFlagsListResource = WorkOSListResource[
30
+ FeatureFlag, FeatureFlagListFilters, ListMetadata
31
+ ]
32
+
27
33
 
28
34
  class OrganizationsModule(Protocol):
29
35
  """Offers methods through the WorkOS Organizations service."""
@@ -128,6 +134,29 @@ class OrganizationsModule(Protocol):
128
134
  """
129
135
  ...
130
136
 
137
+ def list_feature_flags(
138
+ self,
139
+ organization_id: str,
140
+ *,
141
+ limit: int = DEFAULT_LIST_RESPONSE_LIMIT,
142
+ before: Optional[str] = None,
143
+ after: Optional[str] = None,
144
+ order: PaginationOrder = "desc",
145
+ ) -> SyncOrAsync[FeatureFlagsListResource]:
146
+ """Retrieve a list of feature flags for an organization
147
+
148
+ Args:
149
+ organization_id (str): Organization's unique identifier
150
+ limit (int): Maximum number of records to return. (Optional)
151
+ before (str): Pagination cursor to receive records before a provided Feature Flag ID. (Optional)
152
+ after (str): Pagination cursor to receive records after a provided Feature Flag ID. (Optional)
153
+ order (Literal["asc","desc"]): Sort records in either ascending or descending (default) order by created_at timestamp. (Optional)
154
+
155
+ Returns:
156
+ FeatureFlagsListResource: Feature flags list response from WorkOS.
157
+ """
158
+ ...
159
+
131
160
 
132
161
  class Organizations(OrganizationsModule):
133
162
  _http_client: SyncHTTPClient
@@ -247,6 +276,34 @@ class Organizations(OrganizationsModule):
247
276
 
248
277
  return RoleList.model_validate(response)
249
278
 
279
+ def list_feature_flags(
280
+ self,
281
+ organization_id: str,
282
+ *,
283
+ limit: int = DEFAULT_LIST_RESPONSE_LIMIT,
284
+ before: Optional[str] = None,
285
+ after: Optional[str] = None,
286
+ order: PaginationOrder = "desc",
287
+ ) -> FeatureFlagsListResource:
288
+ list_params: FeatureFlagListFilters = {
289
+ "limit": limit,
290
+ "before": before,
291
+ "after": after,
292
+ "order": order,
293
+ }
294
+
295
+ response = self._http_client.request(
296
+ f"organizations/{organization_id}/feature-flags",
297
+ method=REQUEST_METHOD_GET,
298
+ params=list_params,
299
+ )
300
+
301
+ return WorkOSListResource[FeatureFlag, FeatureFlagListFilters, ListMetadata](
302
+ list_method=self.list_feature_flags,
303
+ list_args=list_params,
304
+ **ListPage[FeatureFlag](**response).model_dump(),
305
+ )
306
+
250
307
 
251
308
  class AsyncOrganizations(OrganizationsModule):
252
309
  _http_client: AsyncHTTPClient
@@ -365,3 +422,31 @@ class AsyncOrganizations(OrganizationsModule):
365
422
  )
366
423
 
367
424
  return RoleList.model_validate(response)
425
+
426
+ async def list_feature_flags(
427
+ self,
428
+ organization_id: str,
429
+ *,
430
+ limit: int = DEFAULT_LIST_RESPONSE_LIMIT,
431
+ before: Optional[str] = None,
432
+ after: Optional[str] = None,
433
+ order: PaginationOrder = "desc",
434
+ ) -> FeatureFlagsListResource:
435
+ list_params: FeatureFlagListFilters = {
436
+ "limit": limit,
437
+ "before": before,
438
+ "after": after,
439
+ "order": order,
440
+ }
441
+
442
+ response = await self._http_client.request(
443
+ f"organizations/{organization_id}/feature-flags",
444
+ method=REQUEST_METHOD_GET,
445
+ params=list_params,
446
+ )
447
+
448
+ return WorkOSListResource[FeatureFlag, FeatureFlagListFilters, ListMetadata](
449
+ list_method=self.list_feature_flags,
450
+ list_args=list_params,
451
+ **ListPage[FeatureFlag](**response).model_dump(),
452
+ )
@@ -0,0 +1,3 @@
1
+ from workos.types.feature_flags.feature_flag import FeatureFlag
2
+
3
+ __all__ = ["FeatureFlag"]
@@ -0,0 +1,12 @@
1
+ from typing import Literal, Optional
2
+ from workos.types.workos_model import WorkOSModel
3
+
4
+
5
+ class FeatureFlag(WorkOSModel):
6
+ id: str
7
+ object: Literal["feature_flag"]
8
+ slug: str
9
+ name: str
10
+ description: Optional[str]
11
+ created_at: str
12
+ updated_at: str
@@ -0,0 +1,5 @@
1
+ from workos.types.list_resource import ListArgs
2
+
3
+
4
+ class FeatureFlagListFilters(ListArgs, total=False):
5
+ pass
@@ -23,6 +23,7 @@ from workos.types.directory_sync import (
23
23
  DirectoryUserWithGroups,
24
24
  )
25
25
  from workos.types.events import Event
26
+ from workos.types.feature_flags import FeatureFlag
26
27
  from workos.types.fga import (
27
28
  Warrant,
28
29
  AuthorizationResource,
@@ -46,6 +47,7 @@ ListableResource = TypeVar(
46
47
  DirectoryGroup,
47
48
  DirectoryUserWithGroups,
48
49
  Event,
50
+ FeatureFlag,
49
51
  Invitation,
50
52
  Organization,
51
53
  OrganizationMembership,
@@ -37,6 +37,7 @@ ConnectionType = Literal[
37
37
  "PingFederateSAML",
38
38
  "PingOneSAML",
39
39
  "RipplingSAML",
40
+ "SalesforceOAuth",
40
41
  "SalesforceSAML",
41
42
  "ShibbolethGenericSAML",
42
43
  "ShibbolethSAML",
@@ -6,4 +6,5 @@ SsoProviderType = Literal[
6
6
  "GitHubOAuth",
7
7
  "GoogleOAuth",
8
8
  "MicrosoftOAuth",
9
+ "SalesforceOAuth",
9
10
  ]
@@ -13,6 +13,7 @@ AuthenticationMethod = Literal[
13
13
  "GitHubOAuth",
14
14
  "GoogleOAuth",
15
15
  "MicrosoftOAuth",
16
+ "SalesforceOAuth",
16
17
  "MagicAuth",
17
18
  "Impersonation",
18
19
  ]
@@ -7,6 +7,7 @@ OAuthTokensProvidersType = Literal[
7
7
  "GitHubOauth",
8
8
  "GoogleOauth",
9
9
  "MicrosoftOauth",
10
+ "SalesforceOauth",
10
11
  ]
11
12
 
12
13
 
@@ -2,5 +2,10 @@ from typing import Literal
2
2
 
3
3
 
4
4
  UserManagementProviderType = Literal[
5
- "authkit", "AppleOAuth", "GitHubOAuth", "GoogleOAuth", "MicrosoftOAuth"
5
+ "authkit",
6
+ "AppleOAuth",
7
+ "GitHubOAuth",
8
+ "GoogleOAuth",
9
+ "MicrosoftOAuth",
10
+ "SalesforceOAuth",
6
11
  ]
workos/user_management.py CHANGED
@@ -396,7 +396,7 @@ class UserManagementModule(Protocol):
396
396
  organization_id (str): The organization_id connection selector is used to initiate SSO for an Organization.
397
397
  The value of this parameter should be a WorkOS Organization ID. (Optional)
398
398
  provider (UserManagementProviderType): The provider connection selector is used to initiate SSO using an OAuth-compatible provider.
399
- Currently, the supported values for provider are 'authkit', 'AppleOAuth', 'GitHubOAuth, 'GoogleOAuth', and 'MicrosoftOAuth'. (Optional)
399
+ Currently, the supported values for provider are 'authkit', 'AppleOAuth', 'GitHubOAuth, 'GoogleOAuth', 'MicrosoftOAuth', and 'SalesforceOAuth'. (Optional)
400
400
  provider_scopes (Sequence[str]): Can be used to specify additional scopes that will be requested when initiating SSO using an OAuth provider. (Optional)
401
401
  domain_hint (str): Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth,
402
402
  or with a GoogleSAML connection type. (Optional)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: workos
3
- Version: 5.28.0
3
+ Version: 5.29.0
4
4
  Summary: WorkOS Python Client
5
5
  Home-page: https://github.com/workos-inc/workos-python
6
6
  Author: WorkOS
@@ -1,4 +1,4 @@
1
- workos/__about__.py,sha256=znw1lA9UVmwv7yB9SUBmmi21g6RgjQkNPwW9Buge2EE,406
1
+ workos/__about__.py,sha256=ig7DRAa6dkds_8J3NhtXTP12KO0T4nB-9JNj4NgC2No,406
2
2
  workos/__init__.py,sha256=hOdbO_MJCvpLx8EbRjQg-fvFAB-glJmrmxUZK8kWG0k,167
3
3
  workos/_base_client.py,sha256=YWLXBpd0YeID3WKYZkKa4l9ZuB9e6HgdLmPKZIzXsME,3599
4
4
  workos/_client_configuration.py,sha256=g3eXhtrEMN6CW0hZ5uHb2PmLurXjyBkWZeQYMPeJD6s,222
@@ -11,18 +11,18 @@ workos/exceptions.py,sha256=eoy-T4We98HKZn0UZu33fPzhm4DwafzwLeg3juhC6FE,1732
11
11
  workos/fga.py,sha256=qjZrdkXKwJDLVTMMrOADxyXRDkswto4kGIdtTjtS3hw,21008
12
12
  workos/mfa.py,sha256=J8eOr4ZEmK0TPFKD7pabSalgCFCyg3XJY1stu28_8Vw,6862
13
13
  workos/organization_domains.py,sha256=um-dm54SIs2Kd2FxqxVjIlynlenAG9NamQmNVUGOQ0k,5464
14
- workos/organizations.py,sha256=ugPRhwN8cN2O6qOCf7wj8Wus-oeRKXlNe2642PSl_n4,12266
14
+ workos/organizations.py,sha256=_kiS0KbFd6TjOqFxwA2gL2EaDO7cDPKwb3RWlw8sQi4,15285
15
15
  workos/passwordless.py,sha256=NGXDoxomBkrIml8-VHXH1HvCFMqotQ-YhRobUQXpVZs,3203
16
16
  workos/portal.py,sha256=lzf3fnOor4AyVdHCHMuJzVSpAC9LWWdC5sZIRtCsb0c,2443
17
17
  workos/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  workos/session.py,sha256=i5znIJjfMHejpaeXKmRjFR_G5FA9-5KQYAF0VsLasgw,12217
19
19
  workos/sso.py,sha256=ZBC3y-IRmxG0jPd0BOj7s7XQkXJoTLUg1fx-h3Gfy4g,13541
20
- workos/user_management.py,sha256=gjDfrO_kNQxJDza443rH9topSDlTGBW-O_TUYp46ops,78107
20
+ workos/user_management.py,sha256=PW969XfXk02E-JDliGvK45cv_4d3NsXXdQeUiUrZEZc,78126
21
21
  workos/vault.py,sha256=SJXr3nJ03qJFuf30FjevMD6LLlDNX3MGaKlYGgICRRE,15657
22
22
  workos/webhooks.py,sha256=CuwBxh6va9VZFVSXOknveGt6CCGDF3em07a-J12DbXI,4790
23
23
  workos/widgets.py,sha256=bfbR0hQOHZabbgGL2ekD5sY1sjiUoWBTdrBd_a6WmBc,1721
24
24
  workos/types/__init__.py,sha256=aYScTXq5jOyp0AYvdWffaj5-zdDuNtCCJtbzt5GM19k,267
25
- workos/types/list_resource.py,sha256=6N9OoaFsWPCXEX9plVONODxed-Yx6RaX1ga1b15ENIA,6570
25
+ workos/types/list_resource.py,sha256=I2ToBP7mNF_LcooHocyX2WckKO0N3_920W7cKFDBfks,6638
26
26
  workos/types/metadata.py,sha256=uUqDkGJGyFY3H4JZObSiCfn4jKBue5CBhOqv79TI1n0,52
27
27
  workos/types/workos_model.py,sha256=bV_p3baadcUJOU_7f6ysZ6KXhpt3E_93spuZnfJs9vc,735
28
28
  workos/types/audit_logs/__init__.py,sha256=daPn8wAVEnlM1fCpOsy3dVZV_0YEp8bA1T_nhk5-pU8,211
@@ -54,6 +54,9 @@ workos/types/events/list_filters.py,sha256=P04zmRynx9VPqNX_MBXA-3KA6flPZJogtIUqT
54
54
  workos/types/events/organization_domain_verification_failed_payload.py,sha256=b4wX8HVbL9Nx6fCjOXkZg9eLc-Bv6YqAjMap1f7UvFc,470
55
55
  workos/types/events/previous_attributes.py,sha256=DxolwLwzcnG8r_W6rh5BT29iDfSVsIELvRYJ0NCrNn0,72
56
56
  workos/types/events/session_created_payload.py,sha256=F4eKjmetgyRIluNBDUmB2OXq8hDWEVjALJ4rrT2IHJs,462
57
+ workos/types/feature_flags/__init__.py,sha256=zQpY624xaDw8t94ZbNrl_iH9bHPrSYYSKHVDnd7XTmc,91
58
+ workos/types/feature_flags/feature_flag.py,sha256=fS1RP_mOJKMmnaNqpSsePkixbJAExx-153IKb29kC-4,268
59
+ workos/types/feature_flags/list_filters.py,sha256=iTnz1KNzxXAJunBMg-ZE63Mh2DaCFmS4S_q6AoL3rbI,112
57
60
  workos/types/fga/__init__.py,sha256=mVb3gvhvK93PAosSgO1RlNmxYX4zIxVDcZZQ8Jyejuw,151
58
61
  workos/types/fga/authorization_resource_types.py,sha256=wB_CNWhsuCx16u26-o0MJuN2zS6aMV61WDTVHlwD1zk,225
59
62
  workos/types/fga/authorization_resources.py,sha256=pXDMKGTd6AX7Z6zDAud9ebn_NMOAVoXtBNH1VRkmdyI,263
@@ -84,26 +87,26 @@ workos/types/portal/portal_link_intent_options.py,sha256=HMDW6mBkCspcMq_x9wPwq5u
84
87
  workos/types/roles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
85
88
  workos/types/roles/role.py,sha256=GhY6tCFIW33Z-SCbP---Esyoz_ePFvoamxIqyWvCNJ4,543
86
89
  workos/types/sso/__init__.py,sha256=feBeNqummbAvLaiAn9mTmW5O8axKHUWxh6IkQceKeAc,115
87
- workos/types/sso/connection.py,sha256=zvHPcazmBwTAF9TQPT9mar1fnoO9nxZVirsWFU1ud7g,1656
90
+ workos/types/sso/connection.py,sha256=GTpaS02EMv2cJAkt20tSxldVCcKQlpl37vQSIAIHSdM,1679
88
91
  workos/types/sso/connection_domain.py,sha256=kMa9GatwUl6YilMU9iiyUKXFfEUKWYub7PyjjYmqhLc,185
89
92
  workos/types/sso/profile.py,sha256=IWHpg2GdIvE7eAGi1RJheAqp9AozsKuGfiFc9_IteHI,1075
90
- workos/types/sso/sso_provider_type.py,sha256=7iVVMj0mrbrj8gCEVCz3PJ5uZJLPzO0PmscB3-JmfZ0,136
93
+ workos/types/sso/sso_provider_type.py,sha256=JfO-Ta1wJP7jhtbnWKcS9tElMK_7P6AM10nY-7mM4XE,159
91
94
  workos/types/user_management/__init__.py,sha256=Z4KR9pBDb1pbCL26WxSuNLautf4mOVqntWztNr6i6QQ,361
92
95
  workos/types/user_management/authenticate_with_common.py,sha256=7YNj_hGzn9Vt2GVKzGfJiAFAjg0QHMJBhT_olXdikug,2062
93
- workos/types/user_management/authentication_response.py,sha256=7GYD0QL36zvixTEFj-JI7zUy-N2WPk_42mbF0pWCtho,1414
96
+ workos/types/user_management/authentication_response.py,sha256=2A6vU8FBEE7bXl5aULB-s80_xsR9caqC9tSr9Yq1NtE,1437
94
97
  workos/types/user_management/email_verification.py,sha256=4EqlN7qZBVTZGKaU9WdCSdgFjOMZtkYWTolE-h_hTXA,399
95
98
  workos/types/user_management/impersonator.py,sha256=_PAPYg_Q1M8wpwtnkQxuA2vtUIwvs_G30vYY91aqw8E,192
96
99
  workos/types/user_management/invitation.py,sha256=4fK-Fk786MlhzZvvOrZtU_6SCJXmem3xw62SkBE1c-0,721
97
100
  workos/types/user_management/list_filters.py,sha256=qgJUKUuVmBIG1g-rdaq9vLAW1gu14WzJ67ctPVlFEtg,687
98
101
  workos/types/user_management/magic_auth.py,sha256=Sda13_uMOC-hHlyGeOXNnCn-HrpwUmtrf2hO5ek9U98,359
99
- workos/types/user_management/oauth_tokens.py,sha256=bETJTZ-Y50h6ib7w5vVbWFGv-xlvhI40sKGz7_l4YSE,445
102
+ workos/types/user_management/oauth_tokens.py,sha256=pANk6AyqyRq6hrOrJYQ9AHALVxUbqhGnggzD8PVV-Ew,468
100
103
  workos/types/user_management/organization_membership.py,sha256=dllONFtD1IZZiyqxnV8lJpJyH55OeOeaHRBDZlcWLwk,735
101
104
  workos/types/user_management/password_hash_type.py,sha256=1752LWdXbaH6TZ6IxbJWeRwlYXX9zN5iJATTaDrCQVA,93
102
105
  workos/types/user_management/password_reset.py,sha256=-NJCfEh4Q1xS9fFXJaF_acYeuUc9POqERLh8urMhqt8,403
103
106
  workos/types/user_management/screen_hint.py,sha256=DnPgvjRK-20i82v3YPzggna1rc6yOMyhiqwUdk01L3s,75
104
107
  workos/types/user_management/session.py,sha256=ckDH0Opgp8-w-08FBJax3sPNCGzxSg9z1JzsjbUNryQ,1434
105
108
  workos/types/user_management/user.py,sha256=aXRHsLXnQbXWBPRTdAP9Ym_-D9hjmrp_E4PTPi1gF1s,603
106
- workos/types/user_management/user_management_provider_type.py,sha256=UEjtcs9oeDvL9248bFy8nRfzutA6aBfhVMuMByG0qsM,145
109
+ workos/types/user_management/user_management_provider_type.py,sha256=t7S3zLf9n9GSYQJjshGRdiAfebYQKziGmUgbBlOmYuE,185
107
110
  workos/types/vault/__init__.py,sha256=krBuIl8luysrtDf9-b8KTkXOHDOaSsOR-Aao6Wlil0Q,41
108
111
  workos/types/vault/key.py,sha256=x30XBplSj9AviDDAB8MdpcULbZvvo2sUzi8RCmZQKxU,453
109
112
  workos/types/vault/object.py,sha256=-rk4KovS3eT8T8L3JltYUS0cd2Rg1JKcAX9SOaZO3D8,664
@@ -125,8 +128,8 @@ workos/utils/crypto_provider.py,sha256=QeQSR4t9xLlb90kEfl8onVUsf1yCkYq0EjFTxK0mU
125
128
  workos/utils/http_client.py,sha256=TM5yMFFExmAE8D2Z43-5O301tRbnylLG0aXO0isGorE,6197
126
129
  workos/utils/pagination_order.py,sha256=_-et1DDJLG0czarTU7op4W6RA0V1f85GNsUgtyRU55Q,70
127
130
  workos/utils/request_helper.py,sha256=NaO16qPPbSNnCeE0fiNKYb8gM-dK_okYVJbLGrEGXz8,793
128
- workos-5.28.0.dist-info/LICENSE,sha256=mU--WL1JzelH2tXpKVoOlpud4cpqKSRTtdArCvYZmb4,1063
129
- workos-5.28.0.dist-info/METADATA,sha256=GzcMauckW9CSQtqN7REffVNq8smSS2vRCJUb9Nad9B8,4187
130
- workos-5.28.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
131
- workos-5.28.0.dist-info/top_level.txt,sha256=ZFskIfue1Tw-JwjyIXRvdsAl9i0DX9VbqmgICXV84Sk,7
132
- workos-5.28.0.dist-info/RECORD,,
131
+ workos-5.29.0.dist-info/LICENSE,sha256=mU--WL1JzelH2tXpKVoOlpud4cpqKSRTtdArCvYZmb4,1063
132
+ workos-5.29.0.dist-info/METADATA,sha256=TazcEUR6BRrDtctstXayz4J1kIHOv6-vfifNzi2bn7U,4187
133
+ workos-5.29.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
134
+ workos-5.29.0.dist-info/top_level.txt,sha256=ZFskIfue1Tw-JwjyIXRvdsAl9i0DX9VbqmgICXV84Sk,7
135
+ workos-5.29.0.dist-info/RECORD,,