@misofm/platform 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +309 -204
- package/dist/Miso.d.ts +403 -0
- package/dist/Miso.d.ts.map +1 -0
- package/dist/Miso.js +455 -0
- package/dist/Miso.js.map +1 -0
- package/dist/auth.d.ts +11 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +16 -3
- package/dist/auth.js.map +1 -1
- package/dist/catalog.d.ts +8 -5
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +36 -19
- package/dist/catalog.js.map +1 -1
- package/dist/client.d.ts +52 -443
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +58 -775
- package/dist/client.js.map +1 -1
- package/dist/contracts/composition_credits/composition_credits.d.ts +38 -48
- package/dist/contracts/composition_credits/composition_credits.d.ts.map +1 -1
- package/dist/contracts/composition_credits/composition_credits.js +20 -4
- package/dist/contracts/composition_credits/composition_credits.js.map +1 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts +64 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts.map +1 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js +66 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +52 -4
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +52 -4
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -1
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.d.ts +63 -1
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.d.ts.map +1 -1
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.js +63 -1
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.js.map +1 -1
- package/dist/contracts/genre/genre.d.ts +10 -1
- package/dist/contracts/genre/genre.d.ts.map +1 -1
- package/dist/contracts/genre/genre.js +8 -1
- package/dist/contracts/genre/genre.js.map +1 -1
- package/dist/contracts/miso_pay/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/miso_pay/deps/std/type_name.js.map +1 -0
- package/dist/contracts/miso_pay/pay.d.ts +209 -0
- package/dist/contracts/miso_pay/pay.d.ts.map +1 -0
- package/dist/contracts/miso_pay/pay.js +195 -0
- package/dist/contracts/miso_pay/pay.js.map +1 -0
- package/dist/contracts/party_cta/party_cta.d.ts +49 -3
- package/dist/contracts/party_cta/party_cta.d.ts.map +1 -1
- package/dist/contracts/party_cta/party_cta.js +27 -5
- package/dist/contracts/party_cta/party_cta.js.map +1 -1
- package/dist/contracts/party_genre/party_genre.d.ts +25 -0
- package/dist/contracts/party_genre/party_genre.d.ts.map +1 -1
- package/dist/contracts/party_genre/party_genre.js +14 -3
- package/dist/contracts/party_genre/party_genre.js.map +1 -1
- package/dist/contracts/party_media/party_media.d.ts +19 -3
- package/dist/contracts/party_media/party_media.d.ts.map +1 -1
- package/dist/contracts/party_media/party_media.js +20 -4
- package/dist/contracts/party_media/party_media.js.map +1 -1
- package/dist/contracts/party_platform_link/party_platform_link.d.ts +15 -7
- package/dist/contracts/party_platform_link/party_platform_link.d.ts.map +1 -1
- package/dist/contracts/party_platform_link/party_platform_link.js +15 -7
- package/dist/contracts/party_platform_link/party_platform_link.js.map +1 -1
- package/dist/contracts/party_profile/party_profile.d.ts +63 -8
- package/dist/contracts/party_profile/party_profile.d.ts.map +1 -1
- package/dist/contracts/party_profile/party_profile.js +33 -8
- package/dist/contracts/party_profile/party_profile.js.map +1 -1
- package/dist/contracts/party_roles/party_roles.d.ts +28 -3
- package/dist/contracts/party_roles/party_roles.d.ts.map +1 -1
- package/dist/contracts/party_roles/party_roles.js +19 -4
- package/dist/contracts/party_roles/party_roles.js.map +1 -1
- package/dist/contracts/party_tags/party_tags.d.ts +23 -3
- package/dist/contracts/party_tags/party_tags.d.ts.map +1 -1
- package/dist/contracts/party_tags/party_tags.js +16 -4
- package/dist/contracts/party_tags/party_tags.js.map +1 -1
- package/dist/contracts/party_wallet/party_wallet.d.ts +4 -1
- package/dist/contracts/party_wallet/party_wallet.d.ts.map +1 -1
- package/dist/contracts/party_wallet/party_wallet.js +2 -1
- package/dist/contracts/party_wallet/party_wallet.js.map +1 -1
- package/dist/contracts/platform_link/platform_link.d.ts +207 -0
- package/dist/contracts/platform_link/platform_link.d.ts.map +1 -0
- package/dist/contracts/platform_link/platform_link.js +209 -0
- package/dist/contracts/platform_link/platform_link.js.map +1 -0
- package/dist/contracts/record/pressing.d.ts +53 -7
- package/dist/contracts/record/pressing.d.ts.map +1 -1
- package/dist/contracts/record/pressing.js +50 -4
- package/dist/contracts/record/pressing.js.map +1 -1
- package/dist/contracts/record/record.d.ts +14 -0
- package/dist/contracts/record/record.d.ts.map +1 -1
- package/dist/contracts/record/record.js +15 -1
- package/dist/contracts/record/record.js.map +1 -1
- package/dist/contracts/record_shop/listing.d.ts +80 -35
- package/dist/contracts/record_shop/listing.d.ts.map +1 -1
- package/dist/contracts/record_shop/listing.js +76 -13
- package/dist/contracts/record_shop/listing.js.map +1 -1
- package/dist/contracts/recording_advisory/recording_advisory.d.ts +15 -15
- package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -1
- package/dist/contracts/recording_advisory/recording_advisory.js +15 -8
- package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -1
- package/dist/contracts/recording_credits/recording_credits.d.ts +95 -1350
- package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -1
- package/dist/contracts/recording_credits/recording_credits.js +63 -12
- package/dist/contracts/recording_credits/recording_credits.js.map +1 -1
- package/dist/contracts/recording_engine_session/recording_engine_session.d.ts +30 -49
- package/dist/contracts/recording_engine_session/recording_engine_session.d.ts.map +1 -1
- package/dist/contracts/recording_engine_session/recording_engine_session.js +19 -4
- package/dist/contracts/recording_engine_session/recording_engine_session.js.map +1 -1
- package/dist/contracts/recording_genre/recording_genre.d.ts +67 -9
- package/dist/contracts/recording_genre/recording_genre.d.ts.map +1 -1
- package/dist/contracts/recording_genre/recording_genre.js +53 -9
- package/dist/contracts/recording_genre/recording_genre.js.map +1 -1
- package/dist/contracts/recording_language/recording_language.d.ts +29 -5
- package/dist/contracts/recording_language/recording_language.d.ts.map +1 -1
- package/dist/contracts/recording_language/recording_language.js +18 -5
- package/dist/contracts/recording_language/recording_language.js.map +1 -1
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +25 -15
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts.map +1 -1
- package/dist/contracts/recording_master_reference/recording_master_reference.js +18 -5
- package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +55 -4
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +55 -4
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -1
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.d.ts +66 -1
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.d.ts.map +1 -1
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.js +66 -1
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.js.map +1 -1
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.d.ts +12 -9
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.d.ts.map +1 -1
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.js +11 -4
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.js.map +1 -1
- package/dist/contracts/release_cover_art/release_cover_art.d.ts +168 -74
- package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -1
- package/dist/contracts/release_cover_art/release_cover_art.js +126 -10
- package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -1
- package/dist/contracts/release_credits/release_credits.d.ts +24 -28
- package/dist/contracts/release_credits/release_credits.d.ts.map +1 -1
- package/dist/contracts/release_credits/release_credits.js +18 -4
- package/dist/contracts/release_credits/release_credits.js.map +1 -1
- package/dist/contracts/release_description/release_description.d.ts +16 -5
- package/dist/contracts/release_description/release_description.d.ts.map +1 -1
- package/dist/contracts/release_description/release_description.js +9 -4
- package/dist/contracts/release_description/release_description.js.map +1 -1
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts +130 -160
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts.map +1 -1
- package/dist/contracts/release_dsp_link/release_dsp_link.js +74 -19
- package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -1
- package/dist/contracts/release_genre/release_genre.d.ts +66 -11
- package/dist/contracts/release_genre/release_genre.d.ts.map +1 -1
- package/dist/contracts/release_genre/release_genre.js +52 -11
- package/dist/contracts/release_genre/release_genre.js.map +1 -1
- package/dist/contracts/release_kind/release_kind.d.ts +28 -5
- package/dist/contracts/release_kind/release_kind.d.ts.map +1 -1
- package/dist/contracts/release_kind/release_kind.js +19 -4
- package/dist/contracts/release_kind/release_kind.js.map +1 -1
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts +17 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts.map +1 -1
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js +15 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js.map +1 -1
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.d.ts +37 -1
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.d.ts.map +1 -1
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.js +37 -1
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.js.map +1 -1
- package/dist/contracts/routed_stake/routed_stake.d.ts +78 -6
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -1
- package/dist/contracts/routed_stake/routed_stake.js +79 -7
- package/dist/contracts/routed_stake/routed_stake.js.map +1 -1
- package/dist/contracts/royalty_pool/pool.d.ts +117 -27
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/pool.js +117 -28
- package/dist/contracts/royalty_pool/pool.js.map +1 -1
- package/dist/contracts/royalty_pool/stake.d.ts +3 -0
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/stake.js +5 -2
- package/dist/contracts/royalty_pool/stake.js.map +1 -1
- package/dist/contracts/share/share.d.ts +80 -0
- package/dist/contracts/share/share.d.ts.map +1 -0
- package/dist/contracts/share/share.js +72 -0
- package/dist/contracts/share/share.js.map +1 -0
- package/dist/contracts/vault/vault.d.ts +51 -0
- package/dist/contracts/vault/vault.d.ts.map +1 -1
- package/dist/contracts/vault/vault.js +55 -4
- package/dist/contracts/vault/vault.js.map +1 -1
- package/dist/contracts.d.ts +60 -0
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +17 -0
- package/dist/contracts.js.map +1 -1
- package/dist/cover.d.ts +5 -6
- package/dist/cover.d.ts.map +1 -1
- package/dist/cover.js +10 -10
- package/dist/cover.js.map +1 -1
- package/dist/credits.d.ts +12 -13
- package/dist/credits.d.ts.map +1 -1
- package/dist/credits.js +16 -10
- package/dist/credits.js.map +1 -1
- package/dist/deployments.d.ts +3 -3
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +2 -3
- package/dist/deployments.js.map +1 -1
- package/dist/errors.d.ts +24 -9
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +43 -16
- package/dist/errors.js.map +1 -1
- package/dist/events.d.ts +1687 -835
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +258 -39
- package/dist/events.js.map +1 -1
- package/dist/genre.d.ts +11 -12
- package/dist/genre.d.ts.map +1 -1
- package/dist/genre.js +5 -3
- package/dist/genre.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/packages.d.ts +1047 -1695
- package/dist/packages.d.ts.map +1 -1
- package/dist/party/client.d.ts +113 -296
- package/dist/party/client.d.ts.map +1 -1
- package/dist/party/client.js +93 -178
- package/dist/party/client.js.map +1 -1
- package/dist/party/extensions/ctas.d.ts +3 -3
- package/dist/party/extensions/ctas.d.ts.map +1 -1
- package/dist/party/extensions/genres.d.ts +4 -4
- package/dist/party/extensions/genres.d.ts.map +1 -1
- package/dist/party/extensions/links.d.ts +5 -5
- package/dist/party/extensions/links.d.ts.map +1 -1
- package/dist/party/extensions/links.js.map +1 -1
- package/dist/party/extensions/media.d.ts +3 -3
- package/dist/party/extensions/media.d.ts.map +1 -1
- package/dist/party/extensions/profile.d.ts +3 -3
- package/dist/party/extensions/profile.d.ts.map +1 -1
- package/dist/party/extensions/roles.d.ts +4 -4
- package/dist/party/extensions/roles.d.ts.map +1 -1
- package/dist/party/extensions/roles.js.map +1 -1
- package/dist/party/extensions/tags.d.ts +4 -4
- package/dist/party/extensions/tags.d.ts.map +1 -1
- package/dist/party/index.d.ts +1 -1
- package/dist/party/index.d.ts.map +1 -1
- package/dist/party/index.js.map +1 -1
- package/dist/party/queries.d.ts +8 -8
- package/dist/party/queries.d.ts.map +1 -1
- package/dist/party/queries.js +83 -56
- package/dist/party/queries.js.map +1 -1
- package/dist/pressing.d.ts +13 -15
- package/dist/pressing.d.ts.map +1 -1
- package/dist/pressing.js +99 -29
- package/dist/pressing.js.map +1 -1
- package/dist/publication.d.ts +13 -6
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +26 -21
- package/dist/publication.js.map +1 -1
- package/dist/queries.js +3 -3
- package/dist/queries.js.map +1 -1
- package/dist/read/artist.d.ts +4 -3
- package/dist/read/artist.d.ts.map +1 -1
- package/dist/read/artist.js +24 -8
- package/dist/read/artist.js.map +1 -1
- package/dist/read/catalog.d.ts +17 -16
- package/dist/read/catalog.d.ts.map +1 -1
- package/dist/read/catalog.js +25 -11
- package/dist/read/catalog.js.map +1 -1
- package/dist/read/client.d.ts +41 -20
- package/dist/read/client.d.ts.map +1 -1
- package/dist/read/client.js +20 -12
- package/dist/read/client.js.map +1 -1
- package/dist/read/config.d.ts +25 -3
- package/dist/read/config.d.ts.map +1 -1
- package/dist/read/config.js +42 -25
- package/dist/read/config.js.map +1 -1
- package/dist/read/genres.d.ts +8 -3
- package/dist/read/genres.d.ts.map +1 -1
- package/dist/read/genres.js +23 -17
- package/dist/read/genres.js.map +1 -1
- package/dist/read/index.d.ts +1 -1
- package/dist/read/index.d.ts.map +1 -1
- package/dist/read/index.js +8 -6
- package/dist/read/index.js.map +1 -1
- package/dist/read/receipts.d.ts +5 -4
- package/dist/read/receipts.d.ts.map +1 -1
- package/dist/read/receipts.js +94 -46
- package/dist/read/receipts.js.map +1 -1
- package/dist/read/royalties.d.ts +6 -5
- package/dist/read/royalties.d.ts.map +1 -1
- package/dist/read/royalties.js +16 -9
- package/dist/read/royalties.js.map +1 -1
- package/dist/read/wallet.d.ts +23 -12
- package/dist/read/wallet.d.ts.map +1 -1
- package/dist/read/wallet.js +158 -177
- package/dist/read/wallet.js.map +1 -1
- package/dist/read/works.d.ts +6 -6
- package/dist/read/works.d.ts.map +1 -1
- package/dist/read/works.js +40 -26
- package/dist/read/works.js.map +1 -1
- package/dist/recording-extensions.d.ts +15 -16
- package/dist/recording-extensions.d.ts.map +1 -1
- package/dist/recording-extensions.js +12 -8
- package/dist/recording-extensions.js.map +1 -1
- package/dist/release-extensions.d.ts +5 -6
- package/dist/release-extensions.d.ts.map +1 -1
- package/dist/release-extensions.js +3 -2
- package/dist/release-extensions.js.map +1 -1
- package/dist/release-graph.d.ts +2 -2
- package/dist/release-graph.d.ts.map +1 -1
- package/dist/release-graph.js.map +1 -1
- package/dist/royalty.d.ts +4 -4
- package/dist/royalty.d.ts.map +1 -1
- package/dist/royalty.js +16 -7
- package/dist/royalty.js.map +1 -1
- package/dist/share.d.ts +58 -24
- package/dist/share.d.ts.map +1 -1
- package/dist/share.js +167 -92
- package/dist/share.js.map +1 -1
- package/dist/transactions.d.ts +15 -6
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +1 -0
- package/dist/transactions.js.map +1 -1
- package/dist/vault.d.ts +13 -3
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +22 -16
- package/dist/vault.js.map +1 -1
- package/package.json +9 -8
- package/src/Miso.ts +951 -0
- package/src/auth.ts +16 -3
- package/src/catalog.ts +58 -25
- package/src/client.ts +98 -1359
- package/src/contracts/composition_credits/composition_credits.ts +20 -4
- package/src/contracts/composition_routed_stake/composition_routed_stake.ts +67 -1
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +53 -4
- package/src/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.ts +64 -1
- package/src/contracts/genre/genre.ts +8 -1
- package/src/contracts/miso_pay/pay.ts +356 -0
- package/src/contracts/party_cta/party_cta.ts +27 -5
- package/src/contracts/party_genre/party_genre.ts +14 -3
- package/src/contracts/party_media/party_media.ts +20 -4
- package/src/contracts/party_platform_link/party_platform_link.ts +15 -7
- package/src/contracts/party_profile/party_profile.ts +33 -8
- package/src/contracts/party_roles/party_roles.ts +19 -4
- package/src/contracts/party_tags/party_tags.ts +16 -4
- package/src/contracts/party_wallet/party_wallet.ts +2 -1
- package/src/contracts/platform_link/platform_link.ts +322 -0
- package/src/contracts/record/pressing.ts +50 -4
- package/src/contracts/record/record.ts +15 -1
- package/src/contracts/record_shop/listing.ts +76 -13
- package/src/contracts/recording_advisory/recording_advisory.ts +15 -8
- package/src/contracts/recording_credits/recording_credits.ts +63 -12
- package/src/contracts/recording_engine_session/recording_engine_session.ts +19 -4
- package/src/contracts/recording_genre/recording_genre.ts +53 -9
- package/src/contracts/recording_language/recording_language.ts +18 -5
- package/src/contracts/recording_master_reference/recording_master_reference.ts +18 -5
- package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +56 -4
- package/src/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.ts +67 -1
- package/src/contracts/recording_streaming_transcode/recording_streaming_transcode.ts +11 -4
- package/src/contracts/release_cover_art/release_cover_art.ts +126 -10
- package/src/contracts/release_credits/release_credits.ts +18 -4
- package/src/contracts/release_description/release_description.ts +9 -4
- package/src/contracts/release_dsp_link/release_dsp_link.ts +74 -19
- package/src/contracts/release_genre/release_genre.ts +52 -11
- package/src/contracts/release_kind/release_kind.ts +19 -4
- package/src/contracts/release_revenue_distributor/release_revenue_distributor.ts +15 -0
- package/src/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.ts +38 -1
- package/src/contracts/routed_stake/routed_stake.ts +79 -7
- package/src/contracts/royalty_pool/pool.ts +140 -38
- package/src/contracts/royalty_pool/stake.ts +5 -2
- package/src/contracts/share/share.ts +97 -0
- package/src/contracts/vault/vault.ts +55 -4
- package/src/contracts.ts +18 -0
- package/src/cover.ts +14 -15
- package/src/credits.ts +27 -22
- package/src/deployments.ts +3 -4
- package/src/errors.ts +64 -34
- package/src/events.ts +260 -39
- package/src/genre.ts +15 -14
- package/src/index.ts +19 -10
- package/src/party/client.ts +217 -208
- package/src/party/extensions/ctas.ts +3 -3
- package/src/party/extensions/genres.ts +4 -4
- package/src/party/extensions/links.ts +7 -7
- package/src/party/extensions/media.ts +3 -3
- package/src/party/extensions/profile.ts +3 -3
- package/src/party/extensions/roles.ts +5 -5
- package/src/party/extensions/tags.ts +4 -4
- package/src/party/index.ts +0 -1
- package/src/party/queries.ts +90 -87
- package/src/pressing.ts +132 -89
- package/src/publication.ts +33 -32
- package/src/queries.ts +3 -3
- package/src/read/artist.ts +36 -17
- package/src/read/catalog.ts +68 -36
- package/src/read/client.ts +55 -30
- package/src/read/config.ts +55 -30
- package/src/read/genres.ts +22 -18
- package/src/read/index.ts +8 -6
- package/src/read/receipts.ts +130 -67
- package/src/read/royalties.ts +22 -10
- package/src/read/wallet.ts +226 -216
- package/src/read/works.ts +51 -44
- package/src/recording-extensions.ts +27 -24
- package/src/release-extensions.ts +7 -7
- package/src/release-graph.ts +2 -1
- package/src/royalty.ts +19 -25
- package/src/share.ts +197 -128
- package/src/transactions.ts +15 -8
- package/src/vault.ts +24 -31
- package/dist/contracts/record_shop/deps/std/type_name.d.ts.map +0 -1
- package/dist/contracts/record_shop/deps/std/type_name.js.map +0 -1
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts +0 -6
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts.map +0 -1
- package/dist/contracts/recording_language/deps/language_code/language_code.js +0 -8
- package/dist/contracts/recording_language/deps/language_code/language_code.js.map +0 -1
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.d.ts +0 -24
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.d.ts.map +0 -1
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.js +0 -24
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.js.map +0 -1
- package/dist/contracts/recording_master_reference/deps/ori/data.d.ts +0 -16
- package/dist/contracts/recording_master_reference/deps/ori/data.d.ts.map +0 -1
- package/dist/contracts/recording_master_reference/deps/ori/data.js +0 -12
- package/dist/contracts/recording_master_reference/deps/ori/data.js.map +0 -1
- package/dist/execute.d.ts +0 -32
- package/dist/execute.d.ts.map +0 -1
- package/dist/execute.js +0 -36
- package/dist/execute.js.map +0 -1
- package/src/contracts/recording_language/deps/language_code/language_code.ts +0 -8
- package/src/contracts/recording_master_reference/deps/ori/confidentiality.ts +0 -24
- package/src/contracts/recording_master_reference/deps/ori/data.ts +0 -12
- package/src/execute.ts +0 -56
- /package/dist/contracts/{record_shop → miso_pay}/deps/std/type_name.d.ts +0 -0
- /package/dist/contracts/{record_shop → miso_pay}/deps/std/type_name.js +0 -0
- /package/src/contracts/{record_shop → miso_pay}/deps/std/type_name.ts +0 -0
package/src/party/client.ts
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
// Copyright (c) Miso Labs, Inc.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
//
|
|
5
|
-
// `
|
|
6
|
-
// `
|
|
7
|
-
// `
|
|
8
|
-
//
|
|
4
|
+
// `MisoPartyService`: the party surface consumers reach through
|
|
5
|
+
// `client.miso.party` (misofm/sdks#35, WP3 "party and protocol composition").
|
|
6
|
+
// It is not a `Context.Service` of its own — it is a plain object `Miso`'s
|
|
7
|
+
// `make` assembles from the converted `@misofm/partyos` `Partyos` service (7
|
|
8
|
+
// core delegations) plus this package's own party EXTENSION reads
|
|
9
|
+
// (`party/queries.ts`, already converted in stage 1) and 25 `tx` fragments
|
|
10
|
+
// (9 from `Partyos.tx`, 16 first-party extension builders), bound to one
|
|
11
|
+
// `PartyExtensionsDeployment`. Per sui-effect's `docs/extensions.md` §12
|
|
12
|
+
// ("converting an existing facade", step 3): the service's members are thin —
|
|
13
|
+
// they close over the `Sui` the caller already holds and call the standalone
|
|
14
|
+
// `party/queries.ts` functions, which keeps those functions independently
|
|
15
|
+
// exported and usable without a service.
|
|
16
|
+
//
|
|
17
|
+
// `PartyPlatformClient` — the predecessor hand-written class this replaces —
|
|
18
|
+
// is deleted per the issue's target shape; nothing here holds a client or a
|
|
19
|
+
// signer.
|
|
9
20
|
|
|
10
|
-
import { Effect } from "effect";
|
|
11
21
|
import type { Option } from "effect";
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
22
|
+
import { Effect } from "effect";
|
|
23
|
+
import { Sui, type ObjectId, type Recipe, type DecodeError, type SuiService, type TransportError } from "@unconfirmed/sui-effect";
|
|
24
|
+
import { contracts, derivePartyAdminCapId, type PartyosService } from "@misofm/partyos";
|
|
15
25
|
import type { PartyExtensionsDeployment } from "../deployments.ts";
|
|
16
26
|
import * as queries from "./queries.ts";
|
|
17
27
|
import * as profileExt from "./extensions/profile.ts";
|
|
@@ -43,7 +53,7 @@ type BoundModule<M extends object, Removed extends PropertyKey> = {
|
|
|
43
53
|
};
|
|
44
54
|
|
|
45
55
|
/** Defaults generated calls to one package and removes reference-returning calls. */
|
|
46
|
-
function bindModulePackage<M extends object, K extends readonly (keyof M)[]>(
|
|
56
|
+
export function bindModulePackage<M extends object, K extends readonly (keyof M)[] = readonly []>(
|
|
47
57
|
mod: M,
|
|
48
58
|
pkg: string,
|
|
49
59
|
unavailable: K = [] as unknown as K,
|
|
@@ -53,228 +63,227 @@ function bindModulePackage<M extends object, K extends readonly (keyof M)[]>(
|
|
|
53
63
|
if ((unavailable as readonly string[]).includes(key)) continue;
|
|
54
64
|
out[key] =
|
|
55
65
|
typeof value === "function"
|
|
56
|
-
|
|
66
|
+
// `pkg` always wins — matches `Miso.ts`'s own `bindModulePackage`
|
|
67
|
+
// (C item, misofm/sdks#35 verification): the bound package is fixed,
|
|
68
|
+
// not a default a caller can quietly override via an unsafe cast
|
|
69
|
+
// past `BoundModule`'s `Omit<Options, "package">`.
|
|
70
|
+
? (options: { package?: string }) => (value as (o: unknown) => unknown)({ ...options, package: pkg })
|
|
57
71
|
: value;
|
|
58
72
|
}
|
|
59
73
|
return out as BoundModule<M, K[number]>;
|
|
60
74
|
}
|
|
61
75
|
|
|
76
|
+
/** The 25 `tx` fragments `MisoPartyService.tx` exposes: 9 delegated from `Partyos.tx`, 16 first-party extensions. */
|
|
77
|
+
export type PartyTxBuilders = PartyosService["tx"] & {
|
|
78
|
+
readonly setProfile: (p: Omit<profileExt.SetProfileParams, "partyProfilePackageId" | "countryCodePackageId" | "languageCodePackageId">) => Recipe;
|
|
79
|
+
readonly clearProfile: (p: Omit<profileExt.ClearProfileParams, "partyProfilePackageId">) => Recipe;
|
|
80
|
+
readonly setMedia: (p: Omit<mediaExt.SetMediaParams, "partyMediaPackageId">) => Recipe;
|
|
81
|
+
readonly clearMedia: (p: Omit<mediaExt.ClearMediaParams, "partyMediaPackageId">) => Recipe;
|
|
82
|
+
readonly addRole: (p: Omit<rolesExt.AddRoleParams, "partyRolesPackageId">) => Recipe;
|
|
83
|
+
readonly removeRole: (p: Omit<rolesExt.RemoveRoleParams, "partyRolesPackageId">) => Recipe;
|
|
84
|
+
readonly clearRoles: (p: Omit<rolesExt.ClearRolesParams, "partyRolesPackageId">) => Recipe;
|
|
85
|
+
readonly addTag: (p: Omit<tagsExt.AddTagParams, "partyTagsPackageId">) => Recipe;
|
|
86
|
+
readonly removeTag: (p: Omit<tagsExt.RemoveTagParams, "partyTagsPackageId">) => Recipe;
|
|
87
|
+
readonly clearTags: (p: Omit<tagsExt.ClearTagsParams, "partyTagsPackageId">) => Recipe;
|
|
88
|
+
readonly addGenre: (p: Omit<genresExt.AddGenreParams, "partyGenrePackageId">) => Recipe;
|
|
89
|
+
readonly removeGenre: (p: Omit<genresExt.RemoveGenreParams, "partyGenrePackageId">) => Recipe;
|
|
90
|
+
readonly clearGenres: (p: Omit<genresExt.ClearGenresParams, "partyGenrePackageId">) => Recipe;
|
|
91
|
+
readonly setCtas: (p: Omit<ctasExt.SetCtasParams, "partyCtaPackageId">) => Recipe;
|
|
92
|
+
readonly clearCtas: (p: Omit<ctasExt.ClearCtasParams, "partyCtaPackageId">) => Recipe;
|
|
93
|
+
readonly setLink: (platform: PlatformKey, p: linksExt.BoundSetLinkParams) => Recipe;
|
|
94
|
+
readonly clearLink: (platform: PlatformKey, p: linksExt.BoundClearLinkParams) => Recipe;
|
|
95
|
+
} & linksExt.LinkTxBuilders;
|
|
96
|
+
|
|
62
97
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* and
|
|
66
|
-
*
|
|
98
|
+
* The party surface at `client.miso.party`: the converted `@misofm/partyos`
|
|
99
|
+
* core (delegated, unchanged) plus this package's own party EXTENSION reads
|
|
100
|
+
* and transaction fragments, bound to one `PartyExtensionsDeployment`.
|
|
101
|
+
*
|
|
102
|
+
* Declared as an object type alias, not an `interface` — sui-effect 0.1.0's
|
|
103
|
+
* `PromiseFace<S>` recurses only into members assignable to
|
|
104
|
+
* `Record<string, unknown>`, and an `interface` (unlike a type alias's object
|
|
105
|
+
* literal) is not, so `client.miso.party` would keep typing every member here
|
|
106
|
+
* as `Effect`-returning while the derived Promise face maps them to
|
|
107
|
+
* Promise-returning methods at runtime (misofm/sdks#35 verification, A1). See
|
|
108
|
+
* `docs/CONVERSION.md` "Stage 5".
|
|
67
109
|
*/
|
|
68
|
-
export
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
#ctaPkg: string;
|
|
79
|
-
#platformLinkPkg: string;
|
|
80
|
-
#socialPkg: string;
|
|
81
|
-
#musicPkg: string;
|
|
82
|
-
#proLinkPkg: string;
|
|
83
|
-
|
|
84
|
-
constructor(client: ClientWithCoreApi, core: PartyosClient, extensions: PartyExtensionsDeployment) {
|
|
85
|
-
this.#core = core;
|
|
86
|
-
this.#layer = SuiClient.layer(client);
|
|
87
|
-
this.#profilePkg = extensions.partyProfile;
|
|
88
|
-
this.#countryCodePkg = extensions.countryCode;
|
|
89
|
-
this.#languageCodePkg = extensions.languageCode;
|
|
90
|
-
this.#mediaPkg = extensions.partyMedia;
|
|
91
|
-
this.#rolesPkg = extensions.partyRoles;
|
|
92
|
-
this.#tagsPkg = extensions.partyTags;
|
|
93
|
-
this.#partyGenrePkg = extensions.partyGenre;
|
|
94
|
-
this.#ctaPkg = extensions.partyCta;
|
|
95
|
-
this.#platformLinkPkg = extensions.partyPlatformLink;
|
|
96
|
-
this.#socialPkg = extensions.partySocial;
|
|
97
|
-
this.#musicPkg = extensions.partyMusic;
|
|
98
|
-
this.#proLinkPkg = extensions.partyProLink;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/** The wrapped Party-core client (identity, admin caps, group membership). */
|
|
102
|
-
get core(): PartyosClient {
|
|
103
|
-
return this.#core;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/** Provides the bound `SuiClient` layer, dropping `R` to `never`. */
|
|
107
|
-
#provide<A, E>(effect: Effect.Effect<A, E, SuiClient>): Effect.Effect<A, E> {
|
|
108
|
-
return effect.pipe(Effect.provide(this.#layer));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// === Core (delegated to `PartyosClient`) ===
|
|
112
|
-
|
|
113
|
-
getPartyById(partyId: string): Effect.Effect<Party, ObjectNotFoundError | ObjectTypeMismatchError | BcsDecodeError | SuiRpcError> {
|
|
114
|
-
return this.#core.getPartyById(partyId);
|
|
115
|
-
}
|
|
116
|
-
getPartiesByIds(
|
|
117
|
-
partyIds: readonly string[],
|
|
118
|
-
): Effect.Effect<Partial<Record<string, Party>>, ObjectTypeMismatchError | BcsDecodeError | SuiRpcError> {
|
|
119
|
-
return this.#core.getPartiesByIds(partyIds);
|
|
120
|
-
}
|
|
121
|
-
derivePartyAdminCapId(partyId: string): string {
|
|
122
|
-
return this.#core.derivePartyAdminCapId(partyId);
|
|
123
|
-
}
|
|
124
|
-
/** Group ids a party belongs to (member-side membership records). */
|
|
125
|
-
getMemberships(partyId: string): Effect.Effect<string[], SuiRpcError> {
|
|
126
|
-
return this.#core.getMemberships(partyId);
|
|
127
|
-
}
|
|
128
|
-
/** Member ids invited to a group but not yet accepted. */
|
|
129
|
-
getPendingInvites(groupId: string): Effect.Effect<string[], SuiRpcError> {
|
|
130
|
-
return this.#core.getPendingInvites(groupId);
|
|
131
|
-
}
|
|
132
|
-
/** Group ids that have invited this party but are awaiting its response. */
|
|
133
|
-
getPendingMemberships(partyId: string): Effect.Effect<string[], SuiRpcError> {
|
|
134
|
-
return this.#core.getPendingMemberships(partyId);
|
|
135
|
-
}
|
|
136
|
-
/** Whether a party is a member of a group. */
|
|
137
|
-
isMember(memberId: string, groupId: string): Effect.Effect<boolean, SuiRpcError> {
|
|
138
|
-
return this.#core.isMember(memberId, groupId);
|
|
139
|
-
}
|
|
110
|
+
export type MisoPartyService = {
|
|
111
|
+
// === Core (delegated to `Partyos`) ===
|
|
112
|
+
readonly getPartyById: PartyosService["getPartyById"];
|
|
113
|
+
readonly getPartiesByIds: PartyosService["getPartiesByIds"];
|
|
114
|
+
/** Derives a party's `PartyAdminCap` id (it is a `derived_object` off the party UID). Never fails. */
|
|
115
|
+
readonly derivePartyAdminCapId: (partyId: string) => ObjectId;
|
|
116
|
+
readonly getMemberships: PartyosService["getMemberships"];
|
|
117
|
+
readonly getPendingInvites: PartyosService["getPendingInvites"];
|
|
118
|
+
readonly getPendingMemberships: PartyosService["getPendingMemberships"];
|
|
119
|
+
readonly isMember: PartyosService["isMember"];
|
|
140
120
|
|
|
141
|
-
// === Extension queries ===
|
|
121
|
+
// === Extension queries (this package's own) ===
|
|
122
|
+
/** Fails with: `DecodeError`, `TransportError`. */
|
|
123
|
+
readonly getProfile: (partyId: string) => Effect.Effect<Option.Option<Profile>, DecodeError | TransportError>;
|
|
124
|
+
/** Fails with: `DecodeError`, `TransportError`. */
|
|
125
|
+
readonly getMedia: (partyId: string) => Effect.Effect<Option.Option<Media>, DecodeError | TransportError>;
|
|
126
|
+
/** The party's artist-type roles (display names), or `[]`. Fails with: `DecodeError`, `TransportError`. */
|
|
127
|
+
readonly getRoles: (partyId: string) => Effect.Effect<string[], DecodeError | TransportError>;
|
|
128
|
+
/** The party's free-form tags, or `[]`. Fails with: `DecodeError`, `TransportError`. */
|
|
129
|
+
readonly getTags: (partyId: string) => Effect.Effect<string[], DecodeError | TransportError>;
|
|
130
|
+
/** The party's genre object ids, or `[]`. Fails with: `DecodeError`, `TransportError`. */
|
|
131
|
+
readonly getGenres: (partyId: string) => Effect.Effect<string[], DecodeError | TransportError>;
|
|
132
|
+
/** The party's ordered CTA list (position is priority), or `[]`. Fails with: `DecodeError`, `TransportError`. */
|
|
133
|
+
readonly getCtas: (partyId: string) => Effect.Effect<Cta[], DecodeError | TransportError>;
|
|
134
|
+
/** All external-platform links attached to the party. Fails with: `DecodeError`, `TransportError`. */
|
|
135
|
+
readonly getLinks: (partyId: string) => Effect.Effect<PlatformLink[], DecodeError | TransportError>;
|
|
142
136
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
137
|
+
/**
|
|
138
|
+
* The 25 `tx` fragments (9 delegated from `Partyos.tx`, 16 first-party
|
|
139
|
+
* extension builders) with every package id bound to this deployment.
|
|
140
|
+
* Never fails; a recipe is synchronous and `Tx.build` reports one that
|
|
141
|
+
* throws as a `BuildError`.
|
|
142
|
+
*/
|
|
143
|
+
readonly tx: PartyTxBuilders;
|
|
144
|
+
/** Generated type-safe Move calls (for `tx.add`), package-bound. */
|
|
145
|
+
readonly call: {
|
|
146
|
+
readonly party: ReturnType<typeof bindModulePackage<typeof contracts.party>>;
|
|
147
|
+
readonly profile: ReturnType<typeof bindModulePackage<typeof profileMod, readonly ["profile"]>>;
|
|
148
|
+
readonly media: ReturnType<typeof bindModulePackage<typeof mediaMod>>;
|
|
149
|
+
readonly roles: ReturnType<typeof bindModulePackage<typeof rolesMod>>;
|
|
150
|
+
readonly tags: ReturnType<typeof bindModulePackage<typeof tagsMod>>;
|
|
151
|
+
readonly cta: ReturnType<typeof bindModulePackage<typeof ctaMod>>;
|
|
152
|
+
readonly genre: ReturnType<typeof bindModulePackage<typeof genreMod>>;
|
|
153
|
+
readonly platformLink: ReturnType<typeof bindModulePackage<typeof platformLinkMod>>;
|
|
154
|
+
readonly social: ReturnType<typeof bindModulePackage<typeof socialMod>>;
|
|
155
|
+
readonly music: ReturnType<typeof bindModulePackage<typeof musicMod>>;
|
|
156
|
+
readonly proLink: ReturnType<typeof bindModulePackage<typeof proLinkMod>>;
|
|
157
|
+
};
|
|
158
|
+
/** Generated BCS structs (for parsing object/event content). */
|
|
159
|
+
readonly bcs: {
|
|
160
|
+
readonly Profile: typeof profileMod.Profile;
|
|
161
|
+
readonly ProfileSetEvent: typeof profileMod.PartyProfileSetEvent;
|
|
162
|
+
readonly PartyProfileSetEvent: typeof profileMod.PartyProfileSetEvent;
|
|
163
|
+
readonly PartyProfileClearedEvent: typeof profileMod.PartyProfileClearedEvent;
|
|
164
|
+
readonly Media: typeof mediaMod.Media;
|
|
165
|
+
readonly MediaSetEvent: typeof mediaMod.MediaSetEvent;
|
|
166
|
+
readonly MediaClearedEvent: typeof mediaMod.MediaClearedEvent;
|
|
167
|
+
readonly ArtistRole: typeof rolesMod.ArtistRole;
|
|
168
|
+
readonly RoleAddedEvent: typeof rolesMod.RoleAddedEvent;
|
|
169
|
+
readonly RoleRemovedEvent: typeof rolesMod.RoleRemovedEvent;
|
|
170
|
+
readonly RolesClearedEvent: typeof rolesMod.RolesClearedEvent;
|
|
171
|
+
readonly TagAddedEvent: typeof tagsMod.TagAddedEvent;
|
|
172
|
+
readonly TagRemovedEvent: typeof tagsMod.TagRemovedEvent;
|
|
173
|
+
readonly TagsClearedEvent: typeof tagsMod.TagsClearedEvent;
|
|
174
|
+
readonly Cta: typeof ctaMod.Cta;
|
|
175
|
+
readonly CtasSetEvent: typeof ctaMod.CtasSetEvent;
|
|
176
|
+
readonly CtasClearedEvent: typeof ctaMod.CtasClearedEvent;
|
|
177
|
+
readonly GenreAddedEvent: typeof genreMod.GenreAddedEvent;
|
|
178
|
+
readonly GenreRemovedEvent: typeof genreMod.GenreRemovedEvent;
|
|
179
|
+
readonly GenresClearedEvent: typeof genreMod.GenresClearedEvent;
|
|
180
|
+
readonly LinkSetEvent: typeof platformLinkMod.LinkSetEvent;
|
|
181
|
+
readonly LinkClearedEvent: typeof platformLinkMod.LinkClearedEvent;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
169
184
|
|
|
170
|
-
|
|
185
|
+
/**
|
|
186
|
+
* Assembles {@link MisoPartyService} from the converted `Partyos` service and
|
|
187
|
+
* `Sui`, bound to `deployment` — called from `Miso`'s own `make` (which
|
|
188
|
+
* already holds both), per `docs/extensions.md` §12 step 3: a thin service
|
|
189
|
+
* layer over standalone functions, closing over the `Sui` the caller already
|
|
190
|
+
* has rather than adding a requirement of its own.
|
|
191
|
+
*/
|
|
192
|
+
export function makeMisoParty(sui: SuiService, partyos: PartyosService, deployment: PartyExtensionsDeployment): MisoPartyService {
|
|
193
|
+
const withSui = <A, E>(effect: Effect.Effect<A, E, Sui>): Effect.Effect<A, E> =>
|
|
194
|
+
effect.pipe(Effect.provideService(Sui, sui));
|
|
171
195
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
};
|
|
187
|
-
return {
|
|
188
|
-
// Party core builders — delegated straight from `PartyosClient`.
|
|
189
|
-
...this.#core.tx,
|
|
190
|
-
setProfile: (
|
|
191
|
-
p: Omit<profileExt.SetProfileParams, "partyProfilePackageId" | "countryCodePackageId" | "languageCodePackageId">,
|
|
192
|
-
) =>
|
|
193
|
-
profileExt.setProfile({
|
|
194
|
-
...p,
|
|
195
|
-
partyProfilePackageId: profilePkg,
|
|
196
|
-
countryCodePackageId: cc,
|
|
197
|
-
languageCodePackageId: lc,
|
|
198
|
-
}),
|
|
199
|
-
clearProfile: (p: Omit<profileExt.ClearProfileParams, "partyProfilePackageId">) =>
|
|
200
|
-
profileExt.clearProfile({ ...p, partyProfilePackageId: profilePkg }),
|
|
201
|
-
setMedia: (p: Omit<mediaExt.SetMediaParams, "partyMediaPackageId">) =>
|
|
202
|
-
mediaExt.setMedia({ ...p, partyMediaPackageId: mediaPkg }),
|
|
203
|
-
clearMedia: (p: Omit<mediaExt.ClearMediaParams, "partyMediaPackageId">) =>
|
|
204
|
-
mediaExt.clearMedia({ ...p, partyMediaPackageId: mediaPkg }),
|
|
205
|
-
// Roles
|
|
206
|
-
addRole: (p: Omit<rolesExt.AddRoleParams, "partyRolesPackageId">) =>
|
|
207
|
-
rolesExt.addRole({ ...p, partyRolesPackageId: rolesPkg }),
|
|
208
|
-
removeRole: (p: Omit<rolesExt.RemoveRoleParams, "partyRolesPackageId">) =>
|
|
209
|
-
rolesExt.removeRole({ ...p, partyRolesPackageId: rolesPkg }),
|
|
210
|
-
clearRoles: (p: Omit<rolesExt.ClearRolesParams, "partyRolesPackageId">) =>
|
|
211
|
-
rolesExt.clearRoles({ ...p, partyRolesPackageId: rolesPkg }),
|
|
212
|
-
// Tags
|
|
213
|
-
addTag: (p: Omit<tagsExt.AddTagParams, "partyTagsPackageId">) =>
|
|
214
|
-
tagsExt.addTag({ ...p, partyTagsPackageId: tagsPkg }),
|
|
215
|
-
removeTag: (p: Omit<tagsExt.RemoveTagParams, "partyTagsPackageId">) =>
|
|
216
|
-
tagsExt.removeTag({ ...p, partyTagsPackageId: tagsPkg }),
|
|
217
|
-
clearTags: (p: Omit<tagsExt.ClearTagsParams, "partyTagsPackageId">) =>
|
|
218
|
-
tagsExt.clearTags({ ...p, partyTagsPackageId: tagsPkg }),
|
|
219
|
-
// Genres
|
|
220
|
-
addGenre: (p: Omit<genresExt.AddGenreParams, "partyGenrePackageId">) =>
|
|
221
|
-
genresExt.addGenre({ ...p, partyGenrePackageId: partyGenrePkg }),
|
|
222
|
-
removeGenre: (p: Omit<genresExt.RemoveGenreParams, "partyGenrePackageId">) =>
|
|
223
|
-
genresExt.removeGenre({ ...p, partyGenrePackageId: partyGenrePkg }),
|
|
224
|
-
clearGenres: (p: Omit<genresExt.ClearGenresParams, "partyGenrePackageId">) =>
|
|
225
|
-
genresExt.clearGenres({ ...p, partyGenrePackageId: partyGenrePkg }),
|
|
226
|
-
// CTAs
|
|
227
|
-
setCtas: (p: Omit<ctasExt.SetCtasParams, "partyCtaPackageId">) =>
|
|
228
|
-
ctasExt.setCtas({ ...p, partyCtaPackageId: ctaPkg }),
|
|
229
|
-
clearCtas: (p: Omit<ctasExt.ClearCtasParams, "partyCtaPackageId">) =>
|
|
230
|
-
ctasExt.clearCtas({ ...p, partyCtaPackageId: ctaPkg }),
|
|
231
|
-
// Platform links — generic (any platform) plus per-platform `set…`/`clear…`.
|
|
232
|
-
setLink: (platform: PlatformKey, p: linksExt.BoundSetLinkParams) =>
|
|
233
|
-
linksExt.setLink(platform, { ...p, ...linkIds }),
|
|
234
|
-
clearLink: (platform: PlatformKey, p: linksExt.BoundClearLinkParams) =>
|
|
235
|
-
linksExt.clearLink(platform, { ...p, ...linkIds }),
|
|
236
|
-
...linksExt.linkTxBuilders(linkIds),
|
|
237
|
-
};
|
|
238
|
-
}
|
|
196
|
+
const profilePkg = deployment.partyProfile;
|
|
197
|
+
const cc = deployment.countryCode;
|
|
198
|
+
const lc = deployment.languageCode;
|
|
199
|
+
const mediaPkg = deployment.partyMedia;
|
|
200
|
+
const rolesPkg = deployment.partyRoles;
|
|
201
|
+
const tagsPkg = deployment.partyTags;
|
|
202
|
+
const ctaPkg = deployment.partyCta;
|
|
203
|
+
const partyGenrePkg = deployment.partyGenre;
|
|
204
|
+
const linkIds: linksExt.LinkPackageIds = {
|
|
205
|
+
partyPlatformLinkPackageId: deployment.partyPlatformLink,
|
|
206
|
+
partySocialPackageId: deployment.partySocial,
|
|
207
|
+
partyMusicPackageId: deployment.partyMusic,
|
|
208
|
+
partyProLinkPackageId: deployment.partyProLink,
|
|
209
|
+
};
|
|
239
210
|
|
|
240
|
-
|
|
211
|
+
const tx: PartyTxBuilders = {
|
|
212
|
+
...partyos.tx,
|
|
213
|
+
setProfile: (p) => profileExt.setProfile({ ...p, partyProfilePackageId: profilePkg, countryCodePackageId: cc, languageCodePackageId: lc }),
|
|
214
|
+
clearProfile: (p) => profileExt.clearProfile({ ...p, partyProfilePackageId: profilePkg }),
|
|
215
|
+
setMedia: (p) => mediaExt.setMedia({ ...p, partyMediaPackageId: mediaPkg }),
|
|
216
|
+
clearMedia: (p) => mediaExt.clearMedia({ ...p, partyMediaPackageId: mediaPkg }),
|
|
217
|
+
addRole: (p) => rolesExt.addRole({ ...p, partyRolesPackageId: rolesPkg }),
|
|
218
|
+
removeRole: (p) => rolesExt.removeRole({ ...p, partyRolesPackageId: rolesPkg }),
|
|
219
|
+
clearRoles: (p) => rolesExt.clearRoles({ ...p, partyRolesPackageId: rolesPkg }),
|
|
220
|
+
addTag: (p) => tagsExt.addTag({ ...p, partyTagsPackageId: tagsPkg }),
|
|
221
|
+
removeTag: (p) => tagsExt.removeTag({ ...p, partyTagsPackageId: tagsPkg }),
|
|
222
|
+
clearTags: (p) => tagsExt.clearTags({ ...p, partyTagsPackageId: tagsPkg }),
|
|
223
|
+
addGenre: (p) => genresExt.addGenre({ ...p, partyGenrePackageId: partyGenrePkg }),
|
|
224
|
+
removeGenre: (p) => genresExt.removeGenre({ ...p, partyGenrePackageId: partyGenrePkg }),
|
|
225
|
+
clearGenres: (p) => genresExt.clearGenres({ ...p, partyGenrePackageId: partyGenrePkg }),
|
|
226
|
+
setCtas: (p) => ctasExt.setCtas({ ...p, partyCtaPackageId: ctaPkg }),
|
|
227
|
+
clearCtas: (p) => ctasExt.clearCtas({ ...p, partyCtaPackageId: ctaPkg }),
|
|
228
|
+
setLink: (platform, p) => linksExt.setLink(platform, { ...p, ...linkIds }),
|
|
229
|
+
clearLink: (platform, p) => linksExt.clearLink(platform, { ...p, ...linkIds }),
|
|
230
|
+
...linksExt.linkTxBuilders(linkIds),
|
|
231
|
+
};
|
|
241
232
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
genre: bindModulePackage(genreMod, this.#partyGenrePkg),
|
|
251
|
-
platformLink: bindModulePackage(platformLinkMod, this.#platformLinkPkg),
|
|
252
|
-
social: bindModulePackage(socialMod, this.#socialPkg),
|
|
253
|
-
music: bindModulePackage(musicMod, this.#musicPkg),
|
|
254
|
-
proLink: bindModulePackage(proLinkMod, this.#proLinkPkg),
|
|
255
|
-
};
|
|
256
|
-
}
|
|
233
|
+
return {
|
|
234
|
+
getPartyById: partyos.getPartyById,
|
|
235
|
+
getPartiesByIds: partyos.getPartiesByIds,
|
|
236
|
+
derivePartyAdminCapId: (partyId) => derivePartyAdminCapId(partyId, partyos.deployment.partyos),
|
|
237
|
+
getMemberships: partyos.getMemberships,
|
|
238
|
+
getPendingInvites: partyos.getPendingInvites,
|
|
239
|
+
getPendingMemberships: partyos.getPendingMemberships,
|
|
240
|
+
isMember: partyos.isMember,
|
|
257
241
|
|
|
258
|
-
|
|
242
|
+
getProfile: (partyId) => withSui(queries.getProfile(partyId, profilePkg)),
|
|
243
|
+
getMedia: (partyId) => withSui(queries.getMedia(partyId, mediaPkg)),
|
|
244
|
+
getRoles: (partyId) => withSui(queries.getRoles(partyId, rolesPkg)),
|
|
245
|
+
getTags: (partyId) => withSui(queries.getTags(partyId, tagsPkg)),
|
|
246
|
+
getGenres: (partyId) => withSui(queries.getGenres(partyId, partyGenrePkg)),
|
|
247
|
+
getCtas: (partyId) => withSui(queries.getCtas(partyId, ctaPkg)),
|
|
248
|
+
getLinks: (partyId) => withSui(queries.getLinks(partyId)),
|
|
259
249
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
250
|
+
tx,
|
|
251
|
+
call: {
|
|
252
|
+
party: bindModulePackage(contracts.party, partyos.deployment.partyos),
|
|
253
|
+
profile: bindModulePackage(profileMod, profilePkg, ["profile"] as const),
|
|
254
|
+
media: bindModulePackage(mediaMod, mediaPkg),
|
|
255
|
+
roles: bindModulePackage(rolesMod, rolesPkg),
|
|
256
|
+
tags: bindModulePackage(tagsMod, tagsPkg),
|
|
257
|
+
cta: bindModulePackage(ctaMod, ctaPkg),
|
|
258
|
+
genre: bindModulePackage(genreMod, partyGenrePkg),
|
|
259
|
+
platformLink: bindModulePackage(platformLinkMod, linkIds.partyPlatformLinkPackageId),
|
|
260
|
+
social: bindModulePackage(socialMod, linkIds.partySocialPackageId),
|
|
261
|
+
music: bindModulePackage(musicMod, linkIds.partyMusicPackageId),
|
|
262
|
+
proLink: bindModulePackage(proLinkMod, linkIds.partyProLinkPackageId),
|
|
263
|
+
},
|
|
264
|
+
bcs: {
|
|
263
265
|
Profile: profileMod.Profile,
|
|
264
|
-
ProfileSetEvent: profileMod.
|
|
266
|
+
ProfileSetEvent: profileMod.PartyProfileSetEvent,
|
|
267
|
+
PartyProfileSetEvent: profileMod.PartyProfileSetEvent,
|
|
268
|
+
PartyProfileClearedEvent: profileMod.PartyProfileClearedEvent,
|
|
265
269
|
Media: mediaMod.Media,
|
|
266
270
|
MediaSetEvent: mediaMod.MediaSetEvent,
|
|
271
|
+
MediaClearedEvent: mediaMod.MediaClearedEvent,
|
|
267
272
|
ArtistRole: rolesMod.ArtistRole,
|
|
268
273
|
RoleAddedEvent: rolesMod.RoleAddedEvent,
|
|
274
|
+
RoleRemovedEvent: rolesMod.RoleRemovedEvent,
|
|
275
|
+
RolesClearedEvent: rolesMod.RolesClearedEvent,
|
|
269
276
|
TagAddedEvent: tagsMod.TagAddedEvent,
|
|
277
|
+
TagRemovedEvent: tagsMod.TagRemovedEvent,
|
|
278
|
+
TagsClearedEvent: tagsMod.TagsClearedEvent,
|
|
270
279
|
Cta: ctaMod.Cta,
|
|
271
280
|
CtasSetEvent: ctaMod.CtasSetEvent,
|
|
281
|
+
CtasClearedEvent: ctaMod.CtasClearedEvent,
|
|
272
282
|
GenreAddedEvent: genreMod.GenreAddedEvent,
|
|
283
|
+
GenreRemovedEvent: genreMod.GenreRemovedEvent,
|
|
284
|
+
GenresClearedEvent: genreMod.GenresClearedEvent,
|
|
273
285
|
LinkSetEvent: platformLinkMod.LinkSetEvent,
|
|
274
286
|
LinkClearedEvent: platformLinkMod.LinkClearedEvent,
|
|
275
|
-
}
|
|
276
|
-
}
|
|
287
|
+
},
|
|
288
|
+
};
|
|
277
289
|
}
|
|
278
|
-
|
|
279
|
-
/** @deprecated Use `PartyPlatformClient`. Retained for callers migrating from the pre-split class. */
|
|
280
|
-
export { PartyPlatformClient as PartyProtocolClient };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// and passes the vector to `set_ctas`.
|
|
8
8
|
|
|
9
9
|
import * as ctaMod from "../../contracts/party_cta/party_cta.ts";
|
|
10
|
-
import type {
|
|
10
|
+
import type { Recipe } from "@unconfirmed/sui-effect";
|
|
11
11
|
import type { Cta } from "../types.ts";
|
|
12
12
|
|
|
13
13
|
export interface SetCtasParams {
|
|
@@ -19,7 +19,7 @@ export interface SetCtasParams {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/** Sets (or replaces) the party's ordered CTA list. */
|
|
22
|
-
export function setCtas(params: SetCtasParams):
|
|
22
|
+
export function setCtas(params: SetCtasParams): Recipe {
|
|
23
23
|
return (tx) => {
|
|
24
24
|
const ctaType = `${params.partyCtaPackageId}::party_cta::Cta`;
|
|
25
25
|
const ctas = tx.makeMoveVec({
|
|
@@ -39,7 +39,7 @@ export interface ClearCtasParams {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/** Removes the party's CTA list. No-op on-chain if none is set. */
|
|
42
|
-
export function clearCtas(params: ClearCtasParams):
|
|
42
|
+
export function clearCtas(params: ClearCtasParams): Recipe {
|
|
43
43
|
return (tx) => {
|
|
44
44
|
tx.add(ctaMod.clearCtas({ package: params.partyCtaPackageId, arguments: [params.partyId, params.capId] }));
|
|
45
45
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// entry), so the builder passes `tx.object(genreId)`; removal is by id.
|
|
7
7
|
|
|
8
8
|
import * as genreMod from "../../contracts/party_genre/party_genre.ts";
|
|
9
|
-
import type {
|
|
9
|
+
import type { Recipe } from "@unconfirmed/sui-effect";
|
|
10
10
|
|
|
11
11
|
export interface AddGenreParams {
|
|
12
12
|
partyId: string;
|
|
@@ -17,7 +17,7 @@ export interface AddGenreParams {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/** Tags a genre on the party. Aborts on-chain if already present or the max is reached. */
|
|
20
|
-
export function addGenre(params: AddGenreParams):
|
|
20
|
+
export function addGenre(params: AddGenreParams): Recipe {
|
|
21
21
|
return (tx) => {
|
|
22
22
|
tx.add(
|
|
23
23
|
genreMod.addGenre({
|
|
@@ -37,7 +37,7 @@ export interface RemoveGenreParams {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/** Untags a genre from the party. Aborts on-chain if not present. */
|
|
40
|
-
export function removeGenre(params: RemoveGenreParams):
|
|
40
|
+
export function removeGenre(params: RemoveGenreParams): Recipe {
|
|
41
41
|
return (tx) => {
|
|
42
42
|
tx.add(
|
|
43
43
|
genreMod.removeGenre({
|
|
@@ -55,7 +55,7 @@ export interface ClearGenresParams {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/** Removes the party's entire genre set. No-op on-chain if none is set. */
|
|
58
|
-
export function clearGenres(params: ClearGenresParams):
|
|
58
|
+
export function clearGenres(params: ClearGenresParams): Recipe {
|
|
59
59
|
return (tx) => {
|
|
60
60
|
tx.add(genreMod.clearGenres({ package: params.partyGenrePackageId, arguments: [params.partyId, params.capId] }));
|
|
61
61
|
};
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// Only the native identifier is stored on-chain; the public URL is rebuilt from it.
|
|
12
12
|
|
|
13
13
|
import * as platformLinkMod from "../../contracts/party_platform_link/party_platform_link.ts";
|
|
14
|
-
import type {
|
|
14
|
+
import type { Recipe } from "@unconfirmed/sui-effect";
|
|
15
15
|
import { PlatformLink } from "../types.ts";
|
|
16
16
|
import type { PlatformKey } from "../types.ts";
|
|
17
17
|
|
|
@@ -105,7 +105,7 @@ export interface SetLinkParams extends LinkPackageIds {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
/** Sets (or replaces) a platform's link on the party. */
|
|
108
|
-
export function setLink(platform: PlatformKey, params: SetLinkParams):
|
|
108
|
+
export function setLink(platform: PlatformKey, params: SetLinkParams): Recipe {
|
|
109
109
|
return (tx) => {
|
|
110
110
|
const spec = PLATFORMS[platform];
|
|
111
111
|
const pkg = payloadPackageId(spec, params);
|
|
@@ -129,7 +129,7 @@ export interface ClearLinkParams extends LinkPackageIds {
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
/** Clears a platform's link from the party. No-op on-chain if unset. */
|
|
132
|
-
export function clearLink(platform: PlatformKey, params: ClearLinkParams):
|
|
132
|
+
export function clearLink(platform: PlatformKey, params: ClearLinkParams): Recipe {
|
|
133
133
|
return (tx) => {
|
|
134
134
|
const spec = PLATFORMS[platform];
|
|
135
135
|
tx.add(
|
|
@@ -171,16 +171,16 @@ export type BoundClearLinkParams = Omit<ClearLinkParams, keyof LinkPackageIds>;
|
|
|
171
171
|
|
|
172
172
|
/** Per-platform `setX` / `clearX` builders, keyed off the table so all ~27 are covered. */
|
|
173
173
|
export type LinkTxBuilders =
|
|
174
|
-
& { [K in PlatformKey as `set${Capitalize<K>}`]: (p: BoundSetLinkParams) =>
|
|
175
|
-
& { [K in PlatformKey as `clear${Capitalize<K>}`]: (p: BoundClearLinkParams) =>
|
|
174
|
+
& { [K in PlatformKey as `set${Capitalize<K>}`]: (p: BoundSetLinkParams) => Recipe }
|
|
175
|
+
& { [K in PlatformKey as `clear${Capitalize<K>}`]: (p: BoundClearLinkParams) => Recipe };
|
|
176
176
|
|
|
177
177
|
/** Builds the per-platform link tx builders with `ids` pre-bound. */
|
|
178
178
|
export function linkTxBuilders(ids: LinkPackageIds): LinkTxBuilders {
|
|
179
179
|
const out: Record<string, unknown> = {};
|
|
180
180
|
for (const key of PLATFORM_KEYS) {
|
|
181
181
|
const cap = key.charAt(0).toUpperCase() + key.slice(1);
|
|
182
|
-
out[`set${cap}`] = (p: BoundSetLinkParams):
|
|
183
|
-
out[`clear${cap}`] = (p: BoundClearLinkParams):
|
|
182
|
+
out[`set${cap}`] = (p: BoundSetLinkParams): Recipe => setLink(key, { ...p, ...ids });
|
|
183
|
+
out[`clear${cap}`] = (p: BoundClearLinkParams): Recipe => clearLink(key, { ...p, ...ids });
|
|
184
184
|
}
|
|
185
185
|
return out as LinkTxBuilders;
|
|
186
186
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { b64UrlToU256 } from "../internal.ts";
|
|
12
12
|
import * as mediaMod from "../../contracts/party_media/party_media.ts";
|
|
13
|
-
import type {
|
|
13
|
+
import type { Recipe } from "@unconfirmed/sui-effect";
|
|
14
14
|
import type { Media } from "../types.ts";
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -30,7 +30,7 @@ export interface SetMediaParams {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/** Sets (or replaces) the party's media quilt. */
|
|
33
|
-
export function setMedia(params: SetMediaParams):
|
|
33
|
+
export function setMedia(params: SetMediaParams): Recipe {
|
|
34
34
|
return (tx) => {
|
|
35
35
|
tx.add(
|
|
36
36
|
mediaMod.setMedia({
|
|
@@ -48,7 +48,7 @@ export interface ClearMediaParams {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/** Removes the party's media entirely. No-op on-chain if none is set. */
|
|
51
|
-
export function clearMedia(params: ClearMediaParams):
|
|
51
|
+
export function clearMedia(params: ClearMediaParams): Recipe {
|
|
52
52
|
return (tx) => {
|
|
53
53
|
tx.add(mediaMod.clearMedia({ package: params.partyMediaPackageId, arguments: [params.partyId, params.capId] }));
|
|
54
54
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// `CountryCode` / `LanguageCode` values from raw ISO codes.
|
|
7
7
|
|
|
8
8
|
import * as profileMod from "../../contracts/party_profile/party_profile.ts";
|
|
9
|
-
import type {
|
|
9
|
+
import type { Recipe } from "@unconfirmed/sui-effect";
|
|
10
10
|
|
|
11
11
|
const OPTION_NONE = "0x1::option::none";
|
|
12
12
|
const OPTION_SOME = "0x1::option::some";
|
|
@@ -26,7 +26,7 @@ export interface SetProfileParams {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/** Sets (creates or replaces) a party's whole profile. */
|
|
29
|
-
export function setProfile(params: SetProfileParams):
|
|
29
|
+
export function setProfile(params: SetProfileParams): Recipe {
|
|
30
30
|
return (tx) => {
|
|
31
31
|
const ccType = `${params.countryCodePackageId}::country_code::CountryCode`;
|
|
32
32
|
const country = params.country
|
|
@@ -69,7 +69,7 @@ export interface ClearProfileParams {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/** Removes a party's profile. No-op on-chain if none is set. */
|
|
72
|
-
export function clearProfile(params: ClearProfileParams):
|
|
72
|
+
export function clearProfile(params: ClearProfileParams): Recipe {
|
|
73
73
|
return (tx) => {
|
|
74
74
|
tx.add(
|
|
75
75
|
profileMod.clearProfile({
|