@bedrock-rbx/ocale 0.1.0-beta.9 → 0.1.0
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.
- package/README.md +182 -0
- package/dist/badges.d.mts +33 -2
- package/dist/badges.d.mts.map +1 -1
- package/dist/badges.mjs +16 -4
- package/dist/badges.mjs.map +1 -1
- package/dist/{data.generated-Cb6g6asv.d.mts → data.generated-B2ceLfSn.d.mts} +9 -1
- package/dist/data.generated-B2ceLfSn.d.mts.map +1 -0
- package/dist/developer-products.d.mts +38 -2
- package/dist/developer-products.d.mts.map +1 -1
- package/dist/developer-products.mjs +32 -8
- package/dist/developer-products.mjs.map +1 -1
- package/dist/game-passes.d.mts +40 -2
- package/dist/game-passes.d.mts.map +1 -1
- package/dist/game-passes.mjs +30 -6
- package/dist/game-passes.mjs.map +1 -1
- package/dist/index.d.mts +21 -12
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/locales.d.mts +1 -1
- package/dist/locales.mjs +2 -0
- package/dist/locales.mjs.map +1 -1
- package/dist/luau-execution.d.mts +22 -3
- package/dist/luau-execution.d.mts.map +1 -1
- package/dist/luau-execution.mjs +29 -13
- package/dist/luau-execution.mjs.map +1 -1
- package/dist/places.d.mts +20 -2
- package/dist/places.d.mts.map +1 -1
- package/dist/places.mjs +34 -14
- package/dist/places.mjs.map +1 -1
- package/dist/{poll-timeout-Dg_QFEqi.mjs → poll-timeout-C0nmJzOd.mjs} +6 -2
- package/dist/poll-timeout-C0nmJzOd.mjs.map +1 -0
- package/dist/{polling-helpers-CS00apdU.mjs → polling-helpers-BcycDhDm.mjs} +225 -78
- package/dist/polling-helpers-BcycDhDm.mjs.map +1 -0
- package/dist/{polling-BMrYajok.d.mts → polling-rj0dGREg.d.mts} +73 -14
- package/dist/polling-rj0dGREg.d.mts.map +1 -0
- package/dist/{price-information-DIrvwCmd.mjs → price-information-DK83Wul1.mjs} +2 -2
- package/dist/{price-information-DIrvwCmd.mjs.map → price-information-DK83Wul1.mjs.map} +1 -1
- package/dist/{rate-limit-D1q2Js-z.mjs → rate-limit-Co9i28qi.mjs} +30 -2
- package/dist/rate-limit-Co9i28qi.mjs.map +1 -0
- package/dist/{resource-client-D6Efj9fU.mjs → resource-client-C_D--PYX.mjs} +328 -243
- package/dist/resource-client-C_D--PYX.mjs.map +1 -0
- package/dist/retry-CbHBw60o.mjs +380 -0
- package/dist/retry-CbHBw60o.mjs.map +1 -0
- package/dist/retry-r1TXe5Zd.d.mts +189 -0
- package/dist/retry-r1TXe5Zd.d.mts.map +1 -0
- package/dist/{signatures-B5Fojgn0.mjs → signatures-JF-7Psce.mjs} +1 -1
- package/dist/{signatures-B5Fojgn0.mjs.map → signatures-JF-7Psce.mjs.map} +1 -1
- package/dist/storage.d.mts +30 -27
- package/dist/storage.d.mts.map +1 -1
- package/dist/storage.mjs +46 -31
- package/dist/storage.mjs.map +1 -1
- package/dist/testing.d.mts +24 -9
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +2 -2
- package/dist/testing.mjs.map +1 -1
- package/dist/{to-blob-B27VhoRp.mjs → to-blob-RPqMBuft.mjs} +1 -1
- package/dist/{to-blob-B27VhoRp.mjs.map → to-blob-RPqMBuft.mjs.map} +1 -1
- package/dist/{types-CwtZT1ek.d.mts → types-CRiJg5EQ.d.mts} +46 -4
- package/dist/types-CRiJg5EQ.d.mts.map +1 -0
- package/dist/universes.d.mts +47 -5
- package/dist/universes.d.mts.map +1 -1
- package/dist/universes.mjs +31 -15
- package/dist/universes.mjs.map +1 -1
- package/dist/{validation-DkL5KQqz.mjs → validation-9oU6qNNQ.mjs} +4 -2
- package/dist/validation-9oU6qNNQ.mjs.map +1 -0
- package/dist/{wire-CeL6W_V7.d.mts → wire-D3K-a-UP.d.mts} +3 -1
- package/dist/wire-D3K-a-UP.d.mts.map +1 -0
- package/package.json +7 -6
- package/dist/data.generated-Cb6g6asv.d.mts.map +0 -1
- package/dist/permission-error-DOVtNq3A.mjs +0 -46
- package/dist/permission-error-DOVtNq3A.mjs.map +0 -1
- package/dist/poll-timeout-Dg_QFEqi.mjs.map +0 -1
- package/dist/polling-BMrYajok.d.mts.map +0 -1
- package/dist/polling-helpers-CS00apdU.mjs.map +0 -1
- package/dist/rate-limit-BYuizHoD.d.mts +0 -92
- package/dist/rate-limit-BYuizHoD.d.mts.map +0 -1
- package/dist/rate-limit-D1q2Js-z.mjs.map +0 -1
- package/dist/resource-client-D6Efj9fU.mjs.map +0 -1
- package/dist/types-CwtZT1ek.d.mts.map +0 -1
- package/dist/validation-DkL5KQqz.mjs.map +0 -1
- package/dist/wire-CeL6W_V7.d.mts.map +0 -1
package/dist/universes.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"universes.mjs","names":["#inner"],"sources":["../src/domains/cloud-v2/universes/builders.ts","../src/domains/cloud-v2/universes/operations.ts","../src/domains/cloud-v2/universes/parsers.ts","../src/domains/game-internationalization/game-icon/builders.ts","../src/domains/game-internationalization/game-icon/operations.ts","../src/domains/game-internationalization/game-icon/parsers.ts","../src/domains/game-internationalization/game-thumbnails/builders.ts","../src/domains/game-internationalization/game-thumbnails/operations.ts","../src/domains/game-internationalization/game-thumbnails/parsers.ts","../src/resources/universes/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../client/types.ts\";\nimport type { OpenCloudError } from \"../../../errors/base.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport { okRequest } from \"../../../internal/resource-client.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { GetUniverseParameters, UpdateUniverseParameters } from \"./types.ts\";\n\n/**\n * Dodges `unicorn/no-null` while still emitting a literal `null` onto\n * the wire, which the Open Cloud `Cloud_UpdateUniverse` endpoint\n * requires to clear a nullable field (for example disabling private\n * servers or removing a social link).\n */\nconst NULL_SENTINEL = JSON.parse(\"null\");\n\n/**\n * Builds a `GET` request for the Open Cloud \"get universe\" endpoint.\n *\n * @param parameters - The universe identifier.\n * @returns A success result wrapping the request; the builder cannot fail.\n */\nexport function buildGetRequest(\n\tparameters: GetUniverseParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest({\n\t\tmethod: \"GET\",\n\t\turl: `/cloud/v2/universes/${parameters.universeId}`,\n\t});\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update universe\"\n * endpoint. Derives the `updateMask` query string from the keys\n * present on `parameters` and emits a JSON body containing those same\n * fields, translating `undefined` values to JSON `null` so Roblox\n * clears the corresponding server-side value.\n *\n * @param parameters - The universe identifier plus the fields to update.\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when no updatable fields were supplied.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateUniverseParameters,\n): Result<HttpRequest, ValidationError> {\n\tconst fieldKeys = extractUpdateFieldKeys(parameters);\n\n\tif (fieldKeys.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Update must include at least one field\", {\n\t\t\t\tcode: \"empty_update\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst body: Record<string, unknown> = {};\n\tfor (const key of fieldKeys) {\n\t\tbody[key] = bodyValueFor(parameters, key);\n\t}\n\n\tconst updateMask = fieldKeys.join(\",\");\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": \"application/json\" },\n\t\t\tmethod: \"PATCH\",\n\t\t\turl: `/cloud/v2/universes/${parameters.universeId}?updateMask=${updateMask}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction extractUpdateFieldKeys(parameters: UpdateUniverseParameters): ReadonlyArray<string> {\n\treturn Object.keys(parameters).filter((key) => key !== \"universeId\");\n}\n\nfunction bodyValueFor(parameters: UpdateUniverseParameters, key: string): unknown {\n\tconst value = Reflect.get(parameters, key);\n\treturn value === undefined ? NULL_SENTINEL : value;\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst PER_MINUTE = 100;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for reading a universe, from the Open\n * Cloud OpenAPI schema (100 requests per minute per API key owner).\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"universes.get\",\n});\n\n/**\n * Per-second request ceiling for updating a universe, from the Open\n * Cloud OpenAPI schema (100 requests per minute per API key owner).\n * Keyed independently from {@link GET_OPERATION_LIMIT} so reads and\n * updates do not share a queue; upstream quota accounting is not\n * documented as shared and the conservative default is fewer\n * cross-method contention surprises.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"universes.update\",\n});\n\n/**\n * Scopes required to update a universe, sourced from `x-roblox-scopes`\n * on the `Cloud_UpdateUniverse` operation in the vendored OpenAPI schema.\n * `Cloud_GetUniverse` declares no scope, so the GET method intentionally\n * does not declare `requiredScopes` and a 401/403 there surfaces as a\n * generic ApiError.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"universe:write\"]);\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 {\n\tSocialLink,\n\tUniverse,\n\tUniverseAgeRating,\n\tUniverseOwner,\n\tUniverseVisibility,\n} from \"./types.ts\";\nimport type { AgeRatingWire, SocialLinkWire, UniverseWire, VisibilityWire } from \"./wire.ts\";\n\nconst VISIBILITY_MAP: Readonly<Record<VisibilityWire, UniverseVisibility>> = {\n\tPRIVATE: \"private\",\n\tPUBLIC: \"public\",\n\tVISIBILITY_UNSPECIFIED: \"unspecified\",\n};\n\nconst AGE_RATING_MAP: Readonly<Record<AgeRatingWire, UniverseAgeRating>> = {\n\tAGE_RATING_9_PLUS: \"9Plus\",\n\tAGE_RATING_13_PLUS: \"13Plus\",\n\tAGE_RATING_17_PLUS: \"17Plus\",\n\tAGE_RATING_ALL: \"all\",\n\tAGE_RATING_UNSPECIFIED: \"unspecified\",\n};\n\nconst MALFORMED_MESSAGE = \"Malformed universe response\";\n\ninterface ToUniverseArgs {\n\treadonly id: string;\n\treadonly body: UniverseWire;\n\treadonly owner: UniverseOwner;\n}\n\n/**\n * Parses a successful Open Cloud `Universe` response body into the\n * public {@link Universe} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link Universe}, or\n * an {@link ApiError} when the body does not match the wire schema.\n */\nexport function parseUniverseResponse(response: HttpResponse): Result<Universe, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isUniverseWire(body)) {\n\t\treturn malformed(statusCode);\n\t}\n\n\tconst ownerResult = resolveOwner(body);\n\tif (!ownerResult.success) {\n\t\treturn malformed(statusCode);\n\t}\n\n\tconst idMatch = /^universes\\/(\\d+)$/.exec(body.path);\n\tconst id = idMatch?.[1];\n\tif (id === undefined) {\n\t\treturn malformed(statusCode);\n\t}\n\n\treturn { data: toUniverse({ id, body, owner: ownerResult.data }), success: true };\n}\n\nfunction malformed(statusCode: number): Result<Universe, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_MESSAGE, { statusCode }),\n\t\tsuccess: false,\n\t};\n}\n\nfunction extractRootPlaceId(rootPlace: string | undefined): string | undefined {\n\tif (rootPlace === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst match = /\\/places\\/(\\d+)$/.exec(rootPlace);\n\treturn match?.[1];\n}\n\nfunction toSocialLink(wire: SocialLinkWire | undefined): SocialLink | undefined {\n\tif (wire === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn { title: wire.title, uri: wire.uri };\n}\n\nfunction toUniverse(args: ToUniverseArgs): Universe {\n\tconst { id, body, owner } = args;\n\treturn {\n\t\tid,\n\t\tageRating: AGE_RATING_MAP[body.ageRating],\n\t\tconsoleEnabled: body.consoleEnabled ?? false,\n\t\tcreatedAt: new Date(body.createTime),\n\t\tdescription: body.description,\n\t\tdesktopEnabled: body.desktopEnabled ?? false,\n\t\tdiscordSocialLink: toSocialLink(body.discordSocialLink),\n\t\tdisplayName: body.displayName,\n\t\tfacebookSocialLink: toSocialLink(body.facebookSocialLink),\n\t\tguildedSocialLink: toSocialLink(body.guildedSocialLink),\n\t\tmobileEnabled: body.mobileEnabled ?? false,\n\t\towner,\n\t\tprivateServerPriceRobux: body.privateServerPriceRobux ?? undefined,\n\t\trobloxGroupSocialLink: toSocialLink(body.robloxGroupSocialLink),\n\t\trootPlaceId: extractRootPlaceId(body.rootPlace),\n\t\ttabletEnabled: body.tabletEnabled ?? false,\n\t\ttwitchSocialLink: toSocialLink(body.twitchSocialLink),\n\t\ttwitterSocialLink: toSocialLink(body.twitterSocialLink),\n\t\tupdatedAt: new Date(body.updateTime),\n\t\tvisibility: VISIBILITY_MAP[body.visibility],\n\t\tvoiceChatEnabled: body.voiceChatEnabled ?? false,\n\t\tvrEnabled: body.vrEnabled ?? false,\n\t\tyoutubeSocialLink: toSocialLink(body.youtubeSocialLink),\n\t};\n}\n\nfunction isVisibilityWire(value: unknown): value is VisibilityWire {\n\treturn value === \"PRIVATE\" || value === \"PUBLIC\" || value === \"VISIBILITY_UNSPECIFIED\";\n}\n\nfunction isAgeRatingWire(value: unknown): value is AgeRatingWire {\n\treturn (\n\t\tvalue === \"AGE_RATING_13_PLUS\" ||\n\t\tvalue === \"AGE_RATING_17_PLUS\" ||\n\t\tvalue === \"AGE_RATING_9_PLUS\" ||\n\t\tvalue === \"AGE_RATING_ALL\" ||\n\t\tvalue === \"AGE_RATING_UNSPECIFIED\"\n\t);\n}\n\nfunction hasValidRequiredFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"path\"] === \"string\" &&\n\t\tisDateTimeString(body[\"createTime\"]) &&\n\t\tisDateTimeString(body[\"updateTime\"]) &&\n\t\ttypeof body[\"displayName\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\tisVisibilityWire(body[\"visibility\"]) &&\n\t\tisAgeRatingWire(body[\"ageRating\"])\n\t);\n}\n\nfunction isSocialLinkWire(value: unknown): value is SocialLinkWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn typeof value[\"title\"] === \"string\" && typeof value[\"uri\"] === \"string\";\n}\n\nfunction isOptionalSocialLink(value: unknown): boolean {\n\treturn value === undefined || value === null || isSocialLinkWire(value);\n}\n\nfunction isOptionalBoolean(value: unknown): boolean {\n\treturn value === undefined || value === null || typeof value === \"boolean\";\n}\n\nfunction hasValidOptionalFields(body: Record<string, unknown>): boolean {\n\tconst priceField = body[\"privateServerPriceRobux\"] ?? undefined;\n\tif (priceField !== undefined && typeof priceField !== \"number\") {\n\t\treturn false;\n\t}\n\n\tconst rootPlace = body[\"rootPlace\"] ?? undefined;\n\tif (rootPlace !== undefined && typeof rootPlace !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\tisOptionalBoolean(body[\"voiceChatEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"desktopEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"mobileEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"tabletEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"consoleEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"vrEnabled\"]) &&\n\t\tisOptionalSocialLink(body[\"facebookSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"twitterSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"youtubeSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"twitchSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"discordSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"robloxGroupSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"guildedSocialLink\"])\n\t);\n}\n\nfunction isUniverseWire(body: unknown): body is UniverseWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\treturn hasValidRequiredFields(body) && hasValidOptionalFields(body);\n}\n\nfunction extractOwnerId(resourcePath: string): string | undefined {\n\tconst match = /^(?:users|groups)\\/(\\d+)$/.exec(resourcePath);\n\treturn match?.[1];\n}\n\nfunction resolveOwner(body: UniverseWire): Result<UniverseOwner, undefined> {\n\tif (typeof body.user === \"string\") {\n\t\tconst id = extractOwnerId(body.user);\n\t\tif (id !== undefined) {\n\t\t\treturn { data: { id, kind: \"user\" }, success: true };\n\t\t}\n\t}\n\n\tif (typeof body.group === \"string\") {\n\t\tconst id = extractOwnerId(body.group);\n\t\tif (id !== undefined) {\n\t\t\treturn { data: { id, kind: \"group\" }, success: true };\n\t\t}\n\t}\n\n\treturn { err: undefined, success: false };\n}\n","// The legacy `{gameId}` URL segment is in fact the universe ID; the public API\n// takes `universeId` and substitutes it into the path.\n\nimport type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tDeleteExperienceIconParameters,\n\tListExperienceIconsParameters,\n\tUploadExperienceIconParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload experience icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(universeId, languageCode)` pair.\n *\n * @param parameters - Universe 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: UploadExperienceIconParameters): HttpRequest {\n\tconst body = new FormData();\n\t// The legacy game-icon endpoint reads the upload from `request.files`.\n\tbody.append(\"request.files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/game-icon/games/${parameters.universeId}/language-codes/${parameters.languageCode}`,\n\t};\n}\n\n/**\n * Builds a `DELETE` request for the localized \"delete experience icon\"\n * endpoint. Removing the source-language icon is rejected server-side;\n * deleting the icon for a non-source language clears that translation.\n *\n * @param parameters - Universe and language identifiers of the icon to\n * delete.\n * @returns A pure {@link HttpRequest} describing the delete call.\n */\nexport function buildDeleteIconRequest(parameters: DeleteExperienceIconParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"DELETE\",\n\t\turl: `/legacy-game-internationalization/v1/game-icon/games/${parameters.universeId}/language-codes/${parameters.languageCode}`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the \"list experience icons\" endpoint. The\n * server returns one entry per locale that has an icon registered.\n *\n * @param parameters - Universe identifier whose icons to list.\n * @returns A pure {@link HttpRequest} describing the list call.\n */\nexport function buildListIconsRequest(parameters: ListExperienceIconsParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/legacy-game-internationalization/v1/game-icon/games/${parameters.universeId}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every game-icon Operation bound on\n * `UniversesClient.icon`. The legacy `gameinternationalization` service caps\n * each API key at 100 requests per minute *shared across the entire service*\n * (see the `x-roblox-rate-limits` extension on every operation in the\n * vendored Open Cloud spec), so all methods queue against the same operation\n * key.\n */\nexport const ICON_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"experience-icon\",\n});\n\n/**\n * Scopes required for every game-icon operation, sourced from\n * `x-roblox-scopes` on the legacy `gameinternationalization` icon\n * endpoints in the vendored OpenAPI schema.\n */\nexport const ICON_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-universe:manage\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { ExperienceIcon } from \"./types.ts\";\nimport type { GameIconListWire, GameIconState, GetGameIconResponseWire } from \"./wire.ts\";\n\n/**\n * Parses a successful icon-list response into a public array of\n * {@link ExperienceIcon} entries.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the converted icon list, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseIconListResponse(\n\tresponse: HttpResponse,\n): Result<ReadonlyArray<ExperienceIcon>, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isGameIconListWire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed icon list response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: body.data.map(toExperienceIcon),\n\t\tsuccess: true,\n\t};\n}\n\nfunction isGameIconState(value: unknown): value is GameIconState {\n\treturn (\n\t\tvalue === \"Approved\" ||\n\t\tvalue === \"Error\" ||\n\t\tvalue === \"PendingReview\" ||\n\t\tvalue === \"Rejected\" ||\n\t\tvalue === \"UnAvailable\"\n\t);\n}\n\nfunction isGetGameIconResponseWire(value: unknown): value is GetGameIconResponseWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttypeof value[\"imageId\"] === \"string\" &&\n\t\ttypeof value[\"imageUrl\"] === \"string\" &&\n\t\ttypeof value[\"languageCode\"] === \"string\" &&\n\t\tisGameIconState(value[\"state\"])\n\t);\n}\n\nfunction isGameIconListWire(body: unknown): body is GameIconListWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { data } = body;\n\tif (!Array.isArray(data)) {\n\t\treturn false;\n\t}\n\n\treturn data.every(isGetGameIconResponseWire);\n}\n\nfunction toExperienceIcon(wire: GetGameIconResponseWire): ExperienceIcon {\n\treturn {\n\t\timageId: wire.imageId,\n\t\timageUrl: wire.imageUrl,\n\t\tlanguageCode: wire.languageCode,\n\t\tstate: wire.state,\n\t};\n}\n","import { ValidationError } from \"../../../errors/validation.ts\";\nimport type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type {\n\tDeleteExperienceThumbnailParameters,\n\tReorderExperienceThumbnailsParameters,\n\tUploadExperienceThumbnailParameters,\n} from \"./types.ts\";\n\ntype ParsedIdsResult = Result<ReadonlyArray<number>, ValidationError>;\n\n/**\n * Builds a `POST` request for the localized \"upload experience thumbnail\"\n * endpoint. Each successful upload appends a new entry to the carousel.\n *\n * @param parameters - Universe and language identifiers plus the image\n * bytes to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadThumbnailRequest(\n\tparameters: UploadExperienceThumbnailParameters,\n): HttpRequest {\n\tconst body = new FormData();\n\t// The legacy game-thumbnails endpoint reads the upload from\n\t// `gameThumbnailRequest.files`, distinct from game-icon's `request.files`.\n\tbody.append(\"gameThumbnailRequest.files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\t// The `{gameId}` URL segment in this legacy path is in fact the\n\t\t// universe ID; the package surfaces only `universeId`.\n\t\turl: `/legacy-game-internationalization/v1/game-thumbnails/games/${parameters.universeId}/language-codes/${parameters.languageCode}/image`,\n\t};\n}\n\n/**\n * Builds a `DELETE` request for the \"delete experience thumbnail\" endpoint.\n *\n * @param parameters - Universe, language, and image identifiers of the\n * thumbnail to delete.\n * @returns A pure {@link HttpRequest} describing the delete call.\n */\nexport function buildDeleteThumbnailRequest(\n\tparameters: DeleteExperienceThumbnailParameters,\n): HttpRequest {\n\treturn {\n\t\tmethod: \"DELETE\",\n\t\turl: `/legacy-game-internationalization/v1/game-thumbnails/games/${parameters.universeId}/language-codes/${parameters.languageCode}/images/${parameters.imageId}`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the \"reorder experience thumbnails\" endpoint.\n * Validates each supplied image ID at the wire boundary so a typo cannot\n * silently serialize as JSON `null` and corrupt the request.\n *\n * @param parameters - Universe, language, and the desired display order.\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when `orderedImageIds` is empty or any ID is not\n * a positive integer within the safe-integer range.\n */\nexport function buildReorderThumbnailsRequest(\n\tparameters: ReorderExperienceThumbnailsParameters,\n): Result<HttpRequest, ValidationError> {\n\tconst { languageCode, orderedImageIds, universeId } = parameters;\n\n\tconst idsResult = parseOrderedImageIds(orderedImageIds);\n\tif (!idsResult.success) {\n\t\treturn idsResult;\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tbody: { mediaAssetIds: idsResult.data },\n\t\t\tmethod: \"POST\",\n\t\t\turl: `/legacy-game-internationalization/v1/game-thumbnails/games/${universeId}/language-codes/${languageCode}/images/order`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction parseImageId(value: string): number | undefined {\n\tif (!/^[1-9]\\d*$/.test(value)) {\n\t\treturn undefined;\n\t}\n\n\tconst parsed = Number(value);\n\tif (!Number.isSafeInteger(parsed)) {\n\t\treturn undefined;\n\t}\n\n\treturn parsed;\n}\n\nfunction appendParsedId(accumulator: ParsedIdsResult, id: string): ParsedIdsResult {\n\tif (!accumulator.success) {\n\t\treturn accumulator;\n\t}\n\n\tconst parsed = parseImageId(id);\n\tif (parsed === undefined) {\n\t\treturn {\n\t\t\terr: new ValidationError(\n\t\t\t\t`orderedImageIds entry ${JSON.stringify(id)} is not a positive integer ID`,\n\t\t\t\t{ code: \"invalid_image_id\" },\n\t\t\t),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn { data: [...accumulator.data, parsed], success: true };\n}\n\nfunction parseOrderedImageIds(orderedImageIds: ReadonlyArray<string>): ParsedIdsResult {\n\tif (orderedImageIds.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"orderedImageIds must contain at least one image ID\", {\n\t\t\t\tcode: \"empty_image_ids\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn orderedImageIds.reduce<ParsedIdsResult>(appendParsedId, { data: [], success: true });\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every game-thumbnails Operation bound on\n * `UniversesClient.thumbnails`. The legacy `gameinternationalization`\n * service caps each API key at 100 requests per minute *shared across the\n * entire service* (see the `x-roblox-rate-limits` extension on every\n * operation in the vendored Open Cloud spec), so all methods queue against\n * the same operation key.\n */\nexport const THUMBNAILS_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"experience-thumbnails\",\n});\n\n/**\n * Scopes required for every game-thumbnails operation, sourced from\n * `x-roblox-scopes` on the legacy `gameinternationalization` thumbnail\n * endpoints in the vendored OpenAPI schema.\n */\nexport const THUMBNAILS_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-universe:manage\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { UploadedExperienceThumbnail } from \"./types.ts\";\nimport type { GameThumbnailUploadWire } from \"./wire.ts\";\n\n/**\n * Parses a successful thumbnail-upload response into the public\n * {@link UploadedExperienceThumbnail} shape, returning a {@link Result}\n * so callers can handle malformed payloads without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the converted upload, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseThumbnailUploadResponse(\n\tresponse: HttpResponse,\n): Result<UploadedExperienceThumbnail, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isGameThumbnailUploadWire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed thumbnail upload response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: { mediaAssetId: body.mediaAssetId },\n\t\tsuccess: true,\n\t};\n}\n\nfunction isGameThumbnailUploadWire(body: unknown): body is GameThumbnailUploadWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\treturn typeof body[\"mediaAssetId\"] === \"string\";\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { buildGetRequest, buildUpdateRequest } from \"../../domains/cloud-v2/universes/builders.ts\";\nimport {\n\tGET_OPERATION_LIMIT,\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/cloud-v2/universes/operations.ts\";\nimport { parseUniverseResponse } from \"../../domains/cloud-v2/universes/parsers.ts\";\nimport type {\n\tGetUniverseParameters,\n\tUniverse,\n\tUpdateUniverseParameters,\n} from \"../../domains/cloud-v2/universes/types.ts\";\nimport {\n\tbuildDeleteIconRequest,\n\tbuildListIconsRequest,\n\tbuildUploadIconRequest,\n} from \"../../domains/game-internationalization/game-icon/builders.ts\";\nimport {\n\tICON_OPERATION_LIMIT,\n\tICON_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/game-icon/operations.ts\";\nimport { parseIconListResponse } from \"../../domains/game-internationalization/game-icon/parsers.ts\";\nimport type {\n\tDeleteExperienceIconParameters,\n\tExperienceIcon,\n\tListExperienceIconsParameters,\n\tUploadExperienceIconParameters,\n} from \"../../domains/game-internationalization/game-icon/types.ts\";\nimport {\n\tbuildDeleteThumbnailRequest,\n\tbuildReorderThumbnailsRequest,\n\tbuildUploadThumbnailRequest,\n} from \"../../domains/game-internationalization/game-thumbnails/builders.ts\";\nimport {\n\tTHUMBNAILS_OPERATION_LIMIT,\n\tTHUMBNAILS_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/game-thumbnails/operations.ts\";\nimport { parseThumbnailUploadResponse } from \"../../domains/game-internationalization/game-thumbnails/parsers.ts\";\nimport type {\n\tDeleteExperienceThumbnailParameters,\n\tReorderExperienceThumbnailsParameters,\n\tUploadedExperienceThumbnail,\n\tUploadExperienceThumbnailParameters,\n} from \"../../domains/game-internationalization/game-thumbnails/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport type { HttpRequest } from \"../../internal/http/types.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nconst GET_SPEC: ResourceMethodSpec<GetUniverseParameters, Universe> = Object.freeze({\n\tbuildRequest: buildGetRequest,\n\tmethodDefaults: {},\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseUniverseResponse,\n});\n\nconst UPDATE_SPEC: ResourceMethodSpec<UpdateUniverseParameters, Universe> = Object.freeze({\n\tbuildRequest: buildUpdateRequest,\n\tmethodDefaults: {},\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseUniverseResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\nfunction buildIconUploadOkRequest(\n\tparameters: UploadExperienceIconParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildUploadIconRequest(parameters));\n}\n\nfunction buildIconDeleteOkRequest(\n\tparameters: DeleteExperienceIconParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildDeleteIconRequest(parameters));\n}\n\nfunction buildIconListOkRequest(\n\tparameters: ListExperienceIconsParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildListIconsRequest(parameters));\n}\n\nconst ICON_UPLOAD_SPEC: ResourceMethodSpec<UploadExperienceIconParameters, undefined> =\n\tObject.freeze({\n\t\tbuildRequest: buildIconUploadOkRequest,\n\t\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\t\tmethodKind: \"create\",\n\t\toperationLimit: ICON_OPERATION_LIMIT,\n\t\tparse: parseEmptyResponse,\n\t\trequiredScopes: ICON_REQUIRED_SCOPES,\n\t});\n\nconst ICON_DELETE_SPEC: ResourceMethodSpec<DeleteExperienceIconParameters, undefined> =\n\tObject.freeze({\n\t\tbuildRequest: buildIconDeleteOkRequest,\n\t\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\t\tmethodKind: \"idempotent\",\n\t\toperationLimit: ICON_OPERATION_LIMIT,\n\t\tparse: parseEmptyResponse,\n\t\trequiredScopes: ICON_REQUIRED_SCOPES,\n\t});\n\nconst ICON_LIST_SPEC: ResourceMethodSpec<\n\tListExperienceIconsParameters,\n\tReadonlyArray<ExperienceIcon>\n> = Object.freeze({\n\tbuildRequest: buildIconListOkRequest,\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: ICON_OPERATION_LIMIT,\n\tparse: parseIconListResponse,\n\trequiredScopes: ICON_REQUIRED_SCOPES,\n});\n\nfunction buildThumbnailUploadOkRequest(\n\tparameters: UploadExperienceThumbnailParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildUploadThumbnailRequest(parameters));\n}\n\nfunction buildThumbnailDeleteOkRequest(\n\tparameters: DeleteExperienceThumbnailParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildDeleteThumbnailRequest(parameters));\n}\n\nconst THUMBNAIL_UPLOAD_SPEC: ResourceMethodSpec<\n\tUploadExperienceThumbnailParameters,\n\tUploadedExperienceThumbnail\n> = Object.freeze({\n\tbuildRequest: buildThumbnailUploadOkRequest,\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: THUMBNAILS_OPERATION_LIMIT,\n\tparse: parseThumbnailUploadResponse,\n\trequiredScopes: THUMBNAILS_REQUIRED_SCOPES,\n});\n\nconst THUMBNAIL_DELETE_SPEC: ResourceMethodSpec<DeleteExperienceThumbnailParameters, undefined> =\n\tObject.freeze({\n\t\tbuildRequest: buildThumbnailDeleteOkRequest,\n\t\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\t\tmethodKind: \"idempotent\",\n\t\toperationLimit: THUMBNAILS_OPERATION_LIMIT,\n\t\tparse: parseEmptyResponse,\n\t\trequiredScopes: THUMBNAILS_REQUIRED_SCOPES,\n\t});\n\nconst THUMBNAIL_REORDER_SPEC: ResourceMethodSpec<ReorderExperienceThumbnailsParameters, undefined> =\n\tObject.freeze({\n\t\tbuildRequest: buildReorderThumbnailsRequest,\n\t\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\t\tmethodKind: \"idempotent\",\n\t\toperationLimit: THUMBNAILS_OPERATION_LIMIT,\n\t\tparse: parseEmptyResponse,\n\t\trequiredScopes: THUMBNAILS_REQUIRED_SCOPES,\n\t});\n\ninterface UniverseIconHandle {\n\t/**\n\t * Deletes the localized icon registered against a universe for a given\n\t * language. Removing the source-language icon is rejected server-side;\n\t * consumers must replace it via {@link UniverseIconHandle.upload}\n\t * instead.\n\t *\n\t * @param parameters - Universe and language identifiers of the icon to\n\t * delete.\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\tdelete: (\n\t\tparameters: DeleteExperienceIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Lists every localized icon registered against an experience. The\n\t * server returns one entry per locale that has an icon registered.\n\t *\n\t * @param parameters - Universe identifier whose icons to list.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed array of\n\t * {@link ExperienceIcon} entries or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tlist: (\n\t\tparameters: ListExperienceIconsParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<ReadonlyArray<ExperienceIcon>, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the localized icon for an experience. A\n\t * subsequent upload for the same `(universeId, languageCode)` pair\n\t * replaces the existing icon for that locale.\n\t *\n\t * @param parameters - Universe and language identifiers plus the image\n\t * bytes to upload.\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 success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupload: (\n\t\tparameters: UploadExperienceIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\ninterface UniverseThumbnailsHandle {\n\t/**\n\t * Deletes a single thumbnail by media asset ID. Idempotent: deleting an\n\t * already-removed thumbnail surfaces the server's 404 unchanged.\n\t *\n\t * @param parameters - Universe, language, and image identifiers of the\n\t * thumbnail to delete.\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\tdelete: (\n\t\tparameters: DeleteExperienceThumbnailParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Reorders the localized thumbnail carousel. The supplied\n\t * `orderedImageIds` describes the desired display order from first to\n\t * last. Image IDs must be positive integers within the safe-integer\n\t * range; invalid input is rejected with a {@link OpenCloudError} of\n\t * kind `ValidationError` before any HTTP round-trip.\n\t *\n\t * @param parameters - Universe, language, and the desired display order.\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\treorder: (\n\t\tparameters: ReorderExperienceThumbnailsParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads a new thumbnail and appends it to the localized carousel. Use\n\t * {@link UniverseThumbnailsHandle.reorder} after multiple uploads to\n\t * set the display order.\n\t *\n\t * @param parameters - Universe and language identifiers plus the image\n\t * bytes to upload.\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\n\t * {@link UploadedExperienceThumbnail} or the {@link OpenCloudError}\n\t * that caused the request to fail.\n\t */\n\tupload: (\n\t\tparameters: UploadExperienceThumbnailParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<UploadedExperienceThumbnail, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud `Universe` resource. Wires\n * the request builders, the injected\n * {@link OpenCloudClientOptions.httpClient}, and the response parser\n * into a single ergonomic surface. Every method returns a\n * {@link Result} so callers handle failure explicitly; no thrown\n * {@link OpenCloudError} ever escapes the client.\n *\n * Partial updates use a Google-style `updateMask` query string derived\n * from the keys present on the update parameters. Setting a clearable\n * field (`privateServerPriceRobux` or any social link) to `undefined`\n * sends JSON `null` for that field so the server clears the\n * corresponding value.\n *\n * Localized experience-icon and experience-thumbnail Operations are\n * bound on the {@link UniversesClient.icon} and\n * {@link UniversesClient.thumbnails} Operation Groups so callers reach\n * for one client per universe.\n *\n * @example\n *\n * ```ts\n * import { UniversesClient } from \"@bedrock-rbx/ocale/universes\";\n *\n * const client = new UniversesClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(UniversesClient);\n * ```\n */\nexport class UniversesClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing the localized experience-icon\n\t * Operations (`upload`, `delete`, `list`) backed by the\n\t * `legacy-game-internationalization` domain. Shares the parent\n\t * client's HTTP, rate-limit, and retry plumbing.\n\t */\n\tpublic readonly icon: UniverseIconHandle;\n\t/**\n\t * Operation Group exposing the localized experience-thumbnail\n\t * Operations (`upload`, `delete`, `reorder`) backed by the\n\t * `legacy-game-internationalization` domain. No list-thumbnails\n\t * endpoint is bridged; consumers must track uploaded\n\t * `mediaAssetId`s in their own state store to reconcile against\n\t * the existing carousel. Shares the parent client's HTTP,\n\t * rate-limit, and retry plumbing.\n\t */\n\tpublic readonly thumbnails: UniverseThumbnailsHandle;\n\n\t/**\n\t * Creates a new {@link UniversesClient}. Configuration is frozen\n\t * on construction; per-request overrides are accepted on each\n\t * 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.icon = createIconHandle(this.#inner);\n\t\tthis.thumbnails = createThumbnailsHandle(this.#inner);\n\t}\n\n\t/**\n\t * Fetches the current configuration of a universe.\n\t *\n\t * @param parameters - The universe identifier.\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 Universe}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetUniverseParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Universe, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Partially updates a universe's configuration. The fields\n\t * supplied on `parameters` (excluding `universeId`) are forwarded\n\t * to the server via a Google-style `updateMask`; unmentioned\n\t * fields are left untouched.\n\t *\n\t * @param parameters - The universe identifier and the fields to\n\t * update. At least one updatable field must be supplied.\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 Universe}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateUniverseParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Universe, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createIconHandle(inner: ResourceClient): UniverseIconHandle {\n\treturn {\n\t\tasync delete(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: ICON_DELETE_SPEC });\n\t\t},\n\t\tasync list(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: ICON_LIST_SPEC });\n\t\t},\n\t\tasync upload(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: ICON_UPLOAD_SPEC });\n\t\t},\n\t};\n}\n\nfunction createThumbnailsHandle(inner: ResourceClient): UniverseThumbnailsHandle {\n\treturn {\n\t\tasync delete(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: THUMBNAIL_DELETE_SPEC });\n\t\t},\n\t\tasync reorder(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: THUMBNAIL_REORDER_SPEC });\n\t\t},\n\t\tasync upload(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: THUMBNAIL_UPLOAD_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,gBAAgB,KAAK,MAAM,OAAO;;;;;;;AAQxC,SAAgB,gBACf,YACsC;AACtC,QAAO,UAAU;EAChB,QAAQ;EACR,KAAK,uBAAuB,WAAW;EACvC,CAAC;;;;;;;;;;;;;AAcH,SAAgB,mBACf,YACuC;CACvC,MAAM,YAAY,uBAAuB,WAAW;AAEpD,KAAI,UAAU,WAAW,EACxB,QAAO;EACN,KAAK,IAAI,gBAAgB,0CAA0C,EAClE,MAAM,gBACN,CAAC;EACF,SAAS;EACT;CAGF,MAAM,OAAgC,EAAE;AACxC,MAAK,MAAM,OAAO,UACjB,MAAK,OAAO,aAAa,YAAY,IAAI;CAG1C,MAAM,aAAa,UAAU,KAAK,IAAI;AACtC,QAAO;EACN,MAAM;GACL;GACA,SAAS,EAAE,gBAAgB,oBAAoB;GAC/C,QAAQ;GACR,KAAK,uBAAuB,WAAW,WAAW,cAAc;GAChE;EACD,SAAS;EACT;;AAGF,SAAS,uBAAuB,YAA6D;AAC5F,QAAO,OAAO,KAAK,WAAW,CAAC,QAAQ,QAAQ,QAAQ,aAAa;;AAGrE,SAAS,aAAa,YAAsC,KAAsB;CACjF,MAAM,QAAQ,QAAQ,IAAI,YAAY,IAAI;AAC1C,QAAO,UAAU,KAAA,IAAY,gBAAgB;;;;AC5E9C,MAAM,aAAa;AACnB,MAAM,qBAAqB;;;;;AAM3B,MAAa,sBAAsC,OAAO,OAAO;CAChE,cAAc,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AAa,CAAC;;;AAIxE,SAAS,iBAAiB,OAA2C;AACpE,QAAO;EACN,MAAM,OAAO,YAAY,SAAS;AACjC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE,MAAM,KAAK,YAAY,SAAS;AAC/B,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAgB,CAAC;;EAEpE,MAAM,OAAO,YAAY,SAAS;AACjC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE;;AAGF,SAAS,uBAAuB,OAAiD;AAChF,QAAO;EACN,MAAM,OAAO,YAAY,SAAS;AACjC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAuB,CAAC;;EAE3E,MAAM,QAAQ,YAAY,SAAS;AAClC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAwB,CAAC;;EAE5E,MAAM,OAAO,YAAY,SAAS;AACjC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAuB,CAAC;;EAE3E"}
|
|
1
|
+
{"version":3,"file":"universes.mjs","names":["#inner"],"sources":["../src/domains/cloud-v2/universes/builders.ts","../src/domains/cloud-v2/universes/operations.ts","../src/domains/cloud-v2/universes/parsers.ts","../src/domains/game-internationalization/game-icon/builders.ts","../src/domains/game-internationalization/game-icon/operations.ts","../src/domains/game-internationalization/game-icon/parsers.ts","../src/domains/game-internationalization/game-thumbnails/builders.ts","../src/domains/game-internationalization/game-thumbnails/operations.ts","../src/domains/game-internationalization/game-thumbnails/parsers.ts","../src/resources/universes/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../client/types.ts\";\nimport type { OpenCloudError } from \"../../../errors/base.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport { okRequest } from \"../../../internal/resource-client.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { GetUniverseParameters, UpdateUniverseParameters } from \"./types.ts\";\n\n/**\n * Dodges `unicorn/no-null` while still emitting a literal `null` onto\n * the wire, which the Open Cloud `Cloud_UpdateUniverse` endpoint\n * requires to clear a nullable field (for example disabling private\n * servers or removing a social link).\n */\nconst NULL_SENTINEL = JSON.parse(\"null\");\n\n/**\n * Builds a `GET` request for the Open Cloud \"get universe\" endpoint.\n *\n * @param parameters - The universe identifier.\n * @returns A success result wrapping the request; the builder cannot fail.\n */\nexport function buildGetRequest(\n\tparameters: GetUniverseParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest({\n\t\tmethod: \"GET\",\n\t\turl: `/cloud/v2/universes/${parameters.universeId}`,\n\t});\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update universe\"\n * endpoint. Derives the `updateMask` query string from the keys\n * present on `parameters` and emits a JSON body containing those same\n * fields, translating `undefined` values to JSON `null` so Roblox\n * clears the corresponding server-side value.\n *\n * @param parameters - The universe identifier plus the fields to update.\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when no updatable fields were supplied.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateUniverseParameters,\n): Result<HttpRequest, ValidationError> {\n\tconst fieldKeys = extractUpdateFieldKeys(parameters);\n\n\tif (fieldKeys.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Update must include at least one field\", {\n\t\t\t\tcode: \"empty_update\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst body: Record<string, unknown> = {};\n\tfor (const key of fieldKeys) {\n\t\tbody[key] = bodyValueFor(parameters, key);\n\t}\n\n\tconst updateMask = fieldKeys.join(\",\");\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": \"application/json\" },\n\t\t\tmethod: \"PATCH\",\n\t\t\turl: `/cloud/v2/universes/${parameters.universeId}?updateMask=${updateMask}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction extractUpdateFieldKeys(parameters: UpdateUniverseParameters): ReadonlyArray<string> {\n\treturn Object.keys(parameters).filter((key) => key !== \"universeId\");\n}\n\nfunction bodyValueFor(parameters: UpdateUniverseParameters, key: string): unknown {\n\tconst value = Reflect.get(parameters, key);\n\treturn value === undefined ? NULL_SENTINEL : value;\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst PER_MINUTE = 100;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for reading a universe, from the Open\n * Cloud OpenAPI schema (100 requests per minute per API key owner).\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"universes.get\",\n});\n\n/**\n * Per-second request ceiling for updating a universe, from the Open\n * Cloud OpenAPI schema (100 requests per minute per API key owner).\n * Keyed independently from {@link GET_OPERATION_LIMIT} so reads and\n * updates do not share a queue; upstream quota accounting is not\n * documented as shared and the conservative default is fewer\n * cross-method contention surprises.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"universes.update\",\n});\n\n/**\n * Scopes required to update a universe, sourced from `x-roblox-scopes`\n * on the `Cloud_UpdateUniverse` operation in the vendored OpenAPI schema.\n * `Cloud_GetUniverse` declares no scope, so the GET method intentionally\n * does not declare `requiredScopes` and a 401/403 there surfaces as a\n * generic ApiError.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"universe:write\"]);\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 {\n\tSocialLink,\n\tUniverse,\n\tUniverseAgeRating,\n\tUniverseOwner,\n\tUniverseVisibility,\n} from \"./types.ts\";\nimport type { AgeRatingWire, SocialLinkWire, UniverseWire, VisibilityWire } from \"./wire.ts\";\n\nconst VISIBILITY_MAP: Readonly<Record<VisibilityWire, UniverseVisibility>> = {\n\tPRIVATE: \"private\",\n\tPUBLIC: \"public\",\n\tVISIBILITY_UNSPECIFIED: \"unspecified\",\n};\n\nconst AGE_RATING_MAP: Readonly<Record<AgeRatingWire, UniverseAgeRating>> = {\n\tAGE_RATING_9_PLUS: \"9Plus\",\n\tAGE_RATING_13_PLUS: \"13Plus\",\n\tAGE_RATING_17_PLUS: \"17Plus\",\n\tAGE_RATING_ALL: \"all\",\n\tAGE_RATING_UNSPECIFIED: \"unspecified\",\n};\n\nconst MALFORMED_MESSAGE = \"Malformed universe response\";\n\nconst UNIVERSE_PATH_PATTERN = /^universes\\/(\\d+)$/;\n\nconst ROOT_PLACE_PATH_PATTERN = /\\/places\\/(\\d+)$/;\n\nconst OWNER_PATH_PATTERN = /^(?:users|groups)\\/(\\d+)$/;\n\ninterface ToUniverseArgs {\n\treadonly id: string;\n\treadonly body: UniverseWire;\n\treadonly owner: UniverseOwner;\n}\n\n/**\n * Parses a successful Open Cloud `Universe` response body into the\n * public {@link Universe} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link Universe}, or\n * an {@link ApiError} when the body does not match the wire schema.\n */\nexport function parseUniverseResponse(response: HttpResponse): Result<Universe, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isUniverseWire(body)) {\n\t\treturn malformed(statusCode, body);\n\t}\n\n\tconst ownerResult = resolveOwner(body);\n\tif (!ownerResult.success) {\n\t\treturn malformed(statusCode, body);\n\t}\n\n\tconst idMatch = UNIVERSE_PATH_PATTERN.exec(body.path);\n\tconst id = idMatch?.[1];\n\tif (id === undefined) {\n\t\treturn malformed(statusCode, body);\n\t}\n\n\treturn { data: toUniverse({ id, body, owner: ownerResult.data }), success: true };\n}\n\nfunction malformed(statusCode: number, body: unknown): Result<Universe, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_MESSAGE, {\n\t\t\tdetails: body as JSONValue | undefined,\n\t\t\tstatusCode,\n\t\t}),\n\t\tsuccess: false,\n\t};\n}\n\nfunction extractRootPlaceId(rootPlace: string | undefined): string | undefined {\n\tif (rootPlace === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst match = ROOT_PLACE_PATH_PATTERN.exec(rootPlace);\n\treturn match?.[1];\n}\n\nfunction toSocialLink(wire: SocialLinkWire | undefined): SocialLink | undefined {\n\tif (wire === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn { title: wire.title, uri: wire.uri };\n}\n\nfunction toUniverse(args: ToUniverseArgs): Universe {\n\tconst { id, body, owner } = args;\n\treturn {\n\t\tid,\n\t\tageRating: AGE_RATING_MAP[body.ageRating],\n\t\tconsoleEnabled: body.consoleEnabled ?? false,\n\t\tcreatedAt: new Date(body.createTime),\n\t\tdescription: body.description,\n\t\tdesktopEnabled: body.desktopEnabled ?? false,\n\t\tdiscordSocialLink: toSocialLink(body.discordSocialLink),\n\t\tdisplayName: body.displayName,\n\t\tfacebookSocialLink: toSocialLink(body.facebookSocialLink),\n\t\tguildedSocialLink: toSocialLink(body.guildedSocialLink),\n\t\tmobileEnabled: body.mobileEnabled ?? false,\n\t\towner,\n\t\tprivateServerPriceRobux: body.privateServerPriceRobux ?? undefined,\n\t\trobloxGroupSocialLink: toSocialLink(body.robloxGroupSocialLink),\n\t\trootPlaceId: extractRootPlaceId(body.rootPlace),\n\t\ttabletEnabled: body.tabletEnabled ?? false,\n\t\ttwitchSocialLink: toSocialLink(body.twitchSocialLink),\n\t\ttwitterSocialLink: toSocialLink(body.twitterSocialLink),\n\t\tupdatedAt: new Date(body.updateTime),\n\t\tvisibility: VISIBILITY_MAP[body.visibility],\n\t\tvoiceChatEnabled: body.voiceChatEnabled ?? false,\n\t\tvrEnabled: body.vrEnabled ?? false,\n\t\tyoutubeSocialLink: toSocialLink(body.youtubeSocialLink),\n\t};\n}\n\nfunction isVisibilityWire(value: unknown): value is VisibilityWire {\n\treturn value === \"PRIVATE\" || value === \"PUBLIC\" || value === \"VISIBILITY_UNSPECIFIED\";\n}\n\nfunction isAgeRatingWire(value: unknown): value is AgeRatingWire {\n\treturn (\n\t\tvalue === \"AGE_RATING_13_PLUS\" ||\n\t\tvalue === \"AGE_RATING_17_PLUS\" ||\n\t\tvalue === \"AGE_RATING_9_PLUS\" ||\n\t\tvalue === \"AGE_RATING_ALL\" ||\n\t\tvalue === \"AGE_RATING_UNSPECIFIED\"\n\t);\n}\n\nfunction hasValidRequiredFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"path\"] === \"string\" &&\n\t\tisDateTimeString(body[\"createTime\"]) &&\n\t\tisDateTimeString(body[\"updateTime\"]) &&\n\t\ttypeof body[\"displayName\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\tisVisibilityWire(body[\"visibility\"]) &&\n\t\tisAgeRatingWire(body[\"ageRating\"])\n\t);\n}\n\nfunction isSocialLinkWire(value: unknown): value is SocialLinkWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn typeof value[\"title\"] === \"string\" && typeof value[\"uri\"] === \"string\";\n}\n\nfunction isOptionalSocialLink(value: unknown): boolean {\n\treturn value === undefined || value === null || isSocialLinkWire(value);\n}\n\nfunction isOptionalBoolean(value: unknown): boolean {\n\treturn value === undefined || value === null || typeof value === \"boolean\";\n}\n\nfunction hasValidOptionalFields(body: Record<string, unknown>): boolean {\n\tconst priceField = body[\"privateServerPriceRobux\"] ?? undefined;\n\tif (priceField !== undefined && typeof priceField !== \"number\") {\n\t\treturn false;\n\t}\n\n\tconst rootPlace = body[\"rootPlace\"] ?? undefined;\n\tif (rootPlace !== undefined && typeof rootPlace !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\tisOptionalBoolean(body[\"voiceChatEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"desktopEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"mobileEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"tabletEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"consoleEnabled\"]) &&\n\t\tisOptionalBoolean(body[\"vrEnabled\"]) &&\n\t\tisOptionalSocialLink(body[\"facebookSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"twitterSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"youtubeSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"twitchSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"discordSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"robloxGroupSocialLink\"]) &&\n\t\tisOptionalSocialLink(body[\"guildedSocialLink\"])\n\t);\n}\n\nfunction isUniverseWire(body: unknown): body is UniverseWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\treturn hasValidRequiredFields(body) && hasValidOptionalFields(body);\n}\n\nfunction extractOwnerId(resourcePath: string): string | undefined {\n\tconst match = OWNER_PATH_PATTERN.exec(resourcePath);\n\treturn match?.[1];\n}\n\nfunction resolveOwner(body: UniverseWire): Result<UniverseOwner, undefined> {\n\tif (typeof body.user === \"string\") {\n\t\tconst id = extractOwnerId(body.user);\n\t\tif (id !== undefined) {\n\t\t\treturn { data: { id, kind: \"user\" }, success: true };\n\t\t}\n\t}\n\n\tif (typeof body.group === \"string\") {\n\t\tconst id = extractOwnerId(body.group);\n\t\tif (id !== undefined) {\n\t\t\treturn { data: { id, kind: \"group\" }, success: true };\n\t\t}\n\t}\n\n\treturn { err: undefined, success: false };\n}\n","// The legacy `{gameId}` URL segment is in fact the universe ID; the public API\n// takes `universeId` and substitutes it into the path.\n\nimport type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tDeleteExperienceIconParameters,\n\tListExperienceIconsParameters,\n\tUploadExperienceIconParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload experience icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(universeId, languageCode)` pair.\n *\n * @param parameters - Universe 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: UploadExperienceIconParameters): HttpRequest {\n\tconst body = new FormData();\n\t// The legacy game-icon endpoint reads the upload from `request.files`.\n\tbody.append(\"request.files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/game-icon/games/${parameters.universeId}/language-codes/${parameters.languageCode}`,\n\t};\n}\n\n/**\n * Builds a `DELETE` request for the localized \"delete experience icon\"\n * endpoint. Removing the source-language icon is rejected server-side;\n * deleting the icon for a non-source language clears that translation.\n *\n * @param parameters - Universe and language identifiers of the icon to\n * delete.\n * @returns A pure {@link HttpRequest} describing the delete call.\n */\nexport function buildDeleteIconRequest(parameters: DeleteExperienceIconParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"DELETE\",\n\t\turl: `/legacy-game-internationalization/v1/game-icon/games/${parameters.universeId}/language-codes/${parameters.languageCode}`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the \"list experience icons\" endpoint. The\n * server returns one entry per locale that has an icon registered.\n *\n * @param parameters - Universe identifier whose icons to list.\n * @returns A pure {@link HttpRequest} describing the list call.\n */\nexport function buildListIconsRequest(parameters: ListExperienceIconsParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/legacy-game-internationalization/v1/game-icon/games/${parameters.universeId}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every game-icon Operation bound on\n * `UniversesClient.icon`. The legacy `gameinternationalization` service caps\n * each API key at 100 requests per minute *shared across the entire service*\n * (see the `x-roblox-rate-limits` extension on every operation in the\n * vendored Open Cloud spec), so all methods queue against the same operation\n * key.\n */\nexport const ICON_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"experience-icon\",\n});\n\n/**\n * Scopes required for every game-icon operation, sourced from\n * `x-roblox-scopes` on the legacy `gameinternationalization` icon\n * endpoints in the vendored OpenAPI schema.\n */\nexport const ICON_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-universe:manage\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { ExperienceIcon } from \"./types.ts\";\nimport type { GameIconListWire, GameIconState, GetGameIconResponseWire } from \"./wire.ts\";\n\n/**\n * Parses a successful icon-list response into a public array of\n * {@link ExperienceIcon} entries.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the converted icon list, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseIconListResponse(\n\tresponse: HttpResponse,\n): Result<ReadonlyArray<ExperienceIcon>, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isGameIconListWire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed icon list response\", {\n\t\t\t\tdetails: body as JSONValue | undefined,\n\t\t\t\tstatusCode,\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: body.data.map(toExperienceIcon),\n\t\tsuccess: true,\n\t};\n}\n\nfunction isGameIconState(value: unknown): value is GameIconState {\n\treturn (\n\t\tvalue === \"Approved\" ||\n\t\tvalue === \"Error\" ||\n\t\tvalue === \"PendingReview\" ||\n\t\tvalue === \"Rejected\" ||\n\t\tvalue === \"UnAvailable\"\n\t);\n}\n\nfunction isGetGameIconResponseWire(value: unknown): value is GetGameIconResponseWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttypeof value[\"imageId\"] === \"string\" &&\n\t\ttypeof value[\"imageUrl\"] === \"string\" &&\n\t\ttypeof value[\"languageCode\"] === \"string\" &&\n\t\tisGameIconState(value[\"state\"])\n\t);\n}\n\nfunction isGameIconListWire(body: unknown): body is GameIconListWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { data } = body;\n\tif (!Array.isArray(data)) {\n\t\treturn false;\n\t}\n\n\treturn data.every(isGetGameIconResponseWire);\n}\n\nfunction toExperienceIcon(wire: GetGameIconResponseWire): ExperienceIcon {\n\treturn {\n\t\timageId: wire.imageId,\n\t\timageUrl: wire.imageUrl,\n\t\tlanguageCode: wire.languageCode,\n\t\tstate: wire.state,\n\t};\n}\n","import { ValidationError } from \"../../../errors/validation.ts\";\nimport type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type {\n\tDeleteExperienceThumbnailParameters,\n\tReorderExperienceThumbnailsParameters,\n\tUploadExperienceThumbnailParameters,\n} from \"./types.ts\";\n\ntype ParsedIdsResult = Result<ReadonlyArray<number>, ValidationError>;\n\nconst POSITIVE_INTEGER_PATTERN = /^[1-9]\\d*$/;\n\n/**\n * Builds a `POST` request for the localized \"upload experience thumbnail\"\n * endpoint. Each successful upload appends a new entry to the carousel.\n *\n * @param parameters - Universe and language identifiers plus the image\n * bytes to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadThumbnailRequest(\n\tparameters: UploadExperienceThumbnailParameters,\n): HttpRequest {\n\tconst body = new FormData();\n\t// The legacy game-thumbnails endpoint reads the upload from\n\t// `gameThumbnailRequest.files`, distinct from game-icon's `request.files`.\n\tbody.append(\"gameThumbnailRequest.files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\t// The `{gameId}` URL segment in this legacy path is in fact the\n\t\t// universe ID; the package surfaces only `universeId`.\n\t\turl: `/legacy-game-internationalization/v1/game-thumbnails/games/${parameters.universeId}/language-codes/${parameters.languageCode}/image`,\n\t};\n}\n\n/**\n * Builds a `DELETE` request for the \"delete experience thumbnail\" endpoint.\n *\n * @param parameters - Universe, language, and image identifiers of the\n * thumbnail to delete.\n * @returns A pure {@link HttpRequest} describing the delete call.\n */\nexport function buildDeleteThumbnailRequest(\n\tparameters: DeleteExperienceThumbnailParameters,\n): HttpRequest {\n\treturn {\n\t\tmethod: \"DELETE\",\n\t\turl: `/legacy-game-internationalization/v1/game-thumbnails/games/${parameters.universeId}/language-codes/${parameters.languageCode}/images/${parameters.imageId}`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the \"reorder experience thumbnails\" endpoint.\n * Validates each supplied image ID at the wire boundary so a typo cannot\n * silently serialize as JSON `null` and corrupt the request.\n *\n * @param parameters - Universe, language, and the desired display order.\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when `orderedImageIds` is empty or any ID is not\n * a positive integer within the safe-integer range.\n */\nexport function buildReorderThumbnailsRequest(\n\tparameters: ReorderExperienceThumbnailsParameters,\n): Result<HttpRequest, ValidationError> {\n\tconst { languageCode, orderedImageIds, universeId } = parameters;\n\n\tconst idsResult = parseOrderedImageIds(orderedImageIds);\n\tif (!idsResult.success) {\n\t\treturn idsResult;\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tbody: { mediaAssetIds: idsResult.data },\n\t\t\tmethod: \"POST\",\n\t\t\turl: `/legacy-game-internationalization/v1/game-thumbnails/games/${universeId}/language-codes/${languageCode}/images/order`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction parseImageId(value: string): number | undefined {\n\tif (!POSITIVE_INTEGER_PATTERN.test(value)) {\n\t\treturn undefined;\n\t}\n\n\tconst parsed = Number(value);\n\tif (!Number.isSafeInteger(parsed)) {\n\t\treturn undefined;\n\t}\n\n\treturn parsed;\n}\n\nfunction appendParsedId(accumulator: ParsedIdsResult, id: string): ParsedIdsResult {\n\tif (!accumulator.success) {\n\t\treturn accumulator;\n\t}\n\n\tconst parsed = parseImageId(id);\n\tif (parsed === undefined) {\n\t\treturn {\n\t\t\terr: new ValidationError(\n\t\t\t\t`orderedImageIds entry ${JSON.stringify(id)} is not a positive integer ID`,\n\t\t\t\t{ code: \"invalid_image_id\" },\n\t\t\t),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn { data: [...accumulator.data, parsed], success: true };\n}\n\nfunction parseOrderedImageIds(orderedImageIds: ReadonlyArray<string>): ParsedIdsResult {\n\tif (orderedImageIds.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"orderedImageIds must contain at least one image ID\", {\n\t\t\t\tcode: \"empty_image_ids\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn orderedImageIds.reduce<ParsedIdsResult>(appendParsedId, { data: [], success: true });\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every game-thumbnails Operation bound on\n * `UniversesClient.thumbnails`. The legacy `gameinternationalization`\n * service caps each API key at 100 requests per minute *shared across the\n * entire service* (see the `x-roblox-rate-limits` extension on every\n * operation in the vendored Open Cloud spec), so all methods queue against\n * the same operation key.\n */\nexport const THUMBNAILS_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"experience-thumbnails\",\n});\n\n/**\n * Scopes required for every game-thumbnails operation, sourced from\n * `x-roblox-scopes` on the legacy `gameinternationalization` thumbnail\n * endpoints in the vendored OpenAPI schema.\n */\nexport const THUMBNAILS_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-universe:manage\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { UploadedExperienceThumbnail } from \"./types.ts\";\nimport type { GameThumbnailUploadWire } from \"./wire.ts\";\n\n/**\n * Parses a successful thumbnail-upload response into the public\n * {@link UploadedExperienceThumbnail} shape, returning a {@link Result}\n * so callers can handle malformed payloads without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the converted upload, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseThumbnailUploadResponse(\n\tresponse: HttpResponse,\n): Result<UploadedExperienceThumbnail, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isGameThumbnailUploadWire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed thumbnail upload response\", {\n\t\t\t\tdetails: body as JSONValue | undefined,\n\t\t\t\tstatusCode,\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: { mediaAssetId: body.mediaAssetId },\n\t\tsuccess: true,\n\t};\n}\n\nfunction isGameThumbnailUploadWire(body: unknown): body is GameThumbnailUploadWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\treturn typeof body[\"mediaAssetId\"] === \"string\";\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { buildGetRequest, buildUpdateRequest } from \"../../domains/cloud-v2/universes/builders.ts\";\nimport {\n\tGET_OPERATION_LIMIT,\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/cloud-v2/universes/operations.ts\";\nimport { parseUniverseResponse } from \"../../domains/cloud-v2/universes/parsers.ts\";\nimport type {\n\tGetUniverseParameters,\n\tUniverse,\n\tUpdateUniverseParameters,\n} from \"../../domains/cloud-v2/universes/types.ts\";\nimport {\n\tbuildDeleteIconRequest,\n\tbuildListIconsRequest,\n\tbuildUploadIconRequest,\n} from \"../../domains/game-internationalization/game-icon/builders.ts\";\nimport {\n\tICON_OPERATION_LIMIT,\n\tICON_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/game-icon/operations.ts\";\nimport { parseIconListResponse } from \"../../domains/game-internationalization/game-icon/parsers.ts\";\nimport type {\n\tDeleteExperienceIconParameters,\n\tExperienceIcon,\n\tListExperienceIconsParameters,\n\tUploadExperienceIconParameters,\n} from \"../../domains/game-internationalization/game-icon/types.ts\";\nimport {\n\tbuildDeleteThumbnailRequest,\n\tbuildReorderThumbnailsRequest,\n\tbuildUploadThumbnailRequest,\n} from \"../../domains/game-internationalization/game-thumbnails/builders.ts\";\nimport {\n\tTHUMBNAILS_OPERATION_LIMIT,\n\tTHUMBNAILS_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/game-thumbnails/operations.ts\";\nimport { parseThumbnailUploadResponse } from \"../../domains/game-internationalization/game-thumbnails/parsers.ts\";\nimport type {\n\tDeleteExperienceThumbnailParameters,\n\tReorderExperienceThumbnailsParameters,\n\tUploadedExperienceThumbnail,\n\tUploadExperienceThumbnailParameters,\n} from \"../../domains/game-internationalization/game-thumbnails/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport type { HttpRequest } from \"../../internal/http/types.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nconst GET_SPEC: ResourceMethodSpec<GetUniverseParameters, Universe> = Object.freeze({\n\tbuildRequest: buildGetRequest,\n\tmethodDefaults: {},\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseUniverseResponse,\n});\n\nconst UPDATE_SPEC: ResourceMethodSpec<UpdateUniverseParameters, Universe> = Object.freeze({\n\tbuildRequest: buildUpdateRequest,\n\tmethodDefaults: {},\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseUniverseResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\nfunction buildIconUploadOkRequest(\n\tparameters: UploadExperienceIconParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildUploadIconRequest(parameters));\n}\n\nfunction buildIconDeleteOkRequest(\n\tparameters: DeleteExperienceIconParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildDeleteIconRequest(parameters));\n}\n\nfunction buildIconListOkRequest(\n\tparameters: ListExperienceIconsParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildListIconsRequest(parameters));\n}\n\nconst ICON_UPLOAD_SPEC: ResourceMethodSpec<UploadExperienceIconParameters, undefined> =\n\tObject.freeze({\n\t\tbuildRequest: buildIconUploadOkRequest,\n\t\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\t\tmethodKind: \"create\",\n\t\toperationLimit: ICON_OPERATION_LIMIT,\n\t\tparse: parseEmptyResponse,\n\t\trequiredScopes: ICON_REQUIRED_SCOPES,\n\t});\n\nconst ICON_DELETE_SPEC: ResourceMethodSpec<DeleteExperienceIconParameters, undefined> =\n\tObject.freeze({\n\t\tbuildRequest: buildIconDeleteOkRequest,\n\t\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\t\tmethodKind: \"idempotent\",\n\t\toperationLimit: ICON_OPERATION_LIMIT,\n\t\tparse: parseEmptyResponse,\n\t\trequiredScopes: ICON_REQUIRED_SCOPES,\n\t});\n\nconst ICON_LIST_SPEC: ResourceMethodSpec<\n\tListExperienceIconsParameters,\n\tReadonlyArray<ExperienceIcon>\n> = Object.freeze({\n\tbuildRequest: buildIconListOkRequest,\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: ICON_OPERATION_LIMIT,\n\tparse: parseIconListResponse,\n\trequiredScopes: ICON_REQUIRED_SCOPES,\n});\n\nfunction buildThumbnailUploadOkRequest(\n\tparameters: UploadExperienceThumbnailParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildUploadThumbnailRequest(parameters));\n}\n\nfunction buildThumbnailDeleteOkRequest(\n\tparameters: DeleteExperienceThumbnailParameters,\n): Result<HttpRequest, OpenCloudError> {\n\treturn okRequest(buildDeleteThumbnailRequest(parameters));\n}\n\nconst THUMBNAIL_UPLOAD_SPEC: ResourceMethodSpec<\n\tUploadExperienceThumbnailParameters,\n\tUploadedExperienceThumbnail\n> = Object.freeze({\n\tbuildRequest: buildThumbnailUploadOkRequest,\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: THUMBNAILS_OPERATION_LIMIT,\n\tparse: parseThumbnailUploadResponse,\n\trequiredScopes: THUMBNAILS_REQUIRED_SCOPES,\n});\n\nconst THUMBNAIL_DELETE_SPEC: ResourceMethodSpec<DeleteExperienceThumbnailParameters, undefined> =\n\tObject.freeze({\n\t\tbuildRequest: buildThumbnailDeleteOkRequest,\n\t\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\t\tmethodKind: \"idempotent\",\n\t\toperationLimit: THUMBNAILS_OPERATION_LIMIT,\n\t\tparse: parseEmptyResponse,\n\t\trequiredScopes: THUMBNAILS_REQUIRED_SCOPES,\n\t});\n\nconst THUMBNAIL_REORDER_SPEC: ResourceMethodSpec<ReorderExperienceThumbnailsParameters, undefined> =\n\tObject.freeze({\n\t\tbuildRequest: buildReorderThumbnailsRequest,\n\t\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\t\tmethodKind: \"idempotent\",\n\t\toperationLimit: THUMBNAILS_OPERATION_LIMIT,\n\t\tparse: parseEmptyResponse,\n\t\trequiredScopes: THUMBNAILS_REQUIRED_SCOPES,\n\t});\n\ninterface UniverseIconHandle {\n\t/**\n\t * Deletes the localized icon registered against a universe for a given\n\t * language. Removing the source-language icon is rejected server-side;\n\t * consumers must replace it via {@link UniverseIconHandle.upload}\n\t * instead.\n\t *\n\t * @param parameters - Universe and language identifiers of the icon to\n\t * delete.\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\tdelete: (\n\t\tparameters: DeleteExperienceIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Lists every localized icon registered against an experience. The\n\t * server returns one entry per locale that has an icon registered.\n\t *\n\t * @param parameters - Universe identifier whose icons to list.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed array of\n\t * {@link ExperienceIcon} entries or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tlist: (\n\t\tparameters: ListExperienceIconsParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<ReadonlyArray<ExperienceIcon>, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the localized icon for an experience. A\n\t * subsequent upload for the same `(universeId, languageCode)` pair\n\t * replaces the existing icon for that locale.\n\t *\n\t * No default request timeout applies to this upload; pass `options.timeout`\n\t * to set a per-call deadline.\n\t *\n\t * @param parameters - Universe and language identifiers plus the image\n\t * bytes to upload.\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 success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupload: (\n\t\tparameters: UploadExperienceIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\ninterface UniverseThumbnailsHandle {\n\t/**\n\t * Deletes a single thumbnail by media asset ID. Idempotent: deleting an\n\t * already-removed thumbnail surfaces the server's 404 unchanged.\n\t *\n\t * @param parameters - Universe, language, and image identifiers of the\n\t * thumbnail to delete.\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\tdelete: (\n\t\tparameters: DeleteExperienceThumbnailParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Reorders the localized thumbnail carousel. The supplied\n\t * `orderedImageIds` describes the desired display order from first to\n\t * last. Image IDs must be positive integers within the safe-integer\n\t * range; invalid input is rejected with a {@link OpenCloudError} of\n\t * kind `ValidationError` before any HTTP round-trip.\n\t *\n\t * @param parameters - Universe, language, and the desired display order.\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\treorder: (\n\t\tparameters: ReorderExperienceThumbnailsParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads a new thumbnail and appends it to the localized carousel. Use\n\t * {@link UniverseThumbnailsHandle.reorder} after multiple uploads to\n\t * set the display order.\n\t *\n\t * No default request timeout applies to this upload; pass `options.timeout`\n\t * to set a per-call deadline.\n\t *\n\t * @param parameters - Universe and language identifiers plus the image\n\t * bytes to upload.\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\n\t * {@link UploadedExperienceThumbnail} or the {@link OpenCloudError}\n\t * that caused the request to fail.\n\t */\n\tupload: (\n\t\tparameters: UploadExperienceThumbnailParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<UploadedExperienceThumbnail, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud `Universe` resource. Wires\n * the request builders, the injected\n * {@link OpenCloudClientOptions.httpClient}, and the response parser\n * into a single ergonomic surface. Every method returns a\n * {@link Result} so callers handle failure explicitly; no thrown\n * {@link OpenCloudError} ever escapes the client.\n *\n * Partial updates use a Google-style `updateMask` query string derived\n * from the keys present on the update parameters. Setting a clearable\n * field (`privateServerPriceRobux` or any social link) to `undefined`\n * sends JSON `null` for that field so the server clears the\n * corresponding value.\n *\n * Localized experience-icon and experience-thumbnail Operations are\n * bound on the {@link UniversesClient.icon} and\n * {@link UniversesClient.thumbnails} Operation Groups so callers reach\n * for one client per universe.\n *\n * @since 0.1.0\n *\n * @example\n *\n * ```ts\n * import { UniversesClient } from \"@bedrock-rbx/ocale/universes\";\n *\n * const client = new UniversesClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(UniversesClient);\n * ```\n */\nexport class UniversesClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing the localized experience-icon\n\t * Operations (`upload`, `delete`, `list`) backed by the\n\t * `legacy-game-internationalization` domain. Shares the parent\n\t * client's HTTP, rate-limit, and retry plumbing.\n\t */\n\tpublic readonly icon: UniverseIconHandle;\n\t/**\n\t * Operation Group exposing the localized experience-thumbnail\n\t * Operations (`upload`, `delete`, `reorder`) backed by the\n\t * `legacy-game-internationalization` domain. No list-thumbnails\n\t * endpoint is bridged; consumers must track uploaded\n\t * `mediaAssetId`s in their own state store to reconcile against\n\t * the existing carousel. Shares the parent client's HTTP,\n\t * rate-limit, and retry plumbing.\n\t */\n\tpublic readonly thumbnails: UniverseThumbnailsHandle;\n\n\t/**\n\t * Creates a new {@link UniversesClient}. Configuration is frozen\n\t * on construction; per-request overrides are accepted on each\n\t * 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.icon = createIconHandle(this.#inner);\n\t\tthis.thumbnails = createThumbnailsHandle(this.#inner);\n\t}\n\n\t/**\n\t * Fetches the current configuration of a universe.\n\t *\n\t * @param parameters - The universe identifier.\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 Universe}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetUniverseParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Universe, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Partially updates a universe's configuration. The fields\n\t * supplied on `parameters` (excluding `universeId`) are forwarded\n\t * to the server via a Google-style `updateMask`; unmentioned\n\t * fields are left untouched.\n\t *\n\t * @param parameters - The universe identifier and the fields to\n\t * update. At least one updatable field must be supplied.\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 Universe}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateUniverseParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Universe, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createIconHandle(inner: ResourceClient): UniverseIconHandle {\n\treturn {\n\t\tasync delete(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: ICON_DELETE_SPEC });\n\t\t},\n\t\tasync list(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: ICON_LIST_SPEC });\n\t\t},\n\t\tasync upload(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: ICON_UPLOAD_SPEC });\n\t\t},\n\t};\n}\n\nfunction createThumbnailsHandle(inner: ResourceClient): UniverseThumbnailsHandle {\n\treturn {\n\t\tasync delete(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: THUMBNAIL_DELETE_SPEC });\n\t\t},\n\t\tasync reorder(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: THUMBNAIL_REORDER_SPEC });\n\t\t},\n\t\tasync upload(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: THUMBNAIL_UPLOAD_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,gBAAgB,KAAK,MAAM,MAAM;;;;;;;AAQvC,SAAgB,gBACf,YACsC;CACtC,OAAO,UAAU;EAChB,QAAQ;EACR,KAAK,uBAAuB,WAAW;CACxC,CAAC;AACF;;;;;;;;;;;;AAaA,SAAgB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AS;GAC/B,OAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;GAAe,CAAC;EACnE;EACA,MAAM,OAAO,YAAY,SAAS;GACjC,OAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;GAAiB,CAAC;EACrE;CACD;AACD;AAEA,SAAS,uBAAuB,OAAiD;CAChF,OAAO;EACN,MAAM,OAAO,YAAY,SAAS;GACjC,OAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;GAAsB,CAAC;EAC1E;EACA,MAAM,QAAQ,YAAY,SAAS;GAClC,OAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;GAAuB,CAAC;EAC3E;EACA,MAAM,OAAO,YAAY,SAAS;GACjC,OAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;GAAsB,CAAC;EAC1E;CACD;AACD"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { i as OpenCloudError } from "./rate-limit-
|
|
1
|
+
import { i as OpenCloudError } from "./rate-limit-Co9i28qi.mjs";
|
|
2
2
|
//#region src/errors/validation.ts
|
|
3
3
|
/**
|
|
4
4
|
* Thrown locally when caller-supplied input is rejected before any HTTP
|
|
5
5
|
* round-trip. The `code` discriminator lets consumers branch on local-input
|
|
6
6
|
* errors separately from server-side errors.
|
|
7
7
|
*
|
|
8
|
+
* @since 0.1.0
|
|
9
|
+
*
|
|
8
10
|
* @example
|
|
9
11
|
*
|
|
10
12
|
* ```ts
|
|
@@ -35,4 +37,4 @@ var ValidationError = class extends OpenCloudError {
|
|
|
35
37
|
//#endregion
|
|
36
38
|
export { ValidationError as t };
|
|
37
39
|
|
|
38
|
-
//# sourceMappingURL=validation-
|
|
40
|
+
//# sourceMappingURL=validation-9oU6qNNQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-9oU6qNNQ.mjs","names":[],"sources":["../src/errors/validation.ts"],"sourcesContent":["import { OpenCloudError } from \"./base.ts\";\n\n/**\n * Closed discriminator for a {@link ValidationError}. Consumers can\n * exhaustively `switch` over this union so TypeScript will refuse to compile\n * if a new variant is added without a handler.\n *\n * @since 0.1.0\n */\nexport type ValidationErrorCode =\n\t| \"empty_body\"\n\t| \"empty_image_ids\"\n\t| \"empty_update\"\n\t| \"format_mismatch\"\n\t| \"incomplete_ref\"\n\t| \"invalid_image_id\";\n\n/**\n * Options for constructing a {@link ValidationError}.\n *\n * @since 0.1.0\n */\nexport interface ValidationErrorOptions extends ErrorOptions {\n\t/** Machine-readable discriminator identifying the validation failure. */\n\tcode: ValidationErrorCode;\n}\n\n/**\n * Thrown locally when caller-supplied input is rejected before any HTTP\n * round-trip. The `code` discriminator lets consumers branch on local-input\n * errors separately from server-side errors.\n *\n * @since 0.1.0\n *\n * @example\n *\n * ```ts\n * import { ValidationError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new ValidationError(\"Place body is empty\", {\n * code: \"empty_body\",\n * });\n *\n * expect(error).toBeInstanceOf(ValidationError);\n * expect(error.code).toBe(\"empty_body\");\n * ```\n */\nexport class ValidationError extends OpenCloudError {\n\tpublic readonly code: ValidationErrorCode;\n\tpublic override readonly name: string = \"ValidationError\";\n\n\t/**\n\t * Creates a new ValidationError.\n\t *\n\t * @param message - Human-readable error description.\n\t * @param options - Error options including the validation failure code.\n\t */\n\tconstructor(message: string, options: ValidationErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.code = options.code;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+CA,IAAa,kBAAb,cAAqC,eAAe;CACnD;CACA,OAAwC;;;;;;;CAQxC,YAAY,SAAiB,SAAiC;EAC7D,MAAM,SAAS,OAAO;EACtB,KAAK,OAAO,QAAQ;CACrB;AACD"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
//#region src/domains/game-internationalization/game-icon/wire.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* Image moderation state returned alongside each localized icon.
|
|
4
|
+
*
|
|
5
|
+
* @since 0.1.0
|
|
4
6
|
*/
|
|
5
7
|
type GameIconState = "Approved" | "Error" | "PendingReview" | "Rejected" | "UnAvailable";
|
|
6
8
|
/**
|
|
@@ -32,4 +34,4 @@ interface GameIconListWire {
|
|
|
32
34
|
}
|
|
33
35
|
//#endregion
|
|
34
36
|
export { GameIconState as n, GetGameIconResponseWire as r, GameIconListWire as t };
|
|
35
|
-
//# sourceMappingURL=wire-
|
|
37
|
+
//# sourceMappingURL=wire-D3K-a-UP.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire-D3K-a-UP.d.mts","names":[],"sources":["../src/domains/game-internationalization/game-icon/wire.ts"],"mappings":";;AAKA;;;;KAAY,aAAA;AAOZ;;;;;AAAA,UAAiB,uBAAA;;WAEP,OAAA;;WAEA,QAAA;EAQO;AAOjB;;;;EAPiB,SAFP,YAAA;;WAEA,KAAA,EAAO,aAAA;AAAA;AASa;;;;AAAA,UAFb,gBAAA;;WAEP,IAAA,EAAM,aAAA,CAAc,uBAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bedrock-rbx/ocale",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Roblox Open Cloud API client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/christopher-buss/bedrock
|
|
17
|
+
"url": "git+https://github.com/christopher-buss/bedrock.git",
|
|
18
|
+
"directory": "packages/open-cloud"
|
|
18
19
|
},
|
|
19
20
|
"license": "MIT",
|
|
20
21
|
"author": "Christopher Buss <christopher.buss@pm.me> (https://github.com/christopher-buss)",
|
|
@@ -46,15 +47,15 @@
|
|
|
46
47
|
"@stryker-mutator/core": "9.6.1",
|
|
47
48
|
"@stryker-mutator/typescript-checker": "9.6.1",
|
|
48
49
|
"@stryker-mutator/vitest-runner": "9.6.1",
|
|
49
|
-
"@types/bun": "1.3.
|
|
50
|
+
"@types/bun": "1.3.14",
|
|
50
51
|
"ajv": "8.18.0",
|
|
51
52
|
"ajv-formats": "3.0.1",
|
|
52
|
-
"oxc-minify": "0.
|
|
53
|
+
"oxc-minify": "0.137.0",
|
|
53
54
|
"type-fest": "5.6.0",
|
|
54
55
|
"typescript": "npm:@typescript/typescript6@6.0.1",
|
|
55
|
-
"vitest": "4.1.
|
|
56
|
-
"@bedrock-rbx/testing": "0.0.0",
|
|
56
|
+
"vitest": "4.1.9",
|
|
57
57
|
"@bedrock-rbx/typescript-config": "0.0.0",
|
|
58
|
+
"@bedrock-rbx/testing": "0.0.0",
|
|
58
59
|
"@bedrock-rbx/vite-config": "0.0.0"
|
|
59
60
|
},
|
|
60
61
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
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,aA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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,0BAAA;AAAA;;;;;;KASU,YAAA,WAAuB,sBAAA;;;;;;KAOvB,kBAAA,WAA6B,sBAAA"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
|
-
//#region src/errors/permission-error.ts
|
|
3
|
-
/**
|
|
4
|
-
* Thrown when the Roblox Open Cloud API returns a 401 or 403 for an operation
|
|
5
|
-
* whose required scopes are known. Subclass of {@link ApiError} carrying the
|
|
6
|
-
* scope strings the caller's credential is missing plus the operation key, so
|
|
7
|
-
* a CLI consumer can tell the user exactly which scope to grant on their API
|
|
8
|
-
* key.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
*
|
|
12
|
-
* ```ts
|
|
13
|
-
* import { PermissionError } from "@bedrock-rbx/ocale";
|
|
14
|
-
*
|
|
15
|
-
* const error = new PermissionError("HTTP 403", {
|
|
16
|
-
* operationKey: "developer-products.create",
|
|
17
|
-
* requiredScopes: ["creator-store-product:write"],
|
|
18
|
-
* statusCode: 403,
|
|
19
|
-
* });
|
|
20
|
-
*
|
|
21
|
-
* expect(error).toBeInstanceOf(PermissionError);
|
|
22
|
-
* expect(error.requiredScopes).toStrictEqual(["creator-store-product:write"]);
|
|
23
|
-
* expect(error.operationKey).toBe("developer-products.create");
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
var PermissionError = class extends ApiError {
|
|
27
|
-
name = "PermissionError";
|
|
28
|
-
operationKey;
|
|
29
|
-
requiredScopes;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a new PermissionError.
|
|
32
|
-
*
|
|
33
|
-
* @param message - Human-readable error description.
|
|
34
|
-
* @param options - Error options including status code, the operation key,
|
|
35
|
-
* and the scopes the caller's credential must carry.
|
|
36
|
-
*/
|
|
37
|
-
constructor(message, options) {
|
|
38
|
-
super(message, options);
|
|
39
|
-
this.operationKey = options.operationKey;
|
|
40
|
-
this.requiredScopes = options.requiredScopes;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
//#endregion
|
|
44
|
-
export { PermissionError as t };
|
|
45
|
-
|
|
46
|
-
//# sourceMappingURL=permission-error-DOVtNq3A.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"permission-error-DOVtNq3A.mjs","names":[],"sources":["../src/errors/permission-error.ts"],"sourcesContent":["import { ApiError, type ApiErrorOptions } from \"./api-error.ts\";\n\n/**\n * Options for constructing a {@link PermissionError}.\n */\nexport interface PermissionErrorOptions extends ApiErrorOptions {\n\t/**\n\t * Stable identifier of the Open Cloud operation that returned the\n\t * permission failure (matches `OperationLimit.operationKey`, e.g.\n\t * `\"developer-products.create\"`).\n\t */\n\toperationKey: string;\n\t/**\n\t * Scope strings the API key or OAuth token must carry for the failing\n\t * operation, sourced from the vendored OpenAPI schema's `x-roblox-scopes`\n\t * for that operationId.\n\t */\n\trequiredScopes: ReadonlyArray<string>;\n}\n\n/**\n * Thrown when the Roblox Open Cloud API returns a 401 or 403 for an operation\n * whose required scopes are known. Subclass of {@link ApiError} carrying the\n * scope strings the caller's credential is missing plus the operation key, so\n * a CLI consumer can tell the user exactly which scope to grant on their API\n * key.\n *\n * @example\n *\n * ```ts\n * import { PermissionError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new PermissionError(\"HTTP 403\", {\n * operationKey: \"developer-products.create\",\n * requiredScopes: [\"creator-store-product:write\"],\n * statusCode: 403,\n * });\n *\n * expect(error).toBeInstanceOf(PermissionError);\n * expect(error.requiredScopes).toStrictEqual([\"creator-store-product:write\"]);\n * expect(error.operationKey).toBe(\"developer-products.create\");\n * ```\n */\nexport class PermissionError extends ApiError {\n\tpublic override readonly name: string = \"PermissionError\";\n\tpublic readonly operationKey: string;\n\tpublic readonly requiredScopes: ReadonlyArray<string>;\n\n\t/**\n\t * Creates a new PermissionError.\n\t *\n\t * @param message - Human-readable error description.\n\t * @param options - Error options including status code, the operation key,\n\t * and the scopes the caller's credential must carry.\n\t */\n\tconstructor(message: string, options: PermissionErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.operationKey = options.operationKey;\n\t\tthis.requiredScopes = options.requiredScopes;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAa,kBAAb,cAAqC,SAAS;CAC7C,OAAwC;CACxC;CACA;;;;;;;;CASA,YAAY,SAAiB,SAAiC;AAC7D,QAAM,SAAS,QAAQ;AACvB,OAAK,eAAe,QAAQ;AAC5B,OAAK,iBAAiB,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"poll-timeout-Dg_QFEqi.mjs","names":[],"sources":["../src/errors/poll-aborted.ts","../src/errors/poll-timeout.ts"],"sourcesContent":["import { OpenCloudError } from \"./base.ts\";\n\n/**\n * Options for constructing a {@link PollAbortedError}.\n */\nexport interface PollAbortedErrorOptions extends ErrorOptions {\n\t/** Whatever `AbortSignal.reason` was at the moment of abort. */\n\treadonly reason?: unknown;\n}\n\n/**\n * Returned when `pollUntilDone` is interrupted by an `AbortSignal` before\n * a terminal task state is reached. The `reason` field mirrors\n * `AbortSignal.reason` so callers can distinguish intentional cancellation\n * from unexpected abort sources.\n *\n * @example\n *\n * ```ts\n * import { PollAbortedError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new PollAbortedError(\"polling was aborted\", {\n * reason: \"user cancelled\",\n * });\n *\n * expect(error).toBeInstanceOf(PollAbortedError);\n * expect(error.reason).toBe(\"user cancelled\");\n * ```\n */\nexport class PollAbortedError extends OpenCloudError {\n\tpublic override readonly name: string = \"PollAbortedError\";\n\tpublic readonly reason?: unknown;\n\n\t/**\n\t * Creates a new PollAbortedError.\n\t *\n\t * @param message - Human-readable description of the abort.\n\t * @param options - Error options including the abort reason.\n\t */\n\tconstructor(message: string, options: PollAbortedErrorOptions = {}) {\n\t\tsuper(message, options);\n\t\tthis.reason = options.reason;\n\t}\n}\n","import { OpenCloudError } from \"./base.ts\";\n\n/**\n * Options for {@link PollTimeoutError}. The `T` type parameter captures the\n * resource-specific task variant the caller polled for; defaults to `unknown`\n * so the class can be reused by future Resources without forcing a parallel\n * hierarchy.\n *\n * @template T - Resource-specific task type being polled.\n */\nexport interface PollTimeoutErrorOptions<T = unknown> extends ErrorOptions {\n\t/** Last task observed before the timeout budget was exhausted. */\n\treadonly lastObservedTask?: T | undefined;\n\t/** Total wall-clock budget supplied by the caller, in ms. */\n\treadonly timeoutMs: number;\n}\n\n/**\n * Returned when `pollUntilDone` exhausts its wall-clock budget without\n * observing a terminal task state. Carries the last task polled so callers\n * can inspect state and decide whether to retry with a fresh budget.\n *\n * @template T - Resource-specific task type being polled.\n *\n * @example\n *\n * ```ts\n * import { PollTimeoutError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new PollTimeoutError(\"polling timed out after 5 s\", {\n * lastObservedTask: { state: \"PROCESSING\" as const },\n * timeoutMs: 5000,\n * });\n *\n * expect(error).toBeInstanceOf(PollTimeoutError);\n * expect(error.timeoutMs).toBe(5000);\n * expect(error.lastObservedTask).toStrictEqual({ state: \"PROCESSING\" });\n * ```\n */\nexport class PollTimeoutError<T = unknown> extends OpenCloudError {\n\tpublic readonly lastObservedTask: T | undefined;\n\tpublic override readonly name: string = \"PollTimeoutError\";\n\tpublic readonly timeoutMs: number;\n\n\t/**\n\t * Creates a new PollTimeoutError.\n\t *\n\t * @param message - Human-readable description of the timeout.\n\t * @param options - Error options including the budget and last-observed task.\n\t */\n\tconstructor(message: string, options: PollTimeoutErrorOptions<T>) {\n\t\tsuper(message, options);\n\t\tthis.lastObservedTask = options.lastObservedTask;\n\t\tthis.timeoutMs = options.timeoutMs;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,mBAAb,cAAsC,eAAe;CACpD,OAAwC;CACxC;;;;;;;CAQA,YAAY,SAAiB,UAAmC,EAAE,EAAE;AACnE,QAAM,SAAS,QAAQ;AACvB,OAAK,SAAS,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;ACFxB,IAAa,mBAAb,cAAmD,eAAe;CACjE;CACA,OAAwC;CACxC;;;;;;;CAQA,YAAY,SAAiB,SAAqC;AACjE,QAAM,SAAS,QAAQ;AACvB,OAAK,mBAAmB,QAAQ;AAChC,OAAK,YAAY,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"polling-BMrYajok.d.mts","names":[],"sources":["../src/domains/cloud-v2/luau-execution-tasks/types.ts","../src/domains/cloud-v2/luau-execution-task-logs/types.ts","../src/resources/luau-execution/polling.ts"],"mappings":";;;;;;AAKA;;UAAiB,sBAAA;EAAA;;;;EAAA,SAKP,WAAA;;WAEA,kBAAA;;WAEA,OAAA;EAiBV;EAAA,SAfU,MAAA;;;;;WAKA,cAAA;;WAEA,UAAA;AA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AAA;;;ADwCV;;;;UC/BiB,OAAA;;WAEP,QAAA,EAAU,aAAA,CAAc,UAAA;;;AD6ClC;;WCxCU,aAAA;AAAA;;;;KC3BE,oBAAA,GAAuB,WAAA,GAAc,cAAA;;UAGvC,WAAA;;WAEA,SAAA,IAAa,OAAA;;WAEb,MAAA,GAAS,WAAA;EF2BnB;EAAA,SEzBU,SAAA;AAAA;;;;;;;;;AF0CV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"polling-helpers-CS00apdU.mjs","names":["SECONDS_PER_MINUTE","malformed","makeSpec"],"sources":["../src/domains/cloud-v2/luau-execution-task-logs/builders.ts","../src/domains/cloud-v2/luau-execution-task-logs/operations.ts","../src/domains/cloud-v2/luau-execution-task-logs/parsers.ts","../src/domains/cloud-v2/luau-execution-task-logs/specs.ts","../src/domains/cloud-v2/luau-execution-tasks/builders.ts","../src/domains/cloud-v2/luau-execution-tasks/operations.ts","../src/domains/cloud-v2/luau-execution-tasks/parsers.ts","../src/domains/cloud-v2/luau-execution-tasks/specs.ts","../src/resources/luau-execution/polling.ts","../src/resources/luau-execution/polling-helpers.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { ListLogsParameters } from \"./types.ts\";\n\n/**\n * Builds a `GET` request for the Open Cloud \"list Luau execution session\n * task logs\" endpoint. The endpoint requires the maximal x-aep-resource\n * path shape (universe, place, version, session, task), so the supplied\n * ref must include `versionId` and `sessionId`; refs extracted from the\n * narrower path formats are rejected with a {@link ValidationError}.\n *\n * The `view` query parameter is hard-coded to `STRUCTURED` so callers\n * always receive typed structured messages. No public `view` parameter\n * is exposed.\n *\n * @param parameters - Task ref, and optional `pageSize` and `pageToken`\n * pagination controls.\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when the ref is missing `versionId` or\n * `sessionId`.\n */\nexport function buildListLogsRequest(\n\tparameters: ListLogsParameters,\n): Result<HttpRequest, ValidationError> {\n\tconst { pageSize, pageToken, ref } = parameters;\n\tconst { placeId, sessionId, taskId, universeId, versionId } = ref;\n\n\tif (versionId === undefined) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Task ref is missing versionId; cannot list logs\", {\n\t\t\t\tcode: \"incomplete_ref\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tif (sessionId === undefined) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Task ref is missing sessionId; cannot list logs\", {\n\t\t\t\tcode: \"incomplete_ref\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst base = `/cloud/v2/universes/${universeId}/places/${placeId}/versions/${versionId}/luau-execution-sessions/${sessionId}/tasks/${taskId}/logs`;\n\tconst url = `${base}?${buildQuery(pageSize, pageToken).toString()}`;\n\treturn { data: { method: \"GET\", url }, success: true };\n}\n\nfunction buildQuery(pageSize: number | undefined, pageToken: string | undefined): URLSearchParams {\n\tconst query = new URLSearchParams({ view: \"STRUCTURED\" });\n\n\tif (pageSize !== undefined) {\n\t\tquery.append(\"maxPageSize\", String(pageSize));\n\t}\n\n\tif (pageToken !== undefined) {\n\t\tquery.append(\"pageToken\", pageToken);\n\t}\n\n\treturn query;\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst LIST_LOGS_PER_MINUTE = 45;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for listing Luau execution task logs,\n * sourced from `x-roblox-rate-limits.perApiKeyOwner` on the\n * `Cloud_ListLuauExecutionSessionTaskLogs` operation (45 requests per\n * minute per API key owner).\n */\nexport const LIST_LOGS_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: LIST_LOGS_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"luau-execution-task-logs.list\",\n});\n\n/**\n * Scopes required to list Luau execution task logs, sourced from\n * `x-roblox-scopes` on the list-logs operation in the vendored OpenAPI\n * schema. Surfaced via the `requiredScopes` field of the per-method\n * spec so a 401 or 403 ApiError is upgraded to a `PermissionError`\n * naming the missing scope. Only `:read` is required as the\n * minimum-privilege scope for this read-only operation.\n */\nexport const LIST_LOGS_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe.place.luau-execution-session:read\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { LogMessage, LogPage } from \"./types.ts\";\nimport type { ListLogsResponseWire, LogChunkWire, LogMessageWire } from \"./wire.ts\";\n\nconst MALFORMED_LOGS_MESSAGE = \"Malformed list-luau-execution-task-logs response\";\n\n/**\n * Parses a successful Open Cloud list-luau-execution-task-logs response\n * body into the public {@link LogPage} shape. Chunks are flattened into\n * a single ordered array of {@link LogMessage} values. The\n * `MESSAGE_TYPE_UNSPECIFIED` sentinel is rejected.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link LogPage}, or an\n * {@link ApiError} when the body does not match a supported shape.\n */\nexport function parseListLogsResponse(response: HttpResponse): Result<LogPage, ApiError> {\n\tconst { body, status: statusCode } = response;\n\tif (!isListLogsResponseWire(body)) {\n\t\treturn malformed(statusCode);\n\t}\n\n\tconst chunks = body.luauExecutionSessionTaskLogs ?? [];\n\tconst messages: Array<LogMessage> = [];\n\n\tfor (const chunk of chunks) {\n\t\tfor (const wireMessage of chunk.structuredMessages ?? []) {\n\t\t\tmessages.push({\n\t\t\t\tcreateTime: wireMessage.createTime,\n\t\t\t\tmessage: wireMessage.message,\n\t\t\t\tmessageType: wireMessage.messageType,\n\t\t\t});\n\t\t}\n\t}\n\n\treturn {\n\t\tdata: { messages, nextPageToken: body.nextPageToken },\n\t\tsuccess: true,\n\t};\n}\n\nfunction isAcceptedMessageType(value: unknown): value is LogMessageWire[\"messageType\"] {\n\treturn value === \"OUTPUT\" || value === \"INFO\" || value === \"WARNING\" || value === \"ERROR\";\n}\n\nfunction isLogMessageWire(value: unknown): value is LogMessageWire {\n\treturn (\n\t\tisRecord(value) &&\n\t\ttypeof value[\"createTime\"] === \"string\" &&\n\t\ttypeof value[\"message\"] === \"string\" &&\n\t\tisAcceptedMessageType(value[\"messageType\"])\n\t);\n}\n\nfunction isOptionalStructuredMessages(\n\tvalue: unknown,\n): value is ReadonlyArray<LogMessageWire> | undefined {\n\treturn (\n\t\tvalue === undefined ||\n\t\t(Array.isArray(value) && value.every((item: unknown) => isLogMessageWire(item)))\n\t);\n}\n\nfunction isLogChunkWire(value: unknown): value is LogChunkWire {\n\treturn isRecord(value) && isOptionalStructuredMessages(value[\"structuredMessages\"]);\n}\n\nfunction isOptionalLogChunks(value: unknown): value is ReadonlyArray<LogChunkWire> | undefined {\n\treturn (\n\t\tvalue === undefined ||\n\t\t(Array.isArray(value) && value.every((item: unknown) => isLogChunkWire(item)))\n\t);\n}\n\nfunction isListLogsResponseWire(body: unknown): body is ListLogsResponseWire {\n\treturn (\n\t\tisRecord(body) &&\n\t\tisOptionalLogChunks(body[\"luauExecutionSessionTaskLogs\"]) &&\n\t\t(body[\"nextPageToken\"] === undefined || typeof body[\"nextPageToken\"] === \"string\")\n\t);\n}\n\nfunction malformed(statusCode: number): Result<LogPage, ApiError> {\n\treturn { err: new ApiError(MALFORMED_LOGS_MESSAGE, { statusCode }), success: false };\n}\n","import { IDEMPOTENT_METHOD_DEFAULTS } from \"../../../internal/http/retry.ts\";\nimport type { ResourceMethodSpec } from \"../../../internal/resource-client.ts\";\nimport { buildListLogsRequest } from \"./builders.ts\";\nimport { LIST_LOGS_OPERATION_LIMIT, LIST_LOGS_REQUIRED_SCOPES } from \"./operations.ts\";\nimport { parseListLogsResponse } from \"./parsers.ts\";\nimport type { ListLogsParameters, LogPage } from \"./types.ts\";\n\nfunction makeSpec<P>(spec: ResourceMethodSpec<P, LogPage>): ResourceMethodSpec<P, LogPage> {\n\treturn Object.freeze(spec);\n}\n\n/**\n * Per-method dispatch spec for listing the structured log messages\n * produced by a Luau execution task. Frozen at module scope so both\n * the top-level `LuauExecutionClient` and the `luauExecution` Operation\n * Group on `PlacesClient` share the same instance reference.\n */\nexport const LIST_LOGS_SPEC = makeSpec<ListLogsParameters>({\n\tbuildRequest: buildListLogsRequest,\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LIST_LOGS_OPERATION_LIMIT,\n\tparse: parseListLogsResponse,\n\trequiredScopes: LIST_LOGS_REQUIRED_SCOPES,\n});\n","import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { GetParameters, SubmitAtHeadParameters, SubmitAtVersionParameters } from \"./types.ts\";\n\ninterface SubmitBodyInput {\n\treadonly binaryInput?: string | undefined;\n\treadonly enableBinaryOutput?: boolean | undefined;\n\treadonly script: string;\n\treadonly timeoutSeconds?: number;\n}\n\nconst JSON_HEADERS: Readonly<Record<string, string>> = { \"content-type\": \"application/json\" };\n\n/**\n * Builds a `POST` request for the Open Cloud \"create Luau execution\n * session task\" endpoint, targeting the place's head version. Serializes\n * `timeoutSeconds` into the wire's duration string format (`\"<n>s\"`)\n * when supplied.\n *\n * @param parameters - Universe and place identifiers, the script body,\n * and an optional `timeoutSeconds`.\n * @returns A pure {@link HttpRequest} describing the submit call.\n */\nexport function buildSubmitAtHeadRequest(parameters: SubmitAtHeadParameters): HttpRequest {\n\tconst { placeId, universeId } = parameters;\n\treturn {\n\t\tbody: buildSubmitBody(parameters),\n\t\theaders: JSON_HEADERS,\n\t\tmethod: \"POST\",\n\t\turl: `/cloud/v2/universes/${universeId}/places/${placeId}/luau-execution-session-tasks`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the Open Cloud \"create Luau execution\n * session task\" endpoint, targeting a specific place version. Differs\n * from {@link buildSubmitAtHeadRequest} only in URL shape: the path\n * includes the `versions/{versionId}` segment so the script runs\n * against that exact place version instead of the live head.\n *\n * @param parameters - Universe, place, and version identifiers, the\n * script body, and an optional `timeoutSeconds`.\n * @returns A pure {@link HttpRequest} describing the submit call.\n */\nexport function buildSubmitAtVersionRequest(parameters: SubmitAtVersionParameters): HttpRequest {\n\tconst { placeId, universeId, versionId } = parameters;\n\treturn {\n\t\tbody: buildSubmitBody(parameters),\n\t\theaders: JSON_HEADERS,\n\t\tmethod: \"POST\",\n\t\turl: `/cloud/v2/universes/${universeId}/places/${placeId}/versions/${versionId}/luau-execution-session-tasks`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud \"read Luau execution session\n * task\" endpoint. The endpoint accepts only the maximal x-aep-resource\n * path shape (universe, place, version, session, task), so the supplied\n * ref must include `versionId` and `sessionId`; refs extracted from the\n * narrower path formats are rejected with a {@link ValidationError}.\n *\n * @param parameters - Task ref and optional view selector. When `view`\n * is omitted, no `?view=` query is sent and the server applies its\n * own default (`BASIC`).\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when the ref is missing `versionId` or\n * `sessionId`.\n */\nexport function buildGetRequest(parameters: GetParameters): Result<HttpRequest, ValidationError> {\n\tconst { ref, view } = parameters;\n\tconst { placeId, sessionId, taskId, universeId, versionId } = ref;\n\n\tif (versionId === undefined) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Task ref is missing versionId; cannot GET\", {\n\t\t\t\tcode: \"incomplete_ref\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tif (sessionId === undefined) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Task ref is missing sessionId; cannot GET\", {\n\t\t\t\tcode: \"incomplete_ref\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst base = `/cloud/v2/universes/${universeId}/places/${placeId}/versions/${versionId}/luau-execution-sessions/${sessionId}/tasks/${taskId}`;\n\tconst url = view === undefined ? base : `${base}?view=${view}`;\n\treturn { data: { method: \"GET\", url }, success: true };\n}\n\nfunction buildSubmitBody(parameters: SubmitBodyInput): Record<string, unknown> {\n\tconst {\n\t\tbinaryInput,\n\t\tenableBinaryOutput: shouldEnableBinaryOutput,\n\t\tscript,\n\t\ttimeoutSeconds,\n\t} = parameters;\n\tconst body: Record<string, unknown> = { script };\n\tif (timeoutSeconds !== undefined) {\n\t\tbody[\"timeout\"] = `${timeoutSeconds}s`;\n\t}\n\n\tif (binaryInput !== undefined) {\n\t\tbody[\"binaryInput\"] = binaryInput;\n\t}\n\n\tif (shouldEnableBinaryOutput !== undefined) {\n\t\tbody[\"enableBinaryOutput\"] = shouldEnableBinaryOutput;\n\t}\n\n\treturn body;\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst SUBMIT_PER_MINUTE = 40;\nconst GET_PER_MINUTE = 200;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for submitting a Luau execution task,\n * sourced from `x-roblox-rate-limits.perApiKeyOwner` on the\n * `Cloud_CreateLuauExecutionSessionTask__Using_Universes` operation\n * (40 requests per minute per API key owner). The two URL shapes\n * (head and version) share this queue because Roblox attributes both\n * to the same per-minute quota.\n */\nexport const SUBMIT_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: SUBMIT_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"luau-execution-tasks.submit\",\n});\n\n/**\n * Per-second request ceiling for fetching a Luau execution task,\n * sourced from `x-roblox-rate-limits.perApiKeyOwner` on the\n * `Cloud_GetLuauExecutionSessionTask` operation (200 requests per\n * minute per API key owner).\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: GET_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"luau-execution-tasks.get\",\n});\n\n/**\n * Scopes required to submit a Luau execution task, sourced from\n * `x-roblox-scopes` on the create operation in the vendored OpenAPI\n * schema. Surfaced via the `requiredScopes` field of the per-method\n * spec so a 401 or 403 ApiError is upgraded to a `PermissionError`\n * naming the missing scope.\n */\nexport const SUBMIT_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe.place.luau-execution-session:write\",\n]);\n\n/**\n * Scopes required to fetch a Luau execution task, sourced from\n * `x-roblox-scopes` on the get operation. The `:write` scope also\n * grants read in upstream auth, but we surface only `:read` here as\n * the minimum-privilege requirement for this method.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe.place.luau-execution-session:read\",\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 { LuauExecutionTask, LuauExecutionTaskRef } from \"./types.ts\";\nimport type {\n\tLuauExecutionTaskErrorWire,\n\tLuauExecutionTaskOutputWire,\n\tLuauExecutionTaskWire,\n} from \"./wire.ts\";\n\nconst MALFORMED_TASK_MESSAGE = \"Malformed luau-execution-session-task response\";\n\n// Matches any of the four x-aep-resource path formats for a luau\n// execution session task.\n//\n// Capture groups:\n// 1. universeId\n// 2. placeId\n// 3. versionId (when `/versions/{v}/` segment is present, else undefined)\n// 4. sessionId (when `/luau-execution-sessions/{s}/tasks/...` branch matched)\n// 5. taskId (when `/luau-execution-sessions/.../tasks/{t}` branch matched)\n// 6. taskId (when `/luau-execution-session-tasks/{t}` branch matched)\nconst PATH_PATTERN =\n\t/^universes\\/(\\d+)\\/places\\/(\\d+)(?:\\/versions\\/(\\d+))?(?:\\/luau-execution-sessions\\/([^/]+)\\/tasks\\/([^/]+)|\\/luau-execution-session-tasks\\/([^/]+))$/;\n\ntype InProgressWireState = Exclude<LuauExecutionTaskWire[\"state\"], \"COMPLETE\" | \"FAILED\">;\n\ninterface ParseVariantArgs {\n\treadonly body: LuauExecutionTaskWire;\n\treadonly createdAt: Date | undefined;\n\treadonly ref: LuauExecutionTaskRef;\n\treadonly statusCode: number;\n\treadonly timeoutSeconds: number | undefined;\n\treadonly updatedAt: Date | undefined;\n}\n\n/**\n * Parses a successful Open Cloud `LuauExecutionSessionTask` response\n * body into the public {@link LuauExecutionTask} discriminated union.\n * Handles every supported task state (in-progress, COMPLETE, FAILED)\n * across all four x-aep-resource path shapes the server returns.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud\n * API.\n * @returns A success result wrapping the parsed task, or an\n * {@link ApiError} when the body or path do not match a supported\n * shape.\n */\nexport function parseLuauExecutionTaskResponse(\n\tresponse: HttpResponse,\n): Result<LuauExecutionTask, ApiError> {\n\tconst { body, status: statusCode } = response;\n\tif (!isLuauExecutionTaskWire(body)) {\n\t\treturn malformed(statusCode);\n\t}\n\n\tconst ref = parseTaskRef(body.path);\n\tif (ref === undefined) {\n\t\treturn malformed(statusCode);\n\t}\n\n\tconst timeoutSeconds = parseTimeoutSeconds(body.timeout);\n\tconst createdAt = parseOptionalDate(body.createTime);\n\tconst updatedAt = parseOptionalDate(body.updateTime);\n\n\tif (body.state === \"COMPLETE\") {\n\t\treturn parseCompleteTask({ body, createdAt, ref, statusCode, timeoutSeconds, updatedAt });\n\t}\n\n\tif (body.state === \"FAILED\") {\n\t\treturn parseFailedTask({ body, createdAt, ref, statusCode, timeoutSeconds, updatedAt });\n\t}\n\n\treturn parseInProgressTask({\n\t\tbody,\n\t\tcreatedAt,\n\t\tref,\n\t\tstate: body.state,\n\t\tstatusCode,\n\t\ttimeoutSeconds,\n\t\tupdatedAt,\n\t});\n}\n\nfunction isAcceptedWireState(\n\tstate: unknown,\n): state is \"CANCELLED\" | \"COMPLETE\" | \"FAILED\" | \"PROCESSING\" | \"QUEUED\" {\n\treturn (\n\t\tstate === \"QUEUED\" ||\n\t\tstate === \"PROCESSING\" ||\n\t\tstate === \"CANCELLED\" ||\n\t\tstate === \"COMPLETE\" ||\n\t\tstate === \"FAILED\"\n\t);\n}\n\nfunction isErrorWireCode(code: unknown): code is LuauExecutionTaskErrorWire[\"code\"] {\n\treturn (\n\t\tcode === \"SCRIPT_ERROR\" ||\n\t\tcode === \"DEADLINE_EXCEEDED\" ||\n\t\tcode === \"OUTPUT_SIZE_LIMIT_EXCEEDED\" ||\n\t\tcode === \"INTERNAL_ERROR\"\n\t);\n}\n\nfunction isErrorWire(value: unknown): value is LuauExecutionTaskErrorWire {\n\treturn (\n\t\tisRecord(value) && isErrorWireCode(value[\"code\"]) && typeof value[\"message\"] === \"string\"\n\t);\n}\n\nfunction isOptionalErrorWire(value: unknown): value is LuauExecutionTaskErrorWire | undefined {\n\treturn value === undefined || isErrorWire(value);\n}\n\nfunction isOutputWire(value: unknown): value is LuauExecutionTaskOutputWire {\n\treturn isRecord(value) && Array.isArray(value[\"results\"]);\n}\n\nfunction isOptionalOutputWire(value: unknown): value is LuauExecutionTaskOutputWire | undefined {\n\treturn value === undefined || isOutputWire(value);\n}\n\nfunction isOptionalString(value: unknown): value is string | undefined {\n\treturn value === undefined || typeof value === \"string\";\n}\n\nfunction isOptionalBoolean(value: unknown): value is boolean | undefined {\n\treturn value === undefined || typeof value === \"boolean\";\n}\n\nfunction isOptionalDateTimeString(value: unknown): value is string | undefined {\n\treturn value === undefined || isDateTimeString(value);\n}\n\nfunction isLuauExecutionTaskWire(body: unknown): body is LuauExecutionTaskWire {\n\treturn (\n\t\tisRecord(body) &&\n\t\ttypeof body[\"path\"] === \"string\" &&\n\t\tisOptionalDateTimeString(body[\"createTime\"]) &&\n\t\tisOptionalDateTimeString(body[\"updateTime\"]) &&\n\t\tisAcceptedWireState(body[\"state\"]) &&\n\t\ttypeof body[\"user\"] === \"string\" &&\n\t\tisOptionalOutputWire(body[\"output\"]) &&\n\t\tisOptionalErrorWire(body[\"error\"]) &&\n\t\tisOptionalDurationWire(body[\"timeout\"]) &&\n\t\tisOptionalString(body[\"binaryInput\"]) &&\n\t\tisOptionalBoolean(body[\"enableBinaryOutput\"]) &&\n\t\tisOptionalString(body[\"binaryOutputUri\"])\n\t);\n}\n\nfunction parseOptionalDate(value: string | undefined): Date | undefined {\n\treturn value === undefined ? undefined : new Date(value);\n}\n\nconst DURATION_PATTERN = /^(\\d+)s$/;\n\nfunction isOptionalDurationWire(value: unknown): value is string | undefined {\n\treturn value === undefined || (typeof value === \"string\" && DURATION_PATTERN.test(value));\n}\n\nfunction parseTimeoutSeconds(value: string | undefined): number | undefined {\n\tif (value === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst match = DURATION_PATTERN.exec(value);\n\tconst seconds = match?.[1];\n\tif (seconds === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn Number.parseInt(seconds, 10);\n}\n\nfunction malformed(statusCode: number): Result<LuauExecutionTask, ApiError> {\n\treturn { err: new ApiError(MALFORMED_TASK_MESSAGE, { statusCode }), success: false };\n}\n\nfunction parseInProgressTask(\n\targs: ParseVariantArgs & { readonly state: InProgressWireState },\n): Result<LuauExecutionTask, ApiError> {\n\tconst { body, createdAt, ref, state, timeoutSeconds, updatedAt } = args;\n\treturn {\n\t\tdata: {\n\t\t\tbinaryInput: body.binaryInput,\n\t\t\tbinaryOutputUri: body.binaryOutputUri,\n\t\t\tcreatedAt,\n\t\t\tenableBinaryOutput: body.enableBinaryOutput,\n\t\t\tref,\n\t\t\tstate,\n\t\t\ttimeoutSeconds,\n\t\t\tupdatedAt,\n\t\t\tuser: body.user,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction parseCompleteTask(args: ParseVariantArgs): Result<LuauExecutionTask, ApiError> {\n\tconst { body, createdAt, ref, statusCode, timeoutSeconds, updatedAt } = args;\n\tif (body.output === undefined) {\n\t\treturn malformed(statusCode);\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tbinaryInput: body.binaryInput,\n\t\t\tbinaryOutputUri: body.binaryOutputUri,\n\t\t\tcreatedAt,\n\t\t\tenableBinaryOutput: body.enableBinaryOutput,\n\t\t\toutput: { results: body.output.results },\n\t\t\tref,\n\t\t\tstate: \"COMPLETE\",\n\t\t\ttimeoutSeconds,\n\t\t\tupdatedAt,\n\t\t\tuser: body.user,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction parseFailedTask(args: ParseVariantArgs): Result<LuauExecutionTask, ApiError> {\n\tconst { body, createdAt, ref, statusCode, timeoutSeconds, updatedAt } = args;\n\tif (body.error === undefined) {\n\t\treturn malformed(statusCode);\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tbinaryInput: body.binaryInput,\n\t\t\tbinaryOutputUri: body.binaryOutputUri,\n\t\t\tcreatedAt,\n\t\t\tenableBinaryOutput: body.enableBinaryOutput,\n\t\t\terror: { code: body.error.code, message: body.error.message },\n\t\t\tref,\n\t\t\tstate: \"FAILED\",\n\t\t\ttimeoutSeconds,\n\t\t\tupdatedAt,\n\t\t\tuser: body.user,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction parseTaskRef(path: string): LuauExecutionTaskRef | undefined {\n\tconst match = PATH_PATTERN.exec(path);\n\tif (match === null) {\n\t\treturn undefined;\n\t}\n\n\tconst [, universeId, placeId, versionId, sessionId, sessionTaskId, plainTaskId] = match;\n\tconst taskId = sessionTaskId ?? plainTaskId;\n\tif (universeId === undefined || placeId === undefined || taskId === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn { placeId, sessionId, taskId, universeId, versionId };\n}\n","import {\n\tCREATE_METHOD_DEFAULTS,\n\tIDEMPOTENT_METHOD_DEFAULTS,\n} from \"../../../internal/http/retry.ts\";\nimport { okRequest, type ResourceMethodSpec } from \"../../../internal/resource-client.ts\";\nimport {\n\tbuildGetRequest,\n\tbuildSubmitAtHeadRequest,\n\tbuildSubmitAtVersionRequest,\n} from \"./builders.ts\";\nimport {\n\tGET_OPERATION_LIMIT,\n\tGET_REQUIRED_SCOPES,\n\tSUBMIT_OPERATION_LIMIT,\n\tSUBMIT_REQUIRED_SCOPES,\n} from \"./operations.ts\";\nimport { parseLuauExecutionTaskResponse } from \"./parsers.ts\";\nimport type {\n\tGetParameters,\n\tLuauExecutionTask,\n\tSubmitAtHeadParameters,\n\tSubmitAtVersionParameters,\n} from \"./types.ts\";\n\nfunction makeSpec<P>(\n\tspec: ResourceMethodSpec<P, LuauExecutionTask>,\n): ResourceMethodSpec<P, LuauExecutionTask> {\n\treturn Object.freeze(spec);\n}\n\n/**\n * Per-method dispatch spec for submitting a Luau execution task at a\n * place's head version. Frozen at module scope so both the top-level\n * `LuauExecutionClient` and the `luauExecution` Operation Group on\n * `PlacesClient` share the same instance reference.\n */\nexport const SUBMIT_HEAD_SPEC = makeSpec<SubmitAtHeadParameters>({\n\tbuildRequest: (parameters) => okRequest(buildSubmitAtHeadRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: SUBMIT_OPERATION_LIMIT,\n\tparse: parseLuauExecutionTaskResponse,\n\trequiredScopes: SUBMIT_REQUIRED_SCOPES,\n});\n\n/**\n * Per-method dispatch spec for submitting a Luau execution task at a\n * specific place version. Shares the rate-limit queue and required\n * scope set with {@link SUBMIT_HEAD_SPEC} because Roblox attributes\n * both URL shapes to one per-minute quota.\n */\nexport const SUBMIT_VERSION_SPEC = makeSpec<SubmitAtVersionParameters>({\n\tbuildRequest: (parameters) => okRequest(buildSubmitAtVersionRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: SUBMIT_OPERATION_LIMIT,\n\tparse: parseLuauExecutionTaskResponse,\n\trequiredScopes: SUBMIT_REQUIRED_SCOPES,\n});\n\n/**\n * Per-method dispatch spec for fetching a Luau execution task. Uses\n * idempotent retry semantics (429 and 5xx both retried) so reads\n * recover transparently from transient server errors.\n */\nexport const GET_SPEC = makeSpec<GetParameters>({\n\tbuildRequest: buildGetRequest,\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseLuauExecutionTaskResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n","import type { RequestOptions } from \"../../client/types.ts\";\nimport type { LuauExecutionTask } from \"../../domains/cloud-v2/luau-execution-tasks/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { PollAbortedError } from \"../../errors/poll-aborted.ts\";\nimport { PollTimeoutError } from \"../../errors/poll-timeout.ts\";\nimport { defaultRetryDelay } from \"../../internal/http/retry.ts\";\nimport type { SleepFunc } from \"../../internal/utils/sleep.ts\";\nimport type { Result } from \"../../types.ts\";\n\n/** Default total polling budget in milliseconds (5 minutes). */\nexport const DEFAULT_POLL_TIMEOUT_MS = 300_000;\n\n/**\n * Injected dependencies for the deep-module polling loop. The `fetch`\n * callback is pre-bound by the wiring layer and closes over the task ref\n * and request options, keeping the core loop narrow.\n */\nexport interface PollDeps {\n\t/** Returns the current task or an error. Called on each loop iteration. */\n\treadonly fetch: () => Promise<Result<LuauExecutionTask, OpenCloudError>>;\n\t/** Returns the current wall-clock time in ms. */\n\treadonly now: () => number;\n\t/** Injectable sleep for deterministic tests. */\n\treadonly sleep: SleepFunc;\n}\n\n/** Public options accepted by `pollUntilDone` and `runUntilDone` on both client surfaces. */\nexport type PollUntilDoneOptions = PollOptions & RequestOptions;\n\n/** Caller-supplied polling-loop options; all fields optional. */\ninterface PollOptions {\n\t/** Returns the sleep duration for a given zero-indexed attempt. Defaults to {@link defaultRetryDelay}. */\n\treadonly pollDelay?: (attempt: number) => number;\n\t/** When aborted, the loop returns {@link PollAbortedError} rather than continuing. */\n\treadonly signal?: AbortSignal;\n\t/** Total wall-clock budget in ms before the loop returns {@link PollTimeoutError}. */\n\treadonly timeoutMs?: number;\n}\n\nconst ABORTED = Symbol(\"poll-aborted\");\ntype Aborted = typeof ABORTED;\n\ninterface AbortObserver {\n\treadonly cleanup: () => void;\n\treadonly promise: Promise<Aborted>;\n}\n\ninterface SleepWithAbortOptions {\n\treadonly ms: number;\n\treadonly signal: AbortSignal | undefined;\n\treadonly sleep: SleepFunc;\n}\n\ntype IterationOutcome =\n\t| { readonly done: false; readonly task: LuauExecutionTask }\n\t| { readonly done: true; readonly result: Result<LuauExecutionTask, OpenCloudError> };\n\ninterface PollIterationOptions {\n\treadonly delayMs: number;\n\treadonly deps: PollDeps;\n\treadonly signal: AbortSignal | undefined;\n}\n\n/**\n * Core polling loop. Calls `deps.fetch()` repeatedly, sleeping\n * `pollDelay(attempt)` ms between iterations, until a terminal state\n * is observed, the wall-clock budget is exhausted, or an `AbortSignal`\n * fires. Returns the terminal task on success.\n *\n * @param deps - Injected fetch, now, and sleep callbacks.\n * @param options - Optional poll delay, timeout, and abort signal.\n * @returns The terminal task, or an error if aborted, timed out, or the transport fails.\n */\nexport async function pollUntilDoneCore(\n\tdeps: PollDeps,\n\toptions: PollOptions = {},\n): Promise<Result<LuauExecutionTask, OpenCloudError>> {\n\tconst timeoutMs = options.timeoutMs ?? DEFAULT_POLL_TIMEOUT_MS;\n\tconst pollDelay = options.pollDelay ?? defaultRetryDelay;\n\tconst sig = options.signal;\n\tconst startedAt = deps.now();\n\tif (sig?.aborted === true) {\n\t\treturn abortedResult(sig);\n\t}\n\n\tlet lastTask: LuauExecutionTask | undefined;\n\tfor (let attempt = 0; ; attempt += 1) {\n\t\tif (deps.now() - startedAt >= timeoutMs) {\n\t\t\treturn { err: makeTimeout(lastTask, timeoutMs), success: false };\n\t\t}\n\n\t\tconst iteration = await pollIteration({ delayMs: pollDelay(attempt), deps, signal: sig });\n\t\tif (iteration.done) {\n\t\t\treturn iteration.result;\n\t\t}\n\n\t\tlastTask = iteration.task;\n\t}\n}\n\nfunction makeAborted(signal: AbortSignal | undefined): PollAbortedError {\n\treturn new PollAbortedError(\"Polling was aborted\", { reason: signal?.reason });\n}\n\nfunction abortedResult(signal: AbortSignal | undefined): Result<LuauExecutionTask, OpenCloudError> {\n\treturn { err: makeAborted(signal), success: false };\n}\n\nfunction isTerminal(task: LuauExecutionTask): boolean {\n\treturn task.state === \"COMPLETE\" || task.state === \"FAILED\" || task.state === \"CANCELLED\";\n}\n\nfunction abortObserver(signal: AbortSignal): AbortObserver {\n\tconst { promise, resolve } = Promise.withResolvers<Aborted>();\n\tfunction onAbort(): void {\n\t\tresolve(ABORTED);\n\t}\n\n\tsignal.addEventListener(\"abort\", onAbort);\n\tfunction cleanup(): void {\n\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t}\n\n\treturn { cleanup, promise };\n}\n\nasync function raceWithAbort<T>(\n\tpromise: Promise<T>,\n\tsignal: AbortSignal | undefined,\n): Promise<Aborted | T> {\n\tif (signal === undefined) {\n\t\treturn promise;\n\t}\n\n\tif (signal.aborted) {\n\t\treturn ABORTED;\n\t}\n\n\tconst observer = abortObserver(signal);\n\ttry {\n\t\treturn await Promise.race([promise, observer.promise]);\n\t} finally {\n\t\tobserver.cleanup();\n\t}\n}\n\nasync function sleepWithAbort(options: SleepWithAbortOptions): Promise<boolean> {\n\tconst { ms, signal, sleep } = options;\n\tconst raced = await raceWithAbort(sleep(ms), signal);\n\treturn raced === ABORTED;\n}\n\nasync function pollIteration(options: PollIterationOptions): Promise<IterationOutcome> {\n\tconst { delayMs, deps, signal } = options;\n\tconst fetchResult = await raceWithAbort(deps.fetch(), signal);\n\tif (fetchResult === ABORTED) {\n\t\treturn { done: true, result: abortedResult(signal) };\n\t}\n\n\tif (!fetchResult.success) {\n\t\treturn { done: true, result: fetchResult };\n\t}\n\n\tif (isTerminal(fetchResult.data)) {\n\t\treturn { done: true, result: { data: fetchResult.data, success: true } };\n\t}\n\n\tif (await sleepWithAbort({ ms: delayMs, signal, sleep: deps.sleep })) {\n\t\treturn { done: true, result: abortedResult(signal) };\n\t}\n\n\treturn { done: false, task: fetchResult.data };\n}\n\nfunction makeTimeout(\n\ttask: LuauExecutionTask | undefined,\n\ttimeoutMs: number,\n): PollTimeoutError<LuauExecutionTask> {\n\treturn new PollTimeoutError(`Polling timed out after ${timeoutMs} ms`, {\n\t\tlastObservedTask: task,\n\t\ttimeoutMs,\n\t});\n}\n","import {\n\tGET_SPEC,\n\tSUBMIT_HEAD_SPEC,\n\tSUBMIT_VERSION_SPEC,\n} from \"../../domains/cloud-v2/luau-execution-tasks/specs.ts\";\nimport type {\n\tLuauExecutionTask,\n\tLuauExecutionTaskRef,\n\tSubmitAtHeadParameters,\n\tSubmitAtVersionParameters,\n} from \"../../domains/cloud-v2/luau-execution-tasks/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport type { ResourceClient } from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\nimport { type PollDeps, pollUntilDoneCore, type PollUntilDoneOptions } from \"./polling.ts\";\n\n/**\n * Builds the {@link PollDeps} bundle used by {@link pollUntilDoneCore},\n * closing over the supplied {@link ResourceClient}, task ref, and\n * per-request options so the core loop stays narrow.\n *\n * @param inner - The {@link ResourceClient} that issues each `tasks.get` call.\n * @param args - The polling options and the task ref to fetch on every iteration.\n * @returns A {@link PollDeps} bundle wiring `fetch`, `now`, and `sleep`.\n */\nexport function buildPollDeps(\n\tinner: ResourceClient,\n\targs: { options: PollUntilDoneOptions; ref: LuauExecutionTaskRef },\n): PollDeps {\n\treturn {\n\t\tfetch: async () => {\n\t\t\treturn inner.execute({\n\t\t\t\toptions: args.options,\n\t\t\t\tparameters: { ref: args.ref, view: \"BASIC\" },\n\t\t\t\tspec: GET_SPEC,\n\t\t\t});\n\t\t},\n\t\tnow: Date.now,\n\t\tsleep: inner.sleep,\n\t};\n}\n\n/**\n * Submits a Luau execution task and polls it to a terminal state.\n * Dispatches to the head-version or specific-version submit spec based on\n * the presence of `versionId`, then delegates to {@link pollUntilDoneCore}.\n *\n * @param inner - The {@link ResourceClient} that issues submit and poll calls.\n * @param args - The polling options and submit parameters.\n * @returns A {@link Result} wrapping the terminal {@link LuauExecutionTask}, or\n * the {@link OpenCloudError} that caused submit or polling to fail.\n */\nexport async function submitAndPoll(\n\tinner: ResourceClient,\n\targs: {\n\t\toptions: PollUntilDoneOptions;\n\t\tparameters: SubmitAtHeadParameters | SubmitAtVersionParameters;\n\t},\n): Promise<Result<LuauExecutionTask, OpenCloudError>> {\n\tconst { options, parameters } = args;\n\tconst submitResult = await (\"versionId\" in parameters\n\t\t? inner.execute({ options, parameters, spec: SUBMIT_VERSION_SPEC })\n\t\t: inner.execute({ options, parameters, spec: SUBMIT_HEAD_SPEC }));\n\tif (!submitResult.success) {\n\t\treturn submitResult;\n\t}\n\n\treturn pollUntilDoneCore(\n\t\tbuildPollDeps(inner, { options, ref: submitResult.data.ref }),\n\t\toptions,\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,qBACf,YACuC;CACvC,MAAM,EAAE,UAAU,WAAW,QAAQ;CACrC,MAAM,EAAE,SAAS,WAAW,QAAQ,YAAY,cAAc;AAE9D,KAAI,cAAc,KAAA,EACjB,QAAO;EACN,KAAK,IAAI,gBAAgB,mDAAmD,EAC3E,MAAM,kBACN,CAAC;EACF,SAAS;EACT;AAGF,KAAI,cAAc,KAAA,EACjB,QAAO;EACN,KAAK,IAAI,gBAAgB,mDAAmD,EAC3E,MAAM,kBACN,CAAC;EACF,SAAS;EACT;AAKF,QAAO;EAAE,MAAM;GAAE,QAAQ;GAAO,KADpB,GADC,uBAAuB,WAAW,UAAU,QAAQ,YAAY,UAAU,2BAA2B,UAAU,SAAS,OAAO,OACxH,GAAG,WAAW,UAAU,UAAU,CAAC,UAAU;GAC5B;EAAE,SAAS;EAAM;;AAGvD,SAAS,WAAW,UAA8B,WAAgD;CACjG,MAAM,QAAQ,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEzD,KAAI,aAAa,KAAA,EAChB,OAAM,OAAO,eAAe,OAAO,SAAS,CAAC;AAG9C,KAAI,cAAc,KAAA,EACjB,OAAM,OAAO,aAAa,UAAU;AAGrC,QAAO;;;;;;;;ACnDR,MAAa,4BAA4C,OAAO,O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