openblox
Version:
Roblox API Wrapper For Both Classic And OpenCloud APIs.
54 lines (53 loc) • 1.77 kB
TypeScript
import type { Identifier, ISODateTime, ObjectPrettify, ObjectKeysToCamelCase } from "typeforge";
type GamePassInfo<TemporalType extends ISODateTime | Date, GamePassId extends Identifier> = {
TargetId: GamePassId;
ProductType: "Game Pass";
AssetId: Identifier;
ProductId: Identifier;
Name: string;
Description: string;
AssetTypeId: Identifier;
Creator: {
Id: Identifier;
Name: string;
CreatorType: "User" | "Group";
CreatorTargetId: Identifier;
};
IconImageAssetId: Identifier;
Created: TemporalType;
Updated: TemporalType;
PriceInRobux: number;
PriceInTickets: number | null;
Sales: number;
IsNew: boolean;
IsForSale: boolean;
IsPublicDomain: boolean;
IsLimited: boolean;
IsLimitedUnique: boolean;
Remaining: number | null;
MinimumMembershipLevel: number;
};
export type RawGamePassInfo<GamePassId extends Identifier> = GamePassInfo<ISODateTime, GamePassId>;
export type PrettifiedGamePassInfo<GamePassId extends Identifier> = ObjectPrettify<ObjectKeysToCamelCase<GamePassInfo<Date, GamePassId>> & {}>;
export type PrettifiedGamePassesForUniverseData = {
gamePassId: Identifier;
name: string;
description: string;
isForSale: boolean;
iconAssetId: Identifier;
placeId: Identifier;
createdTimestamp: ISODateTime;
updatedTimestamp: ISODateTime;
priceInformation: {
defaultPriceInRobux: number;
isInActivePriceOptimizationExperiment: boolean;
isInActiveDiscountCampaign: boolean;
discountPercentage: number;
};
productId: Identifier;
}[];
export type RawGamePassesForUniverseData = {
gamePasses: PrettifiedGamePassesForUniverseData;
cursor: string | null;
};
export {};