@bedrock-rbx/ocale 0.1.0-beta.9 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +182 -0
  2. package/dist/badges.d.mts +33 -2
  3. package/dist/badges.d.mts.map +1 -1
  4. package/dist/badges.mjs +16 -4
  5. package/dist/badges.mjs.map +1 -1
  6. package/dist/{data.generated-Cb6g6asv.d.mts → data.generated-B2ceLfSn.d.mts} +9 -1
  7. package/dist/data.generated-B2ceLfSn.d.mts.map +1 -0
  8. package/dist/developer-products.d.mts +38 -2
  9. package/dist/developer-products.d.mts.map +1 -1
  10. package/dist/developer-products.mjs +32 -8
  11. package/dist/developer-products.mjs.map +1 -1
  12. package/dist/game-passes.d.mts +40 -2
  13. package/dist/game-passes.d.mts.map +1 -1
  14. package/dist/game-passes.mjs +30 -6
  15. package/dist/game-passes.mjs.map +1 -1
  16. package/dist/index.d.mts +21 -12
  17. package/dist/index.d.mts.map +1 -1
  18. package/dist/index.mjs +5 -5
  19. package/dist/locales.d.mts +1 -1
  20. package/dist/locales.mjs +2 -0
  21. package/dist/locales.mjs.map +1 -1
  22. package/dist/luau-execution.d.mts +22 -3
  23. package/dist/luau-execution.d.mts.map +1 -1
  24. package/dist/luau-execution.mjs +29 -13
  25. package/dist/luau-execution.mjs.map +1 -1
  26. package/dist/places.d.mts +20 -2
  27. package/dist/places.d.mts.map +1 -1
  28. package/dist/places.mjs +34 -14
  29. package/dist/places.mjs.map +1 -1
  30. package/dist/{poll-timeout-Dg_QFEqi.mjs → poll-timeout-C0nmJzOd.mjs} +6 -2
  31. package/dist/poll-timeout-C0nmJzOd.mjs.map +1 -0
  32. package/dist/{polling-helpers-CS00apdU.mjs → polling-helpers-BcycDhDm.mjs} +225 -78
  33. package/dist/polling-helpers-BcycDhDm.mjs.map +1 -0
  34. package/dist/{polling-BMrYajok.d.mts → polling-rj0dGREg.d.mts} +73 -14
  35. package/dist/polling-rj0dGREg.d.mts.map +1 -0
  36. package/dist/{price-information-DIrvwCmd.mjs → price-information-DK83Wul1.mjs} +2 -2
  37. package/dist/{price-information-DIrvwCmd.mjs.map → price-information-DK83Wul1.mjs.map} +1 -1
  38. package/dist/{rate-limit-D1q2Js-z.mjs → rate-limit-Co9i28qi.mjs} +30 -2
  39. package/dist/rate-limit-Co9i28qi.mjs.map +1 -0
  40. package/dist/{resource-client-D6Efj9fU.mjs → resource-client-C_D--PYX.mjs} +328 -243
  41. package/dist/resource-client-C_D--PYX.mjs.map +1 -0
  42. package/dist/retry-CbHBw60o.mjs +380 -0
  43. package/dist/retry-CbHBw60o.mjs.map +1 -0
  44. package/dist/retry-r1TXe5Zd.d.mts +189 -0
  45. package/dist/retry-r1TXe5Zd.d.mts.map +1 -0
  46. package/dist/{signatures-B5Fojgn0.mjs → signatures-JF-7Psce.mjs} +1 -1
  47. package/dist/{signatures-B5Fojgn0.mjs.map → signatures-JF-7Psce.mjs.map} +1 -1
  48. package/dist/storage.d.mts +30 -27
  49. package/dist/storage.d.mts.map +1 -1
  50. package/dist/storage.mjs +46 -31
  51. package/dist/storage.mjs.map +1 -1
  52. package/dist/testing.d.mts +24 -9
  53. package/dist/testing.d.mts.map +1 -1
  54. package/dist/testing.mjs +2 -2
  55. package/dist/testing.mjs.map +1 -1
  56. package/dist/{to-blob-B27VhoRp.mjs → to-blob-RPqMBuft.mjs} +1 -1
  57. package/dist/{to-blob-B27VhoRp.mjs.map → to-blob-RPqMBuft.mjs.map} +1 -1
  58. package/dist/{types-CwtZT1ek.d.mts → types-CRiJg5EQ.d.mts} +46 -4
  59. package/dist/types-CRiJg5EQ.d.mts.map +1 -0
  60. package/dist/universes.d.mts +47 -5
  61. package/dist/universes.d.mts.map +1 -1
  62. package/dist/universes.mjs +31 -15
  63. package/dist/universes.mjs.map +1 -1
  64. package/dist/{validation-DkL5KQqz.mjs → validation-9oU6qNNQ.mjs} +4 -2
  65. package/dist/validation-9oU6qNNQ.mjs.map +1 -0
  66. package/dist/{wire-CeL6W_V7.d.mts → wire-D3K-a-UP.d.mts} +3 -1
  67. package/dist/wire-D3K-a-UP.d.mts.map +1 -0
  68. package/package.json +7 -6
  69. package/dist/data.generated-Cb6g6asv.d.mts.map +0 -1
  70. package/dist/permission-error-DOVtNq3A.mjs +0 -46
  71. package/dist/permission-error-DOVtNq3A.mjs.map +0 -1
  72. package/dist/poll-timeout-Dg_QFEqi.mjs.map +0 -1
  73. package/dist/polling-BMrYajok.d.mts.map +0 -1
  74. package/dist/polling-helpers-CS00apdU.mjs.map +0 -1
  75. package/dist/rate-limit-BYuizHoD.d.mts +0 -92
  76. package/dist/rate-limit-BYuizHoD.d.mts.map +0 -1
  77. package/dist/rate-limit-D1q2Js-z.mjs.map +0 -1
  78. package/dist/resource-client-D6Efj9fU.mjs.map +0 -1
  79. package/dist/types-CwtZT1ek.d.mts.map +0 -1
  80. package/dist/validation-DkL5KQqz.mjs.map +0 -1
  81. package/dist/wire-CeL6W_V7.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"storage.mjs","names":["SECONDS_PER_MINUTE","PATH_PATTERN","makeSpec","#inner","#inner"],"sources":["../src/domains/cloud-v2/memory-store-queues/builders.ts","../src/domains/cloud-v2/memory-store-queues/operations.ts","../src/domains/cloud-v2/memory-store-queues/parsers.ts","../src/resources/storage/queues-group.ts","../src/domains/cloud-v2/memory-store-sorted-maps/builders.ts","../src/domains/cloud-v2/memory-store-sorted-maps/operations.ts","../src/domains/cloud-v2/memory-store-sorted-maps/parsers.ts","../src/resources/storage/sorted-maps-group.ts","../src/resources/storage/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../client/types.ts\";\nimport type {\n\tDequeueQueueItemsParameters,\n\tDiscardQueueItemsParameters,\n\tEnqueueQueueItemParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the Open Cloud\n * `Cloud_CreateMemoryStoreQueueItem` endpoint. Serializes the optional\n * `ttl` field as a Google protobuf `Duration` string in seconds (`\"30s\"`)\n * to match the wire contract.\n *\n * @param parameters - Universe and queue identifiers, the opaque payload,\n * and optional priority and TTL.\n * @returns A pure {@link HttpRequest} describing the enqueue call.\n */\nexport function buildEnqueueRequest(parameters: EnqueueQueueItemParameters): HttpRequest {\n\tconst { data, priority, queueId, ttl, universeId } = parameters;\n\tconst body: Record<string, unknown> = { data };\n\tif (priority !== undefined) {\n\t\tbody[\"priority\"] = priority;\n\t}\n\n\tif (ttl !== undefined) {\n\t\tbody[\"ttl\"] = `${ttl}s`;\n\t}\n\n\treturn {\n\t\tbody,\n\t\theaders: { \"content-type\": \"application/json\" },\n\t\tmethod: \"POST\",\n\t\turl: `/cloud/v2/universes/${universeId}/memory-store/queues/${queueId}/items`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud\n * `Cloud_ReadMemoryStoreQueueItems` endpoint. The `:read` suffix is a\n * custom-method marker; the call is HTTP `GET` despite the AIP-136\n * convention that custom methods use `POST`. Parameters travel as query\n * string only; there is no request body.\n *\n * `invisibilityWindow` is serialized as a Google protobuf `Duration`\n * string in seconds (`\"30s\"`), matching the wire contract.\n *\n * @param parameters - Universe and queue identifiers, plus optional\n * `count`, `allOrNothing`, and `invisibilityWindow`.\n * @returns A pure {@link HttpRequest} describing the dequeue call.\n */\nexport function buildDequeueRequest(parameters: DequeueQueueItemsParameters): HttpRequest {\n\tconst query = new URLSearchParams();\n\tif (parameters.count !== undefined) {\n\t\tquery.append(\"count\", String(parameters.count));\n\t}\n\n\tif (parameters.allOrNothing !== undefined) {\n\t\tquery.append(\"allOrNothing\", String(parameters.allOrNothing));\n\t}\n\n\tif (parameters.invisibilityWindow !== undefined) {\n\t\tquery.append(\"invisibilityWindow\", `${parameters.invisibilityWindow}s`);\n\t}\n\n\tconst queryString = query.toString();\n\tconst { queueId, universeId } = parameters;\n\tconst base = `/cloud/v2/universes/${universeId}/memory-store/queues/${queueId}/items:read`;\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\n * `Cloud_DiscardMemoryStoreQueueItems` endpoint. The request body uses\n * `{ readId }`, matching the schema (the dequeue *response* uses `id`,\n * but the discard *request* matches the schema and is not patched).\n *\n * @param parameters - Universe and queue identifiers, plus the\n * `readId` returned from a prior dequeue.\n * @returns A pure {@link HttpRequest} describing the discard call.\n */\nexport function buildDiscardRequest(parameters: DiscardQueueItemsParameters): HttpRequest {\n\tconst { queueId, readId, universeId } = parameters;\n\treturn {\n\t\tbody: { readId },\n\t\theaders: { \"content-type\": \"application/json\" },\n\t\tmethod: \"POST\",\n\t\turl: `/cloud/v2/universes/${universeId}/memory-store/queues/${queueId}/items:discard`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst ENQUEUE_PER_MINUTE = 1_000_000;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for enqueueing a memory-store queue item,\n * from the Open Cloud OpenAPI schema (1,000,000 requests per minute per\n * API key owner). Keyed independently from the dequeue and discard\n * operations so the three do not share a queue; upstream quota\n * accounting is documented per-operation, and the conservative default\n * is fewer cross-method contention surprises.\n */\nexport const ENQUEUE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: ENQUEUE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-queues.enqueue\",\n});\n\n/**\n * Scopes required to enqueue a memory-store queue item, sourced from\n * `x-roblox-scopes` on the `Cloud_CreateMemoryStoreQueueItem` operation\n * in the vendored OpenAPI schema.\n */\nexport const ENQUEUE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.queue:add\",\n]);\n\nconst DEQUEUE_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for dequeueing memory-store queue items,\n * from the Open Cloud OpenAPI schema (1,000,000 requests per minute\n * per API key owner). Keyed independently from enqueue and discard.\n */\nexport const DEQUEUE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: DEQUEUE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-queues.dequeue\",\n});\n\n/**\n * Scopes required to dequeue memory-store queue items, sourced from\n * `x-roblox-scopes` on the `Cloud_ReadMemoryStoreQueueItems` operation\n * in the vendored OpenAPI schema.\n */\nexport const DEQUEUE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.queue:dequeue\",\n]);\n\nconst DISCARD_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for discarding (acknowledging) memory-store\n * queue items, from the Open Cloud OpenAPI schema (1,000,000 requests\n * per minute per API key owner). Keyed independently from enqueue and\n * dequeue.\n */\nexport const DISCARD_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: DISCARD_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-queues.discard\",\n});\n\n/**\n * Scopes required to discard memory-store queue items, sourced from\n * `x-roblox-scopes` on the `Cloud_DiscardMemoryStoreQueueItems`\n * operation in the vendored OpenAPI schema.\n */\nexport const DISCARD_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.queue:discard\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { DequeueResult, QueueItem } from \"./types.ts\";\nimport type { MemoryStoreQueueItemWire } from \"./wire.ts\";\n\nconst PATH_PATTERN = /^cloud\\/v2\\/universes\\/(\\d+)\\/memory-store\\/queues\\/([^/]+)\\/items\\/([^/]+)$/;\nconst MALFORMED_QUEUE_ITEM_MESSAGE = \"Malformed memory-store queue item response\";\nconst MALFORMED_DEQUEUE_MESSAGE = \"Malformed memory-store dequeue response\";\n\n/**\n * Parses a successful memory-store queue-item response body (the\n * `Cloud_CreateMemoryStoreQueueItem` happy path) into the public\n * {@link QueueItem} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link QueueItem}, or an\n * {@link ApiError} when the body does not match the wire schema.\n */\nexport function parseQueueItemResponse(response: HttpResponse): Result<QueueItem, ApiError> {\n\tconst item = wireBodyToQueueItem(response.body);\n\tif (item === undefined) {\n\t\treturn malformedQueueItem(response.status);\n\t}\n\n\treturn { data: item, success: true };\n}\n\n/**\n * Parses a successful `Cloud_ReadMemoryStoreQueueItems` response body\n * into the public {@link DequeueResult} shape. Each item in the\n * `queueItems` array is validated through the same path-and-shape\n * checks as {@link parseQueueItemResponse}; a malformed entry rejects\n * the whole response.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link DequeueResult},\n * or an {@link ApiError} when the response shape is wrong.\n */\nexport function parseDequeueResponse(response: HttpResponse): Result<DequeueResult, ApiError> {\n\tconst { body, status: statusCode } = response;\n\tif (!isRecord(body)) {\n\t\treturn malformedDequeue(statusCode);\n\t}\n\n\tconst { id, queueItems } = body;\n\tif (typeof id !== \"string\" || !Array.isArray(queueItems)) {\n\t\treturn malformedDequeue(statusCode);\n\t}\n\n\tconst items = queueItems.map(wireBodyToQueueItem);\n\tif (!items.every(isQueueItem)) {\n\t\treturn malformedDequeue(statusCode);\n\t}\n\n\treturn { data: { items, readId: id }, success: true };\n}\n\nfunction isQueueItemWire(body: unknown): body is MemoryStoreQueueItemWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { data, expireTime, path, priority } = body;\n\treturn (\n\t\ttypeof path === \"string\" &&\n\t\tisDateTimeString(expireTime) &&\n\t\tdata !== undefined &&\n\t\tdata !== null &&\n\t\t(priority === undefined || priority === null || typeof priority === \"number\")\n\t);\n}\n\nfunction wireBodyToQueueItem(body: unknown): QueueItem | undefined {\n\tif (!isQueueItemWire(body)) {\n\t\treturn undefined;\n\t}\n\n\tconst match = PATH_PATTERN.exec(body.path);\n\tconst universeId = match?.[1];\n\tconst queueId = match?.[2];\n\tconst id = match?.[3];\n\tif (universeId === undefined || queueId === undefined || id === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\tid,\n\t\tdata: body.data,\n\t\texpiresAt: new Date(body.expireTime),\n\t\tpriority: body.priority ?? undefined,\n\t\tqueueId,\n\t\tuniverseId,\n\t};\n}\n\nfunction malformedQueueItem(statusCode: number): Result<QueueItem, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_QUEUE_ITEM_MESSAGE, { statusCode }),\n\t\tsuccess: false,\n\t};\n}\n\nfunction isQueueItem(item: QueueItem | undefined): item is QueueItem {\n\treturn item !== undefined;\n}\n\nfunction malformedDequeue(statusCode: number): Result<DequeueResult, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_DEQUEUE_MESSAGE, { statusCode }),\n\t\tsuccess: false,\n\t};\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tbuildDequeueRequest,\n\tbuildDiscardRequest,\n\tbuildEnqueueRequest,\n} from \"../../domains/cloud-v2/memory-store-queues/builders.ts\";\nimport {\n\tDEQUEUE_OPERATION_LIMIT,\n\tDEQUEUE_REQUIRED_SCOPES,\n\tDISCARD_OPERATION_LIMIT,\n\tDISCARD_REQUIRED_SCOPES,\n\tENQUEUE_OPERATION_LIMIT,\n\tENQUEUE_REQUIRED_SCOPES,\n} from \"../../domains/cloud-v2/memory-store-queues/operations.ts\";\nimport {\n\tparseDequeueResponse,\n\tparseQueueItemResponse,\n} from \"../../domains/cloud-v2/memory-store-queues/parsers.ts\";\nimport type {\n\tDequeueQueueItemsParameters,\n\tDequeueResult,\n\tDiscardQueueItemsParameters,\n\tEnqueueQueueItemParameters,\n\tQueueItem,\n} from \"../../domains/cloud-v2/memory-store-queues/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\ttype ResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst ENQUEUE_SPEC = makeSpec<EnqueueQueueItemParameters, QueueItem>({\n\tbuildRequest: (parameters) => okRequest(buildEnqueueRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: ENQUEUE_OPERATION_LIMIT,\n\tparse: parseQueueItemResponse,\n\trequiredScopes: ENQUEUE_REQUIRED_SCOPES,\n});\n\n// Dequeue uses HTTP GET but mutates server state via the invisibility\n// window. Retrying a 5xx where the server set invisibility before\n// failing the response would lose the original batch (it stays\n// invisible until the window elapses) and return a different one. So\n// the retry policy mirrors `create`: only 429, never 5xx.\nconst DEQUEUE_SPEC = makeSpec<DequeueQueueItemsParameters, DequeueResult>({\n\tbuildRequest: (parameters) => okRequest(buildDequeueRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: DEQUEUE_OPERATION_LIMIT,\n\tparse: parseDequeueResponse,\n\trequiredScopes: DEQUEUE_REQUIRED_SCOPES,\n});\n\nconst DISCARD_SPEC = makeSpec<DiscardQueueItemsParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildDiscardRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: DISCARD_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: DISCARD_REQUIRED_SCOPES,\n});\n\n/**\n * Operation Group on `StorageClient` that exposes the memory-store\n * queue endpoints. Queues are FIFO collections of opaque JSON values\n * with optional priority and TTL; consumers enqueue items, dequeue\n * them in batches, and acknowledge processed batches with a read\n * identifier.\n */\nexport class MemoryStoreQueuesGroup {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Wraps the shared {@link ResourceClient} so the Operation Group\n\t * routes calls through the same retry, hooks, and rate-limit queues\n\t * as the rest of the parent client.\n\t *\n\t * @param inner - The shared {@link ResourceClient} owned by the\n\t * parent client.\n\t */\n\tconstructor(inner: ResourceClient) {\n\t\tthis.#inner = inner;\n\t}\n\n\t/**\n\t * Dequeues up to `count` items from the front of the queue. Items\n\t * returned become invisible to subsequent reads for\n\t * `invisibilityWindow` seconds (default 30 server-side); they\n\t * reappear once the window elapses unless acknowledged via\n\t * `discard` with the returned `readId`.\n\t *\n\t * On 5xx, dequeue does not retry: the server may have set\n\t * invisibility on a batch before the response failed, so a retry\n\t * would return a *different* batch and the first one is lost until\n\t * the window expires. Callers that can detect duplicates externally\n\t * may opt back into 5xx retry per call by passing `retryableStatuses`\n\t * on `options`.\n\t *\n\t * @param parameters - Universe and queue identifiers, plus optional\n\t * `count`, `allOrNothing`, and `invisibilityWindow`.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link DequeueResult}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async dequeue(\n\t\tparameters: DequeueQueueItemsParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DequeueResult, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: DEQUEUE_SPEC });\n\t}\n\n\t/**\n\t * Acknowledges a dequeued batch of items, removing them from the\n\t * queue permanently. Pass the `readId` returned from the prior\n\t * `dequeue` call. Without `discard`, the items reappear once the\n\t * invisibility window elapses.\n\t *\n\t * The call is idempotent: a second `discard` with the same `readId`\n\t * is a no-op once the batch has been acknowledged. The retry policy\n\t * therefore retries both 429 and 5xx.\n\t *\n\t * @param parameters - Universe and queue identifiers, plus the\n\t * `readId` returned from a prior dequeue.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping `undefined` on success (the\n\t * server returns an empty body) or the {@link OpenCloudError}\n\t * that caused the request to fail.\n\t */\n\tpublic async discard(\n\t\tparameters: DiscardQueueItemsParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: DISCARD_SPEC });\n\t}\n\n\t/**\n\t * Enqueues a single item onto a memory-store queue. The queue is\n\t * auto-created on first use; the queue identifier is any string the\n\t * caller picks. Items with higher `priority` values are dequeued\n\t * first; equal priorities preserve insertion order. Items expire\n\t * and are removed automatically after `ttl` seconds, or after a\n\t * server-default lifetime when omitted.\n\t *\n\t * @param parameters - Universe and queue identifiers, the opaque\n\t * payload, and optional `priority` and `ttl`.\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 QueueItem} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async enqueue(\n\t\tparameters: EnqueueQueueItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<QueueItem, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: ENQUEUE_SPEC });\n\t}\n}\n","import type { HttpRequest } from \"../../../client/types.ts\";\nimport type {\n\tCreateSortedMapItemParameters,\n\tDeleteSortedMapItemParameters,\n\tGetSortedMapItemParameters,\n\tListSortedMapItemsParameters,\n\tSortKey,\n\tUpdateSortedMapItemParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the Open Cloud\n * `Cloud_CreateMemoryStoreSortedMapItem` endpoint. The caller-supplied\n * `itemId` travels as the `id` query parameter (URL-encoded by\n * `URLSearchParams`); the body carries `value`, the optional `ttl`\n * (serialized as a Google protobuf `Duration` string in seconds), and\n * one of `stringSortKey`/`numericSortKey` projected from the\n * {@link SortKey} discriminated union.\n *\n * @param parameters - Universe, sorted-map, item identifiers, the\n * value to store, and optional `sortKey` and `ttl`.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateSortedMapItemParameters): HttpRequest {\n\tconst { itemId, mapId, sortKey, ttl, universeId, value } = parameters;\n\tconst body: Record<string, unknown> = { value };\n\tif (ttl !== undefined) {\n\t\tbody[\"ttl\"] = `${ttl}s`;\n\t}\n\n\tapplySortKeyToBody(body, sortKey);\n\n\tconst query = new URLSearchParams({ id: itemId });\n\treturn {\n\t\tbody,\n\t\theaders: { \"content-type\": \"application/json\" },\n\t\tmethod: \"POST\",\n\t\turl: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items?${query.toString()}`,\n\t};\n}\n\n/**\n * Builds a `DELETE` request for the Open Cloud\n * `Cloud_DeleteMemoryStoreSortedMapItem` endpoint. Every path segment\n * (universe, sorted-map, item identifiers) is URL-encoded so callers\n * can pass values containing reserved characters without manual\n * escaping.\n *\n * @param parameters - Universe, sorted-map, and item identifiers.\n * @returns A pure {@link HttpRequest} describing the delete call.\n */\nexport function buildDeleteRequest(parameters: DeleteSortedMapItemParameters): HttpRequest {\n\tconst { itemId, mapId, universeId } = parameters;\n\treturn {\n\t\tmethod: \"DELETE\",\n\t\turl: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud\n * `Cloud_GetMemoryStoreSortedMapItem` endpoint. Every path segment\n * (universe, sorted-map, item identifiers) is URL-encoded so callers\n * can pass values containing reserved characters without manual\n * escaping.\n *\n * @param parameters - Universe, sorted-map, and item identifiers.\n * @returns A pure {@link HttpRequest} describing the get call.\n */\nexport function buildGetRequest(parameters: GetSortedMapItemParameters): HttpRequest {\n\tconst { itemId, mapId, universeId } = parameters;\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud\n * `Cloud_ListMemoryStoreSortedMapItems` endpoint. Optional `filter`,\n * `maxPageSize`, `orderBy`, and `pageToken` parameters travel as query\n * string parameters and are omitted when unset.\n *\n * @param parameters - Universe and sorted-map identifiers, plus\n * optional pagination and filter parameters.\n * @returns A pure {@link HttpRequest} describing the list call.\n */\nexport function buildListRequest(parameters: ListSortedMapItemsParameters): HttpRequest {\n\tconst { filter, mapId, maxPageSize, orderBy, pageToken, universeId } = parameters;\n\tconst query = new URLSearchParams();\n\tif (maxPageSize !== undefined) {\n\t\tquery.append(\"maxPageSize\", String(maxPageSize));\n\t}\n\n\tif (pageToken !== undefined) {\n\t\tquery.append(\"pageToken\", pageToken);\n\t}\n\n\tif (orderBy !== undefined) {\n\t\tquery.append(\"orderBy\", orderBy);\n\t}\n\n\tif (filter !== undefined) {\n\t\tquery.append(\"filter\", filter);\n\t}\n\n\tconst base = `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items`;\n\tconst queryString = query.toString();\n\treturn { method: \"GET\", url: queryString === \"\" ? base : `${base}?${queryString}` };\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud\n * `Cloud_UpdateMemoryStoreSortedMapItem` endpoint. Body fields are\n * conditionally included so a partial update sends only the changed\n * fields; the optional `allowMissing` query string drives\n * upsert-on-missing behaviour server-side.\n *\n * @param parameters - Universe, sorted-map, and item identifiers,\n * plus any subset of `value`, `ttl`, `sortKey`, and `allowMissing`.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateSortedMapItemParameters): HttpRequest {\n\tconst { allowMissing: shouldAllowMissing, itemId, mapId, universeId } = parameters;\n\tconst base = `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`;\n\tconst query = new URLSearchParams();\n\tif (shouldAllowMissing !== undefined) {\n\t\tquery.append(\"allowMissing\", String(shouldAllowMissing));\n\t}\n\n\tconst queryString = query.toString();\n\treturn {\n\t\tbody: buildUpdateBody(parameters),\n\t\theaders: { \"content-type\": \"application/json\" },\n\t\tmethod: \"PATCH\",\n\t\turl: queryString === \"\" ? base : `${base}?${queryString}`,\n\t};\n}\n\nfunction applySortKeyToBody(body: Record<string, unknown>, sortKey: SortKey | undefined): void {\n\tif (sortKey === undefined) {\n\t\treturn;\n\t}\n\n\tif (sortKey.kind === \"string\") {\n\t\tbody[\"stringSortKey\"] = sortKey.value;\n\t\treturn;\n\t}\n\n\tbody[\"numericSortKey\"] = sortKey.value;\n}\n\nfunction buildUpdateBody(parameters: UpdateSortedMapItemParameters): Record<string, unknown> {\n\tconst { sortKey, ttl, value } = parameters;\n\tconst body: Record<string, unknown> = {};\n\tif (value !== undefined) {\n\t\tbody[\"value\"] = value;\n\t}\n\n\tif (ttl !== undefined) {\n\t\tbody[\"ttl\"] = `${ttl}s`;\n\t}\n\n\tapplySortKeyToBody(body, sortKey);\n\treturn body;\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst CREATE_PER_MINUTE = 1_000_000;\nconst SECONDS_PER_MINUTE = 60;\n\nconst WRITE_SCOPE = \"memory-store.sorted-map:write\";\n\n/**\n * Per-second request ceiling for creating a memory-store sorted-map\n * item, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner). Keyed independently from the get, update,\n * delete, and list operations so the five do not share a queue.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: CREATE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.create\",\n});\n\n/**\n * Scopes required to create a memory-store sorted-map item, sourced\n * from `x-roblox-scopes` on the `Cloud_CreateMemoryStoreSortedMapItem`\n * operation in the vendored OpenAPI schema.\n */\nexport const CREATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([WRITE_SCOPE]);\n\nconst DELETE_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for deleting a memory-store sorted-map\n * item, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner).\n */\nexport const DELETE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: DELETE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.delete\",\n});\n\n/**\n * Scopes required to delete a memory-store sorted-map item, sourced\n * from `x-roblox-scopes` on the `Cloud_DeleteMemoryStoreSortedMapItem`\n * operation in the vendored OpenAPI schema.\n */\nexport const DELETE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([WRITE_SCOPE]);\n\nconst GET_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for reading a memory-store sorted-map\n * item, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner).\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: GET_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.get\",\n});\n\n/**\n * Scopes required to read a memory-store sorted-map item, sourced from\n * `x-roblox-scopes` on the `Cloud_GetMemoryStoreSortedMapItem`\n * operation in the vendored OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.sorted-map:read\",\n]);\n\nconst LIST_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for listing memory-store sorted-map\n * items, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner).\n */\nexport const LIST_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: LIST_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.list\",\n});\n\n/**\n * Scopes required to list memory-store sorted-map items, sourced from\n * `x-roblox-scopes` on the `Cloud_ListMemoryStoreSortedMapItems`\n * operation in the vendored OpenAPI schema.\n */\nexport const LIST_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.sorted-map:read\",\n]);\n\nconst UPDATE_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for updating a memory-store sorted-map\n * item, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner).\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: UPDATE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.update\",\n});\n\n/**\n * Scopes required to update a memory-store sorted-map item, sourced\n * from `x-roblox-scopes` on the `Cloud_UpdateMemoryStoreSortedMapItem`\n * operation in the vendored OpenAPI schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([WRITE_SCOPE]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { ListSortedMapItemsResult, SortedMapItem, SortKey } from \"./types.ts\";\nimport type { MemoryStoreSortedMapItemWire } from \"./wire.ts\";\n\nconst PATH_PATTERN =\n\t/^cloud\\/v2\\/universes\\/(\\d+)\\/memory-store\\/sorted-maps\\/([^/]+)\\/items\\/([^/]+)$/;\nconst MALFORMED_MESSAGE = \"Malformed memory-store sorted-map item response\";\nconst MALFORMED_LIST_MESSAGE = \"Malformed memory-store sorted-map list response\";\n\n/**\n * Parses a successful memory-store sorted-map item response body (the\n * happy path for create, get, and update) into the public\n * {@link SortedMapItem} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link SortedMapItem},\n * or an {@link ApiError} when the body does not match the wire schema.\n */\nexport function parseSortedMapItemResponse(\n\tresponse: HttpResponse,\n): Result<SortedMapItem, ApiError> {\n\tconst item = wireBodyToSortedMapItem(response.body);\n\tif (item === undefined) {\n\t\treturn malformedSortedMapItem(response.status);\n\t}\n\n\treturn { data: item, success: true };\n}\n\n/**\n * Parses a successful `Cloud_ListMemoryStoreSortedMapItems` response\n * body into the public {@link ListSortedMapItemsResult} shape. Each\n * item in the `memoryStoreSortedMapItems` array is validated through\n * the same path-and-shape checks as\n * {@link parseSortedMapItemResponse}; a malformed entry rejects the\n * whole response.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed\n * {@link ListSortedMapItemsResult}, or an {@link ApiError} when the\n * response shape is wrong.\n */\nexport function parseListResponse(\n\tresponse: HttpResponse,\n): Result<ListSortedMapItemsResult, ApiError> {\n\tconst { body, status: statusCode } = response;\n\tif (!isRecord(body)) {\n\t\treturn malformedList(statusCode);\n\t}\n\n\tconst { memoryStoreSortedMapItems, nextPageToken } = body;\n\tif (!Array.isArray(memoryStoreSortedMapItems)) {\n\t\treturn malformedList(statusCode);\n\t}\n\n\tif (nextPageToken !== undefined && typeof nextPageToken !== \"string\") {\n\t\treturn malformedList(statusCode);\n\t}\n\n\tconst items = memoryStoreSortedMapItems.map(wireBodyToSortedMapItem);\n\tif (!items.every(isSortedMapItem)) {\n\t\treturn malformedList(statusCode);\n\t}\n\n\treturn { data: { items, nextPageToken }, success: true };\n}\n\nfunction isSortedMapItemWire(body: unknown): body is MemoryStoreSortedMapItemWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { id, etag, expireTime, numericSortKey, path, stringSortKey, value } = body;\n\treturn (\n\t\ttypeof path === \"string\" &&\n\t\ttypeof etag === \"string\" &&\n\t\ttypeof id === \"string\" &&\n\t\tisDateTimeString(expireTime) &&\n\t\tvalue !== undefined &&\n\t\t(stringSortKey === undefined ||\n\t\t\tstringSortKey === null ||\n\t\t\ttypeof stringSortKey === \"string\") &&\n\t\t(numericSortKey === undefined ||\n\t\t\tnumericSortKey === null ||\n\t\t\ttypeof numericSortKey === \"number\")\n\t);\n}\n\nfunction extractSortKey(body: MemoryStoreSortedMapItemWire): \"conflict\" | SortKey | undefined {\n\tconst hasStringKey = typeof body.stringSortKey === \"string\";\n\tconst hasNumericKey = typeof body.numericSortKey === \"number\";\n\tif (hasStringKey && hasNumericKey) {\n\t\treturn \"conflict\";\n\t}\n\n\tif (hasStringKey) {\n\t\treturn { kind: \"string\", value: body.stringSortKey };\n\t}\n\n\tif (hasNumericKey) {\n\t\treturn { kind: \"numeric\", value: body.numericSortKey };\n\t}\n\n\treturn undefined;\n}\n\nfunction wireBodyToSortedMapItem(body: unknown): SortedMapItem | undefined {\n\tif (!isSortedMapItemWire(body)) {\n\t\treturn undefined;\n\t}\n\n\tconst match = PATH_PATTERN.exec(body.path);\n\tconst universeId = match?.[1];\n\tconst mapId = match?.[2];\n\tconst id = match?.[3];\n\tif (universeId === undefined || mapId === undefined || id === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst sortKey = extractSortKey(body);\n\tif (sortKey === \"conflict\") {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\tid,\n\t\tetag: body.etag,\n\t\texpiresAt: new Date(body.expireTime),\n\t\tmapId,\n\t\tsortKey,\n\t\tuniverseId,\n\t\tvalue: body.value,\n\t};\n}\n\nfunction malformedSortedMapItem(statusCode: number): Result<SortedMapItem, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_MESSAGE, { statusCode }),\n\t\tsuccess: false,\n\t};\n}\n\nfunction isSortedMapItem(item: SortedMapItem | undefined): item is SortedMapItem {\n\treturn item !== undefined;\n}\n\nfunction malformedList(statusCode: number): Result<ListSortedMapItemsResult, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_LIST_MESSAGE, { statusCode }),\n\t\tsuccess: false,\n\t};\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildDeleteRequest,\n\tbuildGetRequest,\n\tbuildListRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/cloud-v2/memory-store-sorted-maps/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tCREATE_REQUIRED_SCOPES,\n\tDELETE_OPERATION_LIMIT,\n\tDELETE_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/cloud-v2/memory-store-sorted-maps/operations.ts\";\nimport {\n\tparseListResponse,\n\tparseSortedMapItemResponse,\n} from \"../../domains/cloud-v2/memory-store-sorted-maps/parsers.ts\";\nimport type {\n\tCreateSortedMapItemParameters,\n\tDeleteSortedMapItemParameters,\n\tGetSortedMapItemParameters,\n\tListSortedMapItemsParameters,\n\tListSortedMapItemsResult,\n\tSortedMapItem,\n\tUpdateSortedMapItemParameters,\n} from \"../../domains/cloud-v2/memory-store-sorted-maps/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\ttype ResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateSortedMapItemParameters, SortedMapItem>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseSortedMapItemResponse,\n\trequiredScopes: CREATE_REQUIRED_SCOPES,\n});\n\nconst DELETE_SPEC = makeSpec<DeleteSortedMapItemParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildDeleteRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: DELETE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: DELETE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetSortedMapItemParameters, SortedMapItem>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseSortedMapItemResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst LIST_SPEC = makeSpec<ListSortedMapItemsParameters, ListSortedMapItemsResult>({\n\tbuildRequest: (parameters) => okRequest(buildListRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LIST_OPERATION_LIMIT,\n\tparse: parseListResponse,\n\trequiredScopes: LIST_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateSortedMapItemParameters, SortedMapItem>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseSortedMapItemResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\n/**\n * Operation Group on `StorageClient` that exposes the memory-store\n * sorted-map endpoints. Sorted maps are ordered collections of\n * (id, value, sortKey) triples; consumers create, read, update, list,\n * and delete items keyed by a caller-supplied identifier and ordered\n * by an optional string or numeric sort key.\n */\nexport class MemoryStoreSortedMapsGroup {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Wraps the shared {@link ResourceClient} so the Operation Group\n\t * routes calls through the same retry, hooks, and rate-limit queues\n\t * as the rest of the parent client.\n\t *\n\t * @param inner - The shared {@link ResourceClient} owned by the\n\t * parent client.\n\t */\n\tconstructor(inner: ResourceClient) {\n\t\tthis.#inner = inner;\n\t}\n\n\t/**\n\t * Creates a single item in a sorted map. The sorted map is\n\t * auto-created on first use; the map identifier is any string the\n\t * caller picks. Items are keyed by `itemId` (case-sensitive) and\n\t * ordered by an optional `sortKey`. Items expire and are removed\n\t * automatically after `ttl` seconds, or after a server-default\n\t * lifetime when omitted.\n\t *\n\t * On 5xx, create does not retry: Roblox Open Cloud has no\n\t * idempotency-key support, so a retry of a transient failure risks\n\t * producing a duplicate item.\n\t *\n\t * @param parameters - Universe, sorted-map, item identifiers, the\n\t * value to store, and optional `sortKey` and `ttl`.\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 SortedMapItem}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateSortedMapItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<SortedMapItem, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Removes a single item from a sorted map. The call is idempotent:\n\t * a second `delete` against the same item is a no-op once the\n\t * server has dropped the row. The retry policy retries both 429\n\t * and 5xx.\n\t *\n\t * @param parameters - Universe, sorted-map, and item identifiers.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping `undefined` on success or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async delete(\n\t\tparameters: DeleteSortedMapItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: DELETE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single item from a sorted map. Returns the parsed\n\t * {@link SortedMapItem} with the server-recorded `etag` for use in\n\t * subsequent conditional updates (once the SDK begins emitting\n\t * `If-Match`; see the package README).\n\t *\n\t * @param parameters - Universe, sorted-map, and item identifiers.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetSortedMapItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<SortedMapItem, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Lists items in a sorted map. The server caps `maxPageSize` at\n\t * `100` and defaults it to `1` when omitted, so callers explicitly\n\t * pass `maxPageSize` to retrieve more than a single item per page.\n\t * The `filter` parameter accepts a CEL expression on `id` and\n\t * `sortKey` (operators `<`, `>`, `&&` only).\n\t *\n\t * @param parameters - Universe and sorted-map identifiers, plus\n\t * optional pagination and filter parameters.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed\n\t * {@link ListSortedMapItemsResult} or the {@link OpenCloudError}\n\t * that caused the request to fail.\n\t */\n\tpublic async list(\n\t\tparameters: ListSortedMapItemsParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<ListSortedMapItemsResult, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: LIST_SPEC });\n\t}\n\n\t/**\n\t * Updates a sorted-map item under PATCH semantics: omitted body\n\t * fields are left unchanged on the server, supplied fields replace\n\t * their existing values. Passing `allowMissing: true` creates the\n\t * item when no row exists instead of returning 404.\n\t *\n\t * Retries 5xx because PATCH with the same body produces the same\n\t * server state.\n\t *\n\t * @param parameters - Universe, sorted-map, and item identifiers,\n\t * plus any subset of `value`, `ttl`, `sortKey`, and\n\t * `allowMissing`.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateSortedMapItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<SortedMapItem, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n","import type { OpenCloudClientOptions } from \"../../client/types.ts\";\nimport { ResourceClient } from \"../../internal/resource-client.ts\";\nimport { MemoryStoreQueuesGroup } from \"./queues-group.ts\";\nimport { MemoryStoreSortedMapsGroup } from \"./sorted-maps-group.ts\";\n\n/**\n * Public client for the Roblox Open Cloud `Data and memory stores`\n * Feature. Today it covers memory-store queues via the\n * {@link StorageClient.queues} Operation Group and memory-store sorted\n * maps via the {@link StorageClient.sortedMaps} Operation Group; a\n * future data-stores Operation Group slots in as a sibling on the same\n * client.\n *\n * Every method returns a `Result` so callers handle failure\n * explicitly; no thrown error ever escapes the client.\n *\n * @example\n *\n * ```ts\n * import { StorageClient } from \"@bedrock-rbx/ocale/storage\";\n *\n * const client = new StorageClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(StorageClient);\n * ```\n */\nexport class StorageClient {\n\t/** Memory-store queue Operation Group. */\n\tpublic readonly queues: MemoryStoreQueuesGroup;\n\t/** Memory-store sorted-map Operation Group. */\n\tpublic readonly sortedMaps: MemoryStoreSortedMapsGroup;\n\n\t/**\n\t * Creates a new {@link StorageClient}. 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\tconst inner = new ResourceClient(options);\n\t\tthis.queues = new MemoryStoreQueuesGroup(inner);\n\t\tthis.sortedMaps = new MemoryStoreSortedMapsGroup(inner);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;AAiBA,SAAgB,oBAAoB,YAAqD;CACxF,MAAM,EAAE,MAAM,UAAU,SAAS,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CAUA,YAAY,OAAuB;AAClC,QAAA,QAAc;;;;;;;;;;;;;;;;;;;;;CAsBf,MAAa,OACZ,YACA,SACiD;AACjD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;;;CAcvE,MAAa,OACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;;;CAcvE,MAAa,IACZ,YACA,SACiD;AACjD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAU,CAAC;;;;;;;;;;;;;;;;CAiBpE,MAAa,KACZ,YACA,SAC4D;AAC5D,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAW,CAAC;;;;;;;;;;;;;;;;;;CAmBrE,MAAa,OACZ,YACA,SACiD;AACjD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AChMxE,IAAa,gBAAb,MAA2B;;CAE1B;;CAEA;;;;;;;CAQA,YAAY,SAAiC;EAC5C,MAAM,QAAQ,IAAI,eAAe,QAAQ;AACzC,OAAK,SAAS,IAAI,uBAAuB,MAAM;AAC/C,OAAK,aAAa,IAAI,2BAA2B,MAAM"}
1
+ {"version":3,"file":"storage.mjs","names":["SECONDS_PER_MINUTE","PATH_PATTERN","makeSpec","#inner","#inner"],"sources":["../src/domains/cloud-v2/memory-store-queues/builders.ts","../src/domains/cloud-v2/memory-store-queues/operations.ts","../src/domains/cloud-v2/memory-store-queues/parsers.ts","../src/resources/storage/queues-group.ts","../src/domains/cloud-v2/memory-store-sorted-maps/builders.ts","../src/domains/cloud-v2/memory-store-sorted-maps/operations.ts","../src/domains/cloud-v2/memory-store-sorted-maps/parsers.ts","../src/resources/storage/sorted-maps-group.ts","../src/resources/storage/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../client/types.ts\";\nimport type {\n\tDequeueQueueItemsParameters,\n\tDiscardQueueItemsParameters,\n\tEnqueueQueueItemParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the Open Cloud\n * `Cloud_CreateMemoryStoreQueueItem` endpoint. Serializes the optional\n * `ttl` field as a Google protobuf `Duration` string in seconds (`\"30s\"`)\n * to match the wire contract.\n *\n * @param parameters - Universe and queue identifiers, the opaque payload,\n * and optional priority and TTL.\n * @returns A pure {@link HttpRequest} describing the enqueue call.\n */\nexport function buildEnqueueRequest(parameters: EnqueueQueueItemParameters): HttpRequest {\n\tconst { data, priority, queueId, ttl, universeId } = parameters;\n\tconst body: Record<string, unknown> = { data };\n\tif (priority !== undefined) {\n\t\tbody[\"priority\"] = priority;\n\t}\n\n\tif (ttl !== undefined) {\n\t\tbody[\"ttl\"] = `${ttl}s`;\n\t}\n\n\treturn {\n\t\tbody,\n\t\theaders: { \"content-type\": \"application/json\" },\n\t\tmethod: \"POST\",\n\t\turl: `/cloud/v2/universes/${universeId}/memory-store/queues/${queueId}/items`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud\n * `Cloud_ReadMemoryStoreQueueItems` endpoint. The `:read` suffix is a\n * custom-method marker; the call is HTTP `GET` despite the AIP-136\n * convention that custom methods use `POST`. Parameters travel as query\n * string only; there is no request body.\n *\n * `invisibilityWindow` is serialized as a Google protobuf `Duration`\n * string in seconds (`\"30s\"`), matching the wire contract.\n *\n * @param parameters - Universe and queue identifiers, plus optional\n * `count`, `allOrNothing`, and `invisibilityWindow`.\n * @returns A pure {@link HttpRequest} describing the dequeue call.\n */\nexport function buildDequeueRequest(parameters: DequeueQueueItemsParameters): HttpRequest {\n\tconst query = new URLSearchParams();\n\tif (parameters.count !== undefined) {\n\t\tquery.append(\"count\", String(parameters.count));\n\t}\n\n\tif (parameters.allOrNothing !== undefined) {\n\t\tquery.append(\"allOrNothing\", String(parameters.allOrNothing));\n\t}\n\n\tif (parameters.invisibilityWindow !== undefined) {\n\t\tquery.append(\"invisibilityWindow\", `${parameters.invisibilityWindow}s`);\n\t}\n\n\tconst queryString = query.toString();\n\tconst { queueId, universeId } = parameters;\n\tconst base = `/cloud/v2/universes/${universeId}/memory-store/queues/${queueId}/items:read`;\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\n * `Cloud_DiscardMemoryStoreQueueItems` endpoint. The request body uses\n * `{ readId }`, matching the schema (the dequeue *response* uses `id`,\n * but the discard *request* matches the schema and is not patched).\n *\n * @param parameters - Universe and queue identifiers, plus the\n * `readId` returned from a prior dequeue.\n * @returns A pure {@link HttpRequest} describing the discard call.\n */\nexport function buildDiscardRequest(parameters: DiscardQueueItemsParameters): HttpRequest {\n\tconst { queueId, readId, universeId } = parameters;\n\treturn {\n\t\tbody: { readId },\n\t\theaders: { \"content-type\": \"application/json\" },\n\t\tmethod: \"POST\",\n\t\turl: `/cloud/v2/universes/${universeId}/memory-store/queues/${queueId}/items:discard`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst ENQUEUE_PER_MINUTE = 1_000_000;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for enqueueing a memory-store queue item,\n * from the Open Cloud OpenAPI schema (1,000,000 requests per minute per\n * API key owner). Keyed independently from the dequeue and discard\n * operations so the three do not share a queue; upstream quota\n * accounting is documented per-operation, and the conservative default\n * is fewer cross-method contention surprises.\n */\nexport const ENQUEUE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: ENQUEUE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-queues.enqueue\",\n});\n\n/**\n * Scopes required to enqueue a memory-store queue item, sourced from\n * `x-roblox-scopes` on the `Cloud_CreateMemoryStoreQueueItem` operation\n * in the vendored OpenAPI schema.\n */\nexport const ENQUEUE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.queue:add\",\n]);\n\nconst DEQUEUE_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for dequeueing memory-store queue items,\n * from the Open Cloud OpenAPI schema (1,000,000 requests per minute\n * per API key owner). Keyed independently from enqueue and discard.\n */\nexport const DEQUEUE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: DEQUEUE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-queues.dequeue\",\n});\n\n/**\n * Scopes required to dequeue memory-store queue items, sourced from\n * `x-roblox-scopes` on the `Cloud_ReadMemoryStoreQueueItems` operation\n * in the vendored OpenAPI schema.\n */\nexport const DEQUEUE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.queue:dequeue\",\n]);\n\nconst DISCARD_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for discarding (acknowledging) memory-store\n * queue items, from the Open Cloud OpenAPI schema (1,000,000 requests\n * per minute per API key owner). Keyed independently from enqueue and\n * dequeue.\n */\nexport const DISCARD_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: DISCARD_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-queues.discard\",\n});\n\n/**\n * Scopes required to discard memory-store queue items, sourced from\n * `x-roblox-scopes` on the `Cloud_DiscardMemoryStoreQueueItems`\n * operation in the vendored OpenAPI schema.\n */\nexport const DISCARD_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.queue:discard\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { DequeueResult, QueueItem } from \"./types.ts\";\nimport type { MemoryStoreQueueItemWire } from \"./wire.ts\";\n\nconst PATH_PATTERN = /^cloud\\/v2\\/universes\\/(\\d+)\\/memory-store\\/queues\\/([^/]+)\\/items\\/([^/]+)$/;\nconst MALFORMED_QUEUE_ITEM_MESSAGE = \"Malformed memory-store queue item response\";\nconst MALFORMED_DEQUEUE_MESSAGE = \"Malformed memory-store dequeue response\";\n\n/**\n * Parses a successful memory-store queue-item response body (the\n * `Cloud_CreateMemoryStoreQueueItem` happy path) into the public\n * {@link QueueItem} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link QueueItem}, or an\n * {@link ApiError} when the body does not match the wire schema.\n */\nexport function parseQueueItemResponse(response: HttpResponse): Result<QueueItem, ApiError> {\n\tconst item = wireBodyToQueueItem(response.body);\n\tif (item === undefined) {\n\t\treturn malformedQueueItem(response.status, response.body);\n\t}\n\n\treturn { data: item, success: true };\n}\n\n/**\n * Parses a successful `Cloud_ReadMemoryStoreQueueItems` response body\n * into the public {@link DequeueResult} shape. Each item in the\n * `queueItems` array is validated through the same path-and-shape\n * checks as {@link parseQueueItemResponse}; a malformed entry rejects\n * the whole response.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link DequeueResult},\n * or an {@link ApiError} when the response shape is wrong.\n */\nexport function parseDequeueResponse(response: HttpResponse): Result<DequeueResult, ApiError> {\n\tconst { body, status: statusCode } = response;\n\tif (!isRecord(body)) {\n\t\treturn malformedDequeue(statusCode, body);\n\t}\n\n\tconst { id, queueItems } = body;\n\tif (typeof id !== \"string\") {\n\t\treturn malformedDequeue(statusCode, body);\n\t}\n\n\tif (queueItems !== undefined && queueItems !== null && !Array.isArray(queueItems)) {\n\t\treturn malformedDequeue(statusCode, body);\n\t}\n\n\tconst rawItems = queueItems ?? [];\n\tconst items = rawItems.map(wireBodyToQueueItem);\n\tif (!items.every(isQueueItem)) {\n\t\treturn malformedDequeue(statusCode, body);\n\t}\n\n\treturn { data: { items, readId: id }, success: true };\n}\n\nfunction isQueueItemWire(body: unknown): body is MemoryStoreQueueItemWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { data, expireTime, path, priority } = body;\n\treturn (\n\t\ttypeof path === \"string\" &&\n\t\tisDateTimeString(expireTime) &&\n\t\tdata !== undefined &&\n\t\tdata !== null &&\n\t\t(priority === undefined || priority === null || typeof priority === \"number\")\n\t);\n}\n\nfunction wireBodyToQueueItem(body: unknown): QueueItem | undefined {\n\tif (!isQueueItemWire(body)) {\n\t\treturn undefined;\n\t}\n\n\tconst match = PATH_PATTERN.exec(body.path);\n\tconst universeId = match?.[1];\n\tconst queueId = match?.[2];\n\tconst id = match?.[3];\n\tif (universeId === undefined || queueId === undefined || id === undefined) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\tid,\n\t\tdata: body.data,\n\t\texpiresAt: new Date(body.expireTime),\n\t\tpriority: body.priority ?? undefined,\n\t\tqueueId,\n\t\tuniverseId,\n\t};\n}\n\nfunction malformedQueueItem(statusCode: number, body: unknown): Result<QueueItem, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_QUEUE_ITEM_MESSAGE, {\n\t\t\tdetails: body as JSONValue | undefined,\n\t\t\tstatusCode,\n\t\t}),\n\t\tsuccess: false,\n\t};\n}\n\nfunction isQueueItem(item: QueueItem | undefined): item is QueueItem {\n\treturn item !== undefined;\n}\n\nfunction malformedDequeue(statusCode: number, body: unknown): Result<DequeueResult, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_DEQUEUE_MESSAGE, {\n\t\t\tdetails: body as JSONValue | undefined,\n\t\t\tstatusCode,\n\t\t}),\n\t\tsuccess: false,\n\t};\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tbuildDequeueRequest,\n\tbuildDiscardRequest,\n\tbuildEnqueueRequest,\n} from \"../../domains/cloud-v2/memory-store-queues/builders.ts\";\nimport {\n\tDEQUEUE_OPERATION_LIMIT,\n\tDEQUEUE_REQUIRED_SCOPES,\n\tDISCARD_OPERATION_LIMIT,\n\tDISCARD_REQUIRED_SCOPES,\n\tENQUEUE_OPERATION_LIMIT,\n\tENQUEUE_REQUIRED_SCOPES,\n} from \"../../domains/cloud-v2/memory-store-queues/operations.ts\";\nimport {\n\tparseDequeueResponse,\n\tparseQueueItemResponse,\n} from \"../../domains/cloud-v2/memory-store-queues/parsers.ts\";\nimport type {\n\tDequeueQueueItemsParameters,\n\tDequeueResult,\n\tDiscardQueueItemsParameters,\n\tEnqueueQueueItemParameters,\n\tQueueItem,\n} from \"../../domains/cloud-v2/memory-store-queues/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\ttype ResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst ENQUEUE_SPEC = makeSpec<EnqueueQueueItemParameters, QueueItem>({\n\tbuildRequest: (parameters) => okRequest(buildEnqueueRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: ENQUEUE_OPERATION_LIMIT,\n\tparse: parseQueueItemResponse,\n\trequiredScopes: ENQUEUE_REQUIRED_SCOPES,\n});\n\n// Dequeue uses HTTP GET but mutates server state via the invisibility\n// window. Retrying a 5xx where the server set invisibility before\n// failing the response would lose the original batch (it stays\n// invisible until the window elapses) and return a different one. So\n// the retry policy mirrors `create`: only 429, never 5xx.\nconst DEQUEUE_SPEC = makeSpec<DequeueQueueItemsParameters, DequeueResult>({\n\tbuildRequest: (parameters) => okRequest(buildDequeueRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: DEQUEUE_OPERATION_LIMIT,\n\tparse: parseDequeueResponse,\n\trequiredScopes: DEQUEUE_REQUIRED_SCOPES,\n});\n\nconst DISCARD_SPEC = makeSpec<DiscardQueueItemsParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildDiscardRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: DISCARD_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: DISCARD_REQUIRED_SCOPES,\n});\n\n/**\n * Operation Group on `StorageClient` that exposes the memory-store\n * queue endpoints. Queues are FIFO collections of opaque JSON values\n * with optional priority and TTL; consumers enqueue items, dequeue\n * them in batches, and acknowledge processed batches with a read\n * identifier.\n */\nexport class MemoryStoreQueuesGroup {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Wraps the shared {@link ResourceClient} so the Operation Group\n\t * routes calls through the same retry, hooks, and rate-limit queues\n\t * as the rest of the parent client.\n\t *\n\t * @param inner - The shared {@link ResourceClient} owned by the\n\t * parent client.\n\t */\n\tconstructor(inner: ResourceClient) {\n\t\tthis.#inner = inner;\n\t}\n\n\t/**\n\t * Dequeues up to `count` items from the front of the queue. Items\n\t * returned become invisible to subsequent reads for\n\t * `invisibilityWindow` seconds (default 30 server-side); they\n\t * reappear once the window elapses unless acknowledged via\n\t * `discard` with the returned `readId`.\n\t *\n\t * On 5xx, dequeue does not retry: the server may have set\n\t * invisibility on a batch before the response failed, so a retry\n\t * would return a *different* batch and the first one is lost until\n\t * the window expires. Callers that can detect duplicates externally\n\t * may opt back into 5xx retry per call by passing `retryableStatuses`\n\t * on `options`.\n\t *\n\t * @param parameters - Universe and queue identifiers, plus optional\n\t * `count`, `allOrNothing`, and `invisibilityWindow`.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link DequeueResult}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async dequeue(\n\t\tparameters: DequeueQueueItemsParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DequeueResult, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: DEQUEUE_SPEC });\n\t}\n\n\t/**\n\t * Acknowledges a dequeued batch of items, removing them from the\n\t * queue permanently. Pass the `readId` returned from the prior\n\t * `dequeue` call. Without `discard`, the items reappear once the\n\t * invisibility window elapses.\n\t *\n\t * The call is idempotent: a second `discard` with the same `readId`\n\t * is a no-op once the batch has been acknowledged. The retry policy\n\t * therefore retries both 429 and 5xx.\n\t *\n\t * @param parameters - Universe and queue identifiers, plus the\n\t * `readId` returned from a prior dequeue.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping `undefined` on success (the\n\t * server returns an empty body) or the {@link OpenCloudError}\n\t * that caused the request to fail.\n\t */\n\tpublic async discard(\n\t\tparameters: DiscardQueueItemsParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: DISCARD_SPEC });\n\t}\n\n\t/**\n\t * Enqueues a single item onto a memory-store queue. The queue is\n\t * auto-created on first use; the queue identifier is any string the\n\t * caller picks. Items with higher `priority` values are dequeued\n\t * first; equal priorities preserve insertion order. Items expire\n\t * and are removed automatically after `ttl` seconds, or after a\n\t * server-default lifetime when omitted.\n\t *\n\t * @param parameters - Universe and queue identifiers, the opaque\n\t * payload, and optional `priority` and `ttl`.\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 QueueItem} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async enqueue(\n\t\tparameters: EnqueueQueueItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<QueueItem, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: ENQUEUE_SPEC });\n\t}\n}\n","import type { HttpRequest } from \"../../../client/types.ts\";\nimport type {\n\tCreateSortedMapItemParameters,\n\tDeleteSortedMapItemParameters,\n\tGetSortedMapItemParameters,\n\tListSortedMapItemsParameters,\n\tSortKey,\n\tUpdateSortedMapItemParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the Open Cloud\n * `Cloud_CreateMemoryStoreSortedMapItem` endpoint. The caller-supplied\n * `itemId` travels as the `id` query parameter (URL-encoded by\n * `URLSearchParams`); the body carries `value`, the optional `ttl`\n * (serialized as a Google protobuf `Duration` string in seconds), and\n * one of `stringSortKey`/`numericSortKey` projected from the\n * {@link SortKey} discriminated union.\n *\n * @param parameters - Universe, sorted-map, item identifiers, the\n * value to store, and optional `sortKey` and `ttl`.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateSortedMapItemParameters): HttpRequest {\n\tconst { itemId, mapId, sortKey, ttl, universeId, value } = parameters;\n\tconst body: Record<string, unknown> = { value };\n\tif (ttl !== undefined) {\n\t\tbody[\"ttl\"] = `${ttl}s`;\n\t}\n\n\tapplySortKeyToBody(body, sortKey);\n\n\tconst query = new URLSearchParams({ id: itemId });\n\treturn {\n\t\tbody,\n\t\theaders: { \"content-type\": \"application/json\" },\n\t\tmethod: \"POST\",\n\t\turl: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items?${query.toString()}`,\n\t};\n}\n\n/**\n * Builds a `DELETE` request for the Open Cloud\n * `Cloud_DeleteMemoryStoreSortedMapItem` endpoint. Every path segment\n * (universe, sorted-map, item identifiers) is URL-encoded so callers\n * can pass values containing reserved characters without manual\n * escaping.\n *\n * @param parameters - Universe, sorted-map, and item identifiers.\n * @returns A pure {@link HttpRequest} describing the delete call.\n */\nexport function buildDeleteRequest(parameters: DeleteSortedMapItemParameters): HttpRequest {\n\tconst { itemId, mapId, universeId } = parameters;\n\treturn {\n\t\tmethod: \"DELETE\",\n\t\turl: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud\n * `Cloud_GetMemoryStoreSortedMapItem` endpoint. Every path segment\n * (universe, sorted-map, item identifiers) is URL-encoded so callers\n * can pass values containing reserved characters without manual\n * escaping.\n *\n * @param parameters - Universe, sorted-map, and item identifiers.\n * @returns A pure {@link HttpRequest} describing the get call.\n */\nexport function buildGetRequest(parameters: GetSortedMapItemParameters): HttpRequest {\n\tconst { itemId, mapId, universeId } = parameters;\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud\n * `Cloud_ListMemoryStoreSortedMapItems` endpoint. Optional `filter`,\n * `maxPageSize`, `orderBy`, and `pageToken` parameters travel as query\n * string parameters and are omitted when unset.\n *\n * @param parameters - Universe and sorted-map identifiers, plus\n * optional pagination and filter parameters.\n * @returns A pure {@link HttpRequest} describing the list call.\n */\nexport function buildListRequest(parameters: ListSortedMapItemsParameters): HttpRequest {\n\tconst { filter, mapId, maxPageSize, orderBy, pageToken, universeId } = parameters;\n\tconst query = new URLSearchParams();\n\tif (maxPageSize !== undefined) {\n\t\tquery.append(\"maxPageSize\", String(maxPageSize));\n\t}\n\n\tif (pageToken !== undefined) {\n\t\tquery.append(\"pageToken\", pageToken);\n\t}\n\n\tif (orderBy !== undefined) {\n\t\tquery.append(\"orderBy\", orderBy);\n\t}\n\n\tif (filter !== undefined) {\n\t\tquery.append(\"filter\", filter);\n\t}\n\n\tconst base = `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items`;\n\tconst queryString = query.toString();\n\treturn { method: \"GET\", url: queryString === \"\" ? base : `${base}?${queryString}` };\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud\n * `Cloud_UpdateMemoryStoreSortedMapItem` endpoint. Body fields are\n * conditionally included so a partial update sends only the changed\n * fields; the optional `allowMissing` query string drives\n * upsert-on-missing behaviour server-side.\n *\n * @param parameters - Universe, sorted-map, and item identifiers,\n * plus any subset of `value`, `ttl`, `sortKey`, and `allowMissing`.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateSortedMapItemParameters): HttpRequest {\n\tconst { allowMissing: shouldAllowMissing, itemId, mapId, universeId } = parameters;\n\tconst base = `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`;\n\tconst query = new URLSearchParams();\n\tif (shouldAllowMissing !== undefined) {\n\t\tquery.append(\"allowMissing\", String(shouldAllowMissing));\n\t}\n\n\tconst queryString = query.toString();\n\treturn {\n\t\tbody: buildUpdateBody(parameters),\n\t\theaders: { \"content-type\": \"application/json\" },\n\t\tmethod: \"PATCH\",\n\t\turl: queryString === \"\" ? base : `${base}?${queryString}`,\n\t};\n}\n\nfunction applySortKeyToBody(body: Record<string, unknown>, sortKey: SortKey | undefined): void {\n\tif (sortKey === undefined) {\n\t\treturn;\n\t}\n\n\tif (sortKey.kind === \"string\") {\n\t\tbody[\"stringSortKey\"] = sortKey.value;\n\t\treturn;\n\t}\n\n\tbody[\"numericSortKey\"] = sortKey.value;\n}\n\nfunction buildUpdateBody(parameters: UpdateSortedMapItemParameters): Record<string, unknown> {\n\tconst { sortKey, ttl, value } = parameters;\n\tconst body: Record<string, unknown> = {};\n\tif (value !== undefined) {\n\t\tbody[\"value\"] = value;\n\t}\n\n\tif (ttl !== undefined) {\n\t\tbody[\"ttl\"] = `${ttl}s`;\n\t}\n\n\tapplySortKeyToBody(body, sortKey);\n\treturn body;\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst CREATE_PER_MINUTE = 1_000_000;\nconst SECONDS_PER_MINUTE = 60;\n\nconst WRITE_SCOPE = \"memory-store.sorted-map:write\";\n\n/**\n * Per-second request ceiling for creating a memory-store sorted-map\n * item, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner). Keyed independently from the get, update,\n * delete, and list operations so the five do not share a queue.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: CREATE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.create\",\n});\n\n/**\n * Scopes required to create a memory-store sorted-map item, sourced\n * from `x-roblox-scopes` on the `Cloud_CreateMemoryStoreSortedMapItem`\n * operation in the vendored OpenAPI schema.\n */\nexport const CREATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([WRITE_SCOPE]);\n\nconst DELETE_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for deleting a memory-store sorted-map\n * item, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner).\n */\nexport const DELETE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: DELETE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.delete\",\n});\n\n/**\n * Scopes required to delete a memory-store sorted-map item, sourced\n * from `x-roblox-scopes` on the `Cloud_DeleteMemoryStoreSortedMapItem`\n * operation in the vendored OpenAPI schema.\n */\nexport const DELETE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([WRITE_SCOPE]);\n\nconst GET_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for reading a memory-store sorted-map\n * item, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner).\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: GET_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.get\",\n});\n\n/**\n * Scopes required to read a memory-store sorted-map item, sourced from\n * `x-roblox-scopes` on the `Cloud_GetMemoryStoreSortedMapItem`\n * operation in the vendored OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.sorted-map:read\",\n]);\n\nconst LIST_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for listing memory-store sorted-map\n * items, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner).\n */\nexport const LIST_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: LIST_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.list\",\n});\n\n/**\n * Scopes required to list memory-store sorted-map items, sourced from\n * `x-roblox-scopes` on the `Cloud_ListMemoryStoreSortedMapItems`\n * operation in the vendored OpenAPI schema.\n */\nexport const LIST_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"memory-store.sorted-map:read\",\n]);\n\nconst UPDATE_PER_MINUTE = 1_000_000;\n\n/**\n * Per-second request ceiling for updating a memory-store sorted-map\n * item, from the Open Cloud OpenAPI schema (1,000,000 requests per\n * minute per API key owner).\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: UPDATE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"memory-store-sorted-maps.update\",\n});\n\n/**\n * Scopes required to update a memory-store sorted-map item, sourced\n * from `x-roblox-scopes` on the `Cloud_UpdateMemoryStoreSortedMapItem`\n * operation in the vendored OpenAPI schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([WRITE_SCOPE]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { ListSortedMapItemsResult, SortedMapItem, SortKey } from \"./types.ts\";\nimport type { MemoryStoreSortedMapItemWire } from \"./wire.ts\";\n\nconst PATH_PATTERN =\n\t/^cloud\\/v2\\/universes\\/(\\d+)\\/memory-stores?\\/sorted-maps\\/([^/]+)\\/items\\/([^/]+)$/;\nconst MALFORMED_MESSAGE = \"Malformed memory-store sorted-map item response\";\nconst MALFORMED_LIST_MESSAGE = \"Malformed memory-store sorted-map list response\";\n\n/**\n * Parses a successful memory-store sorted-map item response body (the\n * happy path for create, get, and update) into the public\n * {@link SortedMapItem} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link SortedMapItem},\n * or an {@link ApiError} when the body does not match the wire schema.\n */\nexport function parseSortedMapItemResponse(\n\tresponse: HttpResponse,\n): Result<SortedMapItem, ApiError> {\n\tconst item = wireBodyToSortedMapItem(response.body);\n\tif (item === undefined) {\n\t\treturn malformedSortedMapItem(response.status, response.body);\n\t}\n\n\treturn { data: item, success: true };\n}\n\n/**\n * Parses a successful `Cloud_ListMemoryStoreSortedMapItems` response\n * body into the public {@link ListSortedMapItemsResult} shape. Each\n * item in the `items` array is validated through the same\n * path-and-shape checks as {@link parseSortedMapItemResponse}; a\n * malformed entry rejects the whole response.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed\n * {@link ListSortedMapItemsResult}, or an {@link ApiError} when the\n * response shape is wrong.\n */\nexport function parseListResponse(\n\tresponse: HttpResponse,\n): Result<ListSortedMapItemsResult, ApiError> {\n\tconst { body, status: statusCode } = response;\n\tif (!isRecord(body)) {\n\t\treturn malformedList(statusCode, body);\n\t}\n\n\tconst { items: rawItemsField, nextPageToken } = body;\n\tif (rawItemsField !== undefined && rawItemsField !== null && !Array.isArray(rawItemsField)) {\n\t\treturn malformedList(statusCode, body);\n\t}\n\n\tconst normalizedToken = nextPageToken ?? undefined;\n\tif (normalizedToken !== undefined && typeof normalizedToken !== \"string\") {\n\t\treturn malformedList(statusCode, body);\n\t}\n\n\tconst rawItems = rawItemsField ?? [];\n\tconst items = rawItems.map(wireBodyToSortedMapItem);\n\tif (!items.every(isSortedMapItem)) {\n\t\treturn malformedList(statusCode, body);\n\t}\n\n\treturn { data: { items, nextPageToken: normalizedToken }, success: true };\n}\n\nfunction isSortedMapItemWire(body: unknown): body is MemoryStoreSortedMapItemWire {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tconst { id, etag, expireTime, numericSortKey, path, stringSortKey, value } = body;\n\treturn (\n\t\ttypeof path === \"string\" &&\n\t\ttypeof etag === \"string\" &&\n\t\ttypeof id === \"string\" &&\n\t\tisDateTimeString(expireTime) &&\n\t\tvalue !== undefined &&\n\t\t(stringSortKey === undefined ||\n\t\t\tstringSortKey === null ||\n\t\t\ttypeof stringSortKey === \"string\") &&\n\t\t(numericSortKey === undefined ||\n\t\t\tnumericSortKey === null ||\n\t\t\ttypeof numericSortKey === \"number\")\n\t);\n}\n\nfunction extractSortKey(body: MemoryStoreSortedMapItemWire): \"conflict\" | SortKey | undefined {\n\tconst hasStringKey = typeof body.stringSortKey === \"string\";\n\tconst hasNumericKey = typeof body.numericSortKey === \"number\";\n\tif (hasStringKey && hasNumericKey) {\n\t\treturn \"conflict\";\n\t}\n\n\tif (hasStringKey) {\n\t\treturn { kind: \"string\", value: body.stringSortKey };\n\t}\n\n\tif (hasNumericKey) {\n\t\treturn { kind: \"numeric\", value: body.numericSortKey };\n\t}\n\n\treturn undefined;\n}\n\nfunction wireBodyToSortedMapItem(body: unknown): SortedMapItem | undefined {\n\tif (!isSortedMapItemWire(body)) {\n\t\treturn undefined;\n\t}\n\n\t// Item ids round-trip URL-encoded in `path` (e.g. `name::id` arrives\n\t// as `name%3A%3Aid`), so the decoded id is read from `body.id` rather\n\t// than the regex group.\n\tconst match = PATH_PATTERN.exec(body.path);\n\tconst universeId = match?.[1];\n\tconst mapId = match?.[2];\n\tif (universeId === undefined || mapId === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst sortKey = extractSortKey(body);\n\tif (sortKey === \"conflict\") {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\tid: body.id,\n\t\tetag: body.etag,\n\t\texpiresAt: new Date(body.expireTime),\n\t\tmapId,\n\t\tsortKey,\n\t\tuniverseId,\n\t\tvalue: body.value,\n\t};\n}\n\nfunction malformedSortedMapItem(\n\tstatusCode: number,\n\tbody: unknown,\n): Result<SortedMapItem, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_MESSAGE, {\n\t\t\tdetails: body as JSONValue | undefined,\n\t\t\tstatusCode,\n\t\t}),\n\t\tsuccess: false,\n\t};\n}\n\nfunction isSortedMapItem(item: SortedMapItem | undefined): item is SortedMapItem {\n\treturn item !== undefined;\n}\n\nfunction malformedList(\n\tstatusCode: number,\n\tbody: unknown,\n): Result<ListSortedMapItemsResult, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_LIST_MESSAGE, {\n\t\t\tdetails: body as JSONValue | undefined,\n\t\t\tstatusCode,\n\t\t}),\n\t\tsuccess: false,\n\t};\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildDeleteRequest,\n\tbuildGetRequest,\n\tbuildListRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/cloud-v2/memory-store-sorted-maps/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tCREATE_REQUIRED_SCOPES,\n\tDELETE_OPERATION_LIMIT,\n\tDELETE_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/cloud-v2/memory-store-sorted-maps/operations.ts\";\nimport {\n\tparseListResponse,\n\tparseSortedMapItemResponse,\n} from \"../../domains/cloud-v2/memory-store-sorted-maps/parsers.ts\";\nimport type {\n\tCreateSortedMapItemParameters,\n\tDeleteSortedMapItemParameters,\n\tGetSortedMapItemParameters,\n\tListSortedMapItemsParameters,\n\tListSortedMapItemsResult,\n\tSortedMapItem,\n\tUpdateSortedMapItemParameters,\n} from \"../../domains/cloud-v2/memory-store-sorted-maps/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\ttype ResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R>(spec: ResourceMethodSpec<P, R>): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateSortedMapItemParameters, SortedMapItem>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseSortedMapItemResponse,\n\trequiredScopes: CREATE_REQUIRED_SCOPES,\n});\n\nconst DELETE_SPEC = makeSpec<DeleteSortedMapItemParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildDeleteRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: DELETE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: DELETE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetSortedMapItemParameters, SortedMapItem>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseSortedMapItemResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst LIST_SPEC = makeSpec<ListSortedMapItemsParameters, ListSortedMapItemsResult>({\n\tbuildRequest: (parameters) => okRequest(buildListRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LIST_OPERATION_LIMIT,\n\tparse: parseListResponse,\n\trequiredScopes: LIST_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateSortedMapItemParameters, SortedMapItem>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseSortedMapItemResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\n/**\n * Operation Group on `StorageClient` that exposes the memory-store\n * sorted-map endpoints. Sorted maps are ordered collections of\n * (id, value, sortKey) triples; consumers create, read, update, list,\n * and delete items keyed by a caller-supplied identifier and ordered\n * by an optional string or numeric sort key.\n */\nexport class MemoryStoreSortedMapsGroup {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Wraps the shared {@link ResourceClient} so the Operation Group\n\t * routes calls through the same retry, hooks, and rate-limit queues\n\t * as the rest of the parent client.\n\t *\n\t * @param inner - The shared {@link ResourceClient} owned by the\n\t * parent client.\n\t */\n\tconstructor(inner: ResourceClient) {\n\t\tthis.#inner = inner;\n\t}\n\n\t/**\n\t * Creates a single item in a sorted map. The sorted map is\n\t * auto-created on first use; the map identifier is any string the\n\t * caller picks. Items are keyed by `itemId` (case-sensitive) and\n\t * ordered by an optional `sortKey`. Items expire and are removed\n\t * automatically after `ttl` seconds, or after a server-default\n\t * lifetime when omitted.\n\t *\n\t * On 5xx, create does not retry: Roblox Open Cloud has no\n\t * idempotency-key support, so a retry of a transient failure risks\n\t * producing a duplicate item.\n\t *\n\t * @param parameters - Universe, sorted-map, item identifiers, the\n\t * value to store, and optional `sortKey` and `ttl`.\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 SortedMapItem}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateSortedMapItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<SortedMapItem, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Removes a single item from a sorted map. The call is idempotent:\n\t * a second `delete` against the same item is a no-op once the\n\t * server has dropped the row. The retry policy retries both 429\n\t * and 5xx.\n\t *\n\t * @param parameters - Universe, sorted-map, and item identifiers.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping `undefined` on success or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async delete(\n\t\tparameters: DeleteSortedMapItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: DELETE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single item from a sorted map. Returns the parsed\n\t * {@link SortedMapItem} with the server-recorded `etag` for use in\n\t * subsequent conditional updates (once the SDK begins emitting\n\t * `If-Match`; see the package README).\n\t *\n\t * @param parameters - Universe, sorted-map, and item identifiers.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetSortedMapItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<SortedMapItem, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Lists items in a sorted map. The server caps `maxPageSize` at\n\t * `100` and defaults it to `1` when omitted, so callers explicitly\n\t * pass `maxPageSize` to retrieve more than a single item per page.\n\t * The `filter` parameter accepts a CEL expression on `id` and\n\t * `sortKey` (operators `<`, `>`, `&&` only).\n\t *\n\t * @param parameters - Universe and sorted-map identifiers, plus\n\t * optional pagination and filter parameters.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed\n\t * {@link ListSortedMapItemsResult} or the {@link OpenCloudError}\n\t * that caused the request to fail.\n\t */\n\tpublic async list(\n\t\tparameters: ListSortedMapItemsParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<ListSortedMapItemsResult, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: LIST_SPEC });\n\t}\n\n\t/**\n\t * Updates a sorted-map item under PATCH semantics: omitted body\n\t * fields are left unchanged on the server, supplied fields replace\n\t * their existing values. Passing `allowMissing: true` creates the\n\t * item when no row exists instead of returning 404.\n\t *\n\t * Retries 5xx because PATCH with the same body produces the same\n\t * server state.\n\t *\n\t * @param parameters - Universe, sorted-map, and item identifiers,\n\t * plus any subset of `value`, `ttl`, `sortKey`, and\n\t * `allowMissing`.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateSortedMapItemParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<SortedMapItem, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n","import type { OpenCloudClientOptions } from \"../../client/types.ts\";\nimport { ResourceClient } from \"../../internal/resource-client.ts\";\nimport { MemoryStoreQueuesGroup } from \"./queues-group.ts\";\nimport { MemoryStoreSortedMapsGroup } from \"./sorted-maps-group.ts\";\n\n/**\n * Public client for the Roblox Open Cloud `Data and memory stores`\n * Feature. Today it covers memory-store queues via the\n * {@link StorageClient.queues} Operation Group and memory-store sorted\n * maps via the {@link StorageClient.sortedMaps} Operation Group; a\n * future data-stores Operation Group slots in as a sibling on the same\n * client.\n *\n * Every method returns a `Result` so callers handle failure\n * explicitly; no thrown error ever escapes the client.\n *\n * @since 0.1.0\n *\n * @example\n *\n * ```ts\n * import { StorageClient } from \"@bedrock-rbx/ocale/storage\";\n *\n * const client = new StorageClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(StorageClient);\n * ```\n */\nexport class StorageClient {\n\t/** Memory-store queue Operation Group. */\n\tpublic readonly queues: MemoryStoreQueuesGroup;\n\t/** Memory-store sorted-map Operation Group. */\n\tpublic readonly sortedMaps: MemoryStoreSortedMapsGroup;\n\n\t/**\n\t * Creates a new {@link StorageClient}. 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\tconst inner = new ResourceClient(options);\n\t\tthis.queues = new MemoryStoreQueuesGroup(inner);\n\t\tthis.sortedMaps = new MemoryStoreSortedMapsGroup(inner);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAgB,oBAAoB,YAAqD;CACxF,MAAM,EAAE,MAAM,UAAU,SAAS,KAAK,eAAe;CACrD,MAAM,OAAgC,EAAE,KAAK;CAC7C,IAAI,aAAa,KAAA,GAChB,KAAK,cAAc;CAGpB,IAAI,QAAQ,KAAA,GACX,KAAK,SAAS,GAAG,IAAI;CAGtB,OAAO;EACN;EACA,SAAS,EAAE,gBAAgB,mBAAmB;EAC9C,QAAQ;EACR,KAAK,uBAAuB,WAAW,uBAAuB,QAAQ;CACvE;AACD;;;;;;;;;;;;;;;AAgBA,SAAgB,oBAAoB,YAAsD;CACzF,MAAM,QAAQ,IAAI,gBAAgB;CAClC,IAAI,WAAW,UAAU,KAAA,GACxB,MAAM,OAAO,SAAS,OAAO,WAAW,KAAK,CAAC;CAG/C,IAAI,WAAW,iBAAiB,KAAA,GAC/B,MAAM,OAAO,gBAAgB,OAAO,WAAW,YAAY,CAAC;CAG7D,IAAI,WA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E;GAAS;GAAY,MAAM;EAAY,CAAC;CACtE;;;;;;;;;;;;CAaA,MAAa,OACZ,YACA,SAC6C;EAC7C,OAAO,KAAKA,OAAO,QAAQ;GAAE;GAAS;GAAY,MAAM;EAAY,CAAC;CACtE;;;;;;;;;;;;CAaA,MAAa,IACZ,YACA,SACiD;EACjD,OAAO,KAAKA,OAAO,QAAQ;GAAE;GAAS;GAAY,MAAM;EAAS,CAAC;CACnE;;;;;;;;;;;;;;;CAgBA,MAAa,KACZ,YACA,SAC4D;EAC5D,OAAO,KAAKA,OAAO,QAAQ;GAAE;GAAS;GAAY,MAAM;EAAU,CAAC;CACpE;;;;;;;;;;;;;;;;;CAkBA,MAAa,OACZ,YACA,SACiD;EACjD,OAAO,KAAKA,OAAO,QAAQ;GAAE;GAAS;GAAY,MAAM;EAAY,CAAC;CACtE;AACD;;;;;;;;;;;;;;;;;;;;;;;;;AChMA,IAAa,gBAAb,MAA2B;;CAE1B;;CAEA;;;;;;;CAQA,YAAY,SAAiC;EAC5C,MAAM,QAAQ,IAAI,eAAe,OAAO;EACxC,KAAK,SAAS,IAAI,uBAAuB,KAAK;EAC9C,KAAK,aAAa,IAAI,2BAA2B,KAAK;CACvD;AACD"}
@@ -1,5 +1,5 @@
1
- import { d as OpenCloudError, l as Result, n as HttpRequest, o as RequestConfig, r as HttpResponse, t as HttpClient, u as SleepFunc } from "./types-CwtZT1ek.mjs";
2
- import { r as GetGameIconResponseWire, t as GameIconListWire } from "./wire-CeL6W_V7.mjs";
1
+ import { d as OpenCloudError, l as Result, n as HttpRequest, o as RequestConfig, r as HttpResponse, t as HttpClient, u as SleepFunc } from "./types-CRiJg5EQ.mjs";
2
+ import { r as GetGameIconResponseWire, t as GameIconListWire } from "./wire-D3K-a-UP.mjs";
3
3
 
4
4
  //#region src/domains/badges/badges/wire.d.ts
5
5
  /**
@@ -387,17 +387,22 @@ interface LogChunkWire {
387
387
  readonly structuredMessages?: ReadonlyArray<LogMessageWire> | undefined;
388
388
  }
389
389
  /**
390
- * Wire shape of the list-luau-execution-task-logs response body.
390
+ * Wire shape of the list-luau-execution-task-logs response body. Both
391
+ * fields are optional per the OpenAPI spec
392
+ * (`ListLuauExecutionSessionTaskLogsResponse` has no `required` array);
393
+ * the parser also accepts JSON `null` on either field at the wire
394
+ * boundary and normalizes it to `undefined` / `[]`.
391
395
  */
392
396
  interface ListLogsResponseWire {
393
397
  /**
394
- * Array of log chunks. Optional on the wire; absent on an empty
395
- * page.
398
+ * Array of log chunks. Omitted or JSON `null` on an empty page; the
399
+ * parser normalizes both to an empty array.
396
400
  */
397
401
  readonly luauExecutionSessionTaskLogs?: ReadonlyArray<LogChunkWire> | undefined;
398
402
  /**
399
- * Opaque continuation token for the next page. Absent when this
400
- * is the last page.
403
+ * Opaque continuation token for the next page. Absent or JSON
404
+ * `null` when this is the last page; the parser normalizes both to
405
+ * `undefined`.
401
406
  */
402
407
  readonly nextPageToken?: string | undefined;
403
408
  }
@@ -522,12 +527,22 @@ interface MemoryStoreQueueItemWire {
522
527
  * names it `items`) and the read identifier under `id` (schema names
523
528
  * it `readId`); both deviations are corrected by `apply-schema-patches`,
524
529
  * so the wire interface here matches the patched schema.
530
+ *
531
+ * `queueItems` is optional per the OpenAPI spec
532
+ * (`ReadMemoryStoreQueueItemsResponse` has no `required` array); empty
533
+ * queues come back with the field omitted or JSON `null`. `id` is also
534
+ * spec-optional but the server always returns it for a 200 dequeue (it
535
+ * is the `:discard` token), so the parser requires it.
525
536
  */
526
537
  interface ReadQueueItemsResponseWire {
527
538
  /** Identifier of the read operation, passed back to `:discard`. */
528
539
  readonly id: string;
529
- /** Items at the front of the queue, in dequeue order. */
530
- readonly queueItems: ReadonlyArray<MemoryStoreQueueItemWire>;
540
+ /**
541
+ * Items at the front of the queue, in dequeue order. Omitted or
542
+ * JSON `null` on an empty queue; the parser normalizes both to an
543
+ * empty array.
544
+ */
545
+ readonly queueItems?: ReadonlyArray<MemoryStoreQueueItemWire> | undefined;
531
546
  }
532
547
  //#endregion
533
548
  //#region tests/helpers/memory-store-queues.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.mts","names":[],"sources":["../src/domains/badges/badges/wire.ts","../tests/helpers/badges.ts","../src/internal/price-information.ts","../src/domains/developer-products/products/wire.ts","../tests/helpers/developer-products.ts","../tests/helpers/fake-http-client.ts","../tests/helpers/fake-send.ts","../tests/helpers/fake-sleep.ts","../tests/helpers/game-icon.ts","../src/domains/game-passes/game-passes/wire.ts","../tests/helpers/game-passes.ts","../src/domains/game-internationalization/game-thumbnails/wire.ts","../tests/helpers/game-thumbnails.ts","../src/domains/cloud-v2/luau-execution-task-binary-inputs/wire.ts","../tests/helpers/luau-execution-task-binary-inputs.ts","../src/domains/cloud-v2/luau-execution-task-logs/wire.ts","../tests/helpers/luau-execution-task-logs.ts","../src/domains/cloud-v2/luau-execution-tasks/wire.ts","../tests/helpers/luau-execution-tasks.ts","../src/domains/cloud-v2/memory-store-queues/wire.ts","../tests/helpers/memory-store-queues.ts","../src/domains/cloud-v2/places/wire.ts","../src/domains/universes/places/wire.ts","../tests/helpers/places.ts","../src/domains/cloud-v2/universes/wire.ts","../tests/helpers/universes.ts"],"mappings":";;;;;;;;UAQiB,gBAAA;EAAA;EAAA,SAEP,EAAA;EAIM;EAAA,SAFN,IAAA;;WAEA,IAAA,EAAM,oBAAA;AAAA;;;AAMhB;UAAiB,mBAAA;;WAEP,YAAA;;WAEA,mBAAA;;WAEA,iBAAA;AAAA;AAOV;;;;AAAA,UAAiB,mBAAA;;WAEP,EAAA;;WAEA,IAAA;;WAEA,OAAA,EAAS,gBAAA;;WAET,OAAA;;WAEA,WAAA;;WAEA,kBAAA;;WAEA,kBAAA;EAUA;EAAA,SARA,WAAA;EAcL;EAAA,SAZK,OAAA;EAYL;EAAA,SAVK,WAAA;;WAEA,UAAA,EAAY,mBAAA;;WAEZ,OAAA;AAAA;;;;KAML,oBAAA;;;;;;AAvDL;;;;;;iBCGgB,cAAA,CAAe,SAAA,GAAW,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
+ {"version":3,"file":"testing.d.mts","names":[],"sources":["../src/domains/badges/badges/wire.ts","../tests/helpers/badges.ts","../src/internal/price-information.ts","../src/domains/developer-products/products/wire.ts","../tests/helpers/developer-products.ts","../tests/helpers/fake-http-client.ts","../tests/helpers/fake-send.ts","../tests/helpers/fake-sleep.ts","../tests/helpers/game-icon.ts","../src/domains/game-passes/game-passes/wire.ts","../tests/helpers/game-passes.ts","../src/domains/game-internationalization/game-thumbnails/wire.ts","../tests/helpers/game-thumbnails.ts","../src/domains/cloud-v2/luau-execution-task-binary-inputs/wire.ts","../tests/helpers/luau-execution-task-binary-inputs.ts","../src/domains/cloud-v2/luau-execution-task-logs/wire.ts","../tests/helpers/luau-execution-task-logs.ts","../src/domains/cloud-v2/luau-execution-tasks/wire.ts","../tests/helpers/luau-execution-tasks.ts","../src/domains/cloud-v2/memory-store-queues/wire.ts","../tests/helpers/memory-store-queues.ts","../src/domains/cloud-v2/places/wire.ts","../src/domains/universes/places/wire.ts","../tests/helpers/places.ts","../src/domains/cloud-v2/universes/wire.ts","../tests/helpers/universes.ts"],"mappings":";;;;;;;;UAQiB,gBAAA;EAAA;EAAA,SAEP,EAAA;EAIM;EAAA,SAFN,IAAA;;WAEA,IAAA,EAAM,oBAAA;AAAA;;AAAA;AAMhB;UAAiB,mBAAA;;WAEP,YAAA;;WAEA,mBAAA;;WAEA,iBAAA;AAAA;AAOV;;;;AAAA,UAAiB,mBAAA;;WAEP,EAAA;;WAEA,IAAA;;WAEA,OAAA,EAAS,gBAAA;;WAET,OAAA;;WAEA,WAAA;;WAEA,kBAAA;;WAEA,kBAAA;EAUA;EAAA,SARA,WAAA;EAcL;EAAA,SAZK,OAAA;EAYL;EAAA,SAVK,WAAA;;WAEA,UAAA,EAAY,mBAAA;;WAEZ,OAAA;AAAA;;;;KAML,oBAAA;;;;;;AAvDL;;;;;;iBCGgB,cAAA,CAAe,SAAA,GAAW,OAAA,CAAQ,mBAAA,IAA4B,mBAAA;;;;;;;ADH9E;;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AAA,SsB0EjB,SAAA;;WAEA,iBAAA,GAAoB,cAAA;AAAA;;;;;;AxBlF9B;;;;iByBCgB,iBAAA,CAAkB,SAAA,GAAW,OAAA,CAAQ,YAAA,IAAqB,YAAA"}
package/dist/testing.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as NetworkError, r as ApiError, t as RateLimitError } from "./rate-limit-D1q2Js-z.mjs";
2
- import { n as RBXL_SIGNATURE, t as RBXLX_SIGNATURE } from "./signatures-B5Fojgn0.mjs";
1
+ import { n as NetworkError, r as ApiError, t as RateLimitError } from "./rate-limit-Co9i28qi.mjs";
2
+ import { n as RBXL_SIGNATURE, t as RBXLX_SIGNATURE } from "./signatures-JF-7Psce.mjs";
3
3
  //#region tests/helpers/badges.ts
4
4
  /**
5
5
  * Builds a minimally-valid {@link BadgeResponseV2Wire} body. Pass an
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","names":[],"sources":["../tests/helpers/badges.ts","../tests/helpers/developer-products.ts","../tests/helpers/fake-http-client.ts","../tests/helpers/fake-send.ts","../tests/helpers/fake-sleep.ts","../tests/helpers/game-icon.ts","../tests/helpers/game-passes.ts","../tests/helpers/game-thumbnails.ts","../tests/helpers/luau-execution-task-binary-inputs.ts","../tests/helpers/luau-execution-task-logs.ts","../tests/helpers/luau-execution-tasks.ts","../tests/helpers/memory-store-queues.ts","../tests/helpers/places.ts","../tests/helpers/universes.ts"],"sourcesContent":["import type { BadgeResponseV2Wire } from \"#src/domains/badges/badges/wire\";\n\n/**\n * Builds a minimally-valid {@link BadgeResponseV2Wire} body. Pass an\n * `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant; useful for parser and integration tests that\n * only care about one field at a time.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validBadgeBody(overrides: Partial<BadgeResponseV2Wire> = {}): BadgeResponseV2Wire {\n\treturn {\n\t\tid: 12_345,\n\t\tname: \"First Goal\",\n\t\tawarder: { id: 222, name: \"Lobby\", type: 1 },\n\t\tcreated: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"Awarded on first login.\",\n\t\tdisplayDescription: \"Awarded on first login.\",\n\t\tdisplayIconImageId: 67_890,\n\t\tdisplayName: \"First Goal\",\n\t\tenabled: true,\n\t\ticonImageId: 67_890,\n\t\tstatistics: { awardedCount: 100, pastDayAwardedCount: 5, winRatePercentage: 42.5 },\n\t\tupdated: \"2024-03-20T14:45:00.000Z\",\n\t\t...overrides,\n\t};\n}\n","import type { DeveloperProductConfigV2 } from \"#src/domains/developer-products/products/wire\";\n\n/**\n * Builds a minimally-valid {@link DeveloperProductConfigV2} wire body. Pass\n * an `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant; useful for parser and integration tests that\n * only care about one field at a time.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validDeveloperProductBody(\n\toverrides: Partial<DeveloperProductConfigV2> = {},\n): DeveloperProductConfigV2 {\n\treturn {\n\t\tname: \"Gem Pack\",\n\t\tcreatedTimestamp: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"A premium gem pack\",\n\t\ticonImageAssetId: 67_890,\n\t\tisForSale: true,\n\t\tisImmutable: false,\n\t\tpriceInformation: { defaultPriceInRobux: 100, enabledFeatures: [] },\n\t\tproductId: 12_345,\n\t\tstorePageEnabled: true,\n\t\tuniverseId: 999,\n\t\tupdatedTimestamp: \"2024-03-20T14:45:00.000Z\",\n\t\t...overrides,\n\t};\n}\n","import { ApiError } from \"#src/errors/api-error\";\nimport type { OpenCloudError } from \"#src/errors/base\";\nimport { NetworkError } from \"#src/errors/network-error\";\nimport { RateLimitError } from \"#src/errors/rate-limit\";\nimport type {\n\tHttpClient,\n\tHttpRequest,\n\tHttpResponse,\n\tRequestConfig,\n} from \"#src/internal/http/types\";\nimport type { Result } from \"#src/types\";\n\n/**\n * A request captured by {@link FakeHttpClient} for later assertion.\n */\nexport interface CapturedRequest {\n\t/** The per-request config passed alongside the request. */\n\treadonly config: RequestConfig;\n\t/** The request passed to {@link HttpClient.request}. */\n\treadonly request: HttpRequest;\n}\n\n/**\n * A fluent fake for the {@link HttpClient} boundary. Mocks are queued in\n * FIFO order and consumed by each `request()` call. Records every\n * request and config for later assertion. Throws\n * {@link FakeHttpClientError} if the queue is empty when `request()` is\n * called — surfaces missing mocks as test setup bugs instead of silently\n * repeating the last response.\n */\nexport interface FakeHttpClient extends HttpClient {\n\t/** Queues an {@link ApiError} with the given status code and optional message/code. */\n\tmockApiError(options: { code?: string; message?: string; statusCode: number }): this;\n\t/** Queues an error Result with the given error instance. */\n\tmockError(error: OpenCloudError): this;\n\t/** Queues a {@link NetworkError}. Preserves `cause` when provided. */\n\tmockNetworkError(options?: { cause?: unknown; message?: string }): this;\n\t/** Queues a {@link RateLimitError} with the given retry hint. */\n\tmockRateLimit(options: { message?: string; retryAfterSeconds: number }): this;\n\t/** Queues a successful {@link HttpResponse}. Body defaults to `{}`; headers default to `{}`. */\n\tmockResponse(options: {\n\t\tbody?: unknown;\n\t\theaders?: Readonly<Record<string, string>>;\n\t\tstatus: number;\n\t}): this;\n\t/** Number of queued mocks that have not yet been consumed. */\n\treadonly pendingMocks: number;\n\t/** Chronological log of every `(request, config)` pair the fake received. */\n\treadonly requests: ReadonlyArray<CapturedRequest>;\n}\n\ntype ErrorResult = Result<HttpResponse, OpenCloudError> & { success: false };\n\ninterface FakeState {\n\treadonly captured: Array<CapturedRequest>;\n\tconsumed: number;\n\treadonly queue: Array<Result<HttpResponse, OpenCloudError>>;\n}\n\n/**\n * Thrown when {@link FakeHttpClient.request} is called but no mock has\n * been queued. The message names the method, url, and consumed count to\n * aid debugging of missing `.mockResponse`/`.mockError` setup.\n */\nexport class FakeHttpClientError extends Error {\n\tpublic override readonly name: string = \"FakeHttpClientError\";\n}\n\n/**\n * Creates a fluent {@link FakeHttpClient} that sits at the\n * {@link HttpClient} seam. Use for integration tests where you need to\n * assert per-request config (apiKey, baseUrl) flows through to HTTP.\n *\n * @returns A fresh fake with an empty mock queue.\n */\nexport function createFakeHttpClient(): FakeHttpClient {\n\tconst state: FakeState = { captured: [], consumed: 0, queue: [] };\n\tfunction enqueue(result: Result<HttpResponse, OpenCloudError>): FakeHttpClient {\n\t\tstate.queue.push(result);\n\t\treturn fake;\n\t}\n\n\tconst fake: FakeHttpClient = {\n\t\tmockApiError: (options) => enqueue(errorResult(buildApiError(options))),\n\t\tmockError: (error) => enqueue(errorResult(error)),\n\t\tmockNetworkError: (options) => enqueue(errorResult(buildNetworkError(options))),\n\t\tmockRateLimit: (options) => enqueue(errorResult(buildRateLimitError(options))),\n\t\tmockResponse: (options) => enqueue(successResult(options)),\n\t\tget pendingMocks() {\n\t\t\treturn state.queue.length;\n\t\t},\n\t\trequest: async (request, config) => handleRequest({ config, request, state }),\n\t\tget requests() {\n\t\t\treturn state.captured;\n\t\t},\n\t};\n\n\treturn fake;\n}\n\nfunction consumeNextMock(\n\tstate: FakeState,\n\trequest: HttpRequest,\n): Result<HttpResponse, OpenCloudError> {\n\tconst next = state.queue.shift();\n\tif (next === undefined) {\n\t\tthrow new FakeHttpClientError(\n\t\t\t`FakeHttpClient: no mock queued for ${request.method} ${request.url} (consumed ${String(state.consumed)}, pending 0)`,\n\t\t);\n\t}\n\n\tstate.consumed += 1;\n\treturn next;\n}\n\nasync function handleRequest(options: {\n\treadonly config: RequestConfig;\n\treadonly request: HttpRequest;\n\treadonly state: FakeState;\n}): Promise<Result<HttpResponse, OpenCloudError>> {\n\tconst { config, request, state } = options;\n\tstate.captured.push({ config, request });\n\treturn consumeNextMock(state, request);\n}\n\nfunction successResult(options: {\n\tbody?: unknown;\n\theaders?: Readonly<Record<string, string>>;\n\tstatus: number;\n}): Result<HttpResponse, OpenCloudError> {\n\treturn {\n\t\tdata: {\n\t\t\tbody: options.body ?? {},\n\t\t\theaders: options.headers ?? {},\n\t\t\tstatus: options.status,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction errorResult(err: OpenCloudError): ErrorResult {\n\treturn { err, success: false };\n}\n\nfunction buildApiError(options: { code?: string; message?: string; statusCode: number }): ApiError {\n\tconst message = options.message ?? \"API error\";\n\tif (options.code === undefined) {\n\t\treturn new ApiError(message, { statusCode: options.statusCode });\n\t}\n\n\treturn new ApiError(message, { code: options.code, statusCode: options.statusCode });\n}\n\nfunction buildNetworkError(\n\toptions: undefined | { cause?: unknown; message?: string },\n): NetworkError {\n\tconst message = options?.message ?? \"Network error\";\n\tif (options?.cause === undefined) {\n\t\treturn new NetworkError(message);\n\t}\n\n\treturn new NetworkError(message, { cause: options.cause });\n}\n\nfunction buildRateLimitError(options: {\n\tmessage?: string;\n\tretryAfterSeconds: number;\n}): RateLimitError {\n\treturn new RateLimitError(options.message ?? \"Rate limited\", {\n\t\tretryAfterSeconds: options.retryAfterSeconds,\n\t});\n}\n","import type { OpenCloudError } from \"#src/errors/base\";\nimport type { HttpRequest, HttpResponse } from \"#src/internal/http/types\";\nimport type { Result } from \"#src/types\";\n\n/**\n * The `send` callback shape consumed by `executeWithRetry`. A plain\n * transport function — no `RequestConfig`, no queueing, no retries.\n */\nexport type SendFunc = (request: HttpRequest) => Promise<Result<HttpResponse, OpenCloudError>>;\n\n/**\n * A scripted fake for the `send` callback. Replays responses in order\n * and records every request it receives.\n */\nexport interface FakeSend {\n\t/** Chronological log of every request the fake received. */\n\treadonly requests: ReadonlyArray<HttpRequest>;\n\t/** The scripted send callback. */\n\treadonly send: SendFunc;\n}\n\n/**\n * Creates a scripted fake for the `send` callback. Each call returns the\n * next queued response; exhausting the queue throws, which surfaces test\n * setup mistakes instead of silently repeating the last response.\n *\n * @param options - The scripted responses to replay, in order.\n * @returns A `send` callback plus a `requests` log.\n * @rejects {Error} When a call is made after all scripted responses are consumed.\n */\nexport function createFakeSend(options: {\n\treadonly responses: ReadonlyArray<Result<HttpResponse, OpenCloudError>>;\n}): FakeSend {\n\tconst requests: Array<HttpRequest> = [];\n\tlet index = 0;\n\n\tasync function send(request: HttpRequest): Promise<Result<HttpResponse, OpenCloudError>> {\n\t\trequests.push(request);\n\t\tconst response = options.responses[index];\n\t\tindex += 1;\n\n\t\tif (response === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t`createFakeSend exhausted: ${String(index)} calls made, only ${String(options.responses.length)} responses scripted`,\n\t\t\t);\n\t\t}\n\n\t\treturn response;\n\t}\n\n\treturn { requests, send };\n}\n","import type { SleepFunc } from \"#src/internal/utils/sleep\";\n\n/**\n * A directly-callable sleep double that records its wait arguments without\n * delaying. Assignable to {@link SleepFunc}.\n */\nexport interface FakeSleep extends SleepFunc {\n\t/** Chronological log of every `ms` value the fake was called with. */\n\treadonly waits: ReadonlyArray<number>;\n}\n\n/**\n * Creates a {@link FakeSleep} that resolves immediately and records every\n * `ms` value it was called with.\n *\n * @returns A callable sleep function with a `waits` log attached.\n */\nexport function createFakeSleep(): FakeSleep {\n\tconst waits: Array<number> = [];\n\n\tasync function sleep(ms: number): Promise<void> {\n\t\twaits.push(ms);\n\t}\n\n\tconst fake: FakeSleep = Object.assign(sleep, {\n\t\tget waits(): ReadonlyArray<number> {\n\t\t\treturn waits;\n\t\t},\n\t});\n\n\treturn fake;\n}\n","import type {\n\tGameIconListWire,\n\tGetGameIconResponseWire,\n} from \"#src/domains/game-internationalization/game-icon/wire\";\n\n/**\n * Builds a minimally-valid {@link GetGameIconResponseWire} entry. Pass an\n * `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant.\n *\n * @param overrides - Fields to override on the default entry.\n * @returns A valid localized-icon entry with the overrides applied.\n */\nexport function validLocalizedIcon(\n\toverrides: Partial<GetGameIconResponseWire> = {},\n): GetGameIconResponseWire {\n\treturn {\n\t\timageId: \"12345\",\n\t\timageUrl: \"https://t1.rbxcdn.com/icon/12345\",\n\t\tlanguageCode: \"en_us\",\n\t\tstate: \"Approved\",\n\t\t...overrides,\n\t};\n}\n\n/**\n * Builds a minimally-valid {@link GameIconListWire} body containing a single\n * default localized icon.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validIconListBody(overrides: Partial<GameIconListWire> = {}): GameIconListWire {\n\treturn {\n\t\tdata: [validLocalizedIcon()],\n\t\t...overrides,\n\t};\n}\n","import type { GamePassConfigV2 } from \"#src/domains/game-passes/game-passes/wire\";\n\n/**\n * Test-only wire shape for the list response. Mirrors the OpenAPI\n * schema, which marks `nextPageToken` as required and nullable, so\n * fixtures can carry the literal JSON `null` the API sends on the last\n * page without leaking `null` into the production wire type (which\n * exposes a post-normalization view of `string | undefined`).\n */\ninterface ListGamePassesWireBody {\n\treadonly gamePasses: ReadonlyArray<GamePassConfigV2>;\n\n\treadonly nextPageToken: null | string;\n}\n\n/**\n * Builds a minimally-valid {@link GamePassConfigV2} wire body. Pass an\n * `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant — useful for parser and integration tests that\n * only care about one field at a time.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validGamePassBody(overrides: Partial<GamePassConfigV2> = {}): GamePassConfigV2 {\n\treturn {\n\t\tname: \"Epic Pass\",\n\t\tcreatedTimestamp: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"Unlocks epic stuff\",\n\t\tgamePassId: 12_345,\n\t\ticonAssetId: 67_890,\n\t\tisForSale: true,\n\t\tpriceInformation: { defaultPriceInRobux: 100, enabledFeatures: [] },\n\t\tupdatedTimestamp: \"2024-03-20T14:45:00.000Z\",\n\t\t...overrides,\n\t};\n}\n\n/**\n * Builds a minimally-valid wire body for the \"list game passes\" endpoint.\n * By default the page contains one game pass and `nextPageToken` is the\n * literal JSON `null` the API sends on the last page; `overrides` let\n * parser and integration tests tweak the items array or the cursor\n * without rebuilding the whole shape.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied. `nextPageToken`\n * defaults to the wire's literal `null`, which the response parser\n * normalizes to `undefined` at the boundary.\n */\nexport function validListGamePassesBody(\n\toverrides: Partial<ListGamePassesWireBody> = {},\n): ListGamePassesWireBody {\n\treturn {\n\t\tgamePasses: [validGamePassBody()],\n\t\t// eslint-disable-next-line unicorn/no-null -- API sends null on the last page; parser normalizes to undefined.\n\t\tnextPageToken: null,\n\t\t...overrides,\n\t};\n}\n","import type { GameThumbnailUploadWire } from \"#src/domains/game-internationalization/game-thumbnails/wire\";\n\n/**\n * Builds a minimally-valid {@link GameThumbnailUploadWire} body. Pass an\n * `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant; useful for parser and integration tests that\n * only care about one field at a time.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validThumbnailUploadBody(\n\toverrides: Partial<GameThumbnailUploadWire> = {},\n): GameThumbnailUploadWire {\n\treturn { mediaAssetId: \"67890\", ...overrides };\n}\n","import type { LuauExecutionTaskBinaryInputWire } from \"#src/domains/cloud-v2/luau-execution-task-binary-inputs/wire\";\n\n/**\n * Builds a minimally-valid {@link LuauExecutionTaskBinaryInputWire} body\n * for tests. Pass an `overrides` object to tweak fields without re-stating\n * the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validBinaryInputBody(\n\toverrides: Partial<LuauExecutionTaskBinaryInputWire> = {},\n): LuauExecutionTaskBinaryInputWire {\n\treturn {\n\t\tpath: \"universes/123/luau-execution-session-task-binary-inputs/abc\",\n\t\tuploadUri: \"https://storage.example.com/upload?token=xyz\",\n\t\t...overrides,\n\t};\n}\n","import type { ListLogsResponseWire } from \"#src/domains/cloud-v2/luau-execution-task-logs/wire\";\n\n/**\n * Builds a minimally-valid {@link ListLogsResponseWire} body containing\n * one chunk with one structured message. Pass an `overrides` object to\n * tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validLogPageBody(\n\toverrides: Partial<ListLogsResponseWire> = {},\n): ListLogsResponseWire {\n\treturn {\n\t\tluauExecutionSessionTaskLogs: [\n\t\t\t{\n\t\t\t\tstructuredMessages: [\n\t\t\t\t\t{\n\t\t\t\t\t\tcreateTime: \"2026-01-01T00:00:00Z\",\n\t\t\t\t\t\tmessage: \"Hello from Luau\",\n\t\t\t\t\t\tmessageType: \"OUTPUT\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t\t...overrides,\n\t};\n}\n","import type { LuauExecutionTaskWire } from \"#src/domains/cloud-v2/luau-execution-tasks/wire\";\n\n/**\n * Builds a minimally-valid {@link LuauExecutionTaskWire} body for an\n * in-progress task. Pass an `overrides` object to tweak fields without\n * re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validInProgressTaskBody(\n\toverrides: Partial<LuauExecutionTaskWire> = {},\n): LuauExecutionTaskWire {\n\treturn {\n\t\tcreateTime: \"2026-01-01T00:00:00Z\",\n\t\tpath: \"universes/123/places/456/luau-execution-session-tasks/task-1\",\n\t\tstate: \"QUEUED\",\n\t\tupdateTime: \"2026-01-01T00:00:30Z\",\n\t\tuser: \"user-1\",\n\t\t...overrides,\n\t};\n}\n","import type {\n\tMemoryStoreQueueItemWire,\n\tReadQueueItemsResponseWire,\n} from \"#src/domains/cloud-v2/memory-store-queues/wire\";\n\n/**\n * Builds a minimally-valid {@link MemoryStoreQueueItemWire} body. Pass\n * an `overrides` object to tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validQueueItemBody(\n\toverrides: Partial<MemoryStoreQueueItemWire> = {},\n): MemoryStoreQueueItemWire {\n\treturn {\n\t\tdata: \"hello\",\n\t\texpireTime: \"2026-06-21T15:08:58.4806559Z\",\n\t\tpath: \"cloud/v2/universes/123/memory-store/queues/test-queue/items/abc123\",\n\t\tpriority: 1,\n\t\t...overrides,\n\t};\n}\n\n/**\n * Builds a minimally-valid {@link ReadQueueItemsResponseWire} body\n * carrying a single default queue item. Pass an `overrides` object to\n * change the read identifier or supply a different items array.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid dequeue response body with the overrides applied.\n */\nexport function validDequeueBody(\n\toverrides: Partial<ReadQueueItemsResponseWire> = {},\n): ReadQueueItemsResponseWire {\n\treturn {\n\t\tid: \"1a354bd5b8fe457f8e51232f8dbfe6d0\",\n\t\tqueueItems: [validQueueItemBody()],\n\t\t...overrides,\n\t};\n}\n","import type { PlaceWire } from \"#src/domains/cloud-v2/places/wire\";\nimport { RBXL_SIGNATURE, RBXLX_SIGNATURE } from \"#src/domains/universes/places/signatures\";\nimport type { PlaceVersionWire } from \"#src/domains/universes/places/wire\";\n\n/**\n * Returns a fresh, minimal `.rbxl`-formatted body whose magic bytes\n * match {@link RBXL_SIGNATURE}. Useful when integration tests don't\n * care about the file's contents past the signature.\n *\n * @returns A 14-byte rbxl body matching the binary signature.\n */\nexport function rbxlBody(): Uint8Array<ArrayBuffer> {\n\treturn new Uint8Array(RBXL_SIGNATURE);\n}\n\n/**\n * Returns a fresh, minimal `.rbxlx`-formatted body whose magic bytes\n * match {@link RBXLX_SIGNATURE}. Useful when integration tests don't\n * care about the file's contents past the signature.\n *\n * @returns An 8-byte rbxlx body matching the XML signature.\n */\nexport function rbxlxBody(): Uint8Array<ArrayBuffer> {\n\treturn new Uint8Array(RBXLX_SIGNATURE);\n}\n\n/**\n * Builds a minimally-valid {@link PlaceVersionWire} body. Pass an\n * `overrides` object to tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validPublishResponseBody(\n\toverrides: Partial<PlaceVersionWire> = {},\n): PlaceVersionWire {\n\treturn {\n\t\tversionNumber: 1,\n\t\t...overrides,\n\t};\n}\n\n/**\n * Builds a minimally-valid {@link PlaceWire} body. Pass an `overrides`\n * object to tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validPlaceBody(overrides: Partial<PlaceWire> = {}): PlaceWire {\n\treturn {\n\t\tcreateTime: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"A sample place.\",\n\t\tdisplayName: \"Test Place\",\n\t\tpath: \"universes/123/places/456\",\n\t\troot: true,\n\t\tserverSize: 30,\n\t\tuniverseRuntimeCreation: false,\n\t\tupdateTime: \"2024-11-02T17:08:21.500Z\",\n\t\t...overrides,\n\t};\n}\n","import type { UniverseWire } from \"#src/domains/cloud-v2/universes/wire\";\n\n/**\n * Builds a minimally-valid {@link UniverseWire} body. Pass an\n * `overrides` object to tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validUniverseBody(overrides: Partial<UniverseWire> = {}): UniverseWire {\n\treturn {\n\t\tageRating: \"AGE_RATING_13_PLUS\",\n\t\tconsoleEnabled: false,\n\t\tcreateTime: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"A sample universe for tests.\",\n\t\tdesktopEnabled: true,\n\t\tdisplayName: \"Test Universe\",\n\t\tmobileEnabled: true,\n\t\tpath: \"universes/12345\",\n\t\trootPlace: \"universes/12345/places/98765\",\n\t\ttabletEnabled: true,\n\t\tupdateTime: \"2024-11-02T17:08:21.500Z\",\n\t\tuser: \"users/7777\",\n\t\tvisibility: \"PUBLIC\",\n\t\tvoiceChatEnabled: false,\n\t\tvrEnabled: false,\n\t\t...overrides,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,eAAe,YAA0C,EAAE,EAAuB;AACjG,QAAO;EACN,IAAI;EACJ,MAAM;EACN,SAAS;GAAE,IAAI;GAAK,MAAM;GAAS,MAAM;GAAG;EAC5C,SAAS;EACT,aAAa;EACb,oBAAoB;EACpB,oBAAoB;EACpB,aAAa;EACb,SAAS;EACT,aAAa;EACb,YAAY;GAAE,cAAc;GAAK,qBAAqB;GAAG,mBAAmB;GAAM;EAClF,SAAS;EACT,GAAG;EACH;;;;;;;;;;;;;ACfF,SAAgB,0BACf,YAA+C,EA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AC7B,QAAO;EACN,IAAI;EACJ,YAAY,CAAC,oBAAoB,CAAC;EAClC,GAAG;EACH;;;;;;;;;;;AC5BF,SAAgB,WAAoC;AACnD,QAAO,IAAI,WAAW,eAAe;;;;;;;;;AAUtC,SAAgB,YAAqC;AACpD,QAAO,IAAI,WAAW,gBAAgB;;;;;;;;;AAUvC,SAAgB,yBACf,YAAuC,EAAE,EACtB;AACnB,QAAO;EACN,eAAe;EACf,GAAG;EACH;;;;;;;;;AAUF,SAAgB,eAAe,YAAgC,EAAE,EAAa;AAC7E,QAAO;EACN,YAAY;EACZ,aAAa;EACb,aAAa;EACb,MAAM;EACN,MAAM;EACN,YAAY;EACZ,yBAAyB;EACzB,YAAY;EACZ,GAAG;EACH;;;;;;;;;;;ACnDF,SAAgB,kBAAkB,YAAmC,EAAE,EAAgB;AACtF,QAAO;EACN,WAAW;EACX,gBAAgB;EAChB,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,aAAa;EACb,eAAe;EACf,MAAM;EACN,WAAW;EACX,eAAe;EACf,YAAY;EACZ,MAAM;EACN,YAAY;EACZ,kBAAkB;EAClB,WAAW;EACX,GAAG;EACH"}
1
+ {"version":3,"file":"testing.mjs","names":[],"sources":["../tests/helpers/badges.ts","../tests/helpers/developer-products.ts","../tests/helpers/fake-http-client.ts","../tests/helpers/fake-send.ts","../tests/helpers/fake-sleep.ts","../tests/helpers/game-icon.ts","../tests/helpers/game-passes.ts","../tests/helpers/game-thumbnails.ts","../tests/helpers/luau-execution-task-binary-inputs.ts","../tests/helpers/luau-execution-task-logs.ts","../tests/helpers/luau-execution-tasks.ts","../tests/helpers/memory-store-queues.ts","../tests/helpers/places.ts","../tests/helpers/universes.ts"],"sourcesContent":["import type { BadgeResponseV2Wire } from \"#src/domains/badges/badges/wire\";\n\n/**\n * Builds a minimally-valid {@link BadgeResponseV2Wire} body. Pass an\n * `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant; useful for parser and integration tests that\n * only care about one field at a time.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validBadgeBody(overrides: Partial<BadgeResponseV2Wire> = {}): BadgeResponseV2Wire {\n\treturn {\n\t\tid: 12_345,\n\t\tname: \"First Goal\",\n\t\tawarder: { id: 222, name: \"Lobby\", type: 1 },\n\t\tcreated: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"Awarded on first login.\",\n\t\tdisplayDescription: \"Awarded on first login.\",\n\t\tdisplayIconImageId: 67_890,\n\t\tdisplayName: \"First Goal\",\n\t\tenabled: true,\n\t\ticonImageId: 67_890,\n\t\tstatistics: { awardedCount: 100, pastDayAwardedCount: 5, winRatePercentage: 42.5 },\n\t\tupdated: \"2024-03-20T14:45:00.000Z\",\n\t\t...overrides,\n\t};\n}\n","import type { DeveloperProductConfigV2 } from \"#src/domains/developer-products/products/wire\";\n\n/**\n * Builds a minimally-valid {@link DeveloperProductConfigV2} wire body. Pass\n * an `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant; useful for parser and integration tests that\n * only care about one field at a time.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validDeveloperProductBody(\n\toverrides: Partial<DeveloperProductConfigV2> = {},\n): DeveloperProductConfigV2 {\n\treturn {\n\t\tname: \"Gem Pack\",\n\t\tcreatedTimestamp: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"A premium gem pack\",\n\t\ticonImageAssetId: 67_890,\n\t\tisForSale: true,\n\t\tisImmutable: false,\n\t\tpriceInformation: { defaultPriceInRobux: 100, enabledFeatures: [] },\n\t\tproductId: 12_345,\n\t\tstorePageEnabled: true,\n\t\tuniverseId: 999,\n\t\tupdatedTimestamp: \"2024-03-20T14:45:00.000Z\",\n\t\t...overrides,\n\t};\n}\n","import { ApiError } from \"#src/errors/api-error\";\nimport type { OpenCloudError } from \"#src/errors/base\";\nimport { NetworkError } from \"#src/errors/network-error\";\nimport { RateLimitError } from \"#src/errors/rate-limit\";\nimport type {\n\tHttpClient,\n\tHttpRequest,\n\tHttpResponse,\n\tRequestConfig,\n} from \"#src/internal/http/types\";\nimport type { Result } from \"#src/types\";\n\n/**\n * A request captured by {@link FakeHttpClient} for later assertion.\n */\nexport interface CapturedRequest {\n\t/** The per-request config passed alongside the request. */\n\treadonly config: RequestConfig;\n\t/** The request passed to {@link HttpClient.request}. */\n\treadonly request: HttpRequest;\n}\n\n/**\n * A fluent fake for the {@link HttpClient} boundary. Mocks are queued in\n * FIFO order and consumed by each `request()` call. Records every\n * request and config for later assertion. Throws\n * {@link FakeHttpClientError} if the queue is empty when `request()` is\n * called — surfaces missing mocks as test setup bugs instead of silently\n * repeating the last response.\n */\nexport interface FakeHttpClient extends HttpClient {\n\t/** Queues an {@link ApiError} with the given status code and optional message/code. */\n\tmockApiError(options: { code?: string; message?: string; statusCode: number }): this;\n\t/** Queues an error Result with the given error instance. */\n\tmockError(error: OpenCloudError): this;\n\t/** Queues a {@link NetworkError}. Preserves `cause` when provided. */\n\tmockNetworkError(options?: { cause?: unknown; message?: string }): this;\n\t/** Queues a {@link RateLimitError} with the given retry hint. */\n\tmockRateLimit(options: { message?: string; retryAfterSeconds: number }): this;\n\t/** Queues a successful {@link HttpResponse}. Body defaults to `{}`; headers default to `{}`. */\n\tmockResponse(options: {\n\t\tbody?: unknown;\n\t\theaders?: Readonly<Record<string, string>>;\n\t\tstatus: number;\n\t}): this;\n\t/** Number of queued mocks that have not yet been consumed. */\n\treadonly pendingMocks: number;\n\t/** Chronological log of every `(request, config)` pair the fake received. */\n\treadonly requests: ReadonlyArray<CapturedRequest>;\n}\n\ntype ErrorResult = Result<HttpResponse, OpenCloudError> & { success: false };\n\ninterface FakeState {\n\treadonly captured: Array<CapturedRequest>;\n\tconsumed: number;\n\treadonly queue: Array<Result<HttpResponse, OpenCloudError>>;\n}\n\n/**\n * Thrown when {@link FakeHttpClient.request} is called but no mock has\n * been queued. The message names the method, url, and consumed count to\n * aid debugging of missing `.mockResponse`/`.mockError` setup.\n */\nexport class FakeHttpClientError extends Error {\n\tpublic override readonly name: string = \"FakeHttpClientError\";\n}\n\n/**\n * Creates a fluent {@link FakeHttpClient} that sits at the\n * {@link HttpClient} seam. Use for integration tests where you need to\n * assert per-request config (apiKey, baseUrl) flows through to HTTP.\n *\n * @returns A fresh fake with an empty mock queue.\n */\nexport function createFakeHttpClient(): FakeHttpClient {\n\tconst state: FakeState = { captured: [], consumed: 0, queue: [] };\n\tfunction enqueue(result: Result<HttpResponse, OpenCloudError>): FakeHttpClient {\n\t\tstate.queue.push(result);\n\t\treturn fake;\n\t}\n\n\tconst fake: FakeHttpClient = {\n\t\tmockApiError: (options) => enqueue(errorResult(buildApiError(options))),\n\t\tmockError: (error) => enqueue(errorResult(error)),\n\t\tmockNetworkError: (options) => enqueue(errorResult(buildNetworkError(options))),\n\t\tmockRateLimit: (options) => enqueue(errorResult(buildRateLimitError(options))),\n\t\tmockResponse: (options) => enqueue(successResult(options)),\n\t\tget pendingMocks() {\n\t\t\treturn state.queue.length;\n\t\t},\n\t\trequest: async (request, config) => handleRequest({ config, request, state }),\n\t\tget requests() {\n\t\t\treturn state.captured;\n\t\t},\n\t};\n\n\treturn fake;\n}\n\nfunction consumeNextMock(\n\tstate: FakeState,\n\trequest: HttpRequest,\n): Result<HttpResponse, OpenCloudError> {\n\tconst next = state.queue.shift();\n\tif (next === undefined) {\n\t\tthrow new FakeHttpClientError(\n\t\t\t`FakeHttpClient: no mock queued for ${request.method} ${request.url} (consumed ${String(state.consumed)}, pending 0)`,\n\t\t);\n\t}\n\n\tstate.consumed += 1;\n\treturn next;\n}\n\nasync function handleRequest(options: {\n\treadonly config: RequestConfig;\n\treadonly request: HttpRequest;\n\treadonly state: FakeState;\n}): Promise<Result<HttpResponse, OpenCloudError>> {\n\tconst { config, request, state } = options;\n\tstate.captured.push({ config, request });\n\treturn consumeNextMock(state, request);\n}\n\nfunction successResult(options: {\n\tbody?: unknown;\n\theaders?: Readonly<Record<string, string>>;\n\tstatus: number;\n}): Result<HttpResponse, OpenCloudError> {\n\treturn {\n\t\tdata: {\n\t\t\tbody: options.body ?? {},\n\t\t\theaders: options.headers ?? {},\n\t\t\tstatus: options.status,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction errorResult(err: OpenCloudError): ErrorResult {\n\treturn { err, success: false };\n}\n\nfunction buildApiError(options: { code?: string; message?: string; statusCode: number }): ApiError {\n\tconst message = options.message ?? \"API error\";\n\tif (options.code === undefined) {\n\t\treturn new ApiError(message, { statusCode: options.statusCode });\n\t}\n\n\treturn new ApiError(message, { code: options.code, statusCode: options.statusCode });\n}\n\nfunction buildNetworkError(\n\toptions: undefined | { cause?: unknown; message?: string },\n): NetworkError {\n\tconst message = options?.message ?? \"Network error\";\n\tif (options?.cause === undefined) {\n\t\treturn new NetworkError(message);\n\t}\n\n\treturn new NetworkError(message, { cause: options.cause });\n}\n\nfunction buildRateLimitError(options: {\n\tmessage?: string;\n\tretryAfterSeconds: number;\n}): RateLimitError {\n\treturn new RateLimitError(options.message ?? \"Rate limited\", {\n\t\tretryAfterSeconds: options.retryAfterSeconds,\n\t});\n}\n","import type { OpenCloudError } from \"#src/errors/base\";\nimport type { HttpRequest, HttpResponse } from \"#src/internal/http/types\";\nimport type { Result } from \"#src/types\";\n\n/**\n * The `send` callback shape consumed by `executeWithRetry`. A plain\n * transport function — no `RequestConfig`, no queueing, no retries.\n */\nexport type SendFunc = (request: HttpRequest) => Promise<Result<HttpResponse, OpenCloudError>>;\n\n/**\n * A scripted fake for the `send` callback. Replays responses in order\n * and records every request it receives.\n */\nexport interface FakeSend {\n\t/** Chronological log of every request the fake received. */\n\treadonly requests: ReadonlyArray<HttpRequest>;\n\t/** The scripted send callback. */\n\treadonly send: SendFunc;\n}\n\n/**\n * Creates a scripted fake for the `send` callback. Each call returns the\n * next queued response; exhausting the queue throws, which surfaces test\n * setup mistakes instead of silently repeating the last response.\n *\n * @param options - The scripted responses to replay, in order.\n * @returns A `send` callback plus a `requests` log.\n * @rejects {Error} When a call is made after all scripted responses are consumed.\n */\nexport function createFakeSend(options: {\n\treadonly responses: ReadonlyArray<Result<HttpResponse, OpenCloudError>>;\n}): FakeSend {\n\tconst requests: Array<HttpRequest> = [];\n\tlet index = 0;\n\n\tasync function send(request: HttpRequest): Promise<Result<HttpResponse, OpenCloudError>> {\n\t\trequests.push(request);\n\t\tconst response = options.responses[index];\n\t\tindex += 1;\n\n\t\tif (response === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t`createFakeSend exhausted: ${String(index)} calls made, only ${String(options.responses.length)} responses scripted`,\n\t\t\t);\n\t\t}\n\n\t\treturn response;\n\t}\n\n\treturn { requests, send };\n}\n","import type { SleepFunc } from \"#src/internal/utils/sleep\";\n\n/**\n * A directly-callable sleep double that records its wait arguments without\n * delaying. Assignable to {@link SleepFunc}.\n */\nexport interface FakeSleep extends SleepFunc {\n\t/** Chronological log of every `ms` value the fake was called with. */\n\treadonly waits: ReadonlyArray<number>;\n}\n\n/**\n * Creates a {@link FakeSleep} that resolves immediately and records every\n * `ms` value it was called with.\n *\n * @returns A callable sleep function with a `waits` log attached.\n */\nexport function createFakeSleep(): FakeSleep {\n\tconst waits: Array<number> = [];\n\n\tasync function sleep(ms: number): Promise<void> {\n\t\twaits.push(ms);\n\t}\n\n\tconst fake: FakeSleep = Object.assign(sleep, {\n\t\tget waits(): ReadonlyArray<number> {\n\t\t\treturn waits;\n\t\t},\n\t});\n\n\treturn fake;\n}\n","import type {\n\tGameIconListWire,\n\tGetGameIconResponseWire,\n} from \"#src/domains/game-internationalization/game-icon/wire\";\n\n/**\n * Builds a minimally-valid {@link GetGameIconResponseWire} entry. Pass an\n * `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant.\n *\n * @param overrides - Fields to override on the default entry.\n * @returns A valid localized-icon entry with the overrides applied.\n */\nexport function validLocalizedIcon(\n\toverrides: Partial<GetGameIconResponseWire> = {},\n): GetGameIconResponseWire {\n\treturn {\n\t\timageId: \"12345\",\n\t\timageUrl: \"https://t1.rbxcdn.com/icon/12345\",\n\t\tlanguageCode: \"en_us\",\n\t\tstate: \"Approved\",\n\t\t...overrides,\n\t};\n}\n\n/**\n * Builds a minimally-valid {@link GameIconListWire} body containing a single\n * default localized icon.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validIconListBody(overrides: Partial<GameIconListWire> = {}): GameIconListWire {\n\treturn {\n\t\tdata: [validLocalizedIcon()],\n\t\t...overrides,\n\t};\n}\n","import type { GamePassConfigV2 } from \"#src/domains/game-passes/game-passes/wire\";\n\n/**\n * Test-only wire shape for the list response. Mirrors the OpenAPI\n * schema, which marks `nextPageToken` as required and nullable, so\n * fixtures can carry the literal JSON `null` the API sends on the last\n * page without leaking `null` into the production wire type (which\n * exposes a post-normalization view of `string | undefined`).\n */\ninterface ListGamePassesWireBody {\n\treadonly gamePasses: ReadonlyArray<GamePassConfigV2>;\n\n\treadonly nextPageToken: null | string;\n}\n\n/**\n * Builds a minimally-valid {@link GamePassConfigV2} wire body. Pass an\n * `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant — useful for parser and integration tests that\n * only care about one field at a time.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validGamePassBody(overrides: Partial<GamePassConfigV2> = {}): GamePassConfigV2 {\n\treturn {\n\t\tname: \"Epic Pass\",\n\t\tcreatedTimestamp: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"Unlocks epic stuff\",\n\t\tgamePassId: 12_345,\n\t\ticonAssetId: 67_890,\n\t\tisForSale: true,\n\t\tpriceInformation: { defaultPriceInRobux: 100, enabledFeatures: [] },\n\t\tupdatedTimestamp: \"2024-03-20T14:45:00.000Z\",\n\t\t...overrides,\n\t};\n}\n\n/**\n * Builds a minimally-valid wire body for the \"list game passes\" endpoint.\n * By default the page contains one game pass and `nextPageToken` is the\n * literal JSON `null` the API sends on the last page; `overrides` let\n * parser and integration tests tweak the items array or the cursor\n * without rebuilding the whole shape.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied. `nextPageToken`\n * defaults to the wire's literal `null`, which the response parser\n * normalizes to `undefined` at the boundary.\n */\nexport function validListGamePassesBody(\n\toverrides: Partial<ListGamePassesWireBody> = {},\n): ListGamePassesWireBody {\n\treturn {\n\t\tgamePasses: [validGamePassBody()],\n\t\t// eslint-disable-next-line unicorn/no-null -- API sends null on the last page; parser normalizes to undefined.\n\t\tnextPageToken: null,\n\t\t...overrides,\n\t};\n}\n","import type { GameThumbnailUploadWire } from \"#src/domains/game-internationalization/game-thumbnails/wire\";\n\n/**\n * Builds a minimally-valid {@link GameThumbnailUploadWire} body. Pass an\n * `overrides` object to tweak individual fields while keeping everything\n * else schema-compliant; useful for parser and integration tests that\n * only care about one field at a time.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validThumbnailUploadBody(\n\toverrides: Partial<GameThumbnailUploadWire> = {},\n): GameThumbnailUploadWire {\n\treturn { mediaAssetId: \"67890\", ...overrides };\n}\n","import type { LuauExecutionTaskBinaryInputWire } from \"#src/domains/cloud-v2/luau-execution-task-binary-inputs/wire\";\n\n/**\n * Builds a minimally-valid {@link LuauExecutionTaskBinaryInputWire} body\n * for tests. Pass an `overrides` object to tweak fields without re-stating\n * the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validBinaryInputBody(\n\toverrides: Partial<LuauExecutionTaskBinaryInputWire> = {},\n): LuauExecutionTaskBinaryInputWire {\n\treturn {\n\t\tpath: \"universes/123/luau-execution-session-task-binary-inputs/abc\",\n\t\tuploadUri: \"https://storage.example.com/upload?token=xyz\",\n\t\t...overrides,\n\t};\n}\n","import type { ListLogsResponseWire } from \"#src/domains/cloud-v2/luau-execution-task-logs/wire\";\n\n/**\n * Builds a minimally-valid {@link ListLogsResponseWire} body containing\n * one chunk with one structured message. Pass an `overrides` object to\n * tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validLogPageBody(\n\toverrides: Partial<ListLogsResponseWire> = {},\n): ListLogsResponseWire {\n\treturn {\n\t\tluauExecutionSessionTaskLogs: [\n\t\t\t{\n\t\t\t\tstructuredMessages: [\n\t\t\t\t\t{\n\t\t\t\t\t\tcreateTime: \"2026-01-01T00:00:00Z\",\n\t\t\t\t\t\tmessage: \"Hello from Luau\",\n\t\t\t\t\t\tmessageType: \"OUTPUT\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t\t...overrides,\n\t};\n}\n","import type { LuauExecutionTaskWire } from \"#src/domains/cloud-v2/luau-execution-tasks/wire\";\n\n/**\n * Builds a minimally-valid {@link LuauExecutionTaskWire} body for an\n * in-progress task. Pass an `overrides` object to tweak fields without\n * re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validInProgressTaskBody(\n\toverrides: Partial<LuauExecutionTaskWire> = {},\n): LuauExecutionTaskWire {\n\treturn {\n\t\tcreateTime: \"2026-01-01T00:00:00Z\",\n\t\tpath: \"universes/123/places/456/luau-execution-session-tasks/task-1\",\n\t\tstate: \"QUEUED\",\n\t\tupdateTime: \"2026-01-01T00:00:30Z\",\n\t\tuser: \"user-1\",\n\t\t...overrides,\n\t};\n}\n","import type {\n\tMemoryStoreQueueItemWire,\n\tReadQueueItemsResponseWire,\n} from \"#src/domains/cloud-v2/memory-store-queues/wire\";\n\n/**\n * Builds a minimally-valid {@link MemoryStoreQueueItemWire} body. Pass\n * an `overrides` object to tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validQueueItemBody(\n\toverrides: Partial<MemoryStoreQueueItemWire> = {},\n): MemoryStoreQueueItemWire {\n\treturn {\n\t\tdata: \"hello\",\n\t\texpireTime: \"2026-06-21T15:08:58.4806559Z\",\n\t\tpath: \"cloud/v2/universes/123/memory-store/queues/test-queue/items/abc123\",\n\t\tpriority: 1,\n\t\t...overrides,\n\t};\n}\n\n/**\n * Builds a minimally-valid {@link ReadQueueItemsResponseWire} body\n * carrying a single default queue item. Pass an `overrides` object to\n * change the read identifier or supply a different items array.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid dequeue response body with the overrides applied.\n */\nexport function validDequeueBody(\n\toverrides: Partial<ReadQueueItemsResponseWire> = {},\n): ReadQueueItemsResponseWire {\n\treturn {\n\t\tid: \"1a354bd5b8fe457f8e51232f8dbfe6d0\",\n\t\tqueueItems: [validQueueItemBody()],\n\t\t...overrides,\n\t};\n}\n","import type { PlaceWire } from \"#src/domains/cloud-v2/places/wire\";\nimport { RBXL_SIGNATURE, RBXLX_SIGNATURE } from \"#src/domains/universes/places/signatures\";\nimport type { PlaceVersionWire } from \"#src/domains/universes/places/wire\";\n\n/**\n * Returns a fresh, minimal `.rbxl`-formatted body whose magic bytes\n * match {@link RBXL_SIGNATURE}. Useful when integration tests don't\n * care about the file's contents past the signature.\n *\n * @returns A 14-byte rbxl body matching the binary signature.\n */\nexport function rbxlBody(): Uint8Array<ArrayBuffer> {\n\treturn new Uint8Array(RBXL_SIGNATURE);\n}\n\n/**\n * Returns a fresh, minimal `.rbxlx`-formatted body whose magic bytes\n * match {@link RBXLX_SIGNATURE}. Useful when integration tests don't\n * care about the file's contents past the signature.\n *\n * @returns An 8-byte rbxlx body matching the XML signature.\n */\nexport function rbxlxBody(): Uint8Array<ArrayBuffer> {\n\treturn new Uint8Array(RBXLX_SIGNATURE);\n}\n\n/**\n * Builds a minimally-valid {@link PlaceVersionWire} body. Pass an\n * `overrides` object to tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validPublishResponseBody(\n\toverrides: Partial<PlaceVersionWire> = {},\n): PlaceVersionWire {\n\treturn {\n\t\tversionNumber: 1,\n\t\t...overrides,\n\t};\n}\n\n/**\n * Builds a minimally-valid {@link PlaceWire} body. Pass an `overrides`\n * object to tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validPlaceBody(overrides: Partial<PlaceWire> = {}): PlaceWire {\n\treturn {\n\t\tcreateTime: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"A sample place.\",\n\t\tdisplayName: \"Test Place\",\n\t\tpath: \"universes/123/places/456\",\n\t\troot: true,\n\t\tserverSize: 30,\n\t\tuniverseRuntimeCreation: false,\n\t\tupdateTime: \"2024-11-02T17:08:21.500Z\",\n\t\t...overrides,\n\t};\n}\n","import type { UniverseWire } from \"#src/domains/cloud-v2/universes/wire\";\n\n/**\n * Builds a minimally-valid {@link UniverseWire} body. Pass an\n * `overrides` object to tweak fields without re-stating the defaults.\n *\n * @param overrides - Fields to override on the default body.\n * @returns A valid wire body with the overrides applied.\n */\nexport function validUniverseBody(overrides: Partial<UniverseWire> = {}): UniverseWire {\n\treturn {\n\t\tageRating: \"AGE_RATING_13_PLUS\",\n\t\tconsoleEnabled: false,\n\t\tcreateTime: \"2024-01-15T10:30:00.000Z\",\n\t\tdescription: \"A sample universe for tests.\",\n\t\tdesktopEnabled: true,\n\t\tdisplayName: \"Test Universe\",\n\t\tmobileEnabled: true,\n\t\tpath: \"universes/12345\",\n\t\trootPlace: \"universes/12345/places/98765\",\n\t\ttabletEnabled: true,\n\t\tupdateTime: \"2024-11-02T17:08:21.500Z\",\n\t\tuser: \"users/7777\",\n\t\tvisibility: \"PUBLIC\",\n\t\tvoiceChatEnabled: false,\n\t\tvrEnabled: false,\n\t\t...overrides,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,eAAe,YAA0C,CAAC,GAAwB;CACjG,OAAO;EACN,IAAI;EACJ,MAAM;EACN,SAAS;GAAE,IAAI;GAAK,MAAM;GAAS,MAAM;EAAE;EAC3C,SAAS;EACT,aAAa;EACb,oBAA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4C,CAAC,GACrB;CACxB,OAAO;EACN,YAAY;EACZ,MAAM;EACN,OAAO;EACP,YAAY;EACZ,MAAM;EACN,GAAG;CACJ;AACD;;;;;;;;;;ACTA,SAAgB,mBACf,YAA+C,CAAC,GACrB;CAC3B,OAAO;EACN,MAAM;EACN,YAAY;EACZ,MAAM;EACN,UAAU;EACV,GAAG;CACJ;AACD;;;;;;;;;AAUA,SAAgB,iBACf,YAAiD,CAAC,GACrB;CAC7B,OAAO;EACN,IAAI;EACJ,YAAY,CAAC,mBAAmB,CAAC;EACjC,GAAG;CACJ;AACD;;;;;;;;;;AC7BA,SAAgB,WAAoC;CACnD,OAAO,IAAI,WAAW,cAAc;AACrC;;;;;;;;AASA,SAAgB,YAAqC;CACpD,OAAO,IAAI,WAAW,eAAe;AACtC;;;;;;;;AASA,SAAgB,yBACf,YAAuC,CAAC,GACrB;CACnB,OAAO;EACN,eAAe;EACf,GAAG;CACJ;AACD;;;;;;;;AASA,SAAgB,eAAe,YAAgC,CAAC,GAAc;CAC7E,OAAO;EACN,YAAY;EACZ,aAAa;EACb,aAAa;EACb,MAAM;EACN,MAAM;EACN,YAAY;EACZ,yBAAyB;EACzB,YAAY;EACZ,GAAG;CACJ;AACD;;;;;;;;;;ACpDA,SAAgB,kBAAkB,YAAmC,CAAC,GAAiB;CACtF,OAAO;EACN,WAAW;EACX,gBAAgB;EAChB,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,aAAa;EACb,eAAe;EACf,MAAM;EACN,WAAW;EACX,eAAe;EACf,YAAY;EACZ,MAAM;EACN,YAAY;EACZ,kBAAkB;EAClB,WAAW;EACX,GAAG;CACJ;AACD"}
@@ -15,4 +15,4 @@ function toBlob(value) {
15
15
  //#endregion
16
16
  export { toBlob as t };
17
17
 
18
- //# sourceMappingURL=to-blob-B27VhoRp.mjs.map
18
+ //# sourceMappingURL=to-blob-RPqMBuft.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"to-blob-B27VhoRp.mjs","names":[],"sources":["../src/internal/utils/to-blob.ts"],"sourcesContent":["/**\n * Wraps a binary value as a {@link Blob}, copying `Uint8Array` input into a\n * fresh `Blob` so the originating buffer cannot be mutated between request\n * build and send. `Blob` input is returned as-is so MIME-type metadata is\n * preserved.\n *\n * @param value - Binary data to convert.\n * @returns The supplied `Blob`, or a new `Blob` wrapping a defensive copy.\n */\nexport function toBlob(value: Blob | Uint8Array): Blob {\n\tif (value instanceof Blob) {\n\t\treturn value;\n\t}\n\n\treturn new Blob([new Uint8Array(value)]);\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,OAAO,OAAgC;AACtD,KAAI,iBAAiB,KACpB,QAAO;AAGR,QAAO,IAAI,KAAK,CAAC,IAAI,WAAW,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"to-blob-RPqMBuft.mjs","names":[],"sources":["../src/internal/utils/to-blob.ts"],"sourcesContent":["/**\n * Wraps a binary value as a {@link Blob}, copying `Uint8Array` input into a\n * fresh `Blob` so the originating buffer cannot be mutated between request\n * build and send. `Blob` input is returned as-is so MIME-type metadata is\n * preserved.\n *\n * @param value - Binary data to convert.\n * @returns The supplied `Blob`, or a new `Blob` wrapping a defensive copy.\n */\nexport function toBlob(value: Blob | Uint8Array): Blob {\n\tif (value instanceof Blob) {\n\t\treturn value;\n\t}\n\n\treturn new Blob([new Uint8Array(value)]);\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,OAAO,OAAgC;CACtD,IAAI,iBAAiB,MACpB,OAAO;CAGR,OAAO,IAAI,KAAK,CAAC,IAAI,WAAW,KAAK,CAAC,CAAC;AACxC"}