microsoft / microsoft/kiota

[Typescript] "No matching export ..." error for PIPEDRIVE.COM api

Open
#7,861 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.8k
Forks
333
Avg merge
16h 29m
Merged PRs (30d)
116

Description

Found as part of https://github.com/microsoft/kiota/pull/7774:

Using the source code from 2026-06-17 and this command:

```
.\it\generate-code.ps1 -descriptionUrl https://developers.pipedrive.com/docs/api/v1/openapi.yaml -language typescript -dev
.\it\exec-cmd.ps1 -descriptionUrl https://developers.pipedrive.com/docs/api/v1/openapi.yaml -language typescript
```

The generated client does not compile:

```
X [ERROR] No matching export in "src/app/client/oauth/token/index.ts" for import "createPostResponseFromDiscriminatorValue"

src/app/client/oauth/token/index.ts:5:9:
5 │ import { createPostResponseFromDiscriminatorValue, serializePostRequestBody, serializePostResponse, type P...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] No matching export in "src/app/client/oauth/token/index.ts" for import "serializePostRequestBody"

src/app/client/oauth/token/index.ts:5:51:
5 │ ...eatePostResponseFromDiscriminatorValue, serializePostRequestBody, serializePostResponse, type PostReque...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] No matching export in "src/app/client/oauth/token/index.ts" for import "TokenRequestBuilderNavigationMetadata"

src/app/client/oauth/index.ts:7:57:
7 │ ...tRequestBuilderRequestsMetadata, TokenRequestBuilderNavigationMetadata, TokenRequestBuilderRequestsMeta...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] No matching export in "src/app/client/oauth/token/index.ts" for import "TokenRequestBuilderRequestsMetadata"

src/app/client/oauth/index.ts:7:96:
7 │ ...RequestBuilderNavigationMetadata, TokenRequestBuilderRequestsMetadata, type TokenRequestBuilder } from ...

```

This is the error line in "app\client\oauth\token\index.ts":
```typescript
import { createPostResponseFromDiscriminatorValue, serializePostRequestBody, serializePostResponse, type PostRequestBody, type PostResponse } from './index.js';
```

And this is the error line in "app\client\oauth\index.ts":
```typescript
import { EmptyPathSegmentRequestBuilderRequestsMetadata, TokenRequestBuilderNavigationMetadata, TokenRequestBuilderRequestsMetadata, type TokenRequestBuilder } from './token/index.js';
```

It is caused by the endpoint `/oauth/token/` ("Refreshing the tokens"), but I don't see anything special here:

```yaml
/oauth/token/:
post:
summary: Refreshing the tokens
description: 'The `access_token` has a lifetime. After a period of time, which was returned to you in `expires_in` JSON property, the `access_token` will be invalid, and you can no longer use it to get data from our API. To refresh the `access_token`, you must use the `refresh_token`.'
operationId: refresh-tokens
x-token-cost: 0
servers:
- url: 'https://oauth.pipedrive.com'
tags:
- Oauth
security:
- basic_authentication: []
parameters:
- in: header
name: Authorization
required: true
schema:
type: string
description: 'Base 64 encoded string containing the `client_id` and `client_secret` values. The header value should be `Basic `.'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
title: getTokensRequest
type: object
properties:
grant_type:
type: string
enum:
- authorization_code
- refresh_token
default: refresh_token
description: 'Since you are to refresh your access_token, you must use the value "refresh_token"'
refresh_token:
type: string
description: The refresh token that you received after you exchanged the authorization code
responses:
'200':
description: Returns user Oauth2 tokens.
content:
application/json:
schema:
title: GetTokensResponse
type: object
properties:
access_token:
type: string
description: 'You need to use an `access_token` for accessing the user''s data via API. You will need to [refresh the access token](https://pipedrive.readme.io/docs/marketplace-oauth-authorization#step-7-refreshing-the-tokens) if the `access_token` becomes invalid.'
token_type:
type: string
description: The format of the token. Always "Bearer".
refresh_token:
type: string
description: 'A refresh token is needed when you refresh the access token. refresh_token will expire if it isn''t used in 60 days. Each time refresh_token is used, its expiry date is reset back to 60 days.'
scope:
type: string
description: List of scopes to which users have agreed to grant access within this `access_token`
expires_in:
type: integer
description: The maximum time in seconds until the `access_token` expires
api_domain:
type: string
description: 'The base URL path, including the company_domain, where the requests can be sent to'
example:
access_token: 'v1u:AQIB...iPsNrmj'
token_type: Bearer
expires_in: 3599
refresh_token: '1:1:2a5496a8bdd0f829dcb09dc8ba82b188f0ea4481'
scope: base
api_domain: 'https://user-company.pipedrive.com'

```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the two commands in the issue with the Pipedrive OpenAPI URL and inspect the generated app/client/oauth/token/index.ts and app/client/oauth/index.ts files. Trace the /oauth/token/ endpoint through generation, then verify that the generated TypeScript client compiles without the reported missing exports and metadata imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.