diff --git a/.fern/metadata.json b/.fern/metadata.json
index b992783..b564d36 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -23,10 +23,10 @@
}
]
},
- "originGitCommit": "a9fc73b97dcfa602bff97a7d41d980a55c9c9030",
+ "originGitCommit": "8cfe954dda14329fc30a4f80b915db0acf608382",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
- "requestedVersion": "1.3.2",
+ "requestedVersion": "1.3.3",
"ciProvider": "github",
- "sdkVersion": "1.3.2"
+ "sdkVersion": "1.3.3"
}
\ No newline at end of file
diff --git a/.fern/replay.lock b/.fern/replay.lock
index ecacd7a..ba9adcc 100644
--- a/.fern/replay.lock
+++ b/.fern/replay.lock
@@ -30,5 +30,11 @@ generations:
cli_version: unknown
generator_versions:
fernapi/fern-python-sdk: 5.14.20
-current_generation: ea68cffbaaa98a12680e7fdac2ff6cd1740116d2
+ - commit_sha: 3bcc19082dd0caee045848158261be377bf337d5
+ tree_hash: 3685c1bd781d961c123f6a19637b4d0296e11224
+ timestamp: 2026-08-10T10:27:54.495Z
+ cli_version: unknown
+ generator_versions:
+ fernapi/fern-python-sdk: 5.14.20
+current_generation: 3bcc19082dd0caee045848158261be377bf337d5
patches: []
diff --git a/poetry.lock b/poetry.lock
index 8acb245..c1f782d 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -763,14 +763,14 @@ files = [
[[package]]
name = "packaging"
-version = "26.2"
+version = "26.3"
description = "Core utilities for Python packages"
optional = false
-python-versions = ">=3.8"
+python-versions = ">=3.9"
groups = ["dev"]
files = [
- {file = "packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e"},
- {file = "packaging-26.2.tar.gz", hash = "sha256:ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661"},
+ {file = "packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c"},
+ {file = "packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79"},
]
[[package]]
@@ -1292,14 +1292,14 @@ files = [
[[package]]
name = "types-python-dateutil"
-version = "2.9.0.20260716"
+version = "2.9.0.20260807"
description = "Typing stubs for python-dateutil"
optional = false
python-versions = ">=3.10"
groups = ["dev"]
files = [
- {file = "types_python_dateutil-2.9.0.20260716-py3-none-any.whl", hash = "sha256:1ae41d51a5c5f6bbeeb7f1f34df7086d55ff1605cf88d2ed71a7a276e1a7794e"},
- {file = "types_python_dateutil-2.9.0.20260716.tar.gz", hash = "sha256:1d55d1c3024bdb4861bb6a6622c9ec800c433d87bdc5b16fb84cdd0eed4ef2cb"},
+ {file = "types_python_dateutil-2.9.0.20260807-py3-none-any.whl", hash = "sha256:54aa3707350ed7a9cc0776fd2f6739679d6967d11b40150985e81edcb86df4db"},
+ {file = "types_python_dateutil-2.9.0.20260807.tar.gz", hash = "sha256:e0b8a90d464c8684c66b7b8e4556d9074afdddcc56ca45323f0987134f9e7034"},
]
[[package]]
@@ -1316,18 +1316,18 @@ files = [
[[package]]
name = "typing-inspection"
-version = "0.4.2"
+version = "0.4.3"
description = "Runtime typing introspection tools"
optional = false
-python-versions = ">=3.9"
+python-versions = ">=3.10"
groups = ["main"]
files = [
- {file = "typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7"},
- {file = "typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464"},
+ {file = "typing_inspection-0.4.3-py3-none-any.whl", hash = "sha256:5f42b23858a91e0b4ef521f5418f03a0da3c9216fd2995ef5e73463100e676cd"},
+ {file = "typing_inspection-0.4.3.tar.gz", hash = "sha256:c5f9ec1530b5c1e2c9bc34a84d9a3466ed1b2f3f2fa9f901368d9c5596210e4d"},
]
[package.dependencies]
-typing-extensions = ">=4.12.0"
+typing-extensions = ">=4.15.0"
[[package]]
name = "wasmtime"
diff --git a/pyproject.toml b/pyproject.toml
index f7cb604..1102244 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ dynamic = ["version"]
[tool.poetry]
name = "schematichq"
-version = "1.3.2"
+version = "1.3.3"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 7e336df..375ec45 100644
--- a/reference.md
+++ b/reference.md
@@ -10403,6 +10403,65 @@ client.companies.list_entity_key_definitions(
+
+
+
+
+client.companies.delete_entity_key_definition(...) -> DeleteEntityKeyDefinitionResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from schematic import Schematic
+from schematic.environment import SchematicEnvironment
+
+client = Schematic(
+ api_key="",
+ environment=SchematicEnvironment.DEFAULT,
+)
+
+client.companies.delete_entity_key_definition(
+ entity_key_definition_id="entity_key_definition_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**entity_key_definition_id:** `str` — entity_key_definition_id
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -10500,6 +10559,92 @@ client.companies.count_entity_key_definitions(
+
+
+
+
+client.companies.count_entity_keys(...) -> CountEntityKeysResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from schematic import Schematic
+from schematic.environment import SchematicEnvironment
+
+client = Schematic(
+ api_key="",
+ environment=SchematicEnvironment.DEFAULT,
+)
+
+client.companies.count_entity_keys(
+ definition_id="definition_id",
+ entity_type="company",
+ limit=1000000,
+ offset=1000000,
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**definition_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**entity_type:** `typing.Optional[EntityType]`
+
+
+
+
+
+-
+
+**limit:** `typing.Optional[int]` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `typing.Optional[int]` — Page offset (default 0)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
diff --git a/src/schematic/__init__.py b/src/schematic/__init__.py
index c626e7d..a5c459d 100644
--- a/src/schematic/__init__.py
+++ b/src/schematic/__init__.py
@@ -58,6 +58,7 @@
BillingProductPriceResponseData,
BillingProductPriceTierResponseData,
BillingProductPricing,
+ BillingProductRecordResponseData,
BillingProductResponseData,
BillingProviderType,
BillingStrategy,
@@ -107,6 +108,8 @@
CompanyDetailResponseData,
CompanyEventPeriodMetricsResponseData,
CompanyFeatureUsageExportMetadata,
+ CompanyFeatureUsageExportMetadataSortOrderDirection,
+ CompanyFeatureUsageExportMetadataVisibleColumnsItem,
CompanyLedgerResponseData,
CompanyMatchingCriteria,
CompanyMembershipDetailResponseData,
@@ -194,6 +197,7 @@
DataExportMetadata,
DataExportMetadata_AuditLog,
DataExportMetadata_CompanyFeatureUsage,
+ DataExportMetadata_Event,
DataExportOutputFileType,
DataExportResponseData,
DataExportStatus,
@@ -229,6 +233,8 @@
EventBodyInference,
EventBodyTrack,
EventDetailResponseData,
+ EventExportMetadata,
+ EventExportMetadataEventTypesItem,
EventResponseData,
EventStatus,
EventSummaryResponseData,
@@ -563,6 +569,8 @@
CountCompaniesResponse,
CountEntityKeyDefinitionsParams,
CountEntityKeyDefinitionsResponse,
+ CountEntityKeysParams,
+ CountEntityKeysResponse,
CountEntityTraitDefinitionsParams,
CountEntityTraitDefinitionsResponse,
CountPlanTraitsParams,
@@ -575,6 +583,7 @@
DeleteCompanyMembershipResponse,
DeleteCompanyParams,
DeleteCompanyResponse,
+ DeleteEntityKeyDefinitionResponse,
DeleteUserByKeysResponse,
DeleteUserResponse,
GetActiveCompanySubscriptionParams,
@@ -915,6 +924,7 @@
"BillingProductPriceResponseData": ".types",
"BillingProductPriceTierResponseData": ".types",
"BillingProductPricing": ".types",
+ "BillingProductRecordResponseData": ".types",
"BillingProductResponseData": ".types",
"BillingProviderType": ".types",
"BillingStrategy": ".types",
@@ -970,6 +980,8 @@
"CompanyDetailResponseData": ".types",
"CompanyEventPeriodMetricsResponseData": ".types",
"CompanyFeatureUsageExportMetadata": ".types",
+ "CompanyFeatureUsageExportMetadataSortOrderDirection": ".types",
+ "CompanyFeatureUsageExportMetadataVisibleColumnsItem": ".types",
"CompanyLedgerResponseData": ".types",
"CompanyMatchingCriteria": ".types",
"CompanyMembershipDetailResponseData": ".types",
@@ -1036,6 +1048,8 @@
"CountCustomersResponse": ".billing",
"CountEntityKeyDefinitionsParams": ".companies",
"CountEntityKeyDefinitionsResponse": ".companies",
+ "CountEntityKeysParams": ".companies",
+ "CountEntityKeysResponse": ".companies",
"CountEntityTraitDefinitionsParams": ".companies",
"CountEntityTraitDefinitionsResponse": ".companies",
"CountFeatureCompaniesParams": ".entitlements",
@@ -1143,6 +1157,7 @@
"DataExportMetadata": ".types",
"DataExportMetadata_AuditLog": ".types",
"DataExportMetadata_CompanyFeatureUsage": ".types",
+ "DataExportMetadata_Event": ".types",
"DataExportOutputFileType": ".types",
"DataExportResponseData": ".types",
"DataExportStatus": ".types",
@@ -1166,6 +1181,7 @@
"DeleteCompanyResponse": ".companies",
"DeleteComponentResponse": ".components",
"DeleteCreditBundleResponse": ".credits",
+ "DeleteEntityKeyDefinitionResponse": ".companies",
"DeleteEnvironmentResponse": ".accounts",
"DeleteFeatureResponse": ".features",
"DeleteFlagResponse": ".features",
@@ -1208,6 +1224,8 @@
"EventBodyInference": ".types",
"EventBodyTrack": ".types",
"EventDetailResponseData": ".types",
+ "EventExportMetadata": ".types",
+ "EventExportMetadataEventTypesItem": ".types",
"EventResponseData": ".types",
"EventStatus": ".types",
"EventSummaryResponseData": ".types",
@@ -1766,6 +1784,7 @@ def __dir__():
"BillingProductPriceResponseData",
"BillingProductPriceTierResponseData",
"BillingProductPricing",
+ "BillingProductRecordResponseData",
"BillingProductResponseData",
"BillingProviderType",
"BillingStrategy",
@@ -1821,6 +1840,8 @@ def __dir__():
"CompanyDetailResponseData",
"CompanyEventPeriodMetricsResponseData",
"CompanyFeatureUsageExportMetadata",
+ "CompanyFeatureUsageExportMetadataSortOrderDirection",
+ "CompanyFeatureUsageExportMetadataVisibleColumnsItem",
"CompanyLedgerResponseData",
"CompanyMatchingCriteria",
"CompanyMembershipDetailResponseData",
@@ -1887,6 +1908,8 @@ def __dir__():
"CountCustomersResponse",
"CountEntityKeyDefinitionsParams",
"CountEntityKeyDefinitionsResponse",
+ "CountEntityKeysParams",
+ "CountEntityKeysResponse",
"CountEntityTraitDefinitionsParams",
"CountEntityTraitDefinitionsResponse",
"CountFeatureCompaniesParams",
@@ -1994,6 +2017,7 @@ def __dir__():
"DataExportMetadata",
"DataExportMetadata_AuditLog",
"DataExportMetadata_CompanyFeatureUsage",
+ "DataExportMetadata_Event",
"DataExportOutputFileType",
"DataExportResponseData",
"DataExportStatus",
@@ -2017,6 +2041,7 @@ def __dir__():
"DeleteCompanyResponse",
"DeleteComponentResponse",
"DeleteCreditBundleResponse",
+ "DeleteEntityKeyDefinitionResponse",
"DeleteEnvironmentResponse",
"DeleteFeatureResponse",
"DeleteFlagResponse",
@@ -2059,6 +2084,8 @@ def __dir__():
"EventBodyInference",
"EventBodyTrack",
"EventDetailResponseData",
+ "EventExportMetadata",
+ "EventExportMetadataEventTypesItem",
"EventResponseData",
"EventStatus",
"EventSummaryResponseData",
diff --git a/src/schematic/companies/__init__.py b/src/schematic/companies/__init__.py
index d5505d3..0160d0a 100644
--- a/src/schematic/companies/__init__.py
+++ b/src/schematic/companies/__init__.py
@@ -11,6 +11,8 @@
CountCompaniesResponse,
CountEntityKeyDefinitionsParams,
CountEntityKeyDefinitionsResponse,
+ CountEntityKeysParams,
+ CountEntityKeysResponse,
CountEntityTraitDefinitionsParams,
CountEntityTraitDefinitionsResponse,
CountPlanTraitsParams,
@@ -23,6 +25,7 @@
DeleteCompanyMembershipResponse,
DeleteCompanyParams,
DeleteCompanyResponse,
+ DeleteEntityKeyDefinitionResponse,
DeleteUserByKeysResponse,
DeleteUserResponse,
GetActiveCompanySubscriptionParams,
@@ -70,6 +73,8 @@
"CountCompaniesResponse": ".types",
"CountEntityKeyDefinitionsParams": ".types",
"CountEntityKeyDefinitionsResponse": ".types",
+ "CountEntityKeysParams": ".types",
+ "CountEntityKeysResponse": ".types",
"CountEntityTraitDefinitionsParams": ".types",
"CountEntityTraitDefinitionsResponse": ".types",
"CountPlanTraitsParams": ".types",
@@ -82,6 +87,7 @@
"DeleteCompanyMembershipResponse": ".types",
"DeleteCompanyParams": ".types",
"DeleteCompanyResponse": ".types",
+ "DeleteEntityKeyDefinitionResponse": ".types",
"DeleteUserByKeysResponse": ".types",
"DeleteUserResponse": ".types",
"GetActiveCompanySubscriptionParams": ".types",
@@ -152,6 +158,8 @@ def __dir__():
"CountCompaniesResponse",
"CountEntityKeyDefinitionsParams",
"CountEntityKeyDefinitionsResponse",
+ "CountEntityKeysParams",
+ "CountEntityKeysResponse",
"CountEntityTraitDefinitionsParams",
"CountEntityTraitDefinitionsResponse",
"CountPlanTraitsParams",
@@ -164,6 +172,7 @@ def __dir__():
"DeleteCompanyMembershipResponse",
"DeleteCompanyParams",
"DeleteCompanyResponse",
+ "DeleteEntityKeyDefinitionResponse",
"DeleteUserByKeysResponse",
"DeleteUserResponse",
"GetActiveCompanySubscriptionParams",
diff --git a/src/schematic/companies/client.py b/src/schematic/companies/client.py
index 94a71ab..d772c11 100644
--- a/src/schematic/companies/client.py
+++ b/src/schematic/companies/client.py
@@ -16,6 +16,7 @@
from .raw_client import AsyncRawCompaniesClient, RawCompaniesClient
from .types.count_companies_response import CountCompaniesResponse
from .types.count_entity_key_definitions_response import CountEntityKeyDefinitionsResponse
+from .types.count_entity_keys_response import CountEntityKeysResponse
from .types.count_entity_trait_definitions_response import CountEntityTraitDefinitionsResponse
from .types.count_plan_traits_response import CountPlanTraitsResponse
from .types.count_users_response import CountUsersResponse
@@ -24,6 +25,7 @@
from .types.delete_company_by_keys_response import DeleteCompanyByKeysResponse
from .types.delete_company_membership_response import DeleteCompanyMembershipResponse
from .types.delete_company_response import DeleteCompanyResponse
+from .types.delete_entity_key_definition_response import DeleteEntityKeyDefinitionResponse
from .types.delete_user_by_keys_response import DeleteUserByKeysResponse
from .types.delete_user_response import DeleteUserResponse
from .types.get_active_company_subscription_response import GetActiveCompanySubscriptionResponse
@@ -998,6 +1000,39 @@ def list_entity_key_definitions(
)
return _response.data
+ def delete_entity_key_definition(
+ self, entity_key_definition_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> DeleteEntityKeyDefinitionResponse:
+ """
+ Parameters
+ ----------
+ entity_key_definition_id : str
+ entity_key_definition_id
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ DeleteEntityKeyDefinitionResponse
+ OK
+
+ Examples
+ --------
+ from schematic import Schematic
+
+ client = Schematic(
+ api_key="YOUR_API_KEY",
+ )
+ client.companies.delete_entity_key_definition(
+ entity_key_definition_id="entity_key_definition_id",
+ )
+ """
+ _response = self._raw_client.delete_entity_key_definition(
+ entity_key_definition_id, request_options=request_options
+ )
+ return _response.data
+
def count_entity_key_definitions(
self,
*,
@@ -1051,6 +1086,59 @@ def count_entity_key_definitions(
)
return _response.data
+ def count_entity_keys(
+ self,
+ *,
+ definition_id: typing.Optional[str] = None,
+ entity_type: typing.Optional[EntityType] = None,
+ limit: typing.Optional[int] = None,
+ offset: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> CountEntityKeysResponse:
+ """
+ Parameters
+ ----------
+ definition_id : typing.Optional[str]
+
+ entity_type : typing.Optional[EntityType]
+
+ limit : typing.Optional[int]
+ Page limit (default 100)
+
+ offset : typing.Optional[int]
+ Page offset (default 0)
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ CountEntityKeysResponse
+ OK
+
+ Examples
+ --------
+ from schematic import Schematic
+
+ client = Schematic(
+ api_key="YOUR_API_KEY",
+ )
+ client.companies.count_entity_keys(
+ definition_id="definition_id",
+ entity_type="company",
+ limit=1000000,
+ offset=1000000,
+ )
+ """
+ _response = self._raw_client.count_entity_keys(
+ definition_id=definition_id,
+ entity_type=entity_type,
+ limit=limit,
+ offset=offset,
+ request_options=request_options,
+ )
+ return _response.data
+
def list_entity_trait_definitions(
self,
*,
@@ -3212,6 +3300,47 @@ async def main() -> None:
)
return _response.data
+ async def delete_entity_key_definition(
+ self, entity_key_definition_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> DeleteEntityKeyDefinitionResponse:
+ """
+ Parameters
+ ----------
+ entity_key_definition_id : str
+ entity_key_definition_id
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ DeleteEntityKeyDefinitionResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from schematic import AsyncSchematic
+
+ client = AsyncSchematic(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.companies.delete_entity_key_definition(
+ entity_key_definition_id="entity_key_definition_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.delete_entity_key_definition(
+ entity_key_definition_id, request_options=request_options
+ )
+ return _response.data
+
async def count_entity_key_definitions(
self,
*,
@@ -3273,6 +3402,67 @@ async def main() -> None:
)
return _response.data
+ async def count_entity_keys(
+ self,
+ *,
+ definition_id: typing.Optional[str] = None,
+ entity_type: typing.Optional[EntityType] = None,
+ limit: typing.Optional[int] = None,
+ offset: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> CountEntityKeysResponse:
+ """
+ Parameters
+ ----------
+ definition_id : typing.Optional[str]
+
+ entity_type : typing.Optional[EntityType]
+
+ limit : typing.Optional[int]
+ Page limit (default 100)
+
+ offset : typing.Optional[int]
+ Page offset (default 0)
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ CountEntityKeysResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from schematic import AsyncSchematic
+
+ client = AsyncSchematic(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.companies.count_entity_keys(
+ definition_id="definition_id",
+ entity_type="company",
+ limit=1000000,
+ offset=1000000,
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.count_entity_keys(
+ definition_id=definition_id,
+ entity_type=entity_type,
+ limit=limit,
+ offset=offset,
+ request_options=request_options,
+ )
+ return _response.data
+
async def list_entity_trait_definitions(
self,
*,
diff --git a/src/schematic/companies/raw_client.py b/src/schematic/companies/raw_client.py
index 8b7267a..9acaae2 100644
--- a/src/schematic/companies/raw_client.py
+++ b/src/schematic/companies/raw_client.py
@@ -28,6 +28,7 @@
from ..types.update_plan_trait_trait_request_body import UpdatePlanTraitTraitRequestBody
from .types.count_companies_response import CountCompaniesResponse
from .types.count_entity_key_definitions_response import CountEntityKeyDefinitionsResponse
+from .types.count_entity_keys_response import CountEntityKeysResponse
from .types.count_entity_trait_definitions_response import CountEntityTraitDefinitionsResponse
from .types.count_plan_traits_response import CountPlanTraitsResponse
from .types.count_users_response import CountUsersResponse
@@ -36,6 +37,7 @@
from .types.delete_company_by_keys_response import DeleteCompanyByKeysResponse
from .types.delete_company_membership_response import DeleteCompanyMembershipResponse
from .types.delete_company_response import DeleteCompanyResponse
+from .types.delete_entity_key_definition_response import DeleteEntityKeyDefinitionResponse
from .types.delete_user_by_keys_response import DeleteUserByKeysResponse
from .types.delete_user_response import DeleteUserResponse
from .types.get_active_company_subscription_response import GetActiveCompanySubscriptionResponse
@@ -2082,6 +2084,106 @@ def list_entity_key_definitions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
+ def delete_entity_key_definition(
+ self, entity_key_definition_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[DeleteEntityKeyDefinitionResponse]:
+ """
+ Parameters
+ ----------
+ entity_key_definition_id : str
+ entity_key_definition_id
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[DeleteEntityKeyDefinitionResponse]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"entity-key-definitions/{encode_path_param(entity_key_definition_id)}",
+ method="DELETE",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ DeleteEntityKeyDefinitionResponse,
+ parse_obj_as(
+ type_=DeleteEntityKeyDefinitionResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
def count_entity_key_definitions(
self,
*,
@@ -2205,6 +2307,125 @@ def count_entity_key_definitions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
+ def count_entity_keys(
+ self,
+ *,
+ definition_id: typing.Optional[str] = None,
+ entity_type: typing.Optional[EntityType] = None,
+ limit: typing.Optional[int] = None,
+ offset: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[CountEntityKeysResponse]:
+ """
+ Parameters
+ ----------
+ definition_id : typing.Optional[str]
+
+ entity_type : typing.Optional[EntityType]
+
+ limit : typing.Optional[int]
+ Page limit (default 100)
+
+ offset : typing.Optional[int]
+ Page offset (default 0)
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[CountEntityKeysResponse]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "entity-keys/count",
+ method="GET",
+ params={
+ "definition_id": definition_id,
+ "entity_type": entity_type,
+ "limit": limit,
+ "offset": offset,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ CountEntityKeysResponse,
+ parse_obj_as(
+ type_=CountEntityKeysResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
def list_entity_trait_definitions(
self,
*,
@@ -6691,6 +6912,106 @@ async def list_entity_key_definitions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
+ async def delete_entity_key_definition(
+ self, entity_key_definition_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[DeleteEntityKeyDefinitionResponse]:
+ """
+ Parameters
+ ----------
+ entity_key_definition_id : str
+ entity_key_definition_id
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[DeleteEntityKeyDefinitionResponse]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"entity-key-definitions/{encode_path_param(entity_key_definition_id)}",
+ method="DELETE",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ DeleteEntityKeyDefinitionResponse,
+ parse_obj_as(
+ type_=DeleteEntityKeyDefinitionResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
async def count_entity_key_definitions(
self,
*,
@@ -6814,6 +7135,125 @@ async def count_entity_key_definitions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
+ async def count_entity_keys(
+ self,
+ *,
+ definition_id: typing.Optional[str] = None,
+ entity_type: typing.Optional[EntityType] = None,
+ limit: typing.Optional[int] = None,
+ offset: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[CountEntityKeysResponse]:
+ """
+ Parameters
+ ----------
+ definition_id : typing.Optional[str]
+
+ entity_type : typing.Optional[EntityType]
+
+ limit : typing.Optional[int]
+ Page limit (default 100)
+
+ offset : typing.Optional[int]
+ Page offset (default 0)
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[CountEntityKeysResponse]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "entity-keys/count",
+ method="GET",
+ params={
+ "definition_id": definition_id,
+ "entity_type": entity_type,
+ "limit": limit,
+ "offset": offset,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ CountEntityKeysResponse,
+ parse_obj_as(
+ type_=CountEntityKeysResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
async def list_entity_trait_definitions(
self,
*,
diff --git a/src/schematic/companies/types/__init__.py b/src/schematic/companies/types/__init__.py
index c4694e1..a5e305f 100644
--- a/src/schematic/companies/types/__init__.py
+++ b/src/schematic/companies/types/__init__.py
@@ -10,6 +10,8 @@
from .count_companies_response import CountCompaniesResponse
from .count_entity_key_definitions_params import CountEntityKeyDefinitionsParams
from .count_entity_key_definitions_response import CountEntityKeyDefinitionsResponse
+ from .count_entity_keys_params import CountEntityKeysParams
+ from .count_entity_keys_response import CountEntityKeysResponse
from .count_entity_trait_definitions_params import CountEntityTraitDefinitionsParams
from .count_entity_trait_definitions_response import CountEntityTraitDefinitionsResponse
from .count_plan_traits_params import CountPlanTraitsParams
@@ -22,6 +24,7 @@
from .delete_company_membership_response import DeleteCompanyMembershipResponse
from .delete_company_params import DeleteCompanyParams
from .delete_company_response import DeleteCompanyResponse
+ from .delete_entity_key_definition_response import DeleteEntityKeyDefinitionResponse
from .delete_user_by_keys_response import DeleteUserByKeysResponse
from .delete_user_response import DeleteUserResponse
from .get_active_company_subscription_params import GetActiveCompanySubscriptionParams
@@ -68,6 +71,8 @@
"CountCompaniesResponse": ".count_companies_response",
"CountEntityKeyDefinitionsParams": ".count_entity_key_definitions_params",
"CountEntityKeyDefinitionsResponse": ".count_entity_key_definitions_response",
+ "CountEntityKeysParams": ".count_entity_keys_params",
+ "CountEntityKeysResponse": ".count_entity_keys_response",
"CountEntityTraitDefinitionsParams": ".count_entity_trait_definitions_params",
"CountEntityTraitDefinitionsResponse": ".count_entity_trait_definitions_response",
"CountPlanTraitsParams": ".count_plan_traits_params",
@@ -80,6 +85,7 @@
"DeleteCompanyMembershipResponse": ".delete_company_membership_response",
"DeleteCompanyParams": ".delete_company_params",
"DeleteCompanyResponse": ".delete_company_response",
+ "DeleteEntityKeyDefinitionResponse": ".delete_entity_key_definition_response",
"DeleteUserByKeysResponse": ".delete_user_by_keys_response",
"DeleteUserResponse": ".delete_user_response",
"GetActiveCompanySubscriptionParams": ".get_active_company_subscription_params",
@@ -150,6 +156,8 @@ def __dir__():
"CountCompaniesResponse",
"CountEntityKeyDefinitionsParams",
"CountEntityKeyDefinitionsResponse",
+ "CountEntityKeysParams",
+ "CountEntityKeysResponse",
"CountEntityTraitDefinitionsParams",
"CountEntityTraitDefinitionsResponse",
"CountPlanTraitsParams",
@@ -162,6 +170,7 @@ def __dir__():
"DeleteCompanyMembershipResponse",
"DeleteCompanyParams",
"DeleteCompanyResponse",
+ "DeleteEntityKeyDefinitionResponse",
"DeleteUserByKeysResponse",
"DeleteUserResponse",
"GetActiveCompanySubscriptionParams",
diff --git a/src/schematic/companies/types/count_entity_keys_params.py b/src/schematic/companies/types/count_entity_keys_params.py
new file mode 100644
index 0000000..0196760
--- /dev/null
+++ b/src/schematic/companies/types/count_entity_keys_params.py
@@ -0,0 +1,34 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ...types.entity_type import EntityType
+
+
+class CountEntityKeysParams(UniversalBaseModel):
+ """
+ Input parameters
+ """
+
+ definition_id: typing.Optional[str] = None
+ entity_type: typing.Optional[EntityType] = None
+ limit: typing.Optional[int] = pydantic.Field(default=None)
+ """
+ Page limit (default 100)
+ """
+
+ offset: typing.Optional[int] = pydantic.Field(default=None)
+ """
+ Page offset (default 0)
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/companies/types/count_entity_keys_response.py b/src/schematic/companies/types/count_entity_keys_response.py
new file mode 100644
index 0000000..27e2964
--- /dev/null
+++ b/src/schematic/companies/types/count_entity_keys_response.py
@@ -0,0 +1,25 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ...types.count_response import CountResponse
+from .count_entity_keys_params import CountEntityKeysParams
+
+
+class CountEntityKeysResponse(UniversalBaseModel):
+ data: CountResponse
+ params: CountEntityKeysParams = pydantic.Field()
+ """
+ Input parameters
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/companies/types/delete_entity_key_definition_response.py b/src/schematic/companies/types/delete_entity_key_definition_response.py
new file mode 100644
index 0000000..b3afbbf
--- /dev/null
+++ b/src/schematic/companies/types/delete_entity_key_definition_response.py
@@ -0,0 +1,24 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ...types.delete_response import DeleteResponse
+
+
+class DeleteEntityKeyDefinitionResponse(UniversalBaseModel):
+ data: DeleteResponse
+ params: typing.Dict[str, typing.Any] = pydantic.Field()
+ """
+ Input parameters
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/core/client_wrapper.py b/src/schematic/core/client_wrapper.py
index 889f023..aa41bb8 100644
--- a/src/schematic/core/client_wrapper.py
+++ b/src/schematic/core/client_wrapper.py
@@ -29,12 +29,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform
headers: typing.Dict[str, str] = {
- "User-Agent": "schematichq/1.3.2",
+ "User-Agent": "schematichq/1.3.3",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "schematichq",
- "X-Fern-SDK-Version": "1.3.2",
+ "X-Fern-SDK-Version": "1.3.3",
**(self.get_custom_headers() or {}),
}
headers["X-Schematic-Api-Key"] = self.api_key
diff --git a/src/schematic/types/__init__.py b/src/schematic/types/__init__.py
index a129dde..5d7e08f 100644
--- a/src/schematic/types/__init__.py
+++ b/src/schematic/types/__init__.py
@@ -57,6 +57,7 @@
from .billing_product_price_response_data import BillingProductPriceResponseData
from .billing_product_price_tier_response_data import BillingProductPriceTierResponseData
from .billing_product_pricing import BillingProductPricing
+ from .billing_product_record_response_data import BillingProductRecordResponseData
from .billing_product_response_data import BillingProductResponseData
from .billing_provider_type import BillingProviderType
from .billing_strategy import BillingStrategy
@@ -106,6 +107,12 @@
from .company_detail_response_data import CompanyDetailResponseData
from .company_event_period_metrics_response_data import CompanyEventPeriodMetricsResponseData
from .company_feature_usage_export_metadata import CompanyFeatureUsageExportMetadata
+ from .company_feature_usage_export_metadata_sort_order_direction import (
+ CompanyFeatureUsageExportMetadataSortOrderDirection,
+ )
+ from .company_feature_usage_export_metadata_visible_columns_item import (
+ CompanyFeatureUsageExportMetadataVisibleColumnsItem,
+ )
from .company_ledger_response_data import CompanyLedgerResponseData
from .company_matching_criteria import CompanyMatchingCriteria
from .company_membership_detail_response_data import CompanyMembershipDetailResponseData
@@ -194,6 +201,7 @@
DataExportMetadata,
DataExportMetadata_AuditLog,
DataExportMetadata_CompanyFeatureUsage,
+ DataExportMetadata_Event,
)
from .data_export_output_file_type import DataExportOutputFileType
from .data_export_response_data import DataExportResponseData
@@ -230,6 +238,8 @@
from .event_body_inference import EventBodyInference
from .event_body_track import EventBodyTrack
from .event_detail_response_data import EventDetailResponseData
+ from .event_export_metadata import EventExportMetadata
+ from .event_export_metadata_event_types_item import EventExportMetadataEventTypesItem
from .event_response_data import EventResponseData
from .event_status import EventStatus
from .event_summary_response_data import EventSummaryResponseData
@@ -496,6 +506,7 @@
"BillingProductPriceResponseData": ".billing_product_price_response_data",
"BillingProductPriceTierResponseData": ".billing_product_price_tier_response_data",
"BillingProductPricing": ".billing_product_pricing",
+ "BillingProductRecordResponseData": ".billing_product_record_response_data",
"BillingProductResponseData": ".billing_product_response_data",
"BillingProviderType": ".billing_provider_type",
"BillingStrategy": ".billing_strategy",
@@ -545,6 +556,8 @@
"CompanyDetailResponseData": ".company_detail_response_data",
"CompanyEventPeriodMetricsResponseData": ".company_event_period_metrics_response_data",
"CompanyFeatureUsageExportMetadata": ".company_feature_usage_export_metadata",
+ "CompanyFeatureUsageExportMetadataSortOrderDirection": ".company_feature_usage_export_metadata_sort_order_direction",
+ "CompanyFeatureUsageExportMetadataVisibleColumnsItem": ".company_feature_usage_export_metadata_visible_columns_item",
"CompanyLedgerResponseData": ".company_ledger_response_data",
"CompanyMatchingCriteria": ".company_matching_criteria",
"CompanyMembershipDetailResponseData": ".company_membership_detail_response_data",
@@ -632,6 +645,7 @@
"DataExportMetadata": ".data_export_metadata",
"DataExportMetadata_AuditLog": ".data_export_metadata",
"DataExportMetadata_CompanyFeatureUsage": ".data_export_metadata",
+ "DataExportMetadata_Event": ".data_export_metadata",
"DataExportOutputFileType": ".data_export_output_file_type",
"DataExportResponseData": ".data_export_response_data",
"DataExportStatus": ".data_export_status",
@@ -667,6 +681,8 @@
"EventBodyInference": ".event_body_inference",
"EventBodyTrack": ".event_body_track",
"EventDetailResponseData": ".event_detail_response_data",
+ "EventExportMetadata": ".event_export_metadata",
+ "EventExportMetadataEventTypesItem": ".event_export_metadata_event_types_item",
"EventResponseData": ".event_response_data",
"EventStatus": ".event_status",
"EventSummaryResponseData": ".event_summary_response_data",
@@ -955,6 +971,7 @@ def __dir__():
"BillingProductPriceResponseData",
"BillingProductPriceTierResponseData",
"BillingProductPricing",
+ "BillingProductRecordResponseData",
"BillingProductResponseData",
"BillingProviderType",
"BillingStrategy",
@@ -1004,6 +1021,8 @@ def __dir__():
"CompanyDetailResponseData",
"CompanyEventPeriodMetricsResponseData",
"CompanyFeatureUsageExportMetadata",
+ "CompanyFeatureUsageExportMetadataSortOrderDirection",
+ "CompanyFeatureUsageExportMetadataVisibleColumnsItem",
"CompanyLedgerResponseData",
"CompanyMatchingCriteria",
"CompanyMembershipDetailResponseData",
@@ -1091,6 +1110,7 @@ def __dir__():
"DataExportMetadata",
"DataExportMetadata_AuditLog",
"DataExportMetadata_CompanyFeatureUsage",
+ "DataExportMetadata_Event",
"DataExportOutputFileType",
"DataExportResponseData",
"DataExportStatus",
@@ -1126,6 +1146,8 @@ def __dir__():
"EventBodyInference",
"EventBodyTrack",
"EventDetailResponseData",
+ "EventExportMetadata",
+ "EventExportMetadataEventTypesItem",
"EventResponseData",
"EventStatus",
"EventSummaryResponseData",
diff --git a/src/schematic/types/billing_credit_view.py b/src/schematic/types/billing_credit_view.py
index 75cadc1..340c450 100644
--- a/src/schematic/types/billing_credit_view.py
+++ b/src/schematic/types/billing_credit_view.py
@@ -10,7 +10,7 @@
from .billing_credit_ledger_authority import BillingCreditLedgerAuthority
from .billing_credit_rollover_policy import BillingCreditRolloverPolicy
from .billing_price_view import BillingPriceView
-from .billing_product_response_data import BillingProductResponseData
+from .billing_product_record_response_data import BillingProductRecordResponseData
from .credit_currency_price import CreditCurrencyPrice
@@ -33,7 +33,7 @@ class BillingCreditView(UniversalBaseModel):
price: typing.Optional[BillingPriceView] = None
price_per_unit: typing.Optional[int] = None
price_per_unit_decimal: typing.Optional[str] = None
- product: typing.Optional[BillingProductResponseData] = None
+ product: typing.Optional[BillingProductRecordResponseData] = None
singular_name: typing.Optional[str] = None
updated_at: dt.datetime
diff --git a/src/schematic/types/billing_product_record_response_data.py b/src/schematic/types/billing_product_record_response_data.py
new file mode 100644
index 0000000..ac38c2b
--- /dev/null
+++ b/src/schematic/types/billing_product_record_response_data.py
@@ -0,0 +1,29 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import datetime as dt
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_provider_type import BillingProviderType
+
+
+class BillingProductRecordResponseData(UniversalBaseModel):
+ account_id: str
+ created_at: dt.datetime
+ environment_id: str
+ external_id: str
+ id: str
+ is_active: bool
+ name: str
+ provider_type: BillingProviderType
+ updated_at: dt.datetime
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/company_feature_usage_export_metadata.py b/src/schematic/types/company_feature_usage_export_metadata.py
index 1b2cb8c..c20498c 100644
--- a/src/schematic/types/company_feature_usage_export_metadata.py
+++ b/src/schematic/types/company_feature_usage_export_metadata.py
@@ -4,6 +4,12 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .company_feature_usage_export_metadata_sort_order_direction import (
+ CompanyFeatureUsageExportMetadataSortOrderDirection,
+)
+from .company_feature_usage_export_metadata_visible_columns_item import (
+ CompanyFeatureUsageExportMetadataVisibleColumnsItem,
+)
class CompanyFeatureUsageExportMetadata(UniversalBaseModel):
@@ -17,9 +23,9 @@ class CompanyFeatureUsageExportMetadata(UniversalBaseModel):
Restrict the export to companies with these billing credit type IDs
"""
- feature_ids: typing.List[str] = pydantic.Field()
+ feature_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
"""
- Schematic feature IDs (starting with 'feat_') to include as usage columns; at least one is required
+ Schematic feature IDs (starting with 'feat_') to include as usage columns; empty means no usage columns
"""
has_scheduled_downgrade: typing.Optional[bool] = pydantic.Field(default=None)
@@ -57,6 +63,18 @@ class CompanyFeatureUsageExportMetadata(UniversalBaseModel):
Free-text search over company name and keys
"""
+ sort_order_column: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Column to sort the exported rows by (e.g. name, created_at, plan); defaults to name
+ """
+
+ sort_order_direction: typing.Optional[CompanyFeatureUsageExportMetadataSortOrderDirection] = pydantic.Field(
+ default=None
+ )
+ """
+ Direction to sort the exported rows by; defaults to asc
+ """
+
subscription_statuses: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
"""
Restrict the export to companies whose subscription has one of these statuses
@@ -67,6 +85,13 @@ class CompanyFeatureUsageExportMetadata(UniversalBaseModel):
Restrict the export to companies whose subscription has one of these types
"""
+ visible_columns: typing.Optional[typing.List[CompanyFeatureUsageExportMetadataVisibleColumnsItem]] = pydantic.Field(
+ default=None
+ )
+ """
+ Company columns to include, mirroring the companies list; omit to include the plan column only
+ """
+
with_entitlement_for: typing.Optional[str] = pydantic.Field(default=None)
"""
Restrict the export to companies that have an entitlement for this feature ID
diff --git a/src/schematic/types/company_feature_usage_export_metadata_sort_order_direction.py b/src/schematic/types/company_feature_usage_export_metadata_sort_order_direction.py
new file mode 100644
index 0000000..dba6663
--- /dev/null
+++ b/src/schematic/types/company_feature_usage_export_metadata_sort_order_direction.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+CompanyFeatureUsageExportMetadataSortOrderDirection = typing.Union[typing.Literal["asc", "desc"], typing.Any]
diff --git a/src/schematic/types/company_feature_usage_export_metadata_visible_columns_item.py b/src/schematic/types/company_feature_usage_export_metadata_visible_columns_item.py
new file mode 100644
index 0000000..12bd4fa
--- /dev/null
+++ b/src/schematic/types/company_feature_usage_export_metadata_visible_columns_item.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+CompanyFeatureUsageExportMetadataVisibleColumnsItem = typing.Union[
+ typing.Literal["plan", "subscription", "users", "last_seen_at"], typing.Any
+]
diff --git a/src/schematic/types/data_export_metadata.py b/src/schematic/types/data_export_metadata.py
index 8e9d68f..1345091 100644
--- a/src/schematic/types/data_export_metadata.py
+++ b/src/schematic/types/data_export_metadata.py
@@ -8,6 +8,13 @@
import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .company_feature_usage_export_metadata_sort_order_direction import (
+ CompanyFeatureUsageExportMetadataSortOrderDirection,
+)
+from .company_feature_usage_export_metadata_visible_columns_item import (
+ CompanyFeatureUsageExportMetadataVisibleColumnsItem,
+)
+from .event_export_metadata_event_types_item import EventExportMetadataEventTypesItem
class DataExportMetadata_AuditLog(UniversalBaseModel):
@@ -32,7 +39,7 @@ class DataExportMetadata_CompanyFeatureUsage(UniversalBaseModel):
export_type: typing.Literal["company-feature-usage"] = "company-feature-usage"
company_ids: typing.Optional[typing.List[str]] = None
credit_type_ids: typing.Optional[typing.List[str]] = None
- feature_ids: typing.List[str]
+ feature_ids: typing.Optional[typing.List[str]] = None
has_scheduled_downgrade: typing.Optional[bool] = None
monetized_subscriptions: typing.Optional[bool] = None
notification_email_recipient_email_addresses: typing.Optional[typing.List[str]] = None
@@ -40,8 +47,11 @@ class DataExportMetadata_CompanyFeatureUsage(UniversalBaseModel):
plan_ids: typing.Optional[typing.List[str]] = None
plan_version_id: typing.Optional[str] = None
q: typing.Optional[str] = None
+ sort_order_column: typing.Optional[str] = None
+ sort_order_direction: typing.Optional[CompanyFeatureUsageExportMetadataSortOrderDirection] = None
subscription_statuses: typing.Optional[typing.List[str]] = None
subscription_types: typing.Optional[typing.List[str]] = None
+ visible_columns: typing.Optional[typing.List[CompanyFeatureUsageExportMetadataVisibleColumnsItem]] = None
with_entitlement_for: typing.Optional[str] = None
with_subscription: typing.Optional[bool] = None
without_feature_override_for: typing.Optional[str] = None
@@ -58,7 +68,28 @@ class Config:
extra = pydantic.Extra.allow
+class DataExportMetadata_Event(UniversalBaseModel):
+ export_type: typing.Literal["event"] = "event"
+ company_id: typing.Optional[str] = None
+ end_time: typing.Optional[dt.datetime] = None
+ event_subtype: typing.Optional[str] = None
+ event_types: typing.Optional[typing.List[EventExportMetadataEventTypesItem]] = None
+ flag_id: typing.Optional[str] = None
+ notification_email_recipient_email_addresses: typing.Optional[typing.List[str]] = None
+ start_time: typing.Optional[dt.datetime] = None
+ user_id: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
DataExportMetadata = typing_extensions.Annotated[
- typing.Union[DataExportMetadata_AuditLog, DataExportMetadata_CompanyFeatureUsage],
+ typing.Union[DataExportMetadata_AuditLog, DataExportMetadata_CompanyFeatureUsage, DataExportMetadata_Event],
pydantic.Field(discriminator="export_type"),
]
diff --git a/src/schematic/types/data_export_type.py b/src/schematic/types/data_export_type.py
index 6c073cc..51e9546 100644
--- a/src/schematic/types/data_export_type.py
+++ b/src/schematic/types/data_export_type.py
@@ -2,4 +2,4 @@
import typing
-DataExportType = typing.Union[typing.Literal["audit-log", "company-feature-usage"], typing.Any]
+DataExportType = typing.Union[typing.Literal["audit-log", "company-feature-usage", "event"], typing.Any]
diff --git a/src/schematic/types/event_export_metadata.py b/src/schematic/types/event_export_metadata.py
new file mode 100644
index 0000000..e845d97
--- /dev/null
+++ b/src/schematic/types/event_export_metadata.py
@@ -0,0 +1,59 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import datetime as dt
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .event_export_metadata_event_types_item import EventExportMetadataEventTypesItem
+
+
+class EventExportMetadata(UniversalBaseModel):
+ company_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Restrict the export to events for this company ID (starting with 'comp_')
+ """
+
+ end_time: typing.Optional[dt.datetime] = pydantic.Field(default=None)
+ """
+ Restrict the export to events captured at or before this time
+ """
+
+ event_subtype: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Restrict the export to track events with this subtype
+ """
+
+ event_types: typing.Optional[typing.List[EventExportMetadataEventTypesItem]] = pydantic.Field(default=None)
+ """
+ Restrict the export to these event types (e.g. "track", "identify"); defaults to track, identify and inference events. Flag check events are only exported when requested here explicitly, and require a flag_id.
+ """
+
+ flag_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Restrict the export to flag-check events for this flag ID (starting with 'flag_')
+ """
+
+ notification_email_recipient_email_addresses: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Account member emails to notify when the export completes; empty means the artifact is only retrievable via the API
+ """
+
+ start_time: typing.Optional[dt.datetime] = pydantic.Field(default=None)
+ """
+ Restrict the export to events captured at or after this time
+ """
+
+ user_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Restrict the export to events for this user ID (starting with 'user_')
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/event_export_metadata_event_types_item.py b/src/schematic/types/event_export_metadata_event_types_item.py
new file mode 100644
index 0000000..9f7695b
--- /dev/null
+++ b/src/schematic/types/event_export_metadata_event_types_item.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+EventExportMetadataEventTypesItem = typing.Union[
+ typing.Literal["flag_check", "identify", "inference", "track"], typing.Any
+]
diff --git a/src/schematic/types/feature_view.py b/src/schematic/types/feature_view.py
index ee83476..679eae9 100644
--- a/src/schematic/types/feature_view.py
+++ b/src/schematic/types/feature_view.py
@@ -6,7 +6,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .billing_linked_resource_response_data import BillingLinkedResourceResponseData
-from .billing_product_response_data import BillingProductResponseData
+from .billing_product_record_response_data import BillingProductRecordResponseData
from .entity_trait_definition_response_data import EntityTraitDefinitionResponseData
from .event_summary_response_data import EventSummaryResponseData
from .feature_lifecycle_phase import FeatureLifecyclePhase
@@ -18,7 +18,7 @@
class FeatureView(UniversalBaseModel):
account_id: str
billing_linked_resource: typing.Optional[BillingLinkedResourceResponseData] = None
- billing_product: typing.Optional[BillingProductResponseData] = None
+ billing_product: typing.Optional[BillingProductRecordResponseData] = None
created_at: dt.datetime
description: str
event_subtype: typing.Optional[str] = None
diff --git a/src/schematic/types/test_webhook_response_data.py b/src/schematic/types/test_webhook_response_data.py
index 28cd96d..82f3a59 100644
--- a/src/schematic/types/test_webhook_response_data.py
+++ b/src/schematic/types/test_webhook_response_data.py
@@ -7,6 +7,7 @@
class TestWebhookResponseData(UniversalBaseModel):
+ failure_reason: typing.Optional[str] = None
response_code: int
success: bool