@crossly/sdk 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +216 -2
- package/dist/client.d.ts +61 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +134 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +27 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +23 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +310 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +152 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/_shared.d.ts +13 -0
- package/dist/resources/_shared.d.ts.map +1 -0
- package/dist/resources/_shared.js +2 -0
- package/dist/resources/_shared.js.map +1 -0
- package/dist/resources/account.d.ts +188 -0
- package/dist/resources/account.d.ts.map +1 -0
- package/dist/resources/account.js +398 -0
- package/dist/resources/account.js.map +1 -0
- package/dist/resources/action-log.d.ts +35 -0
- package/dist/resources/action-log.d.ts.map +1 -0
- package/dist/resources/action-log.js +38 -0
- package/dist/resources/action-log.js.map +1 -0
- package/dist/resources/ads.d.ts +131 -0
- package/dist/resources/ads.d.ts.map +1 -0
- package/dist/resources/ads.js +139 -0
- package/dist/resources/ads.js.map +1 -0
- package/dist/resources/ai-images.d.ts +88 -0
- package/dist/resources/ai-images.d.ts.map +1 -0
- package/dist/resources/ai-images.js +9 -0
- package/dist/resources/ai-images.js.map +1 -0
- package/dist/resources/automation.d.ts +148 -0
- package/dist/resources/automation.d.ts.map +1 -0
- package/dist/resources/automation.js +365 -0
- package/dist/resources/automation.js.map +1 -0
- package/dist/resources/brand-drops.d.ts +114 -0
- package/dist/resources/brand-drops.d.ts.map +1 -0
- package/dist/resources/brand-drops.js +57 -0
- package/dist/resources/brand-drops.js.map +1 -0
- package/dist/resources/buyer/after-purchase.d.ts +288 -0
- package/dist/resources/buyer/after-purchase.d.ts.map +1 -0
- package/dist/resources/buyer/after-purchase.js +181 -0
- package/dist/resources/buyer/after-purchase.js.map +1 -0
- package/dist/resources/buyer/audio-summaries.d.ts +21 -0
- package/dist/resources/buyer/audio-summaries.d.ts.map +1 -0
- package/dist/resources/buyer/audio-summaries.js +21 -0
- package/dist/resources/buyer/audio-summaries.js.map +1 -0
- package/dist/resources/buyer/basket-sell.d.ts +135 -0
- package/dist/resources/buyer/basket-sell.d.ts.map +1 -0
- package/dist/resources/buyer/basket-sell.js +49 -0
- package/dist/resources/buyer/basket-sell.js.map +1 -0
- package/dist/resources/buyer/commerce.d.ts +170 -0
- package/dist/resources/buyer/commerce.d.ts.map +1 -0
- package/dist/resources/buyer/commerce.js +109 -0
- package/dist/resources/buyer/commerce.js.map +1 -0
- package/dist/resources/buyer/delivery.d.ts +60 -0
- package/dist/resources/buyer/delivery.d.ts.map +1 -0
- package/dist/resources/buyer/delivery.js +22 -0
- package/dist/resources/buyer/delivery.js.map +1 -0
- package/dist/resources/buyer/discover.d.ts +121 -0
- package/dist/resources/buyer/discover.d.ts.map +1 -0
- package/dist/resources/buyer/discover.js +60 -0
- package/dist/resources/buyer/discover.js.map +1 -0
- package/dist/resources/buyer/friends-boards-clubs.d.ts +207 -0
- package/dist/resources/buyer/friends-boards-clubs.d.ts.map +1 -0
- package/dist/resources/buyer/friends-boards-clubs.js +58 -0
- package/dist/resources/buyer/friends-boards-clubs.js.map +1 -0
- package/dist/resources/buyer/gift-cards.d.ts +101 -0
- package/dist/resources/buyer/gift-cards.d.ts.map +1 -0
- package/dist/resources/buyer/gift-cards.js +44 -0
- package/dist/resources/buyer/gift-cards.js.map +1 -0
- package/dist/resources/buyer/lists.d.ts +163 -0
- package/dist/resources/buyer/lists.d.ts.map +1 -0
- package/dist/resources/buyer/lists.js +153 -0
- package/dist/resources/buyer/lists.js.map +1 -0
- package/dist/resources/buyer/live-shop.d.ts +171 -0
- package/dist/resources/buyer/live-shop.d.ts.map +1 -0
- package/dist/resources/buyer/live-shop.js +8 -0
- package/dist/resources/buyer/live-shop.js.map +1 -0
- package/dist/resources/buyer/packs.d.ts +110 -0
- package/dist/resources/buyer/packs.d.ts.map +1 -0
- package/dist/resources/buyer/packs.js +38 -0
- package/dist/resources/buyer/packs.js.map +1 -0
- package/dist/resources/buyer/protection-plans.d.ts +46 -0
- package/dist/resources/buyer/protection-plans.d.ts.map +1 -0
- package/dist/resources/buyer/protection-plans.js +30 -0
- package/dist/resources/buyer/protection-plans.js.map +1 -0
- package/dist/resources/buyer/size-memory.d.ts +56 -0
- package/dist/resources/buyer/size-memory.d.ts.map +1 -0
- package/dist/resources/buyer/size-memory.js +20 -0
- package/dist/resources/buyer/size-memory.js.map +1 -0
- package/dist/resources/buyer/try-on.d.ts +39 -0
- package/dist/resources/buyer/try-on.d.ts.map +1 -0
- package/dist/resources/buyer/try-on.js +27 -0
- package/dist/resources/buyer/try-on.js.map +1 -0
- package/dist/resources/buyer/types.d.ts +166 -0
- package/dist/resources/buyer/types.d.ts.map +1 -0
- package/dist/resources/buyer/types.js +8 -0
- package/dist/resources/buyer/types.js.map +1 -0
- package/dist/resources/buyer/vault.d.ts +73 -0
- package/dist/resources/buyer/vault.d.ts.map +1 -0
- package/dist/resources/buyer/vault.js +30 -0
- package/dist/resources/buyer/vault.js.map +1 -0
- package/dist/resources/buyer/wave3.d.ts +345 -0
- package/dist/resources/buyer/wave3.d.ts.map +1 -0
- package/dist/resources/buyer/wave3.js +73 -0
- package/dist/resources/buyer/wave3.js.map +1 -0
- package/dist/resources/buyer/xmarket-extras.d.ts +189 -0
- package/dist/resources/buyer/xmarket-extras.d.ts.map +1 -0
- package/dist/resources/buyer/xmarket-extras.js +163 -0
- package/dist/resources/buyer/xmarket-extras.js.map +1 -0
- package/dist/resources/buyer/xmarket.d.ts +307 -0
- package/dist/resources/buyer/xmarket.d.ts.map +1 -0
- package/dist/resources/buyer/xmarket.js +150 -0
- package/dist/resources/buyer/xmarket.js.map +1 -0
- package/dist/resources/buyer.d.ts +466 -0
- package/dist/resources/buyer.d.ts.map +1 -0
- package/dist/resources/buyer.js +443 -0
- package/dist/resources/buyer.js.map +1 -0
- package/dist/resources/catalog-lookup.d.ts +49 -0
- package/dist/resources/catalog-lookup.d.ts.map +1 -0
- package/dist/resources/catalog-lookup.js +45 -0
- package/dist/resources/catalog-lookup.js.map +1 -0
- package/dist/resources/catalog-matches.d.ts +54 -0
- package/dist/resources/catalog-matches.d.ts.map +1 -0
- package/dist/resources/catalog-matches.js +49 -0
- package/dist/resources/catalog-matches.js.map +1 -0
- package/dist/resources/catalog.d.ts +329 -0
- package/dist/resources/catalog.d.ts.map +1 -0
- package/dist/resources/catalog.js +570 -0
- package/dist/resources/catalog.js.map +1 -0
- package/dist/resources/cbx/ads.d.ts +119 -0
- package/dist/resources/cbx/ads.d.ts.map +1 -0
- package/dist/resources/cbx/ads.js +144 -0
- package/dist/resources/cbx/ads.js.map +1 -0
- package/dist/resources/cbx/credit.d.ts +155 -0
- package/dist/resources/cbx/credit.d.ts.map +1 -0
- package/dist/resources/cbx/credit.js +178 -0
- package/dist/resources/cbx/credit.js.map +1 -0
- package/dist/resources/cbx/rewards.d.ts +97 -0
- package/dist/resources/cbx/rewards.d.ts.map +1 -0
- package/dist/resources/cbx/rewards.js +95 -0
- package/dist/resources/cbx/rewards.js.map +1 -0
- package/dist/resources/cbx/staking.d.ts +82 -0
- package/dist/resources/cbx/staking.d.ts.map +1 -0
- package/dist/resources/cbx/staking.js +104 -0
- package/dist/resources/cbx/staking.js.map +1 -0
- package/dist/resources/cbx/wallet-payments.d.ts +97 -0
- package/dist/resources/cbx/wallet-payments.d.ts.map +1 -0
- package/dist/resources/cbx/wallet-payments.js +95 -0
- package/dist/resources/cbx/wallet-payments.js.map +1 -0
- package/dist/resources/cbx.d.ts +311 -0
- package/dist/resources/cbx.d.ts.map +1 -0
- package/dist/resources/cbx.js +348 -0
- package/dist/resources/cbx.js.map +1 -0
- package/dist/resources/comms.d.ts +84 -0
- package/dist/resources/comms.d.ts.map +1 -0
- package/dist/resources/comms.js +247 -0
- package/dist/resources/comms.js.map +1 -0
- package/dist/resources/cosm/base.d.ts +24 -0
- package/dist/resources/cosm/base.d.ts.map +1 -0
- package/dist/resources/cosm/base.js +7 -0
- package/dist/resources/cosm/base.js.map +1 -0
- package/dist/resources/cosm/cosmetics.d.ts +147 -0
- package/dist/resources/cosm/cosmetics.d.ts.map +1 -0
- package/dist/resources/cosm/cosmetics.js +185 -0
- package/dist/resources/cosm/cosmetics.js.map +1 -0
- package/dist/resources/cosm/currency.d.ts +154 -0
- package/dist/resources/cosm/currency.d.ts.map +1 -0
- package/dist/resources/cosm/currency.js +196 -0
- package/dist/resources/cosm/currency.js.map +1 -0
- package/dist/resources/cosm/designer.d.ts +159 -0
- package/dist/resources/cosm/designer.d.ts.map +1 -0
- package/dist/resources/cosm/designer.js +167 -0
- package/dist/resources/cosm/designer.js.map +1 -0
- package/dist/resources/cosm/market.d.ts +111 -0
- package/dist/resources/cosm/market.d.ts.map +1 -0
- package/dist/resources/cosm/market.js +137 -0
- package/dist/resources/cosm/market.js.map +1 -0
- package/dist/resources/cosm/types.d.ts +6 -0
- package/dist/resources/cosm/types.d.ts.map +1 -0
- package/dist/resources/cosm/types.js +6 -0
- package/dist/resources/cosm/types.js.map +1 -0
- package/dist/resources/cosm.d.ts +46 -0
- package/dist/resources/cosm.d.ts.map +1 -0
- package/dist/resources/cosm.js +45 -0
- package/dist/resources/cosm.js.map +1 -0
- package/dist/resources/customers-types.d.ts +89 -0
- package/dist/resources/customers-types.d.ts.map +1 -0
- package/dist/resources/customers-types.js +7 -0
- package/dist/resources/customers-types.js.map +1 -0
- package/dist/resources/dao.d.ts +118 -0
- package/dist/resources/dao.d.ts.map +1 -0
- package/dist/resources/dao.js +120 -0
- package/dist/resources/dao.js.map +1 -0
- package/dist/resources/devices.d.ts +66 -0
- package/dist/resources/devices.d.ts.map +1 -0
- package/dist/resources/devices.js +28 -0
- package/dist/resources/devices.js.map +1 -0
- package/dist/resources/discovery.d.ts +223 -0
- package/dist/resources/discovery.d.ts.map +1 -0
- package/dist/resources/discovery.js +365 -0
- package/dist/resources/discovery.js.map +1 -0
- package/dist/resources/drops.d.ts +137 -0
- package/dist/resources/drops.d.ts.map +1 -0
- package/dist/resources/drops.js +43 -0
- package/dist/resources/drops.js.map +1 -0
- package/dist/resources/embeds.d.ts +56 -0
- package/dist/resources/embeds.d.ts.map +1 -0
- package/dist/resources/embeds.js +43 -0
- package/dist/resources/embeds.js.map +1 -0
- package/dist/resources/evidence.d.ts +28 -0
- package/dist/resources/evidence.d.ts.map +1 -0
- package/dist/resources/evidence.js +27 -0
- package/dist/resources/evidence.js.map +1 -0
- package/dist/resources/games.d.ts +134 -0
- package/dist/resources/games.d.ts.map +1 -0
- package/dist/resources/games.js +26 -0
- package/dist/resources/games.js.map +1 -0
- package/dist/resources/grading.d.ts +181 -0
- package/dist/resources/grading.d.ts.map +1 -0
- package/dist/resources/grading.js +51 -0
- package/dist/resources/grading.js.map +1 -0
- package/dist/resources/homes.d.ts +106 -0
- package/dist/resources/homes.d.ts.map +1 -0
- package/dist/resources/homes.js +27 -0
- package/dist/resources/homes.js.map +1 -0
- package/dist/resources/imports.d.ts +39 -0
- package/dist/resources/imports.d.ts.map +1 -0
- package/dist/resources/imports.js +37 -0
- package/dist/resources/imports.js.map +1 -0
- package/dist/resources/live-shows.d.ts +100 -0
- package/dist/resources/live-shows.d.ts.map +1 -0
- package/dist/resources/live-shows.js +42 -0
- package/dist/resources/live-shows.js.map +1 -0
- package/dist/resources/loyalty-looks.d.ts +68 -0
- package/dist/resources/loyalty-looks.d.ts.map +1 -0
- package/dist/resources/loyalty-looks.js +21 -0
- package/dist/resources/loyalty-looks.js.map +1 -0
- package/dist/resources/market.d.ts +172 -0
- package/dist/resources/market.d.ts.map +1 -0
- package/dist/resources/market.js +124 -0
- package/dist/resources/market.js.map +1 -0
- package/dist/resources/membership.d.ts +14 -0
- package/dist/resources/membership.d.ts.map +1 -0
- package/dist/resources/membership.js +17 -0
- package/dist/resources/membership.js.map +1 -0
- package/dist/resources/neighbourhoods.d.ts +44 -0
- package/dist/resources/neighbourhoods.d.ts.map +1 -0
- package/dist/resources/neighbourhoods.js +15 -0
- package/dist/resources/neighbourhoods.js.map +1 -0
- package/dist/resources/nft-market.d.ts +26 -0
- package/dist/resources/nft-market.d.ts.map +1 -0
- package/dist/resources/nft-market.js +28 -0
- package/dist/resources/nft-market.js.map +1 -0
- package/dist/resources/offers.d.ts +60 -0
- package/dist/resources/offers.d.ts.map +1 -0
- package/dist/resources/offers.js +38 -0
- package/dist/resources/offers.js.map +1 -0
- package/dist/resources/orders.d.ts +248 -0
- package/dist/resources/orders.d.ts.map +1 -0
- package/dist/resources/orders.js +411 -0
- package/dist/resources/orders.js.map +1 -0
- package/dist/resources/passports.d.ts +101 -0
- package/dist/resources/passports.d.ts.map +1 -0
- package/dist/resources/passports.js +36 -0
- package/dist/resources/passports.js.map +1 -0
- package/dist/resources/payout.d.ts +121 -0
- package/dist/resources/payout.d.ts.map +1 -0
- package/dist/resources/payout.js +65 -0
- package/dist/resources/payout.js.map +1 -0
- package/dist/resources/policy-presets.d.ts +36 -0
- package/dist/resources/policy-presets.d.ts.map +1 -0
- package/dist/resources/policy-presets.js +39 -0
- package/dist/resources/policy-presets.js.map +1 -0
- package/dist/resources/pricing.d.ts +73 -0
- package/dist/resources/pricing.d.ts.map +1 -0
- package/dist/resources/pricing.js +18 -0
- package/dist/resources/pricing.js.map +1 -0
- package/dist/resources/production.d.ts +96 -0
- package/dist/resources/production.d.ts.map +1 -0
- package/dist/resources/production.js +89 -0
- package/dist/resources/production.js.map +1 -0
- package/dist/resources/rentals.d.ts +84 -0
- package/dist/resources/rentals.d.ts.map +1 -0
- package/dist/resources/rentals.js +21 -0
- package/dist/resources/rentals.js.map +1 -0
- package/dist/resources/reputation.d.ts +106 -0
- package/dist/resources/reputation.d.ts.map +1 -0
- package/dist/resources/reputation.js +23 -0
- package/dist/resources/reputation.js.map +1 -0
- package/dist/resources/scan.d.ts +100 -0
- package/dist/resources/scan.d.ts.map +1 -0
- package/dist/resources/scan.js +53 -0
- package/dist/resources/scan.js.map +1 -0
- package/dist/resources/seller-xmarket.d.ts +80 -0
- package/dist/resources/seller-xmarket.d.ts.map +1 -0
- package/dist/resources/seller-xmarket.js +58 -0
- package/dist/resources/seller-xmarket.js.map +1 -0
- package/dist/resources/spatial-auction.d.ts +135 -0
- package/dist/resources/spatial-auction.d.ts.map +1 -0
- package/dist/resources/spatial-auction.js +160 -0
- package/dist/resources/spatial-auction.js.map +1 -0
- package/dist/resources/spatial-emotes.d.ts +60 -0
- package/dist/resources/spatial-emotes.d.ts.map +1 -0
- package/dist/resources/spatial-emotes.js +20 -0
- package/dist/resources/spatial-emotes.js.map +1 -0
- package/dist/resources/spatial-employee.d.ts +140 -0
- package/dist/resources/spatial-employee.d.ts.map +1 -0
- package/dist/resources/spatial-employee.js +128 -0
- package/dist/resources/spatial-employee.js.map +1 -0
- package/dist/resources/spatial-party.d.ts +63 -0
- package/dist/resources/spatial-party.d.ts.map +1 -0
- package/dist/resources/spatial-party.js +15 -0
- package/dist/resources/spatial-party.js.map +1 -0
- package/dist/resources/spatial-rooms.d.ts +132 -0
- package/dist/resources/spatial-rooms.d.ts.map +1 -0
- package/dist/resources/spatial-rooms.js +83 -0
- package/dist/resources/spatial-rooms.js.map +1 -0
- package/dist/resources/spatial.d.ts +228 -0
- package/dist/resources/spatial.d.ts.map +1 -0
- package/dist/resources/spatial.js +325 -0
- package/dist/resources/spatial.js.map +1 -0
- package/dist/resources/stalls.d.ts +203 -0
- package/dist/resources/stalls.d.ts.map +1 -0
- package/dist/resources/stalls.js +50 -0
- package/dist/resources/stalls.js.map +1 -0
- package/dist/resources/storefront-shipping.d.ts +116 -0
- package/dist/resources/storefront-shipping.d.ts.map +1 -0
- package/dist/resources/storefront-shipping.js +32 -0
- package/dist/resources/storefront-shipping.js.map +1 -0
- package/dist/resources/trade-block.d.ts +104 -0
- package/dist/resources/trade-block.d.ts.map +1 -0
- package/dist/resources/trade-block.js +57 -0
- package/dist/resources/trade-block.js.map +1 -0
- package/dist/resources/units.d.ts +65 -0
- package/dist/resources/units.d.ts.map +1 -0
- package/dist/resources/units.js +53 -0
- package/dist/resources/units.js.map +1 -0
- package/dist/resources/variation-groups.d.ts +179 -0
- package/dist/resources/variation-groups.d.ts.map +1 -0
- package/dist/resources/variation-groups.js +69 -0
- package/dist/resources/variation-groups.js.map +1 -0
- package/dist/resources/vault-markets-adl.d.ts +85 -0
- package/dist/resources/vault-markets-adl.d.ts.map +1 -0
- package/dist/resources/vault-markets-adl.js +24 -0
- package/dist/resources/vault-markets-adl.js.map +1 -0
- package/dist/resources/vault-markets-agent.d.ts +96 -0
- package/dist/resources/vault-markets-agent.d.ts.map +1 -0
- package/dist/resources/vault-markets-agent.js +31 -0
- package/dist/resources/vault-markets-agent.js.map +1 -0
- package/dist/resources/vault-markets-alerts-hub.d.ts +90 -0
- package/dist/resources/vault-markets-alerts-hub.d.ts.map +1 -0
- package/dist/resources/vault-markets-alerts-hub.js +23 -0
- package/dist/resources/vault-markets-alerts-hub.js.map +1 -0
- package/dist/resources/vault-markets-analytics.d.ts +80 -0
- package/dist/resources/vault-markets-analytics.d.ts.map +1 -0
- package/dist/resources/vault-markets-analytics.js +68 -0
- package/dist/resources/vault-markets-analytics.js.map +1 -0
- package/dist/resources/vault-markets-bullion.d.ts +218 -0
- package/dist/resources/vault-markets-bullion.d.ts.map +1 -0
- package/dist/resources/vault-markets-bullion.js +50 -0
- package/dist/resources/vault-markets-bullion.js.map +1 -0
- package/dist/resources/vault-markets-channels.d.ts +88 -0
- package/dist/resources/vault-markets-channels.d.ts.map +1 -0
- package/dist/resources/vault-markets-channels.js +41 -0
- package/dist/resources/vault-markets-channels.js.map +1 -0
- package/dist/resources/vault-markets-credit.d.ts +53 -0
- package/dist/resources/vault-markets-credit.d.ts.map +1 -0
- package/dist/resources/vault-markets-credit.js +56 -0
- package/dist/resources/vault-markets-credit.js.map +1 -0
- package/dist/resources/vault-markets-curve-pools.d.ts +135 -0
- package/dist/resources/vault-markets-curve-pools.d.ts.map +1 -0
- package/dist/resources/vault-markets-curve-pools.js +39 -0
- package/dist/resources/vault-markets-curve-pools.js.map +1 -0
- package/dist/resources/vault-markets-floor.d.ts +59 -0
- package/dist/resources/vault-markets-floor.d.ts.map +1 -0
- package/dist/resources/vault-markets-floor.js +11 -0
- package/dist/resources/vault-markets-floor.js.map +1 -0
- package/dist/resources/vault-markets-follows.d.ts +205 -0
- package/dist/resources/vault-markets-follows.d.ts.map +1 -0
- package/dist/resources/vault-markets-follows.js +53 -0
- package/dist/resources/vault-markets-follows.js.map +1 -0
- package/dist/resources/vault-markets-grade-to-vault.d.ts +201 -0
- package/dist/resources/vault-markets-grade-to-vault.d.ts.map +1 -0
- package/dist/resources/vault-markets-grade-to-vault.js +55 -0
- package/dist/resources/vault-markets-grade-to-vault.js.map +1 -0
- package/dist/resources/vault-markets-grading.d.ts +32 -0
- package/dist/resources/vault-markets-grading.d.ts.map +1 -0
- package/dist/resources/vault-markets-grading.js +19 -0
- package/dist/resources/vault-markets-grading.js.map +1 -0
- package/dist/resources/vault-markets-hall.d.ts +121 -0
- package/dist/resources/vault-markets-hall.d.ts.map +1 -0
- package/dist/resources/vault-markets-hall.js +27 -0
- package/dist/resources/vault-markets-hall.js.map +1 -0
- package/dist/resources/vault-markets-health.d.ts +169 -0
- package/dist/resources/vault-markets-health.d.ts.map +1 -0
- package/dist/resources/vault-markets-health.js +15 -0
- package/dist/resources/vault-markets-health.js.map +1 -0
- package/dist/resources/vault-markets-home.d.ts +69 -0
- package/dist/resources/vault-markets-home.d.ts.map +1 -0
- package/dist/resources/vault-markets-home.js +19 -0
- package/dist/resources/vault-markets-home.js.map +1 -0
- package/dist/resources/vault-markets-index.d.ts +71 -0
- package/dist/resources/vault-markets-index.d.ts.map +1 -0
- package/dist/resources/vault-markets-index.js +59 -0
- package/dist/resources/vault-markets-index.js.map +1 -0
- package/dist/resources/vault-markets-inst.d.ts +205 -0
- package/dist/resources/vault-markets-inst.d.ts.map +1 -0
- package/dist/resources/vault-markets-inst.js +143 -0
- package/dist/resources/vault-markets-inst.js.map +1 -0
- package/dist/resources/vault-markets-joint-tod.d.ts +389 -0
- package/dist/resources/vault-markets-joint-tod.d.ts.map +1 -0
- package/dist/resources/vault-markets-joint-tod.js +105 -0
- package/dist/resources/vault-markets-joint-tod.js.map +1 -0
- package/dist/resources/vault-markets-liquidity.d.ts +185 -0
- package/dist/resources/vault-markets-liquidity.d.ts.map +1 -0
- package/dist/resources/vault-markets-liquidity.js +124 -0
- package/dist/resources/vault-markets-liquidity.js.map +1 -0
- package/dist/resources/vault-markets-marks.d.ts +53 -0
- package/dist/resources/vault-markets-marks.d.ts.map +1 -0
- package/dist/resources/vault-markets-marks.js +11 -0
- package/dist/resources/vault-markets-marks.js.map +1 -0
- package/dist/resources/vault-markets-missions.d.ts +75 -0
- package/dist/resources/vault-markets-missions.d.ts.map +1 -0
- package/dist/resources/vault-markets-missions.js +15 -0
- package/dist/resources/vault-markets-missions.js.map +1 -0
- package/dist/resources/vault-markets-mm.d.ts +280 -0
- package/dist/resources/vault-markets-mm.d.ts.map +1 -0
- package/dist/resources/vault-markets-mm.js +110 -0
- package/dist/resources/vault-markets-mm.js.map +1 -0
- package/dist/resources/vault-markets-mode.d.ts +111 -0
- package/dist/resources/vault-markets-mode.d.ts.map +1 -0
- package/dist/resources/vault-markets-mode.js +23 -0
- package/dist/resources/vault-markets-mode.js.map +1 -0
- package/dist/resources/vault-markets-ops.d.ts +88 -0
- package/dist/resources/vault-markets-ops.d.ts.map +1 -0
- package/dist/resources/vault-markets-ops.js +76 -0
- package/dist/resources/vault-markets-ops.js.map +1 -0
- package/dist/resources/vault-markets-oracle-dcm.d.ts +288 -0
- package/dist/resources/vault-markets-oracle-dcm.d.ts.map +1 -0
- package/dist/resources/vault-markets-oracle-dcm.js +48 -0
- package/dist/resources/vault-markets-oracle-dcm.js.map +1 -0
- package/dist/resources/vault-markets-p2p.d.ts +217 -0
- package/dist/resources/vault-markets-p2p.d.ts.map +1 -0
- package/dist/resources/vault-markets-p2p.js +72 -0
- package/dist/resources/vault-markets-p2p.js.map +1 -0
- package/dist/resources/vault-markets-paper.d.ts +222 -0
- package/dist/resources/vault-markets-paper.d.ts.map +1 -0
- package/dist/resources/vault-markets-paper.js +47 -0
- package/dist/resources/vault-markets-paper.js.map +1 -0
- package/dist/resources/vault-markets-pm.d.ts +159 -0
- package/dist/resources/vault-markets-pm.d.ts.map +1 -0
- package/dist/resources/vault-markets-pm.js +27 -0
- package/dist/resources/vault-markets-pm.js.map +1 -0
- package/dist/resources/vault-markets-pop-reports.d.ts +62 -0
- package/dist/resources/vault-markets-pop-reports.d.ts.map +1 -0
- package/dist/resources/vault-markets-pop-reports.js +11 -0
- package/dist/resources/vault-markets-pop-reports.js.map +1 -0
- package/dist/resources/vault-markets-price-widgets.d.ts +138 -0
- package/dist/resources/vault-markets-price-widgets.d.ts.map +1 -0
- package/dist/resources/vault-markets-price-widgets.js +31 -0
- package/dist/resources/vault-markets-price-widgets.js.map +1 -0
- package/dist/resources/vault-markets-pro.d.ts +234 -0
- package/dist/resources/vault-markets-pro.d.ts.map +1 -0
- package/dist/resources/vault-markets-pro.js +75 -0
- package/dist/resources/vault-markets-pro.js.map +1 -0
- package/dist/resources/vault-markets-receipt-tokens.d.ts +170 -0
- package/dist/resources/vault-markets-receipt-tokens.d.ts.map +1 -0
- package/dist/resources/vault-markets-receipt-tokens.js +44 -0
- package/dist/resources/vault-markets-receipt-tokens.js.map +1 -0
- package/dist/resources/vault-markets-reports.d.ts +54 -0
- package/dist/resources/vault-markets-reports.d.ts.map +1 -0
- package/dist/resources/vault-markets-reports.js +16 -0
- package/dist/resources/vault-markets-reports.js.map +1 -0
- package/dist/resources/vault-markets-set-goals.d.ts +219 -0
- package/dist/resources/vault-markets-set-goals.d.ts.map +1 -0
- package/dist/resources/vault-markets-set-goals.js +51 -0
- package/dist/resources/vault-markets-set-goals.js.map +1 -0
- package/dist/resources/vault-markets-social.d.ts +73 -0
- package/dist/resources/vault-markets-social.d.ts.map +1 -0
- package/dist/resources/vault-markets-social.js +84 -0
- package/dist/resources/vault-markets-social.js.map +1 -0
- package/dist/resources/vault-markets-stats.d.ts +177 -0
- package/dist/resources/vault-markets-stats.d.ts.map +1 -0
- package/dist/resources/vault-markets-stats.js +44 -0
- package/dist/resources/vault-markets-stats.js.map +1 -0
- package/dist/resources/vault-markets-supply.d.ts +99 -0
- package/dist/resources/vault-markets-supply.d.ts.map +1 -0
- package/dist/resources/vault-markets-supply.js +73 -0
- package/dist/resources/vault-markets-supply.js.map +1 -0
- package/dist/resources/vault-markets-tax-loss.d.ts +68 -0
- package/dist/resources/vault-markets-tax-loss.d.ts.map +1 -0
- package/dist/resources/vault-markets-tax-loss.js +11 -0
- package/dist/resources/vault-markets-tax-loss.js.map +1 -0
- package/dist/resources/vault-markets-title.d.ts +129 -0
- package/dist/resources/vault-markets-title.d.ts.map +1 -0
- package/dist/resources/vault-markets-title.js +94 -0
- package/dist/resources/vault-markets-title.js.map +1 -0
- package/dist/resources/vault-markets-unit-story.d.ts +105 -0
- package/dist/resources/vault-markets-unit-story.d.ts.map +1 -0
- package/dist/resources/vault-markets-unit-story.js +15 -0
- package/dist/resources/vault-markets-unit-story.js.map +1 -0
- package/dist/resources/vault-markets-valuation.d.ts +136 -0
- package/dist/resources/vault-markets-valuation.d.ts.map +1 -0
- package/dist/resources/vault-markets-valuation.js +37 -0
- package/dist/resources/vault-markets-valuation.js.map +1 -0
- package/dist/resources/vault-markets-vault-suggest.d.ts +92 -0
- package/dist/resources/vault-markets-vault-suggest.d.ts.map +1 -0
- package/dist/resources/vault-markets-vault-suggest.js +15 -0
- package/dist/resources/vault-markets-vault-suggest.js.map +1 -0
- package/dist/resources/vault-markets-widget.d.ts +101 -0
- package/dist/resources/vault-markets-widget.d.ts.map +1 -0
- package/dist/resources/vault-markets-widget.js +27 -0
- package/dist/resources/vault-markets-widget.js.map +1 -0
- package/dist/resources/vault-markets-world.d.ts +286 -0
- package/dist/resources/vault-markets-world.d.ts.map +1 -0
- package/dist/resources/vault-markets-world.js +63 -0
- package/dist/resources/vault-markets-world.js.map +1 -0
- package/dist/resources/vault-markets.d.ts +484 -0
- package/dist/resources/vault-markets.d.ts.map +1 -0
- package/dist/resources/vault-markets.js +269 -0
- package/dist/resources/vault-markets.js.map +1 -0
- package/dist/resources/video-requests.d.ts +44 -0
- package/dist/resources/video-requests.d.ts.map +1 -0
- package/dist/resources/video-requests.js +13 -0
- package/dist/resources/video-requests.js.map +1 -0
- package/dist/resources/web3.d.ts +439 -0
- package/dist/resources/web3.d.ts.map +1 -0
- package/dist/resources/web3.js +462 -0
- package/dist/resources/web3.js.map +1 -0
- package/dist/resources/wholesale.d.ts +23 -0
- package/dist/resources/wholesale.d.ts.map +1 -0
- package/dist/resources/wholesale.js +39 -0
- package/dist/resources/wholesale.js.map +1 -0
- package/dist/resources/world-account.d.ts +71 -0
- package/dist/resources/world-account.d.ts.map +1 -0
- package/dist/resources/world-account.js +67 -0
- package/dist/resources/world-account.js.map +1 -0
- package/dist/resources/world-arcade.d.ts +50 -0
- package/dist/resources/world-arcade.d.ts.map +1 -0
- package/dist/resources/world-arcade.js +11 -0
- package/dist/resources/world-arcade.js.map +1 -0
- package/dist/resources/world-aurora.d.ts +29 -0
- package/dist/resources/world-aurora.d.ts.map +1 -0
- package/dist/resources/world-aurora.js +11 -0
- package/dist/resources/world-aurora.js.map +1 -0
- package/dist/resources/world-capabilities.d.ts +154 -0
- package/dist/resources/world-capabilities.d.ts.map +1 -0
- package/dist/resources/world-capabilities.js +51 -0
- package/dist/resources/world-capabilities.js.map +1 -0
- package/dist/resources/world-chests.d.ts +23 -0
- package/dist/resources/world-chests.d.ts.map +1 -0
- package/dist/resources/world-chests.js +11 -0
- package/dist/resources/world-chests.js.map +1 -0
- package/dist/resources/world-contests.d.ts +72 -0
- package/dist/resources/world-contests.d.ts.map +1 -0
- package/dist/resources/world-contests.js +31 -0
- package/dist/resources/world-contests.js.map +1 -0
- package/dist/resources/world-conventions.d.ts +77 -0
- package/dist/resources/world-conventions.d.ts.map +1 -0
- package/dist/resources/world-conventions.js +51 -0
- package/dist/resources/world-conventions.js.map +1 -0
- package/dist/resources/world-creator.d.ts +94 -0
- package/dist/resources/world-creator.d.ts.map +1 -0
- package/dist/resources/world-creator.js +59 -0
- package/dist/resources/world-creator.js.map +1 -0
- package/dist/resources/world-fireflies.d.ts +23 -0
- package/dist/resources/world-fireflies.d.ts.map +1 -0
- package/dist/resources/world-fireflies.js +11 -0
- package/dist/resources/world-fireflies.js.map +1 -0
- package/dist/resources/world-games.d.ts +112 -0
- package/dist/resources/world-games.d.ts.map +1 -0
- package/dist/resources/world-games.js +55 -0
- package/dist/resources/world-games.js.map +1 -0
- package/dist/resources/world-grails.d.ts +15 -0
- package/dist/resources/world-grails.d.ts.map +1 -0
- package/dist/resources/world-grails.js +11 -0
- package/dist/resources/world-grails.js.map +1 -0
- package/dist/resources/world-hall.d.ts +83 -0
- package/dist/resources/world-hall.d.ts.map +1 -0
- package/dist/resources/world-hall.js +23 -0
- package/dist/resources/world-hall.js.map +1 -0
- package/dist/resources/world-homes.d.ts +55 -0
- package/dist/resources/world-homes.d.ts.map +1 -0
- package/dist/resources/world-homes.js +43 -0
- package/dist/resources/world-homes.js.map +1 -0
- package/dist/resources/world-hunt.d.ts +71 -0
- package/dist/resources/world-hunt.d.ts.map +1 -0
- package/dist/resources/world-hunt.js +19 -0
- package/dist/resources/world-hunt.js.map +1 -0
- package/dist/resources/world-kites.d.ts +23 -0
- package/dist/resources/world-kites.d.ts.map +1 -0
- package/dist/resources/world-kites.js +11 -0
- package/dist/resources/world-kites.js.map +1 -0
- package/dist/resources/world-lanterns.d.ts +23 -0
- package/dist/resources/world-lanterns.d.ts.map +1 -0
- package/dist/resources/world-lanterns.js +11 -0
- package/dist/resources/world-lanterns.js.map +1 -0
- package/dist/resources/world-live.d.ts +146 -0
- package/dist/resources/world-live.d.ts.map +1 -0
- package/dist/resources/world-live.js +47 -0
- package/dist/resources/world-live.js.map +1 -0
- package/dist/resources/world-parties.d.ts +60 -0
- package/dist/resources/world-parties.d.ts.map +1 -0
- package/dist/resources/world-parties.js +55 -0
- package/dist/resources/world-parties.js.map +1 -0
- package/dist/resources/world-places.d.ts +60 -0
- package/dist/resources/world-places.d.ts.map +1 -0
- package/dist/resources/world-places.js +59 -0
- package/dist/resources/world-places.js.map +1 -0
- package/dist/resources/world-provenance.d.ts +18 -0
- package/dist/resources/world-provenance.d.ts.map +1 -0
- package/dist/resources/world-provenance.js +11 -0
- package/dist/resources/world-provenance.js.map +1 -0
- package/dist/resources/world-spaces.d.ts +93 -0
- package/dist/resources/world-spaces.d.ts.map +1 -0
- package/dist/resources/world-spaces.js +75 -0
- package/dist/resources/world-spaces.js.map +1 -0
- package/dist/resources/world-streets.d.ts +91 -0
- package/dist/resources/world-streets.d.ts.map +1 -0
- package/dist/resources/world-streets.js +83 -0
- package/dist/resources/world-streets.js.map +1 -0
- package/dist/resources/world-trials.d.ts +64 -0
- package/dist/resources/world-trials.d.ts.map +1 -0
- package/dist/resources/world-trials.js +15 -0
- package/dist/resources/world-trials.js.map +1 -0
- package/dist/resources/world-wishes.d.ts +23 -0
- package/dist/resources/world-wishes.d.ts.map +1 -0
- package/dist/resources/world-wishes.js +11 -0
- package/dist/resources/world-wishes.js.map +1 -0
- package/dist/resources/world.d.ts +771 -0
- package/dist/resources/world.d.ts.map +1 -0
- package/dist/resources/world.js +233 -0
- package/dist/resources/world.js.map +1 -0
- package/dist/resources.d.ts +142 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +153 -0
- package/dist/resources.js.map +1 -0
- package/dist/types.d.ts +32 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/dist/webhooks.d.ts +80 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +153 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +60 -3
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { HttpClient, JsonObject, IdempotencyOpts } from './_shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* The auction house inside a spatial room.
|
|
4
|
+
*
|
|
5
|
+
* A live saleroom bound into one of the 3D rooms `spatial` describes: a human
|
|
6
|
+
* auctioneer takes bids on one lot at a time and drops the hammer by hand.
|
|
7
|
+
* Everything here reads and writes the SAME live-auction tables the standalone
|
|
8
|
+
* auction page uses, so there is one price and one catalogue, never a room's
|
|
9
|
+
* copy of them.
|
|
10
|
+
*
|
|
11
|
+
* ── DIGITAL GOODS ONLY, AND THAT IS NOT A SETTING ────────────────────
|
|
12
|
+
* A physical item is never sold in here. There is no shipping, escrow or
|
|
13
|
+
* dispute path behind a bid, so `bid()` answers 403 with
|
|
14
|
+
* `details.reason === 'physical_lot'` for a lot whose listing is not digital —
|
|
15
|
+
* checked against the listing on EVERY bid rather than once when the room was
|
|
16
|
+
* set up, because a lot can be added, or a listing reclassified, afterwards.
|
|
17
|
+
* Physical goods are sold for cash or CBX through the ordinary listing flow.
|
|
18
|
+
*
|
|
19
|
+
* ── THREE RULES FOR READING ANY OF THIS ──────────────────────────────
|
|
20
|
+
* 1. EVERY AMOUNT IS CENTS.
|
|
21
|
+
* 2. Use `minimumNextBidCents`. Never compute `currentBidCents +
|
|
22
|
+
* bidIncrementCents` — the OPENING bid on a lot is floored at the start
|
|
23
|
+
* price rather than start + step, so deriving it locally quietly raises
|
|
24
|
+
* the entry price on any lot carrying a real increment, and your bid is
|
|
25
|
+
* then refused by a rule you thought you had implemented.
|
|
26
|
+
* 3. The reserve AMOUNT is never published. `reserveMet` is all you get, and
|
|
27
|
+
* all a bidder in a real saleroom gets: a crowd that can read the floor
|
|
28
|
+
* bids to it and stops.
|
|
29
|
+
*
|
|
30
|
+
* ── THE AUCTIONEER IS THE AUTHORITY ON WHICH LOT IS UP ───────────────
|
|
31
|
+
* Not the lot list, and not the lowest open lot number — a human can skip
|
|
32
|
+
* ahead. Take the current lot from `room()`, and if you hold a lot id from an
|
|
33
|
+
* earlier `lots()` call, pass it to `bid()` so a mismatch is refused with 409
|
|
34
|
+
* instead of buying you something you never looked at.
|
|
35
|
+
*/
|
|
36
|
+
export declare class SpatialAuctionResource {
|
|
37
|
+
private http;
|
|
38
|
+
constructor(http: HttpClient);
|
|
39
|
+
/**
|
|
40
|
+
* Rooms YOU own that are currently hosting an auction, with the session's
|
|
41
|
+
* title, status and schedule joined in.
|
|
42
|
+
*
|
|
43
|
+
* An empty list is the ordinary answer — hosting nothing is the normal state
|
|
44
|
+
* of every room on the platform. This is not a directory of salerooms you
|
|
45
|
+
* could bid in; for somebody else's room, take a slug from
|
|
46
|
+
* `spatial.publicScenes()` and open it with `publicRoom()`.
|
|
47
|
+
*
|
|
48
|
+
* `topics.auction` is the WebSocket topic every price movement is broadcast
|
|
49
|
+
* on. `topics.room` is null until the room has been shared publicly.
|
|
50
|
+
*/
|
|
51
|
+
rooms(): Promise<JsonObject>;
|
|
52
|
+
/**
|
|
53
|
+
* What the rostrum says in one room, right now: the session, the current
|
|
54
|
+
* lot, the standing price and the minimum the next bid must clear.
|
|
55
|
+
*
|
|
56
|
+
* Served to anyone who may ENTER the room, not only its owner — the point of
|
|
57
|
+
* a saleroom is a crowd. `hosting: false` with a null `auction` is a
|
|
58
|
+
* described empty answer rather than an error, and a room you may not enter
|
|
59
|
+
* answers 404 exactly as one that does not exist does.
|
|
60
|
+
*
|
|
61
|
+
* `serverTime` is the SERVER's clock, handed over deliberately. There is no
|
|
62
|
+
* per-lot deadline to report — a lot closes when a human drops the hammer,
|
|
63
|
+
* not when a timer expires — so a countdown would be a fabrication. Age the
|
|
64
|
+
* session against this rather than against the local wall clock.
|
|
65
|
+
*/
|
|
66
|
+
room(sceneId: string): Promise<JsonObject>;
|
|
67
|
+
/**
|
|
68
|
+
* The catalogue: every lot in the session this room is hosting, in the order
|
|
69
|
+
* the auctioneer will reach them.
|
|
70
|
+
*
|
|
71
|
+
* A lot carrying a `hammerAt` has been sold; one with `skipped: true` failed
|
|
72
|
+
* its reserve. Neither takes further bids. A room hosting nothing answers an
|
|
73
|
+
* empty list rather than a 404 — a 404 here means the room does not exist or
|
|
74
|
+
* you may not enter it.
|
|
75
|
+
*
|
|
76
|
+
* Do NOT infer the current lot from this list. The auctioneer may skip
|
|
77
|
+
* ahead, and `room()` is the only thing that knows.
|
|
78
|
+
*/
|
|
79
|
+
lots(sceneId: string): Promise<JsonObject>;
|
|
80
|
+
/**
|
|
81
|
+
* A shared saleroom, opened by the public share handle.
|
|
82
|
+
*
|
|
83
|
+
* The bridge between the room directory and everything else here:
|
|
84
|
+
* `spatial.publicScenes()` hands out SLUGS while these methods are keyed by
|
|
85
|
+
* scene id, and the two are deliberately not interchangeable. The reply
|
|
86
|
+
* carries the `sceneId` to pass to `room()`, `lots()` and `bid()`.
|
|
87
|
+
*
|
|
88
|
+
* Resolves `public` rooms only. An `unlisted` room is a bearer link and
|
|
89
|
+
* crowd-shaped features stay off in those, so a slug that opens fine through
|
|
90
|
+
* `spatial.publicScene()` may still answer 404 here.
|
|
91
|
+
*/
|
|
92
|
+
publicRoom(slug: string): Promise<JsonObject>;
|
|
93
|
+
/**
|
|
94
|
+
* Bid on the lot currently up in a room.
|
|
95
|
+
*
|
|
96
|
+
* @param params.amountCents CENTS, and at least the room's
|
|
97
|
+
* `minimumNextBidCents`. Below it you get 400 `bid_too_low` carrying
|
|
98
|
+
* `details.minimumNextBidCents` — the figure the transaction itself used,
|
|
99
|
+
* so raise to exactly that and retry rather than guessing a step.
|
|
100
|
+
* @param params.lotId Optional, and worth sending whenever your idea of the
|
|
101
|
+
* current lot came from anywhere but a fresh `room()`. It is CHECKED
|
|
102
|
+
* against the rostrum rather than used in its place: a mismatch is 409
|
|
103
|
+
* with the lot that is actually up, instead of a real bid on an item you
|
|
104
|
+
* never looked at.
|
|
105
|
+
*
|
|
106
|
+
* ── WHAT SUCCESS MEANS ───────────────────────────────────────────
|
|
107
|
+
* The bid was RECORDED — not that you won. The reply names the topic the
|
|
108
|
+
* price moves on, and somebody may outbid you on the very next frame. The
|
|
109
|
+
* lot is yours only when the auctioneer hammers it.
|
|
110
|
+
*
|
|
111
|
+
* ── THE REFUSALS, AND WHICH ONES ARE WORTH RETRYING ──────────────
|
|
112
|
+
* 400 `bid_too_low` retry at `details.minimumNextBidCents`.
|
|
113
|
+
* 409 `lot_closed` hammered or skipped. Nothing to retry.
|
|
114
|
+
* 409 the auctioneer moved on from the lot you named.
|
|
115
|
+
* 403 `forbidden` with `details.reason: 'physical_lot'` — this saleroom
|
|
116
|
+
* sells digital goods only. Never retryable, on any lot, ever.
|
|
117
|
+
* 429 `bidding_too_fast` one person's bids on one lot are throttled so a
|
|
118
|
+
* script cannot serialise the room behind its own row lock. Wait
|
|
119
|
+
* `retryInSeconds`. Alternating between API surfaces does not raise
|
|
120
|
+
* the ceiling — it is counted per bidder, from the bids themselves.
|
|
121
|
+
* 404 no such room, or you may not enter it. The two
|
|
122
|
+
* are one answer on purpose.
|
|
123
|
+
*
|
|
124
|
+
* An idempotency key is optional here, unlike checkout: a replayed bid is
|
|
125
|
+
* not a second purchase, because the second attempt at the same amount is
|
|
126
|
+
* below the new minimum and is refused. Send one anyway if you intend to
|
|
127
|
+
* retry — replaying the stored answer beats reading `min_bid_<n>` and
|
|
128
|
+
* guessing whether your first attempt landed.
|
|
129
|
+
*/
|
|
130
|
+
bid(sceneId: string, params: {
|
|
131
|
+
amountCents: number;
|
|
132
|
+
lotId?: string;
|
|
133
|
+
}, opts?: IdempotencyOpts): Promise<JsonObject>;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=spatial-auction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-auction.d.ts","sourceRoot":"","sources":["../../src/resources/spatial-auction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,sBAAsB;IACrB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;OAWG;IACH,KAAK;IAOL;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM;IAOpB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM;IAOpB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM;IAOvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,GAAG,CACD,OAAO,EAAE,MAAM,EACf,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAC/C,IAAI,GAAE,eAAoB;CAS7B"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The auction house inside a spatial room.
|
|
3
|
+
*
|
|
4
|
+
* A live saleroom bound into one of the 3D rooms `spatial` describes: a human
|
|
5
|
+
* auctioneer takes bids on one lot at a time and drops the hammer by hand.
|
|
6
|
+
* Everything here reads and writes the SAME live-auction tables the standalone
|
|
7
|
+
* auction page uses, so there is one price and one catalogue, never a room's
|
|
8
|
+
* copy of them.
|
|
9
|
+
*
|
|
10
|
+
* ── DIGITAL GOODS ONLY, AND THAT IS NOT A SETTING ────────────────────
|
|
11
|
+
* A physical item is never sold in here. There is no shipping, escrow or
|
|
12
|
+
* dispute path behind a bid, so `bid()` answers 403 with
|
|
13
|
+
* `details.reason === 'physical_lot'` for a lot whose listing is not digital —
|
|
14
|
+
* checked against the listing on EVERY bid rather than once when the room was
|
|
15
|
+
* set up, because a lot can be added, or a listing reclassified, afterwards.
|
|
16
|
+
* Physical goods are sold for cash or CBX through the ordinary listing flow.
|
|
17
|
+
*
|
|
18
|
+
* ── THREE RULES FOR READING ANY OF THIS ──────────────────────────────
|
|
19
|
+
* 1. EVERY AMOUNT IS CENTS.
|
|
20
|
+
* 2. Use `minimumNextBidCents`. Never compute `currentBidCents +
|
|
21
|
+
* bidIncrementCents` — the OPENING bid on a lot is floored at the start
|
|
22
|
+
* price rather than start + step, so deriving it locally quietly raises
|
|
23
|
+
* the entry price on any lot carrying a real increment, and your bid is
|
|
24
|
+
* then refused by a rule you thought you had implemented.
|
|
25
|
+
* 3. The reserve AMOUNT is never published. `reserveMet` is all you get, and
|
|
26
|
+
* all a bidder in a real saleroom gets: a crowd that can read the floor
|
|
27
|
+
* bids to it and stops.
|
|
28
|
+
*
|
|
29
|
+
* ── THE AUCTIONEER IS THE AUTHORITY ON WHICH LOT IS UP ───────────────
|
|
30
|
+
* Not the lot list, and not the lowest open lot number — a human can skip
|
|
31
|
+
* ahead. Take the current lot from `room()`, and if you hold a lot id from an
|
|
32
|
+
* earlier `lots()` call, pass it to `bid()` so a mismatch is refused with 409
|
|
33
|
+
* instead of buying you something you never looked at.
|
|
34
|
+
*/
|
|
35
|
+
export class SpatialAuctionResource {
|
|
36
|
+
http;
|
|
37
|
+
constructor(http) {
|
|
38
|
+
this.http = http;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Rooms YOU own that are currently hosting an auction, with the session's
|
|
42
|
+
* title, status and schedule joined in.
|
|
43
|
+
*
|
|
44
|
+
* An empty list is the ordinary answer — hosting nothing is the normal state
|
|
45
|
+
* of every room on the platform. This is not a directory of salerooms you
|
|
46
|
+
* could bid in; for somebody else's room, take a slug from
|
|
47
|
+
* `spatial.publicScenes()` and open it with `publicRoom()`.
|
|
48
|
+
*
|
|
49
|
+
* `topics.auction` is the WebSocket topic every price movement is broadcast
|
|
50
|
+
* on. `topics.room` is null until the room has been shared publicly.
|
|
51
|
+
*/
|
|
52
|
+
rooms() {
|
|
53
|
+
return this.http.request({
|
|
54
|
+
method: 'GET',
|
|
55
|
+
path: '/v1/spatial/auction/rooms',
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* What the rostrum says in one room, right now: the session, the current
|
|
60
|
+
* lot, the standing price and the minimum the next bid must clear.
|
|
61
|
+
*
|
|
62
|
+
* Served to anyone who may ENTER the room, not only its owner — the point of
|
|
63
|
+
* a saleroom is a crowd. `hosting: false` with a null `auction` is a
|
|
64
|
+
* described empty answer rather than an error, and a room you may not enter
|
|
65
|
+
* answers 404 exactly as one that does not exist does.
|
|
66
|
+
*
|
|
67
|
+
* `serverTime` is the SERVER's clock, handed over deliberately. There is no
|
|
68
|
+
* per-lot deadline to report — a lot closes when a human drops the hammer,
|
|
69
|
+
* not when a timer expires — so a countdown would be a fabrication. Age the
|
|
70
|
+
* session against this rather than against the local wall clock.
|
|
71
|
+
*/
|
|
72
|
+
room(sceneId) {
|
|
73
|
+
return this.http.request({
|
|
74
|
+
method: 'GET',
|
|
75
|
+
path: `/v1/spatial/auction/rooms/${encodeURIComponent(sceneId)}`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The catalogue: every lot in the session this room is hosting, in the order
|
|
80
|
+
* the auctioneer will reach them.
|
|
81
|
+
*
|
|
82
|
+
* A lot carrying a `hammerAt` has been sold; one with `skipped: true` failed
|
|
83
|
+
* its reserve. Neither takes further bids. A room hosting nothing answers an
|
|
84
|
+
* empty list rather than a 404 — a 404 here means the room does not exist or
|
|
85
|
+
* you may not enter it.
|
|
86
|
+
*
|
|
87
|
+
* Do NOT infer the current lot from this list. The auctioneer may skip
|
|
88
|
+
* ahead, and `room()` is the only thing that knows.
|
|
89
|
+
*/
|
|
90
|
+
lots(sceneId) {
|
|
91
|
+
return this.http.request({
|
|
92
|
+
method: 'GET',
|
|
93
|
+
path: `/v1/spatial/auction/rooms/${encodeURIComponent(sceneId)}/lots`,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* A shared saleroom, opened by the public share handle.
|
|
98
|
+
*
|
|
99
|
+
* The bridge between the room directory and everything else here:
|
|
100
|
+
* `spatial.publicScenes()` hands out SLUGS while these methods are keyed by
|
|
101
|
+
* scene id, and the two are deliberately not interchangeable. The reply
|
|
102
|
+
* carries the `sceneId` to pass to `room()`, `lots()` and `bid()`.
|
|
103
|
+
*
|
|
104
|
+
* Resolves `public` rooms only. An `unlisted` room is a bearer link and
|
|
105
|
+
* crowd-shaped features stay off in those, so a slug that opens fine through
|
|
106
|
+
* `spatial.publicScene()` may still answer 404 here.
|
|
107
|
+
*/
|
|
108
|
+
publicRoom(slug) {
|
|
109
|
+
return this.http.request({
|
|
110
|
+
method: 'GET',
|
|
111
|
+
path: `/v1/spatial/auction/public/${encodeURIComponent(slug)}`,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Bid on the lot currently up in a room.
|
|
116
|
+
*
|
|
117
|
+
* @param params.amountCents CENTS, and at least the room's
|
|
118
|
+
* `minimumNextBidCents`. Below it you get 400 `bid_too_low` carrying
|
|
119
|
+
* `details.minimumNextBidCents` — the figure the transaction itself used,
|
|
120
|
+
* so raise to exactly that and retry rather than guessing a step.
|
|
121
|
+
* @param params.lotId Optional, and worth sending whenever your idea of the
|
|
122
|
+
* current lot came from anywhere but a fresh `room()`. It is CHECKED
|
|
123
|
+
* against the rostrum rather than used in its place: a mismatch is 409
|
|
124
|
+
* with the lot that is actually up, instead of a real bid on an item you
|
|
125
|
+
* never looked at.
|
|
126
|
+
*
|
|
127
|
+
* ── WHAT SUCCESS MEANS ───────────────────────────────────────────
|
|
128
|
+
* The bid was RECORDED — not that you won. The reply names the topic the
|
|
129
|
+
* price moves on, and somebody may outbid you on the very next frame. The
|
|
130
|
+
* lot is yours only when the auctioneer hammers it.
|
|
131
|
+
*
|
|
132
|
+
* ── THE REFUSALS, AND WHICH ONES ARE WORTH RETRYING ──────────────
|
|
133
|
+
* 400 `bid_too_low` retry at `details.minimumNextBidCents`.
|
|
134
|
+
* 409 `lot_closed` hammered or skipped. Nothing to retry.
|
|
135
|
+
* 409 the auctioneer moved on from the lot you named.
|
|
136
|
+
* 403 `forbidden` with `details.reason: 'physical_lot'` — this saleroom
|
|
137
|
+
* sells digital goods only. Never retryable, on any lot, ever.
|
|
138
|
+
* 429 `bidding_too_fast` one person's bids on one lot are throttled so a
|
|
139
|
+
* script cannot serialise the room behind its own row lock. Wait
|
|
140
|
+
* `retryInSeconds`. Alternating between API surfaces does not raise
|
|
141
|
+
* the ceiling — it is counted per bidder, from the bids themselves.
|
|
142
|
+
* 404 no such room, or you may not enter it. The two
|
|
143
|
+
* are one answer on purpose.
|
|
144
|
+
*
|
|
145
|
+
* An idempotency key is optional here, unlike checkout: a replayed bid is
|
|
146
|
+
* not a second purchase, because the second attempt at the same amount is
|
|
147
|
+
* below the new minimum and is refused. Send one anyway if you intend to
|
|
148
|
+
* retry — replaying the stored answer beats reading `min_bid_<n>` and
|
|
149
|
+
* guessing whether your first attempt landed.
|
|
150
|
+
*/
|
|
151
|
+
bid(sceneId, params, opts = {}) {
|
|
152
|
+
return this.http.request({
|
|
153
|
+
method: 'POST',
|
|
154
|
+
path: `/v1/spatial/auction/rooms/${encodeURIComponent(sceneId)}/bid`,
|
|
155
|
+
body: params,
|
|
156
|
+
idempotencyKey: opts.idempotencyKey,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=spatial-auction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-auction.js","sourceRoot":"","sources":["../../src/resources/spatial-auction.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,OAAO,sBAAsB;IACb;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;OAWG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAa;YACnC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,2BAA2B;SAClC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,OAAe;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAa;YACnC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,6BAA6B,kBAAkB,CAAC,OAAO,CAAC,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAe;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAa;YACnC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,6BAA6B,kBAAkB,CAAC,OAAO,CAAC,OAAO;SACtE,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAAY;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAa;YACnC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,8BAA8B,kBAAkB,CAAC,IAAI,CAAC,EAAE;SAC/D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,GAAG,CACD,OAAe,EACf,MAA+C,EAC/C,OAAwB,EAAE;QAE1B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAa;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,6BAA6B,kBAAkB,CAAC,OAAO,CAAC,MAAM;YACpE,IAAI,EAAE,MAAM;YACZ,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { HttpClient } from './_shared.js';
|
|
2
|
+
export type MomentKind = 'unbox' | 'slab_flip' | 'handshake';
|
|
3
|
+
export interface MomentPayload {
|
|
4
|
+
title: string;
|
|
5
|
+
imageUrl: string | null;
|
|
6
|
+
/** slab_flip: the grade as printed ("PSA 10"). */
|
|
7
|
+
grade?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Moment {
|
|
10
|
+
id: string;
|
|
11
|
+
kind: MomentKind;
|
|
12
|
+
payload: MomentPayload;
|
|
13
|
+
earnedAt: string;
|
|
14
|
+
/** Null until it is played in a room. */
|
|
15
|
+
playedAt: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface EmotePack {
|
|
18
|
+
key: string;
|
|
19
|
+
label: string;
|
|
20
|
+
unlocked: boolean;
|
|
21
|
+
quest: {
|
|
22
|
+
key: string;
|
|
23
|
+
pin: string;
|
|
24
|
+
goal: string;
|
|
25
|
+
} | null;
|
|
26
|
+
emotes: Array<{
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
export interface WheelEntry {
|
|
32
|
+
slot: string;
|
|
33
|
+
label: string;
|
|
34
|
+
locked: boolean;
|
|
35
|
+
unlockHint?: string;
|
|
36
|
+
ready: boolean;
|
|
37
|
+
readyCount: number;
|
|
38
|
+
}
|
|
39
|
+
export interface MyEmotes {
|
|
40
|
+
packs: EmotePack[];
|
|
41
|
+
/** Eight slots: an emote id, 'showoff', 'moment:<kind>', or null. */
|
|
42
|
+
wheel: Array<string | null>;
|
|
43
|
+
view: Array<WheelEntry | null>;
|
|
44
|
+
/** Earned and not yet played. */
|
|
45
|
+
moments: Array<Omit<Moment, 'playedAt'>>;
|
|
46
|
+
}
|
|
47
|
+
export declare class SpatialEmotesResource {
|
|
48
|
+
private http;
|
|
49
|
+
constructor(http: HttpClient);
|
|
50
|
+
/** Your packs, your wheel (stored and as it shows) and your ready moments. */
|
|
51
|
+
get(): Promise<MyEmotes>;
|
|
52
|
+
/** Your moments, newest first. `ready: true` lists only the unplayed ones. */
|
|
53
|
+
moments(params?: {
|
|
54
|
+
limit?: number;
|
|
55
|
+
ready?: boolean;
|
|
56
|
+
}): Promise<{
|
|
57
|
+
data: Moment[];
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=spatial-emotes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-emotes.d.ts","sourceRoot":"","sources":["../../src/resources/spatial-emotes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW/C,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzD,MAAM,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,qEAAqE;IACrE,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5B,IAAI,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IAC/B,iCAAiC;IACjC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;CAC1C;AAED,qBAAa,qBAAqB;IACpB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC,8EAA8E;IAC9E,GAAG;IAIH,8EAA8E;IAC9E,OAAO,CAAC,MAAM,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO;cAIrB,MAAM,EAAE;;CAE5C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class SpatialEmotesResource {
|
|
2
|
+
http;
|
|
3
|
+
constructor(http) {
|
|
4
|
+
this.http = http;
|
|
5
|
+
}
|
|
6
|
+
/** Your packs, your wheel (stored and as it shows) and your ready moments. */
|
|
7
|
+
get() {
|
|
8
|
+
return this.http.request({ method: 'GET', path: '/v1/spatial/emotes' });
|
|
9
|
+
}
|
|
10
|
+
/** Your moments, newest first. `ready: true` lists only the unplayed ones. */
|
|
11
|
+
moments(params = {}) {
|
|
12
|
+
const query = {};
|
|
13
|
+
if (params.limit != null)
|
|
14
|
+
query.limit = String(params.limit);
|
|
15
|
+
if (params.ready != null)
|
|
16
|
+
query.ready = String(params.ready);
|
|
17
|
+
return this.http.request({ method: 'GET', path: '/v1/spatial/moments', query });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=spatial-emotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-emotes.js","sourceRoot":"","sources":["../../src/resources/spatial-emotes.ts"],"names":[],"mappings":"AAuDA,MAAM,OAAO,qBAAqB;IACZ;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,8EAA8E;IAC9E,GAAG;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAW,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC,CAAC;IACpF,CAAC;IAED,8EAA8E;IAC9E,OAAO,CAAC,SAA8C,EAAE;QACtD,MAAM,KAAK,GAA2B,EAAE,CAAC;QACzC,IAAI,MAAM,CAAC,KAAK,IAAI,IAAI;YAAE,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7D,IAAI,MAAM,CAAC,KAAK,IAAI,IAAI;YAAE,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAqB,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,CAAC,CAAC;IACtG,CAAC;CACF"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { HttpClient, JsonObject, IdempotencyOpts } from './_shared.js';
|
|
2
|
+
/** One heuristic rule: when TRIGGER happens, do ACT. First match wins. */
|
|
3
|
+
export interface EmployeeRuleInput {
|
|
4
|
+
/** entered | lingered | inspected | added_to_cart | leaving_with_cart | asked */
|
|
5
|
+
when: string;
|
|
6
|
+
/** Seconds of dwell before `lingered` counts. Ignored for other triggers. */
|
|
7
|
+
afterSeconds?: number;
|
|
8
|
+
do: {
|
|
9
|
+
/** approach | say | offer | point | idle */
|
|
10
|
+
act: string;
|
|
11
|
+
/** Spoken line. Printable ASCII, 180 chars. */
|
|
12
|
+
line?: string;
|
|
13
|
+
/** A key into YOUR offers. Never an amount — the server prices it. */
|
|
14
|
+
offerId?: string;
|
|
15
|
+
itemId?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface EmployeeConfigInput {
|
|
19
|
+
sceneId: string;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
displayName: string;
|
|
22
|
+
brainKind: 'idle' | 'rules' | 'agent';
|
|
23
|
+
avatarKey?: string;
|
|
24
|
+
rules?: EmployeeRuleInput[];
|
|
25
|
+
/** Your own endpoint. Validated against private address space on save. */
|
|
26
|
+
agentEndpointUrl?: string | null;
|
|
27
|
+
/** Mint a fresh signing secret. Returned once, in that response only. */
|
|
28
|
+
rotateSecret?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The shop employee: a per-room attendant, and what it costs.
|
|
32
|
+
*
|
|
33
|
+
* An employee greets visitors in one of your 3D rooms. It is simulated on each
|
|
34
|
+
* visitor's own client — everybody gets their own attendant who walks to THEM —
|
|
35
|
+
* and billed in COSM per engaged customer-minute while it is actually talking
|
|
36
|
+
* to somebody. One standing in an empty shop costs nothing, so leaving one
|
|
37
|
+
* switched on is free and quiet hours are not punished.
|
|
38
|
+
*
|
|
39
|
+
* ── THIS RESOURCE CANNOT START A CONVERSATION, AND THAT IS THE POINT ──
|
|
40
|
+
* There is no `engage()` or `disengage()` here, and there is no endpoint
|
|
41
|
+
* behind one. Engagements are in-world signals a room emits as it is drawn for
|
|
42
|
+
* a real visitor, and emitting one OPENS A BILLABLE SESSION. A programmatic
|
|
43
|
+
* caller able to send them would be a way to bill a seller — possibly somebody
|
|
44
|
+
* else's seller — for conversations that never happened, at a per-minute rate,
|
|
45
|
+
* for as long as a loop is left running. So the public API gives an OWNER the
|
|
46
|
+
* two things an owner needs: change the settings, and read the bill.
|
|
47
|
+
*
|
|
48
|
+
* ── THE SIGNING SECRET IS HANDED OVER ONCE ───────────────────────────
|
|
49
|
+
* `saveConfig()` returns `secret` only in the response that MINTED it — when
|
|
50
|
+
* you pass `rotateSecret: true`, or when you first set an agent endpoint on a
|
|
51
|
+
* room that had none. Store it at that moment. It is encrypted at rest and no
|
|
52
|
+
* read path will return it again; `config.hasAgentSecret` is all `getConfig()`
|
|
53
|
+
* will ever say. A secret a settings page can re-read is a secret in every
|
|
54
|
+
* screenshot of that page.
|
|
55
|
+
*
|
|
56
|
+
* ── READING THE MONEY ────────────────────────────────────────────────
|
|
57
|
+
* `billedCents` is COSM cents actually charged. `burnBaseUnits` and
|
|
58
|
+
* `poolBaseUnits` are COSM base units as STRINGS, because they are 64-bit
|
|
59
|
+
* integers — half of every fee is destroyed and half moves to a reward pool.
|
|
60
|
+
* Open conversations contribute zero to every money field until they settle,
|
|
61
|
+
* so a total read mid-conversation is a floor, not a final figure.
|
|
62
|
+
*/
|
|
63
|
+
export declare class SpatialEmployeeResource {
|
|
64
|
+
private http;
|
|
65
|
+
constructor(http: HttpClient);
|
|
66
|
+
/**
|
|
67
|
+
* How the employee in one of your rooms is configured.
|
|
68
|
+
*
|
|
69
|
+
* Owner-only: a room you do not own answers 404, exactly as one that does
|
|
70
|
+
* not exist does. `config: null` means the room has never had an employee —
|
|
71
|
+
* different from one that exists and is switched off (`enabled: false`).
|
|
72
|
+
*
|
|
73
|
+
* `suspendedAt` non-null means the employee is off the floor because a
|
|
74
|
+
* charge was refused, with `suspendedReason` saying which; saving the config
|
|
75
|
+
* again puts it back. Needs `automation:read`.
|
|
76
|
+
*/
|
|
77
|
+
getConfig(sceneId: string): Promise<JsonObject>;
|
|
78
|
+
/**
|
|
79
|
+
* Create or replace the employee in a room. A full REPLACE, not a patch —
|
|
80
|
+
* read `getConfig()` first and send it back changed.
|
|
81
|
+
*
|
|
82
|
+
* `brainKind: 'rules'` evaluates `rules` in order, first match wins, up to
|
|
83
|
+
* twelve. Nothing in a rule carries a price: `do.offerId` is a key into your
|
|
84
|
+
* own offers and the server decides what it is worth, so an employee can
|
|
85
|
+
* propose a discount it has no power to grant. `displayName` and `do.line`
|
|
86
|
+
* must be printable ASCII — they are drawn in the room from a fixed glyph
|
|
87
|
+
* atlas, and anything else renders as a floating box, so they are refused
|
|
88
|
+
* rather than silently rewritten.
|
|
89
|
+
*
|
|
90
|
+
* `brainKind: 'agent'` needs `agentEndpointUrl`, which is resolved and
|
|
91
|
+
* checked against private address space BEFORE it is stored: a
|
|
92
|
+
* public-looking hostname that answers with an internal address is refused
|
|
93
|
+
* here, with a sentence, rather than accepted and then quietly never called.
|
|
94
|
+
*
|
|
95
|
+
* Saving anything CLEARS a suspension. Pass an idempotency key if you might
|
|
96
|
+
* retry a rotation — without one a retried `rotateSecret` mints a second
|
|
97
|
+
* secret and invalidates the one you were just given. Needs
|
|
98
|
+
* `automation:write`.
|
|
99
|
+
*/
|
|
100
|
+
saveConfig(params: EmployeeConfigInput, opts?: IdempotencyOpts): Promise<JsonObject>;
|
|
101
|
+
/**
|
|
102
|
+
* What your employees cost over a period, one row per room.
|
|
103
|
+
*
|
|
104
|
+
* `since`/`until` are ISO 8601 and default to the last 30 days; a window may
|
|
105
|
+
* span at most 366 days, and a longer one is a 400 rather than a silently
|
|
106
|
+
* shortened period. Rooms with no conversations in the window are ABSENT,
|
|
107
|
+
* not reported as zero.
|
|
108
|
+
*
|
|
109
|
+
* `meta.totals` is the same window summed in the database rather than the
|
|
110
|
+
* sum of the rows. `unpaidConversations` settled WITHOUT payment — you were
|
|
111
|
+
* short of COSM, or COSM is not live — and each of those also suspended the
|
|
112
|
+
* employee in that room. They are not a debt and are never retried.
|
|
113
|
+
* Needs `analytics:read`.
|
|
114
|
+
*/
|
|
115
|
+
usage(params?: {
|
|
116
|
+
since?: string;
|
|
117
|
+
until?: string;
|
|
118
|
+
}): Promise<JsonObject>;
|
|
119
|
+
/**
|
|
120
|
+
* The itemised bill: one row per customer-conversation, newest first.
|
|
121
|
+
*
|
|
122
|
+
* This is what makes a usage total checkable by hand. `engagedMs` is
|
|
123
|
+
* SERVER-measured, from two timestamps the server wrote — nothing in this
|
|
124
|
+
* feature lets a client report its own duration — and it is null, not zero,
|
|
125
|
+
* while a conversation is still running.
|
|
126
|
+
*
|
|
127
|
+
* No row names the customer. Billing is per customer, but a bill is an
|
|
128
|
+
* account of what was spent rather than a list of who walked in.
|
|
129
|
+
* Needs `analytics:read`.
|
|
130
|
+
*/
|
|
131
|
+
sessions(params?: {
|
|
132
|
+
since?: string;
|
|
133
|
+
until?: string;
|
|
134
|
+
sceneId?: string;
|
|
135
|
+
unpaidOnly?: boolean;
|
|
136
|
+
page?: number;
|
|
137
|
+
limit?: number;
|
|
138
|
+
}): Promise<JsonObject>;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=spatial-employee.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-employee.d.ts","sourceRoot":"","sources":["../../src/resources/spatial-employee.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE5E,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE;QACF,4CAA4C;QAC5C,GAAG,EAAE,MAAM,CAAC;QACZ,+CAA+C;QAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,sEAAsE;QACtE,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC5B,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,yEAAyE;IACzE,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,uBAAuB;IACtB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM;IAQzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CAAC,MAAM,EAAE,mBAAmB,EAAE,IAAI,GAAE,eAAoB;IASlE;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,MAAM,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO;IAQrD;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,MAAM,GAAE;QACN,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KACX;CAQT"}
|