Skip to content

Commit 93cf42e

Browse files
🌿 Fern Regeneration -- June 27, 2024 (#13)
* SDK regeneration * Fix flag check types to reflect API changes --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Ben Papillon <benpapillon@gmail.com>
1 parent 0d5bf28 commit 93cf42e

File tree

83 files changed

+919
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+919
-257
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "schematichq"
3-
version = "1.0.3"
3+
version = "1.0.4"
44
description = ""
55
readme = "README.md"
66
authors = []

src/schematic/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,15 @@
138138
CountCompaniesParams,
139139
CountCompaniesResponse,
140140
CountEntityKeyDefinitionsParams,
141+
CountEntityKeyDefinitionsRequestEntityType,
141142
CountEntityKeyDefinitionsResponse,
143+
CountEntityKeyDefinitionsResponseParamsEntityType,
142144
CountEntityTraitDefinitionsParams,
145+
CountEntityTraitDefinitionsRequestEntityType,
146+
CountEntityTraitDefinitionsRequestTraitType,
143147
CountEntityTraitDefinitionsResponse,
148+
CountEntityTraitDefinitionsResponseParamsEntityType,
149+
CountEntityTraitDefinitionsResponseParamsTraitType,
144150
CountUsersParams,
145151
CountUsersResponse,
146152
CreateCompanyResponse,
@@ -170,9 +176,15 @@
170176
ListCompanyPlansParams,
171177
ListCompanyPlansResponse,
172178
ListEntityKeyDefinitionsParams,
179+
ListEntityKeyDefinitionsRequestEntityType,
173180
ListEntityKeyDefinitionsResponse,
181+
ListEntityKeyDefinitionsResponseParamsEntityType,
174182
ListEntityTraitDefinitionsParams,
183+
ListEntityTraitDefinitionsRequestEntityType,
184+
ListEntityTraitDefinitionsRequestTraitType,
175185
ListEntityTraitDefinitionsResponse,
186+
ListEntityTraitDefinitionsResponseParamsEntityType,
187+
ListEntityTraitDefinitionsResponseParamsTraitType,
176188
ListUsersParams,
177189
ListUsersResponse,
178190
LookupCompanyParams,
@@ -303,6 +315,7 @@
303315
CountWebhookEventsResponse,
304316
CountWebhooksParams,
305317
CountWebhooksResponse,
318+
CreateWebhookRequestBodyRequestTypesItem,
306319
CreateWebhookResponse,
307320
DeleteWebhookResponse,
308321
GetWebhookEventResponse,
@@ -311,6 +324,7 @@
311324
ListWebhookEventsResponse,
312325
ListWebhooksParams,
313326
ListWebhooksResponse,
327+
UpdateWebhookRequestBodyRequestTypesItem,
314328
UpdateWebhookResponse,
315329
)
316330

@@ -351,9 +365,15 @@
351365
"CountCompanyOverridesParams",
352366
"CountCompanyOverridesResponse",
353367
"CountEntityKeyDefinitionsParams",
368+
"CountEntityKeyDefinitionsRequestEntityType",
354369
"CountEntityKeyDefinitionsResponse",
370+
"CountEntityKeyDefinitionsResponseParamsEntityType",
355371
"CountEntityTraitDefinitionsParams",
372+
"CountEntityTraitDefinitionsRequestEntityType",
373+
"CountEntityTraitDefinitionsRequestTraitType",
356374
"CountEntityTraitDefinitionsResponse",
375+
"CountEntityTraitDefinitionsResponseParamsEntityType",
376+
"CountEntityTraitDefinitionsResponseParamsTraitType",
357377
"CountFeatureCompaniesParams",
358378
"CountFeatureCompaniesResponse",
359379
"CountFeatureUsageParams",
@@ -411,6 +431,7 @@
411431
"CreateReqCommonMetricPeriod",
412432
"CreateReqCommonValueType",
413433
"CreateUserResponse",
434+
"CreateWebhookRequestBodyRequestTypesItem",
414435
"CreateWebhookResponse",
415436
"CrmDealLineItem",
416437
"CrmDealResponseData",
@@ -510,9 +531,15 @@
510531
"ListCrmProductsParams",
511532
"ListCrmProductsResponse",
512533
"ListEntityKeyDefinitionsParams",
534+
"ListEntityKeyDefinitionsRequestEntityType",
513535
"ListEntityKeyDefinitionsResponse",
536+
"ListEntityKeyDefinitionsResponseParamsEntityType",
514537
"ListEntityTraitDefinitionsParams",
538+
"ListEntityTraitDefinitionsRequestEntityType",
539+
"ListEntityTraitDefinitionsRequestTraitType",
515540
"ListEntityTraitDefinitionsResponse",
541+
"ListEntityTraitDefinitionsResponseParamsEntityType",
542+
"ListEntityTraitDefinitionsResponseParamsTraitType",
516543
"ListEnvironmentsParams",
517544
"ListEnvironmentsResponse",
518545
"ListEventsParams",
@@ -594,6 +621,7 @@
594621
"UpdateReqCommonMetricPeriod",
595622
"UpdateReqCommonValueType",
596623
"UpdateRuleRequestBody",
624+
"UpdateWebhookRequestBodyRequestTypesItem",
597625
"UpdateWebhookResponse",
598626
"UpsertBillingProductResponse",
599627
"UpsertBillingSubscriptionResponse",

src/schematic/accounts/types/count_api_keys_params.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,16 @@ class CountApiKeysParams(pydantic_v1.BaseModel):
1313
"""
1414

1515
environment_id: typing.Optional[str] = None
16-
limit: typing.Optional[int] = None
17-
offset: typing.Optional[int] = None
16+
limit: typing.Optional[int] = pydantic_v1.Field(default=None)
17+
"""
18+
Page limit (default 100)
19+
"""
20+
21+
offset: typing.Optional[int] = pydantic_v1.Field(default=None)
22+
"""
23+
Page offset (default 0)
24+
"""
25+
1826
require_environment: typing.Optional[bool] = None
1927

2028
def json(self, **kwargs: typing.Any) -> str:

src/schematic/accounts/types/count_api_requests_params.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,16 @@ class CountApiRequestsParams(pydantic_v1.BaseModel):
1313
"""
1414

1515
environment_id: typing.Optional[str] = None
16-
limit: typing.Optional[int] = None
17-
offset: typing.Optional[int] = None
16+
limit: typing.Optional[int] = pydantic_v1.Field(default=None)
17+
"""
18+
Page limit (default 100)
19+
"""
20+
21+
offset: typing.Optional[int] = pydantic_v1.Field(default=None)
22+
"""
23+
Page offset (default 0)
24+
"""
25+
1826
q: typing.Optional[str] = None
1927
request_type: typing.Optional[str] = None
2028

src/schematic/accounts/types/list_api_keys_params.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,16 @@ class ListApiKeysParams(pydantic_v1.BaseModel):
1313
"""
1414

1515
environment_id: typing.Optional[str] = None
16-
limit: typing.Optional[int] = None
17-
offset: typing.Optional[int] = None
16+
limit: typing.Optional[int] = pydantic_v1.Field(default=None)
17+
"""
18+
Page limit (default 100)
19+
"""
20+
21+
offset: typing.Optional[int] = pydantic_v1.Field(default=None)
22+
"""
23+
Page offset (default 0)
24+
"""
25+
1826
require_environment: typing.Optional[bool] = None
1927

2028
def json(self, **kwargs: typing.Any) -> str:

src/schematic/accounts/types/list_api_requests_params.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,16 @@ class ListApiRequestsParams(pydantic_v1.BaseModel):
1313
"""
1414

1515
environment_id: typing.Optional[str] = None
16-
limit: typing.Optional[int] = None
17-
offset: typing.Optional[int] = None
16+
limit: typing.Optional[int] = pydantic_v1.Field(default=None)
17+
"""
18+
Page limit (default 100)
19+
"""
20+
21+
offset: typing.Optional[int] = pydantic_v1.Field(default=None)
22+
"""
23+
Page offset (default 0)
24+
"""
25+
1826
q: typing.Optional[str] = None
1927
request_type: typing.Optional[str] = None
2028

src/schematic/accounts/types/list_environments_params.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ class ListEnvironmentsParams(pydantic_v1.BaseModel):
1313
"""
1414

1515
ids: typing.Optional[typing.List[str]] = None
16-
limit: typing.Optional[int] = None
17-
offset: typing.Optional[int] = None
16+
limit: typing.Optional[int] = pydantic_v1.Field(default=None)
17+
"""
18+
Page limit (default 100)
19+
"""
20+
21+
offset: typing.Optional[int] = pydantic_v1.Field(default=None)
22+
"""
23+
Page offset (default 0)
24+
"""
1825

1926
def json(self, **kwargs: typing.Any) -> str:
2027
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}

src/schematic/billing/types/list_products_params.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ class ListProductsParams(pydantic_v1.BaseModel):
1313
"""
1414

1515
ids: typing.Optional[typing.List[str]] = None
16-
limit: typing.Optional[int] = None
16+
limit: typing.Optional[int] = pydantic_v1.Field(default=None)
17+
"""
18+
Page limit (default 100)
19+
"""
20+
1721
name: typing.Optional[str] = None
18-
offset: typing.Optional[int] = None
22+
offset: typing.Optional[int] = pydantic_v1.Field(default=None)
23+
"""
24+
Page offset (default 0)
25+
"""
1926

2027
def json(self, **kwargs: typing.Any) -> str:
2128
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}

src/schematic/client.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,17 @@ def shutdown(self) -> None:
7070
def check_flag(
7171
self,
7272
flag_key: str,
73-
company: Optional[Dict[str, str]] = None,
74-
user: Optional[Dict[str, str]] = None,
73+
company: Optional[Dict[str, Optional[str]]] = None,
74+
user: Optional[Dict[str, Optional[str]]] = None,
7575
) -> bool:
7676
if self.offline:
7777
return self._get_flag_default(flag_key)
7878

7979
try:
8080
cache_key = (
81-
flag_key + ":" + str(company) + ":" + str(user) if (company or user) else flag_key
81+
flag_key + ":" + str(company) + ":" + str(user)
82+
if (company or user)
83+
else flag_key
8284
)
8385

8486
for provider in self.flag_check_cache_providers:
@@ -161,7 +163,9 @@ class AsyncSchematicConfig:
161163
class AsyncSchematic(AsyncBaseSchematic):
162164
def __init__(self, api_key: str, config: Optional[AsyncSchematicConfig] = None):
163165
config = config or AsyncSchematicConfig()
164-
httpx_client = AsyncOfflineHTTPClient() if config.offline else config.httpx_client
166+
httpx_client = (
167+
AsyncOfflineHTTPClient() if config.offline else config.httpx_client
168+
)
165169

166170
super().__init__(
167171
api_key=api_key,
@@ -191,15 +195,17 @@ async def initialize(self) -> None:
191195
async def check_flag(
192196
self,
193197
flag_key: str,
194-
company: Optional[Dict[str, str]] = None,
195-
user: Optional[Dict[str, str]] = None,
198+
company: Optional[Dict[str, Optional[str]]] = None,
199+
user: Optional[Dict[str, Optional[str]]] = None,
196200
) -> bool:
197201
if self.offline:
198202
return self._get_flag_default(flag_key)
199203

200204
try:
201205
cache_key = (
202-
flag_key + ":" + str(company) + ":" + str(user) if (company or user) else flag_key
206+
flag_key + ":" + str(company) + ":" + str(user)
207+
if (company or user)
208+
else flag_key
203209
)
204210

205211
for provider in self.flag_check_cache_providers:

src/schematic/companies/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@
44
CountCompaniesParams,
55
CountCompaniesResponse,
66
CountEntityKeyDefinitionsParams,
7+
CountEntityKeyDefinitionsRequestEntityType,
78
CountEntityKeyDefinitionsResponse,
9+
CountEntityKeyDefinitionsResponseParamsEntityType,
810
CountEntityTraitDefinitionsParams,
11+
CountEntityTraitDefinitionsRequestEntityType,
12+
CountEntityTraitDefinitionsRequestTraitType,
913
CountEntityTraitDefinitionsResponse,
14+
CountEntityTraitDefinitionsResponseParamsEntityType,
15+
CountEntityTraitDefinitionsResponseParamsTraitType,
1016
CountUsersParams,
1117
CountUsersResponse,
1218
CreateCompanyResponse,
@@ -36,9 +42,15 @@
3642
ListCompanyPlansParams,
3743
ListCompanyPlansResponse,
3844
ListEntityKeyDefinitionsParams,
45+
ListEntityKeyDefinitionsRequestEntityType,
3946
ListEntityKeyDefinitionsResponse,
47+
ListEntityKeyDefinitionsResponseParamsEntityType,
4048
ListEntityTraitDefinitionsParams,
49+
ListEntityTraitDefinitionsRequestEntityType,
50+
ListEntityTraitDefinitionsRequestTraitType,
4151
ListEntityTraitDefinitionsResponse,
52+
ListEntityTraitDefinitionsResponseParamsEntityType,
53+
ListEntityTraitDefinitionsResponseParamsTraitType,
4254
ListUsersParams,
4355
ListUsersResponse,
4456
LookupCompanyParams,
@@ -57,9 +69,15 @@
5769
"CountCompaniesParams",
5870
"CountCompaniesResponse",
5971
"CountEntityKeyDefinitionsParams",
72+
"CountEntityKeyDefinitionsRequestEntityType",
6073
"CountEntityKeyDefinitionsResponse",
74+
"CountEntityKeyDefinitionsResponseParamsEntityType",
6175
"CountEntityTraitDefinitionsParams",
76+
"CountEntityTraitDefinitionsRequestEntityType",
77+
"CountEntityTraitDefinitionsRequestTraitType",
6278
"CountEntityTraitDefinitionsResponse",
79+
"CountEntityTraitDefinitionsResponseParamsEntityType",
80+
"CountEntityTraitDefinitionsResponseParamsTraitType",
6381
"CountUsersParams",
6482
"CountUsersResponse",
6583
"CreateCompanyResponse",
@@ -89,9 +107,15 @@
89107
"ListCompanyPlansParams",
90108
"ListCompanyPlansResponse",
91109
"ListEntityKeyDefinitionsParams",
110+
"ListEntityKeyDefinitionsRequestEntityType",
92111
"ListEntityKeyDefinitionsResponse",
112+
"ListEntityKeyDefinitionsResponseParamsEntityType",
93113
"ListEntityTraitDefinitionsParams",
114+
"ListEntityTraitDefinitionsRequestEntityType",
115+
"ListEntityTraitDefinitionsRequestTraitType",
94116
"ListEntityTraitDefinitionsResponse",
117+
"ListEntityTraitDefinitionsResponseParamsEntityType",
118+
"ListEntityTraitDefinitionsResponseParamsTraitType",
95119
"ListUsersParams",
96120
"ListUsersResponse",
97121
"LookupCompanyParams",

0 commit comments

Comments
 (0)