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

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.
@@ -110,6 +110,188 @@ interface DiscardQueueItemsParameters {
110
110
  readonly universeId: string;
111
111
  }
112
112
  //#endregion
113
+ //#region src/domains/cloud-v2/memory-store-sorted-maps/types.d.ts
114
+ /**
115
+ * Discriminated union describing a sorted-map item's sort key. The
116
+ * server contract requires at most one of `stringSortKey` or
117
+ * `numericSortKey`; the union surfaces that constraint at the type
118
+ * level so callers cannot accidentally set both.
119
+ */
120
+ type SortKey = {
121
+ readonly kind: "numeric";
122
+ readonly value: number;
123
+ } | {
124
+ readonly kind: "string";
125
+ readonly value: string;
126
+ };
127
+ /**
128
+ * Caller-supplied input for the `create` method on
129
+ * `StorageClient.sortedMaps`. Mirrors
130
+ * `Cloud_CreateMemoryStoreSortedMapItem` on the Open Cloud API.
131
+ */
132
+ interface CreateSortedMapItemParameters {
133
+ /**
134
+ * Caller-supplied item identifier. The server stores items
135
+ * case-sensitively; the value is URL-encoded by the builder.
136
+ */
137
+ readonly itemId: string;
138
+ /** Stringified sorted-map identifier. */
139
+ readonly mapId: string;
140
+ /** Optional sort key driving the item's position in the map. */
141
+ readonly sortKey?: SortKey;
142
+ /**
143
+ * Optional time-to-live in seconds. After this many seconds the
144
+ * item is automatically removed. Omitted entries inherit the
145
+ * server-default TTL.
146
+ */
147
+ readonly ttl?: number;
148
+ /** Stringified ID of the universe that owns the sorted map. */
149
+ readonly universeId: string;
150
+ /**
151
+ * Opaque item payload. May be any JSON value, including `null`,
152
+ * matching the protobuf `Value` contract on the wire.
153
+ */
154
+ readonly value: JSONValue;
155
+ }
156
+ /**
157
+ * Caller-supplied input for the `list` method on
158
+ * `StorageClient.sortedMaps`. Mirrors
159
+ * `Cloud_ListMemoryStoreSortedMapItems` on the Open Cloud API. All
160
+ * paging and filtering parameters are optional; omitting them returns
161
+ * up to one item server-side (`maxPageSize` defaults to `1`).
162
+ */
163
+ interface ListSortedMapItemsParameters {
164
+ /**
165
+ * Optional CEL filter on `id` and `sortKey`. The server supports
166
+ * `<`, `>`, and `&&` operators only; other operators are rejected
167
+ * server-side with a validation error.
168
+ */
169
+ readonly filter?: string;
170
+ /** Stringified sorted-map identifier. */
171
+ readonly mapId: string;
172
+ /**
173
+ * Maximum items per page. Capped at `100` server-side; values above
174
+ * the cap are clamped. Defaults to `1` when omitted.
175
+ */
176
+ readonly maxPageSize?: number;
177
+ /**
178
+ * Sort order. The server supports the `id` field only, with an
179
+ * optional ` desc` suffix.
180
+ */
181
+ readonly orderBy?: string;
182
+ /**
183
+ * Page token returned by a previous call. When supplied, all other
184
+ * parameters must match the previous call exactly.
185
+ */
186
+ readonly pageToken?: string;
187
+ /** Stringified ID of the universe that owns the sorted map. */
188
+ readonly universeId: string;
189
+ }
190
+ /**
191
+ * Parsed representation of a sorted-map item, as returned by every
192
+ * sorted-map operation that yields a single item.
193
+ */
194
+ interface SortedMapItem {
195
+ /** Item identifier, parsed from the wire `path`. */
196
+ readonly id: string;
197
+ /**
198
+ * Server-generated etag for optimistic concurrency. Surfaced for
199
+ * caller inspection; the SDK does not yet emit an `If-Match` header
200
+ * for conditional update or delete.
201
+ */
202
+ readonly etag: string;
203
+ /** Timestamp at which the server removes the item from the map. */
204
+ readonly expiresAt: Date;
205
+ /** Stringified sorted-map identifier, parsed from the wire `path`. */
206
+ readonly mapId: string;
207
+ /**
208
+ * Parsed sort key, or `undefined` when the item has none. The server
209
+ * contract is one-of: a response carrying both `stringSortKey` and
210
+ * `numericSortKey` is rejected as malformed.
211
+ */
212
+ readonly sortKey: SortKey | undefined;
213
+ /** Stringified universe identifier, parsed from the wire `path`. */
214
+ readonly universeId: string;
215
+ /**
216
+ * Opaque item payload. Round-trips as JSON, including nested `null`
217
+ * values inside objects and arrays, and `null` at the top level.
218
+ */
219
+ readonly value: JSONValue;
220
+ }
221
+ /**
222
+ * Parsed result of a successful `Cloud_ListMemoryStoreSortedMapItems`
223
+ * response.
224
+ */
225
+ interface ListSortedMapItemsResult {
226
+ /** Items returned in the current page, ordered per `orderBy`. */
227
+ readonly items: ReadonlyArray<SortedMapItem>;
228
+ /**
229
+ * Page token for the next call, or `undefined` when no more pages
230
+ * exist. Pass back through `pageToken` to retrieve the next page.
231
+ */
232
+ readonly nextPageToken: string | undefined;
233
+ }
234
+ /**
235
+ * Caller-supplied input for the `delete` method on
236
+ * `StorageClient.sortedMaps`. Mirrors
237
+ * `Cloud_DeleteMemoryStoreSortedMapItem` on the Open Cloud API.
238
+ */
239
+ interface DeleteSortedMapItemParameters {
240
+ /** Caller-supplied item identifier. URL-encoded by the builder. */
241
+ readonly itemId: string;
242
+ /** Stringified sorted-map identifier. */
243
+ readonly mapId: string;
244
+ /** Stringified ID of the universe that owns the sorted map. */
245
+ readonly universeId: string;
246
+ }
247
+ /**
248
+ * Caller-supplied input for the `get` method on
249
+ * `StorageClient.sortedMaps`. Mirrors
250
+ * `Cloud_GetMemoryStoreSortedMapItem` on the Open Cloud API.
251
+ */
252
+ interface GetSortedMapItemParameters {
253
+ /** Caller-supplied item identifier. URL-encoded by the builder. */
254
+ readonly itemId: string;
255
+ /** Stringified sorted-map identifier. */
256
+ readonly mapId: string;
257
+ /** Stringified ID of the universe that owns the sorted map. */
258
+ readonly universeId: string;
259
+ }
260
+ /**
261
+ * Caller-supplied input for the `update` method on
262
+ * `StorageClient.sortedMaps`. Mirrors
263
+ * `Cloud_UpdateMemoryStoreSortedMapItem` on the Open Cloud API. Body
264
+ * fields (`value`, `ttl`, `sortKey`) are optional under PATCH
265
+ * semantics; omitted fields are left unchanged on the server.
266
+ */
267
+ interface UpdateSortedMapItemParameters {
268
+ /**
269
+ * When `true`, the server creates the item if it does not exist
270
+ * instead of returning 404. Travels as the `allowMissing` query
271
+ * string parameter.
272
+ */
273
+ readonly allowMissing?: boolean;
274
+ /** Caller-supplied item identifier. URL-encoded by the builder. */
275
+ readonly itemId: string;
276
+ /** Stringified sorted-map identifier. */
277
+ readonly mapId: string;
278
+ /**
279
+ * Replacement sort key. Either kind of {@link SortKey} resets the
280
+ * field on the wire; omit the field to leave the existing sort key
281
+ * untouched.
282
+ */
283
+ readonly sortKey?: SortKey;
284
+ /**
285
+ * Replacement time-to-live in seconds. Omitted entries leave the
286
+ * existing TTL unchanged.
287
+ */
288
+ readonly ttl?: number;
289
+ /** Stringified ID of the universe that owns the sorted map. */
290
+ readonly universeId: string;
291
+ /** Replacement value. Omitted entries leave the existing value unchanged. */
292
+ readonly value?: JSONValue;
293
+ }
294
+ //#endregion
113
295
  //#region src/internal/http/rate-limit-queue.d.ts
114
296
  /**
115
297
  * Identifies and bounds a single Roblox Open Cloud operation for rate
@@ -344,13 +526,111 @@ declare class MemoryStoreQueuesGroup {
344
526
  enqueue(parameters: EnqueueQueueItemParameters, options?: RequestOptions): Promise<Result<QueueItem, OpenCloudError>>;
345
527
  }
346
528
  //#endregion
529
+ //#region src/resources/storage/sorted-maps-group.d.ts
530
+ /**
531
+ * Operation Group on `StorageClient` that exposes the memory-store
532
+ * sorted-map endpoints. Sorted maps are ordered collections of
533
+ * (id, value, sortKey) triples; consumers create, read, update, list,
534
+ * and delete items keyed by a caller-supplied identifier and ordered
535
+ * by an optional string or numeric sort key.
536
+ */
537
+ declare class MemoryStoreSortedMapsGroup {
538
+ #private;
539
+ /**
540
+ * Wraps the shared {@link ResourceClient} so the Operation Group
541
+ * routes calls through the same retry, hooks, and rate-limit queues
542
+ * as the rest of the parent client.
543
+ *
544
+ * @param inner - The shared {@link ResourceClient} owned by the
545
+ * parent client.
546
+ */
547
+ constructor(inner: ResourceClient);
548
+ /**
549
+ * Creates a single item in a sorted map. The sorted map is
550
+ * auto-created on first use; the map identifier is any string the
551
+ * caller picks. Items are keyed by `itemId` (case-sensitive) and
552
+ * ordered by an optional `sortKey`. Items expire and are removed
553
+ * automatically after `ttl` seconds, or after a server-default
554
+ * lifetime when omitted.
555
+ *
556
+ * On 5xx, create does not retry: Roblox Open Cloud has no
557
+ * idempotency-key support, so a retry of a transient failure risks
558
+ * producing a duplicate item.
559
+ *
560
+ * @param parameters - Universe, sorted-map, item identifiers, the
561
+ * value to store, and optional `sortKey` and `ttl`.
562
+ * @param options - Optional per-request overrides (e.g. A different
563
+ * {@link OpenCloudClientOptions.apiKey} for this call only).
564
+ * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}
565
+ * or the {@link OpenCloudError} that caused the request to fail.
566
+ */
567
+ create(parameters: CreateSortedMapItemParameters, options?: RequestOptions): Promise<Result<SortedMapItem, OpenCloudError>>;
568
+ /**
569
+ * Removes a single item from a sorted map. The call is idempotent:
570
+ * a second `delete` against the same item is a no-op once the
571
+ * server has dropped the row. The retry policy retries both 429
572
+ * and 5xx.
573
+ *
574
+ * @param parameters - Universe, sorted-map, and item identifiers.
575
+ * @param options - Optional per-request overrides.
576
+ * @returns A {@link Result} wrapping `undefined` on success or the
577
+ * {@link OpenCloudError} that caused the request to fail.
578
+ */
579
+ delete(parameters: DeleteSortedMapItemParameters, options?: RequestOptions): Promise<Result<undefined, OpenCloudError>>;
580
+ /**
581
+ * Reads a single item from a sorted map. Returns the parsed
582
+ * {@link SortedMapItem} with the server-recorded `etag` for use in
583
+ * subsequent conditional updates (once the SDK begins emitting
584
+ * `If-Match`; see the package README).
585
+ *
586
+ * @param parameters - Universe, sorted-map, and item identifiers.
587
+ * @param options - Optional per-request overrides.
588
+ * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}
589
+ * or the {@link OpenCloudError} that caused the request to fail.
590
+ */
591
+ get(parameters: GetSortedMapItemParameters, options?: RequestOptions): Promise<Result<SortedMapItem, OpenCloudError>>;
592
+ /**
593
+ * Lists items in a sorted map. The server caps `maxPageSize` at
594
+ * `100` and defaults it to `1` when omitted, so callers explicitly
595
+ * pass `maxPageSize` to retrieve more than a single item per page.
596
+ * The `filter` parameter accepts a CEL expression on `id` and
597
+ * `sortKey` (operators `<`, `>`, `&&` only).
598
+ *
599
+ * @param parameters - Universe and sorted-map identifiers, plus
600
+ * optional pagination and filter parameters.
601
+ * @param options - Optional per-request overrides.
602
+ * @returns A {@link Result} wrapping the parsed
603
+ * {@link ListSortedMapItemsResult} or the {@link OpenCloudError}
604
+ * that caused the request to fail.
605
+ */
606
+ list(parameters: ListSortedMapItemsParameters, options?: RequestOptions): Promise<Result<ListSortedMapItemsResult, OpenCloudError>>;
607
+ /**
608
+ * Updates a sorted-map item under PATCH semantics: omitted body
609
+ * fields are left unchanged on the server, supplied fields replace
610
+ * their existing values. Passing `allowMissing: true` creates the
611
+ * item when no row exists instead of returning 404.
612
+ *
613
+ * Retries 5xx because PATCH with the same body produces the same
614
+ * server state.
615
+ *
616
+ * @param parameters - Universe, sorted-map, and item identifiers,
617
+ * plus any subset of `value`, `ttl`, `sortKey`, and
618
+ * `allowMissing`.
619
+ * @param options - Optional per-request overrides.
620
+ * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}
621
+ * or the {@link OpenCloudError} that caused the request to fail.
622
+ */
623
+ update(parameters: UpdateSortedMapItemParameters, options?: RequestOptions): Promise<Result<SortedMapItem, OpenCloudError>>;
624
+ }
625
+ //#endregion
347
626
  //#region src/resources/storage/client.d.ts
348
627
  /**
349
628
  * Public client for the Roblox Open Cloud `Data and memory stores`
350
629
  * Feature. Today it covers memory-store queues via the
351
- * {@link StorageClient.queues} Operation Group; future Operation
352
- * Groups for sorted maps and data stores slot in as siblings on the
353
- * same client.
630
+ * {@link StorageClient.queues} Operation Group and memory-store sorted
631
+ * maps via the {@link StorageClient.sortedMaps} Operation Group; a
632
+ * future data-stores Operation Group slots in as a sibling on the same
633
+ * client.
354
634
  *
355
635
  * Every method returns a `Result` so callers handle failure
356
636
  * explicitly; no thrown error ever escapes the client.
@@ -367,6 +647,8 @@ declare class MemoryStoreQueuesGroup {
367
647
  declare class StorageClient {
368
648
  /** Memory-store queue Operation Group. */
369
649
  readonly queues: MemoryStoreQueuesGroup;
650
+ /** Memory-store sorted-map Operation Group. */
651
+ readonly sortedMaps: MemoryStoreSortedMapsGroup;
370
652
  /**
371
653
  * Creates a new {@link StorageClient}. Configuration is frozen on
372
654
  * construction; per-request overrides are accepted on each method.
@@ -376,5 +658,5 @@ declare class StorageClient {
376
658
  constructor(options: OpenCloudClientOptions);
377
659
  }
378
660
  //#endregion
379
- export { type DequeueQueueItemsParameters, type DequeueResult, type DiscardQueueItemsParameters, type EnqueueQueueItemParameters, type QueueItem, StorageClient };
661
+ export { type CreateSortedMapItemParameters, type DeleteSortedMapItemParameters, type DequeueQueueItemsParameters, type DequeueResult, type DiscardQueueItemsParameters, type EnqueueQueueItemParameters, type GetSortedMapItemParameters, type ListSortedMapItemsParameters, type ListSortedMapItemsResult, type QueueItem, type SortKey, type SortedMapItem, StorageClient, type UpdateSortedMapItemParameters };
380
662
  //# sourceMappingURL=storage.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.mts","names":[],"sources":["../src/domains/cloud-v2/memory-store-queues/types.ts","../src/internal/http/rate-limit-queue.ts","../src/internal/http/retry.ts","../src/internal/resource-client.ts","../src/resources/storage/queues-group.ts","../src/resources/storage/client.ts"],"mappings":";;;;;;AAIA;UAAiB,0BAAA;;;;;;;WAOP,IAAA,EAAM,OAAA,CAAQ,SAAA;;;;;AAwBxB;WAlBU,QAAA;;WAEA,OAAA;;;;;;WAMA,GAAA;;WAEA,UAAA;AAAA;;;;;;UAQO,SAAA;EAsBjB;EAAA,SApBU,EAAA;;;;;WAKA,IAAA,EAAM,OAAA,CAAQ,SAAA;;WAEd,SAAA,EAAW,IAAA;;WAEX,QAAA;EAyCV;EAAA,SAvCU,OAAA;;WAEA,UAAA;AAAA;;;;;UAOO,2BAAA;EA+CjB;;;;;EAAA,SAzCU,YAAA;;;;;WAKA,KAAA;;AC7DV;;;;WDmEU,kBAAA;;WAEA,OAAA;;WAEA,UAAA;AAAA;;;;;;;UASO,aAAA;;WAEP,KAAA,EAAO,aAAA,CAAc,SAAA;;;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CAAY,KAAA,EAAO,cAAA;EJ7CC;;;;;;;;;;;;AAarB;;;;;;;;EIwDC,OAAA,CACC,UAAA,EAAY,2BAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,aAAA,EAAe,cAAA;;;AJ7BlC;;;;;;;;;;AAiBA;;;;;EIiCC,OAAA,CACC,UAAA,EAAY,2BAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,YAAkB,cAAA;;;;;;;AHrI9B;;;;;;;;ACIA;EEoJC,OAAA,CACC,UAAA,EAAY,0BAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,SAAA,EAAW,cAAA;AAAA;;;;AJ9J9B;;;;;;;;;;;;;AA+BA;;;;;cKZa,aAAA;;WAEI,MAAA,EAAQ,sBAAA;;;;;;;EAQxB,WAAA,CAAY,OAAA,EAAS,sBAAA;AAAA"}
1
+ {"version":3,"file":"storage.d.mts","names":[],"sources":["../src/domains/cloud-v2/memory-store-queues/types.ts","../src/domains/cloud-v2/memory-store-sorted-maps/types.ts","../src/internal/http/rate-limit-queue.ts","../src/internal/http/retry.ts","../src/internal/resource-client.ts","../src/resources/storage/queues-group.ts","../src/resources/storage/sorted-maps-group.ts","../src/resources/storage/client.ts"],"mappings":";;;;;;AAIA;UAAiB,0BAAA;;;;;;;WAOP,IAAA,EAAM,OAAA,CAAQ,SAAA;;;;;AAwBxB;WAlBU,QAAA;;WAEA,OAAA;;;;;;WAMA,GAAA;;WAEA,UAAA;AAAA;;;;;;UAQO,SAAA;EAsBjB;EAAA,SApBU,EAAA;;;;;WAKA,IAAA,EAAM,OAAA,CAAQ,SAAA;;WAEd,SAAA,EAAW,IAAA;;WAEX,QAAA;EAyCV;EAAA,SAvCU,OAAA;;WAEA,UAAA;AAAA;;;;;UAOO,2BAAA;EA+CjB;;;;;EAAA,SAzCU,YAAA;;;;;WAKA,KAAA;;AC9DV;;;;WDoEU,kBAAA;;WA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AA;;WAEI,MAAA,EAAQ,sBAAA;;WAER,UAAA,EAAY,0BAAA;;;;;;;EAQ5B,WAAA,CAAY,OAAA,EAAS,sBAAA;AAAA"}
package/dist/storage.mjs CHANGED
@@ -72,7 +72,7 @@ function buildDiscardRequest(parameters) {
72
72
  //#endregion
73
73
  //#region src/domains/cloud-v2/memory-store-queues/operations.ts
74
74
  const ENQUEUE_PER_MINUTE = 1e6;
75
- const SECONDS_PER_MINUTE = 60;
75
+ const SECONDS_PER_MINUTE$1 = 60;
76
76
  /**
77
77
  * Per-second request ceiling for enqueueing a memory-store queue item,
78
78
  * from the Open Cloud OpenAPI schema (1,000,000 requests per minute per
@@ -82,7 +82,7 @@ const SECONDS_PER_MINUTE = 60;
82
82
  * is fewer cross-method contention surprises.
83
83
  */
84
84
  const ENQUEUE_OPERATION_LIMIT = Object.freeze({
85
- maxPerSecond: ENQUEUE_PER_MINUTE / SECONDS_PER_MINUTE,
85
+ maxPerSecond: ENQUEUE_PER_MINUTE / SECONDS_PER_MINUTE$1,
86
86
  operationKey: "memory-store-queues.enqueue"
87
87
  });
88
88
  /**
@@ -97,7 +97,7 @@ const ENQUEUE_REQUIRED_SCOPES = Object.freeze(["memory-store.queue:add"]);
97
97
  * per API key owner). Keyed independently from enqueue and discard.
98
98
  */
99
99
  const DEQUEUE_OPERATION_LIMIT = Object.freeze({
100
- maxPerSecond: 1e6 / SECONDS_PER_MINUTE,
100
+ maxPerSecond: 1e6 / SECONDS_PER_MINUTE$1,
101
101
  operationKey: "memory-store-queues.dequeue"
102
102
  });
103
103
  /**
@@ -113,7 +113,7 @@ const DEQUEUE_REQUIRED_SCOPES = Object.freeze(["memory-store.queue:dequeue"]);
113
113
  * dequeue.
114
114
  */
115
115
  const DISCARD_OPERATION_LIMIT = Object.freeze({
116
- maxPerSecond: 1e6 / SECONDS_PER_MINUTE,
116
+ maxPerSecond: 1e6 / SECONDS_PER_MINUTE$1,
117
117
  operationKey: "memory-store-queues.discard"
118
118
  });
119
119
  /**
@@ -124,7 +124,7 @@ const DISCARD_OPERATION_LIMIT = Object.freeze({
124
124
  const DISCARD_REQUIRED_SCOPES = Object.freeze(["memory-store.queue:discard"]);
125
125
  //#endregion
126
126
  //#region src/domains/cloud-v2/memory-store-queues/parsers.ts
127
- const PATH_PATTERN = /^cloud\/v2\/universes\/(\d+)\/memory-store\/queues\/([^/]+)\/items\/([^/]+)$/;
127
+ const PATH_PATTERN$1 = /^cloud\/v2\/universes\/(\d+)\/memory-store\/queues\/([^/]+)\/items\/([^/]+)$/;
128
128
  const MALFORMED_QUEUE_ITEM_MESSAGE = "Malformed memory-store queue item response";
129
129
  const MALFORMED_DEQUEUE_MESSAGE = "Malformed memory-store dequeue response";
130
130
  /**
@@ -177,7 +177,7 @@ function isQueueItemWire(body) {
177
177
  }
178
178
  function wireBodyToQueueItem(body) {
179
179
  if (!isQueueItemWire(body)) return;
180
- const match = PATH_PATTERN.exec(body.path);
180
+ const match = PATH_PATTERN$1.exec(body.path);
181
181
  const universeId = match?.[1];
182
182
  const queueId = match?.[2];
183
183
  const id = match?.[3];
@@ -208,10 +208,10 @@ function malformedDequeue(statusCode) {
208
208
  }
209
209
  //#endregion
210
210
  //#region src/resources/storage/queues-group.ts
211
- function makeSpec(spec) {
211
+ function makeSpec$1(spec) {
212
212
  return Object.freeze(spec);
213
213
  }
214
- const ENQUEUE_SPEC = makeSpec({
214
+ const ENQUEUE_SPEC = makeSpec$1({
215
215
  buildRequest: (parameters) => okRequest(buildEnqueueRequest(parameters)),
216
216
  methodDefaults: CREATE_METHOD_DEFAULTS,
217
217
  methodKind: "create",
@@ -219,7 +219,7 @@ const ENQUEUE_SPEC = makeSpec({
219
219
  parse: parseQueueItemResponse,
220
220
  requiredScopes: ENQUEUE_REQUIRED_SCOPES
221
221
  });
222
- const DEQUEUE_SPEC = makeSpec({
222
+ const DEQUEUE_SPEC = makeSpec$1({
223
223
  buildRequest: (parameters) => okRequest(buildDequeueRequest(parameters)),
224
224
  methodDefaults: CREATE_METHOD_DEFAULTS,
225
225
  methodKind: "create",
@@ -227,7 +227,7 @@ const DEQUEUE_SPEC = makeSpec({
227
227
  parse: parseDequeueResponse,
228
228
  requiredScopes: DEQUEUE_REQUIRED_SCOPES
229
229
  });
230
- const DISCARD_SPEC = makeSpec({
230
+ const DISCARD_SPEC = makeSpec$1({
231
231
  buildRequest: (parameters) => okRequest(buildDiscardRequest(parameters)),
232
232
  methodDefaults: IDEMPOTENT_METHOD_DEFAULTS,
233
233
  methodKind: "idempotent",
@@ -330,13 +330,496 @@ var MemoryStoreQueuesGroup = class {
330
330
  }
331
331
  };
332
332
  //#endregion
333
+ //#region src/domains/cloud-v2/memory-store-sorted-maps/builders.ts
334
+ /**
335
+ * Builds a `POST` request for the Open Cloud
336
+ * `Cloud_CreateMemoryStoreSortedMapItem` endpoint. The caller-supplied
337
+ * `itemId` travels as the `id` query parameter (URL-encoded by
338
+ * `URLSearchParams`); the body carries `value`, the optional `ttl`
339
+ * (serialized as a Google protobuf `Duration` string in seconds), and
340
+ * one of `stringSortKey`/`numericSortKey` projected from the
341
+ * {@link SortKey} discriminated union.
342
+ *
343
+ * @param parameters - Universe, sorted-map, item identifiers, the
344
+ * value to store, and optional `sortKey` and `ttl`.
345
+ * @returns A pure {@link HttpRequest} describing the create call.
346
+ */
347
+ function buildCreateRequest(parameters) {
348
+ const { itemId, mapId, sortKey, ttl, universeId, value } = parameters;
349
+ const body = { value };
350
+ if (ttl !== void 0) body["ttl"] = `${ttl}s`;
351
+ applySortKeyToBody(body, sortKey);
352
+ const query = new URLSearchParams({ id: itemId });
353
+ return {
354
+ body,
355
+ headers: { "content-type": "application/json" },
356
+ method: "POST",
357
+ url: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items?${query.toString()}`
358
+ };
359
+ }
360
+ /**
361
+ * Builds a `DELETE` request for the Open Cloud
362
+ * `Cloud_DeleteMemoryStoreSortedMapItem` endpoint. Every path segment
363
+ * (universe, sorted-map, item identifiers) is URL-encoded so callers
364
+ * can pass values containing reserved characters without manual
365
+ * escaping.
366
+ *
367
+ * @param parameters - Universe, sorted-map, and item identifiers.
368
+ * @returns A pure {@link HttpRequest} describing the delete call.
369
+ */
370
+ function buildDeleteRequest(parameters) {
371
+ const { itemId, mapId, universeId } = parameters;
372
+ return {
373
+ method: "DELETE",
374
+ url: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`
375
+ };
376
+ }
377
+ /**
378
+ * Builds a `GET` request for the Open Cloud
379
+ * `Cloud_GetMemoryStoreSortedMapItem` endpoint. Every path segment
380
+ * (universe, sorted-map, item identifiers) is URL-encoded so callers
381
+ * can pass values containing reserved characters without manual
382
+ * escaping.
383
+ *
384
+ * @param parameters - Universe, sorted-map, and item identifiers.
385
+ * @returns A pure {@link HttpRequest} describing the get call.
386
+ */
387
+ function buildGetRequest(parameters) {
388
+ const { itemId, mapId, universeId } = parameters;
389
+ return {
390
+ method: "GET",
391
+ url: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`
392
+ };
393
+ }
394
+ /**
395
+ * Builds a `GET` request for the Open Cloud
396
+ * `Cloud_ListMemoryStoreSortedMapItems` endpoint. Optional `filter`,
397
+ * `maxPageSize`, `orderBy`, and `pageToken` parameters travel as query
398
+ * string parameters and are omitted when unset.
399
+ *
400
+ * @param parameters - Universe and sorted-map identifiers, plus
401
+ * optional pagination and filter parameters.
402
+ * @returns A pure {@link HttpRequest} describing the list call.
403
+ */
404
+ function buildListRequest(parameters) {
405
+ const { filter, mapId, maxPageSize, orderBy, pageToken, universeId } = parameters;
406
+ const query = new URLSearchParams();
407
+ if (maxPageSize !== void 0) query.append("maxPageSize", String(maxPageSize));
408
+ if (pageToken !== void 0) query.append("pageToken", pageToken);
409
+ if (orderBy !== void 0) query.append("orderBy", orderBy);
410
+ if (filter !== void 0) query.append("filter", filter);
411
+ const base = `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items`;
412
+ const queryString = query.toString();
413
+ return {
414
+ method: "GET",
415
+ url: queryString === "" ? base : `${base}?${queryString}`
416
+ };
417
+ }
418
+ /**
419
+ * Builds a `PATCH` request for the Open Cloud
420
+ * `Cloud_UpdateMemoryStoreSortedMapItem` endpoint. Body fields are
421
+ * conditionally included so a partial update sends only the changed
422
+ * fields; the optional `allowMissing` query string drives
423
+ * upsert-on-missing behaviour server-side.
424
+ *
425
+ * @param parameters - Universe, sorted-map, and item identifiers,
426
+ * plus any subset of `value`, `ttl`, `sortKey`, and `allowMissing`.
427
+ * @returns A pure {@link HttpRequest} describing the update call.
428
+ */
429
+ function buildUpdateRequest(parameters) {
430
+ const { allowMissing: shouldAllowMissing, itemId, mapId, universeId } = parameters;
431
+ const base = `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`;
432
+ const query = new URLSearchParams();
433
+ if (shouldAllowMissing !== void 0) query.append("allowMissing", String(shouldAllowMissing));
434
+ const queryString = query.toString();
435
+ return {
436
+ body: buildUpdateBody(parameters),
437
+ headers: { "content-type": "application/json" },
438
+ method: "PATCH",
439
+ url: queryString === "" ? base : `${base}?${queryString}`
440
+ };
441
+ }
442
+ function applySortKeyToBody(body, sortKey) {
443
+ if (sortKey === void 0) return;
444
+ if (sortKey.kind === "string") {
445
+ body["stringSortKey"] = sortKey.value;
446
+ return;
447
+ }
448
+ body["numericSortKey"] = sortKey.value;
449
+ }
450
+ function buildUpdateBody(parameters) {
451
+ const { sortKey, ttl, value } = parameters;
452
+ const body = {};
453
+ if (value !== void 0) body["value"] = value;
454
+ if (ttl !== void 0) body["ttl"] = `${ttl}s`;
455
+ applySortKeyToBody(body, sortKey);
456
+ return body;
457
+ }
458
+ //#endregion
459
+ //#region src/domains/cloud-v2/memory-store-sorted-maps/operations.ts
460
+ const CREATE_PER_MINUTE = 1e6;
461
+ const SECONDS_PER_MINUTE = 60;
462
+ const WRITE_SCOPE = "memory-store.sorted-map:write";
463
+ /**
464
+ * Per-second request ceiling for creating a memory-store sorted-map
465
+ * item, from the Open Cloud OpenAPI schema (1,000,000 requests per
466
+ * minute per API key owner). Keyed independently from the get, update,
467
+ * delete, and list operations so the five do not share a queue.
468
+ */
469
+ const CREATE_OPERATION_LIMIT = Object.freeze({
470
+ maxPerSecond: CREATE_PER_MINUTE / SECONDS_PER_MINUTE,
471
+ operationKey: "memory-store-sorted-maps.create"
472
+ });
473
+ /**
474
+ * Scopes required to create a memory-store sorted-map item, sourced
475
+ * from `x-roblox-scopes` on the `Cloud_CreateMemoryStoreSortedMapItem`
476
+ * operation in the vendored OpenAPI schema.
477
+ */
478
+ const CREATE_REQUIRED_SCOPES = Object.freeze([WRITE_SCOPE]);
479
+ /**
480
+ * Per-second request ceiling for deleting a memory-store sorted-map
481
+ * item, from the Open Cloud OpenAPI schema (1,000,000 requests per
482
+ * minute per API key owner).
483
+ */
484
+ const DELETE_OPERATION_LIMIT = Object.freeze({
485
+ maxPerSecond: 1e6 / SECONDS_PER_MINUTE,
486
+ operationKey: "memory-store-sorted-maps.delete"
487
+ });
488
+ /**
489
+ * Scopes required to delete a memory-store sorted-map item, sourced
490
+ * from `x-roblox-scopes` on the `Cloud_DeleteMemoryStoreSortedMapItem`
491
+ * operation in the vendored OpenAPI schema.
492
+ */
493
+ const DELETE_REQUIRED_SCOPES = Object.freeze([WRITE_SCOPE]);
494
+ /**
495
+ * Per-second request ceiling for reading a memory-store sorted-map
496
+ * item, from the Open Cloud OpenAPI schema (1,000,000 requests per
497
+ * minute per API key owner).
498
+ */
499
+ const GET_OPERATION_LIMIT = Object.freeze({
500
+ maxPerSecond: 1e6 / SECONDS_PER_MINUTE,
501
+ operationKey: "memory-store-sorted-maps.get"
502
+ });
503
+ /**
504
+ * Scopes required to read a memory-store sorted-map item, sourced from
505
+ * `x-roblox-scopes` on the `Cloud_GetMemoryStoreSortedMapItem`
506
+ * operation in the vendored OpenAPI schema.
507
+ */
508
+ const GET_REQUIRED_SCOPES = Object.freeze(["memory-store.sorted-map:read"]);
509
+ /**
510
+ * Per-second request ceiling for listing memory-store sorted-map
511
+ * items, from the Open Cloud OpenAPI schema (1,000,000 requests per
512
+ * minute per API key owner).
513
+ */
514
+ const LIST_OPERATION_LIMIT = Object.freeze({
515
+ maxPerSecond: 1e6 / SECONDS_PER_MINUTE,
516
+ operationKey: "memory-store-sorted-maps.list"
517
+ });
518
+ /**
519
+ * Scopes required to list memory-store sorted-map items, sourced from
520
+ * `x-roblox-scopes` on the `Cloud_ListMemoryStoreSortedMapItems`
521
+ * operation in the vendored OpenAPI schema.
522
+ */
523
+ const LIST_REQUIRED_SCOPES = Object.freeze(["memory-store.sorted-map:read"]);
524
+ /**
525
+ * Per-second request ceiling for updating a memory-store sorted-map
526
+ * item, from the Open Cloud OpenAPI schema (1,000,000 requests per
527
+ * minute per API key owner).
528
+ */
529
+ const UPDATE_OPERATION_LIMIT = Object.freeze({
530
+ maxPerSecond: 1e6 / SECONDS_PER_MINUTE,
531
+ operationKey: "memory-store-sorted-maps.update"
532
+ });
533
+ /**
534
+ * Scopes required to update a memory-store sorted-map item, sourced
535
+ * from `x-roblox-scopes` on the `Cloud_UpdateMemoryStoreSortedMapItem`
536
+ * operation in the vendored OpenAPI schema.
537
+ */
538
+ const UPDATE_REQUIRED_SCOPES = Object.freeze([WRITE_SCOPE]);
539
+ //#endregion
540
+ //#region src/domains/cloud-v2/memory-store-sorted-maps/parsers.ts
541
+ const PATH_PATTERN = /^cloud\/v2\/universes\/(\d+)\/memory-store\/sorted-maps\/([^/]+)\/items\/([^/]+)$/;
542
+ const MALFORMED_MESSAGE = "Malformed memory-store sorted-map item response";
543
+ const MALFORMED_LIST_MESSAGE = "Malformed memory-store sorted-map list response";
544
+ /**
545
+ * Parses a successful memory-store sorted-map item response body (the
546
+ * happy path for create, get, and update) into the public
547
+ * {@link SortedMapItem} shape.
548
+ *
549
+ * @param response - The full {@link HttpResponse} from the Open Cloud API.
550
+ * @returns A success result wrapping the parsed {@link SortedMapItem},
551
+ * or an {@link ApiError} when the body does not match the wire schema.
552
+ */
553
+ function parseSortedMapItemResponse(response) {
554
+ const item = wireBodyToSortedMapItem(response.body);
555
+ if (item === void 0) return malformedSortedMapItem(response.status);
556
+ return {
557
+ data: item,
558
+ success: true
559
+ };
560
+ }
561
+ /**
562
+ * Parses a successful `Cloud_ListMemoryStoreSortedMapItems` response
563
+ * body into the public {@link ListSortedMapItemsResult} shape. Each
564
+ * item in the `memoryStoreSortedMapItems` array is validated through
565
+ * the same path-and-shape checks as
566
+ * {@link parseSortedMapItemResponse}; a malformed entry rejects the
567
+ * whole response.
568
+ *
569
+ * @param response - The full {@link HttpResponse} from the Open Cloud API.
570
+ * @returns A success result wrapping the parsed
571
+ * {@link ListSortedMapItemsResult}, or an {@link ApiError} when the
572
+ * response shape is wrong.
573
+ */
574
+ function parseListResponse(response) {
575
+ const { body, status: statusCode } = response;
576
+ if (!isRecord(body)) return malformedList(statusCode);
577
+ const { memoryStoreSortedMapItems, nextPageToken } = body;
578
+ if (!Array.isArray(memoryStoreSortedMapItems)) return malformedList(statusCode);
579
+ if (nextPageToken !== void 0 && typeof nextPageToken !== "string") return malformedList(statusCode);
580
+ const items = memoryStoreSortedMapItems.map(wireBodyToSortedMapItem);
581
+ if (!items.every(isSortedMapItem)) return malformedList(statusCode);
582
+ return {
583
+ data: {
584
+ items,
585
+ nextPageToken
586
+ },
587
+ success: true
588
+ };
589
+ }
590
+ function isSortedMapItemWire(body) {
591
+ if (!isRecord(body)) return false;
592
+ const { id, etag, expireTime, numericSortKey, path, stringSortKey, value } = body;
593
+ return typeof path === "string" && typeof etag === "string" && typeof id === "string" && isDateTimeString(expireTime) && value !== void 0 && (stringSortKey === void 0 || stringSortKey === null || typeof stringSortKey === "string") && (numericSortKey === void 0 || numericSortKey === null || typeof numericSortKey === "number");
594
+ }
595
+ function extractSortKey(body) {
596
+ const hasStringKey = typeof body.stringSortKey === "string";
597
+ const hasNumericKey = typeof body.numericSortKey === "number";
598
+ if (hasStringKey && hasNumericKey) return "conflict";
599
+ if (hasStringKey) return {
600
+ kind: "string",
601
+ value: body.stringSortKey
602
+ };
603
+ if (hasNumericKey) return {
604
+ kind: "numeric",
605
+ value: body.numericSortKey
606
+ };
607
+ }
608
+ function wireBodyToSortedMapItem(body) {
609
+ if (!isSortedMapItemWire(body)) return;
610
+ const match = PATH_PATTERN.exec(body.path);
611
+ const universeId = match?.[1];
612
+ const mapId = match?.[2];
613
+ const id = match?.[3];
614
+ if (universeId === void 0 || mapId === void 0 || id === void 0) return;
615
+ const sortKey = extractSortKey(body);
616
+ if (sortKey === "conflict") return;
617
+ return {
618
+ id,
619
+ etag: body.etag,
620
+ expiresAt: new Date(body.expireTime),
621
+ mapId,
622
+ sortKey,
623
+ universeId,
624
+ value: body.value
625
+ };
626
+ }
627
+ function malformedSortedMapItem(statusCode) {
628
+ return {
629
+ err: new ApiError(MALFORMED_MESSAGE, { statusCode }),
630
+ success: false
631
+ };
632
+ }
633
+ function isSortedMapItem(item) {
634
+ return item !== void 0;
635
+ }
636
+ function malformedList(statusCode) {
637
+ return {
638
+ err: new ApiError(MALFORMED_LIST_MESSAGE, { statusCode }),
639
+ success: false
640
+ };
641
+ }
642
+ //#endregion
643
+ //#region src/resources/storage/sorted-maps-group.ts
644
+ function makeSpec(spec) {
645
+ return Object.freeze(spec);
646
+ }
647
+ const CREATE_SPEC = makeSpec({
648
+ buildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),
649
+ methodDefaults: CREATE_METHOD_DEFAULTS,
650
+ methodKind: "create",
651
+ operationLimit: CREATE_OPERATION_LIMIT,
652
+ parse: parseSortedMapItemResponse,
653
+ requiredScopes: CREATE_REQUIRED_SCOPES
654
+ });
655
+ const DELETE_SPEC = makeSpec({
656
+ buildRequest: (parameters) => okRequest(buildDeleteRequest(parameters)),
657
+ methodDefaults: IDEMPOTENT_METHOD_DEFAULTS,
658
+ methodKind: "idempotent",
659
+ operationLimit: DELETE_OPERATION_LIMIT,
660
+ parse: parseEmptyResponse,
661
+ requiredScopes: DELETE_REQUIRED_SCOPES
662
+ });
663
+ const GET_SPEC = makeSpec({
664
+ buildRequest: (parameters) => okRequest(buildGetRequest(parameters)),
665
+ methodDefaults: IDEMPOTENT_METHOD_DEFAULTS,
666
+ methodKind: "idempotent",
667
+ operationLimit: GET_OPERATION_LIMIT,
668
+ parse: parseSortedMapItemResponse,
669
+ requiredScopes: GET_REQUIRED_SCOPES
670
+ });
671
+ const LIST_SPEC = makeSpec({
672
+ buildRequest: (parameters) => okRequest(buildListRequest(parameters)),
673
+ methodDefaults: IDEMPOTENT_METHOD_DEFAULTS,
674
+ methodKind: "idempotent",
675
+ operationLimit: LIST_OPERATION_LIMIT,
676
+ parse: parseListResponse,
677
+ requiredScopes: LIST_REQUIRED_SCOPES
678
+ });
679
+ const UPDATE_SPEC = makeSpec({
680
+ buildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),
681
+ methodDefaults: IDEMPOTENT_METHOD_DEFAULTS,
682
+ methodKind: "idempotent",
683
+ operationLimit: UPDATE_OPERATION_LIMIT,
684
+ parse: parseSortedMapItemResponse,
685
+ requiredScopes: UPDATE_REQUIRED_SCOPES
686
+ });
687
+ /**
688
+ * Operation Group on `StorageClient` that exposes the memory-store
689
+ * sorted-map endpoints. Sorted maps are ordered collections of
690
+ * (id, value, sortKey) triples; consumers create, read, update, list,
691
+ * and delete items keyed by a caller-supplied identifier and ordered
692
+ * by an optional string or numeric sort key.
693
+ */
694
+ var MemoryStoreSortedMapsGroup = class {
695
+ #inner;
696
+ /**
697
+ * Wraps the shared {@link ResourceClient} so the Operation Group
698
+ * routes calls through the same retry, hooks, and rate-limit queues
699
+ * as the rest of the parent client.
700
+ *
701
+ * @param inner - The shared {@link ResourceClient} owned by the
702
+ * parent client.
703
+ */
704
+ constructor(inner) {
705
+ this.#inner = inner;
706
+ }
707
+ /**
708
+ * Creates a single item in a sorted map. The sorted map is
709
+ * auto-created on first use; the map identifier is any string the
710
+ * caller picks. Items are keyed by `itemId` (case-sensitive) and
711
+ * ordered by an optional `sortKey`. Items expire and are removed
712
+ * automatically after `ttl` seconds, or after a server-default
713
+ * lifetime when omitted.
714
+ *
715
+ * On 5xx, create does not retry: Roblox Open Cloud has no
716
+ * idempotency-key support, so a retry of a transient failure risks
717
+ * producing a duplicate item.
718
+ *
719
+ * @param parameters - Universe, sorted-map, item identifiers, the
720
+ * value to store, and optional `sortKey` and `ttl`.
721
+ * @param options - Optional per-request overrides (e.g. A different
722
+ * {@link OpenCloudClientOptions.apiKey} for this call only).
723
+ * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}
724
+ * or the {@link OpenCloudError} that caused the request to fail.
725
+ */
726
+ async create(parameters, options) {
727
+ return this.#inner.execute({
728
+ options,
729
+ parameters,
730
+ spec: CREATE_SPEC
731
+ });
732
+ }
733
+ /**
734
+ * Removes a single item from a sorted map. The call is idempotent:
735
+ * a second `delete` against the same item is a no-op once the
736
+ * server has dropped the row. The retry policy retries both 429
737
+ * and 5xx.
738
+ *
739
+ * @param parameters - Universe, sorted-map, and item identifiers.
740
+ * @param options - Optional per-request overrides.
741
+ * @returns A {@link Result} wrapping `undefined` on success or the
742
+ * {@link OpenCloudError} that caused the request to fail.
743
+ */
744
+ async delete(parameters, options) {
745
+ return this.#inner.execute({
746
+ options,
747
+ parameters,
748
+ spec: DELETE_SPEC
749
+ });
750
+ }
751
+ /**
752
+ * Reads a single item from a sorted map. Returns the parsed
753
+ * {@link SortedMapItem} with the server-recorded `etag` for use in
754
+ * subsequent conditional updates (once the SDK begins emitting
755
+ * `If-Match`; see the package README).
756
+ *
757
+ * @param parameters - Universe, sorted-map, and item identifiers.
758
+ * @param options - Optional per-request overrides.
759
+ * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}
760
+ * or the {@link OpenCloudError} that caused the request to fail.
761
+ */
762
+ async get(parameters, options) {
763
+ return this.#inner.execute({
764
+ options,
765
+ parameters,
766
+ spec: GET_SPEC
767
+ });
768
+ }
769
+ /**
770
+ * Lists items in a sorted map. The server caps `maxPageSize` at
771
+ * `100` and defaults it to `1` when omitted, so callers explicitly
772
+ * pass `maxPageSize` to retrieve more than a single item per page.
773
+ * The `filter` parameter accepts a CEL expression on `id` and
774
+ * `sortKey` (operators `<`, `>`, `&&` only).
775
+ *
776
+ * @param parameters - Universe and sorted-map identifiers, plus
777
+ * optional pagination and filter parameters.
778
+ * @param options - Optional per-request overrides.
779
+ * @returns A {@link Result} wrapping the parsed
780
+ * {@link ListSortedMapItemsResult} or the {@link OpenCloudError}
781
+ * that caused the request to fail.
782
+ */
783
+ async list(parameters, options) {
784
+ return this.#inner.execute({
785
+ options,
786
+ parameters,
787
+ spec: LIST_SPEC
788
+ });
789
+ }
790
+ /**
791
+ * Updates a sorted-map item under PATCH semantics: omitted body
792
+ * fields are left unchanged on the server, supplied fields replace
793
+ * their existing values. Passing `allowMissing: true` creates the
794
+ * item when no row exists instead of returning 404.
795
+ *
796
+ * Retries 5xx because PATCH with the same body produces the same
797
+ * server state.
798
+ *
799
+ * @param parameters - Universe, sorted-map, and item identifiers,
800
+ * plus any subset of `value`, `ttl`, `sortKey`, and
801
+ * `allowMissing`.
802
+ * @param options - Optional per-request overrides.
803
+ * @returns A {@link Result} wrapping the parsed {@link SortedMapItem}
804
+ * or the {@link OpenCloudError} that caused the request to fail.
805
+ */
806
+ async update(parameters, options) {
807
+ return this.#inner.execute({
808
+ options,
809
+ parameters,
810
+ spec: UPDATE_SPEC
811
+ });
812
+ }
813
+ };
814
+ //#endregion
333
815
  //#region src/resources/storage/client.ts
334
816
  /**
335
817
  * Public client for the Roblox Open Cloud `Data and memory stores`
336
818
  * Feature. Today it covers memory-store queues via the
337
- * {@link StorageClient.queues} Operation Group; future Operation
338
- * Groups for sorted maps and data stores slot in as siblings on the
339
- * same client.
819
+ * {@link StorageClient.queues} Operation Group and memory-store sorted
820
+ * maps via the {@link StorageClient.sortedMaps} Operation Group; a
821
+ * future data-stores Operation Group slots in as a sibling on the same
822
+ * client.
340
823
  *
341
824
  * Every method returns a `Result` so callers handle failure
342
825
  * explicitly; no thrown error ever escapes the client.
@@ -353,6 +836,8 @@ var MemoryStoreQueuesGroup = class {
353
836
  var StorageClient = class {
354
837
  /** Memory-store queue Operation Group. */
355
838
  queues;
839
+ /** Memory-store sorted-map Operation Group. */
840
+ sortedMaps;
356
841
  /**
357
842
  * Creates a new {@link StorageClient}. Configuration is frozen on
358
843
  * construction; per-request overrides are accepted on each method.
@@ -362,6 +847,7 @@ var StorageClient = class {
362
847
  constructor(options) {
363
848
  const inner = new ResourceClient(options);
364
849
  this.queues = new MemoryStoreQueuesGroup(inner);
850
+ this.sortedMaps = new MemoryStoreSortedMapsGroup(inner);
365
851
  }
366
852
  };
367
853
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"storage.mjs","names":["#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/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 { OpenCloudClientOptions } from \"../../client/types.ts\";\nimport { ResourceClient } from \"../../internal/resource-client.ts\";\nimport { MemoryStoreQueuesGroup } from \"./queues-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; future Operation\n * Groups for sorted maps and data stores slot in as siblings on the\n * same 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\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\t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,CAAC;;;;;;;;AASF,IAAa,yBAAb,MAAoC;CACnC;;;;;;;;;CAUA,YAAY,OAAuB;AAClC,QAAA,QAAc;;;;;;;;;;;;;;;;;;;;;;CAuBf,MAAa,QACZ,YACA,SACiD;AACjD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAc,CAAC;;;;;;;;;;;;;;;;;;;CAoBxE,MAAa,QACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAc,CAAC;;;;;;;;;;;;;;;;;CAkBxE,MAAa,QACZ,YACA,SAC6C;AAC7C,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;AC5IzE,IAAa,gBAAb,MAA2B;;CAE1B;;;;;;;CAQA,YAAY,SAAiC;EAC5C,MAAM,QAAQ,IAAI,eAAe,QAAQ;AACzC,OAAK,SAAS,IAAI,uBAAuB,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);\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,KAAK,eAAe;CAC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AuB;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrock-rbx/ocale",
3
- "version": "0.1.0-beta.7",
3
+ "version": "0.1.0-beta.9",
4
4
  "description": "Roblox Open Cloud API client",
5
5
  "keywords": [
6
6
  "api",
@@ -54,8 +54,8 @@
54
54
  "typescript": "npm:@typescript/typescript6@6.0.1",
55
55
  "vitest": "4.1.5",
56
56
  "@bedrock-rbx/testing": "0.0.0",
57
- "@bedrock-rbx/vite-config": "0.0.0",
58
- "@bedrock-rbx/typescript-config": "0.0.0"
57
+ "@bedrock-rbx/typescript-config": "0.0.0",
58
+ "@bedrock-rbx/vite-config": "0.0.0"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=24.12.0",