@bedrock-rbx/ocale 0.1.0-beta.1 → 0.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/badges.d.mts +86 -3
- package/dist/badges.d.mts.map +1 -1
- package/dist/badges.mjs +114 -6
- package/dist/badges.mjs.map +1 -1
- package/dist/data.generated-DOaDx6J0.d.mts +485 -0
- package/dist/data.generated-DOaDx6J0.d.mts.map +1 -0
- package/dist/developer-products.d.mts +14 -5
- package/dist/developer-products.d.mts.map +1 -1
- package/dist/developer-products.mjs +6 -5
- package/dist/developer-products.mjs.map +1 -1
- package/dist/game-passes.d.mts +83 -2
- package/dist/game-passes.d.mts.map +1 -1
- package/dist/game-passes.mjs +112 -5
- package/dist/game-passes.mjs.map +1 -1
- package/dist/index.d.mts +75 -64
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/is-date-time-string-Ds8Ew-Xa.mjs +19 -0
- package/dist/is-date-time-string-Ds8Ew-Xa.mjs.map +1 -0
- package/dist/locales.d.mts +2 -0
- package/dist/locales.mjs +512 -0
- package/dist/locales.mjs.map +1 -0
- package/dist/luau-execution.d.mts +149 -0
- package/dist/luau-execution.d.mts.map +1 -0
- package/dist/luau-execution.mjs +164 -0
- package/dist/luau-execution.mjs.map +1 -0
- package/dist/places.d.mts +87 -8
- package/dist/places.d.mts.map +1 -1
- package/dist/places.mjs +58 -13
- package/dist/places.mjs.map +1 -1
- package/dist/poll-timeout-BdUcWv52.mjs +79 -0
- package/dist/poll-timeout-BdUcWv52.mjs.map +1 -0
- package/dist/polling-Cc50rgl6.d.mts +253 -0
- package/dist/polling-Cc50rgl6.d.mts.map +1 -0
- package/dist/polling-helpers-BVkmr6C7.mjs +636 -0
- package/dist/polling-helpers-BVkmr6C7.mjs.map +1 -0
- package/dist/{price-information-CmpscMc4.mjs → price-information-DFf89abd.mjs} +2 -2
- package/dist/{price-information-CmpscMc4.mjs.map → price-information-DFf89abd.mjs.map} +1 -1
- package/dist/rate-limit-BSbFNSGT.d.mts +92 -0
- package/dist/rate-limit-BSbFNSGT.d.mts.map +1 -0
- package/dist/{rate-limit-BBU_4xnZ.mjs → rate-limit-CKfuhxT1.mjs} +11 -3
- package/dist/rate-limit-CKfuhxT1.mjs.map +1 -0
- package/dist/{resource-client-CaS_j3yg.mjs → resource-client-opC6BUkL.mjs} +78 -15
- package/dist/resource-client-opC6BUkL.mjs.map +1 -0
- package/dist/storage.d.mts +380 -0
- package/dist/storage.d.mts.map +1 -0
- package/dist/storage.mjs +371 -0
- package/dist/storage.mjs.map +1 -0
- package/dist/{to-blob-1BtHsDGK.mjs → to-blob-DHN7UoM8.mjs} +1 -1
- package/dist/{to-blob-1BtHsDGK.mjs.map → to-blob-DHN7UoM8.mjs.map} +1 -1
- package/dist/{types-YCTsM8Qd.d.mts → types-DUzm6maA.d.mts} +1 -1
- package/dist/{types-YCTsM8Qd.d.mts.map → types-DUzm6maA.d.mts.map} +1 -1
- package/dist/universes.d.mts +37 -12
- package/dist/universes.d.mts.map +1 -1
- package/dist/universes.mjs +6 -5
- package/dist/universes.mjs.map +1 -1
- package/dist/{validation-CTZzJhmd.mjs → validation-VImVHzxg.mjs} +2 -2
- package/dist/validation-VImVHzxg.mjs.map +1 -0
- package/package.json +7 -3
- package/dist/rate-limit-BBU_4xnZ.mjs.map +0 -1
- package/dist/resource-client-CaS_j3yg.mjs.map +0 -1
- package/dist/validation-CTZzJhmd.mjs.map +0 -1
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, n as HttpRequest, r as HttpResponse, s as RequestOptions, u as SleepFunc } from "./types-DUzm6maA.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/domains/cloud-v2/memory-store-queues/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Caller-supplied input for the `enqueue` method on `StorageClient.queues`.
|
|
6
|
+
* Mirrors `Cloud_CreateMemoryStoreQueueItem` on the Open Cloud API.
|
|
7
|
+
*/
|
|
8
|
+
interface EnqueueQueueItemParameters {
|
|
9
|
+
/**
|
|
10
|
+
* Opaque queue payload. Round-trips as JSON, including nested `null`
|
|
11
|
+
* values inside objects and arrays. The top-level value cannot be
|
|
12
|
+
* `null`: the server rejects null payloads with a 400, so the type
|
|
13
|
+
* forbids it at compile time.
|
|
14
|
+
*/
|
|
15
|
+
readonly data: Exclude<JSONValue, null>;
|
|
16
|
+
/**
|
|
17
|
+
* Optional priority. Higher values are dequeued first; equal priorities
|
|
18
|
+
* preserve insertion order. Omitted entries are inserted at the back of
|
|
19
|
+
* the queue.
|
|
20
|
+
*/
|
|
21
|
+
readonly priority?: number;
|
|
22
|
+
/** Stringified queue identifier; the queue is auto-created on first use. */
|
|
23
|
+
readonly queueId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional time-to-live in seconds. After this many seconds the item is
|
|
26
|
+
* automatically removed from the queue. Omitted entries inherit the
|
|
27
|
+
* server-default TTL.
|
|
28
|
+
*/
|
|
29
|
+
readonly ttl?: number;
|
|
30
|
+
/** Stringified ID of the universe that owns the queue. */
|
|
31
|
+
readonly universeId: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Parsed representation of a memory-store queue item, as returned by the
|
|
35
|
+
* Open Cloud `Cloud_CreateMemoryStoreQueueItem` and (inside the array)
|
|
36
|
+
* `Cloud_ReadMemoryStoreQueueItems` endpoints.
|
|
37
|
+
*/
|
|
38
|
+
interface QueueItem {
|
|
39
|
+
/** Server-generated item identifier, parsed from the wire `path`. */
|
|
40
|
+
readonly id: string;
|
|
41
|
+
/**
|
|
42
|
+
* Opaque queue payload. Nested `null` values inside the JSON shape are
|
|
43
|
+
* preserved verbatim; only the top level is constrained.
|
|
44
|
+
*/
|
|
45
|
+
readonly data: Exclude<JSONValue, null>;
|
|
46
|
+
/** Timestamp at which the server removes the item from the queue. */
|
|
47
|
+
readonly expiresAt: Date;
|
|
48
|
+
/** Priority recorded on the item, or `undefined` when none was set. */
|
|
49
|
+
readonly priority: number | undefined;
|
|
50
|
+
/** Stringified queue identifier, parsed from the wire `path`. */
|
|
51
|
+
readonly queueId: string;
|
|
52
|
+
/** Stringified universe identifier, parsed from the wire `path`. */
|
|
53
|
+
readonly universeId: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Caller-supplied input for the `dequeue` method on
|
|
57
|
+
* `StorageClient.queues`. Mirrors `Cloud_ReadMemoryStoreQueueItems`.
|
|
58
|
+
*/
|
|
59
|
+
interface DequeueQueueItemsParameters {
|
|
60
|
+
/**
|
|
61
|
+
* If `true`, the server returns 404 when fewer than `count` items
|
|
62
|
+
* are available. Defaults to `false`, in which case the server
|
|
63
|
+
* returns whatever subset is currently at the front of the queue.
|
|
64
|
+
*/
|
|
65
|
+
readonly allOrNothing?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Number of items to read from the front of the queue. Defaults to
|
|
68
|
+
* `1`; values above `200` are clamped server-side.
|
|
69
|
+
*/
|
|
70
|
+
readonly count?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Number of seconds the dequeued items remain invisible to
|
|
73
|
+
* subsequent reads. Items not acknowledged via `discard` reappear
|
|
74
|
+
* once the window elapses. Defaults to `30` seconds server-side.
|
|
75
|
+
*/
|
|
76
|
+
readonly invisibilityWindow?: number;
|
|
77
|
+
/** Stringified queue identifier. */
|
|
78
|
+
readonly queueId: string;
|
|
79
|
+
/** Stringified ID of the universe that owns the queue. */
|
|
80
|
+
readonly universeId: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Parsed result of a successful `Cloud_ReadMemoryStoreQueueItems`
|
|
84
|
+
* response. The `readId` value must be passed to a subsequent
|
|
85
|
+
* `discard` call to acknowledge the items; otherwise the items reappear
|
|
86
|
+
* once the invisibility window elapses.
|
|
87
|
+
*/
|
|
88
|
+
interface DequeueResult {
|
|
89
|
+
/** Items dequeued from the front of the queue, in dequeue order. */
|
|
90
|
+
readonly items: ReadonlyArray<QueueItem>;
|
|
91
|
+
/**
|
|
92
|
+
* Identifier of the dequeue operation. Pass this to `discard` to
|
|
93
|
+
* remove the items from the queue permanently.
|
|
94
|
+
*/
|
|
95
|
+
readonly readId: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Caller-supplied input for the `discard` method on
|
|
99
|
+
* `StorageClient.queues`. Mirrors `Cloud_DiscardMemoryStoreQueueItems`.
|
|
100
|
+
* Acknowledging a `readId` removes the dequeued batch from the queue
|
|
101
|
+
* permanently; without `discard`, the items reappear once their
|
|
102
|
+
* invisibility window elapses.
|
|
103
|
+
*/
|
|
104
|
+
interface DiscardQueueItemsParameters {
|
|
105
|
+
/** Stringified queue identifier. */
|
|
106
|
+
readonly queueId: string;
|
|
107
|
+
/** Identifier returned by a prior `dequeue` call. */
|
|
108
|
+
readonly readId: string;
|
|
109
|
+
/** Stringified ID of the universe that owns the queue. */
|
|
110
|
+
readonly universeId: string;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/internal/http/rate-limit-queue.d.ts
|
|
114
|
+
/**
|
|
115
|
+
* Identifies and bounds a single Roblox Open Cloud operation for rate
|
|
116
|
+
* limiting, e.g. `{ operationKey: "game-passes.create", maxPerSecond: 5 }`.
|
|
117
|
+
*/
|
|
118
|
+
interface OperationLimit {
|
|
119
|
+
/** Maximum sustained request rate in requests per second. */
|
|
120
|
+
readonly maxPerSecond: number;
|
|
121
|
+
/**
|
|
122
|
+
* Stable identifier for the operation (e.g. "game-passes.create"). Not
|
|
123
|
+
* consumed by the queue itself; callers use it to key per-operation
|
|
124
|
+
* queues in a registry (see GamePassesClient).
|
|
125
|
+
*/
|
|
126
|
+
readonly operationKey: string;
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/internal/http/retry.d.ts
|
|
130
|
+
/**
|
|
131
|
+
* Fully-resolved retry config shape that {@link mergeConfig} and
|
|
132
|
+
* {@link shouldRetry} operate on. Fields are required because this represents
|
|
133
|
+
* the post-defaulting, internal view — callers should supply every field (or
|
|
134
|
+
* resolve them via a test factory / client constructor). The partial,
|
|
135
|
+
* user-facing type lives on client construction options; method defaults and
|
|
136
|
+
* per-request overrides use `Partial<RetryResolvable>`.
|
|
137
|
+
*/
|
|
138
|
+
interface RetryResolvable {
|
|
139
|
+
/** Roblox Open Cloud API key. */
|
|
140
|
+
readonly apiKey: string;
|
|
141
|
+
/** Base URL for the Open Cloud API. */
|
|
142
|
+
readonly baseUrl: string;
|
|
143
|
+
/** Maximum retry attempts before giving up. */
|
|
144
|
+
readonly maxRetries: number;
|
|
145
|
+
/** Status codes that are eligible for retry. */
|
|
146
|
+
readonly retryableStatuses: ReadonlyArray<number>;
|
|
147
|
+
/** Fallback delay function when no server hint is available. */
|
|
148
|
+
readonly retryDelay: (attempt: number) => number;
|
|
149
|
+
/** Per-request timeout in milliseconds. */
|
|
150
|
+
readonly timeout: number;
|
|
151
|
+
}
|
|
152
|
+
/** Kind of HTTP method the merge is being performed for. */
|
|
153
|
+
type MethodKind = "create" | "idempotent";
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/internal/resource-client.d.ts
|
|
156
|
+
/**
|
|
157
|
+
* Describes a single resource method's shape for dispatch through
|
|
158
|
+
* `ResourceClient.execute`. Each resource client declares one module-level
|
|
159
|
+
* constant per public method; that constant binds the four resource-specific
|
|
160
|
+
* values (request builder, response parser, retry-policy method kind,
|
|
161
|
+
* operation-level rate limit) and flows through `execute` uniformly.
|
|
162
|
+
*
|
|
163
|
+
* @template P - The resource-specific parameter shape the builder
|
|
164
|
+
* accepts.
|
|
165
|
+
* @template T - The resource-specific parsed success type the parser
|
|
166
|
+
* produces.
|
|
167
|
+
*/
|
|
168
|
+
interface ResourceMethodSpec<P, T> {
|
|
169
|
+
/**
|
|
170
|
+
* Builds the pure {@link HttpRequest} for a single call. Returns a
|
|
171
|
+
* {@link Result} so a builder can short-circuit with a local error
|
|
172
|
+
* (typically a {@link OpenCloudError} subclass such as `ValidationError`)
|
|
173
|
+
* before any HTTP, queue, or retry work happens. Builders that cannot
|
|
174
|
+
* fail wrap their return as `{ data: request, success: true }`.
|
|
175
|
+
*/
|
|
176
|
+
readonly buildRequest: (parameters: P) => Result<HttpRequest, OpenCloudError>;
|
|
177
|
+
/** Method-level retry defaults merged into the resolved config. */
|
|
178
|
+
readonly methodDefaults: Partial<RetryResolvable>;
|
|
179
|
+
/**
|
|
180
|
+
* Method kind, controlling merge precedence: `"create"` lets method
|
|
181
|
+
* defaults win over client config so create safety cannot be relaxed
|
|
182
|
+
* silently; `"idempotent"` lets client config win over method defaults
|
|
183
|
+
* so consumers can loosen retry globally.
|
|
184
|
+
*/
|
|
185
|
+
readonly methodKind: MethodKind;
|
|
186
|
+
/** Operation-level rate limit, keyed into the client's per-key queue map. */
|
|
187
|
+
readonly operationLimit: OperationLimit;
|
|
188
|
+
/**
|
|
189
|
+
* Converts the full {@link HttpResponse} into the resource-specific
|
|
190
|
+
* parsed shape. Takes the whole response (body, status, headers) so
|
|
191
|
+
* future parsers can read headers without widening the signature.
|
|
192
|
+
*/
|
|
193
|
+
readonly parse: (response: HttpResponse) => Result<T, OpenCloudError>;
|
|
194
|
+
/**
|
|
195
|
+
* Open Cloud scopes the API key or OAuth token must carry for this
|
|
196
|
+
* method, sourced from the vendored OpenAPI schema's `x-roblox-scopes`.
|
|
197
|
+
* When set, a 401 or 403 ApiError from the upstream call is upgraded to
|
|
198
|
+
* a {@link PermissionError} carrying these scopes alongside
|
|
199
|
+
* {@link OperationLimit.operationKey}, so callers can name the missing
|
|
200
|
+
* scope instead of just the HTTP status. Optional so test specs and
|
|
201
|
+
* not-yet-wired resources can opt out.
|
|
202
|
+
*/
|
|
203
|
+
readonly requiredScopes?: ReadonlyArray<string>;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Single-argument bundle consumed by `ResourceClient.execute`: the per-method
|
|
207
|
+
* spec, the resource-specific parameters, and optional per-request config
|
|
208
|
+
* overrides.
|
|
209
|
+
*
|
|
210
|
+
* @template P - The resource-specific parameter shape the builder accepts.
|
|
211
|
+
* @template T - The resource-specific parsed success type the parser produces.
|
|
212
|
+
*/
|
|
213
|
+
interface ExecuteCall<P, T> {
|
|
214
|
+
/** Optional per-request config overrides. */
|
|
215
|
+
readonly options?: RequestOptions | undefined;
|
|
216
|
+
/** Resource-specific request parameters. */
|
|
217
|
+
readonly parameters: P;
|
|
218
|
+
/** Per-method binding of builder, parser, method kind, and operation limit. */
|
|
219
|
+
readonly spec: ResourceMethodSpec<P, T>;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Wraps an infallible request build as a {@link Result}-returning
|
|
223
|
+
* `buildRequest` callback compatible with {@link ResourceMethodSpec}.
|
|
224
|
+
* Use from a resource client whose builder cannot fail; resource clients
|
|
225
|
+
* with local validation should construct the {@link Result} directly.
|
|
226
|
+
*
|
|
227
|
+
* @param request - The pre-built {@link HttpRequest}.
|
|
228
|
+
* @returns A success Result wrapping the request.
|
|
229
|
+
*/
|
|
230
|
+
/**
|
|
231
|
+
* Internal orchestrator shared by every Open Cloud resource client. Holds
|
|
232
|
+
* the frozen client config, observability hooks, injected HTTP client and
|
|
233
|
+
* sleep, and the per-effective-key rate-limit queue registry. Resource
|
|
234
|
+
* classes compose one instance and dispatch every public method through
|
|
235
|
+
* {@link ResourceClient.execute} with a per-method {@link ResourceMethodSpec}.
|
|
236
|
+
* Not exported from any package subpath; reachable only via sibling
|
|
237
|
+
* `src/resources/**` modules in this package.
|
|
238
|
+
*/
|
|
239
|
+
declare class ResourceClient {
|
|
240
|
+
#private;
|
|
241
|
+
/**
|
|
242
|
+
* Creates a new {@link ResourceClient}. Resolves the injected HTTP
|
|
243
|
+
* client and sleep (defaulting to fetch + `setTimeout`) and freezes the
|
|
244
|
+
* merged client config so subsequent calls cannot mutate it.
|
|
245
|
+
*
|
|
246
|
+
* @param options - Client-level configuration including the API key
|
|
247
|
+
* and optional construction-time test seams.
|
|
248
|
+
*/
|
|
249
|
+
constructor(options: OpenCloudClientOptions);
|
|
250
|
+
/**
|
|
251
|
+
* Dispatches a single resource-method call. Merges the frozen client
|
|
252
|
+
* config with the method's `methodDefaults` and the caller's optional
|
|
253
|
+
* per-request `options`, routes through the effective-apiKey rate-limit
|
|
254
|
+
* queue, runs the retry loop, and finally parses the response with the
|
|
255
|
+
* spec's parser.
|
|
256
|
+
*
|
|
257
|
+
* @param call - The per-method spec, resource-specific parameters, and
|
|
258
|
+
* optional per-request overrides.
|
|
259
|
+
* @returns The parsed success payload or the {@link OpenCloudError} that
|
|
260
|
+
* caused the request to fail. Never throws.
|
|
261
|
+
*/
|
|
262
|
+
execute<P, T>(call: ExecuteCall<P, T>): Promise<Result<T, OpenCloudError>>;
|
|
263
|
+
/**
|
|
264
|
+
* Returns the sleep function used by this client instance.
|
|
265
|
+
*
|
|
266
|
+
* @returns The sleep function injected at construction time.
|
|
267
|
+
*/
|
|
268
|
+
get sleep(): SleepFunc;
|
|
269
|
+
}
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/resources/storage/queues-group.d.ts
|
|
272
|
+
/**
|
|
273
|
+
* Operation Group on `StorageClient` that exposes the memory-store
|
|
274
|
+
* queue endpoints. Queues are FIFO collections of opaque JSON values
|
|
275
|
+
* with optional priority and TTL; consumers enqueue items, dequeue
|
|
276
|
+
* them in batches, and acknowledge processed batches with a read
|
|
277
|
+
* identifier.
|
|
278
|
+
*/
|
|
279
|
+
declare class MemoryStoreQueuesGroup {
|
|
280
|
+
#private;
|
|
281
|
+
/**
|
|
282
|
+
* Wraps the shared {@link ResourceClient} so the Operation Group
|
|
283
|
+
* routes calls through the same retry, hooks, and rate-limit queues
|
|
284
|
+
* as the rest of the parent client.
|
|
285
|
+
*
|
|
286
|
+
* @param inner - The shared {@link ResourceClient} owned by the
|
|
287
|
+
* parent client.
|
|
288
|
+
*/
|
|
289
|
+
constructor(inner: ResourceClient);
|
|
290
|
+
/**
|
|
291
|
+
* Dequeues up to `count` items from the front of the queue. Items
|
|
292
|
+
* returned become invisible to subsequent reads for
|
|
293
|
+
* `invisibilityWindow` seconds (default 30 server-side); they
|
|
294
|
+
* reappear once the window elapses unless acknowledged via
|
|
295
|
+
* `discard` with the returned `readId`.
|
|
296
|
+
*
|
|
297
|
+
* On 5xx, dequeue does not retry: the server may have set
|
|
298
|
+
* invisibility on a batch before the response failed, so a retry
|
|
299
|
+
* would return a *different* batch and the first one is lost until
|
|
300
|
+
* the window expires. Callers that can detect duplicates externally
|
|
301
|
+
* may opt back into 5xx retry per call by passing `retryableStatuses`
|
|
302
|
+
* on `options`.
|
|
303
|
+
*
|
|
304
|
+
* @param parameters - Universe and queue identifiers, plus optional
|
|
305
|
+
* `count`, `allOrNothing`, and `invisibilityWindow`.
|
|
306
|
+
* @param options - Optional per-request overrides.
|
|
307
|
+
* @returns A {@link Result} wrapping the parsed {@link DequeueResult}
|
|
308
|
+
* or the {@link OpenCloudError} that caused the request to fail.
|
|
309
|
+
*/
|
|
310
|
+
dequeue(parameters: DequeueQueueItemsParameters, options?: RequestOptions): Promise<Result<DequeueResult, OpenCloudError>>;
|
|
311
|
+
/**
|
|
312
|
+
* Acknowledges a dequeued batch of items, removing them from the
|
|
313
|
+
* queue permanently. Pass the `readId` returned from the prior
|
|
314
|
+
* `dequeue` call. Without `discard`, the items reappear once the
|
|
315
|
+
* invisibility window elapses.
|
|
316
|
+
*
|
|
317
|
+
* The call is idempotent: a second `discard` with the same `readId`
|
|
318
|
+
* is a no-op once the batch has been acknowledged. The retry policy
|
|
319
|
+
* therefore retries both 429 and 5xx.
|
|
320
|
+
*
|
|
321
|
+
* @param parameters - Universe and queue identifiers, plus the
|
|
322
|
+
* `readId` returned from a prior dequeue.
|
|
323
|
+
* @param options - Optional per-request overrides.
|
|
324
|
+
* @returns A {@link Result} wrapping `undefined` on success (the
|
|
325
|
+
* server returns an empty body) or the {@link OpenCloudError}
|
|
326
|
+
* that caused the request to fail.
|
|
327
|
+
*/
|
|
328
|
+
discard(parameters: DiscardQueueItemsParameters, options?: RequestOptions): Promise<Result<undefined, OpenCloudError>>;
|
|
329
|
+
/**
|
|
330
|
+
* Enqueues a single item onto a memory-store queue. The queue is
|
|
331
|
+
* auto-created on first use; the queue identifier is any string the
|
|
332
|
+
* caller picks. Items with higher `priority` values are dequeued
|
|
333
|
+
* first; equal priorities preserve insertion order. Items expire
|
|
334
|
+
* and are removed automatically after `ttl` seconds, or after a
|
|
335
|
+
* server-default lifetime when omitted.
|
|
336
|
+
*
|
|
337
|
+
* @param parameters - Universe and queue identifiers, the opaque
|
|
338
|
+
* payload, and optional `priority` and `ttl`.
|
|
339
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
340
|
+
* {@link OpenCloudClientOptions.apiKey} for this call only).
|
|
341
|
+
* @returns A {@link Result} wrapping the parsed {@link QueueItem} or
|
|
342
|
+
* the {@link OpenCloudError} that caused the request to fail.
|
|
343
|
+
*/
|
|
344
|
+
enqueue(parameters: EnqueueQueueItemParameters, options?: RequestOptions): Promise<Result<QueueItem, OpenCloudError>>;
|
|
345
|
+
}
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region src/resources/storage/client.d.ts
|
|
348
|
+
/**
|
|
349
|
+
* Public client for the Roblox Open Cloud `Data and memory stores`
|
|
350
|
+
* 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.
|
|
354
|
+
*
|
|
355
|
+
* Every method returns a `Result` so callers handle failure
|
|
356
|
+
* explicitly; no thrown error ever escapes the client.
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
*
|
|
360
|
+
* ```ts
|
|
361
|
+
* import { StorageClient } from "@bedrock-rbx/ocale/storage";
|
|
362
|
+
*
|
|
363
|
+
* const client = new StorageClient({ apiKey: "your-key" });
|
|
364
|
+
* expect(client).toBeInstanceOf(StorageClient);
|
|
365
|
+
* ```
|
|
366
|
+
*/
|
|
367
|
+
declare class StorageClient {
|
|
368
|
+
/** Memory-store queue Operation Group. */
|
|
369
|
+
readonly queues: MemoryStoreQueuesGroup;
|
|
370
|
+
/**
|
|
371
|
+
* Creates a new {@link StorageClient}. Configuration is frozen on
|
|
372
|
+
* construction; per-request overrides are accepted on each method.
|
|
373
|
+
*
|
|
374
|
+
* @param options - Client-level configuration including the API key.
|
|
375
|
+
*/
|
|
376
|
+
constructor(options: OpenCloudClientOptions);
|
|
377
|
+
}
|
|
378
|
+
//#endregion
|
|
379
|
+
export { type DequeueQueueItemsParameters, type DequeueResult, type DiscardQueueItemsParameters, type EnqueueQueueItemParameters, type QueueItem, StorageClient };
|
|
380
|
+
//# sourceMappingURL=storage.d.mts.map
|
|
@@ -0,0 +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;;;;AE3C/B;WFgDU,MAAA;AAAA;;;;;;AGxDV;;U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