Skip to content

CADE-2516 Repoint high-level tokenInfo to renamed get-access-token-context op - #506

Merged
kirillsud merged 1 commit into
mainfrom
CADE-2516-oauth-token-context-rename
Jun 30, 2026
Merged

CADE-2516 Repoint high-level tokenInfo to renamed get-access-token-context op#506
kirillsud merged 1 commit into
mainfrom
CADE-2516-oauth-token-context-rename

Conversation

@kirillsud

Copy link
Copy Markdown
Contributor

What & why

The api-specification spec renamed the OAuth token-context operation from token-info to get-access-token-context (and its schema TokenInformationTokenContext) so the ReadMe reference page slug matches the original /reference/get-access-token-context URL (see api-specification #402, CADE-2516).

That removed the generated tokenInfo method and TokenInformation low-level model the high-level generator depends on, so yarn build crashed in highlevelModelGenerator (MiroApi.prototype['tokenInfo'] is undefined). This is why the api-specification publish_public_repo job started failing.

Change

Repoint the high-level model config (packages/generator/modelDefinition.ts) to the new names while keeping the public SDK surface unchanged:

{method: 'getAccessTokenContext', alias: 'tokenInfo', returns: 'TokenInformation'}
// + the high-level TokenInformation model now extends the regenerated low-level `TokenContext`
  • methodgetAccessTokenContext (the new low-level method)
  • aliastokenInfo (so api.tokenInfo() still works for SDK users)
  • the high-level TokenInformation class is preserved, now extending the generated TokenContext

api.tokenInfo(): Promise<TokenInformation> is therefore unchanged for consumers — only its internal wiring to the generated client changes.

Scope

This is the only hand-written source change needed. The full client regeneration (low-level api/, model/, highlevel/index.ts, spec.json) lands automatically via the publish_public_repo upgrade PR once this is on main and the job is re-run.

Verification

  • yarn workspace generator test passes.
  • Ran the full yarn build locally against the new spec.json + this config: the Node high-level generator no longer crashes and emits tokenInfo() calling this._api.getAccessTokenContext().

…ntext op

The api-specification spec renamed the OAuth token-context operation from
`token-info` to `get-access-token-context` (and its schema from
`TokenInformation` to `TokenContext`) so the ReadMe reference page slug matches
the original /reference/get-access-token-context URL.

That removed the generated `tokenInfo` method and `TokenInformation` low-level
model the high-level generator depends on, so `yarn build` crashed in
highlevelModelGenerator (MiroApi.prototype['tokenInfo'] is undefined) - which is
why the api-specification publish_public_repo job started failing.

Repoint the high-level model config to the new names while keeping the public
SDK surface unchanged:
- method -> getAccessTokenContext (the new low-level method)
- alias  -> tokenInfo (so api.tokenInfo() still works)
- model extends the regenerated TokenContext, still exported as TokenInformation

So `api.tokenInfo(): Promise<TokenInformation>` is unchanged for SDK users; only
its wiring to the generated client changes. The full client regeneration lands
via the automated publish_public_repo upgrade PR once this is on main.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report for commit: cc5bca8
File: packages/miro-api/coverage/clover.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.2%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.2%
  60% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.6%
  70% │ ████░░░░░░░░░░░░░░░░░░░ │  7.1%
  80% │ ██████████████░░░░░░░░░ │ 31.0%
  90% │ ███████████████████████ │ 52.4%
 100% │ ████░░░░░░░░░░░░░░░░░░░ │  7.5%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 72.32% | Methods: 73.66% | Branches: 48.66%
FilesLinesMethodsBranches
packages/miro-api
   api.ts100.00%100.00%84.62%
   index.ts71.93%40.91%82.67%
   storage.ts100.00%100.00%66.67%
packages/miro-api/api
   apis.ts1.53%4.41%0.69%
packages/miro-api/highlevel
   Api.ts75.00%85.71%47.62%
   AppCardItem.ts100.00%100.00%73.33%
   Board.ts56.52%53.33%25.40%
   CardItem.ts100.00%100.00%73.33%
   DocumentItem.ts79.41%88.89%64.71%
   EmbedItem.ts100.00%100.00%73.33%
   FrameItem.ts83.33%100.00%36.00%
   ImageItem.ts79.41%88.89%64.71%
   Item.ts100.00%100.00%83.33%
   Organization.ts66.67%71.43%42.11%
   ShapeItem.ts100.00%100.00%73.33%
   StickyNoteItem.ts100.00%100.00%73.33%
   Tag.ts100.00%100.00%63.16%
   Team.ts60.00%71.43%34.78%
   TextItem.ts100.00%100.00%73.33%
   helpers.ts91.67%75.00%66.67%
   index.ts47.90%25.35%52.38%
packages/miro-api/model
   actor.ts85.71%77.78%66.67%
   addProjectMemberRequest.ts88.89%77.78%66.67%
   adminRole.ts89.66%80.00%64.71%
   appCardCreateRequest.ts80.00%77.78%66.67%
   appCardData.ts81.25%80.00%64.71%
   appCardDataChanges.ts83.87%80.00%64.71%
   appCardDataResponse.ts81.25%80.00%64.71%
   appCardItem.ts97.30%88.89%66.67%
   appCardStyle.ts92.31%77.78%66.67%
   appCardStylePlatformbulkcreateoperation.ts92.31%77.78%66.67%
   appCardUpdateRequest.ts80.00%77.78%66.67%
   auditContext.ts85.71%77.78%66.67%
   auditCreatedBy.ts83.87%80.00%64.71%
   auditEvent.ts72.73%77.78%66.67%
   auditObject.ts88.89%77.78%66.67%
   auditOrganization.ts88.89%77.78%66.67%
   auditPage.ts80.00%77.78%66.67%
   auditTeam.ts88.89%77.78%66.67%
   basicEntityInfo.ts88.89%77.78%66.67%
   basicError.ts82.76%77.78%66.67%
   basicErrorEnterpriseUserSessionResetEnterprisePlan.ts82.76%77.78%66.67%
   basicErrorOrganizationsEnterprisePlan.ts82.76%77.78%66.67%
   board.ts97.62%88.89%66.67%
   boardChanges.ts80.00%77.78%66.67%
   boardDataClassificationLabel.ts75.00%77.78%66.67%
   boardExportJob.ts72.73%77.78%66.67%
   boardExportJobCreator.ts92.31%77.78%66.67%
   boardExportJobId.ts92.31%77.78%66.67%
   boardExportJobStatus.ts92.31%77.78%66.67%
   boardExportJobTasksCount.ts85.71%77.78%66.67%
   boardExportJobTasksList.ts85.71%77.78%66.67%
   boardExportJobsList.ts85.71%77.78%66.67%
   boardExportResult.ts88.89%77.78%66.67%
   boardExportTask.ts75.00%77.78%66.67%
   boardExportTaskBoard.ts92.31%77.78%66.67%
   boardExportTaskExportLink.ts77.42%77.78%66.67%
   boardExportTaskResult.ts80.00%77.78%66.67%
   boardFormat.ts100.00%100.00%76.92%
   boardItemContentLog.ts72.97%80.00%64.71%
   boardLinks.ts88.89%77.78%66.67%
   boardMember.ts96.77%90.00%64.71%
   boardMemberChanges.ts92.86%80.00%64.71%
   boardMemberWithLinks.ts81.25%80.00%64.71%
   boardMembersInvite.ts86.67%80.00%64.71%
   boardMembersPagedResponse.ts75.00%77.78%66.67%
   boardPermissionsPolicy.ts87.50%80.00%64.71%
   boardPolicy.ts88.89%77.78%66.67%
   boardPolicyChange.ts88.89%77.78%66.67%
   boardProject.ts92.31%77.78%66.67%
   boardSharingPolicy.ts82.86%80.00%64.71%
   boardSharingPolicyChange.ts85.29%80.00%64.71%
   boardSubscription.ts76.47%80.00%64.71%
   boardSubscriptionData.ts92.31%77.78%66.67%
   boardUserGroup.ts86.67%80.00%64.71%
   boardUserGroupsPage.ts80.00%77.78%66.67%
   boardWithLinks.ts58.54%77.78%66.67%
   boardWithLinksAndLastOpened.ts55.81%77.78%66.67%
   boardWithLinksAndWithoutProject.ts60.00%77.78%66.67%
   boardsPagedResponse.ts75.00%77.78%66.67%
   bulkOperationError.ts80.00%77.78%66.67%
   bulkOperationErrorContext.ts92.31%77.78%66.67%
   bulkSubOperationError.ts85.71%77.78%66.67%
   caption.ts86.67%80.00%64.71%
   cardCreateRequest.ts80.00%77.78%66.67%
   cardData.ts82.76%77.78%66.67%
   cardDataPlatformbulkcreateoperation.ts82.76%77.78%66.67%
   cardItem.ts97.30%88.89%66.67%
   cardStyle.ts92.31%77.78%66.67%
   cardStylePlatformbulkcreateoperation.ts92.31%77.78%66.67%
   cardUpdateRequest.ts80.00%77.78%66.67%
   caseRequest.ts88.89%77.78%66.67%
   caseResponse.ts72.73%77.78%66.67%
   connectorChangesData.ts81.25%80.00%64.71%
   connectorCreationData.ts81.25%80.00%64.71%
   connectorStyle.ts76.32%80.00%64.71%
   connectorWithLinks.ts97.50%90.00%64.71%
   connectorsCursorPaged.ts77.42%77.78%66.67%
   copyBoardChanges.ts82.76%77.78%66.67%
   createBoardExportRequest.ts88.89%77.78%66.67%
   createBoardSubscriptionRequest.ts86.67%80.00%64.71%
   createBoardUserGroupsRequest.ts89.66%80.00%64.71%
   createDocumentItemUsingFileFromDeviceRequestData.ts82.76%77.78%66.67%
   createFrameItem400Response.ts82.76%77.78%66.67%
   createGroupMemberRequest.ts92.31%77.78%66.67%
   createGroupRequest.ts88.89%77.78%66.67%
   createProjectRequest.ts92.31%77.78%66.67%
   createProjectUserGroupsRequest.ts89.66%80.00%64.71%
   createTeamGroupRequest.ts89.66%80.00%64.71%
   createTeamRequest.ts92.31%77.78%66.67%
   createUserResource.ts70.27%80.00%64.71%
   createUserResourceName.ts85.71%77.78%66.67%
   createUserResourcePhotosInner.ts88.89%77.78%66.67%
   createUserResourceRolesInner.ts82.76%77.78%66.67%
   createUserResourceUrnIetfParamsScimSchemasExtensionEnterprise20User.ts77.42%77.78%66.67%
   createUserResourceUrnIetfParamsScimSchemasExtensionEnterprise20UserManager.ts88.89%77.78%66.67%
   createdBy.ts88.89%77.78%66.67%
   createdByPlatformContainers.ts88.89%77.78%66.67%
   createdByPlatformExperimentalFeatures.ts88.89%77.78%66.67%
   createdByPlatformFileUpload.ts88.89%77.78%66.67%
   createdByPlatformTags.ts88.89%77.78%66.67%
   createdByPlatformcreateitemsinbulkusingfilefromdevice.ts88.89%77.78%66.67%
   createdByPlatformgroups.ts88.89%77.78%66.67%
   customField.ts78.79%80.00%64.71%
   customFieldPlatformTags.ts78.79%80.00%64.71%
   customFieldPlatformbulkcreateoperation.ts78.79%80.00%64.71%
   dataClassificationLabel.ts70.59%77.78%66.67%
   dataClassificationLabelId.ts92.31%77.78%66.67%
   dataClassificationOrganizationSettings.ts85.71%77.78%66.67%
   dataClassificationTeamSettings.ts85.71%77.78%66.67%
   docFormatCreateRequest.ts85.71%77.78%66.67%
   docFormatData.ts86.67%80.00%64.71%
   docFormatDataPlatform.ts86.67%80.00%64.71%
   docFormatHtmlData.ts86.67%80.00%64.71%
   docFormatItem.ts68.57%77.78%66.67%
   docFormatMarkdownData.ts86.67%80.00%64.71%
   documentCreateRequest.ts85.71%77.78%66.67%
   documentData.ts88.89%77.78%66.67%
   documentDataResponse.ts88.89%77.78%66.67%
   documentDataResponsePlatformcreateitemsinbulkusingfilefromdevice.ts88.89%77.78%66.67%
   documentItem.ts97.22%88.89%66.67%
   documentItemPlatformFileUpload.ts66.67%77.78%66.67%
   documentUpdateRequest.ts82.76%77.78%66.67%
   documentUrlData.ts88.89%77.78%66.67%
   documentUrlDataChanges.ts88.89%77.78%66.67%
   documentUrlDataPlatformbulkcreateoperation.ts88.89%77.78%66.67%
   embedCreateRequest.ts82.76%77.78%66.67%
   embedData.ts72.22%80.00%64.71%
   embedDataResponse.ts72.22%80.00%64.71%
   embedItem.ts97.22%88.89%66.67%
   embedUpdateRequest.ts82.76%77.78%66.67%
   embedUrlData.ts86.67%80.00%64.71%
   embedUrlDataChanges.ts86.67%80.00%64.71%
   embedUrlDataPlatformbulkcreateoperation.ts86.67%80.00%64.71%
   enterpriseGetOrganizationMembers200Response.ts80.00%77.78%66.67%
   enterpriseUpdateBoardExportJob200Response.ts92.31%77.78%66.67%
   enterpriseUpdateBoardExportJob200ResponseStatus.ts92.31%77.78%66.67%
Table truncated to fit comment

🤖 comment via lucassabreu/comment-coverage-clover

@kirillsud
kirillsud enabled auto-merge (squash) June 30, 2026 07:21
@kirillsud
kirillsud merged commit 732ed37 into main Jun 30, 2026
2 checks passed
@kirillsud
kirillsud deleted the CADE-2516-oauth-token-context-rename branch June 30, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant