From b4f8df66ef7d9a01d2202e4dc8edcb097b70984b Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Thu, 19 Sep 2024 11:02:47 +0100 Subject: [PATCH 1/9] refactor: Generalize createEventSchema --- src/platform/events/rewards.ts | 36 ++++++++++++---------------------- src/platform/events/utils.ts | 25 +++++++++++++++++++++++ 2 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 src/platform/events/utils.ts diff --git a/src/platform/events/rewards.ts b/src/platform/events/rewards.ts index 073f6ac..28d3063 100644 --- a/src/platform/events/rewards.ts +++ b/src/platform/events/rewards.ts @@ -1,6 +1,7 @@ import { EthAddress } from '../../misc' import { generateLazyValidator, JSONSchema, ValidateFunction } from '../../validation' import { BaseEvent, Events } from './base' +import { createEventSchema } from './utils' type BaseEventMetadata = { title: string @@ -22,8 +23,6 @@ export type CampaignWellKnownIssueEventMetadata = BaseEventMetadata & { campaignName: string } -type Metadata = RewardEventMetadata | CampaignWellKnownIssueEventMetadata - export type RewardInProgressEvent = BaseEvent & { type: Events.Type.REWARDS subType: Events.SubType.Rewards.REWARD_IN_PROGRESS @@ -60,21 +59,6 @@ export type RewardDelayedEvent = BaseEvent & { metadata: RewardEventMetadata } -function createSchema(subType: string, metadataSchema: JSONSchema): JSONSchema { - return { - type: 'object', - properties: { - type: { type: 'string', const: Events.Type.REWARDS }, - subType: { type: 'string', const: subType }, - key: { type: 'string' }, - timestamp: { type: 'number', minimum: 0 }, - metadata: metadataSchema - }, - required: ['type', 'subType', 'key', 'timestamp', 'metadata'], - additionalProperties: false - } as JSONSchema -} - const rewardEventMetadataSchema: JSONSchema = { type: 'object', properties: { @@ -106,7 +90,8 @@ const campaignEventMetadataSchema: JSONSchema = createSchema( + export const schema: JSONSchema = createEventSchema( + Events.Type.REWARDS, Events.SubType.Rewards.REWARD_IN_PROGRESS, rewardEventMetadataSchema ) @@ -114,7 +99,8 @@ export namespace RewardInProgressEvent { } export namespace RewardAssignedEvent { - export const schema: JSONSchema = createSchema( + export const schema: JSONSchema = createEventSchema( + Events.Type.REWARDS, Events.SubType.Rewards.REWARD_ASSIGNED, rewardEventMetadataSchema ) @@ -122,7 +108,8 @@ export namespace RewardAssignedEvent { } export namespace CampaignOutOfFundsEvent { - export const schema: JSONSchema = createSchema( + export const schema: JSONSchema = createEventSchema( + Events.Type.REWARDS, Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS, campaignEventMetadataSchema ) @@ -130,7 +117,8 @@ export namespace CampaignOutOfFundsEvent { } export namespace CampaignGasPriceHigherThanExpectedEvent { - export const schema: JSONSchema = createSchema( + export const schema: JSONSchema = createEventSchema( + Events.Type.REWARDS, Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED, campaignEventMetadataSchema ) @@ -138,7 +126,8 @@ export namespace CampaignGasPriceHigherThanExpectedEvent { } export namespace CampaignOutOfStockEvent { - export const schema: JSONSchema = createSchema( + export const schema: JSONSchema = createEventSchema( + Events.Type.REWARDS, Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK, campaignEventMetadataSchema ) @@ -146,7 +135,8 @@ export namespace CampaignOutOfStockEvent { } export namespace RewardDelayedEvent { - export const schema: JSONSchema = createSchema( + export const schema: JSONSchema = createEventSchema( + Events.Type.REWARDS, Events.SubType.Rewards.REWARD_DELAYED, rewardEventMetadataSchema ) diff --git a/src/platform/events/utils.ts b/src/platform/events/utils.ts new file mode 100644 index 0000000..8ee6918 --- /dev/null +++ b/src/platform/events/utils.ts @@ -0,0 +1,25 @@ +import { JSONSchema } from '../../validation' +import { BaseEvent } from './base' + +type BaseEventWithMetadata = BaseEvent & { + metadata: M +} + +export function createEventSchema, M>( + type: string, + subType: string, + metadataSchema: JSONSchema +): JSONSchema { + return { + type: 'object', + properties: { + type: { type: 'string', const: type }, + subType: { type: 'string', const: subType }, + key: { type: 'string' }, + timestamp: { type: 'number', minimum: 0 }, + metadata: metadataSchema + }, + required: ['type', 'subType', 'key', 'timestamp', 'metadata'], + additionalProperties: false + } as JSONSchema +} From 90b36059e3634aee64460a9f596145d2488b004e Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Thu, 19 Sep 2024 11:16:03 +0100 Subject: [PATCH 2/9] feat: Add ItemPublishedEvent --- src/platform/events/base.ts | 5 +- src/platform/events/blockchain.ts | 101 ++++++++++++++---------- test/platform/events/blockchain.spec.ts | 28 +++++++ 3 files changed, 90 insertions(+), 44 deletions(-) diff --git a/src/platform/events/base.ts b/src/platform/events/base.ts index 894de46..96f4b19 100644 --- a/src/platform/events/base.ts +++ b/src/platform/events/base.ts @@ -1,6 +1,7 @@ import { BidAcceptedEvent, CollectionCreatedEvent, + ItemPublishedEvent, ItemSoldEvent, RentalEndedEvent, RentalStartedEvent, @@ -36,7 +37,8 @@ export namespace Events { RENTAL_ENDED = 'land-rental-ended', RENTAL_STARTED = 'land-rental-started', ROYALTIES_EARNED = 'royalties-earned', - COLLECTION_CREATED = 'collection-created' + COLLECTION_CREATED = 'collection-created', + ITEM_PUBLISHED = 'item-published' } export enum Marketplace { @@ -90,6 +92,7 @@ export type Event = | BidAcceptedEvent | BidReceivedEvent | ItemSoldEvent + | ItemPublishedEvent | RentalEndedEvent | RentalStartedEvent | RoyaltiesEarnedEvent diff --git a/src/platform/events/blockchain.ts b/src/platform/events/blockchain.ts index 20d8cdf..153a609 100644 --- a/src/platform/events/blockchain.ts +++ b/src/platform/events/blockchain.ts @@ -1,5 +1,6 @@ import { generateLazyValidator, JSONSchema, ValidateFunction } from '../../validation' import { BaseEvent, Events } from './base' +import { createEventSchema } from './utils' export type BidEventMetadata = { address: string @@ -54,59 +55,73 @@ export namespace BidAcceptedEvent { export const validate: ValidateFunction = generateLazyValidator(schema) } +type ItemEventMetadata = { + address: string + image: string + buyer: string + seller: string + category: string + rarity?: string + link: string + nftName?: string + tokenId: string + network: string + title: string + description: string +} + export type ItemSoldEvent = BaseEvent & { type: Events.Type.BLOCKCHAIN subType: Events.SubType.Blockchain.ITEM_SOLD - metadata: { - address: string - image: string - buyer: string - seller: string - category: string - rarity?: string - link: string - nftName?: string - tokenId: string - network: string - title: string - description: string - } + metadata: ItemEventMetadata +} + +// TODO: should we use the itemId instead of tokenId? +export type ItemPublishedEvent = BaseEvent & { + type: Events.Type.BLOCKCHAIN + subType: Events.SubType.Blockchain.ITEM_PUBLISHED + metadata: ItemEventMetadata +} + +const itemEventMetadataSchema: JSONSchema = { + type: 'object', + properties: { + address: { type: 'string' }, + image: { type: 'string' }, + buyer: { type: 'string' }, + seller: { type: 'string' }, + category: { type: 'string' }, + rarity: { type: 'string', nullable: true }, + link: { type: 'string' }, + nftName: { type: 'string', nullable: true }, + tokenId: { type: 'string' }, + network: { type: 'string' }, + title: { type: 'string' }, + description: { type: 'string' } + }, + required: ['address', 'image', 'seller', 'category', 'link', 'network', 'title', 'description'] } export namespace ItemSoldEvent { - export const schema: JSONSchema = { - type: 'object', - properties: { - type: { type: 'string', const: Events.Type.BLOCKCHAIN }, - subType: { type: 'string', const: Events.SubType.Blockchain.ITEM_SOLD }, - key: { type: 'string' }, - timestamp: { type: 'number', minimum: 0 }, - metadata: { - type: 'object', - properties: { - address: { type: 'string' }, - image: { type: 'string' }, - buyer: { type: 'string' }, - seller: { type: 'string' }, - category: { type: 'string' }, - rarity: { type: 'string', nullable: true }, - link: { type: 'string' }, - nftName: { type: 'string', nullable: true }, - tokenId: { type: 'string' }, - network: { type: 'string' }, - title: { type: 'string' }, - description: { type: 'string' } - }, - required: ['address', 'image', 'seller', 'category', 'link', 'network', 'title', 'description'] - } - }, - required: ['type', 'subType', 'key', 'timestamp', 'metadata'], - additionalProperties: false - } + export const schema: JSONSchema = createEventSchema( + Events.Type.BLOCKCHAIN, + Events.SubType.Blockchain.ITEM_SOLD, + itemEventMetadataSchema + ) export const validate: ValidateFunction = generateLazyValidator(schema) } +export namespace ItemPublishedEvent { + export const schema: JSONSchema = createEventSchema( + Events.Type.BLOCKCHAIN, + Events.SubType.Blockchain.ITEM_PUBLISHED, + itemEventMetadataSchema + ) + + export const validate: ValidateFunction = generateLazyValidator(schema) +} + type RentalMetadata = { address: string contract: string diff --git a/test/platform/events/blockchain.spec.ts b/test/platform/events/blockchain.spec.ts index 80662f2..003a984 100644 --- a/test/platform/events/blockchain.spec.ts +++ b/test/platform/events/blockchain.spec.ts @@ -3,6 +3,7 @@ import { BidAcceptedEvent, CollectionCreatedEvent, Events, + ItemPublishedEvent, ItemSoldEvent, RentalEndedEvent, RentalStartedEvent, @@ -63,6 +64,33 @@ describe('Blockchain Events tests', () => { expect(ItemSoldEvent.validate({})).toEqual(false) }) + it('ItemPublished static tests must pass', () => { + const event: ItemPublishedEvent = { + type: Events.Type.BLOCKCHAIN, + subType: Events.SubType.Blockchain.ITEM_PUBLISHED, + key: 'key', + timestamp: 1, + metadata: { + address: 'address', + image: 'image', + buyer: 'buyer', + seller: 'seller', + category: 'category', + rarity: 'rarity', + link: 'link', + nftName: 'nftName', + title: 'title', + description: 'description', + network: 'network', + tokenId: 'tokenId' + } + } + + expect(ItemPublishedEvent.validate(event)).toEqual(true) + expect(ItemPublishedEvent.validate(null)).toEqual(false) + expect(ItemPublishedEvent.validate({})).toEqual(false) + }) + it('RentalEndedEvent static tests must pass', () => { const event: RentalEndedEvent = { type: Events.Type.BLOCKCHAIN, From e7f9327e129929f7fdc9e1454a11d57a93365ab7 Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Thu, 19 Sep 2024 11:19:13 +0100 Subject: [PATCH 3/9] feat: Add WalkedDistanceEvent --- src/platform/events/base.ts | 6 ++++-- src/platform/events/client.ts | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/platform/events/base.ts b/src/platform/events/base.ts index 96f4b19..fb32c51 100644 --- a/src/platform/events/base.ts +++ b/src/platform/events/base.ts @@ -8,7 +8,7 @@ import { RoyaltiesEarnedEvent } from './blockchain' import { CatalystDeploymentEvent } from './catalyst' -import { MoveToParcelEvent, PassportOpenedEvent, UsedEmoteEvent } from './client' +import { MoveToParcelEvent, PassportOpenedEvent, UsedEmoteEvent, WalkedDistanceEvent } from './client' import { BidReceivedEvent } from './marketplace' import { RewardInProgressEvent, @@ -57,7 +57,8 @@ export namespace Events { export enum Client { MOVE_TO_PARCEL = 'move-to-parcel', USED_EMOTE = 'used-emote', - PASSPORT_OPENED = 'passport-opened' + PASSPORT_OPENED = 'passport-opened', + WALKED_DISTANCE = 'walked-distance' } export enum Rewards { @@ -108,3 +109,4 @@ export type Event = | BadgeGrantedEvent | UsedEmoteEvent | PassportOpenedEvent + | WalkedDistanceEvent diff --git a/src/platform/events/client.ts b/src/platform/events/client.ts index 7aa5357..32b940b 100644 --- a/src/platform/events/client.ts +++ b/src/platform/events/client.ts @@ -45,3 +45,12 @@ export type PassportOpenedEvent = BaseEvent & { } } } + +export type WalkedDistanceEvent = BaseEvent & { + type: Events.Type.CLIENT + subType: Events.SubType.Client.WALKED_DISTANCE + metadata: ClientBaseMetadata & { + distance: number + stepCount: number + } +} From eda5f5bee9ea19ea925595bcf7bd2c4cc7c8cff3 Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Thu, 19 Sep 2024 11:22:37 +0100 Subject: [PATCH 4/9] feat: Add VerticalHeightReachedEvent --- src/platform/events/base.ts | 34 +++++++++++++++++++++------------- src/platform/events/client.ts | 8 ++++++++ 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/platform/events/base.ts b/src/platform/events/base.ts index fb32c51..1624c94 100644 --- a/src/platform/events/base.ts +++ b/src/platform/events/base.ts @@ -8,7 +8,13 @@ import { RoyaltiesEarnedEvent } from './blockchain' import { CatalystDeploymentEvent } from './catalyst' -import { MoveToParcelEvent, PassportOpenedEvent, UsedEmoteEvent, WalkedDistanceEvent } from './client' +import { + MoveToParcelEvent, + PassportOpenedEvent, + UsedEmoteEvent, + VerticalHeightReachedEvent, + WalkedDistanceEvent +} from './client' import { BidReceivedEvent } from './marketplace' import { RewardInProgressEvent, @@ -58,7 +64,8 @@ export namespace Events { MOVE_TO_PARCEL = 'move-to-parcel', USED_EMOTE = 'used-emote', PASSPORT_OPENED = 'passport-opened', - WALKED_DISTANCE = 'walked-distance' + WALKED_DISTANCE = 'walked-distance', + VERTICAL_HEIGHT_REACHED = 'vertical-height-reached' } export enum Rewards { @@ -90,23 +97,24 @@ export type BaseEvent = { } export type Event = + | BadgeGrantedEvent | BidAcceptedEvent | BidReceivedEvent - | ItemSoldEvent + | CampaignGasPriceHigherThanExpectedEvent + | CampaignOutOfFundsEvent + | CampaignOutOfStockEvent + | CatalystDeploymentEvent + | CollectionCreatedEvent | ItemPublishedEvent + | ItemSoldEvent + | MoveToParcelEvent + | PassportOpenedEvent | RentalEndedEvent | RentalStartedEvent - | RoyaltiesEarnedEvent - | CollectionCreatedEvent - | MoveToParcelEvent - | CatalystDeploymentEvent - | RewardInProgressEvent | RewardAssignedEvent - | CampaignOutOfFundsEvent - | CampaignGasPriceHigherThanExpectedEvent - | CampaignOutOfStockEvent | RewardDelayedEvent - | BadgeGrantedEvent + | RewardInProgressEvent + | RoyaltiesEarnedEvent | UsedEmoteEvent - | PassportOpenedEvent + | VerticalHeightReachedEvent | WalkedDistanceEvent diff --git a/src/platform/events/client.ts b/src/platform/events/client.ts index 32b940b..e1aab8f 100644 --- a/src/platform/events/client.ts +++ b/src/platform/events/client.ts @@ -54,3 +54,11 @@ export type WalkedDistanceEvent = BaseEvent & { stepCount: number } } + +export type VerticalHeightReachedEvent = BaseEvent & { + type: Events.Type.CLIENT + subType: Events.SubType.Client.VERTICAL_HEIGHT_REACHED + metadata: ClientBaseMetadata & { + height: number + } +} From 87eeaf47f0bea33b163bb2fc3663b0632ab15ea5 Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Thu, 19 Sep 2024 11:24:43 +0100 Subject: [PATCH 5/9] chore: Refresh API --- report/schemas.api.md | 69 ++++++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 17 deletions(-) diff --git a/report/schemas.api.md b/report/schemas.api.md index 163ac74..dbe1596 100644 --- a/report/schemas.api.md +++ b/report/schemas.api.md @@ -1045,7 +1045,7 @@ export namespace EthAddress { // Warning: (ae-missing-release-tag) "Event" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export type Event = BidAcceptedEvent | BidReceivedEvent | ItemSoldEvent | RentalEndedEvent | RentalStartedEvent | RoyaltiesEarnedEvent | CollectionCreatedEvent | MoveToParcelEvent | CatalystDeploymentEvent | RewardInProgressEvent | RewardAssignedEvent | CampaignOutOfFundsEvent | CampaignGasPriceHigherThanExpectedEvent | CampaignOutOfStockEvent | RewardDelayedEvent | BadgeGrantedEvent | UsedEmoteEvent | PassportOpenedEvent; +export type Event = BadgeGrantedEvent | BidAcceptedEvent | BidReceivedEvent | CampaignGasPriceHigherThanExpectedEvent | CampaignOutOfFundsEvent | CampaignOutOfStockEvent | CatalystDeploymentEvent | CollectionCreatedEvent | ItemPublishedEvent | ItemSoldEvent | MoveToParcelEvent | PassportOpenedEvent | RentalEndedEvent | RentalStartedEvent | RewardAssignedEvent | RewardDelayedEvent | RewardInProgressEvent | RoyaltiesEarnedEvent | UsedEmoteEvent | VerticalHeightReachedEvent | WalkedDistanceEvent; // Warning: (ae-missing-release-tag) "Events" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1065,6 +1065,8 @@ export namespace Events { // (undocumented) COLLECTION_CREATED = "collection-created", // (undocumented) + ITEM_PUBLISHED = "item-published", + // (undocumented) ITEM_SOLD = "item-sold", // (undocumented) RENTAL_ENDED = "land-rental-ended", @@ -1095,7 +1097,11 @@ export namespace Events { // (undocumented) PASSPORT_OPENED = "passport-opened", // (undocumented) - USED_EMOTE = "used-emote" + USED_EMOTE = "used-emote", + // (undocumented) + VERTICAL_HEIGHT_REACHED = "vertical-height-reached", + // (undocumented) + WALKED_DISTANCE = "walked-distance" } // (undocumented) export enum Marketplace { @@ -1404,6 +1410,24 @@ export type ItemFilters = { emoteHasGeometry?: boolean; }; +// Warning: (ae-missing-release-tag) "ItemPublishedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-missing-release-tag) "ItemPublishedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type ItemPublishedEvent = BaseEvent & { + type: Events.Type.BLOCKCHAIN; + subType: Events.SubType.Blockchain.ITEM_PUBLISHED; + metadata: ItemEventMetadata; +}; + +// @public (undocumented) +export namespace ItemPublishedEvent { + const // (undocumented) + schema: JSONSchema; + const // (undocumented) + validate: ValidateFunction; +} + // Warning: (ae-missing-release-tag) "ItemSoldEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-missing-release-tag) "ItemSoldEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1411,20 +1435,7 @@ export type ItemFilters = { export type ItemSoldEvent = BaseEvent & { type: Events.Type.BLOCKCHAIN; subType: Events.SubType.Blockchain.ITEM_SOLD; - metadata: { - address: string; - image: string; - buyer: string; - seller: string; - category: string; - rarity?: string; - link: string; - nftName?: string; - tokenId: string; - network: string; - title: string; - description: string; - }; + metadata: ItemEventMetadata; }; // @public (undocumented) @@ -3385,6 +3396,29 @@ export type ValidWorldRange = { yMax: number; }; +// Warning: (ae-missing-release-tag) "VerticalHeightReachedEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type VerticalHeightReachedEvent = BaseEvent & { + type: Events.Type.CLIENT; + subType: Events.SubType.Client.VERTICAL_HEIGHT_REACHED; + metadata: ClientBaseMetadata & { + height: number; + }; +}; + +// Warning: (ae-missing-release-tag) "WalkedDistanceEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type WalkedDistanceEvent = BaseEvent & { + type: Events.Type.CLIENT; + subType: Events.SubType.Client.WALKED_DISTANCE; + metadata: ClientBaseMetadata & { + distance: number; + stepCount: number; + }; +}; + // @alpha (undocumented) export type Wearable = BaseItem & { data: { @@ -3626,7 +3660,8 @@ export namespace WorldConfiguration { // src/dapps/trade.ts:80:3 - (ae-incompatible-release-tags) The symbol "chainId" is marked as @public, but its signature references "ChainId" which is marked as @alpha // src/dapps/trade.ts:91:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha // src/dapps/trade.ts:92:3 - (ae-incompatible-release-tags) The symbol "chainId" is marked as @public, but its signature references "ChainId" which is marked as @alpha -// src/platform/events/blockchain.ts:128:3 - (ae-forgotten-export) The symbol "RentalMetadata" needs to be exported by the entry point index.d.ts +// src/platform/events/blockchain.ts:83:3 - (ae-forgotten-export) The symbol "ItemEventMetadata" needs to be exported by the entry point index.d.ts +// src/platform/events/blockchain.ts:143:3 - (ae-forgotten-export) The symbol "RentalMetadata" needs to be exported by the entry point index.d.ts // src/platform/events/client.ts:16:3 - (ae-forgotten-export) The symbol "ClientBaseMetadata" needs to be exported by the entry point index.d.ts // src/platform/item/emote/adr74/emote-data-adr74.ts:7:3 - (ae-incompatible-release-tags) The symbol "representations" is marked as @public, but its signature references "EmoteRepresentationADR74" which is marked as @alpha // src/platform/item/linked-wearable-mappings.ts:251:3 - (ae-incompatible-release-tags) The symbol "getMappings" is marked as @public, but its signature references "Mappings" which is marked as @alpha From f306e4c47543e7c4d0d7fbbdad475ad54f80202c Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Tue, 24 Sep 2024 10:17:51 +0100 Subject: [PATCH 6/9] feat: Add Item Published notif type --- src/platform/notifications/notifications.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/notifications/notifications.ts b/src/platform/notifications/notifications.ts index 0c8184a..9e16a58 100644 --- a/src/platform/notifications/notifications.ts +++ b/src/platform/notifications/notifications.ts @@ -21,6 +21,7 @@ export enum NotificationType { GOVERNANCE_WHALE_VOTE = 'governance_whale_vote', GOVERNANCE_VOTED_ON_BEHALF = 'governance_voted_on_behalf', ITEM_SOLD = 'item_sold', + ITEM_PUBLISHED = 'item_published', LAND_RENTAL_ENDED = 'rental_ended', LAND_RENTED = 'rental_started', REWARD_ASSIGNED = 'reward_assignment', From c81d319538ba7f13cf05809bd79987bbab803c06 Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Tue, 24 Sep 2024 10:18:12 +0100 Subject: [PATCH 7/9] chore: Refresh API --- report/schemas.api.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/report/schemas.api.md b/report/schemas.api.md index dbe1596..2285c13 100644 --- a/report/schemas.api.md +++ b/report/schemas.api.md @@ -1983,6 +1983,8 @@ export enum NotificationType { // (undocumented) GOVERNANCE_WHALE_VOTE = "governance_whale_vote", // (undocumented) + ITEM_PUBLISHED = "item_published", + // (undocumented) ITEM_SOLD = "item_sold", // (undocumented) LAND_RENTAL_ENDED = "rental_ended", From 6d60207db2b8c8f87be56df7f3374856aebe5361 Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Tue, 24 Sep 2024 10:18:46 +0100 Subject: [PATCH 8/9] chore: Remove TODO --- src/platform/events/blockchain.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/platform/events/blockchain.ts b/src/platform/events/blockchain.ts index 153a609..7815903 100644 --- a/src/platform/events/blockchain.ts +++ b/src/platform/events/blockchain.ts @@ -76,7 +76,6 @@ export type ItemSoldEvent = BaseEvent & { metadata: ItemEventMetadata } -// TODO: should we use the itemId instead of tokenId? export type ItemPublishedEvent = BaseEvent & { type: Events.Type.BLOCKCHAIN subType: Events.SubType.Blockchain.ITEM_PUBLISHED From 61ab304ae65a6c2c3e85f3590b0081c62844535e Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Tue, 24 Sep 2024 10:20:06 +0100 Subject: [PATCH 9/9] chore: Refresh API --- report/schemas.api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/report/schemas.api.md b/report/schemas.api.md index 2285c13..8adb6e6 100644 --- a/report/schemas.api.md +++ b/report/schemas.api.md @@ -3662,8 +3662,8 @@ export namespace WorldConfiguration { // src/dapps/trade.ts:80:3 - (ae-incompatible-release-tags) The symbol "chainId" is marked as @public, but its signature references "ChainId" which is marked as @alpha // src/dapps/trade.ts:91:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha // src/dapps/trade.ts:92:3 - (ae-incompatible-release-tags) The symbol "chainId" is marked as @public, but its signature references "ChainId" which is marked as @alpha -// src/platform/events/blockchain.ts:83:3 - (ae-forgotten-export) The symbol "ItemEventMetadata" needs to be exported by the entry point index.d.ts -// src/platform/events/blockchain.ts:143:3 - (ae-forgotten-export) The symbol "RentalMetadata" needs to be exported by the entry point index.d.ts +// src/platform/events/blockchain.ts:82:3 - (ae-forgotten-export) The symbol "ItemEventMetadata" needs to be exported by the entry point index.d.ts +// src/platform/events/blockchain.ts:142:3 - (ae-forgotten-export) The symbol "RentalMetadata" needs to be exported by the entry point index.d.ts // src/platform/events/client.ts:16:3 - (ae-forgotten-export) The symbol "ClientBaseMetadata" needs to be exported by the entry point index.d.ts // src/platform/item/emote/adr74/emote-data-adr74.ts:7:3 - (ae-incompatible-release-tags) The symbol "representations" is marked as @public, but its signature references "EmoteRepresentationADR74" which is marked as @alpha // src/platform/item/linked-wearable-mappings.ts:251:3 - (ae-incompatible-release-tags) The symbol "getMappings" is marked as @public, but its signature references "Mappings" which is marked as @alpha