We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/conversations
Example in spec shows that intended response is:
{ type: "conversation.list", pages: object; total_count: number; conversations: Conversation[]; }
The 200 response schema points to a paginated_response which is:
{ type: "conversation.list", pages: object; total_count: number; data: Conversation[]; }
When using GET /conversations, expecting to map over response.data. Instead, receiving response.conversations. Causes a TypeScript issue.
response.data
response.conversations
npx [email protected] https://raw.githubusercontent.com/intercom/Intercom-OpenAPI/main/descriptions/2.11/api.intercom.io.yaml -o ./src/types.d.ts
import createFetchClient from 'openapi-fetch'; import type { paths } from './types'; const client = createFetchClient<paths>({ baseUrl: 'https://api.intercom.io', headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${accessToken}`, 'Intercom-Version': '2.11', }, });
const conversations = await intercom.GET('/conversations');
console.log(conversations.data.data);
conversations.data.data
The text was updated successfully, but these errors were encountered:
thanks Hayden we will take a look
Sorry, something went wrong.
No branches or pull requests
Schema Inaccuracy
Example in spec shows that intended response is:
The 200 response schema points to a paginated_response which is:
Expected
When using GET
/conversations
, expecting to map overresponse.data
. Instead, receivingresponse.conversations
. Causes a TypeScript issue.Reproduction Steps
conversations.data.data
is undefined 😂The text was updated successfully, but these errors were encountered: