authpi-admin 1.2.0__tar.gz → 1.3.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.
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/CHANGELOG.md +15 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/PKG-INFO +1 -1
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/_version.py +1 -1
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/models.py +119 -57
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/account_api_keys.py +23 -6
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/accounts.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/agent_verifiers.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/agents.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/approvals.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/auth_methods.py +3 -1
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/clients.py +26 -10
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/credits.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/deliveries.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/domains.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/events.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/groups.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/invitations.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/invoices.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/issuers.py +28 -5
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/members.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/notes.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/organization_api_keys.py +21 -5
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/organizations.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/trusted_devices.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/usage.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/user_sessions.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/user_tokens.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/user_verifiers.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/users.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/webhooks.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/pagination.py +1 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/pyproject.toml +1 -1
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/tests/test_client.py +21 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/tests/test_pagination.py +3 -1
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/tests/test_public_types.py +9 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/uv.lock +1 -1
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/.gitignore +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/README.md +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/__init__.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/client.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/errors.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/__init__.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/__init__.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/account_tokens.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/issuer_sessions.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/issuer_tokens.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/payment_methods.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/redeliver.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/sso.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/scopes/__init__.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/scopes/agent_scope.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/scopes/issuer_scope.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/scopes/organization_scope.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/scopes/user_scope.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/scopes/webhook_scope.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/http_client.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/py.typed +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/types.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/user_agent.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/tests/__init__.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/tests/test_errors.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/tests/test_http_client.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/tests/test_integration.py +0 -0
- {authpi_admin-1.2.0 → authpi_admin-1.3.0}/tests/test_version.py +0 -0
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.0](https://github.com/arbfay/authpi/compare/authpi-admin-v1.2.0...authpi-admin-v1.3.0) (2026-07-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **admin-py:** sync deployed Core API surface ([685f9a4](https://github.com/arbfay/authpi/commit/685f9a4420705fd30124ea1f1a5e5f268d838cde))
|
|
9
|
+
* **admin:** sync deployed Core API SDK surface ([ae9d632](https://github.com/arbfay/authpi/commit/ae9d63255a02170902002f8d3e6a1a3c9c92846a))
|
|
10
|
+
* **console:** rework issuer operations experience ([196f318](https://github.com/arbfay/authpi/commit/196f3182d862423d889fe28b0e66433fdf0f06de))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **admin-py:** expose page integrity metadata [skip ci] ([04eeb51](https://github.com/arbfay/authpi/commit/04eeb510108b1b02bcc346d8866f78219c2cb8f9))
|
|
16
|
+
* **admin-py:** renamed issuer related OpenAPI models ([f92cd7e](https://github.com/arbfay/authpi/commit/f92cd7e1d80eb32af4fa6bc162c854a7deea9c01))
|
|
17
|
+
|
|
3
18
|
## [1.2.0](https://github.com/arbfay/authpi/compare/authpi-admin-v1.1.0...authpi-admin-v1.2.0) (2026-07-15)
|
|
4
19
|
|
|
5
20
|
|
|
@@ -377,6 +377,76 @@ class Issuer(BaseModel):
|
|
|
377
377
|
created_at: int
|
|
378
378
|
updated_at: int | None = None
|
|
379
379
|
|
|
380
|
+
class IssuerListItem(BaseModel):
|
|
381
|
+
model_config = ConfigDict(frozen=True)
|
|
382
|
+
|
|
383
|
+
_etag: str | None = PrivateAttr(default=None)
|
|
384
|
+
|
|
385
|
+
id: str
|
|
386
|
+
account_id: str
|
|
387
|
+
name: str | None = None
|
|
388
|
+
description: str | None
|
|
389
|
+
links: dict[str, Any] | None = None
|
|
390
|
+
available_scopes: list[str]
|
|
391
|
+
status: str
|
|
392
|
+
status_at: int | None = None
|
|
393
|
+
settings: dict[str, Any]
|
|
394
|
+
metadata: Metadata
|
|
395
|
+
created_at: int
|
|
396
|
+
updated_at: int | None = None
|
|
397
|
+
access_mode: str | None
|
|
398
|
+
auth_method_count: int
|
|
399
|
+
enabled_login_method_count: int
|
|
400
|
+
enabled_signup_method_count: int
|
|
401
|
+
available_scope_count: int
|
|
402
|
+
branding_configured: bool
|
|
403
|
+
readiness: str
|
|
404
|
+
|
|
405
|
+
CreateAuthMethodInput = dict[str, Any]
|
|
406
|
+
|
|
407
|
+
class CreateIssuerSettingsInput(BaseModel):
|
|
408
|
+
model_config = ConfigDict(frozen=True)
|
|
409
|
+
|
|
410
|
+
_etag: str | None = PrivateAttr(default=None)
|
|
411
|
+
|
|
412
|
+
portals: dict[str, Any] | None = None
|
|
413
|
+
branding: dict[str, Any] | None = None
|
|
414
|
+
access: dict[str, Any]
|
|
415
|
+
security: dict[str, Any] | None = None
|
|
416
|
+
|
|
417
|
+
class CreateIssuerInput(TypedDict):
|
|
418
|
+
name: str
|
|
419
|
+
description: NotRequired[str | None]
|
|
420
|
+
links: NotRequired[dict[str, Any] | None]
|
|
421
|
+
available_scopes: NotRequired[list[str] | None]
|
|
422
|
+
status: NotRequired[str | None]
|
|
423
|
+
settings: NotRequired[CreateIssuerSettingsInput | None]
|
|
424
|
+
metadata: NotRequired[dict[str, Any] | None]
|
|
425
|
+
|
|
426
|
+
class ClientListItem(BaseModel):
|
|
427
|
+
model_config = ConfigDict(frozen=True)
|
|
428
|
+
|
|
429
|
+
_etag: str | None = PrivateAttr(default=None)
|
|
430
|
+
|
|
431
|
+
id: str
|
|
432
|
+
issuer_id: str
|
|
433
|
+
status: str
|
|
434
|
+
type: str
|
|
435
|
+
confidential: bool
|
|
436
|
+
name: str
|
|
437
|
+
description: str | None
|
|
438
|
+
logo_url: str | None
|
|
439
|
+
scopes: list[str]
|
|
440
|
+
protocol: str
|
|
441
|
+
application_type: str | None
|
|
442
|
+
grant_types: list[str] | None = None
|
|
443
|
+
redirect_uri_count: int | None = None
|
|
444
|
+
configuration_indexed: bool | None = None
|
|
445
|
+
secret_rotated_at: int | None = None
|
|
446
|
+
status_at: int | None = None
|
|
447
|
+
created_at: int
|
|
448
|
+
updated_at: int | None = None
|
|
449
|
+
|
|
380
450
|
class Client(BaseModel):
|
|
381
451
|
model_config = ConfigDict(frozen=True)
|
|
382
452
|
|
|
@@ -645,6 +715,28 @@ class UpdateWebhook(TypedDict):
|
|
|
645
715
|
circuit_breaker: NotRequired[dict[str, Any] | None]
|
|
646
716
|
metadata: NotRequired[dict[str, Any] | None]
|
|
647
717
|
|
|
718
|
+
class ApiKeyListItem(BaseModel):
|
|
719
|
+
model_config = ConfigDict(frozen=True)
|
|
720
|
+
|
|
721
|
+
_etag: str | None = PrivateAttr(default=None)
|
|
722
|
+
|
|
723
|
+
id: str
|
|
724
|
+
org_id: str
|
|
725
|
+
issuer_id: str
|
|
726
|
+
type: str | None = None
|
|
727
|
+
status: str
|
|
728
|
+
name: str
|
|
729
|
+
description: str | None
|
|
730
|
+
tags: list[str] | None = None
|
|
731
|
+
scopes: list[str] | None = None
|
|
732
|
+
ip_allowlist: list[str] | None = None
|
|
733
|
+
expires_at: int | None
|
|
734
|
+
secret_hint: str | None
|
|
735
|
+
last_rotated_at: int | None = None
|
|
736
|
+
status_at: int | None = None
|
|
737
|
+
created_at: int
|
|
738
|
+
updated_at: int | None
|
|
739
|
+
|
|
648
740
|
class CreateApiKeyResponse(BaseModel):
|
|
649
741
|
"""The new API key with secret"""
|
|
650
742
|
model_config = ConfigDict(frozen=True)
|
|
@@ -670,6 +762,16 @@ class CreateApiKeyResponse(BaseModel):
|
|
|
670
762
|
secret: dict[str, Any]
|
|
671
763
|
secret_plain: str
|
|
672
764
|
|
|
765
|
+
class CreateAccountApiKey(TypedDict):
|
|
766
|
+
name: str
|
|
767
|
+
description: NotRequired[str | None]
|
|
768
|
+
tags: NotRequired[list[str] | None]
|
|
769
|
+
restrictions: dict[str, Any]
|
|
770
|
+
expires_at: NotRequired[int | None]
|
|
771
|
+
metadata: NotRequired[dict[str, Any] | None]
|
|
772
|
+
secret: NotRequired[str | None]
|
|
773
|
+
secret_hint: NotRequired[str | None]
|
|
774
|
+
|
|
673
775
|
class ApiKey(BaseModel):
|
|
674
776
|
"""The API key details"""
|
|
675
777
|
model_config = ConfigDict(frozen=True)
|
|
@@ -744,7 +846,6 @@ class PublicSession(BaseModel):
|
|
|
744
846
|
status_reason: str | None = None
|
|
745
847
|
status_by: str | None = None
|
|
746
848
|
authentication: dict[str, Any] | None = None
|
|
747
|
-
client: dict[str, Any] | None = None
|
|
748
849
|
op_session_id: str | None = None
|
|
749
850
|
device: dict[str, Any] | None = None
|
|
750
851
|
location: dict[str, Any] | None = None
|
|
@@ -764,6 +865,7 @@ class PublicSession(BaseModel):
|
|
|
764
865
|
updated_at: int | None = None
|
|
765
866
|
expires_at: int | None = None
|
|
766
867
|
revoked_at: int | None = None
|
|
868
|
+
client: dict[str, Any] | None = None
|
|
767
869
|
|
|
768
870
|
class NoteMention(BaseModel):
|
|
769
871
|
model_config = ConfigDict(frozen=True)
|
|
@@ -813,24 +915,6 @@ class UpdateNoteInput(TypedDict):
|
|
|
813
915
|
content: NotRequired[str | None]
|
|
814
916
|
pinned: NotRequired[bool | None]
|
|
815
917
|
|
|
816
|
-
class ApiKeysListItem(BaseModel):
|
|
817
|
-
model_config = ConfigDict(frozen=True)
|
|
818
|
-
|
|
819
|
-
_etag: str | None = PrivateAttr(default=None)
|
|
820
|
-
|
|
821
|
-
id: str
|
|
822
|
-
org_id: str
|
|
823
|
-
issuer_id: str
|
|
824
|
-
status: str
|
|
825
|
-
name: str
|
|
826
|
-
description: str | None
|
|
827
|
-
tags: list[str]
|
|
828
|
-
scopes: list[str]
|
|
829
|
-
expires_at: float | None
|
|
830
|
-
secret_hint: str | None
|
|
831
|
-
created_at: float
|
|
832
|
-
updated_at: float | None
|
|
833
|
-
|
|
834
918
|
class ApiKeysRotateResponse(BaseModel):
|
|
835
919
|
model_config = ConfigDict(frozen=True)
|
|
836
920
|
|
|
@@ -907,26 +991,6 @@ class IssuerApprovalsListItem(BaseModel):
|
|
|
907
991
|
created_at: float
|
|
908
992
|
updated_at: float
|
|
909
993
|
|
|
910
|
-
class IssuerClientsListItem(BaseModel):
|
|
911
|
-
model_config = ConfigDict(frozen=True)
|
|
912
|
-
|
|
913
|
-
_etag: str | None = PrivateAttr(default=None)
|
|
914
|
-
|
|
915
|
-
id: str
|
|
916
|
-
issuer_id: str
|
|
917
|
-
status: str
|
|
918
|
-
type: str
|
|
919
|
-
confidential: bool
|
|
920
|
-
name: str
|
|
921
|
-
description: str | None
|
|
922
|
-
logo_url: str | None
|
|
923
|
-
scopes: list[str]
|
|
924
|
-
protocol: str
|
|
925
|
-
application_type: str | None
|
|
926
|
-
status_at: float | None
|
|
927
|
-
created_at: float
|
|
928
|
-
updated_at: float | None
|
|
929
|
-
|
|
930
994
|
class IssuerClientsCreateResponse(BaseModel):
|
|
931
995
|
"""The newly created client with secret (if confidential)"""
|
|
932
996
|
model_config = ConfigDict(frozen=True)
|
|
@@ -977,24 +1041,6 @@ class IssuerOrganizationsListItem(BaseModel):
|
|
|
977
1041
|
created_at: int
|
|
978
1042
|
updated_at: int | None = None
|
|
979
1043
|
|
|
980
|
-
class OrganizationApiKeysListItem(BaseModel):
|
|
981
|
-
model_config = ConfigDict(frozen=True)
|
|
982
|
-
|
|
983
|
-
_etag: str | None = PrivateAttr(default=None)
|
|
984
|
-
|
|
985
|
-
id: str
|
|
986
|
-
org_id: str
|
|
987
|
-
issuer_id: str
|
|
988
|
-
status: str
|
|
989
|
-
name: str
|
|
990
|
-
description: str | None
|
|
991
|
-
tags: list[str]
|
|
992
|
-
scopes: list[str]
|
|
993
|
-
expires_at: float | None
|
|
994
|
-
secret_hint: str | None
|
|
995
|
-
created_at: float
|
|
996
|
-
updated_at: float | None
|
|
997
|
-
|
|
998
1044
|
class OrganizationSsoAddDomainResponse(BaseModel):
|
|
999
1045
|
model_config = ConfigDict(frozen=True)
|
|
1000
1046
|
|
|
@@ -1223,6 +1269,15 @@ class WebhookDeliveriesRedeliverResponse(BaseModel):
|
|
|
1223
1269
|
updated_at: int | None
|
|
1224
1270
|
success: bool
|
|
1225
1271
|
|
|
1272
|
+
# Deprecated: use ClientListItem instead.
|
|
1273
|
+
IssuerClientsListItem = ClientListItem
|
|
1274
|
+
|
|
1275
|
+
# Deprecated: use ApiKeyListItem instead.
|
|
1276
|
+
ApiKeysListItem = ApiKeyListItem
|
|
1277
|
+
|
|
1278
|
+
# Deprecated: use ApiKeyListItem instead.
|
|
1279
|
+
OrganizationApiKeysListItem = ApiKeyListItem
|
|
1280
|
+
|
|
1226
1281
|
|
|
1227
1282
|
__all__ = [
|
|
1228
1283
|
"Account",
|
|
@@ -1235,14 +1290,20 @@ __all__ = [
|
|
|
1235
1290
|
"AgentVerifiersListItem",
|
|
1236
1291
|
"ApiError",
|
|
1237
1292
|
"ApiKey",
|
|
1293
|
+
"ApiKeyListItem",
|
|
1238
1294
|
"ApiKeysListItem",
|
|
1239
1295
|
"ApiKeysRotateResponse",
|
|
1240
1296
|
"CallerAccountAccess",
|
|
1241
1297
|
"CallerIdentity",
|
|
1242
1298
|
"CallerOrganizationAccess",
|
|
1243
1299
|
"Client",
|
|
1300
|
+
"ClientListItem",
|
|
1301
|
+
"CreateAccountApiKey",
|
|
1244
1302
|
"CreateApiKeyResponse",
|
|
1245
1303
|
"CreateAuthInput",
|
|
1304
|
+
"CreateAuthMethodInput",
|
|
1305
|
+
"CreateIssuerInput",
|
|
1306
|
+
"CreateIssuerSettingsInput",
|
|
1246
1307
|
"CreateNoteInput",
|
|
1247
1308
|
"CreateWebhookInput",
|
|
1248
1309
|
"CreateWebhookResponseAuth",
|
|
@@ -1259,6 +1320,7 @@ __all__ = [
|
|
|
1259
1320
|
"IssuerClientsCreateResponse",
|
|
1260
1321
|
"IssuerClientsListItem",
|
|
1261
1322
|
"IssuerClientsRotateSecretResponse",
|
|
1323
|
+
"IssuerListItem",
|
|
1262
1324
|
"IssuerOrganizationsListItem",
|
|
1263
1325
|
"IssuerUsersListItem",
|
|
1264
1326
|
"Metadata",
|
{authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/account_api_keys.py
RENAMED
|
@@ -8,8 +8,9 @@ from typing import Any
|
|
|
8
8
|
|
|
9
9
|
from authpi_admin.generated.models import (
|
|
10
10
|
ApiKey,
|
|
11
|
-
|
|
11
|
+
ApiKeyListItem,
|
|
12
12
|
ApiKeysRotateResponse,
|
|
13
|
+
CreateAccountApiKey,
|
|
13
14
|
CreateApiKeyResponse,
|
|
14
15
|
UpdateApiKey,
|
|
15
16
|
)
|
|
@@ -31,19 +32,28 @@ class AccountApiKeysResource:
|
|
|
31
32
|
self,
|
|
32
33
|
limit: int | None = None,
|
|
33
34
|
cursor: str | None = None,
|
|
35
|
+
q: str | None = None,
|
|
34
36
|
status: str | None = None,
|
|
37
|
+
access: str | None = None,
|
|
38
|
+
readiness: str | None = None,
|
|
35
39
|
*,
|
|
36
40
|
timeout: float | None = None,
|
|
37
41
|
headers: dict[str, str] | None = None,
|
|
38
|
-
) -> Page[
|
|
42
|
+
) -> Page[ApiKeyListItem]:
|
|
39
43
|
"""List Account API Keys"""
|
|
40
44
|
query: dict[str, Any] = {}
|
|
41
45
|
if limit is not None:
|
|
42
46
|
query["limit"] = limit
|
|
43
47
|
if cursor is not None:
|
|
44
48
|
query["cursor"] = cursor
|
|
49
|
+
if q is not None:
|
|
50
|
+
query["q"] = q
|
|
45
51
|
if status is not None:
|
|
46
52
|
query["status"] = status
|
|
53
|
+
if access is not None:
|
|
54
|
+
query["access"] = access
|
|
55
|
+
if readiness is not None:
|
|
56
|
+
query["readiness"] = readiness
|
|
47
57
|
resp = await self._client.request(
|
|
48
58
|
"GET",
|
|
49
59
|
self._base_path,
|
|
@@ -52,26 +62,33 @@ class AccountApiKeysResource:
|
|
|
52
62
|
headers=headers,
|
|
53
63
|
)
|
|
54
64
|
data = resp.data
|
|
55
|
-
items = [
|
|
65
|
+
items = [ApiKeyListItem(**item) for item in data.get("data", [])] if data else []
|
|
56
66
|
return Page(
|
|
57
67
|
data=items,
|
|
58
68
|
has_more=data.get("has_more", False) if data else False,
|
|
59
69
|
next_cursor=data.get("next_cursor") if data else None,
|
|
70
|
+
invalid_count=data.get("invalid_count") if data else None,
|
|
60
71
|
)
|
|
61
72
|
|
|
62
73
|
async def list_all(
|
|
63
74
|
self,
|
|
64
75
|
limit: int | None = None,
|
|
76
|
+
q: str | None = None,
|
|
65
77
|
status: str | None = None,
|
|
78
|
+
access: str | None = None,
|
|
79
|
+
readiness: str | None = None,
|
|
66
80
|
*,
|
|
67
81
|
timeout: float | None = None,
|
|
68
82
|
headers: dict[str, str] | None = None,
|
|
69
|
-
) -> AsyncIterator[
|
|
83
|
+
) -> AsyncIterator[ApiKeyListItem]:
|
|
70
84
|
"""Auto-paginating iterator over all account_api_keys."""
|
|
71
|
-
async def _fetch(cursor: str | None = None) -> Page[
|
|
85
|
+
async def _fetch(cursor: str | None = None) -> Page[ApiKeyListItem]:
|
|
72
86
|
return await self.list(
|
|
73
87
|
limit=limit,
|
|
88
|
+
q=q,
|
|
74
89
|
status=status,
|
|
90
|
+
access=access,
|
|
91
|
+
readiness=readiness,
|
|
75
92
|
cursor=cursor,
|
|
76
93
|
timeout=timeout,
|
|
77
94
|
headers=headers,
|
|
@@ -81,7 +98,7 @@ class AccountApiKeysResource:
|
|
|
81
98
|
|
|
82
99
|
async def create(
|
|
83
100
|
self,
|
|
84
|
-
body:
|
|
101
|
+
body: CreateAccountApiKey,
|
|
85
102
|
*,
|
|
86
103
|
idempotency_key: str | None = None,
|
|
87
104
|
timeout: float | None = None,
|
|
@@ -7,6 +7,7 @@ import builtins
|
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
9
|
from authpi_admin.generated.models import (
|
|
10
|
+
CreateAuthMethodInput,
|
|
10
11
|
IssuerAuthMethod,
|
|
11
12
|
)
|
|
12
13
|
from authpi_admin.http_client import HttpClient
|
|
@@ -44,6 +45,7 @@ class AuthMethodsResource:
|
|
|
44
45
|
data=items,
|
|
45
46
|
has_more=data.get("has_more", False) if data else False,
|
|
46
47
|
next_cursor=data.get("next_cursor") if data else None,
|
|
48
|
+
invalid_count=data.get("invalid_count") if data else None,
|
|
47
49
|
)
|
|
48
50
|
|
|
49
51
|
async def list_all(
|
|
@@ -63,7 +65,7 @@ class AuthMethodsResource:
|
|
|
63
65
|
|
|
64
66
|
async def create(
|
|
65
67
|
self,
|
|
66
|
-
body:
|
|
68
|
+
body: CreateAuthMethodInput,
|
|
67
69
|
*,
|
|
68
70
|
idempotency_key: str | None = None,
|
|
69
71
|
timeout: float | None = None,
|
|
@@ -8,8 +8,8 @@ from typing import Any
|
|
|
8
8
|
|
|
9
9
|
from authpi_admin.generated.models import (
|
|
10
10
|
Client,
|
|
11
|
+
ClientListItem,
|
|
11
12
|
IssuerClientsCreateResponse,
|
|
12
|
-
IssuerClientsListItem,
|
|
13
13
|
IssuerClientsRotateSecretResponse,
|
|
14
14
|
)
|
|
15
15
|
from authpi_admin.http_client import HttpClient
|
|
@@ -28,22 +28,31 @@ class ClientsResource:
|
|
|
28
28
|
|
|
29
29
|
async def list(
|
|
30
30
|
self,
|
|
31
|
+
q: str | None = None,
|
|
32
|
+
status: str | None = None,
|
|
33
|
+
application_type: str | None = None,
|
|
34
|
+
readiness: str | None = None,
|
|
31
35
|
limit: int | None = None,
|
|
32
36
|
cursor: str | None = None,
|
|
33
|
-
status: str | None = None,
|
|
34
37
|
name: str | None = None,
|
|
35
38
|
*,
|
|
36
39
|
timeout: float | None = None,
|
|
37
40
|
headers: dict[str, str] | None = None,
|
|
38
|
-
) -> Page[
|
|
41
|
+
) -> Page[ClientListItem]:
|
|
39
42
|
"""List Clients"""
|
|
40
43
|
query: dict[str, Any] = {}
|
|
44
|
+
if q is not None:
|
|
45
|
+
query["q"] = q
|
|
46
|
+
if status is not None:
|
|
47
|
+
query["status"] = status
|
|
48
|
+
if application_type is not None:
|
|
49
|
+
query["application_type"] = application_type
|
|
50
|
+
if readiness is not None:
|
|
51
|
+
query["readiness"] = readiness
|
|
41
52
|
if limit is not None:
|
|
42
53
|
query["limit"] = limit
|
|
43
54
|
if cursor is not None:
|
|
44
55
|
query["cursor"] = cursor
|
|
45
|
-
if status is not None:
|
|
46
|
-
query["status"] = status
|
|
47
56
|
if name is not None:
|
|
48
57
|
query["name"] = name
|
|
49
58
|
resp = await self._client.request(
|
|
@@ -54,27 +63,34 @@ class ClientsResource:
|
|
|
54
63
|
headers=headers,
|
|
55
64
|
)
|
|
56
65
|
data = resp.data
|
|
57
|
-
items = [
|
|
66
|
+
items = [ClientListItem(**item) for item in data.get("data", [])] if data else []
|
|
58
67
|
return Page(
|
|
59
68
|
data=items,
|
|
60
69
|
has_more=data.get("has_more", False) if data else False,
|
|
61
70
|
next_cursor=data.get("next_cursor") if data else None,
|
|
71
|
+
invalid_count=data.get("invalid_count") if data else None,
|
|
62
72
|
)
|
|
63
73
|
|
|
64
74
|
async def list_all(
|
|
65
75
|
self,
|
|
66
|
-
|
|
76
|
+
q: str | None = None,
|
|
67
77
|
status: str | None = None,
|
|
78
|
+
application_type: str | None = None,
|
|
79
|
+
readiness: str | None = None,
|
|
80
|
+
limit: int | None = None,
|
|
68
81
|
name: str | None = None,
|
|
69
82
|
*,
|
|
70
83
|
timeout: float | None = None,
|
|
71
84
|
headers: dict[str, str] | None = None,
|
|
72
|
-
) -> AsyncIterator[
|
|
85
|
+
) -> AsyncIterator[ClientListItem]:
|
|
73
86
|
"""Auto-paginating iterator over all clients."""
|
|
74
|
-
async def _fetch(cursor: str | None = None) -> Page[
|
|
87
|
+
async def _fetch(cursor: str | None = None) -> Page[ClientListItem]:
|
|
75
88
|
return await self.list(
|
|
76
|
-
|
|
89
|
+
q=q,
|
|
77
90
|
status=status,
|
|
91
|
+
application_type=application_type,
|
|
92
|
+
readiness=readiness,
|
|
93
|
+
limit=limit,
|
|
78
94
|
name=name,
|
|
79
95
|
cursor=cursor,
|
|
80
96
|
timeout=timeout,
|
|
@@ -7,7 +7,9 @@ import builtins
|
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
9
|
from authpi_admin.generated.models import (
|
|
10
|
+
CreateIssuerInput,
|
|
10
11
|
Issuer,
|
|
12
|
+
IssuerListItem,
|
|
11
13
|
)
|
|
12
14
|
from authpi_admin.http_client import HttpClient
|
|
13
15
|
from authpi_admin.http_client import require_object_body as _require_object_body
|
|
@@ -25,14 +27,26 @@ class IssuersResource:
|
|
|
25
27
|
|
|
26
28
|
async def list(
|
|
27
29
|
self,
|
|
30
|
+
q: str | None = None,
|
|
31
|
+
status: str | None = None,
|
|
32
|
+
access_mode: str | None = None,
|
|
33
|
+
readiness: str | None = None,
|
|
28
34
|
limit: int | None = None,
|
|
29
35
|
cursor: str | None = None,
|
|
30
36
|
*,
|
|
31
37
|
timeout: float | None = None,
|
|
32
38
|
headers: dict[str, str] | None = None,
|
|
33
|
-
) -> Page[
|
|
39
|
+
) -> Page[IssuerListItem]:
|
|
34
40
|
"""List Issuers"""
|
|
35
41
|
query: dict[str, Any] = {}
|
|
42
|
+
if q is not None:
|
|
43
|
+
query["q"] = q
|
|
44
|
+
if status is not None:
|
|
45
|
+
query["status"] = status
|
|
46
|
+
if access_mode is not None:
|
|
47
|
+
query["access_mode"] = access_mode
|
|
48
|
+
if readiness is not None:
|
|
49
|
+
query["readiness"] = readiness
|
|
36
50
|
if limit is not None:
|
|
37
51
|
query["limit"] = limit
|
|
38
52
|
if cursor is not None:
|
|
@@ -45,23 +59,32 @@ class IssuersResource:
|
|
|
45
59
|
headers=headers,
|
|
46
60
|
)
|
|
47
61
|
data = resp.data
|
|
48
|
-
items = [
|
|
62
|
+
items = [IssuerListItem(**item) for item in data.get("data", [])] if data else []
|
|
49
63
|
return Page(
|
|
50
64
|
data=items,
|
|
51
65
|
has_more=data.get("has_more", False) if data else False,
|
|
52
66
|
next_cursor=data.get("next_cursor") if data else None,
|
|
67
|
+
invalid_count=data.get("invalid_count") if data else None,
|
|
53
68
|
)
|
|
54
69
|
|
|
55
70
|
async def list_all(
|
|
56
71
|
self,
|
|
72
|
+
q: str | None = None,
|
|
73
|
+
status: str | None = None,
|
|
74
|
+
access_mode: str | None = None,
|
|
75
|
+
readiness: str | None = None,
|
|
57
76
|
limit: int | None = None,
|
|
58
77
|
*,
|
|
59
78
|
timeout: float | None = None,
|
|
60
79
|
headers: dict[str, str] | None = None,
|
|
61
|
-
) -> AsyncIterator[
|
|
80
|
+
) -> AsyncIterator[IssuerListItem]:
|
|
62
81
|
"""Auto-paginating iterator over all issuers."""
|
|
63
|
-
async def _fetch(cursor: str | None = None) -> Page[
|
|
82
|
+
async def _fetch(cursor: str | None = None) -> Page[IssuerListItem]:
|
|
64
83
|
return await self.list(
|
|
84
|
+
q=q,
|
|
85
|
+
status=status,
|
|
86
|
+
access_mode=access_mode,
|
|
87
|
+
readiness=readiness,
|
|
65
88
|
limit=limit,
|
|
66
89
|
cursor=cursor,
|
|
67
90
|
timeout=timeout,
|
|
@@ -72,7 +95,7 @@ class IssuersResource:
|
|
|
72
95
|
|
|
73
96
|
async def create(
|
|
74
97
|
self,
|
|
75
|
-
body:
|
|
98
|
+
body: CreateIssuerInput,
|
|
76
99
|
*,
|
|
77
100
|
idempotency_key: str | None = None,
|
|
78
101
|
timeout: float | None = None,
|
{authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/organization_api_keys.py
RENAMED
|
@@ -7,8 +7,8 @@ import builtins
|
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
9
|
from authpi_admin.generated.models import (
|
|
10
|
+
ApiKeyListItem,
|
|
10
11
|
CreateApiKeyResponse,
|
|
11
|
-
OrganizationApiKeysListItem,
|
|
12
12
|
)
|
|
13
13
|
from authpi_admin.http_client import HttpClient
|
|
14
14
|
from authpi_admin.http_client import require_object_body as _require_object_body
|
|
@@ -27,19 +27,28 @@ class OrganizationApiKeysResource:
|
|
|
27
27
|
self,
|
|
28
28
|
limit: int | None = None,
|
|
29
29
|
cursor: str | None = None,
|
|
30
|
+
q: str | None = None,
|
|
30
31
|
status: str | None = None,
|
|
32
|
+
access: str | None = None,
|
|
33
|
+
readiness: str | None = None,
|
|
31
34
|
*,
|
|
32
35
|
timeout: float | None = None,
|
|
33
36
|
headers: dict[str, str] | None = None,
|
|
34
|
-
) -> Page[
|
|
37
|
+
) -> Page[ApiKeyListItem]:
|
|
35
38
|
"""List API Keys"""
|
|
36
39
|
query: dict[str, Any] = {}
|
|
37
40
|
if limit is not None:
|
|
38
41
|
query["limit"] = limit
|
|
39
42
|
if cursor is not None:
|
|
40
43
|
query["cursor"] = cursor
|
|
44
|
+
if q is not None:
|
|
45
|
+
query["q"] = q
|
|
41
46
|
if status is not None:
|
|
42
47
|
query["status"] = status
|
|
48
|
+
if access is not None:
|
|
49
|
+
query["access"] = access
|
|
50
|
+
if readiness is not None:
|
|
51
|
+
query["readiness"] = readiness
|
|
43
52
|
resp = await self._client.request(
|
|
44
53
|
"GET",
|
|
45
54
|
self._base_path,
|
|
@@ -48,26 +57,33 @@ class OrganizationApiKeysResource:
|
|
|
48
57
|
headers=headers,
|
|
49
58
|
)
|
|
50
59
|
data = resp.data
|
|
51
|
-
items = [
|
|
60
|
+
items = [ApiKeyListItem(**item) for item in data.get("data", [])] if data else []
|
|
52
61
|
return Page(
|
|
53
62
|
data=items,
|
|
54
63
|
has_more=data.get("has_more", False) if data else False,
|
|
55
64
|
next_cursor=data.get("next_cursor") if data else None,
|
|
65
|
+
invalid_count=data.get("invalid_count") if data else None,
|
|
56
66
|
)
|
|
57
67
|
|
|
58
68
|
async def list_all(
|
|
59
69
|
self,
|
|
60
70
|
limit: int | None = None,
|
|
71
|
+
q: str | None = None,
|
|
61
72
|
status: str | None = None,
|
|
73
|
+
access: str | None = None,
|
|
74
|
+
readiness: str | None = None,
|
|
62
75
|
*,
|
|
63
76
|
timeout: float | None = None,
|
|
64
77
|
headers: dict[str, str] | None = None,
|
|
65
|
-
) -> AsyncIterator[
|
|
78
|
+
) -> AsyncIterator[ApiKeyListItem]:
|
|
66
79
|
"""Auto-paginating iterator over all organization_api_keys."""
|
|
67
|
-
async def _fetch(cursor: str | None = None) -> Page[
|
|
80
|
+
async def _fetch(cursor: str | None = None) -> Page[ApiKeyListItem]:
|
|
68
81
|
return await self.list(
|
|
69
82
|
limit=limit,
|
|
83
|
+
q=q,
|
|
70
84
|
status=status,
|
|
85
|
+
access=access,
|
|
86
|
+
readiness=readiness,
|
|
71
87
|
cursor=cursor,
|
|
72
88
|
timeout=timeout,
|
|
73
89
|
headers=headers,
|
|
@@ -165,6 +165,27 @@ async def test_explicit_account_id_skips_resolution(httpx_mock):
|
|
|
165
165
|
assert all(r.url.path != "/v1/me" for r in httpx_mock.get_requests())
|
|
166
166
|
|
|
167
167
|
|
|
168
|
+
async def test_issuer_list_sends_search_and_operational_filters(httpx_mock):
|
|
169
|
+
httpx_mock.add_response(json={"data": [], "has_more": False, "invalid_count": 2})
|
|
170
|
+
|
|
171
|
+
async with AuthPIAdmin(api_key=("key_test", "s3cret"), account_id="acc_explicit") as admin:
|
|
172
|
+
page = await admin.issuers.list(
|
|
173
|
+
q="production",
|
|
174
|
+
status="active",
|
|
175
|
+
access_mode="approval",
|
|
176
|
+
readiness="review",
|
|
177
|
+
limit=25,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
request = httpx_mock.get_requests()[0]
|
|
181
|
+
assert request.url.params["q"] == "production"
|
|
182
|
+
assert request.url.params["status"] == "active"
|
|
183
|
+
assert request.url.params["access_mode"] == "approval"
|
|
184
|
+
assert request.url.params["readiness"] == "review"
|
|
185
|
+
assert request.url.params["limit"] == "25"
|
|
186
|
+
assert page.invalid_count == 2
|
|
187
|
+
|
|
188
|
+
|
|
168
189
|
async def test_whoami_returns_caller_identity(httpx_mock):
|
|
169
190
|
httpx_mock.add_response(url="https://api.authpi.com/v1/me", json=_ME_SINGLE)
|
|
170
191
|
|
|
@@ -6,15 +6,17 @@ from authpi_admin.pagination import Page, auto_paginate
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def test_page_creation():
|
|
9
|
-
page = Page(data=[1, 2, 3], has_more=True, next_cursor="abc")
|
|
9
|
+
page = Page(data=[1, 2, 3], has_more=True, next_cursor="abc", invalid_count=2)
|
|
10
10
|
assert page.data == [1, 2, 3]
|
|
11
11
|
assert page.has_more is True
|
|
12
12
|
assert page.next_cursor == "abc"
|
|
13
|
+
assert page.invalid_count == 2
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
def test_page_no_more():
|
|
16
17
|
page = Page(data=[1], has_more=False)
|
|
17
18
|
assert page.next_cursor is None
|
|
19
|
+
assert page.invalid_count is None
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
def test_page_empty():
|
|
@@ -20,3 +20,12 @@ def test_types_module_all_is_schema_only():
|
|
|
20
20
|
assert "Webhook" in types.__all__
|
|
21
21
|
assert "Any" not in types.__all__
|
|
22
22
|
assert "BaseModel" not in types.__all__
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def test_renamed_generated_models_keep_compatibility_aliases():
|
|
26
|
+
assert models.IssuerClientsListItem is models.ClientListItem
|
|
27
|
+
assert models.ApiKeysListItem is models.ApiKeyListItem
|
|
28
|
+
assert models.OrganizationApiKeysListItem is models.ApiKeyListItem
|
|
29
|
+
assert "IssuerClientsListItem" in models.__all__
|
|
30
|
+
assert "ApiKeysListItem" in models.__all__
|
|
31
|
+
assert "OrganizationApiKeysListItem" in models.__all__
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/account_tokens.py
RENAMED
|
File without changes
|
{authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/issuer_sessions.py
RENAMED
|
File without changes
|
|
File without changes
|
{authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/resources/payment_methods.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{authpi_admin-1.2.0 → authpi_admin-1.3.0}/authpi_admin/generated/scopes/organization_scope.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|