@bedrock-rbx/ocale 0.1.0-beta.8 → 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 +316 -31
- package/dist/storage.d.mts.map +1 -1
- package/dist/storage.mjs +525 -24
- 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/game-passes.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-passes.mjs","names":["buildUpdateRequest","buildLocaleNameDescRequest","#inner"],"sources":["../src/domains/game-internationalization/game-pass-icon/builders.ts","../src/domains/game-internationalization/game-pass-name-description/builders.ts","../src/domains/game-internationalization/game-pass-name-description/operations.ts","../src/domains/game-passes/game-passes/builders.ts","../src/domains/game-passes/game-passes/operations.ts","../src/domains/game-passes/game-passes/parsers.ts","../src/resources/game-passes/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadGamePassIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload game-pass icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(gamePassId, languageCode)` pair.\n *\n * @param parameters - Game pass and language identifiers plus the image\n * bytes to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(parameters: UploadGamePassIconParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/game-passes/${parameters.gamePassId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateGamePassNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update game-pass\n * name/description\" endpoint. Either `name`, `description`, or both may be\n * supplied; omitted fields are not included in the JSON body so the server\n * leaves the existing value for that locale untouched.\n *\n * @param parameters - Game pass and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateGamePassNameDescriptionParameters,\n): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/game-passes/${parameters.gamePassId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every game-pass localization Operation.\n * The legacy `gameinternationalization` service caps each API key at 100\n * requests per minute *shared across the entire service* (see the\n * `x-roblox-rate-limits` extension on every operation in the vendored Open\n * Cloud spec), so all game-pass localization methods queue against the same\n * operation key.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"game-pass-localization\",\n});\n\n/**\n * Scopes required for every game-pass localization operation, sourced\n * from `x-roblox-scopes` on the legacy `gameinternationalization`\n * game-pass endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-game-pass:manage\",\n]);\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tCreateGamePassParameters,\n\tGetGamePassParameters,\n\tListGamePassesParameters,\n\tUpdateGamePassParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `GET` request for the Open Cloud \"read game pass\" endpoint.\n *\n * @param parameters - Universe and game pass identifiers to interpolate into\n * the URL.\n * @returns A pure {@link HttpRequest} describing the read call.\n */\nexport function buildGetRequest(parameters: GetGamePassParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes/${parameters.gamePassId}/creator`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud \"list game passes\" endpoint.\n * Optional `pageSize` and `pageToken` are appended to the query string only\n * when defined so the server applies its own defaults for omitted fields.\n *\n * @param parameters - Universe identifier plus optional pagination cursors.\n * @returns A pure {@link HttpRequest} describing the list call.\n */\nexport function buildListRequest(parameters: ListGamePassesParameters): HttpRequest {\n\tconst query = new URLSearchParams();\n\tif (parameters.pageSize !== undefined) {\n\t\tquery.append(\"pageSize\", String(parameters.pageSize));\n\t}\n\n\tif (parameters.pageToken !== undefined) {\n\t\tquery.append(\"pageToken\", parameters.pageToken);\n\t}\n\n\tconst queryString = query.toString();\n\tconst base = `/game-passes/v1/universes/${parameters.universeId}/game-passes/creator`;\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: queryString === \"\" ? base : `${base}?${queryString}`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the Open Cloud \"create game pass\" endpoint.\n *\n * @param parameters - Fields describing the new game pass; optional values\n * omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateGamePassParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update game pass\" endpoint.\n * Every field on `parameters` except the identifiers is optional;\n * omitted fields are not appended to the multipart body so the server\n * leaves their current values unchanged.\n *\n * The public parameter `imageFile` is mapped to the wire's `file`\n * multipart field name, matching the OpenAPI schema for this endpoint\n * (the create endpoint uses `imageFile`, but the update endpoint uses\n * `file`). Public consumers stay with one ergonomic name across both\n * methods.\n *\n * @param parameters - Identifiers plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateGamePassParameters): HttpRequest {\n\tconst body = new FormData();\n\tif (parameters.name !== undefined) {\n\t\tbody.append(\"name\", parameters.name);\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"file\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes/${parameters.gamePassId}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for reading a single game pass, from the\n * Open Cloud OpenAPI schema.\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"game-passes.get\",\n});\n\n/**\n * Per-second request ceiling for creating a game pass, from the Open\n * Cloud OpenAPI schema.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 5,\n\toperationKey: \"game-passes.create\",\n});\n\n/**\n * Per-second request ceiling for updating a game pass, from the Open\n * Cloud OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a\n * queue, since the schema does not document the per-second quota as\n * shared between the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 5,\n\toperationKey: \"game-passes.update\",\n});\n\n/**\n * Per-second request ceiling for listing game passes for a universe,\n * from the Open Cloud OpenAPI schema.\n */\nexport const LIST_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"game-passes.list\",\n});\n\n/**\n * Scopes required to read a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_GetGamePassConfig` operation in the vendored\n * OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:read\"]);\n\n/**\n * Scopes required to create a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_CreateGamePass` operation in the vendored OpenAPI\n * schema.\n */\nexport const CREATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:write\"]);\n\n/**\n * Scopes required to update a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_UpdateGamePass` operation in the vendored OpenAPI\n * schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:write\"]);\n\n/**\n * Scopes required to list game passes for a universe, sourced from\n * `x-roblox-scopes` on the `GamePasses_ListGamePassConfigsByUniverse`\n * operation in the vendored OpenAPI schema.\n */\nexport const LIST_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:read\"]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport {\n\tcopyPriceInformation,\n\tisPriceInformationLike,\n} from \"../../../internal/price-information.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Page, Result } from \"../../../types.ts\";\nimport type { GamePass } from \"./types.ts\";\nimport type {\n\tGamePassConfigV2,\n\tListGamePassConfigsByUniverseResponseWire,\n\tPricingFeatureWire,\n} from \"./wire.ts\";\n\n/**\n * Parses a successful Game Pass API response into the public `GamePass`\n * shape, returning a `Result` so callers can handle malformed payloads\n * without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `ApiError` when validation\n * fails; the headers are available for future parsers that need them.\n * @returns A success result wrapping the converted `GamePass`, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseGamePassResponse(response: HttpResponse): Result<GamePass, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isGamePassConfigV2(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed game pass response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn { data: toGamePass(body), success: true };\n}\n\n/**\n * Parses a successful \"list game passes\" response into a public\n * {@link Page} of {@link GamePass}, returning a `Result` so callers can\n * handle malformed payloads without exceptions. JSON `null` or a missing\n * `nextPageToken` is normalized to `undefined`.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the converted page, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseGamePassesListResponse(\n\tresponse: HttpResponse,\n): Result<Page<GamePass>, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isListResponseWire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed game passes list response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\titems: body.gamePasses.map(toGamePass),\n\t\t\tnextPageToken: body.nextPageToken ?? undefined,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction toGamePass(wire: GamePassConfigV2): GamePass {\n\tconst priceWire = wire.priceInformation ?? undefined;\n\treturn {\n\t\tid: String(wire.gamePassId),\n\t\tname: wire.name,\n\t\tcreatedAt: new Date(wire.createdTimestamp),\n\t\tdescription: wire.description,\n\t\ticonAssetId: wire.iconAssetId === 0 ? undefined : String(wire.iconAssetId),\n\t\tisForSale: wire.isForSale,\n\t\tprice: priceWire === undefined ? undefined : copyPriceInformation(priceWire),\n\t\tupdatedAt: new Date(wire.updatedTimestamp),\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"gamePassId\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"isForSale\"] === \"boolean\" &&\n\t\ttypeof body[\"iconAssetId\"] === \"number\" &&\n\t\tisDateTimeString(body[\"createdTimestamp\"]) &&\n\t\tisDateTimeString(body[\"updatedTimestamp\"])\n\t);\n}\n\nfunction isPricingFeatureWire(value: unknown): value is PricingFeatureWire {\n\treturn (\n\t\tvalue === \"Invalid\" ||\n\t\tvalue === \"PriceOptimization\" ||\n\t\tvalue === \"RegionalPricing\" ||\n\t\tvalue === \"UserFixedPrice\"\n\t);\n}\n\nfunction isGamePassConfigV2(body: unknown): body is GamePassConfigV2 {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tconst price = body[\"priceInformation\"] ?? undefined;\n\tif (price !== undefined && !isPriceInformationLike(price, isPricingFeatureWire)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nfunction isListResponseWire(body: unknown): body is ListGamePassConfigsByUniverseResponseWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { gamePasses } = body;\n\tif (!Array.isArray(gamePasses)) {\n\t\treturn false;\n\t}\n\n\tfor (const item of gamePasses) {\n\t\tif (!isGamePassConfigV2(item)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tconst nextPageToken = body[\"nextPageToken\"] ?? undefined;\n\tif (nextPageToken !== undefined && typeof nextPageToken !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/game-internationalization/game-pass-icon/builders.ts\";\nimport type { UploadGamePassIconParameters } from \"../../domains/game-internationalization/game-pass-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/game-pass-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/game-pass-name-description/operations.ts\";\nimport type { UpdateGamePassNameDescriptionParameters } from \"../../domains/game-internationalization/game-pass-name-description/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildGetRequest,\n\tbuildListRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/game-passes/game-passes/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tCREATE_REQUIRED_SCOPES,\n\tGET_OPERATION_LIMIT,\n\tGET_REQUIRED_SCOPES,\n\tLIST_OPERATION_LIMIT,\n\tLIST_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/game-passes/game-passes/operations.ts\";\nimport {\n\tparseGamePassesListResponse,\n\tparseGamePassResponse,\n} from \"../../domains/game-passes/game-passes/parsers.ts\";\nimport type {\n\tCreateGamePassParameters,\n\tGamePass,\n\tGetGamePassParameters,\n\tListGamePassesParameters,\n\tUpdateGamePassParameters,\n} from \"../../domains/game-passes/game-passes/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Page, Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateGamePassParameters, GamePass>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseGamePassResponse,\n\trequiredScopes: CREATE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetGamePassParameters, GamePass>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseGamePassResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateGamePassParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\nconst LIST_SPEC = makeSpec<ListGamePassesParameters, Page<GamePass>>({\n\tbuildRequest: (parameters) => okRequest(buildListRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LIST_OPERATION_LIMIT,\n\tparse: parseGamePassesListResponse,\n\trequiredScopes: LIST_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<UpdateGamePassNameDescriptionParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadGamePassIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface GamePassLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a game pass. Either `name`, `description`, or both may be supplied;\n\t * omitted fields are not forwarded so the server leaves the existing value\n\t * for that locale untouched. Mirrors the upstream `200 OK` echo body as\n\t * `undefined` data.\n\t *\n\t * @param parameters - Game pass and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateGamePassNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a game pass. A subsequent\n\t * upload for the same `(gamePassId, languageCode)` pair replaces the\n\t * existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * @param parameters - Game pass and language identifiers plus the image\n\t * bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadGamePassIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Game Passes API.\n *\n * Wires request builders, the injected {@link OpenCloudClientOptions.httpClient}, and response\n * parsers into a single ergonomic surface. Every method returns a\n * {@link Result} so callers handle failure explicitly; no thrown\n * `OpenCloudError` ever escapes the client.\n *\n * ```ts\n * import { GamePassesClient } from \"@bedrock-rbx/ocale/game-passes\";\n *\n * const client = new GamePassesClient({ apiKey: process.env.ROBLOX_API_KEY! });\n *\n * const result = await client.get({\n * universeId: \"1234567890\",\n * gamePassId: \"9876543210\",\n * });\n *\n * if (result.success) {\n * console.log(`${result.data.name} (${result.data.id})`);\n * } else {\n * console.error(result.err.message);\n * }\n * ```\n *\n * Listing is cursor-paginated; drive the loop on `nextPageToken`:\n *\n * ```ts\n * let pageToken: string | undefined;\n * do {\n * const page = await client.list({ universeId: \"1234567890\", pageToken });\n * if (!page.success) {\n * console.error(page.err.message);\n * break;\n * }\n *\n * for (const pass of page.data.items) {\n * console.log(`${pass.name} (${pass.id})`);\n * }\n *\n * pageToken = page.data.nextPageToken;\n * } while (pageToken !== undefined);\n * ```\n */\nexport class GamePassesClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link GamePassesClient.update}; methods on this group set\n\t * per-locale overlays on top. Shares the parent client's HTTP,\n\t * rate-limit, and retry plumbing.\n\t */\n\tpublic readonly localization: GamePassLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link GamePassesClient}. Configuration is frozen on\n\t * construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new game pass under the supplied universe.\n\t *\n\t * @param parameters - Creation fields including the universe and pass name.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link GamePass} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<GamePass, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single game pass by ID.\n\t *\n\t * @param parameters - Universe and game pass identifiers.\n\t * @param options - Optional per-request overrides (e.g. A different\n\t * {@link OpenCloudClientOptions.apiKey} for this call only).\n\t * @returns A {@link Result} wrapping the parsed {@link GamePass} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<GamePass, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Lists one page of game passes for the supplied universe. Pagination is\n\t * cursor-based: omit `pageToken` for the first page, then thread the\n\t * previous response's `nextPageToken` back in until it is `undefined`.\n\t *\n\t * @param parameters - Universe identifier and optional page cursors.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping a {@link Page} of {@link GamePass},\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async list(\n\t\tparameters: ListGamePassesParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Page<GamePass>, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: LIST_SPEC });\n\t}\n\n\t/**\n\t * Partially updates an existing game pass. Mirrors the upstream\n\t * `204 No Content` response: a successful update yields `undefined`\n\t * data. Callers that need the post-update state (for example to\n\t * observe a server-derived `updatedAt`) chain\n\t * {@link GamePassesClient.get} themselves so the GET only fires when\n\t * actually needed.\n\t *\n\t * @param parameters - The universe and game pass identifiers and the\n\t * fields to update. Only fields explicitly provided are forwarded.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): GamePassLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,uBAAuB,YAAuD;CAC7F,MAAM,OAAO,IAAI,UAAU;AAC3B,MAAK,OAAO,SAAS,OAAO,WAAW,MAAM,CAAC;AAE9C,QAAO;EACN;EACA,QAAQ;EACR,KAAK,oDAAoD,WAAW,WAAW,wBAAwB,WAAW;EAClH;;;;;;;;;;;;;;ACRF,SAAgBA,qBACf,YACc;CACd,MAAM,OAA+B,EAAE;AACvC,KAAI,WAAW,SAAS,KAAA,EACvB,MAAK,UAAU,WAAW;AAG3B,KAAI,WAAW,gBAAgB,KAAA,EAC9B,MAAK,iBAAiB,WAAW;AAGlC,QAAO;EACN;EACA,QAAQ;EACR,KAAK,oDAAoD,WAAW,WAAW,mCAAmC,WAAW;EAC7H;;;;;;;;;;;;ACnBF,MAAa,+BAA+C,OAAO,OAAO;CACzE,cAAc,MAAM;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BAAmB,SAAkD;CAC1E,eAAe,eAAe,UAAU,uBAAuB,WAAW,CAAC;CAC3E,gBAAgB;CAChB,YAAY;CACZ,gBAAgB;CAChB,OAAO;CACP,gBAAgB;CAChB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFF,IAAa,mBAAb,MAA8B;CAC7B;;;;;;;;;CAUA;;;;;;;CAQA,YAAY,SAAiC;AAC5C,QAAA,QAAc,IAAI,eAAe,QAAQ;AACzC,OAAK,eAAe,yBAAyB,MAAA,MAAY;;;;;;;;;;CAW1D,MAAa,OACZ,YACA,SAC4C;AAC5C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;CAYvE,MAAa,IACZ,YACA,SAC4C;AAC5C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAU,CAAC;;;;;;;;;;;;CAapE,MAAa,KACZ,YACA,SACkD;AAClD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAW,CAAC;;;;;;;;;;;;;;;;CAiBrE,MAAa,OACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;AAIxE,SAAS,yBAAyB,OAAmD;AACpF,QAAO;EACN,MAAM,sBAAsB,YAAY,SAAS;AAChD,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAA8B,CAAC;;EAElF,MAAM,WAAW,YAAY,SAAS;AACrC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE"}
|
|
1
|
+
{"version":3,"file":"game-passes.mjs","names":["buildUpdateRequest","buildLocaleNameDescRequest","#inner"],"sources":["../src/domains/game-internationalization/game-pass-icon/builders.ts","../src/domains/game-internationalization/game-pass-name-description/builders.ts","../src/domains/game-internationalization/game-pass-name-description/operations.ts","../src/domains/game-passes/game-passes/builders.ts","../src/domains/game-passes/game-passes/operations.ts","../src/domains/game-passes/game-passes/parsers.ts","../src/resources/game-passes/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadGamePassIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload game-pass icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(gamePassId, languageCode)` pair.\n *\n * @param parameters - Game pass and language identifiers plus the image\n * bytes to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(parameters: UploadGamePassIconParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/game-passes/${parameters.gamePassId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateGamePassNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update game-pass\n * name/description\" endpoint. Either `name`, `description`, or both may be\n * supplied; omitted fields are not included in the JSON body so the server\n * leaves the existing value for that locale untouched.\n *\n * @param parameters - Game pass and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateGamePassNameDescriptionParameters,\n): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/game-passes/${parameters.gamePassId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every game-pass localization Operation.\n * The legacy `gameinternationalization` service caps each API key at 100\n * requests per minute *shared across the entire service* (see the\n * `x-roblox-rate-limits` extension on every operation in the vendored Open\n * Cloud spec), so all game-pass localization methods queue against the same\n * operation key.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"game-pass-localization\",\n});\n\n/**\n * Scopes required for every game-pass localization operation, sourced\n * from `x-roblox-scopes` on the legacy `gameinternationalization`\n * game-pass endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-game-pass:manage\",\n]);\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tCreateGamePassParameters,\n\tGetGamePassParameters,\n\tListGamePassesParameters,\n\tUpdateGamePassParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `GET` request for the Open Cloud \"read game pass\" endpoint.\n *\n * @param parameters - Universe and game pass identifiers to interpolate into\n * the URL.\n * @returns A pure {@link HttpRequest} describing the read call.\n */\nexport function buildGetRequest(parameters: GetGamePassParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes/${parameters.gamePassId}/creator`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud \"list game passes\" endpoint.\n * Optional `pageSize` and `pageToken` are appended to the query string only\n * when defined so the server applies its own defaults for omitted fields.\n *\n * @param parameters - Universe identifier plus optional pagination cursors.\n * @returns A pure {@link HttpRequest} describing the list call.\n */\nexport function buildListRequest(parameters: ListGamePassesParameters): HttpRequest {\n\tconst query = new URLSearchParams();\n\tif (parameters.pageSize !== undefined) {\n\t\tquery.append(\"pageSize\", String(parameters.pageSize));\n\t}\n\n\tif (parameters.pageToken !== undefined) {\n\t\tquery.append(\"pageToken\", parameters.pageToken);\n\t}\n\n\tconst queryString = query.toString();\n\tconst base = `/game-passes/v1/universes/${parameters.universeId}/game-passes/creator`;\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: queryString === \"\" ? base : `${base}?${queryString}`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the Open Cloud \"create game pass\" endpoint.\n *\n * @param parameters - Fields describing the new game pass; optional values\n * omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateGamePassParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update game pass\" endpoint.\n * Every field on `parameters` except the identifiers is optional;\n * omitted fields are not appended to the multipart body so the server\n * leaves their current values unchanged.\n *\n * The public parameter `imageFile` is mapped to the wire's `file`\n * multipart field name, matching the OpenAPI schema for this endpoint\n * (the create endpoint uses `imageFile`, but the update endpoint uses\n * `file`). Public consumers stay with one ergonomic name across both\n * methods.\n *\n * @param parameters - Identifiers plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateGamePassParameters): HttpRequest {\n\tconst body = new FormData();\n\tif (parameters.name !== undefined) {\n\t\tbody.append(\"name\", parameters.name);\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"file\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/game-passes/v1/universes/${parameters.universeId}/game-passes/${parameters.gamePassId}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for reading a single game pass, from the\n * Open Cloud OpenAPI schema.\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"game-passes.get\",\n});\n\n/**\n * Per-second request ceiling for creating a game pass, from the Open\n * Cloud OpenAPI schema.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 5,\n\toperationKey: \"game-passes.create\",\n});\n\n/**\n * Per-second request ceiling for updating a game pass, from the Open\n * Cloud OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a\n * queue, since the schema does not document the per-second quota as\n * shared between the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 5,\n\toperationKey: \"game-passes.update\",\n});\n\n/**\n * Per-second request ceiling for listing game passes for a universe,\n * from the Open Cloud OpenAPI schema.\n */\nexport const LIST_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"game-passes.list\",\n});\n\n/**\n * Scopes required to read a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_GetGamePassConfig` operation in the vendored\n * OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:read\"]);\n\n/**\n * Scopes required to create a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_CreateGamePass` operation in the vendored OpenAPI\n * schema.\n */\nexport const CREATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:write\"]);\n\n/**\n * Scopes required to update a game pass, sourced from `x-roblox-scopes`\n * on the `GamePasses_UpdateGamePass` operation in the vendored OpenAPI\n * schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:write\"]);\n\n/**\n * Scopes required to list game passes for a universe, sourced from\n * `x-roblox-scopes` on the `GamePasses_ListGamePassConfigsByUniverse`\n * operation in the vendored OpenAPI schema.\n */\nexport const LIST_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"game-pass:read\"]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport {\n\tcopyPriceInformation,\n\tisPriceInformationLike,\n} from \"../../../internal/price-information.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Page, Result } from \"../../../types.ts\";\nimport type { GamePass } from \"./types.ts\";\nimport type {\n\tGamePassConfigV2,\n\tListGamePassConfigsByUniverseResponseWire,\n\tPricingFeatureWire,\n} from \"./wire.ts\";\n\n/**\n * Parses a successful Game Pass API response into the public `GamePass`\n * shape, returning a `Result` so callers can handle malformed payloads\n * without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `ApiError` when validation\n * fails; the headers are available for future parsers that need them.\n * @returns A success result wrapping the converted `GamePass`, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseGamePassResponse(response: HttpResponse): Result<GamePass, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isGamePassConfigV2(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed game pass response\", {\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 { data: toGamePass(body), success: true };\n}\n\n/**\n * Parses a successful \"list game passes\" response into a public\n * {@link Page} of {@link GamePass}, returning a `Result` so callers can\n * handle malformed payloads without exceptions. JSON `null` or a missing\n * `nextPageToken` is normalized to `undefined`.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the converted page, or an\n * `ApiError` when the body does not match the wire schema.\n */\nexport function parseGamePassesListResponse(\n\tresponse: HttpResponse,\n): Result<Page<GamePass>, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isListResponseWire(body)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed game passes list response\", {\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: {\n\t\t\titems: body.gamePasses.map(toGamePass),\n\t\t\tnextPageToken: body.nextPageToken ?? undefined,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction toGamePass(wire: GamePassConfigV2): GamePass {\n\tconst priceWire = wire.priceInformation ?? undefined;\n\treturn {\n\t\tid: String(wire.gamePassId),\n\t\tname: wire.name,\n\t\tcreatedAt: new Date(wire.createdTimestamp),\n\t\tdescription: wire.description,\n\t\ticonAssetId: wire.iconAssetId === 0 ? undefined : String(wire.iconAssetId),\n\t\tisForSale: wire.isForSale,\n\t\tprice: priceWire === undefined ? undefined : copyPriceInformation(priceWire),\n\t\tupdatedAt: new Date(wire.updatedTimestamp),\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"gamePassId\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"isForSale\"] === \"boolean\" &&\n\t\ttypeof body[\"iconAssetId\"] === \"number\" &&\n\t\tisDateTimeString(body[\"createdTimestamp\"]) &&\n\t\tisDateTimeString(body[\"updatedTimestamp\"])\n\t);\n}\n\nfunction isPricingFeatureWire(value: unknown): value is PricingFeatureWire {\n\treturn (\n\t\tvalue === \"Invalid\" ||\n\t\tvalue === \"PriceOptimization\" ||\n\t\tvalue === \"RegionalPricing\" ||\n\t\tvalue === \"UserFixedPrice\"\n\t);\n}\n\nfunction isGamePassConfigV2(body: unknown): body is GamePassConfigV2 {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tconst price = body[\"priceInformation\"] ?? undefined;\n\tif (price !== undefined && !isPriceInformationLike(price, isPricingFeatureWire)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nfunction isListResponseWire(body: unknown): body is ListGamePassConfigsByUniverseResponseWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { gamePasses } = body;\n\tif (!Array.isArray(gamePasses)) {\n\t\treturn false;\n\t}\n\n\tfor (const item of gamePasses) {\n\t\tif (!isGamePassConfigV2(item)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tconst nextPageToken = body[\"nextPageToken\"] ?? undefined;\n\tif (nextPageToken !== undefined && typeof nextPageToken !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/game-internationalization/game-pass-icon/builders.ts\";\nimport type { UploadGamePassIconParameters } from \"../../domains/game-internationalization/game-pass-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/game-pass-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/game-pass-name-description/operations.ts\";\nimport type { UpdateGamePassNameDescriptionParameters } from \"../../domains/game-internationalization/game-pass-name-description/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildGetRequest,\n\tbuildListRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/game-passes/game-passes/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tCREATE_REQUIRED_SCOPES,\n\tGET_OPERATION_LIMIT,\n\tGET_REQUIRED_SCOPES,\n\tLIST_OPERATION_LIMIT,\n\tLIST_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/game-passes/game-passes/operations.ts\";\nimport {\n\tparseGamePassesListResponse,\n\tparseGamePassResponse,\n} from \"../../domains/game-passes/game-passes/parsers.ts\";\nimport type {\n\tCreateGamePassParameters,\n\tGamePass,\n\tGetGamePassParameters,\n\tListGamePassesParameters,\n\tUpdateGamePassParameters,\n} from \"../../domains/game-passes/game-passes/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Page, Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateGamePassParameters, GamePass>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseGamePassResponse,\n\trequiredScopes: CREATE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetGamePassParameters, GamePass>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseGamePassResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateGamePassParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\nconst LIST_SPEC = makeSpec<ListGamePassesParameters, Page<GamePass>>({\n\tbuildRequest: (parameters) => okRequest(buildListRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LIST_OPERATION_LIMIT,\n\tparse: parseGamePassesListResponse,\n\trequiredScopes: LIST_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<UpdateGamePassNameDescriptionParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadGamePassIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface GamePassLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a game pass. Either `name`, `description`, or both may be supplied;\n\t * omitted fields are not forwarded so the server leaves the existing value\n\t * for that locale untouched. Mirrors the upstream `200 OK` echo body as\n\t * `undefined` data.\n\t *\n\t * @param parameters - Game pass and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateGamePassNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a game pass. A subsequent\n\t * upload for the same `(gamePassId, languageCode)` pair replaces the\n\t * existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * 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 - Game pass and language identifiers plus the image\n\t * bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadGamePassIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Game Passes API.\n *\n * Wires request builders, the injected {@link OpenCloudClientOptions.httpClient}, and response\n * parsers into a single ergonomic surface. Every method returns a\n * {@link Result} so callers handle failure explicitly; no thrown\n * `OpenCloudError` ever escapes the client.\n *\n * ```ts\n * import { GamePassesClient } from \"@bedrock-rbx/ocale/game-passes\";\n *\n * const client = new GamePassesClient({ apiKey: process.env.ROBLOX_API_KEY! });\n *\n * const result = await client.get({\n * universeId: \"1234567890\",\n * gamePassId: \"9876543210\",\n * });\n *\n * if (result.success) {\n * console.log(`${result.data.name} (${result.data.id})`);\n * } else {\n * console.error(result.err.message);\n * }\n * ```\n *\n * Listing is cursor-paginated; drive the loop on `nextPageToken`:\n *\n * ```ts\n * let pageToken: string | undefined;\n * do {\n * const page = await client.list({ universeId: \"1234567890\", pageToken });\n * if (!page.success) {\n * console.error(page.err.message);\n * break;\n * }\n *\n * for (const pass of page.data.items) {\n * console.log(`${pass.name} (${pass.id})`);\n * }\n *\n * pageToken = page.data.nextPageToken;\n * } while (pageToken !== undefined);\n * ```\n *\n * @since 0.1.0\n *\n * @example\n *\n * ```ts\n * import { GamePassesClient } from \"@bedrock-rbx/ocale/game-passes\";\n *\n * const client = new GamePassesClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(GamePassesClient);\n * ```\n */\nexport class GamePassesClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link GamePassesClient.update}; methods on this group set\n\t * per-locale overlays on top. Shares the parent client's HTTP,\n\t * rate-limit, and retry plumbing.\n\t */\n\tpublic readonly localization: GamePassLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link GamePassesClient}. Configuration is frozen on\n\t * construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new game pass under the supplied universe.\n\t *\n\t * 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 - Creation fields including the universe and pass name.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link GamePass} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<GamePass, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single game pass by ID.\n\t *\n\t * @param parameters - Universe and game pass identifiers.\n\t * @param options - Optional per-request overrides (e.g. A different\n\t * {@link OpenCloudClientOptions.apiKey} for this call only).\n\t * @returns A {@link Result} wrapping the parsed {@link GamePass} or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<GamePass, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Lists one page of game passes for the supplied universe. Pagination is\n\t * cursor-based: omit `pageToken` for the first page, then thread the\n\t * previous response's `nextPageToken` back in until it is `undefined`.\n\t *\n\t * @param parameters - Universe identifier and optional page cursors.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping a {@link Page} of {@link GamePass},\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async list(\n\t\tparameters: ListGamePassesParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Page<GamePass>, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: LIST_SPEC });\n\t}\n\n\t/**\n\t * Partially updates an existing game pass. Mirrors the upstream\n\t * `204 No Content` response: a successful update yields `undefined`\n\t * data. Callers that need the post-update state (for example to\n\t * observe a server-derived `updatedAt`) chain\n\t * {@link GamePassesClient.get} themselves so the GET only fires when\n\t * actually needed.\n\t *\n\t * 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 - The universe and game pass identifiers and the\n\t * fields to update. Only fields explicitly provided are forwarded.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateGamePassParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): GamePassLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;AAaA,SAAgB,uBAAuB,YAAuD;CAC7F,MAAM,OAAO,IAAI,SAAS;CAC1B,KAAK,OAAO,SAAS,OAAO,WAAW,KAAK,CAAC;CAE7C,OAAO;EACN;EACA,QAAQ;EACR,KAAK,oDAAoD,WAAW,WAAW,wBAAwB,WAAW;CACnH;AACD;;;;;;;;;;;;;ACTA,SAAgBA,qBACf,YACc;CACd,MAAM,OAA+B,CAAC;CACtC,IAAI,WAAW,SAAS,KAAA,GACvB,KAAK,UAAU,WAAW;CAG3B,IAAI,WAAW,gBAAgB,KAAA,GAC9B,KAAK,iBAAiB,WAAW;CAGlC,OAAO;EACN;EACA,QAAQ;EACR,KAAK,oDAAoD,WAAW,WAAW,mCAAmC,WAAW;CAC9H;AACD;;;;;;;;;;;ACpBA,MAAa,+BAA+C,OAAO,OAAO;CACzE,cAAc,MAAM;CACpB,cAAc;AACf,CAAC;;;;;;AAOD,MAAa,+BAAsD,OAAO,OAAO,CAChF,yBACD,CAAC;;;;;;;;;;ACND,SAAgB,gBAAgB,YAAgD;CAC/E,OAAO;EACN,QAAQ;EACR,KAAK,6BAA6B,WAAW,WAAW,eAAe,WAAW,WAAW;CAC9F;AACD;;;;;;;;;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGD,IAAa,mBAAb,MAA8B;CAC7B;;;;;;;;;CAUA;;;;;;;CAQA,YAAY,SAAiC;EAC5C,KAAKC,SAAS,IAAI,eAAe,OAAO;EACxC,KAAK,eAAe,yBAAyB,KAAKA,MAAM;CACzD;;;;;;;;;;;;CAaA,MAAa,OACZ,YACA,SAC4C;EAC5C,OAAO,KAAKA,OAAO,QAAQ;GAAE;GAAS;GAAY,MAAM;EAAY,CAAC;CACtE;;;;;;;;;;CAWA,MAAa,IACZ,YACA,SAC4C;EAC5C,OAAO,KAAKA,OAAO,QAAQ;GAAE;GAAS;GAAY,MAAM;EAAS,CAAC;CACnE;;;;;;;;;;;CAYA,MAAa,KACZ,YACA,SACkD;EAClD,OAAO,KAAKA,OAAO,QAAQ;GAAE;GAAS;GAAY,MAAM;EAAU,CAAC;CACpE;;;;;;;;;;;;;;;;;;CAmBA,MAAa,OACZ,YACA,SAC6C;EAC7C,OAAO,KAAKA,OAAO,QAAQ;GAAE;GAAS;GAAY,MAAM;EAAY,CAAC;CACtE;AACD;AAEA,SAAS,yBAAyB,OAAmD;CACpF,OAAO;EACN,MAAM,sBAAsB,YAAY,SAAS;GAChD,OAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;GAA6B,CAAC;EACjF;EACA,MAAM,WAAW,YAAY,SAAS;GACrC,OAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;GAAiB,CAAC;EACrE;CACD;AACD"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import { a as OpenCloudHooks, c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, n as HttpRequest, o as RequestConfig, r as HttpResponse, s as RequestOptions, t as HttpClient, u as SleepFunc } from "./types-
|
|
2
|
-
import { i as ApiErrorOptions,
|
|
1
|
+
import { a as OpenCloudHooks, c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, n as HttpRequest, o as RequestConfig, r as HttpResponse, s as RequestOptions, t as HttpClient, u as SleepFunc } from "./types-CRiJg5EQ.mjs";
|
|
2
|
+
import { a as RateLimitErrorOptions, c as ApiError, i as RateLimitError, l as ApiErrorOptions, o as NetworkError, r as TRANSIENT_TRANSPORT_CODES, s as NetworkErrorOptions } from "./retry-r1TXe5Zd.mjs";
|
|
3
3
|
|
|
4
|
-
//#region src/errors/network-error.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Thrown when a network-level failure prevents the request from reaching
|
|
7
|
-
* the Roblox Open Cloud API (e.g., DNS resolution failure, connection timeout).
|
|
8
|
-
*/
|
|
9
|
-
declare class NetworkError extends OpenCloudError {
|
|
10
|
-
override readonly name: string;
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
4
|
//#region src/errors/permission-error.d.ts
|
|
14
5
|
/**
|
|
15
6
|
* Options for constructing a {@link PermissionError}.
|
|
7
|
+
*
|
|
8
|
+
* @since 0.1.0
|
|
16
9
|
*/
|
|
17
10
|
interface PermissionErrorOptions extends ApiErrorOptions {
|
|
18
11
|
/**
|
|
@@ -35,6 +28,8 @@ interface PermissionErrorOptions extends ApiErrorOptions {
|
|
|
35
28
|
* a CLI consumer can tell the user exactly which scope to grant on their API
|
|
36
29
|
* key.
|
|
37
30
|
*
|
|
31
|
+
* @since 0.1.0
|
|
32
|
+
*
|
|
38
33
|
* @example
|
|
39
34
|
*
|
|
40
35
|
* ```ts
|
|
@@ -68,6 +63,8 @@ declare class PermissionError extends ApiError {
|
|
|
68
63
|
//#region src/errors/poll-aborted.d.ts
|
|
69
64
|
/**
|
|
70
65
|
* Options for constructing a {@link PollAbortedError}.
|
|
66
|
+
*
|
|
67
|
+
* @since 0.1.0
|
|
71
68
|
*/
|
|
72
69
|
interface PollAbortedErrorOptions extends ErrorOptions {
|
|
73
70
|
/** Whatever `AbortSignal.reason` was at the moment of abort. */
|
|
@@ -79,6 +76,8 @@ interface PollAbortedErrorOptions extends ErrorOptions {
|
|
|
79
76
|
* `AbortSignal.reason` so callers can distinguish intentional cancellation
|
|
80
77
|
* from unexpected abort sources.
|
|
81
78
|
*
|
|
79
|
+
* @since 0.1.0
|
|
80
|
+
*
|
|
82
81
|
* @example
|
|
83
82
|
*
|
|
84
83
|
* ```ts
|
|
@@ -111,6 +110,8 @@ declare class PollAbortedError extends OpenCloudError {
|
|
|
111
110
|
* so the class can be reused by future Resources without forcing a parallel
|
|
112
111
|
* hierarchy.
|
|
113
112
|
*
|
|
113
|
+
* @since 0.1.0
|
|
114
|
+
*
|
|
114
115
|
* @template T - Resource-specific task type being polled.
|
|
115
116
|
*/
|
|
116
117
|
interface PollTimeoutErrorOptions<T = unknown> extends ErrorOptions {
|
|
@@ -124,6 +125,8 @@ interface PollTimeoutErrorOptions<T = unknown> extends ErrorOptions {
|
|
|
124
125
|
* observing a terminal task state. Carries the last task polled so callers
|
|
125
126
|
* can inspect state and decide whether to retry with a fresh budget.
|
|
126
127
|
*
|
|
128
|
+
* @since 0.1.0
|
|
129
|
+
*
|
|
127
130
|
* @template T - Resource-specific task type being polled.
|
|
128
131
|
*
|
|
129
132
|
* @example
|
|
@@ -159,10 +162,14 @@ declare class PollTimeoutError<T = unknown> extends OpenCloudError {
|
|
|
159
162
|
* Closed discriminator for a {@link ValidationError}. Consumers can
|
|
160
163
|
* exhaustively `switch` over this union so TypeScript will refuse to compile
|
|
161
164
|
* if a new variant is added without a handler.
|
|
165
|
+
*
|
|
166
|
+
* @since 0.1.0
|
|
162
167
|
*/
|
|
163
168
|
type ValidationErrorCode = "empty_body" | "empty_image_ids" | "empty_update" | "format_mismatch" | "incomplete_ref" | "invalid_image_id";
|
|
164
169
|
/**
|
|
165
170
|
* Options for constructing a {@link ValidationError}.
|
|
171
|
+
*
|
|
172
|
+
* @since 0.1.0
|
|
166
173
|
*/
|
|
167
174
|
interface ValidationErrorOptions extends ErrorOptions {
|
|
168
175
|
/** Machine-readable discriminator identifying the validation failure. */
|
|
@@ -173,6 +180,8 @@ interface ValidationErrorOptions extends ErrorOptions {
|
|
|
173
180
|
* round-trip. The `code` discriminator lets consumers branch on local-input
|
|
174
181
|
* errors separately from server-side errors.
|
|
175
182
|
*
|
|
183
|
+
* @since 0.1.0
|
|
184
|
+
*
|
|
176
185
|
* @example
|
|
177
186
|
*
|
|
178
187
|
* ```ts
|
|
@@ -198,5 +207,5 @@ declare class ValidationError extends OpenCloudError {
|
|
|
198
207
|
constructor(message: string, options: ValidationErrorOptions);
|
|
199
208
|
}
|
|
200
209
|
//#endregion
|
|
201
|
-
export { ApiError, type ApiErrorOptions, type HttpClient, type HttpRequest, type HttpResponse, NetworkError, type OpenCloudClientOptions, OpenCloudError, type OpenCloudHooks, type Page, PermissionError, type PermissionErrorOptions, PollAbortedError, type PollAbortedErrorOptions, PollTimeoutError, type PollTimeoutErrorOptions, RateLimitError, type RateLimitErrorOptions, type RequestConfig, type RequestOptions, type Result, type SleepFunc, ValidationError, type ValidationErrorCode, type ValidationErrorOptions };
|
|
210
|
+
export { ApiError, type ApiErrorOptions, type HttpClient, type HttpRequest, type HttpResponse, NetworkError, type NetworkErrorOptions, type OpenCloudClientOptions, OpenCloudError, type OpenCloudHooks, type Page, PermissionError, type PermissionErrorOptions, PollAbortedError, type PollAbortedErrorOptions, PollTimeoutError, type PollTimeoutErrorOptions, RateLimitError, type RateLimitErrorOptions, type RequestConfig, type RequestOptions, type Result, type SleepFunc, TRANSIENT_TRANSPORT_CODES, ValidationError, type ValidationErrorCode, type ValidationErrorOptions };
|
|
202
211
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/errors/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/errors/permission-error.ts","../src/errors/poll-aborted.ts","../src/errors/poll-timeout.ts","../src/errors/validation.ts"],"mappings":";;;;;;;AAOA;;UAAiB,sBAAA,SAA+B,eAAA;EA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
|
-
import { i as OpenCloudError, n as NetworkError, r as ApiError, t as RateLimitError } from "./rate-limit-
|
|
2
|
-
import {
|
|
3
|
-
import { n as PollAbortedError, t as PollTimeoutError } from "./poll-timeout-
|
|
4
|
-
import { t as ValidationError } from "./validation-
|
|
5
|
-
export { ApiError, NetworkError, OpenCloudError, PermissionError, PollAbortedError, PollTimeoutError, RateLimitError, ValidationError };
|
|
1
|
+
import { i as OpenCloudError, n as NetworkError, r as ApiError, t as RateLimitError } from "./rate-limit-Co9i28qi.mjs";
|
|
2
|
+
import { l as PermissionError, r as TRANSIENT_TRANSPORT_CODES } from "./retry-CbHBw60o.mjs";
|
|
3
|
+
import { n as PollAbortedError, t as PollTimeoutError } from "./poll-timeout-C0nmJzOd.mjs";
|
|
4
|
+
import { t as ValidationError } from "./validation-9oU6qNNQ.mjs";
|
|
5
|
+
export { ApiError, NetworkError, OpenCloudError, PermissionError, PollAbortedError, PollTimeoutError, RateLimitError, TRANSIENT_TRANSPORT_CODES, ValidationError };
|
package/dist/locales.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as RobloxLocale, n as RobloxCreatorLocale, r as RobloxLanguageCode, t as ROBLOX_CREATOR_LOCALES } from "./data.generated-
|
|
1
|
+
import { i as RobloxLocale, n as RobloxCreatorLocale, r as RobloxLanguageCode, t as ROBLOX_CREATOR_LOCALES } from "./data.generated-B2ceLfSn.mjs";
|
|
2
2
|
export { ROBLOX_CREATOR_LOCALES, type RobloxCreatorLocale, type RobloxLanguageCode, type RobloxLocale };
|
package/dist/locales.mjs
CHANGED
package/dist/locales.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.mjs","names":[],"sources":["../src/locales/data.generated.ts"],"sourcesContent":["// @generated by scripts/fetch-locales.ts. Do not edit by hand.\n// Source: https://locale.roblox.com/v1/locales/supported-locales-for-creators\n\n/**\n * One row in the vendored Roblox creator-locale list.\n */\nexport interface RobloxCreatorLocale {\n\treadonly locale: string;\n\treadonly languageCode: string;\n\treadonly name: string;\n\treadonly nativeName: string;\n\treadonly isRightToLeft: boolean;\n\treadonly isEnabledForFullExperience: boolean;\n\treadonly isEnabledForInGameUgc: boolean;\n\treadonly isEnabledForSignupAndLogin: boolean;\n}\n\n/**\n * Vendored snapshot of\n * `https://locale.roblox.com/v1/locales/supported-locales-for-creators`.\n * Refreshed by `pnpm --filter @bedrock-rbx/ocale refresh-locales`.\n */\nexport const ROBLOX_CREATOR_LOCALES = [\n\t{\n\t\tlocale: \"ar_001\",\n\t\tlanguageCode: \"ar\",\n\t\tname: \"Arabic\",\n\t\tnativeName: \"العربية\",\n\t\tisRightToLeft: true,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"bg_bg\",\n\t\tlanguageCode: \"bg\",\n\t\tname: \"Bulgarian\",\n\t\tnativeName: \"Български\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"bn_bd\",\n\t\tlanguageCode: \"bn\",\n\t\tname: \"Bengali\",\n\t\tnativeName: \"বাংলা\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"bs_ba\",\n\t\tlanguageCode: \"bs\",\n\t\tname: \"Bosnian\",\n\t\tnativeName: \"Босански\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"cs_cz\",\n\t\tlanguageCode: \"cs\",\n\t\tname: \"Czech\",\n\t\tnativeName: \"Čeština\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"da_dk\",\n\t\tlanguageCode: \"da\",\n\t\tname: \"Danish\",\n\t\tnativeName: \"Dansk\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"de_de\",\n\t\tlanguageCode: \"de\",\n\t\tname: \"German\",\n\t\tnativeName: \"Deutsch\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"el_gr\",\n\t\tlanguageCode: \"el\",\n\t\tname: \"Greek\",\n\t\tnativeName: \"Ελληνικά\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"en_gb\",\n\t\tlanguageCode: \"en\",\n\t\tname: \"English (United Kingdom)\",\n\t\tnativeName: \"English (United Kingdom)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"en_us\",\n\t\tlanguageCode: \"en\",\n\t\tname: \"English (United States)\",\n\t\tnativeName: \"English (United States)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"es_es\",\n\t\tlanguageCode: \"es\",\n\t\tname: \"Spanish (Spain)\",\n\t\tnativeName: \"Español (España)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"es_mx\",\n\t\tlanguageCode: \"es\",\n\t\tname: \"Spanish (Mexico)\",\n\t\tnativeName: \"Español (México)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"et_ee\",\n\t\tlanguageCode: \"et\",\n\t\tname: \"Estonian\",\n\t\tnativeName: \"Eesti\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fi_fi\",\n\t\tlanguageCode: \"fi\",\n\t\tname: \"Finnish\",\n\t\tnativeName: \"Suomi\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fil_ph\",\n\t\tlanguageCode: \"fil\",\n\t\tname: \"Filipino\",\n\t\tnativeName: \"Filipino\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fr_ca\",\n\t\tlanguageCode: \"fr\",\n\t\tname: \"French (Canada)\",\n\t\tnativeName: \"Français (Canada)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fr_fr\",\n\t\tlanguageCode: \"fr\",\n\t\tname: \"French (France)\",\n\t\tnativeName: \"Français (France)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"hi_in\",\n\t\tlanguageCode: \"hi\",\n\t\tname: \"Hindi\",\n\t\tnativeName: \"हिन्दी\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"hr_hr\",\n\t\tlanguageCode: \"hr\",\n\t\tname: \"Croatian\",\n\t\tnativeName: \"Hrvatski\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"hu_hu\",\n\t\tlanguageCode: \"hu\",\n\t\tname: \"Hungarian\",\n\t\tnativeName: \"Magyar\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"id_id\",\n\t\tlanguageCode: \"id\",\n\t\tname: \"Indonesian\",\n\t\tnativeName: \"Bahasa Indonesia\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"it_it\",\n\t\tlanguageCode: \"it\",\n\t\tname: \"Italian\",\n\t\tnativeName: \"Italiano\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"ja_jp\",\n\t\tlanguageCode: \"ja\",\n\t\tname: \"Japanese\",\n\t\tnativeName: \"日本語\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"ka_ge\",\n\t\tlanguageCode: \"ka\",\n\t\tname: \"Georgian\",\n\t\tnativeName: \"ქართული\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"kk_kz\",\n\t\tlanguageCode: \"kk\",\n\t\tname: \"Kazakh\",\n\t\tnativeName: \"Қазақ Тілі\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"km_kh\",\n\t\tlanguageCode: \"km\",\n\t\tname: \"Khmer\",\n\t\tnativeName: \"ភាសាខ្មែរ\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ko_kr\",\n\t\tlanguageCode: \"ko\",\n\t\tname: \"Korean\",\n\t\tnativeName: \"한국어\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"lt_lt\",\n\t\tlanguageCode: \"lt\",\n\t\tname: \"Lithuanian\",\n\t\tnativeName: \"Lietuvių\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"lv_lv\",\n\t\tlanguageCode: \"lv\",\n\t\tname: \"Latvian\",\n\t\tnativeName: \"Latviešu\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ms_my\",\n\t\tlanguageCode: \"ms\",\n\t\tname: \"Malay\",\n\t\tnativeName: \"Bahasa Melayu\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"my_mm\",\n\t\tlanguageCode: \"my\",\n\t\tname: \"Burmese\",\n\t\tnativeName: \"ဗမာစာ\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"nb_no\",\n\t\tlanguageCode: \"nb\",\n\t\tname: \"Bokmal\",\n\t\tnativeName: \"Bokmål\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"nl_nl\",\n\t\tlanguageCode: \"nl\",\n\t\tname: \"Dutch\",\n\t\tnativeName: \"Nederlands\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"pl_pl\",\n\t\tlanguageCode: \"pl\",\n\t\tname: \"Polish\",\n\t\tnativeName: \"Polski\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"pt_br\",\n\t\tlanguageCode: \"pt\",\n\t\tname: \"Portuguese (Brazil)\",\n\t\tnativeName: \"Português (Brasil)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"pt_pt\",\n\t\tlanguageCode: \"pt\",\n\t\tname: \"Portuguese (Portugal)\",\n\t\tnativeName: \"Português (Portugal)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ro_ro\",\n\t\tlanguageCode: \"ro\",\n\t\tname: \"Romanian\",\n\t\tnativeName: \"Română\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ru_ru\",\n\t\tlanguageCode: \"ru\",\n\t\tname: \"Russian\",\n\t\tnativeName: \"Русский\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"si_lk\",\n\t\tlanguageCode: \"si\",\n\t\tname: \"Sinhala\",\n\t\tnativeName: \"සිංහල\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sk_sk\",\n\t\tlanguageCode: \"sk\",\n\t\tname: \"Slovak\",\n\t\tnativeName: \"Slovenčina\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sl_sl\",\n\t\tlanguageCode: \"sl\",\n\t\tname: \"Slovenian\",\n\t\tnativeName: \"Slovenski\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sq_al\",\n\t\tlanguageCode: \"sq\",\n\t\tname: \"Albanian\",\n\t\tnativeName: \"Shqipe\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sr_rs\",\n\t\tlanguageCode: \"sr\",\n\t\tname: \"Serbian\",\n\t\tnativeName: \"Cрпски\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sv_se\",\n\t\tlanguageCode: \"sv\",\n\t\tname: \"Swedish\",\n\t\tnativeName: \"Svenska\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"th_th\",\n\t\tlanguageCode: \"th\",\n\t\tname: \"Thai\",\n\t\tnativeName: \"ภาษาไทย\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"tr_tr\",\n\t\tlanguageCode: \"tr\",\n\t\tname: \"Turkish\",\n\t\tnativeName: \"Türkçe\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"uk_ua\",\n\t\tlanguageCode: \"uk\",\n\t\tname: \"Ukrainian\",\n\t\tnativeName: \"Yкраїньска\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"vi_vn\",\n\t\tlanguageCode: \"vi\",\n\t\tname: \"Vietnamese\",\n\t\tnativeName: \"Tiếng Việt\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"zh_cn\",\n\t\tlanguageCode: \"zh-hans\",\n\t\tname: \"Chinese (Simplified)\",\n\t\tnativeName: \"中文(简体)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"zh_tw\",\n\t\tlanguageCode: \"zh-hant\",\n\t\tname: \"Chinese (Traditional)\",\n\t\tnativeName: \"中文(繁體)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n] as const satisfies ReadonlyArray<RobloxCreatorLocale>;\n\n/**\n * Roblox locale wire form (e.g. `en_us`, `pt_br`, `ar_001`). Used by\n * the legacy game-internationalization endpoints when\n * `languageCodeType` is `Locale`.\n */\nexport type RobloxLocale = (typeof ROBLOX_CREATOR_LOCALES)[number][\"locale\"];\n\n/**\n * Roblox language wire form (e.g. `en`, `fil`, `zh-hans`). Used by\n * the legacy game-internationalization endpoints when\n * `languageCodeType` is `Language`.\n */\nexport type RobloxLanguageCode = (typeof ROBLOX_CREATOR_LOCALES)[number][\"languageCode\"];\n"],"mappings":";;;;;;AAsBA,MAAa,yBAAyB;CACrC;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,c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EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD"}
|
|
1
|
+
{"version":3,"file":"locales.mjs","names":[],"sources":["../src/locales/data.generated.ts"],"sourcesContent":["// @generated by scripts/fetch-locales.ts. Do not edit by hand.\n// Source: https://locale.roblox.com/v1/locales/supported-locales-for-creators\n\n/**\n * One row in the vendored Roblox creator-locale list.\n *\n * @since 0.1.0\n */\nexport interface RobloxCreatorLocale {\n\treadonly locale: string;\n\treadonly languageCode: string;\n\treadonly name: string;\n\treadonly nativeName: string;\n\treadonly isRightToLeft: boolean;\n\treadonly isEnabledForFullExperience: boolean;\n\treadonly isEnabledForInGameUgc: boolean;\n\treadonly isEnabledForSignupAndLogin: boolean;\n}\n\n/**\n * Vendored snapshot of\n * `https://locale.roblox.com/v1/locales/supported-locales-for-creators`.\n * Refreshed by `pnpm --filter @bedrock-rbx/ocale refresh-locales`.\n *\n * @since 0.1.0\n */\nexport const ROBLOX_CREATOR_LOCALES = [\n\t{\n\t\tlocale: \"ar_001\",\n\t\tlanguageCode: \"ar\",\n\t\tname: \"Arabic\",\n\t\tnativeName: \"العربية\",\n\t\tisRightToLeft: true,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"bg_bg\",\n\t\tlanguageCode: \"bg\",\n\t\tname: \"Bulgarian\",\n\t\tnativeName: \"Български\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"bn_bd\",\n\t\tlanguageCode: \"bn\",\n\t\tname: \"Bengali\",\n\t\tnativeName: \"বাংলা\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"bs_ba\",\n\t\tlanguageCode: \"bs\",\n\t\tname: \"Bosnian\",\n\t\tnativeName: \"Босански\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"cs_cz\",\n\t\tlanguageCode: \"cs\",\n\t\tname: \"Czech\",\n\t\tnativeName: \"Čeština\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"da_dk\",\n\t\tlanguageCode: \"da\",\n\t\tname: \"Danish\",\n\t\tnativeName: \"Dansk\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"de_de\",\n\t\tlanguageCode: \"de\",\n\t\tname: \"German\",\n\t\tnativeName: \"Deutsch\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"el_gr\",\n\t\tlanguageCode: \"el\",\n\t\tname: \"Greek\",\n\t\tnativeName: \"Ελληνικά\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"en_gb\",\n\t\tlanguageCode: \"en\",\n\t\tname: \"English (United Kingdom)\",\n\t\tnativeName: \"English (United Kingdom)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"en_us\",\n\t\tlanguageCode: \"en\",\n\t\tname: \"English (United States)\",\n\t\tnativeName: \"English (United States)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"es_es\",\n\t\tlanguageCode: \"es\",\n\t\tname: \"Spanish (Spain)\",\n\t\tnativeName: \"Español (España)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"es_mx\",\n\t\tlanguageCode: \"es\",\n\t\tname: \"Spanish (Mexico)\",\n\t\tnativeName: \"Español (México)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"et_ee\",\n\t\tlanguageCode: \"et\",\n\t\tname: \"Estonian\",\n\t\tnativeName: \"Eesti\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fi_fi\",\n\t\tlanguageCode: \"fi\",\n\t\tname: \"Finnish\",\n\t\tnativeName: \"Suomi\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fil_ph\",\n\t\tlanguageCode: \"fil\",\n\t\tname: \"Filipino\",\n\t\tnativeName: \"Filipino\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fr_ca\",\n\t\tlanguageCode: \"fr\",\n\t\tname: \"French (Canada)\",\n\t\tnativeName: \"Français (Canada)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fr_fr\",\n\t\tlanguageCode: \"fr\",\n\t\tname: \"French (France)\",\n\t\tnativeName: \"Français (France)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"hi_in\",\n\t\tlanguageCode: \"hi\",\n\t\tname: \"Hindi\",\n\t\tnativeName: \"हिन्दी\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"hr_hr\",\n\t\tlanguageCode: \"hr\",\n\t\tname: \"Croatian\",\n\t\tnativeName: \"Hrvatski\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"hu_hu\",\n\t\tlanguageCode: \"hu\",\n\t\tname: \"Hungarian\",\n\t\tnativeName: \"Magyar\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"id_id\",\n\t\tlanguageCode: \"id\",\n\t\tname: \"Indonesian\",\n\t\tnativeName: \"Bahasa Indonesia\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"it_it\",\n\t\tlanguageCode: \"it\",\n\t\tname: \"Italian\",\n\t\tnativeName: \"Italiano\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"ja_jp\",\n\t\tlanguageCode: \"ja\",\n\t\tname: \"Japanese\",\n\t\tnativeName: \"日本語\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"ka_ge\",\n\t\tlanguageCode: \"ka\",\n\t\tname: \"Georgian\",\n\t\tnativeName: \"ქართული\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"kk_kz\",\n\t\tlanguageCode: \"kk\",\n\t\tname: \"Kazakh\",\n\t\tnativeName: \"Қазақ Тілі\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"km_kh\",\n\t\tlanguageCode: \"km\",\n\t\tname: \"Khmer\",\n\t\tnativeName: \"ភាសាខ្មែរ\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ko_kr\",\n\t\tlanguageCode: \"ko\",\n\t\tname: \"Korean\",\n\t\tnativeName: \"한국어\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"lt_lt\",\n\t\tlanguageCode: \"lt\",\n\t\tname: \"Lithuanian\",\n\t\tnativeName: \"Lietuvių\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"lv_lv\",\n\t\tlanguageCode: \"lv\",\n\t\tname: \"Latvian\",\n\t\tnativeName: \"Latviešu\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ms_my\",\n\t\tlanguageCode: \"ms\",\n\t\tname: \"Malay\",\n\t\tnativeName: \"Bahasa Melayu\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"my_mm\",\n\t\tlanguageCode: \"my\",\n\t\tname: \"Burmese\",\n\t\tnativeName: \"ဗမာစာ\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"nb_no\",\n\t\tlanguageCode: \"nb\",\n\t\tname: \"Bokmal\",\n\t\tnativeName: \"Bokmål\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"nl_nl\",\n\t\tlanguageCode: \"nl\",\n\t\tname: \"Dutch\",\n\t\tnativeName: \"Nederlands\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"pl_pl\",\n\t\tlanguageCode: \"pl\",\n\t\tname: \"Polish\",\n\t\tnativeName: \"Polski\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"pt_br\",\n\t\tlanguageCode: \"pt\",\n\t\tname: \"Portuguese (Brazil)\",\n\t\tnativeName: \"Português (Brasil)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"pt_pt\",\n\t\tlanguageCode: \"pt\",\n\t\tname: \"Portuguese (Portugal)\",\n\t\tnativeName: \"Português (Portugal)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ro_ro\",\n\t\tlanguageCode: \"ro\",\n\t\tname: \"Romanian\",\n\t\tnativeName: \"Română\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ru_ru\",\n\t\tlanguageCode: \"ru\",\n\t\tname: \"Russian\",\n\t\tnativeName: \"Русский\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"si_lk\",\n\t\tlanguageCode: \"si\",\n\t\tname: \"Sinhala\",\n\t\tnativeName: \"සිංහල\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sk_sk\",\n\t\tlanguageCode: \"sk\",\n\t\tname: \"Slovak\",\n\t\tnativeName: \"Slovenčina\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sl_sl\",\n\t\tlanguageCode: \"sl\",\n\t\tname: \"Slovenian\",\n\t\tnativeName: \"Slovenski\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sq_al\",\n\t\tlanguageCode: \"sq\",\n\t\tname: \"Albanian\",\n\t\tnativeName: \"Shqipe\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sr_rs\",\n\t\tlanguageCode: \"sr\",\n\t\tname: \"Serbian\",\n\t\tnativeName: \"Cрпски\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sv_se\",\n\t\tlanguageCode: \"sv\",\n\t\tname: \"Swedish\",\n\t\tnativeName: \"Svenska\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"th_th\",\n\t\tlanguageCode: \"th\",\n\t\tname: \"Thai\",\n\t\tnativeName: \"ภาษาไทย\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"tr_tr\",\n\t\tlanguageCode: \"tr\",\n\t\tname: \"Turkish\",\n\t\tnativeName: \"Türkçe\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"uk_ua\",\n\t\tlanguageCode: \"uk\",\n\t\tname: \"Ukrainian\",\n\t\tnativeName: \"Yкраїньска\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"vi_vn\",\n\t\tlanguageCode: \"vi\",\n\t\tname: \"Vietnamese\",\n\t\tnativeName: \"Tiếng Việt\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"zh_cn\",\n\t\tlanguageCode: \"zh-hans\",\n\t\tname: \"Chinese (Simplified)\",\n\t\tnativeName: \"中文(简体)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"zh_tw\",\n\t\tlanguageCode: \"zh-hant\",\n\t\tname: \"Chinese (Traditional)\",\n\t\tnativeName: \"中文(繁體)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n] as const;\n\n/**\n * Roblox locale wire form (e.g. `en_us`, `pt_br`, `ar_001`). Used by\n * the legacy game-internationalization endpoints when\n * `languageCodeType` is `Locale`.\n *\n * @since 0.1.0\n */\nexport type RobloxLocale = (typeof ROBLOX_CREATOR_LOCALES)[number][\"locale\"];\n\n/**\n * Roblox language wire form (e.g. `en`, `fil`, `zh-hans`). Used by\n * the legacy game-internationalization endpoints when\n * `languageCodeType` is `Language`.\n *\n * @since 0.1.0\n */\nexport type RobloxLanguageCode = (typeof ROBLOX_CREATOR_LOCALES)[number][\"languageCode\"];\n"],"mappings":";;;;;;;;AA0BA,MAAa,yBAAyB;CACrC;EACC,QAAQ;EACR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c;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;CAC7B;CACA;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;CAC7B;CACA;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;CAC7B;CACA;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;CAC7B;CACA;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;CAC7B;CACA;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;CAC7B;AACD"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-
|
|
2
|
-
import { a as
|
|
1
|
+
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-CRiJg5EQ.mjs";
|
|
2
|
+
import { a as LogPage, c as GetParameters, d as LuauExecutionTaskRef, f as SubmitAtHeadParameters, i as LogMessage, l as InProgressTask, n as defaultPollDelay, o as CompleteTask, p as SubmitAtVersionParameters, r as ListLogsParameters, s as FailedTask, t as PollUntilDoneOptions, u as LuauExecutionTask } from "./polling-rj0dGREg.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/cloud-v2/luau-execution-task-binary-inputs/types.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Caller-supplied input for creating a Luau execution task binary input
|
|
7
7
|
* upload slot. The server returns a presigned `uploadUri` the caller uses
|
|
8
8
|
* to PUT the binary data.
|
|
9
|
+
*
|
|
10
|
+
* @since 0.1.0
|
|
9
11
|
*/
|
|
10
12
|
interface CreateBinaryInputParameters {
|
|
11
13
|
/** Size in bytes of the binary data to be uploaded. */
|
|
@@ -16,6 +18,8 @@ interface CreateBinaryInputParameters {
|
|
|
16
18
|
/**
|
|
17
19
|
* Public representation of a created Luau execution task binary input.
|
|
18
20
|
* Pass `path` verbatim to `tasks.submit({ binaryInput })`.
|
|
21
|
+
*
|
|
22
|
+
* @since 0.1.0
|
|
19
23
|
*/
|
|
20
24
|
interface LuauExecutionTaskBinaryInput {
|
|
21
25
|
/** Server-emitted resource path; pass to `tasks.submit` as `binaryInput`. */
|
|
@@ -29,6 +33,8 @@ interface LuauExecutionTaskBinaryInput {
|
|
|
29
33
|
* Operation handle for the `binaryInputs` namespace on
|
|
30
34
|
* {@link LuauExecutionClient}. Provides `create` to allocate a presigned
|
|
31
35
|
* upload slot for binary script inputs.
|
|
36
|
+
*
|
|
37
|
+
* @since 0.1.0
|
|
32
38
|
*/
|
|
33
39
|
interface BinaryInputsHandle {
|
|
34
40
|
/**
|
|
@@ -51,6 +57,8 @@ interface BinaryInputsHandle {
|
|
|
51
57
|
* `tasks` namespace. Provides `submit` to queue a Luau script, `get`
|
|
52
58
|
* to fetch a task's current state, and `listLogs` to retrieve
|
|
53
59
|
* structured log messages produced by a task.
|
|
60
|
+
*
|
|
61
|
+
* @since 0.1.0
|
|
54
62
|
*/
|
|
55
63
|
interface TasksHandle {
|
|
56
64
|
/**
|
|
@@ -130,6 +138,17 @@ interface TasksHandle {
|
|
|
130
138
|
* specific place version, `tasks.get` for fetching task state,
|
|
131
139
|
* `tasks.listLogs` for fetching structured log messages, and
|
|
132
140
|
* `binaryInputs.create` for allocating presigned upload slots.
|
|
141
|
+
*
|
|
142
|
+
* @since 0.1.0
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
*
|
|
146
|
+
* ```ts
|
|
147
|
+
* import { LuauExecutionClient } from "@bedrock-rbx/ocale/luau-execution";
|
|
148
|
+
*
|
|
149
|
+
* const client = new LuauExecutionClient({ apiKey: "your-key" });
|
|
150
|
+
* expect(client).toBeInstanceOf(LuauExecutionClient);
|
|
151
|
+
* ```
|
|
133
152
|
*/
|
|
134
153
|
declare class LuauExecutionClient {
|
|
135
154
|
#private;
|
|
@@ -145,5 +164,5 @@ declare class LuauExecutionClient {
|
|
|
145
164
|
constructor(options: OpenCloudClientOptions);
|
|
146
165
|
}
|
|
147
166
|
//#endregion
|
|
148
|
-
export { type BinaryInputsHandle, type CompleteTask, type CreateBinaryInputParameters, type FailedTask, type GetParameters, type InProgressTask, type ListLogsParameters, type LogMessage, type LogPage, LuauExecutionClient, type LuauExecutionTask, type LuauExecutionTaskBinaryInput, type LuauExecutionTaskRef, type PollUntilDoneOptions, type SubmitAtHeadParameters, type SubmitAtVersionParameters, type TasksHandle };
|
|
167
|
+
export { type BinaryInputsHandle, type CompleteTask, type CreateBinaryInputParameters, type FailedTask, type GetParameters, type InProgressTask, type ListLogsParameters, type LogMessage, type LogPage, LuauExecutionClient, type LuauExecutionTask, type LuauExecutionTaskBinaryInput, type LuauExecutionTaskRef, type PollUntilDoneOptions, type SubmitAtHeadParameters, type SubmitAtVersionParameters, type TasksHandle, defaultPollDelay };
|
|
149
168
|
//# sourceMappingURL=luau-execution.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"luau-execution.d.mts","names":[],"sources":["../src/domains/cloud-v2/luau-execution-task-binary-inputs/types.ts","../src/resources/luau-execution/client.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"luau-execution.d.mts","names":[],"sources":["../src/domains/cloud-v2/luau-execution-task-binary-inputs/types.ts","../src/resources/luau-execution/client.ts"],"mappings":";;;;;;;;AAOA;;;UAAiB,2BAAA;EAIP;EAAA,SAFA,IAAA;EAWO;EAAA,SATP,UAAA;AAAA;AAaA;;;;AC0CV;;AD1CU,UAJO,4BAAA;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.mjs";
|
|
2
|
+
import { t as CREATE_METHOD_DEFAULTS } from "./retry-CbHBw60o.mjs";
|
|
3
|
+
import { i as isRecord, n as okRequest, t as ResourceClient } from "./resource-client-C_D--PYX.mjs";
|
|
4
|
+
import { a as withBudgetRequestTimeout, c as SUBMIT_VERSION_SPEC, i as pollUntilDoneCore, l as LIST_LOGS_SPEC, n as submitAndPoll, o as GET_SPEC, r as defaultPollDelay, s as SUBMIT_HEAD_SPEC, t as buildPollDependencies } from "./polling-helpers-BcycDhDm.mjs";
|
|
4
5
|
//#region src/domains/cloud-v2/luau-execution-task-binary-inputs/builders.ts
|
|
5
6
|
/**
|
|
6
7
|
* Builds a `POST` request for the Open Cloud
|
|
@@ -51,9 +52,9 @@ const MALFORMED_MESSAGE = "Malformed luau-execution-session-task-binary-input re
|
|
|
51
52
|
*/
|
|
52
53
|
function parseBinaryInputResponse(response) {
|
|
53
54
|
const { body, status: statusCode } = response;
|
|
54
|
-
if (!isRecord(body)) return malformed(statusCode);
|
|
55
|
-
if (typeof body["path"] !== "string" || !PATH_PATTERN.test(body["path"])) return malformed(statusCode);
|
|
56
|
-
if (typeof body["uploadUri"] !== "string") return malformed(statusCode);
|
|
55
|
+
if (!isRecord(body)) return malformed(statusCode, body);
|
|
56
|
+
if (typeof body["path"] !== "string" || !PATH_PATTERN.test(body["path"])) return malformed(statusCode, body);
|
|
57
|
+
if (typeof body["uploadUri"] !== "string") return malformed(statusCode, body);
|
|
57
58
|
return {
|
|
58
59
|
data: {
|
|
59
60
|
path: body["path"],
|
|
@@ -62,9 +63,12 @@ function parseBinaryInputResponse(response) {
|
|
|
62
63
|
success: true
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
function malformed(statusCode) {
|
|
66
|
+
function malformed(statusCode, body) {
|
|
66
67
|
return {
|
|
67
|
-
err: new ApiError(MALFORMED_MESSAGE, {
|
|
68
|
+
err: new ApiError(MALFORMED_MESSAGE, {
|
|
69
|
+
details: body,
|
|
70
|
+
statusCode
|
|
71
|
+
}),
|
|
68
72
|
success: false
|
|
69
73
|
};
|
|
70
74
|
}
|
|
@@ -89,6 +93,17 @@ const CREATE_BINARY_INPUT_SPEC = makeSpec({
|
|
|
89
93
|
* specific place version, `tasks.get` for fetching task state,
|
|
90
94
|
* `tasks.listLogs` for fetching structured log messages, and
|
|
91
95
|
* `binaryInputs.create` for allocating presigned upload slots.
|
|
96
|
+
*
|
|
97
|
+
* @since 0.1.0
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
*
|
|
101
|
+
* ```ts
|
|
102
|
+
* import { LuauExecutionClient } from "@bedrock-rbx/ocale/luau-execution";
|
|
103
|
+
*
|
|
104
|
+
* const client = new LuauExecutionClient({ apiKey: "your-key" });
|
|
105
|
+
* expect(client).toBeInstanceOf(LuauExecutionClient);
|
|
106
|
+
* ```
|
|
92
107
|
*/
|
|
93
108
|
var LuauExecutionClient = class {
|
|
94
109
|
#inner;
|
|
@@ -133,14 +148,15 @@ function createTasksHandle(inner) {
|
|
|
133
148
|
});
|
|
134
149
|
},
|
|
135
150
|
async pollUntilDone(ref, options = {}) {
|
|
136
|
-
|
|
137
|
-
|
|
151
|
+
const resolved = withBudgetRequestTimeout(options);
|
|
152
|
+
return pollUntilDoneCore(buildPollDependencies(inner, {
|
|
153
|
+
options: resolved,
|
|
138
154
|
ref
|
|
139
|
-
}),
|
|
155
|
+
}), resolved);
|
|
140
156
|
},
|
|
141
157
|
async runUntilDone(parameters, options = {}) {
|
|
142
158
|
return submitAndPoll(inner, {
|
|
143
|
-
options,
|
|
159
|
+
options: withBudgetRequestTimeout(options),
|
|
144
160
|
parameters
|
|
145
161
|
});
|
|
146
162
|
},
|
|
@@ -159,6 +175,6 @@ function createTasksHandle(inner) {
|
|
|
159
175
|
};
|
|
160
176
|
}
|
|
161
177
|
//#endregion
|
|
162
|
-
export { LuauExecutionClient };
|
|
178
|
+
export { LuauExecutionClient, defaultPollDelay };
|
|
163
179
|
|
|
164
180
|
//# sourceMappingURL=luau-execution.mjs.map
|