Skip to content

CEXT-6318: Create a separate package for Admin UI SDK#489

Merged
oshmyheliuk merged 11 commits into
mainfrom
CEXT-6318
Jun 3, 2026
Merged

CEXT-6318: Create a separate package for Admin UI SDK#489
oshmyheliuk merged 11 commits into
mainfrom
CEXT-6318

Conversation

@oshmyheliuk

@oshmyheliuk oshmyheliuk commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR is a part of #426. As ACL will need a rework based on the new structure, the new package for the admin ui can be delivered separately.

https://jira.corp.adobe.com/browse/CEXT-6318

Motivation and Context

To align with other packages for eventing/webhook, the admin ui API should also be extracted to a separate package.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have read the DEVELOPMENT document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@changeset-bot

changeset-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6cc7292

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@adobe/aio-commerce-lib-app Patch
@adobe/aio-commerce-sdk Minor
@adobe/aio-commerce-lib-admin-ui Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added pkg: aio-commerce-sdk Includes changes in `packages/aio-commerce-sdk` with-changeset The PR contains a Changeset file. pkg: aio-commerce-lib-app Includes changes in `packages/aio-commerce-lib-app` labels Jun 2, 2026
Comment thread packages/aio-commerce-lib-admin-ui/source/api/extensions/schema.ts

@obarcelonap obarcelonap left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, please review the publication config in package.json and the snake case in registering extension payload.

Comment thread packages/aio-commerce-lib-admin-ui/package.json
Comment thread packages/aio-commerce-lib-admin-ui/source/lib/api-client.ts Outdated
Comment thread packages/aio-commerce-lib-admin-ui/source/api/extensions/schema.ts
`adminuisdk/extension/${workspaceName}/${extensionName}`,
fetchOptions,
)
.then((_res) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just await the deletion without this then block

await httpClient.delete(
  `adminuisdk/extension/${workspaceName}/${extensionName}`,
  fetchOptions,
);

@iivvaannxx iivvaannxx Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@obarcelonap It depends, actually. For example, we did this with the event subscriptions endpoint, and for some reason, it always returned [] (not sure if it was a Commerce API thing specific to that endpoint). That's why I suggested to him to use .then without a return value to force void and ensure it even if the API changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I proposed to await without returning so you still get Promise<Void> as return type. In any case not a blocker.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I didn't understand. Works both ways, I don't have a strong opinion.

@github-actions github-actions Bot added the generator Includes changes to any of the `turbo/generators` label Jun 3, 2026
@iivvaannxx

Copy link
Copy Markdown
Collaborator

It was already in camelCase in the current implementation, and it seems to work in both formats for the AdminUI SDK API. But yes, probably it's better to change to the documentation format

So I just remembered that @capape explained a related issue to me just yesterday, and asked him what the reason might be. Turns out Commerce converts everything to camelCase before deserialization, that's why it seems to work anyway. You could say it's not a bug, but a feature 🤣

FYI @obarcelonap @oshmyheliuk

@capape Correct me if I understood wrong 🙈

@oshmyheliuk oshmyheliuk merged commit d227e47 into main Jun 3, 2026
5 checks passed
@oshmyheliuk oshmyheliuk deleted the CEXT-6318 branch June 3, 2026 16:13
@github-actions github-actions Bot mentioned this pull request Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

generator Includes changes to any of the `turbo/generators` pkg: aio-commerce-lib-app Includes changes in `packages/aio-commerce-lib-app` pkg: aio-commerce-sdk Includes changes in `packages/aio-commerce-sdk` with-changeset The PR contains a Changeset file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants