From 5f676ccb18b124ef3424e20f3d714aadce71e6b5 Mon Sep 17 00:00:00 2001 From: AndalYLP <160054201+AndalYLP@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:11:45 -0500 Subject: [PATCH 1/5] add `PromptBulkPurchaseItem` type --- include/roblox.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/roblox.d.ts b/include/roblox.d.ts index 4a246ad4c..7012e097c 100644 --- a/include/roblox.d.ts +++ b/include/roblox.d.ts @@ -3320,6 +3320,11 @@ interface ExpirationDetails { ExpirationReason: Enum.SubscriptionExpirationReason; } +interface PromptBulkPurchaseItem { + Id: number; + Type: Enum.MarketplaceProductType; +} + interface PromptBulkPurchaseFinishedResults { RobuxSpent: number; Items: Array<{ From cd73d10edba506235e5be2d967296b9be9581ebe Mon Sep 17 00:00:00 2001 From: AndalYLP <160054201+AndalYLP@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:12:05 -0500 Subject: [PATCH 2/5] add `PromptBulkPurchase` custom definition --- include/customDefinitions.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/customDefinitions.d.ts b/include/customDefinitions.d.ts index bf11736cc..412337919 100644 --- a/include/customDefinitions.d.ts +++ b/include/customDefinitions.d.ts @@ -672,6 +672,12 @@ interface MarketplaceService extends Instance { user: Player, subscriptionId: string, ): UserSubscriptionStatus; + PromptBulkPurchase( + this: MarketplaceService, + player: Player, + lineItems: Array, + options: object, + ): void; PromptBundlePurchase(this: MarketplaceService, player: Player, bundleId: number): void; PromptGamePassPurchase(this: MarketplaceService, player: Player, gamePassId: number): void; PromptPremiumPurchase(this: MarketplaceService, player: Player): void; From bc12041552943e4ee434f89fdf626da124e47246 Mon Sep 17 00:00:00 2001 From: AndalYLP <160054201+AndalYLP@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:19:18 -0500 Subject: [PATCH 3/5] fix: string is the only type accepted by roblox --- include/roblox.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/roblox.d.ts b/include/roblox.d.ts index 7012e097c..dcbb2913a 100644 --- a/include/roblox.d.ts +++ b/include/roblox.d.ts @@ -3321,7 +3321,7 @@ interface ExpirationDetails { } interface PromptBulkPurchaseItem { - Id: number; + Id: string; Type: Enum.MarketplaceProductType; } From 9f795c64e626dba4a4696094b8bd0a8162b0b472 Mon Sep 17 00:00:00 2001 From: AndalYLP <160054201+AndalYLP@users.noreply.github.com> Date: Thu, 13 Feb 2025 20:41:47 -0500 Subject: [PATCH 4/5] Added missing types from AssetProductInfo --- include/roblox.d.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/include/roblox.d.ts b/include/roblox.d.ts index dcbb2913a..025e5dcbd 100644 --- a/include/roblox.d.ts +++ b/include/roblox.d.ts @@ -195,11 +195,26 @@ interface ProductInfo { interface AssetProductInfo extends ProductInfo { /** Describes whether the asset is a User Product, Developer Product, or Game Pass */ - ProductType: "User Product"; + ProductType?: "Collectible Item" | "User Product"; /** If InfoType was Asset, this is the ID of the given asset. */ AssetId: number; /** The [type of asset](https://developer.roblox.com/articles/Asset-types) (e.g. place, model, shirt). In TypeScript, you should compare this value to a member of the `AssetTypeId` const enum. */ AssetTypeId: AssetTypeId; + /** Describes whether the asset is purchasable in the current experience. */ + CanBeSoldInThisGame?: boolean; + CollectibleItemId?: string; + CollectibleProductId?: string; + /** A table of information describing the item collectible details. */ + CollectiblesItemDetails?: { + /** Describes whether the asset is purchasable */ + IsForSale: boolean; + /** Describes whether the asset is a "limited item" that is no longer (if ever) sold */ + IsLimited: boolean; + /** The number of limited copies, 0 if it's not a limited item */ + TotalQuantity: number; + }; + /** The asset ID of the product/pass icon, or 0 if there isn't one. */ + IconImageAssetId: number; /** Describes whether the asset is marked as "new" in the catalog */ IsNew: boolean; /** Describes whether the asset is a "limited item" that is no longer (if ever) sold */ @@ -210,6 +225,12 @@ interface AssetProductInfo extends ProductInfo { IsPublicDomain: boolean; /** The remaining number of items a limited unique item may be sold */ Remaining: number | undefined; + /** A table of information describing the sale location of the product. */ + SaleLocation?: { + SaleLocationType: number; + /** A list of universe IDs where the product is available for purchase. */ + UniverseIds: Array; + }; /** Indicates whether the item is marked as 13+ in catalog */ ContentRatingTypeId: number; /** The minimum Builder's Club subscription necessary to purchase the item */ From d6e979396f647bc635457ca158a289a137c3064d Mon Sep 17 00:00:00 2001 From: AndalYLP <160054201+AndalYLP@users.noreply.github.com> Date: Thu, 13 Feb 2025 20:58:27 -0500 Subject: [PATCH 5/5] Prefer `: T | undefined` instead of `?: T` --- include/roblox.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/roblox.d.ts b/include/roblox.d.ts index 025e5dcbd..0f750ea36 100644 --- a/include/roblox.d.ts +++ b/include/roblox.d.ts @@ -195,15 +195,15 @@ interface ProductInfo { interface AssetProductInfo extends ProductInfo { /** Describes whether the asset is a User Product, Developer Product, or Game Pass */ - ProductType?: "Collectible Item" | "User Product"; + ProductType: "Collectible Item" | "User Product" | undefined; /** If InfoType was Asset, this is the ID of the given asset. */ AssetId: number; /** The [type of asset](https://developer.roblox.com/articles/Asset-types) (e.g. place, model, shirt). In TypeScript, you should compare this value to a member of the `AssetTypeId` const enum. */ AssetTypeId: AssetTypeId; /** Describes whether the asset is purchasable in the current experience. */ - CanBeSoldInThisGame?: boolean; - CollectibleItemId?: string; - CollectibleProductId?: string; + CanBeSoldInThisGame: boolean | undefined; + CollectibleItemId: string | undefined; + CollectibleProductId: string | undefined; /** A table of information describing the item collectible details. */ CollectiblesItemDetails?: { /** Describes whether the asset is purchasable */