Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AssetProductInfo type #1351

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/customDefinitions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,12 @@ interface MarketplaceService extends Instance {
user: Player,
subscriptionId: string,
): UserSubscriptionStatus;
PromptBulkPurchase(
this: MarketplaceService,
player: Player,
lineItems: Array<PromptBulkPurchaseItem>,
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;
Expand Down
28 changes: 27 additions & 1 deletion include/roblox.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" | 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 | undefined;
CollectibleItemId: string | undefined;
CollectibleProductId: string | undefined;
/** 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 */
Expand All @@ -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<number>;
};
/** Indicates whether the item is marked as 13+ in catalog */
ContentRatingTypeId: number;
/** The minimum Builder's Club subscription necessary to purchase the item */
Expand Down Expand Up @@ -3320,6 +3341,11 @@ interface ExpirationDetails {
ExpirationReason: Enum.SubscriptionExpirationReason;
}

interface PromptBulkPurchaseItem {
Id: string;
Type: Enum.MarketplaceProductType;
}

interface PromptBulkPurchaseFinishedResults {
RobuxSpent: number;
Items: Array<{
Expand Down