feat: expose openItemPurchase types to scenes - #1541
Open
juanmahidalgo wants to merge 9 commits into
Open
Conversation
Deploying js-sdk-toolchain with
|
| Latest commit: |
ad09826
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c5a30805.js-sdk-toolchain.pages.dev |
| Branch Preview URL: | https://feat-open-item-purchase-from.js-sdk-toolchain.pages.dev |
Signed-off-by: davidejensen <davidejensen@live.it>
Signed-off-by: davidejensen <davidejensen@live.it>
davidejensen
marked this pull request as ready for review
August 13, 2026 13:31
Signed-off-by: davidejensen <davidejensen@live.it>
Signed-off-by: davidejensen <davidejensen@live.it>
The lockfile integrity hash was from the old commit-2faaa7a tarball, not the current commit-f68310e build. npm fails with EINTEGRITY because the CDN tarball was rebuilt after the lockfile was generated.
Contributor
Test this pull request
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft: pinned to a branch build of the protocol PR this depends on. See "Before this can merge".
Depends on decentraland/protocol#462. Client implementation: decentraland/unity-explorer#9725.
Changes
Bumps
@dcl/protocolso scene authors get types for the newopenItemPurchaserestricted action:That is the whole change — four lines across two
package.jsonfiles and their lockfiles. Nothing else is needed here because~system/*types are generated from the pinned protocol at build time and are not committed, and no hand-written TypeScript wraps these calls: the entire~system/RestrictedActionssurface is generated.Verified locally with node 24.16.0 that the generated
scripts/rpc-api-generation/src/proto/decentraland/kernel/apis/restricted_actions.gen.tsnow containsopenItemPurchaseand theOpenItemPurchaseResultenum, and that the enum's member names match the runtimevalues the client exposes — that pairing matters, because the scene imports the type from here and the
value from the client, so a name mismatch would typecheck and then read
undefinedat runtime.Two things a reviewer should know
The API report was left out on purpose.
make buildregeneratespackages/@dcl/playground-assets/etc/playground-assets.api.mdwith 68 deletions — it dropsExplorerUi,ExplorerUiEventsResultandcore::ExplorerUiEventsResult. That is not caused by this bump: no proto inthe currently pinned protocol build (
commit-2c475cb) mentionsExplorerUiEventsResultat all, so thecommitted report cannot have been produced from it — it was committed from a build made against the
feat/explorer-ui-events-resultprotocol branch. Regenerating it here would make this PR look like itdeletes public API, so the file is untouched and the drift is left for whoever owns that feature. Happy to
split it into its own PR if you would rather have it reconciled.
The lockfile diff is only the protocol entries.
npm cifails onmainwith npm 10 (Missing: glob@10.5.0 from lock file), but that is an artifact of the older npm — with npm 11 (node 24.16.0, what CI uses) theinstall is clean and the lockfile change is 8 lines, all
@dcl/protocol.Before this can merge
The pin points at a branch build of the protocol PR (
dcl-protocol-1.0.0-31508413180.commit-2faaa7a). Oncedecentraland/protocol#462 merges and publishes from
main, this needs a re-pin to that release. That is theonly reason it is a draft.
Test plan
make installandmake buildwith node 24.16.0 — type checking clean, 38 tests passingrestricted_actions.gen.tsexposesopenItemPurchaseandOpenItemPurchaseResultRestrictedActions.jsexposes at runtime, one to one@dcl/protocolopenItemPurchasecompiles and runs end to end against the client in feat: let scenes offer marketplace items for credits unity-explorer#9725 (purchase completed on Amoy, verdict returned, scene reacted)