@bedrock-rbx/ocale 0.1.0-beta.6 → 0.1.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/badges.d.mts +2 -2
  2. package/dist/badges.mjs +1 -2
  3. package/dist/badges.mjs.map +1 -1
  4. package/dist/{data.generated-DdwXMiv9.d.mts → data.generated-Cb6g6asv.d.mts} +1 -1
  5. package/dist/{data.generated-DdwXMiv9.d.mts.map → data.generated-Cb6g6asv.d.mts.map} +1 -1
  6. package/dist/developer-products.d.mts +2 -2
  7. package/dist/developer-products.mjs +2 -3
  8. package/dist/developer-products.mjs.map +1 -1
  9. package/dist/game-passes.d.mts +2 -2
  10. package/dist/game-passes.mjs +2 -3
  11. package/dist/game-passes.mjs.map +1 -1
  12. package/dist/index.d.mts +2 -2
  13. package/dist/locales.d.mts +1 -1
  14. package/dist/luau-execution.d.mts +2 -2
  15. package/dist/luau-execution.mjs +2 -2
  16. package/dist/places.d.mts +2 -2
  17. package/dist/places.mjs +3 -4
  18. package/dist/places.mjs.map +1 -1
  19. package/dist/{polling-DDKKpz6Z.d.mts → polling-BMrYajok.d.mts} +6 -6
  20. package/dist/{polling-DDKKpz6Z.d.mts.map → polling-BMrYajok.d.mts.map} +1 -1
  21. package/dist/{polling-helpers-DJqtcrCQ.mjs → polling-helpers-CS00apdU.mjs} +29 -15
  22. package/dist/polling-helpers-CS00apdU.mjs.map +1 -0
  23. package/dist/{price-information-XyhlYrn8.mjs → price-information-DIrvwCmd.mjs} +2 -2
  24. package/dist/{price-information-XyhlYrn8.mjs.map → price-information-DIrvwCmd.mjs.map} +1 -1
  25. package/dist/{rate-limit-BHAddFXO.d.mts → rate-limit-BYuizHoD.d.mts} +2 -2
  26. package/dist/{rate-limit-BHAddFXO.d.mts.map → rate-limit-BYuizHoD.d.mts.map} +1 -1
  27. package/dist/{resource-client-D7HKNrOp.mjs → resource-client-D6Efj9fU.mjs} +18 -2
  28. package/dist/resource-client-D6Efj9fU.mjs.map +1 -0
  29. package/dist/{signatures-9rpsTjPL.mjs → signatures-B5Fojgn0.mjs} +1 -1
  30. package/dist/{signatures-9rpsTjPL.mjs.map → signatures-B5Fojgn0.mjs.map} +1 -1
  31. package/dist/storage.d.mts +1 -1
  32. package/dist/storage.mjs +1 -2
  33. package/dist/storage.mjs.map +1 -1
  34. package/dist/testing.d.mts +218 -3
  35. package/dist/testing.d.mts.map +1 -1
  36. package/dist/testing.mjs +92 -2
  37. package/dist/testing.mjs.map +1 -1
  38. package/dist/{types-BOhSh9ug.d.mts → types-CwtZT1ek.d.mts} +1 -1
  39. package/dist/{types-BOhSh9ug.d.mts.map → types-CwtZT1ek.d.mts.map} +1 -1
  40. package/dist/universes.d.mts +3 -3
  41. package/dist/universes.mjs +1 -2
  42. package/dist/universes.mjs.map +1 -1
  43. package/dist/{wire-BeIO-d1x.d.mts → wire-CeL6W_V7.d.mts} +1 -1
  44. package/dist/{wire-BeIO-d1x.d.mts.map → wire-CeL6W_V7.d.mts.map} +1 -1
  45. package/package.json +1 -1
  46. package/dist/is-date-time-string-DL6l9mo6.mjs +0 -19
  47. package/dist/is-date-time-string-DL6l9mo6.mjs.map +0 -1
  48. package/dist/polling-helpers-DJqtcrCQ.mjs.map +0 -1
  49. package/dist/resource-client-D7HKNrOp.mjs.map +0 -1
package/dist/badges.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-BOhSh9ug.mjs";
2
- import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-DdwXMiv9.mjs";
1
+ import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-CwtZT1ek.mjs";
2
+ import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-Cb6g6asv.mjs";
3
3
 
4
4
  //#region src/domains/badges/badges/types.d.ts
5
5
  /**
package/dist/badges.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
2
2
  import { t as toBlob } from "./to-blob-B27VhoRp.mjs";
3
- import { t as isDateTimeString } from "./is-date-time-string-DL6l9mo6.mjs";
4
- import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-D7HKNrOp.mjs";
3
+ import { a as IDEMPOTENT_METHOD_DEFAULTS, c as isDateTimeString, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-D6Efj9fU.mjs";
5
4
  //#region src/domains/badges/badges/builders.ts
6
5
  /**
7
6
  * Builds a `POST` request for the legacy "create badge" endpoint.
@@ -1 +1 @@
1
- {"version":3,"file":"badges.mjs","names":["buildUpdateRequest","buildUploadIconRequest","buildUpdateRequest","buildLocaleNameDescRequest","buildLocaleUploadIconRequest","#inner"],"sources":["../src/domains/badges/badges/builders.ts","../src/domains/badges/badges/operations.ts","../src/domains/badges/badges/parsers.ts","../src/domains/game-internationalization/badge-icon/builders.ts","../src/domains/game-internationalization/badge-name-description/builders.ts","../src/domains/game-internationalization/badge-name-description/operations.ts","../src/domains/publish/badge-icon/builders.ts","../src/domains/publish/badge-icon/operations.ts","../src/resources/badges/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { BadgePaymentSource, CreateBadgeParameters, UpdateBadgeParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the legacy \"create badge\" endpoint.\n *\n * @param parameters - Fields describing the new badge; optional values\n * omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateBadgeParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tbody.append(\"files\", toBlob(parameters.icon));\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isActive !== undefined) {\n\t\tbody.append(\"isActive\", String(parameters.isActive));\n\t}\n\n\tif (parameters.expectedCost !== undefined) {\n\t\tbody.append(\"expectedCost\", String(parameters.expectedCost));\n\t}\n\n\tif (parameters.paymentSource !== undefined) {\n\t\tbody.append(\"paymentSourceType\", toPaymentSourceWire(parameters.paymentSource));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-badges/v1/universes/${parameters.universeId}/badges`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the legacy \"update badge\" endpoint. Every\n * field on `parameters` except the identifier is optional; omitted fields\n * are not appended to the JSON body so the server leaves them unchanged.\n *\n * @param parameters - Identifier plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateBadgeParameters): HttpRequest {\n\tconst body: Record<string, boolean | string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\tif (parameters.enabled !== undefined) {\n\t\tbody[\"enabled\"] = parameters.enabled;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-badges/v1/badges/${parameters.badgeId}`,\n\t};\n}\n\nfunction toPaymentSourceWire(source: BadgePaymentSource): \"1\" | \"2\" {\n\treturn source === \"User\" ? \"1\" : \"2\";\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for creating a badge, sourced from\n * `x-roblox-rate-limits` on the legacy badges create operation in the\n * vendored OpenAPI schema (100 per minute, per API key owner).\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"badges.create\",\n});\n\n/**\n * Per-second request ceiling for updating a badge, sourced from\n * `x-roblox-rate-limits` on the legacy badges update operation in the\n * vendored OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a\n * queue, since Roblox does not document the per-minute quota as shared\n * between the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"badges.update\",\n});\n\n/**\n * Scopes the API key or OAuth token must carry to create a badge,\n * sourced from `x-roblox-scopes` on the legacy badges create operation\n * in the vendored OpenAPI schema. The trailing\n * `:manage-and-spend-robux` reflects that badge creation may charge a\n * Robux fee.\n */\nexport const CREATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-universe.badge:manage-and-spend-robux\",\n]);\n\n/**\n * Scopes the API key or OAuth token must carry to update a badge,\n * sourced from `x-roblox-scopes` on the legacy badges update operation\n * in the vendored OpenAPI schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-universe.badge:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { Badge, BadgeAwarder, BadgeStatistics } from \"./types.ts\";\nimport type { BadgeAwarderWire, BadgeResponseV2Wire, BadgeStatisticsWire } from \"./wire.ts\";\n\n/**\n * Parses a successful Badges API response into the public `Badge` shape,\n * returning a `Result` so callers can handle malformed payloads without\n * exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `ApiError` when validation\n * fails; the headers are available for future parsers that need them.\n * @returns A success result wrapping the converted `Badge`, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseBadgeResponse(response: HttpResponse): Result<Badge, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isBadgeResponseV2Wire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed badge response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tid: String(body.id),\n\t\t\tname: body.name,\n\t\t\tawarder: copyAwarder(body.awarder),\n\t\t\tcreatedAt: new Date(body.created),\n\t\t\tdescription: body.description,\n\t\t\tdisplayDescription: body.displayDescription,\n\t\t\tdisplayIconImageId:\n\t\t\t\tbody.displayIconImageId === 0 ? undefined : String(body.displayIconImageId),\n\t\t\tdisplayName: body.displayName,\n\t\t\tenabled: body.enabled,\n\t\t\ticonImageId: body.iconImageId === 0 ? undefined : String(body.iconImageId),\n\t\t\tstatistics: copyStatistics(body.statistics),\n\t\t\tupdatedAt: new Date(body.updated),\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction copyAwarder(awarder: BadgeAwarderWire): BadgeAwarder {\n\treturn { id: String(awarder.id), name: awarder.name, type: \"Place\" };\n}\n\nfunction copyStatistics(statistics: BadgeStatisticsWire): BadgeStatistics {\n\treturn {\n\t\tawardedCount: statistics.awardedCount,\n\t\tpastDayAwardedCount: statistics.pastDayAwardedCount,\n\t\twinRatePercentage: statistics.winRatePercentage,\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"id\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"displayName\"] === \"string\" &&\n\t\ttypeof body[\"displayDescription\"] === \"string\" &&\n\t\ttypeof body[\"enabled\"] === \"boolean\" &&\n\t\ttypeof body[\"iconImageId\"] === \"number\" &&\n\t\ttypeof body[\"displayIconImageId\"] === \"number\" &&\n\t\tisDateTimeString(body[\"created\"]) &&\n\t\tisDateTimeString(body[\"updated\"])\n\t);\n}\n\nfunction isBadgeAwarderWire(value: unknown): value is BadgeAwarderWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttypeof value[\"id\"] === \"number\" && typeof value[\"name\"] === \"string\" && value[\"type\"] === 1\n\t);\n}\n\nfunction isBadgeStatisticsWire(value: unknown): value is BadgeStatisticsWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttypeof value[\"awardedCount\"] === \"number\" &&\n\t\ttypeof value[\"pastDayAwardedCount\"] === \"number\" &&\n\t\ttypeof value[\"winRatePercentage\"] === \"number\"\n\t);\n}\n\nfunction isBadgeResponseV2Wire(body: unknown): body is BadgeResponseV2Wire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tif (!isBadgeAwarderWire(body[\"awarder\"])) {\n\t\treturn false;\n\t}\n\n\tif (!isBadgeStatisticsWire(body[\"statistics\"])) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadBadgeIconLocalizationParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload badge icon\" endpoint. A\n * successful upload replaces any existing icon for the same\n * `(badgeId, languageCode)` pair.\n *\n * @param parameters - Badge and language identifiers plus the image bytes\n * to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(\n\tparameters: UploadBadgeIconLocalizationParameters,\n): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/badges/${parameters.badgeId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateBadgeNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update badge name/description\"\n * endpoint. Either `name`, `description`, or both may be supplied; omitted\n * fields are not included in the JSON body so the server leaves the existing\n * value for that locale untouched.\n *\n * @param parameters - Badge and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateBadgeNameDescriptionParameters): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/badges/${parameters.badgeId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every badge localization Operation. The\n * legacy `gameinternationalization` service caps each API key at 100\n * requests per minute *shared across the entire service* (see the\n * `x-roblox-rate-limits` extension on every operation in the vendored\n * Open Cloud spec), so all badge localization methods queue against the\n * same operation key.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"badge-localization\",\n});\n\n/**\n * Scopes required for every badge localization operation, sourced from\n * `x-roblox-scopes` on the legacy `gameinternationalization` badge\n * endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-badge:manage\",\n]);\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadBadgeIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the legacy \"upload badge icon\" endpoint. A\n * successful upload replaces any existing source-language icon on the\n * badge.\n *\n * @param parameters - Badge identifier plus the image bytes to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(parameters: UploadBadgeIconParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.icon));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-publish/v1/badges/${parameters.badgeId}/icon`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for uploading a badge icon, sourced from\n * `x-roblox-rate-limits` on the legacy badge icon upload operation in\n * the vendored OpenAPI schema (100 per minute, per API key owner). Keyed\n * separately from the badges create and update buckets because Roblox\n * does not document the legacy-publish quota as shared with the\n * legacy-badges quota.\n */\nexport const UPLOAD_ICON_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"badges.upload-icon\",\n});\n\n/**\n * Scopes the API key or OAuth token must carry to upload a badge icon,\n * sourced from `x-roblox-scopes` on the legacy badge icon upload\n * operation in the vendored OpenAPI schema.\n */\nexport const UPLOAD_ICON_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-badge:manage\",\n]);\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { buildCreateRequest, buildUpdateRequest } from \"../../domains/badges/badges/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tCREATE_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/badges/badges/operations.ts\";\nimport { parseBadgeResponse } from \"../../domains/badges/badges/parsers.ts\";\nimport type {\n\tBadge,\n\tCreateBadgeParameters,\n\tUpdateBadgeParameters,\n} from \"../../domains/badges/badges/types.ts\";\nimport { buildUploadIconRequest as buildLocaleUploadIconRequest } from \"../../domains/game-internationalization/badge-icon/builders.ts\";\nimport type { UploadBadgeIconLocalizationParameters } from \"../../domains/game-internationalization/badge-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/badge-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/badge-name-description/operations.ts\";\nimport type { UpdateBadgeNameDescriptionParameters } from \"../../domains/game-internationalization/badge-name-description/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/publish/badge-icon/builders.ts\";\nimport {\n\tUPLOAD_ICON_OPERATION_LIMIT,\n\tUPLOAD_ICON_REQUIRED_SCOPES,\n} from \"../../domains/publish/badge-icon/operations.ts\";\nimport type { UploadBadgeIconParameters } from \"../../domains/publish/badge-icon/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateBadgeParameters, Badge>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseBadgeResponse,\n\trequiredScopes: CREATE_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateBadgeParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadBadgeIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: UPLOAD_ICON_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: UPLOAD_ICON_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<UpdateBadgeNameDescriptionParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_LOCALIZED_ICON_SPEC = makeSpec<UploadBadgeIconLocalizationParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface BadgeLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a badge. Either `name`, `description`, or both may be supplied; omitted\n\t * fields are not forwarded so the server leaves the existing value for\n\t * that locale untouched. Mirrors the upstream `200 OK` echo body as\n\t * `undefined` data.\n\t *\n\t * @param parameters - Badge and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateBadgeNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a badge. A subsequent\n\t * upload for the same `(badgeId, languageCode)` pair replaces the\n\t * existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write. Source-language\n\t * icons remain on {@link BadgesClient.uploadIcon}.\n\t *\n\t * @param parameters - Badge and language identifiers plus the image bytes\n\t * to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadBadgeIconLocalizationParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Badges API. Covers programmatic\n * badge creation under a universe, partial updates of badge configuration\n * (`name`, `description`, `enabled`), and source-language icon uploads.\n *\n * Wires the request builders, the injected\n * {@link OpenCloudClientOptions.httpClient}, and response parsers into a\n * single ergonomic surface. Every method returns a {@link Result} so\n * callers handle failure explicitly; no thrown {@link OpenCloudError}\n * ever escapes the client.\n *\n * @example\n *\n * ```ts\n * import { BadgesClient } from \"@bedrock-rbx/ocale/badges\";\n *\n * const client = new BadgesClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(BadgesClient);\n * ```\n */\nexport class BadgesClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link BadgesClient.update} and\n\t * {@link BadgesClient.uploadIcon}; methods on this group set per-locale\n\t * overlays on top. Shares the parent client's HTTP, rate-limit, and\n\t * retry plumbing.\n\t */\n\tpublic readonly localization: BadgeLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link BadgesClient}. Configuration is frozen on\n\t * construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new badge under the supplied universe.\n\t *\n\t * @param parameters - Creation fields including the universe, name, and\n\t * icon image.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link Badge} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateBadgeParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Badge, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Partially updates a badge's configuration. Mirrors the upstream\n\t * `200 OK` empty response: a successful update yields `undefined`\n\t * data. Only fields explicitly provided are forwarded to the server,\n\t * so omitted fields keep their current values.\n\t *\n\t * @param parameters - Identifier plus the fields to update.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateBadgeParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n\n\t/**\n\t * Uploads or replaces the source-language icon registered against a\n\t * badge. A subsequent upload for the same badge replaces the\n\t * existing source icon. Does not retry on 5xx so a duplicate icon\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * @param parameters - Identifier plus the image bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async uploadIcon(\n\t\tparameters: UploadBadgeIconParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): BadgeLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPLOAD_LOCALIZED_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,mBAAmB,YAAgD;CAClF,MAAM,OAAO,IAAI,UAAU;AAC3B,MAAK,OAAO,QAAQ,WAAW,KAAK;AACpC,MAAK,OAAO,SAAS,OAAO,WAAW,KAAK,CAAC;AAC7C,KAAI,WAAW,gBAAgB,KAAA,EAC9B,MAAK,OAAO,eAAe,WAAW,YAAY;AAGnD,KAAI,WAAW,aAAa,KAAA,EAC3B,MAAK,OAAO,YAAY,OAAO,WAAW,SAAS,CAAC;AAGrD,KAAI,WAAW,iBAAiB,KAAA,EAC/B,MAAK,OAAO,gBAAgB,OAAO,WAAW,aAAa,CAAC;AAG7D,KAAI,WAAW,kBAAkB,KAAA,EAChC,MAAK,OAAO,qBAAqB,oBAAoB,WAAW,cAAc,CAAC;AAGhF,QAAO;EACN;EACA,QAAQ;EACR,KAAK,+BAA+B,WAAW,WAAW;EAC1D;;;;;;;;;;AAWF,SAAgBA,qBAAmB,YAAgD;CAClF,MAAM,OAAyC,EAAE;AACjD,KAAI,WAAW,SAAS,KAAA,EACvB,MAAK,UAAU,WAAW;AAG3B,KAAI,WAAW,gBAAgB,KAAA,EAC9B,MAAK,iBAAiB,WAAW;AAGlC,KAAI,WAAW,YAAY,KAAA,EAC1B,MAAK,aAAa,WAAW;AAG9B,QAAO;EACN;EACA,QAAQ;EACR,KAAK,4BAA4B,WAAW;EAC5C;;AAGF,SAAS,oBAAoB,QAAuC;AACnE,QAAO,WAAW,SAAS,MAAM;;;;;;;;;AC7DlC,MAAa,yBAAyC,OAAO,OAAO;CACnE,cAAc,MAAM;CACpB,cAAc;CACd,CAAC;;;;;;;;;AAUF,MAAa,yBAAyC,OAAO,OAAO;CACnE,c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QAAA,QAAc,IAAI,eAAe,QAAQ;AACzC,OAAK,eAAe,yBAAyB,MAAA,MAAY;;;;;;;;;;;CAY1D,MAAa,OACZ,YACA,SACyC;AACzC,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;;;CAcvE,MAAa,OACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;;;CAcvE,MAAa,WACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAkB,CAAC;;;AAI7E,SAAS,yBAAyB,OAAgD;AACjF,QAAO;EACN,MAAM,sBAAsB,YAAY,SAAS;AAChD,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAA8B,CAAC;;EAElF,MAAM,WAAW,YAAY,SAAS;AACrC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAA4B,CAAC;;EAEhF"}
1
+ {"version":3,"file":"badges.mjs","names":["buildUpdateRequest","buildUploadIconRequest","buildUpdateRequest","buildLocaleNameDescRequest","buildLocaleUploadIconRequest","#inner"],"sources":["../src/domains/badges/badges/builders.ts","../src/domains/badges/badges/operations.ts","../src/domains/badges/badges/parsers.ts","../src/domains/game-internationalization/badge-icon/builders.ts","../src/domains/game-internationalization/badge-name-description/builders.ts","../src/domains/game-internationalization/badge-name-description/operations.ts","../src/domains/publish/badge-icon/builders.ts","../src/domains/publish/badge-icon/operations.ts","../src/resources/badges/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { BadgePaymentSource, CreateBadgeParameters, UpdateBadgeParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the legacy \"create badge\" endpoint.\n *\n * @param parameters - Fields describing the new badge; optional values\n * omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateBadgeParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tbody.append(\"files\", toBlob(parameters.icon));\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isActive !== undefined) {\n\t\tbody.append(\"isActive\", String(parameters.isActive));\n\t}\n\n\tif (parameters.expectedCost !== undefined) {\n\t\tbody.append(\"expectedCost\", String(parameters.expectedCost));\n\t}\n\n\tif (parameters.paymentSource !== undefined) {\n\t\tbody.append(\"paymentSourceType\", toPaymentSourceWire(parameters.paymentSource));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-badges/v1/universes/${parameters.universeId}/badges`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the legacy \"update badge\" endpoint. Every\n * field on `parameters` except the identifier is optional; omitted fields\n * are not appended to the JSON body so the server leaves them unchanged.\n *\n * @param parameters - Identifier plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateBadgeParameters): HttpRequest {\n\tconst body: Record<string, boolean | string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\tif (parameters.enabled !== undefined) {\n\t\tbody[\"enabled\"] = parameters.enabled;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-badges/v1/badges/${parameters.badgeId}`,\n\t};\n}\n\nfunction toPaymentSourceWire(source: BadgePaymentSource): \"1\" | \"2\" {\n\treturn source === \"User\" ? \"1\" : \"2\";\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for creating a badge, sourced from\n * `x-roblox-rate-limits` on the legacy badges create operation in the\n * vendored OpenAPI schema (100 per minute, per API key owner).\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"badges.create\",\n});\n\n/**\n * Per-second request ceiling for updating a badge, sourced from\n * `x-roblox-rate-limits` on the legacy badges update operation in the\n * vendored OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a\n * queue, since Roblox does not document the per-minute quota as shared\n * between the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"badges.update\",\n});\n\n/**\n * Scopes the API key or OAuth token must carry to create a badge,\n * sourced from `x-roblox-scopes` on the legacy badges create operation\n * in the vendored OpenAPI schema. The trailing\n * `:manage-and-spend-robux` reflects that badge creation may charge a\n * Robux fee.\n */\nexport const CREATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-universe.badge:manage-and-spend-robux\",\n]);\n\n/**\n * Scopes the API key or OAuth token must carry to update a badge,\n * sourced from `x-roblox-scopes` on the legacy badges update operation\n * in the vendored OpenAPI schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-universe.badge:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { Badge, BadgeAwarder, BadgeStatistics } from \"./types.ts\";\nimport type { BadgeAwarderWire, BadgeResponseV2Wire, BadgeStatisticsWire } from \"./wire.ts\";\n\n/**\n * Parses a successful Badges API response into the public `Badge` shape,\n * returning a `Result` so callers can handle malformed payloads without\n * exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `ApiError` when validation\n * fails; the headers are available for future parsers that need them.\n * @returns A success result wrapping the converted `Badge`, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseBadgeResponse(response: HttpResponse): Result<Badge, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isBadgeResponseV2Wire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed badge response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tid: String(body.id),\n\t\t\tname: body.name,\n\t\t\tawarder: copyAwarder(body.awarder),\n\t\t\tcreatedAt: new Date(body.created),\n\t\t\tdescription: body.description,\n\t\t\tdisplayDescription: body.displayDescription,\n\t\t\tdisplayIconImageId:\n\t\t\t\tbody.displayIconImageId === 0 ? undefined : String(body.displayIconImageId),\n\t\t\tdisplayName: body.displayName,\n\t\t\tenabled: body.enabled,\n\t\t\ticonImageId: body.iconImageId === 0 ? undefined : String(body.iconImageId),\n\t\t\tstatistics: copyStatistics(body.statistics),\n\t\t\tupdatedAt: new Date(body.updated),\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction copyAwarder(awarder: BadgeAwarderWire): BadgeAwarder {\n\treturn { id: String(awarder.id), name: awarder.name, type: \"Place\" };\n}\n\nfunction copyStatistics(statistics: BadgeStatisticsWire): BadgeStatistics {\n\treturn {\n\t\tawardedCount: statistics.awardedCount,\n\t\tpastDayAwardedCount: statistics.pastDayAwardedCount,\n\t\twinRatePercentage: statistics.winRatePercentage,\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"id\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"displayName\"] === \"string\" &&\n\t\ttypeof body[\"displayDescription\"] === \"string\" &&\n\t\ttypeof body[\"enabled\"] === \"boolean\" &&\n\t\ttypeof body[\"iconImageId\"] === \"number\" &&\n\t\ttypeof body[\"displayIconImageId\"] === \"number\" &&\n\t\tisDateTimeString(body[\"created\"]) &&\n\t\tisDateTimeString(body[\"updated\"])\n\t);\n}\n\nfunction isBadgeAwarderWire(value: unknown): value is BadgeAwarderWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttypeof value[\"id\"] === \"number\" && typeof value[\"name\"] === \"string\" && value[\"type\"] === 1\n\t);\n}\n\nfunction isBadgeStatisticsWire(value: unknown): value is BadgeStatisticsWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttypeof value[\"awardedCount\"] === \"number\" &&\n\t\ttypeof value[\"pastDayAwardedCount\"] === \"number\" &&\n\t\ttypeof value[\"winRatePercentage\"] === \"number\"\n\t);\n}\n\nfunction isBadgeResponseV2Wire(body: unknown): body is BadgeResponseV2Wire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tif (!isBadgeAwarderWire(body[\"awarder\"])) {\n\t\treturn false;\n\t}\n\n\tif (!isBadgeStatisticsWire(body[\"statistics\"])) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadBadgeIconLocalizationParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload badge icon\" endpoint. A\n * successful upload replaces any existing icon for the same\n * `(badgeId, languageCode)` pair.\n *\n * @param parameters - Badge and language identifiers plus the image bytes\n * to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(\n\tparameters: UploadBadgeIconLocalizationParameters,\n): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/badges/${parameters.badgeId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateBadgeNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update badge name/description\"\n * endpoint. Either `name`, `description`, or both may be supplied; omitted\n * fields are not included in the JSON body so the server leaves the existing\n * value for that locale untouched.\n *\n * @param parameters - Badge and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateBadgeNameDescriptionParameters): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/badges/${parameters.badgeId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every badge localization Operation. The\n * legacy `gameinternationalization` service caps each API key at 100\n * requests per minute *shared across the entire service* (see the\n * `x-roblox-rate-limits` extension on every operation in the vendored\n * Open Cloud spec), so all badge localization methods queue against the\n * same operation key.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"badge-localization\",\n});\n\n/**\n * Scopes required for every badge localization operation, sourced from\n * `x-roblox-scopes` on the legacy `gameinternationalization` badge\n * endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-badge:manage\",\n]);\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadBadgeIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the legacy \"upload badge icon\" endpoint. A\n * successful upload replaces any existing source-language icon on the\n * badge.\n *\n * @param parameters - Badge identifier plus the image bytes to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(parameters: UploadBadgeIconParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.icon));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-publish/v1/badges/${parameters.badgeId}/icon`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for uploading a badge icon, sourced from\n * `x-roblox-rate-limits` on the legacy badge icon upload operation in\n * the vendored OpenAPI schema (100 per minute, per API key owner). Keyed\n * separately from the badges create and update buckets because Roblox\n * does not document the legacy-publish quota as shared with the\n * legacy-badges quota.\n */\nexport const UPLOAD_ICON_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"badges.upload-icon\",\n});\n\n/**\n * Scopes the API key or OAuth token must carry to upload a badge icon,\n * sourced from `x-roblox-scopes` on the legacy badge icon upload\n * operation in the vendored OpenAPI schema.\n */\nexport const UPLOAD_ICON_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-badge:manage\",\n]);\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { buildCreateRequest, buildUpdateRequest } from \"../../domains/badges/badges/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tCREATE_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/badges/badges/operations.ts\";\nimport { parseBadgeResponse } from \"../../domains/badges/badges/parsers.ts\";\nimport type {\n\tBadge,\n\tCreateBadgeParameters,\n\tUpdateBadgeParameters,\n} from \"../../domains/badges/badges/types.ts\";\nimport { buildUploadIconRequest as buildLocaleUploadIconRequest } from \"../../domains/game-internationalization/badge-icon/builders.ts\";\nimport type { UploadBadgeIconLocalizationParameters } from \"../../domains/game-internationalization/badge-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/badge-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/badge-name-description/operations.ts\";\nimport type { UpdateBadgeNameDescriptionParameters } from \"../../domains/game-internationalization/badge-name-description/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/publish/badge-icon/builders.ts\";\nimport {\n\tUPLOAD_ICON_OPERATION_LIMIT,\n\tUPLOAD_ICON_REQUIRED_SCOPES,\n} from \"../../domains/publish/badge-icon/operations.ts\";\nimport type { UploadBadgeIconParameters } from \"../../domains/publish/badge-icon/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateBadgeParameters, Badge>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseBadgeResponse,\n\trequiredScopes: CREATE_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateBadgeParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadBadgeIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: UPLOAD_ICON_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: UPLOAD_ICON_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<UpdateBadgeNameDescriptionParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_LOCALIZED_ICON_SPEC = makeSpec<UploadBadgeIconLocalizationParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface BadgeLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a badge. Either `name`, `description`, or both may be supplied; omitted\n\t * fields are not forwarded so the server leaves the existing value for\n\t * that locale untouched. Mirrors the upstream `200 OK` echo body as\n\t * `undefined` data.\n\t *\n\t * @param parameters - Badge and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateBadgeNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a badge. A subsequent\n\t * upload for the same `(badgeId, languageCode)` pair replaces the\n\t * existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write. Source-language\n\t * icons remain on {@link BadgesClient.uploadIcon}.\n\t *\n\t * @param parameters - Badge and language identifiers plus the image bytes\n\t * to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadBadgeIconLocalizationParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Badges API. Covers programmatic\n * badge creation under a universe, partial updates of badge configuration\n * (`name`, `description`, `enabled`), and source-language icon uploads.\n *\n * Wires the request builders, the injected\n * {@link OpenCloudClientOptions.httpClient}, and response parsers into a\n * single ergonomic surface. Every method returns a {@link Result} so\n * callers handle failure explicitly; no thrown {@link OpenCloudError}\n * ever escapes the client.\n *\n * @example\n *\n * ```ts\n * import { BadgesClient } from \"@bedrock-rbx/ocale/badges\";\n *\n * const client = new BadgesClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(BadgesClient);\n * ```\n */\nexport class BadgesClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link BadgesClient.update} and\n\t * {@link BadgesClient.uploadIcon}; methods on this group set per-locale\n\t * overlays on top. Shares the parent client's HTTP, rate-limit, and\n\t * retry plumbing.\n\t */\n\tpublic readonly localization: BadgeLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link BadgesClient}. Configuration is frozen on\n\t * construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new badge under the supplied universe.\n\t *\n\t * @param parameters - Creation fields including the universe, name, and\n\t * icon image.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link Badge} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateBadgeParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Badge, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Partially updates a badge's configuration. Mirrors the upstream\n\t * `200 OK` empty response: a successful update yields `undefined`\n\t * data. Only fields explicitly provided are forwarded to the server,\n\t * so omitted fields keep their current values.\n\t *\n\t * @param parameters - Identifier plus the fields to update.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateBadgeParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n\n\t/**\n\t * Uploads or replaces the source-language icon registered against a\n\t * badge. A subsequent upload for the same badge replaces the\n\t * existing source icon. Does not retry on 5xx so a duplicate icon\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * @param parameters - Identifier plus the image bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async uploadIcon(\n\t\tparameters: UploadBadgeIconParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): BadgeLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPLOAD_LOCALIZED_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,mBAAmB,YAAgD;CAClF,MAAM,OAAO,IAAI,UAAU;AAC3B,MAAK,OAAO,QAAQ,WAAW,KAAK;AACpC,MAAK,OAAO,SAAS,OAAO,WAAW,KAAK,CAAC;AAC7C,KAAI,WAAW,gBAAgB,KAAA,EAC9B,MAAK,OAAO,eAAe,WAAW,YAAY;AAGnD,KAAI,WAAW,aAAa,KAAA,EAC3B,MAAK,OAAO,YAAY,OAAO,WAAW,SAAS,CAAC;AAGrD,KAAI,WAAW,iBAAiB,KAAA,EAC/B,MAAK,OAAO,gBAAgB,OAAO,WAAW,aAAa,CAAC;AAG7D,KAAI,WAAW,kBAAkB,KAAA,EAChC,MAAK,OAAO,qBAAqB,oBAAoB,WAAW,cAAc,CAAC;AAGhF,QAAO;EACN;EACA,QAAQ;EACR,KAAK,+BAA+B,WAAW,WAAW;EAC1D;;;;;;;;;;AAWF,SAAgBA,qBAAmB,YAAgD;CAClF,MAAM,OAAyC,EAAE;AACjD,KAAI,WAAW,SAAS,KAAA,EACvB,MAAK,UAAU,WAAW;AAG3B,KAAI,WAAW,gBAAgB,KAAA,EAC9B,MAAK,iBAAiB,WAAW;AAGlC,KAAI,WAAW,YAAY,KAAA,EAC1B,MAAK,aAAa,WAAW;AAG9B,QAAO;EACN;EACA,QAAQ;EACR,KAAK,4BAA4B,WAAW;EAC5C;;AAGF,SAAS,oBAAoB,QAAuC;AACnE,QAAO,WAAW,SAAS,M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,OAAO;CACP,gBAAgB;CAChB,CAAC;;;;;;;;;;;;;;;;;;;;;AA2DF,IAAa,eAAb,MAA0B;CACzB;;;;;;;;;;CAWA;;;;;;;CAQA,YAAY,SAAiC;AAC5C,QAAA,QAAc,IAAI,eAAe,QAAQ;AACzC,OAAK,eAAe,yBAAyB,MAAA,MAAY;;;;;;;;;;;CAY1D,MAAa,OACZ,YACA,SACyC;AACzC,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;;;CAcvE,MAAa,OACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;;;CAcvE,MAAa,WACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAkB,CAAC;;;AAI7E,SAAS,yBAAyB,OAAgD;AACjF,QAAO;EACN,MAAM,sBAAsB,YAAY,SAAS;AAChD,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAA8B,CAAC;;EAElF,MAAM,WAAW,YAAY,SAAS;AACrC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAA4B,CAAC;;EAEhF"}
@@ -482,4 +482,4 @@ type RobloxLocale = (typeof ROBLOX_CREATOR_LOCALES)[number]["locale"];
482
482
  type RobloxLanguageCode = (typeof ROBLOX_CREATOR_LOCALES)[number]["languageCode"];
483
483
  //#endregion
484
484
  export { RobloxLocale as i, RobloxCreatorLocale as n, RobloxLanguageCode as r, ROBLOX_CREATOR_LOCALES as t };
485
- //# sourceMappingURL=data.generated-DdwXMiv9.d.mts.map
485
+ //# sourceMappingURL=data.generated-Cb6g6asv.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data.generated-DdwXMiv9.d.mts","names":[],"sources":["../src/locales/data.generated.ts"],"mappings":";;AAMA;;UAAiB,mBAAA;EAAA,SACP,MAAA;EAAA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A,qBAAA;EAAA,SACA,0BAAA;AAAA;;;;;;KASU,YAAA,WAAuB,sBAAA;;;;;;KAOvB,kBAAA,WAA6B,sBAAA"}
1
+ {"version":3,"file":"data.generated-Cb6g6asv.d.mts","names":[],"sources":["../src/locales/data.generated.ts"],"mappings":";;AAMA;;UAAiB,mBAAA;EAAA,SACP,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;;;AAQV;;;cAAa,sBAAA;EAAA,SAEX,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0B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EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;;;;;;KASU,YAAA,WAAuB,sBAAA;;;;;;KAOvB,kBAAA,WAA6B,sBAAA"}
@@ -1,5 +1,5 @@
1
- import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-BOhSh9ug.mjs";
2
- import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-DdwXMiv9.mjs";
1
+ import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-CwtZT1ek.mjs";
2
+ import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-Cb6g6asv.mjs";
3
3
 
4
4
  //#region src/domains/developer-products/products/types.d.ts
5
5
  /**
@@ -1,8 +1,7 @@
1
1
  import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
2
2
  import { t as toBlob } from "./to-blob-B27VhoRp.mjs";
3
- import { t as isDateTimeString } from "./is-date-time-string-DL6l9mo6.mjs";
4
- import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-D7HKNrOp.mjs";
5
- import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-XyhlYrn8.mjs";
3
+ import { a as IDEMPOTENT_METHOD_DEFAULTS, c as isDateTimeString, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-D6Efj9fU.mjs";
4
+ import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-DIrvwCmd.mjs";
6
5
  //#region src/domains/developer-products/products/builders.ts
7
6
  /**
8
7
  * Builds a `GET` request for the Open Cloud "read developer product"
@@ -1 +1 @@
1
- {"version":3,"file":"developer-products.mjs","names":["buildUpdateRequest","buildUpdateRequest","buildLocaleNameDescRequest","#inner"],"sources":["../src/domains/developer-products/products/builders.ts","../src/domains/developer-products/products/operations.ts","../src/domains/developer-products/products/parsers.ts","../src/domains/game-internationalization/developer-product-icon/builders.ts","../src/domains/game-internationalization/developer-product-name-description/builders.ts","../src/domains/game-internationalization/developer-product-name-description/operations.ts","../src/resources/developer-products/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tCreateDeveloperProductParameters,\n\tGetDeveloperProductParameters,\n\tUpdateDeveloperProductParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `GET` request for the Open Cloud \"read developer product\"\n * endpoint.\n *\n * @param parameters - Universe and product identifiers to interpolate into\n * the URL.\n * @returns A pure {@link HttpRequest} describing the read call.\n */\nexport function buildGetRequest(parameters: GetDeveloperProductParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products/${parameters.productId}/creator`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the Open Cloud \"create developer product\"\n * endpoint.\n *\n * @param parameters - Fields describing the new developer product; optional\n * values omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateDeveloperProductParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update developer product\"\n * endpoint. Every field on `parameters` except the identifiers is optional;\n * omitted fields are not appended to the multipart body so the server leaves\n * them unchanged.\n *\n * @param parameters - Identifiers plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateDeveloperProductParameters): HttpRequest {\n\tconst body = new FormData();\n\tif (parameters.name !== undefined) {\n\t\tbody.append(\"name\", parameters.name);\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.storePageEnabled !== undefined) {\n\t\tbody.append(\"storePageEnabled\", String(parameters.storePageEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products/${parameters.productId}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for reading a single developer product, from\n * the Open Cloud OpenAPI schema.\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"developer-products.get\",\n});\n\n/**\n * Per-second request ceiling for creating a developer product, from the\n * Open Cloud OpenAPI schema.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 3,\n\toperationKey: \"developer-products.create\",\n});\n\n/**\n * Per-second request ceiling for updating a developer product, from the\n * Open Cloud OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a queue,\n * since Roblox does not document the per-minute quota as shared between\n * the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 3,\n\toperationKey: \"developer-products.update\",\n});\n\n/**\n * Scopes the API key or OAuth token must carry to read a developer product,\n * sourced from `x-roblox-scopes` on the `DeveloperProducts_GetDeveloperProductConfigV2`\n * operation in the vendored OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"developer-product:read\"]);\n\n/**\n * Scopes the API key or OAuth token must carry to create or update a developer\n * product, sourced from `x-roblox-scopes` on the\n * `DeveloperProducts_CreateDeveloperProductV2` and\n * `DeveloperProducts_UpdateDeveloperProductV2` operations in the vendored\n * OpenAPI schema.\n */\nexport const WRITE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"developer-product:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport {\n\tcopyPriceInformation,\n\tisPriceInformationLike,\n} from \"../../../internal/price-information.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { DeveloperProduct } from \"./types.ts\";\nimport type { DeveloperProductConfigV2, DeveloperProductPricingFeatureWire } from \"./wire.ts\";\n\n/**\n * Parses a successful Developer Products API response into the public\n * `DeveloperProduct` shape, returning a `Result` so callers can handle\n * malformed payloads without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `ApiError` when validation\n * fails; the headers are available for future parsers that need them.\n * @returns A success result wrapping the converted `DeveloperProduct`, or\n * an `ApiError` when the body does not match the wire schema.\n */\nexport function parseDeveloperProductResponse(\n\tresponse: HttpResponse,\n): Result<DeveloperProduct, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isDeveloperProductConfigV2(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed developer product response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst priceWire = body.priceInformation ?? undefined;\n\tconst iconAssetId = body.iconImageAssetId ?? undefined;\n\n\treturn {\n\t\tdata: {\n\t\t\tid: String(body.productId),\n\t\t\tname: body.name,\n\t\t\tcreatedAt: new Date(body.createdTimestamp),\n\t\t\tdescription: body.description,\n\t\t\ticonImageAssetId: iconAssetId === undefined ? undefined : String(iconAssetId),\n\t\t\tisForSale: body.isForSale,\n\t\t\tisImmutable: body.isImmutable,\n\t\t\tprice: priceWire === undefined ? undefined : copyPriceInformation(priceWire),\n\t\t\tstorePageEnabled: body.storePageEnabled,\n\t\t\tuniverseId: String(body.universeId),\n\t\t\tupdatedAt: new Date(body.updatedTimestamp),\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"productId\"] === \"number\" &&\n\t\t// Roblox never assigns asset ID 0; a zero productId signals a\n\t\t// malformed response, not a legitimate product.\n\t\tbody[\"productId\"] !== 0 &&\n\t\ttypeof body[\"universeId\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"isForSale\"] === \"boolean\" &&\n\t\ttypeof body[\"isImmutable\"] === \"boolean\" &&\n\t\ttypeof body[\"storePageEnabled\"] === \"boolean\" &&\n\t\tisDateTimeString(body[\"createdTimestamp\"]) &&\n\t\tisDateTimeString(body[\"updatedTimestamp\"])\n\t);\n}\n\nfunction isPricingFeatureWire(value: unknown): value is DeveloperProductPricingFeatureWire {\n\treturn (\n\t\tvalue === \"Invalid\" ||\n\t\tvalue === \"PriceOptimization\" ||\n\t\tvalue === \"RegionalPricing\" ||\n\t\tvalue === \"UserFixedPrice\"\n\t);\n}\n\nfunction isDeveloperProductConfigV2(body: unknown): body is DeveloperProductConfigV2 {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tconst iconImageAssetId = body[\"iconImageAssetId\"] ?? undefined;\n\tif (iconImageAssetId !== undefined && typeof iconImageAssetId !== \"number\") {\n\t\treturn false;\n\t}\n\n\tconst price = body[\"priceInformation\"] ?? undefined;\n\tif (price !== undefined && !isPriceInformationLike(price, isPricingFeatureWire)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadDeveloperProductIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload developer-product icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(productId, languageCode)` pair.\n *\n * @param parameters - Product and language identifiers plus the image bytes\n * to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(\n\tparameters: UploadDeveloperProductIconParameters,\n): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateDeveloperProductNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update developer-product\n * name/description\" endpoint. Either `name`, `description`, or both may be\n * supplied; omitted fields are not included in the JSON body so the server\n * leaves the existing value for that locale untouched.\n *\n * @param parameters - Product and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateDeveloperProductNameDescriptionParameters,\n): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every developer-product localization\n * Operation. The legacy `gameinternationalization` service caps each API key\n * at 100 requests per minute *shared across the entire service* (see the\n * `x-roblox-rate-limits` extension on every operation in the vendored Open\n * Cloud spec), so all developer-product localization methods queue against\n * the same operation key.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"developer-product-localization\",\n});\n\n/**\n * Scopes required for every developer-product localization operation, sourced\n * from `x-roblox-scopes` on the legacy `gameinternationalization`\n * developer-product endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-developer-product:manage\",\n]);\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildGetRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/developer-products/products/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tGET_OPERATION_LIMIT,\n\tGET_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tWRITE_REQUIRED_SCOPES,\n} from \"../../domains/developer-products/products/operations.ts\";\nimport { parseDeveloperProductResponse } from \"../../domains/developer-products/products/parsers.ts\";\nimport type {\n\tCreateDeveloperProductParameters,\n\tDeveloperProduct,\n\tGetDeveloperProductParameters,\n\tUpdateDeveloperProductParameters,\n} from \"../../domains/developer-products/products/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/game-internationalization/developer-product-icon/builders.ts\";\nimport type { UploadDeveloperProductIconParameters } from \"../../domains/game-internationalization/developer-product-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/developer-product-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/developer-product-name-description/operations.ts\";\nimport type { UpdateDeveloperProductNameDescriptionParameters } from \"../../domains/game-internationalization/developer-product-name-description/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R = DeveloperProduct>(\n\tspec: ResourceMethodSpec<P, R>,\n): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateDeveloperProductParameters>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseDeveloperProductResponse,\n\trequiredScopes: WRITE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetDeveloperProductParameters>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseDeveloperProductResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateDeveloperProductParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: WRITE_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<\n\tUpdateDeveloperProductNameDescriptionParameters,\n\tundefined\n>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadDeveloperProductIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface DeveloperProductLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a developer product. Either `name`, `description`, or both may be\n\t * supplied; omitted fields are not forwarded so the server leaves the\n\t * existing value for that locale untouched. Mirrors the upstream `200 OK`\n\t * echo body as `undefined` data.\n\t *\n\t * @param parameters - Product and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateDeveloperProductNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a developer product. A\n\t * subsequent upload for the same `(productId, languageCode)` pair replaces\n\t * the existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * @param parameters - Product and language identifiers plus the image\n\t * bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadDeveloperProductIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Developer Products API.\n *\n * Wires request builders, the injected {@link OpenCloudClientOptions.httpClient}, and response\n * parsers into a single ergonomic surface. Every method returns a\n * {@link Result} so callers handle failure explicitly; no thrown\n * `OpenCloudError` ever escapes the client.\n *\n * ```ts\n * import { DeveloperProductsClient } from \"@bedrock-rbx/ocale/developer-products\";\n *\n * const client = new DeveloperProductsClient({ apiKey: process.env.ROBLOX_API_KEY! });\n *\n * const result = await client.get({\n * universeId: \"1234567890\",\n * productId: \"9876543210\",\n * });\n *\n * if (result.success) {\n * console.log(`${result.data.name} (${result.data.id})`);\n * } else {\n * console.error(result.err.message);\n * }\n * ```\n */\nexport class DeveloperProductsClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link DeveloperProductsClient.update}; methods on this\n\t * group set per-locale overlays on top. Shares the parent client's\n\t * HTTP, rate-limit, and retry plumbing.\n\t */\n\tpublic readonly localization: DeveloperProductLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link DeveloperProductsClient}. Configuration is frozen\n\t * on construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new developer product under the supplied universe.\n\t *\n\t * @param parameters - Creation fields including the universe and product name.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DeveloperProduct, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single developer product by ID.\n\t *\n\t * @param parameters - Universe and product identifiers.\n\t * @param options - Optional per-request overrides (e.g. A different\n\t * {@link OpenCloudClientOptions.apiKey} for this call only).\n\t * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DeveloperProduct, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Partially updates an existing developer product. Mirrors the upstream\n\t * `204 No Content` response: a successful update yields `undefined` data.\n\t * Callers that need the post-update state (for example to observe a\n\t * server-derived `updatedTimestamp`) chain {@link DeveloperProductsClient.get}\n\t * themselves so the GET only fires when actually needed.\n\t *\n\t * @param parameters - The universe and product identifiers and the\n\t * fields to update. Only fields explicitly provided are forwarded.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): DeveloperProductLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;AAgBA,SAAgB,gBAAgB,YAAwD;AACvF,QAAO;EACN,QAAQ;EACR,KAAK,oCAAoC,WAAW,WAAW,sBAAsB,WAAW,UAAU;EAC1G;;;;;;;;;;AAWF,SAAgB,mBAAmB,YAA2D;CAC7F,MAAM,OAAO,IAAI,UAAU;AAC3B,MAAK,OAAO,QAAQ,WAAW,KAAK;AACpC,KAAI,WAAW,gBAAgB,KAAA,EAC9B,MAAK,OAAO,eAAe,WAAW,YAAY;AAGnD,KAAI,WAAW,cAAc,KAAA,EAC5B,MAAK,OAAO,aAAa,OAAO,WAAW,UAAU,CAAC;AAGvD,KAAI,WAAW,UAAU,KAAA,EACxB,MAAK,OAAO,SAAS,OAAO,WAAW,MAAM,CAAC;AAG/C,KAAI,WAAW,6BAA6B,KAAA,EAC3C,MAAK,OAAO,4BAA4B,OAAO,WAAW,yBAAyB,CAAC;AAGrF,KAAI,WAAW,cAAc,KAAA,EAC5B,MAAK,OAAO,aAAa,OAAO,WAAW,UAAU,CAAC;AAGvD,QAAO;EACN;EACA,QAAQ;EACR,KAAK,oCAAoC,WAAW,WAAW;EAC/D;;;;;;;;;;;AAYF,SAAgBA,qBAAmB,YAA2D;CAC7F,MAAM,OAAO,IAAI,UAAU;AAC3B,KAAI,WAAW,SAAS,KAAA,EACvB,MAAK,OAAO,QAAQ,WAAW,KAAK;AAGrC,KAAI,WAAW,gB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;;;;;;;;;;;;;;;;;;;;AA+DF,IAAa,0BAAb,MAAqC;CACpC;;;;;;;;;CAUA;;;;;;;CAQA,YAAY,SAAiC;AAC5C,QAAA,QAAc,IAAI,eAAe,QAAQ;AACzC,OAAK,eAAe,yBAAyB,MAAA,MAAY;;;;;;;;;;CAW1D,MAAa,OACZ,YACA,SACoD;AACpD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;CAYvE,MAAa,IACZ,YACA,SACoD;AACpD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAU,CAAC;;;;;;;;;;;;;;;CAgBpE,MAAa,OACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;AAIxE,SAAS,yBAAyB,OAA2D;AAC5F,QAAO;EACN,MAAM,sBAAsB,YAAY,SAAS;AAChD,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAA8B,CAAC;;EAElF,MAAM,WAAW,YAAY,SAAS;AACrC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE"}
1
+ {"version":3,"file":"developer-products.mjs","names":["buildUpdateRequest","buildUpdateRequest","buildLocaleNameDescRequest","#inner"],"sources":["../src/domains/developer-products/products/builders.ts","../src/domains/developer-products/products/operations.ts","../src/domains/developer-products/products/parsers.ts","../src/domains/game-internationalization/developer-product-icon/builders.ts","../src/domains/game-internationalization/developer-product-name-description/builders.ts","../src/domains/game-internationalization/developer-product-name-description/operations.ts","../src/resources/developer-products/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tCreateDeveloperProductParameters,\n\tGetDeveloperProductParameters,\n\tUpdateDeveloperProductParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `GET` request for the Open Cloud \"read developer product\"\n * endpoint.\n *\n * @param parameters - Universe and product identifiers to interpolate into\n * the URL.\n * @returns A pure {@link HttpRequest} describing the read call.\n */\nexport function buildGetRequest(parameters: GetDeveloperProductParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products/${parameters.productId}/creator`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the Open Cloud \"create developer product\"\n * endpoint.\n *\n * @param parameters - Fields describing the new developer product; optional\n * values omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateDeveloperProductParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update developer product\"\n * endpoint. Every field on `parameters` except the identifiers is optional;\n * omitted fields are not appended to the multipart body so the server leaves\n * them unchanged.\n *\n * @param parameters - Identifiers plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateDeveloperProductParameters): HttpRequest {\n\tconst body = new FormData();\n\tif (parameters.name !== undefined) {\n\t\tbody.append(\"name\", parameters.name);\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.storePageEnabled !== undefined) {\n\t\tbody.append(\"storePageEnabled\", String(parameters.storePageEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products/${parameters.productId}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for reading a single developer product, from\n * the Open Cloud OpenAPI schema.\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"developer-products.get\",\n});\n\n/**\n * Per-second request ceiling for creating a developer product, from the\n * Open Cloud OpenAPI schema.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 3,\n\toperationKey: \"developer-products.create\",\n});\n\n/**\n * Per-second request ceiling for updating a developer product, from the\n * Open Cloud OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a queue,\n * since Roblox does not document the per-minute quota as shared between\n * the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 3,\n\toperationKey: \"developer-products.update\",\n});\n\n/**\n * Scopes the API key or OAuth token must carry to read a developer product,\n * sourced from `x-roblox-scopes` on the `DeveloperProducts_GetDeveloperProductConfigV2`\n * operation in the vendored OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"developer-product:read\"]);\n\n/**\n * Scopes the API key or OAuth token must carry to create or update a developer\n * product, sourced from `x-roblox-scopes` on the\n * `DeveloperProducts_CreateDeveloperProductV2` and\n * `DeveloperProducts_UpdateDeveloperProductV2` operations in the vendored\n * OpenAPI schema.\n */\nexport const WRITE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"developer-product:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport {\n\tcopyPriceInformation,\n\tisPriceInformationLike,\n} from \"../../../internal/price-information.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { DeveloperProduct } from \"./types.ts\";\nimport type { DeveloperProductConfigV2, DeveloperProductPricingFeatureWire } from \"./wire.ts\";\n\n/**\n * Parses a successful Developer Products API response into the public\n * `DeveloperProduct` shape, returning a `Result` so callers can handle\n * malformed payloads without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `ApiError` when validation\n * fails; the headers are available for future parsers that need them.\n * @returns A success result wrapping the converted `DeveloperProduct`, or\n * an `ApiError` when the body does not match the wire schema.\n */\nexport function parseDeveloperProductResponse(\n\tresponse: HttpResponse,\n): Result<DeveloperProduct, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isDeveloperProductConfigV2(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed developer product response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst priceWire = body.priceInformation ?? undefined;\n\tconst iconAssetId = body.iconImageAssetId ?? undefined;\n\n\treturn {\n\t\tdata: {\n\t\t\tid: String(body.productId),\n\t\t\tname: body.name,\n\t\t\tcreatedAt: new Date(body.createdTimestamp),\n\t\t\tdescription: body.description,\n\t\t\ticonImageAssetId: iconAssetId === undefined ? undefined : String(iconAssetId),\n\t\t\tisForSale: body.isForSale,\n\t\t\tisImmutable: body.isImmutable,\n\t\t\tprice: priceWire === undefined ? undefined : copyPriceInformation(priceWire),\n\t\t\tstorePageEnabled: body.storePageEnabled,\n\t\t\tuniverseId: String(body.universeId),\n\t\t\tupdatedAt: new Date(body.updatedTimestamp),\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"productId\"] === \"number\" &&\n\t\t// Roblox never assigns asset ID 0; a zero productId signals a\n\t\t// malformed response, not a legitimate product.\n\t\tbody[\"productId\"] !== 0 &&\n\t\ttypeof body[\"universeId\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"isForSale\"] === \"boolean\" &&\n\t\ttypeof body[\"isImmutable\"] === \"boolean\" &&\n\t\ttypeof body[\"storePageEnabled\"] === \"boolean\" &&\n\t\tisDateTimeString(body[\"createdTimestamp\"]) &&\n\t\tisDateTimeString(body[\"updatedTimestamp\"])\n\t);\n}\n\nfunction isPricingFeatureWire(value: unknown): value is DeveloperProductPricingFeatureWire {\n\treturn (\n\t\tvalue === \"Invalid\" ||\n\t\tvalue === \"PriceOptimization\" ||\n\t\tvalue === \"RegionalPricing\" ||\n\t\tvalue === \"UserFixedPrice\"\n\t);\n}\n\nfunction isDeveloperProductConfigV2(body: unknown): body is DeveloperProductConfigV2 {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tconst iconImageAssetId = body[\"iconImageAssetId\"] ?? undefined;\n\tif (iconImageAssetId !== undefined && typeof iconImageAssetId !== \"number\") {\n\t\treturn false;\n\t}\n\n\tconst price = body[\"priceInformation\"] ?? undefined;\n\tif (price !== undefined && !isPriceInformationLike(price, isPricingFeatureWire)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadDeveloperProductIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload developer-product icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(productId, languageCode)` pair.\n *\n * @param parameters - Product and language identifiers plus the image bytes\n * to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(\n\tparameters: UploadDeveloperProductIconParameters,\n): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateDeveloperProductNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update developer-product\n * name/description\" endpoint. Either `name`, `description`, or both may be\n * supplied; omitted fields are not included in the JSON body so the server\n * leaves the existing value for that locale untouched.\n *\n * @param parameters - Product and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateDeveloperProductNameDescriptionParameters,\n): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every developer-product localization\n * Operation. The legacy `gameinternationalization` service caps each API key\n * at 100 requests per minute *shared across the entire service* (see the\n * `x-roblox-rate-limits` extension on every operation in the vendored Open\n * Cloud spec), so all developer-product localization methods queue against\n * the same operation key.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"developer-product-localization\",\n});\n\n/**\n * Scopes required for every developer-product localization operation, sourced\n * from `x-roblox-scopes` on the legacy `gameinternationalization`\n * developer-product endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-developer-product:manage\",\n]);\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildGetRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/developer-products/products/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tGET_OPERATION_LIMIT,\n\tGET_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tWRITE_REQUIRED_SCOPES,\n} from \"../../domains/developer-products/products/operations.ts\";\nimport { parseDeveloperProductResponse } from \"../../domains/developer-products/products/parsers.ts\";\nimport type {\n\tCreateDeveloperProductParameters,\n\tDeveloperProduct,\n\tGetDeveloperProductParameters,\n\tUpdateDeveloperProductParameters,\n} from \"../../domains/developer-products/products/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/game-internationalization/developer-product-icon/builders.ts\";\nimport type { UploadDeveloperProductIconParameters } from \"../../domains/game-internationalization/developer-product-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/developer-product-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/developer-product-name-description/operations.ts\";\nimport type { UpdateDeveloperProductNameDescriptionParameters } from \"../../domains/game-internationalization/developer-product-name-description/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R = DeveloperProduct>(\n\tspec: ResourceMethodSpec<P, R>,\n): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateDeveloperProductParameters>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseDeveloperProductResponse,\n\trequiredScopes: WRITE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetDeveloperProductParameters>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseDeveloperProductResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateDeveloperProductParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: WRITE_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<\n\tUpdateDeveloperProductNameDescriptionParameters,\n\tundefined\n>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadDeveloperProductIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface DeveloperProductLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a developer product. Either `name`, `description`, or both may be\n\t * supplied; omitted fields are not forwarded so the server leaves the\n\t * existing value for that locale untouched. Mirrors the upstream `200 OK`\n\t * echo body as `undefined` data.\n\t *\n\t * @param parameters - Product and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateDeveloperProductNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a developer product. A\n\t * subsequent upload for the same `(productId, languageCode)` pair replaces\n\t * the existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * @param parameters - Product and language identifiers plus the image\n\t * bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadDeveloperProductIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Developer Products API.\n *\n * Wires request builders, the injected {@link OpenCloudClientOptions.httpClient}, and response\n * parsers into a single ergonomic surface. Every method returns a\n * {@link Result} so callers handle failure explicitly; no thrown\n * `OpenCloudError` ever escapes the client.\n *\n * ```ts\n * import { DeveloperProductsClient } from \"@bedrock-rbx/ocale/developer-products\";\n *\n * const client = new DeveloperProductsClient({ apiKey: process.env.ROBLOX_API_KEY! });\n *\n * const result = await client.get({\n * universeId: \"1234567890\",\n * productId: \"9876543210\",\n * });\n *\n * if (result.success) {\n * console.log(`${result.data.name} (${result.data.id})`);\n * } else {\n * console.error(result.err.message);\n * }\n * ```\n */\nexport class DeveloperProductsClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link DeveloperProductsClient.update}; methods on this\n\t * group set per-locale overlays on top. Shares the parent client's\n\t * HTTP, rate-limit, and retry plumbing.\n\t */\n\tpublic readonly localization: DeveloperProductLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link DeveloperProductsClient}. Configuration is frozen\n\t * on construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new developer product under the supplied universe.\n\t *\n\t * @param parameters - Creation fields including the universe and product name.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DeveloperProduct, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single developer product by ID.\n\t *\n\t * @param parameters - Universe and product identifiers.\n\t * @param options - Optional per-request overrides (e.g. A different\n\t * {@link OpenCloudClientOptions.apiKey} for this call only).\n\t * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DeveloperProduct, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Partially updates an existing developer product. Mirrors the upstream\n\t * `204 No Content` response: a successful update yields `undefined` data.\n\t * Callers that need the post-update state (for example to observe a\n\t * server-derived `updatedTimestamp`) chain {@link DeveloperProductsClient.get}\n\t * themselves so the GET only fires when actually needed.\n\t *\n\t * @param parameters - The universe and product identifiers and the\n\t * fields to update. Only fields explicitly provided are forwarded.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): DeveloperProductLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAgB,gBAAgB,YAAwD;AACvF,QAAO;EACN,QAAQ;EACR,KAAK,oCAAoC,WAAW,WAAW,sBAAsB,WAAW,UAAU;EAC1G;;;;;;;;;;AAWF,SAAgB,mBAAmB,YAA2D;CAC7F,MAAM,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AC5F,QAAO;EACN,MAAM,sBAAsB,YAAY,SAAS;AAChD,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAA8B,CAAC;;EAElF,MAAM,WAAW,YAAY,SAAS;AACrC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE"}
@@ -1,5 +1,5 @@
1
- import { c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-BOhSh9ug.mjs";
2
- import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-DdwXMiv9.mjs";
1
+ import { c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-CwtZT1ek.mjs";
2
+ import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-Cb6g6asv.mjs";
3
3
 
4
4
  //#region src/domains/game-internationalization/game-pass-icon/types.d.ts
5
5
  /**
@@ -1,8 +1,7 @@
1
1
  import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
2
2
  import { t as toBlob } from "./to-blob-B27VhoRp.mjs";
3
- import { t as isDateTimeString } from "./is-date-time-string-DL6l9mo6.mjs";
4
- import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-D7HKNrOp.mjs";
5
- import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-XyhlYrn8.mjs";
3
+ import { a as IDEMPOTENT_METHOD_DEFAULTS, c as isDateTimeString, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-D6Efj9fU.mjs";
4
+ import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-DIrvwCmd.mjs";
6
5
  //#region src/domains/game-internationalization/game-pass-icon/builders.ts
7
6
  /**
8
7
  * Builds a `POST` request for the localized "upload game-pass icon"
@@ -1 +1 @@
1
- {"version":3,"file":"game-passes.mjs","names":["buildUpdateRequest","buildLocaleNameDescRequest","#inner"],"sources":["../src/domains/game-internationalization/game-pass-icon/builders.ts","../src/domains/game-internationalization/game-pass-name-description/builders.ts","../src/domains/game-internationalization/game-pass-name-description/operations.ts","../src/domains/game-passes/game-passes/builders.ts","../src/domains/game-passes/game-passes/operations.ts","../src/domains/game-passes/game-passes/parsers.ts","../src/resources/game-passes/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadGamePassIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload game-pass icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(gamePassId, languageCode)` pair.\n *\n * @param parameters - Game pass and language identifiers plus the image\n * bytes to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(parameters: UploadGamePassIconParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/game-passes/${parameters.gamePassId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateGamePassNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update game-pass\n * name/description\" endpoint. Either `name`, `description`, or both may be\n * supplied; omitted fields are not included in the JSON body so the server\n * leaves the existing value for that locale untouched.\n *\n * @param parameters - Game pass and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateGamePassNameDescriptionParameters,\n): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/game-passes/${parameters.gamePassId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every game-pass localization Operation.\n * The legacy `gameinternationalization` service caps each API key at 100\n * requests per minute *shared across the entire service* (see the\n * `x-roblox-rate-limits` extension on every operation in the vendored Open\n * Cloud spec), so all game-pass localization methods queue against the same\n * operation key.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"game-pass-localization\",\n});\n\n/**\n * Scopes required for every game-pass localization operation, sourced\n * from `x-roblox-scopes` on the legacy `gameinternationalization`\n * game-pass endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-game-pass:manage\",\n]);\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tCreateGamePassParameters,\n\tGetGamePassParameters,\n\tListGamePassesParameters,\n\tUpdateGamePassParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `GET` request for the Open Cloud \"read game pass\" endpoint.\n *\n * @param parameters - Universe and game pass identifiers to interpolate into\n * the URL.\n * @returns A pure {@link HttpRequest} describing the read call.\n */\nexport function buildGetRequest(parameters: GetGamePassParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes/${parameters.gamePassId}/creator`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud \"list game passes\" endpoint.\n * Optional `pageSize` and `pageToken` are appended to the query string only\n * when defined so the server applies its own defaults for omitted fields.\n *\n * @param parameters - Universe identifier plus optional pagination cursors.\n * @returns A pure {@link HttpRequest} describing the list call.\n */\nexport function buildListRequest(parameters: ListGamePassesParameters): HttpRequest {\n\tconst query = new URLSearchParams();\n\tif (parameters.pageSize !== undefined) {\n\t\tquery.append(\"pageSize\", String(parameters.pageSize));\n\t}\n\n\tif (parameters.pageToken !== undefined) {\n\t\tquery.append(\"pageToken\", parameters.pageToken);\n\t}\n\n\tconst queryString = query.toString();\n\tconst base = `/game-passes/v1/universes/${parameters.universeId}/game-passes/creator`;\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: queryString === \"\" ? base : `${base}?${queryString}`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the Open Cloud \"create game pass\" endpoint.\n *\n * @param parameters - Fields describing the new game pass; optional values\n * omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateGamePassParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update game pass\" endpoint.\n * Every field on `parameters` except the identifiers is optional;\n * omitted fields are not appended to the multipart body so the server\n * leaves their current values unchanged.\n *\n * The public parameter `imageFile` is mapped to the wire's `file`\n * multipart field name, matching the OpenAPI schema for this endpoint\n * (the create endpoint uses `imageFile`, but the update endpoint uses\n * `file`). Public consumers stay with one ergonomic name across both\n * methods.\n *\n * @param parameters - Identifiers plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateGamePassParameters): HttpRequest {\n\tconst body = new FormData();\n\tif (parameters.name !== undefined) {\n\t\tbody.append(\"name\", parameters.name);\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"file\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes/${parameters.gamePassId}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for reading a single game pass, from the\n * Open Cloud OpenAPI schema.\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"game-passes.get\",\n});\n\n/**\n * Per-second request ceiling for creating a game pass, from the Open\n * Cloud OpenAPI schema.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 5,\n\toperationKey: \"game-passes.create\",\n});\n\n/**\n * Per-second request ceiling for updating a game pass, from the Open\n * Cloud OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a\n * queue, since the schema does not document the per-second quota as\n * shared between the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 5,\n\toperationKey: \"game-passes.update\",\n});\n\n/**\n * Per-second request ceiling for listing game passes for a universe,\n * from the Open Cloud OpenAPI schema.\n */\nexport const LIST_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"game-passes.list\",\n});\n\n/**\n * Scopes required to read a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_GetGamePassConfig` operation in the vendored\n * OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:read\"]);\n\n/**\n * Scopes required to create a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_CreateGamePass` operation in the vendored OpenAPI\n * schema.\n */\nexport const CREATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:write\"]);\n\n/**\n * Scopes required to update a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_UpdateGamePass` operation in the vendored OpenAPI\n * schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:write\"]);\n\n/**\n * Scopes required to list game passes for a universe, sourced from\n * `x-roblox-scopes` on the `GamePasses_ListGamePassConfigsByUniverse`\n * operation in the vendored OpenAPI schema.\n */\nexport const LIST_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:read\"]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport {\n\tcopyPriceInformation,\n\tisPriceInformationLike,\n} from \"../../../internal/price-information.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Page, Result } from \"../../../types.ts\";\nimport type { GamePass } from \"./types.ts\";\nimport type {\n\tGamePassConfigV2,\n\tListGamePassConfigsByUniverseResponseWire,\n\tPricingFeatureWire,\n} from \"./wire.ts\";\n\n/**\n * Parses a successful Game Pass API response into the public `GamePass`\n * shape, returning a `Result` so callers can handle malformed payloads\n * without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `ApiError` when validation\n * fails; the headers are available for future parsers that need them.\n * @returns A success result wrapping the converted `GamePass`, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseGamePassResponse(response: HttpResponse): Result<GamePass, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isGamePassConfigV2(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed game pass response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn { data: toGamePass(body), success: true };\n}\n\n/**\n * Parses a successful \"list game passes\" response into a public\n * {@link Page} of {@link GamePass}, returning a `Result` so callers can\n * handle malformed payloads without exceptions. JSON `null` or a missing\n * `nextPageToken` is normalized to `undefined`.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the converted page, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseGamePassesListResponse(\n\tresponse: HttpResponse,\n): Result<Page<GamePass>, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isListResponseWire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed game passes list response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\titems: body.gamePasses.map(toGamePass),\n\t\t\tnextPageToken: body.nextPageToken ?? undefined,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction toGamePass(wire: GamePassConfigV2): GamePass {\n\tconst priceWire = wire.priceInformation ?? undefined;\n\treturn {\n\t\tid: String(wire.gamePassId),\n\t\tname: wire.name,\n\t\tcreatedAt: new Date(wire.createdTimestamp),\n\t\tdescription: wire.description,\n\t\ticonAssetId: wire.iconAssetId === 0 ? undefined : String(wire.iconAssetId),\n\t\tisForSale: wire.isForSale,\n\t\tprice: priceWire === undefined ? undefined : copyPriceInformation(priceWire),\n\t\tupdatedAt: new Date(wire.updatedTimestamp),\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"gamePassId\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"isForSale\"] === \"boolean\" &&\n\t\ttypeof body[\"iconAssetId\"] === \"number\" &&\n\t\tisDateTimeString(body[\"createdTimestamp\"]) &&\n\t\tisDateTimeString(body[\"updatedTimestamp\"])\n\t);\n}\n\nfunction isPricingFeatureWire(value: unknown): value is PricingFeatureWire {\n\treturn (\n\t\tvalue === \"Invalid\" ||\n\t\tvalue === \"PriceOptimization\" ||\n\t\tvalue === \"RegionalPricing\" ||\n\t\tvalue === \"UserFixedPrice\"\n\t);\n}\n\nfunction isGamePassConfigV2(body: unknown): body is GamePassConfigV2 {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tconst price = body[\"priceInformation\"] ?? undefined;\n\tif (price !== undefined && !isPriceInformationLike(price, isPricingFeatureWire)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nfunction isListResponseWire(body: unknown): body is ListGamePassConfigsByUniverseResponseWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { gamePasses } = body;\n\tif (!Array.isArray(gamePasses)) {\n\t\treturn false;\n\t}\n\n\tfor (const item of gamePasses) {\n\t\tif (!isGamePassConfigV2(item)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tconst nextPageToken = body[\"nextPageToken\"] ?? undefined;\n\tif (nextPageToken !== undefined && typeof nextPageToken !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/game-internationalization/game-pass-icon/builders.ts\";\nimport type { UploadGamePassIconParameters } from \"../../domains/game-internationalization/game-pass-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/game-pass-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/game-pass-name-description/operations.ts\";\nimport type { UpdateGamePassNameDescriptionParameters } from \"../../domains/game-internationalization/game-pass-name-description/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildGetRequest,\n\tbuildListRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/game-passes/game-passes/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tCREATE_REQUIRED_SCOPES,\n\tGET_OPERATION_LIMIT,\n\tGET_REQUIRED_SCOPES,\n\tLIST_OPERATION_LIMIT,\n\tLIST_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/game-passes/game-passes/operations.ts\";\nimport {\n\tparseGamePassesListResponse,\n\tparseGamePassResponse,\n} from \"../../domains/game-passes/game-passes/parsers.ts\";\nimport type {\n\tCreateGamePassParameters,\n\tGamePass,\n\tGetGamePassParameters,\n\tListGamePassesParameters,\n\tUpdateGamePassParameters,\n} from \"../../domains/game-passes/game-passes/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Page, Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateGamePassParameters, GamePass>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseGamePassResponse,\n\trequiredScopes: CREATE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetGamePassParameters, GamePass>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseGamePassResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateGamePassParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\nconst LIST_SPEC = makeSpec<ListGamePassesParameters, Page<GamePass>>({\n\tbuildRequest: (parameters) => okRequest(buildListRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LIST_OPERATION_LIMIT,\n\tparse: parseGamePassesListResponse,\n\trequiredScopes: LIST_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<UpdateGamePassNameDescriptionParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadGamePassIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface GamePassLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a game pass. Either `name`, `description`, or both may be supplied;\n\t * omitted fields are not forwarded so the server leaves the existing value\n\t * for that locale untouched. Mirrors the upstream `200 OK` echo body as\n\t * `undefined` data.\n\t *\n\t * @param parameters - Game pass and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateGamePassNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a game pass. A subsequent\n\t * upload for the same `(gamePassId, languageCode)` pair replaces the\n\t * existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * @param parameters - Game pass and language identifiers plus the image\n\t * bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadGamePassIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Game Passes API.\n *\n * Wires request builders, the injected {@link OpenCloudClientOptions.httpClient}, and response\n * parsers into a single ergonomic surface. Every method returns a\n * {@link Result} so callers handle failure explicitly; no thrown\n * `OpenCloudError` ever escapes the client.\n *\n * ```ts\n * import { GamePassesClient } from \"@bedrock-rbx/ocale/game-passes\";\n *\n * const client = new GamePassesClient({ apiKey: process.env.ROBLOX_API_KEY! });\n *\n * const result = await client.get({\n * universeId: \"1234567890\",\n * gamePassId: \"9876543210\",\n * });\n *\n * if (result.success) {\n * console.log(`${result.data.name} (${result.data.id})`);\n * } else {\n * console.error(result.err.message);\n * }\n * ```\n *\n * Listing is cursor-paginated; drive the loop on `nextPageToken`:\n *\n * ```ts\n * let pageToken: string | undefined;\n * do {\n * const page = await client.list({ universeId: \"1234567890\", pageToken });\n * if (!page.success) {\n * console.error(page.err.message);\n * break;\n * }\n *\n * for (const pass of page.data.items) {\n * console.log(`${pass.name} (${pass.id})`);\n * }\n *\n * pageToken = page.data.nextPageToken;\n * } while (pageToken !== undefined);\n * ```\n */\nexport class GamePassesClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link GamePassesClient.update}; methods on this group set\n\t * per-locale overlays on top. Shares the parent client's HTTP,\n\t * rate-limit, and retry plumbing.\n\t */\n\tpublic readonly localization: GamePassLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link GamePassesClient}. Configuration is frozen on\n\t * construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new game pass under the supplied universe.\n\t *\n\t * @param parameters - Creation fields including the universe and pass name.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link GamePass} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<GamePass, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single game pass by ID.\n\t *\n\t * @param parameters - Universe and game pass identifiers.\n\t * @param options - Optional per-request overrides (e.g. A different\n\t * {@link OpenCloudClientOptions.apiKey} for this call only).\n\t * @returns A {@link Result} wrapping the parsed {@link GamePass} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<GamePass, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Lists one page of game passes for the supplied universe. Pagination is\n\t * cursor-based: omit `pageToken` for the first page, then thread the\n\t * previous response's `nextPageToken` back in until it is `undefined`.\n\t *\n\t * @param parameters - Universe identifier and optional page cursors.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping a {@link Page} of {@link GamePass},\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async list(\n\t\tparameters: ListGamePassesParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Page<GamePass>, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: LIST_SPEC });\n\t}\n\n\t/**\n\t * Partially updates an existing game pass. Mirrors the upstream\n\t * `204 No Content` response: a successful update yields `undefined`\n\t * data. Callers that need the post-update state (for example to\n\t * observe a server-derived `updatedAt`) chain\n\t * {@link GamePassesClient.get} themselves so the GET only fires when\n\t * actually needed.\n\t *\n\t * @param parameters - The universe and game pass identifiers and the\n\t * fields to update. Only fields explicitly provided are forwarded.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): GamePassLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;AAaA,SAAgB,uBAAuB,YAAuD;CAC7F,MAAM,OAAO,IAAI,UAAU;AAC3B,MAAK,OAAO,SAAS,OAAO,WAAW,MAAM,CAAC;AAE9C,QAAO;EACN;EACA,QAAQ;EACR,KAAK,oDAAoD,WAAW,WAAW,wBAAwB,WAAW;EAClH;;;;;;;;;;;;;;ACRF,SAAgBA,qBACf,YACc;CACd,MAAM,OAA+B,EAAE;AACvC,KAAI,WAAW,SAAS,KAAA,EACvB,MAAK,UAAU,WAAW;AAG3B,KAAI,WAAW,gBAAgB,KAAA,EAC9B,MAAK,iBAAiB,WAAW;AAGlC,QAAO;EACN;EACA,QAAQ;EACR,KAAK,oDAAoD,WAAW,WAAW,mCAAmC,WAAW;EAC7H;;;;;;;;;;;;ACnBF,MAAa,+BAA+C,OAAO,OAAO;CACzE,cAAc,MAAM;CACpB,cAAc;CACd,CAAC;;;;;;AAOF,MAAa,+BAAsD,OAAO,OAAO,CAChF,0BACA,CAAC;;;;;;;;;;ACNF,SAAgB,gBAAgB,YAAgD;AAC/E,QAAO;EACN,QAAQ;EACR,KAAK,6BAA6B,WAAW,WAAW,eAAe,WAAW,WAAW;EAC7F;;;;;;;;;;AAWF,SAAgB,iBAAiB,YAAmD;CACnF,MAAM,QAAQ,IAAI,iBAAiB;AACnC,KAAI,WAAW,aAAa,KAAA,EAC3B,OAAM,OAAO,YAAY,OAAO,WAAW,SAAS,CAAC;AAGtD,KAAI,WAAW,cAAc,KAAA,EAC5B,OAAM,OAAO,aAAa,WAAW,UAAU;CAGhD,MAAM,cAAc,MAAM,UAAU;CACpC,MAAM,OAAO,6BAA6B,WAAW,WAAW;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,SAC4C;AAC5C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAU,CAAC;;;;;;;;;;;;CAapE,MAAa,KACZ,YACA,SACkD;AAClD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAW,CAAC;;;;;;;;;;;;;;;;CAiBrE,MAAa,OACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;AAIxE,SAAS,yBAAyB,OAAmD;AACpF,QAAO;EACN,MAAM,sBAAsB,YAAY,SAAS;AAChD,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAA8B,CAAC;;EAElF,MAAM,WAAW,YAAY,SAAS;AACrC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE"}
1
+ {"version":3,"file":"game-passes.mjs","names":["buildUpdateRequest","buildLocaleNameDescRequest","#inner"],"sources":["../src/domains/game-internationalization/game-pass-icon/builders.ts","../src/domains/game-internationalization/game-pass-name-description/builders.ts","../src/domains/game-internationalization/game-pass-name-description/operations.ts","../src/domains/game-passes/game-passes/builders.ts","../src/domains/game-passes/game-passes/operations.ts","../src/domains/game-passes/game-passes/parsers.ts","../src/resources/game-passes/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadGamePassIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload game-pass icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(gamePassId, languageCode)` pair.\n *\n * @param parameters - Game pass and language identifiers plus the image\n * bytes to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(parameters: UploadGamePassIconParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/game-passes/${parameters.gamePassId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateGamePassNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update game-pass\n * name/description\" endpoint. Either `name`, `description`, or both may be\n * supplied; omitted fields are not included in the JSON body so the server\n * leaves the existing value for that locale untouched.\n *\n * @param parameters - Game pass and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateGamePassNameDescriptionParameters,\n): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/game-passes/${parameters.gamePassId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every game-pass localization Operation.\n * The legacy `gameinternationalization` service caps each API key at 100\n * requests per minute *shared across the entire service* (see the\n * `x-roblox-rate-limits` extension on every operation in the vendored Open\n * Cloud spec), so all game-pass localization methods queue against the same\n * operation key.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"game-pass-localization\",\n});\n\n/**\n * Scopes required for every game-pass localization operation, sourced\n * from `x-roblox-scopes` on the legacy `gameinternationalization`\n * game-pass endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-game-pass:manage\",\n]);\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tCreateGamePassParameters,\n\tGetGamePassParameters,\n\tListGamePassesParameters,\n\tUpdateGamePassParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `GET` request for the Open Cloud \"read game pass\" endpoint.\n *\n * @param parameters - Universe and game pass identifiers to interpolate into\n * the URL.\n * @returns A pure {@link HttpRequest} describing the read call.\n */\nexport function buildGetRequest(parameters: GetGamePassParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes/${parameters.gamePassId}/creator`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud \"list game passes\" endpoint.\n * Optional `pageSize` and `pageToken` are appended to the query string only\n * when defined so the server applies its own defaults for omitted fields.\n *\n * @param parameters - Universe identifier plus optional pagination cursors.\n * @returns A pure {@link HttpRequest} describing the list call.\n */\nexport function buildListRequest(parameters: ListGamePassesParameters): HttpRequest {\n\tconst query = new URLSearchParams();\n\tif (parameters.pageSize !== undefined) {\n\t\tquery.append(\"pageSize\", String(parameters.pageSize));\n\t}\n\n\tif (parameters.pageToken !== undefined) {\n\t\tquery.append(\"pageToken\", parameters.pageToken);\n\t}\n\n\tconst queryString = query.toString();\n\tconst base = `/game-passes/v1/universes/${parameters.universeId}/game-passes/creator`;\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: queryString === \"\" ? base : `${base}?${queryString}`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the Open Cloud \"create game pass\" endpoint.\n *\n * @param parameters - Fields describing the new game pass; optional values\n * omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateGamePassParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update game pass\" endpoint.\n * Every field on `parameters` except the identifiers is optional;\n * omitted fields are not appended to the multipart body so the server\n * leaves their current values unchanged.\n *\n * The public parameter `imageFile` is mapped to the wire's `file`\n * multipart field name, matching the OpenAPI schema for this endpoint\n * (the create endpoint uses `imageFile`, but the update endpoint uses\n * `file`). Public consumers stay with one ergonomic name across both\n * methods.\n *\n * @param parameters - Identifiers plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateGamePassParameters): HttpRequest {\n\tconst body = new FormData();\n\tif (parameters.name !== undefined) {\n\t\tbody.append(\"name\", parameters.name);\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"file\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes/${parameters.gamePassId}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for reading a single game pass, from the\n * Open Cloud OpenAPI schema.\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"game-passes.get\",\n});\n\n/**\n * Per-second request ceiling for creating a game pass, from the Open\n * Cloud OpenAPI schema.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 5,\n\toperationKey: \"game-passes.create\",\n});\n\n/**\n * Per-second request ceiling for updating a game pass, from the Open\n * Cloud OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a\n * queue, since the schema does not document the per-second quota as\n * shared between the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 5,\n\toperationKey: \"game-passes.update\",\n});\n\n/**\n * Per-second request ceiling for listing game passes for a universe,\n * from the Open Cloud OpenAPI schema.\n */\nexport const LIST_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"game-passes.list\",\n});\n\n/**\n * Scopes required to read a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_GetGamePassConfig` operation in the vendored\n * OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:read\"]);\n\n/**\n * Scopes required to create a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_CreateGamePass` operation in the vendored OpenAPI\n * schema.\n */\nexport const CREATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:write\"]);\n\n/**\n * Scopes required to update a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_UpdateGamePass` operation in the vendored OpenAPI\n * schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:write\"]);\n\n/**\n * Scopes required to list game passes for a universe, sourced from\n * `x-roblox-scopes` on the `GamePasses_ListGamePassConfigsByUniverse`\n * operation in the vendored OpenAPI schema.\n */\nexport const LIST_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:read\"]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport {\n\tcopyPriceInformation,\n\tisPriceInformationLike,\n} from \"../../../internal/price-information.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Page, Result } from \"../../../types.ts\";\nimport type { GamePass } from \"./types.ts\";\nimport type {\n\tGamePassConfigV2,\n\tListGamePassConfigsByUniverseResponseWire,\n\tPricingFeatureWire,\n} from \"./wire.ts\";\n\n/**\n * Parses a successful Game Pass API response into the public `GamePass`\n * shape, returning a `Result` so callers can handle malformed payloads\n * without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `ApiError` when validation\n * fails; the headers are available for future parsers that need them.\n * @returns A success result wrapping the converted `GamePass`, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseGamePassResponse(response: HttpResponse): Result<GamePass, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isGamePassConfigV2(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed game pass response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn { data: toGamePass(body), success: true };\n}\n\n/**\n * Parses a successful \"list game passes\" response into a public\n * {@link Page} of {@link GamePass}, returning a `Result` so callers can\n * handle malformed payloads without exceptions. JSON `null` or a missing\n * `nextPageToken` is normalized to `undefined`.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the converted page, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseGamePassesListResponse(\n\tresponse: HttpResponse,\n): Result<Page<GamePass>, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isListResponseWire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed game passes list response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\titems: body.gamePasses.map(toGamePass),\n\t\t\tnextPageToken: body.nextPageToken ?? undefined,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction toGamePass(wire: GamePassConfigV2): GamePass {\n\tconst priceWire = wire.priceInformation ?? undefined;\n\treturn {\n\t\tid: String(wire.gamePassId),\n\t\tname: wire.name,\n\t\tcreatedAt: new Date(wire.createdTimestamp),\n\t\tdescription: wire.description,\n\t\ticonAssetId: wire.iconAssetId === 0 ? undefined : String(wire.iconAssetId),\n\t\tisForSale: wire.isForSale,\n\t\tprice: priceWire === undefined ? undefined : copyPriceInformation(priceWire),\n\t\tupdatedAt: new Date(wire.updatedTimestamp),\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"gamePassId\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"isForSale\"] === \"boolean\" &&\n\t\ttypeof body[\"iconAssetId\"] === \"number\" &&\n\t\tisDateTimeString(body[\"createdTimestamp\"]) &&\n\t\tisDateTimeString(body[\"updatedTimestamp\"])\n\t);\n}\n\nfunction isPricingFeatureWire(value: unknown): value is PricingFeatureWire {\n\treturn (\n\t\tvalue === \"Invalid\" ||\n\t\tvalue === \"PriceOptimization\" ||\n\t\tvalue === \"RegionalPricing\" ||\n\t\tvalue === \"UserFixedPrice\"\n\t);\n}\n\nfunction isGamePassConfigV2(body: unknown): body is GamePassConfigV2 {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tconst price = body[\"priceInformation\"] ?? undefined;\n\tif (price !== undefined && !isPriceInformationLike(price, isPricingFeatureWire)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nfunction isListResponseWire(body: unknown): body is ListGamePassConfigsByUniverseResponseWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { gamePasses } = body;\n\tif (!Array.isArray(gamePasses)) {\n\t\treturn false;\n\t}\n\n\tfor (const item of gamePasses) {\n\t\tif (!isGamePassConfigV2(item)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tconst nextPageToken = body[\"nextPageToken\"] ?? undefined;\n\tif (nextPageToken !== undefined && typeof nextPageToken !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/game-internationalization/game-pass-icon/builders.ts\";\nimport type { UploadGamePassIconParameters } from \"../../domains/game-internationalization/game-pass-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/game-pass-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/game-pass-name-description/operations.ts\";\nimport type { UpdateGamePassNameDescriptionParameters } from \"../../domains/game-internationalization/game-pass-name-description/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildGetRequest,\n\tbuildListRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/game-passes/game-passes/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tCREATE_REQUIRED_SCOPES,\n\tGET_OPERATION_LIMIT,\n\tGET_REQUIRED_SCOPES,\n\tLIST_OPERATION_LIMIT,\n\tLIST_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/game-passes/game-passes/operations.ts\";\nimport {\n\tparseGamePassesListResponse,\n\tparseGamePassResponse,\n} from \"../../domains/game-passes/game-passes/parsers.ts\";\nimport type {\n\tCreateGamePassParameters,\n\tGamePass,\n\tGetGamePassParameters,\n\tListGamePassesParameters,\n\tUpdateGamePassParameters,\n} from \"../../domains/game-passes/game-passes/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Page, Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateGamePassParameters, GamePass>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseGamePassResponse,\n\trequiredScopes: CREATE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetGamePassParameters, GamePass>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseGamePassResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateGamePassParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\nconst LIST_SPEC = makeSpec<ListGamePassesParameters, Page<GamePass>>({\n\tbuildRequest: (parameters) => okRequest(buildListRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LIST_OPERATION_LIMIT,\n\tparse: parseGamePassesListResponse,\n\trequiredScopes: LIST_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<UpdateGamePassNameDescriptionParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadGamePassIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface GamePassLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a game pass. Either `name`, `description`, or both may be supplied;\n\t * omitted fields are not forwarded so the server leaves the existing value\n\t * for that locale untouched. Mirrors the upstream `200 OK` echo body as\n\t * `undefined` data.\n\t *\n\t * @param parameters - Game pass and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateGamePassNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a game pass. A subsequent\n\t * upload for the same `(gamePassId, languageCode)` pair replaces the\n\t * existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * @param parameters - Game pass and language identifiers plus the image\n\t * bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadGamePassIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Game Passes API.\n *\n * Wires request builders, the injected {@link OpenCloudClientOptions.httpClient}, and response\n * parsers into a single ergonomic surface. Every method returns a\n * {@link Result} so callers handle failure explicitly; no thrown\n * `OpenCloudError` ever escapes the client.\n *\n * ```ts\n * import { GamePassesClient } from \"@bedrock-rbx/ocale/game-passes\";\n *\n * const client = new GamePassesClient({ apiKey: process.env.ROBLOX_API_KEY! });\n *\n * const result = await client.get({\n * universeId: \"1234567890\",\n * gamePassId: \"9876543210\",\n * });\n *\n * if (result.success) {\n * console.log(`${result.data.name} (${result.data.id})`);\n * } else {\n * console.error(result.err.message);\n * }\n * ```\n *\n * Listing is cursor-paginated; drive the loop on `nextPageToken`:\n *\n * ```ts\n * let pageToken: string | undefined;\n * do {\n * const page = await client.list({ universeId: \"1234567890\", pageToken });\n * if (!page.success) {\n * console.error(page.err.message);\n * break;\n * }\n *\n * for (const pass of page.data.items) {\n * console.log(`${pass.name} (${pass.id})`);\n * }\n *\n * pageToken = page.data.nextPageToken;\n * } while (pageToken !== undefined);\n * ```\n */\nexport class GamePassesClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link GamePassesClient.update}; methods on this group set\n\t * per-locale overlays on top. Shares the parent client's HTTP,\n\t * rate-limit, and retry plumbing.\n\t */\n\tpublic readonly localization: GamePassLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link GamePassesClient}. Configuration is frozen on\n\t * construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new game pass under the supplied universe.\n\t *\n\t * @param parameters - Creation fields including the universe and pass name.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link GamePass} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<GamePass, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single game pass by ID.\n\t *\n\t * @param parameters - Universe and game pass identifiers.\n\t * @param options - Optional per-request overrides (e.g. A different\n\t * {@link OpenCloudClientOptions.apiKey} for this call only).\n\t * @returns A {@link Result} wrapping the parsed {@link GamePass} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<GamePass, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Lists one page of game passes for the supplied universe. Pagination is\n\t * cursor-based: omit `pageToken` for the first page, then thread the\n\t * previous response's `nextPageToken` back in until it is `undefined`.\n\t *\n\t * @param parameters - Universe identifier and optional page cursors.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping a {@link Page} of {@link GamePass},\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async list(\n\t\tparameters: ListGamePassesParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Page<GamePass>, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: LIST_SPEC });\n\t}\n\n\t/**\n\t * Partially updates an existing game pass. Mirrors the upstream\n\t * `204 No Content` response: a successful update yields `undefined`\n\t * data. Callers that need the post-update state (for example to\n\t * observe a server-derived `updatedAt`) chain\n\t * {@link GamePassesClient.get} themselves so the GET only fires when\n\t * actually needed.\n\t *\n\t * @param parameters - The universe and game pass identifiers and the\n\t * fields to update. Only fields explicitly provided are forwarded.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): GamePassLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,uBAAuB,YAAuD;CAC7F,MAAM,OAAO,IAAI,UAAU;AAC3B,MAAK,OAAO,SAAS,OAAO,WAAW,MAAM,CAAC;AAE9C,QAAO;EACN;EACA,QAAQ;EACR,KAAK,oDAAoD,WAAW,WAAW,wBAAwB,WAAW;EAClH;;;;;;;;;;;;;;ACRF,SAAgBA,qBACf,YACc;CACd,MAAM,OAA+B,EAAE;AACvC,KAAI,WAAW,SAAS,KAAA,EACvB,MAAK,UAAU,WAAW;AAG3B,KAAI,WAAW,gBAAgB,KAAA,EAC9B,MAAK,iBAAiB,WAAW;AAGlC,QAAO;EACN;EACA,QAAQ;EACR,KAAK,oDAAoD,WAAW,WAAW,mCAAmC,WAAW;EA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AAY;CACZ,gBAAgB;CAChB,OAAO;CACP,gBAAgB;CAChB,CAAC;AAEF,MAAM,mBAAmB,SAAkD;CAC1E,eAAe,eAAe,UAAU,uBAAuB,WAAW,CAAC;CAC3E,gBAAgB;CAChB,YAAY;CACZ,gBAAgB;CAChB,OAAO;CACP,gBAAgB;CAChB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFF,IAAa,mBAAb,MAA8B;CAC7B;;;;;;;;;CAUA;;;;;;;CAQA,YAAY,SAAiC;AAC5C,QAAA,QAAc,IAAI,eAAe,QAAQ;AACzC,OAAK,eAAe,yBAAyB,MAAA,MAAY;;;;;;;;;;CAW1D,MAAa,OACZ,YACA,SAC4C;AAC5C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;CAYvE,MAAa,IACZ,YACA,SAC4C;AAC5C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAU,CAAC;;;;;;;;;;;;CAapE,MAAa,KACZ,YACA,SACkD;AAClD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAW,CAAC;;;;;;;;;;;;;;;;CAiBrE,MAAa,OACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;AAIxE,SAAS,yBAAyB,OAAmD;AACpF,QAAO;EACN,MAAM,sBAAsB,YAAY,SAAS;AAChD,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAA8B,CAAC;;EAElF,MAAM,WAAW,YAAY,SAAS;AACrC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE"}
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as OpenCloudHooks, c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, n as HttpRequest, o as RequestConfig, r as HttpResponse, s as RequestOptions, t as HttpClient, u as SleepFunc } from "./types-BOhSh9ug.mjs";
2
- import { i as ApiErrorOptions, n as RateLimitErrorOptions, r as ApiError, t as RateLimitError } from "./rate-limit-BHAddFXO.mjs";
1
+ import { a as OpenCloudHooks, c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, n as HttpRequest, o as RequestConfig, r as HttpResponse, s as RequestOptions, t as HttpClient, u as SleepFunc } from "./types-CwtZT1ek.mjs";
2
+ import { i as ApiErrorOptions, n as RateLimitErrorOptions, r as ApiError, t as RateLimitError } from "./rate-limit-BYuizHoD.mjs";
3
3
 
4
4
  //#region src/errors/network-error.d.ts
5
5
  /**
@@ -1,2 +1,2 @@
1
- import { i as RobloxLocale, n as RobloxCreatorLocale, r as RobloxLanguageCode, t as ROBLOX_CREATOR_LOCALES } from "./data.generated-DdwXMiv9.mjs";
1
+ import { i as RobloxLocale, n as RobloxCreatorLocale, r as RobloxLanguageCode, t as ROBLOX_CREATOR_LOCALES } from "./data.generated-Cb6g6asv.mjs";
2
2
  export { ROBLOX_CREATOR_LOCALES, type RobloxCreatorLocale, type RobloxLanguageCode, type RobloxLocale };
@@ -1,5 +1,5 @@
1
- import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-BOhSh9ug.mjs";
2
- import { a as CompleteTask, c as InProgressTask, d as SubmitAtHeadParameters, f as SubmitAtVersionParameters, i as LogPage, l as LuauExecutionTask, n as ListLogsParameters, o as FailedTask, r as LogMessage, s as GetParameters, t as PollUntilDoneOptions, u as LuauExecutionTaskRef } from "./polling-DDKKpz6Z.mjs";
1
+ import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-CwtZT1ek.mjs";
2
+ import { a as CompleteTask, c as InProgressTask, d as SubmitAtHeadParameters, f as SubmitAtVersionParameters, i as LogPage, l as LuauExecutionTask, n as ListLogsParameters, o as FailedTask, r as LogMessage, s as GetParameters, t as PollUntilDoneOptions, u as LuauExecutionTaskRef } from "./polling-BMrYajok.mjs";
3
3
 
4
4
  //#region src/domains/cloud-v2/luau-execution-task-binary-inputs/types.d.ts
5
5
  /**