Skip to content

Commit b79b7c6

Browse files
chore(internal): codegen related update
1 parent cebada8 commit b79b7c6

File tree

5 files changed

+30
-57
lines changed

5 files changed

+30
-57
lines changed

scripts/mock

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"
2121

2222
# Run prism mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
24+
# Pre-install the package so the download doesn't eat into the startup timeout
25+
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version
26+
2427
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
2528

26-
# Wait for server to come online
29+
# Wait for server to come online (max 30s)
2730
echo -n "Waiting for server"
31+
attempts=0
2832
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
33+
attempts=$((attempts + 1))
34+
if [ "$attempts" -ge 300 ]; then
35+
echo
36+
echo "Timed out waiting for Prism server to start"
37+
cat .prism.log
38+
exit 1
39+
fi
2940
echo -n "."
3041
sleep 0.1
3142
done

src/increase/types/check_transfer_create_params.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union, Iterable
5+
from typing import Union, Iterable
66
from datetime import date
7-
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7+
from typing_extensions import Literal, Required, Annotated, TypedDict
88

99
from .._utils import PropertyInfo
1010

@@ -156,7 +156,7 @@ class PhysicalCheckReturnAddress(TypedDict, total=False):
156156
"""
157157

158158

159-
class PhysicalCheckTyped(TypedDict, total=False):
159+
class PhysicalCheck(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
160160
"""Details relating to the physical check that Increase will print and mail.
161161
162162
This is required if `fulfillment_method` is equal to `physical_check`. It must not be included if any other `fulfillment_method` is provided.
@@ -222,10 +222,7 @@ class PhysicalCheckTyped(TypedDict, total=False):
222222
"""
223223

224224

225-
PhysicalCheck: TypeAlias = Union[PhysicalCheckTyped, Dict[str, object]]
226-
227-
228-
class ThirdPartyTyped(TypedDict, total=False):
225+
class ThirdParty(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
229226
"""Details relating to the custom fulfillment you will perform.
230227
231228
This is required if `fulfillment_method` is equal to `third_party`. It must not be included if any other `fulfillment_method` is provided.
@@ -238,6 +235,3 @@ class ThirdPartyTyped(TypedDict, total=False):
238235
this is omitted, Increase will be unable to validate the payer name when the
239236
check is deposited.
240237
"""
241-
242-
243-
ThirdParty: TypeAlias = Union[ThirdPartyTyped, Dict[str, object]]

src/increase/types/entity_create_beneficial_owner_params.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, List, Union
5+
from typing import List, Union
66
from datetime import date
7-
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7+
from typing_extensions import Literal, Required, Annotated, TypedDict
88

99
from .._utils import PropertyInfo
1010

@@ -122,7 +122,7 @@ class BeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False):
122122
"""The identifier of the File containing the passport."""
123123

124124

125-
class BeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False):
125+
class BeneficialOwnerIndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
126126
"""A means of verifying the person's identity."""
127127

128128
method: Required[
@@ -169,11 +169,6 @@ class BeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False):
169169
"""
170170

171171

172-
BeneficialOwnerIndividualIdentification: TypeAlias = Union[
173-
BeneficialOwnerIndividualIdentificationTyped, Dict[str, object]
174-
]
175-
176-
177172
class BeneficialOwnerIndividual(TypedDict, total=False):
178173
"""Personal details for the beneficial owner."""
179174

@@ -201,7 +196,7 @@ class BeneficialOwnerIndividual(TypedDict, total=False):
201196
"""
202197

203198

204-
class BeneficialOwnerTyped(TypedDict, total=False):
199+
class BeneficialOwner(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
205200
"""
206201
The identifying details of anyone controlling or owning 25% or more of the corporation.
207202
"""
@@ -218,6 +213,3 @@ class BeneficialOwnerTyped(TypedDict, total=False):
218213

219214
company_title: str
220215
"""This person's role or title within the entity."""
221-
222-
223-
BeneficialOwner: TypeAlias = Union[BeneficialOwnerTyped, Dict[str, object]]

src/increase/types/entity_create_params.py

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, List, Union, Iterable
5+
from typing import List, Union, Iterable
66
from datetime import date, datetime
7-
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7+
from typing_extensions import Literal, Required, Annotated, TypedDict
88

99
from .._utils import PropertyInfo
1010

@@ -245,7 +245,7 @@ class CorporationBeneficialOwnerIndividualIdentificationPassport(TypedDict, tota
245245
"""The identifier of the File containing the passport."""
246246

247247

248-
class CorporationBeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False):
248+
class CorporationBeneficialOwnerIndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
249249
"""A means of verifying the person's identity."""
250250

251251
method: Required[
@@ -292,11 +292,6 @@ class CorporationBeneficialOwnerIndividualIdentificationTyped(TypedDict, total=F
292292
"""
293293

294294

295-
CorporationBeneficialOwnerIndividualIdentification: TypeAlias = Union[
296-
CorporationBeneficialOwnerIndividualIdentificationTyped, Dict[str, object]
297-
]
298-
299-
300295
class CorporationBeneficialOwnerIndividual(TypedDict, total=False):
301296
"""Personal details for the beneficial owner."""
302297

@@ -324,7 +319,7 @@ class CorporationBeneficialOwnerIndividual(TypedDict, total=False):
324319
"""
325320

326321

327-
class CorporationBeneficialOwnerTyped(TypedDict, total=False):
322+
class CorporationBeneficialOwner(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
328323
individual: Required[CorporationBeneficialOwnerIndividual]
329324
"""Personal details for the beneficial owner."""
330325

@@ -339,9 +334,6 @@ class CorporationBeneficialOwnerTyped(TypedDict, total=False):
339334
"""This person's role or title within the entity."""
340335

341336

342-
CorporationBeneficialOwner: TypeAlias = Union[CorporationBeneficialOwnerTyped, Dict[str, object]]
343-
344-
345337
class Corporation(TypedDict, total=False):
346338
"""Details of the corporation entity to create.
347339
@@ -563,7 +555,7 @@ class JointIndividualIdentificationPassport(TypedDict, total=False):
563555
"""The identifier of the File containing the passport."""
564556

565557

566-
class JointIndividualIdentificationTyped(TypedDict, total=False):
558+
class JointIndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
567559
"""A means of verifying the person's identity."""
568560

569561
method: Required[
@@ -610,9 +602,6 @@ class JointIndividualIdentificationTyped(TypedDict, total=False):
610602
"""
611603

612604

613-
JointIndividualIdentification: TypeAlias = Union[JointIndividualIdentificationTyped, Dict[str, object]]
614-
615-
616605
class JointIndividual(TypedDict, total=False):
617606
address: Required[JointIndividualAddress]
618607
"""The individual's physical address.
@@ -739,7 +728,7 @@ class NaturalPersonIdentificationPassport(TypedDict, total=False):
739728
"""The identifier of the File containing the passport."""
740729

741730

742-
class NaturalPersonIdentificationTyped(TypedDict, total=False):
731+
class NaturalPersonIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
743732
"""A means of verifying the person's identity."""
744733

745734
method: Required[
@@ -786,9 +775,6 @@ class NaturalPersonIdentificationTyped(TypedDict, total=False):
786775
"""
787776

788777

789-
NaturalPersonIdentification: TypeAlias = Union[NaturalPersonIdentificationTyped, Dict[str, object]]
790-
791-
792778
class NaturalPerson(TypedDict, total=False):
793779
"""Details of the natural person entity to create.
794780
@@ -993,7 +979,7 @@ class TrustTrusteeIndividualIdentificationPassport(TypedDict, total=False):
993979
"""The identifier of the File containing the passport."""
994980

995981

996-
class TrustTrusteeIndividualIdentificationTyped(TypedDict, total=False):
982+
class TrustTrusteeIndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
997983
"""A means of verifying the person's identity."""
998984

999985
method: Required[
@@ -1040,9 +1026,6 @@ class TrustTrusteeIndividualIdentificationTyped(TypedDict, total=False):
10401026
"""
10411027

10421028

1043-
TrustTrusteeIndividualIdentification: TypeAlias = Union[TrustTrusteeIndividualIdentificationTyped, Dict[str, object]]
1044-
1045-
10461029
class TrustTrusteeIndividual(TypedDict, total=False):
10471030
"""Details of the individual trustee.
10481031
@@ -1179,7 +1162,7 @@ class TrustGrantorIdentificationPassport(TypedDict, total=False):
11791162
"""The identifier of the File containing the passport."""
11801163

11811164

1182-
class TrustGrantorIdentificationTyped(TypedDict, total=False):
1165+
class TrustGrantorIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
11831166
"""A means of verifying the person's identity."""
11841167

11851168
method: Required[
@@ -1226,9 +1209,6 @@ class TrustGrantorIdentificationTyped(TypedDict, total=False):
12261209
"""
12271210

12281211

1229-
TrustGrantorIdentification: TypeAlias = Union[TrustGrantorIdentificationTyped, Dict[str, object]]
1230-
1231-
12321212
class TrustGrantor(TypedDict, total=False):
12331213
"""The grantor of the trust. Required if `category` is equal to `revocable`."""
12341214

src/increase/types/real_time_decision_action_params.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union
6-
from typing_extensions import Literal, Required, TypeAlias, TypedDict
5+
from typing_extensions import Literal, Required, TypedDict
76

87
__all__ = [
98
"RealTimeDecisionActionParams",
@@ -198,7 +197,7 @@ class CardAuthorizationDecline(TypedDict, total=False):
198197
"""
199198

200199

201-
class CardAuthorizationTyped(TypedDict, total=False):
200+
class CardAuthorization(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
202201
"""
203202
If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization.
204203
"""
@@ -225,9 +224,6 @@ class CardAuthorizationTyped(TypedDict, total=False):
225224
"""
226225

227226

228-
CardAuthorization: TypeAlias = Union[CardAuthorizationTyped, Dict[str, object]]
229-
230-
231227
class CardBalanceInquiryApproval(TypedDict, total=False):
232228
"""
233229
If your application approves the balance inquiry, this contains metadata about your decision to approve.

0 commit comments

Comments
 (0)