-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
triageIssue is being researchedIssue is being researched
Description
Software Version
8.1.0
Language Version
v21.7.2
Operating System
macOS 15.5
What happened?
- When using TypeScript, run
const referralCustomer = await client.ReferralCustomer.create({ name: 'Test Referral', email: 'test@example.com', phone: '1111111111', });as indicated in EasyPost docs - Get TypeScript error
"Property 'ReferralCustomer' does not exist on type 'EasyPost'." - Instead run
const referralCustomer = await client.Referral.create({ name: 'Test Referral', email: 'test@example.com', phone: '1111111111', });based on code in library - Get error
TypeError: Cannot read properties of undefined (reading 'create')
The code in 1 does work without issues when using regular JS scripts, but the issue arises with TS.
Note: Referral interface may be missing "api_keys" as a type as well which is expected in the response based on the docs.
Issue #456 — past export issue
What was expected?
ReferralCustomer should be exported
Sample Code
// Based on docs:
const referralCustomer = await client.ReferralCustomer.create({
name: 'Test Referral',
email: 'test@example.com',
phone: '1111111111',
});
// Based on library types:
const referralCustomer = await client.Referral.create({
name: 'Test Referral',
email: 'test@example.com',
phone: '1111111111',
})Metadata
Metadata
Assignees
Labels
triageIssue is being researchedIssue is being researched