import { f as Result, m as OpenCloudError, s as OpenCloudClientOptions, u as RequestOptions } from "./types-C3Egi37J.mjs"; import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-B2ceLfSn.mjs"; //#region src/domains/developer-products/products/types.d.ts /** * Pricing feature flags that can be enabled on a developer product. Values * mirror the Open Cloud `DeveloperProducts.PricingFeature` enum. * * @since 0.1.0 */ type DeveloperProductPricingFeature = "Invalid" | "PriceOptimization" | "RegionalPricing" | "UserFixedPrice"; /** * Public shape of a developer product's pricing configuration. * * @since 0.1.0 */ interface DeveloperProductPrice { /** Default Robux price; `undefined` when no default price is configured. */ readonly defaultPriceInRobux: number | undefined; /** Pricing feature flags currently enabled on this developer product. */ readonly enabledFeatures: ReadonlyArray; } /** * A Roblox developer product as exposed to SDK consumers. Fields use * DX-friendly names and types (stringified IDs, `Date` timestamps) rather * than the raw wire representation. * * @since 0.1.0 */ interface DeveloperProduct { /** * Stringified developer product ID. The API returns an int64; always use * this. */ readonly id: string; /** Display name of the developer product. */ readonly name: string; /** * ISO timestamp at which the developer product was created, as a `Date`. */ readonly createdAt: Date; /** Consumer-facing description shown on the storefront. */ readonly description: string; /** * Icon image asset ID as a string; `undefined` when no icon is uploaded. */ readonly iconImageAssetId: string | undefined; /** Whether the developer product is currently purchasable. */ readonly isForSale: boolean; /** Whether the developer product is locked from configuration changes. */ readonly isImmutable: boolean; /** Whether managed pricing is enabled for the developer product. */ readonly isManagedPricingEnabled: boolean; /** Pricing configuration; `undefined` when pricing is not yet set. */ readonly price: DeveloperProductPrice | undefined; /** * Whether the developer product appears on the external store page. * `undefined` when the response omits the field, as the create endpoint * does. */ readonly storePageEnabled: boolean | undefined; /** Stringified ID of the universe that owns the developer product. */ readonly universeId: string; /** ISO timestamp of the most recent update, as a `Date`. */ readonly updatedAt: Date; } /** * Parameters for creating a new developer product under a universe. * * @since 0.1.0 */ interface CreateDeveloperProductParameters { /** Display name of the new developer product. */ readonly name: string; /** Optional consumer-facing description shown on the storefront. */ readonly description?: string; /** Optional icon image uploaded with the new developer product. */ readonly imageFile?: Blob | Uint8Array; /** Whether the developer product should be purchasable immediately. */ readonly isForSale?: boolean; /** Whether regional pricing should be enabled at creation time. */ readonly isRegionalPricingEnabled?: boolean; /** Optional default price in Robux at creation time. */ readonly price?: number; /** Stringified ID of the universe that owns the developer product. */ readonly universeId: string; } /** * Parameters for reading a single developer product by ID. * * @since 0.1.0 */ interface GetDeveloperProductParameters { /** Stringified ID of the developer product to retrieve. */ readonly productId: string; /** Stringified ID of the universe that owns the developer product. */ readonly universeId: string; } /** * Parameters for partially updating an existing developer product. Every * field except the identifiers is optional; omitted fields are not included * in the multipart PATCH body so the server leaves their current values * untouched. * * @since 0.1.0 */ interface UpdateDeveloperProductParameters { /** Optional new display name. */ readonly name?: string; /** Optional new consumer-facing description. */ readonly description?: string; /** Optional replacement icon image upload. */ readonly imageFile?: Blob | Uint8Array; /** Optional flag toggling whether the product is purchasable. */ readonly isForSale?: boolean; /** Optional flag toggling regional pricing. */ readonly isRegionalPricingEnabled?: boolean; /** Optional new default price in Robux. */ readonly price?: number; /** Stringified ID of the developer product to update. */ readonly productId: string; /** Optional flag toggling visibility on the external store page. */ readonly storePageEnabled?: boolean; /** Stringified ID of the universe that owns the developer product. */ readonly universeId: string; } //#endregion //#region src/domains/game-internationalization/developer-product-icon/types.d.ts /** * Parameters for uploading or replacing the per-locale icon registered * against a developer product. A subsequent upload for the same * `(productId, languageCode)` pair replaces the existing icon for that * locale. * * @since 0.1.0 */ interface UploadDeveloperProductIconParameters { /** Image bytes to upload. PNG and JPEG are accepted by the server. */ readonly image: Blob | Uint8Array; /** * Roblox wire form the icon is being uploaded for. Either the * Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form * (e.g. `en_us`, `pt_br`, `ar_001`). */ readonly languageCode: RobloxLanguageCode | RobloxLocale; /** Stringified ID of the developer product whose icon is being uploaded. */ readonly productId: string; } //#endregion //#region src/domains/game-internationalization/developer-product-name-description/types.d.ts /** * Parameters for updating the per-locale name and/or description registered * against a developer product. Both `name` and `description` are optional; * fields omitted from the call are not included in the JSON body so the * server leaves the existing value for that locale untouched. * * @since 0.1.0 */ interface UpdateDeveloperProductNameDescriptionParameters { /** Replacement display name for the supplied locale. */ readonly name?: string; /** Replacement description for the supplied locale. */ readonly description?: string; /** * Roblox wire form being updated. Either the Language form (e.g. * `en`, `fil`, `zh-hans`) or the Locale form (e.g. `en_us`, `pt_br`, * `ar_001`). */ readonly languageCode: RobloxLanguageCode | RobloxLocale; /** * Stringified ID of the developer product whose localization is being * updated. */ readonly productId: string; } //#endregion //#region src/resources/developer-products/client.d.ts interface DeveloperProductLocalizationHandle { /** * Updates the per-locale display name and/or description registered against * a developer product. Either `name`, `description`, or both may be * supplied; omitted fields are not forwarded so the server leaves the * existing value for that locale untouched. Mirrors the upstream `200 OK` * echo body as `undefined` data. * * @param parameters - Product and language identifiers plus the optional * replacement values. * @param options - Optional per-request overrides. * @returns A success {@link Result} with no payload, or the * {@link OpenCloudError} that caused the request to fail. */ updateNameDescription: (parameters: UpdateDeveloperProductNameDescriptionParameters, options?: RequestOptions) => Promise>; /** * Uploads or replaces the per-locale icon for a developer product. A * subsequent upload for the same `(productId, languageCode)` pair replaces * the existing icon for that locale. Does not retry on 5xx so a duplicate * upload cannot be created if the server fails mid-write. * * No default request timeout applies to this upload; pass `options.timeout` * to set a per-call deadline. * * @param parameters - Product and language identifiers plus the image * bytes to upload. * @param options - Optional per-request overrides. * @returns A success {@link Result} with no payload, or the * {@link OpenCloudError} that caused the request to fail. */ uploadIcon: (parameters: UploadDeveloperProductIconParameters, options?: RequestOptions) => Promise>; } /** * Public client for the Roblox Open Cloud Developer Products API. * * Wires request builders, the injected {@link * OpenCloudClientOptions.httpClient}, and response parsers into a single * ergonomic surface. Every method returns a {@link Result} so callers handle * failure explicitly; no thrown `OpenCloudError` ever escapes the client. * * ```ts * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products"; * * const client = new DeveloperProductsClient({ apiKey: process.env.ROBLOX_API_KEY! }); * * const result = await client.get({ * universeId: "1234567890", * productId: "9876543210", * }); * * if (result.success) { * console.log(`${result.data.name} (${result.data.id})`); * } else { * console.error(result.err.message); * } * ``` * * @since 0.1.0 * * @example * * ```ts * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products"; * * const client = new DeveloperProductsClient({ apiKey: "your-key" }); * expect(client).toBeInstanceOf(DeveloperProductsClient); * ``` */ declare class DeveloperProductsClient { #private; /** * Operation Group exposing per-locale localization Operations * (`updateNameDescription`, `uploadIcon`) backed by the * `legacy-game-internationalization` domain. Source-language values * remain on {@link DeveloperProductsClient.update}; methods on this * group set per-locale overlays on top. Shares the parent client's * HTTP, rate-limit, and retry plumbing. */ readonly localization: DeveloperProductLocalizationHandle; /** * Creates a new {@link DeveloperProductsClient}. Configuration is frozen * on construction; per-request overrides are accepted on each method. * * @param options - Client-level configuration including the API key. */ constructor(options: OpenCloudClientOptions); /** * Creates a new developer product under the supplied universe. * * No default request timeout applies to this upload; pass `options.timeout` * to set a per-call deadline. * * @param parameters - Creation fields including the universe and product name. * @param options - Optional per-request overrides. * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or * the {@link OpenCloudError} that caused the request to fail. */ create(parameters: CreateDeveloperProductParameters, options?: RequestOptions): Promise>; /** * Reads a single developer product by ID. * * @param parameters - Universe and product identifiers. * @param options - Optional per-request overrides (e.g. A different * {@link OpenCloudClientOptions.apiKey} for this call only). * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or * the {@link OpenCloudError} that caused the request to fail. */ get(parameters: GetDeveloperProductParameters, options?: RequestOptions): Promise>; /** * Partially updates an existing developer product. Mirrors the upstream * `204 No Content` response: a successful update yields `undefined` data. * Callers that need the post-update state (for example to observe a * server-derived `updatedTimestamp`) chain {@link * DeveloperProductsClient.get} themselves so the GET only fires when * actually needed. * * No default request timeout applies to this upload; pass `options.timeout` * to set a per-call deadline. * * @param parameters - The universe and product identifiers and the * fields to update. Only fields explicitly provided are forwarded. * @param options - Optional per-request overrides. * @returns A success {@link Result} with no payload, or the * {@link OpenCloudError} that caused the request to fail. */ update(parameters: UpdateDeveloperProductParameters, options?: RequestOptions): Promise>; } //#endregion export { type CreateDeveloperProductParameters, type DeveloperProduct, type DeveloperProductPrice, type DeveloperProductPricingFeature, DeveloperProductsClient, type GetDeveloperProductParameters, type UpdateDeveloperProductNameDescriptionParameters, type UpdateDeveloperProductParameters, type UploadDeveloperProductIconParameters }; //# sourceMappingURL=developer-products.d.mts.map