@bedrock-rbx/ocale 0.1.3 → 0.1.4
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 +21 -6
- package/dist/badges.d.mts.map +1 -1
- package/dist/badges.mjs +10 -11
- package/dist/badges.mjs.map +1 -1
- package/dist/developer-products.d.mts +22 -11
- package/dist/developer-products.d.mts.map +1 -1
- package/dist/developer-products.mjs +21 -20
- package/dist/developer-products.mjs.map +1 -1
- package/dist/game-passes.d.mts +5 -5
- package/dist/game-passes.mjs +18 -20
- package/dist/game-passes.mjs.map +1 -1
- package/dist/index.d.mts +9 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/luau-execution.d.mts +5 -3
- package/dist/luau-execution.d.mts.map +1 -1
- package/dist/luau-execution.mjs +22 -18
- package/dist/luau-execution.mjs.map +1 -1
- package/dist/places.d.mts +2 -2
- package/dist/places.d.mts.map +1 -1
- package/dist/places.mjs +31 -31
- package/dist/places.mjs.map +1 -1
- package/dist/{poll-timeout-BfxUWWCZ.mjs → poll-timeout-DXfJVZzR.mjs} +2 -2
- package/dist/{poll-timeout-BfxUWWCZ.mjs.map → poll-timeout-DXfJVZzR.mjs.map} +1 -1
- package/dist/{polling-rj0dGREg.d.mts → polling-CG12rHaz.d.mts} +29 -11
- package/dist/polling-CG12rHaz.d.mts.map +1 -0
- package/dist/{polling-helpers-DkJcWZpp.mjs → polling-helpers-SBN188o5.mjs} +47 -53
- package/dist/polling-helpers-SBN188o5.mjs.map +1 -0
- package/dist/{price-information-ClGhSmgI.mjs → price-information-DziMfTQ6.mjs} +2 -2
- package/dist/{price-information-ClGhSmgI.mjs.map → price-information-DziMfTQ6.mjs.map} +1 -1
- package/dist/{rate-limit-Dh2leqaB.mjs → rate-limit-B20REZEY.mjs} +6 -4
- package/dist/{rate-limit-Dh2leqaB.mjs.map → rate-limit-B20REZEY.mjs.map} +1 -1
- package/dist/{resource-client-CsbYSKwf.mjs → resource-client-rQ9bBn4L.mjs} +138 -62
- package/dist/resource-client-rQ9bBn4L.mjs.map +1 -0
- package/dist/{retry-BEh37aK2.d.mts → retry-DGY51INM.d.mts} +14 -12
- package/dist/{retry-BEh37aK2.d.mts.map → retry-DGY51INM.d.mts.map} +1 -1
- package/dist/{retry-CMzwdn1c.mjs → retry-PmpgEwFN.mjs} +21 -19
- package/dist/retry-PmpgEwFN.mjs.map +1 -0
- package/dist/storage.d.mts +33 -8
- package/dist/storage.d.mts.map +1 -1
- package/dist/storage.mjs +24 -33
- package/dist/storage.mjs.map +1 -1
- package/dist/testing.d.mts +50 -16
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +5 -3
- package/dist/testing.mjs.map +1 -1
- package/dist/{types-CRiJg5EQ.d.mts → types-DXai6-hU.d.mts} +5 -3
- package/dist/{types-CRiJg5EQ.d.mts.map → types-DXai6-hU.d.mts.map} +1 -1
- package/dist/universes.d.mts +7 -4
- package/dist/universes.d.mts.map +1 -1
- package/dist/universes.mjs +20 -25
- package/dist/universes.mjs.map +1 -1
- package/dist/{validation-xJZRa8tX.mjs → validation-BXhEM3OP.mjs} +2 -2
- package/dist/{validation-xJZRa8tX.mjs.map → validation-BXhEM3OP.mjs.map} +1 -1
- package/package.json +4 -3
- package/dist/polling-helpers-DkJcWZpp.mjs.map +0 -1
- package/dist/polling-rj0dGREg.d.mts.map +0 -1
- package/dist/resource-client-CsbYSKwf.mjs.map +0 -1
- package/dist/retry-CMzwdn1c.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as OpenCloudError } from "./types-
|
|
1
|
+
import { d as OpenCloudError } from "./types-DXai6-hU.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/errors/api-error.d.ts
|
|
4
4
|
/**
|
|
@@ -18,10 +18,10 @@ interface ApiErrorOptions extends ErrorOptions {
|
|
|
18
18
|
*/
|
|
19
19
|
elapsedMs?: number | undefined;
|
|
20
20
|
/**
|
|
21
|
-
* Human-readable summary extracted from an HTML gateway error page, set
|
|
22
|
-
* the error body was such a page (an HAProxy-style load-balancer
|
|
23
|
-
* rather than an Open Cloud response. When present, the raw HTML
|
|
24
|
-
* retained on {@link ApiError.details}.
|
|
21
|
+
* Human-readable summary extracted from an HTML gateway error page, set
|
|
22
|
+
* when the error body was such a page (an HAProxy-style load-balancer
|
|
23
|
+
* rejection) rather than an Open Cloud response. When present, the raw HTML
|
|
24
|
+
* is not retained on {@link ApiError.details}.
|
|
25
25
|
*/
|
|
26
26
|
gatewaySummary?: string | undefined;
|
|
27
27
|
/** HTTP method of the request that produced this error. */
|
|
@@ -150,8 +150,8 @@ interface RateLimitErrorOptions extends ErrorOptions {
|
|
|
150
150
|
statusCode?: number | undefined;
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
153
|
-
* Thrown when the Roblox Open Cloud API returns a 429 Too Many Requests
|
|
154
|
-
* Contains the server-suggested retry delay.
|
|
153
|
+
* Thrown when the Roblox Open Cloud API returns a 429 Too Many Requests
|
|
154
|
+
* response. Contains the server-suggested retry delay.
|
|
155
155
|
*
|
|
156
156
|
* @since 0.1.0
|
|
157
157
|
*
|
|
@@ -172,7 +172,9 @@ declare class RateLimitError extends OpenCloudError {
|
|
|
172
172
|
/** Parsed 429 response body, or `undefined` when none was carried. */
|
|
173
173
|
readonly details: JSONValue | undefined;
|
|
174
174
|
override readonly name = "RateLimitError";
|
|
175
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* Requests left in the throttled window, or `undefined` if not reported.
|
|
177
|
+
*/
|
|
176
178
|
readonly remaining: number | undefined;
|
|
177
179
|
readonly retryAfterSeconds: number;
|
|
178
180
|
/** HTTP status code that produced the error, or `undefined` if not set. */
|
|
@@ -208,9 +210,9 @@ interface RetryResolvable {
|
|
|
208
210
|
* Codes for transport-level failures eligible for retry: node-style
|
|
209
211
|
* transport codes ({@link findErrorCode}) surfaced as a
|
|
210
212
|
* {@link NetworkError}, plus the synthetic {@link GATEWAY_REJECTED} for a
|
|
211
|
-
* response served by an edge gateway. Not all of them prove the request
|
|
212
|
-
* unprocessed — see {@link TRANSIENT_TRANSPORT_CODES}. Empty for
|
|
213
|
-
* operations by default; consumers opt a create in via a per-request
|
|
213
|
+
* response served by an edge gateway. Not all of them prove the request
|
|
214
|
+
* went unprocessed — see {@link TRANSIENT_TRANSPORT_CODES}. Empty for
|
|
215
|
+
* create operations by default; consumers opt a create in via a per-request
|
|
214
216
|
* override.
|
|
215
217
|
*/
|
|
216
218
|
readonly retryableTransportCodes: ReadonlyArray<string>;
|
|
@@ -245,4 +247,4 @@ declare const TRANSIENT_TRANSPORT_CODES: ReadonlyArray<string>;
|
|
|
245
247
|
type MethodKind = "create" | "idempotent";
|
|
246
248
|
//#endregion
|
|
247
249
|
export { RateLimitErrorOptions as a, ApiError as c, RateLimitError as i, ApiErrorOptions as l, RetryResolvable as n, NetworkError as o, TRANSIENT_TRANSPORT_CODES as r, NetworkErrorOptions as s, MethodKind as t };
|
|
248
|
-
//# sourceMappingURL=retry-
|
|
250
|
+
//# sourceMappingURL=retry-DGY51INM.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry-
|
|
1
|
+
{"version":3,"file":"retry-DGY51INM.d.mts","names":[],"sources":["../src/errors/api-error.ts","../src/errors/network-error.ts","../src/errors/rate-limit.ts","../src/internal/http/retry.ts"],"mappings":";;;;;AAOA;;;UAAiB,eAAA,SAAwB,YAAA;;EAExC,IAAA;;EAEA,OAAA,GAAU,SAAA;EAJ8B;;;;;EAUxC,SAAA;;;;;;;EAOA,cAAA;EAYA;EAVA,MAAA;EAuCD;;;;;EAjCC,eAAA,GAAkB,QAAA,CAAS,MAAA;;EAE3B,UAAA;EA+B6B;EA7B7B,GAAA;AAAA;;;;;;;;;;;;;;;;;;AAiDsC;;;;AC9EvC;;;;;cD0Da,QAAA,SAAiB,cAAA;EAAA,SACb,IAAA;EAAA,SACA,OAAA,EAAS,SAAA;EAAA,SACT,SAAA;EAAA,SACA,cAAA;EAAA,SACA,MAAA;EAAA,kBACS,IAAA;EAAA,SACT,eAAA,EAAiB,QAAA,CAAS,MAAA;EAAA,SAC1B,UAAA;EAAA,SACA,GAAA;;;;;;;;ACvCuB;;EDkDvC,WAAA,CAAY,OAAA,UAAiB,OAAA,EAAS,eAAA;AAAA;;;;;AA9EvC;;;UCAiB,mBAAA,SAA4B,YAAA;;EAE5C,MAAA;;EAEA,GAAA;AAAA;;;;;;;;;;cAYY,YAAA,SAAqB,cAAA;EAAA,SACjB,MAAA;EAAA,kBACS,IAAA;EAAA,SACT,GAAA;EDUhB;AA6BD;;;;;;EC9BC,WAAA,CAAY,OAAA,UAAiB,OAAA,GAAU,mBAAA;AAAA;;;;;AD5BxC;;;UEAiB,qBAAA,SAA8B,YAAA;;;;;;EAM9C,OAAA,GAAU,SAAA;;;;;;;;EAQV,SAAA;;EAEA,iBAAA;;;AFaA;AA6BD;EErCC,UAAA;AAAA;;;;;;;;;;;;;;;;;;;;cAsBY,cAAA,SAAuB,cAAA;;WAEnB,OAAA,EAAS,SAAA;EAAA,kBACA,IAAA;;;AFgCa;WE5BtB,SAAA;EAAA,SACA,iBAAA;;WAEA,UAAA;EDrDA;;;;;;EC6DhB,WAAA,CAAY,OAAA,UAAiB,OAAA,EAAS,qBAAA;AAAA;;;AF7DvC;;;;;;;;AAAA,UGMiB,eAAA;;WAEP,MAAA;;WAEA,OAAA;;WAEA,UAAA;;WAEA,iBAAA,EAAmB,aAAA;;;;;;AHe5B;AA6BD;;;WGlCU,uBAAA,EAAyB,aAAA;;WAEzB,UAAA,GAAa,OAAA;;WAEb,OAAA;AAAA;;;;;;;;;;;;;;;;;;;;AHkD6B;;cG1B1B,yBAAA,EAA2B,aAAA;;KAuE5B,UAAA"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { n as NetworkError, r as ApiError, t as RateLimitError } from "./rate-limit-
|
|
1
|
+
import { n as NetworkError, r as ApiError, t as RateLimitError } from "./rate-limit-B20REZEY.mjs";
|
|
2
2
|
//#region src/errors/permission-error.ts
|
|
3
3
|
/**
|
|
4
4
|
* Thrown when the Roblox Open Cloud API returns a 401 or 403 for an operation
|
|
5
5
|
* whose required scopes are known. Subclass of {@link ApiError} carrying the
|
|
6
|
-
* scope strings the
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* scope strings the operation requires plus the operation key, so a consumer
|
|
7
|
+
* can name them when guiding the user to their API key settings.
|
|
8
|
+
*
|
|
9
|
+
* The scopes are what the operation needs, not a diagnosis of what the
|
|
10
|
+
* credential lacks: a 403 does mean the scopes fall short, but Roblox also
|
|
11
|
+
* answers 401 for a key that is invalid, disabled, or expired. Check
|
|
12
|
+
* {@link ApiError.statusCode} before wording the failure as a missing scope.
|
|
9
13
|
*
|
|
10
14
|
* @since 0.1.0
|
|
11
15
|
*
|
|
@@ -272,18 +276,17 @@ function computeRetryWaitMs(error, options) {
|
|
|
272
276
|
return options.retryDelay(options.attempt);
|
|
273
277
|
}
|
|
274
278
|
/**
|
|
275
|
-
* Decides whether a failed request is eligible for retry. {@link
|
|
276
|
-
* (checked against 429) and {@link ApiError} (checked against
|
|
277
|
-
* are retryable when their status is in `retryableStatuses`.
|
|
278
|
-
* {@link ApiError} carrying a `gatewaySummary` is the exception: it is
|
|
279
|
-
* against {@link GATEWAY_REJECTED} in `retryableTransportCodes`
|
|
280
|
-
* its status is never consulted. A
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* list is empty). All other failures return `false`.
|
|
279
|
+
* Decides whether a failed request is eligible for retry. {@link
|
|
280
|
+
* RateLimitError} (checked against 429) and {@link ApiError} (checked against
|
|
281
|
+
* its `statusCode`) are retryable when their status is in `retryableStatuses`.
|
|
282
|
+
* An {@link ApiError} carrying a `gatewaySummary` is the exception: it is
|
|
283
|
+
* checked against {@link GATEWAY_REJECTED} in `retryableTransportCodes`
|
|
284
|
+
* instead, and its status is never consulted. A {@link NetworkError} is
|
|
285
|
+
* retryable when its transport code ({@link findErrorCode}) is in
|
|
286
|
+
* `retryableTransportCodes`. This is how transient connection resets recover.
|
|
287
|
+
* A self-aborted request timeout ({@link isTimeoutAbort}) carries no transport
|
|
288
|
+
* code, so it is classified as `ETIMEDOUT`: recovered for idempotent methods,
|
|
289
|
+
* never for creates (whose list is empty). All other failures return `false`.
|
|
287
290
|
*
|
|
288
291
|
* @example
|
|
289
292
|
*
|
|
@@ -406,8 +409,7 @@ function shouldRetry(error, config) {
|
|
|
406
409
|
* @param options - Method defaults, method kind, and optional per-request overrides.
|
|
407
410
|
* @returns A new merged config object. Inputs are not mutated.
|
|
408
411
|
*/
|
|
409
|
-
function mergeConfig(clientConfig,
|
|
410
|
-
const { methodDefaults, methodKind, requestOptions } = options;
|
|
412
|
+
function mergeConfig(clientConfig, { methodDefaults, methodKind, requestOptions }) {
|
|
411
413
|
switch (methodKind) {
|
|
412
414
|
case "create": return {
|
|
413
415
|
...clientConfig,
|
|
@@ -425,4 +427,4 @@ function mergeConfig(clientConfig, options) {
|
|
|
425
427
|
//#endregion
|
|
426
428
|
export { computeRetryWaitMs as a, shouldRetry as c, UPLOAD_METHOD_DEFAULTS as i, findErrorCode as l, IDEMPOTENT_METHOD_DEFAULTS as n, defaultRetryDelay as o, TRANSIENT_TRANSPORT_CODES as r, mergeConfig as s, CREATE_METHOD_DEFAULTS as t, PermissionError as u };
|
|
427
429
|
|
|
428
|
-
//# sourceMappingURL=retry-
|
|
430
|
+
//# sourceMappingURL=retry-PmpgEwFN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry-PmpgEwFN.mjs","names":["exhaustive"],"sources":["../src/errors/permission-error.ts","../src/internal/utils/find-error-code.ts","../src/internal/http/retry.ts"],"sourcesContent":["import { ApiError, type ApiErrorOptions } from \"./api-error.ts\";\n\n/**\n * Options for constructing a {@link PermissionError}.\n *\n * @since 0.1.0\n */\nexport interface PermissionErrorOptions extends ApiErrorOptions {\n\t/**\n\t * Stable identifier of the Open Cloud operation that returned the\n\t * permission failure (matches `OperationLimit.operationKey`, e.g.\n\t * `\"developer-products.create\"`).\n\t */\n\toperationKey: string;\n\t/**\n\t * Scope strings the API key or OAuth token must carry for the failing\n\t * operation, sourced from the vendored OpenAPI schema's `x-roblox-scopes`\n\t * for that operationId.\n\t */\n\trequiredScopes: ReadonlyArray<string>;\n}\n\n/**\n * Thrown when the Roblox Open Cloud API returns a 401 or 403 for an operation\n * whose required scopes are known. Subclass of {@link ApiError} carrying the\n * scope strings the operation requires plus the operation key, so a consumer\n * can name them when guiding the user to their API key settings.\n *\n * The scopes are what the operation needs, not a diagnosis of what the\n * credential lacks: a 403 does mean the scopes fall short, but Roblox also\n * answers 401 for a key that is invalid, disabled, or expired. Check\n * {@link ApiError.statusCode} before wording the failure as a missing scope.\n *\n * @since 0.1.0\n *\n * @example\n *\n * ```ts\n * import { PermissionError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new PermissionError(\"HTTP 403\", {\n * operationKey: \"developer-products.create\",\n * requiredScopes: [\"creator-store-product:write\"],\n * statusCode: 403,\n * });\n *\n * expect(error).toBeInstanceOf(PermissionError);\n * expect(error.requiredScopes).toStrictEqual([\"creator-store-product:write\"]);\n * expect(error.operationKey).toBe(\"developer-products.create\");\n * ```\n */\nexport class PermissionError extends ApiError {\n\tpublic override readonly name: string = \"PermissionError\";\n\tpublic readonly operationKey: string;\n\tpublic readonly requiredScopes: ReadonlyArray<string>;\n\n\t/**\n\t * Creates a new PermissionError.\n\t *\n\t * @param message - Human-readable error description.\n\t * @param options - Error options including status code, the operation key,\n\t * and the scopes the caller's credential must carry.\n\t */\n\tconstructor(message: string, options: PermissionErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.operationKey = options.operationKey;\n\t\tthis.requiredScopes = options.requiredScopes;\n\t}\n}\n","/**\n * Maximum cause-chain depth walked by {@link findErrorCode}. Caps pathological\n * self-referential or deeply nested chains; transport failures surface as\n * `NetworkError → TypeError(\"fetch failed\") → OS Error{code}`, so three\n * levels is the expected shape and five leaves headroom.\n */\nconst MAX_DEPTH = 5;\n\n/**\n * Walks an error's `cause` chain and returns the first node-style string\n * `code` it finds (for example `\"ECONNRESET\"`, `\"ETIMEDOUT\"`). Native `fetch`\n * surfaces a transport reset as a `NetworkError` wrapping a\n * `TypeError(\"fetch failed\")` whose own cause carries the OS-level `code`, so\n * the code lives several links down the chain.\n *\n * @example\n *\n * ```ts\n * import { findErrorCode } from \"./find-error-code\";\n *\n * const root = Object.assign(new Error(\"read ECONNRESET\"), { code: \"ECONNRESET\" });\n * const outer = new Error(\"Network request failed\", {\n * cause: new TypeError(\"fetch failed\", { cause: root }),\n * });\n *\n * expect(findErrorCode(outer)).toBe(\"ECONNRESET\");\n * ```\n *\n * @param error - The error to inspect; typically a `NetworkError`.\n * @returns The first string `code` in the chain, or `undefined` if none.\n */\nexport function findErrorCode(error: unknown): string | undefined {\n\tlet current: unknown = error;\n\tfor (let depth = 0; depth < MAX_DEPTH && current instanceof Error; depth += 1) {\n\t\tconst code = readCode(current);\n\t\tif (code !== undefined) {\n\t\t\treturn code;\n\t\t}\n\n\t\tcurrent = current.cause;\n\t}\n\n\treturn undefined;\n}\n\nfunction readCode(error: Error): string | undefined {\n\tconst code = Reflect.get(error, \"code\");\n\treturn typeof code === \"string\" ? code : undefined;\n}\n\n/**\n * `DOMException.name` produced when an `AbortSignal.timeout` fires. This is the\n * web-standard discriminator (stable across Node and Bun, unlike the\n * runtime-specific message) and distinguishes the SDK's own request timeout\n * from a caller-supplied cancellation, which surfaces as `\"AbortError\"`.\n */\nconst TIMEOUT_ABORT_NAME = \"TimeoutError\";\n\n/**\n * Reports whether an error chain was produced by the SDK's own\n * `AbortSignal.timeout` self-abort. Such a `DOMException` carries a numeric\n * `code` (23), so {@link findErrorCode} (which only reads string codes)\n * cannot classify it; this walk keys on `name` instead. A caller-supplied\n * abort (`\"AbortError\"`) is deliberately not matched.\n *\n * @example\n *\n * ```ts\n * import { isTimeoutAbort } from \"./find-error-code\";\n *\n * const error = new Error(\"Network request failed\", {\n * cause: new DOMException(\"timed out\", \"TimeoutError\"),\n * });\n *\n * expect(isTimeoutAbort(error)).toBe(true);\n * expect(isTimeoutAbort(new DOMException(\"cancelled\", \"AbortError\"))).toBe(false);\n * ```\n *\n * @param error - The error to inspect; typically a `NetworkError`.\n * @returns `true` when a `TimeoutError` abort sits within the cause chain.\n */\nexport function isTimeoutAbort(error: unknown): boolean {\n\tlet current: unknown = error;\n\tfor (let depth = 0; depth < MAX_DEPTH && current instanceof Error; depth += 1) {\n\t\tif (Reflect.get(current, \"name\") === TIMEOUT_ABORT_NAME) {\n\t\t\treturn true;\n\t\t}\n\n\t\tcurrent = current.cause;\n\t}\n\n\treturn false;\n}\n","import { ApiError } from \"../../errors/api-error.ts\";\nimport { NetworkError } from \"../../errors/network-error.ts\";\nimport { RateLimitError } from \"../../errors/rate-limit.ts\";\nimport { findErrorCode, isTimeoutAbort } from \"../utils/find-error-code.ts\";\n\n/**\n * Fully-resolved retry config shape that {@link mergeConfig} and\n * {@link shouldRetry} operate on. Fields are required because this represents\n * the post-defaulting, internal view; callers should supply every field (or\n * resolve them via a test factory / client constructor). The partial,\n * user-facing type lives on client construction options; method defaults and\n * per-request overrides use `Partial<RetryResolvable>`.\n */\nexport interface RetryResolvable {\n\t/** Roblox Open Cloud API key. */\n\treadonly apiKey: string;\n\t/** Base URL for the Open Cloud API. */\n\treadonly baseUrl: string;\n\t/** Maximum retry attempts before giving up. */\n\treadonly maxRetries: number;\n\t/** Status codes that are eligible for retry. */\n\treadonly retryableStatuses: ReadonlyArray<number>;\n\t/**\n\t * Codes for transport-level failures eligible for retry: node-style\n\t * transport codes ({@link findErrorCode}) surfaced as a\n\t * {@link NetworkError}, plus the synthetic {@link GATEWAY_REJECTED} for a\n\t * response served by an edge gateway. Not all of them prove the request\n\t * went unprocessed — see {@link TRANSIENT_TRANSPORT_CODES}. Empty for\n\t * create operations by default; consumers opt a create in via a per-request\n\t * override.\n\t */\n\treadonly retryableTransportCodes: ReadonlyArray<string>;\n\t/** Fallback delay function when no server hint is available. */\n\treadonly retryDelay: (attempt: number) => number;\n\t/** Per-request timeout in milliseconds. */\n\treadonly timeout: number;\n}\n\n/**\n * Transient transport error codes that are safe to retry for idempotent\n * operations. Connection resets, timeouts, and DNS hiccups are recoverable on\n * a retry. A self-aborted request timeout carries no OS-level `code`, so\n * {@link shouldRetry} folds it into this set as `ETIMEDOUT` (via\n * {@link isTimeoutAbort}) for idempotent methods; create methods retry no\n * transport codes and so still never re-issue a timed-out write.\n *\n * `ERR_HTTP2_STREAM_ERROR`, `ERR_HTTP2_SESSION_ERROR`, and `UND_ERR_INFO` are\n * the same deaths as spelled by a runtime whose `fetch` negotiates HTTP/2\n * (Node 26 and later). They differ from the socket codes in one way that\n * matters: they do not prove the request went unprocessed. `UND_ERR_INFO`\n * covers both a `GOAWAY` declaring a stream was never started and a stream\n * that was fully sent, and `UND_ERR_SOCKET` can fire once a response is\n * already streaming. Retrying them is therefore justified by the operation\n * being safe to repeat, never by the request having gone unseen — which is\n * why {@link UPLOAD_METHOD_DEFAULTS}, the one write policy that includes\n * them, documents its own grounds.\n *\n * @since 0.1.0\n */\nexport const TRANSIENT_TRANSPORT_CODES: ReadonlyArray<string> = Object.freeze([\n\t\"ECONNRESET\",\n\t\"ECONNREFUSED\",\n\t\"ETIMEDOUT\",\n\t\"EPIPE\",\n\t\"ENETUNREACH\",\n\t\"EHOSTDOWN\",\n\t\"EAI_AGAIN\",\n\t\"UND_ERR_SOCKET\",\n\t\"ERR_HTTP2_STREAM_ERROR\",\n\t\"ERR_HTTP2_SESSION_ERROR\",\n\t\"UND_ERR_INFO\",\n]);\n\n/**\n * Synthetic transport code for a response that came from an edge gateway\n * rather than Open Cloud ({@link ApiError.gatewaySummary}). Such a response\n * proves the request was rejected before any Open Cloud handler saw it, so it\n * is classified alongside {@link TRANSIENT_TRANSPORT_CODES} rather than by its\n * HTTP status: the status belongs to the gateway, not to the API, and a\n * gateway `400` says nothing about the validity of the request.\n *\n * @since 0.1.2\n */\nexport const GATEWAY_REJECTED = \"GATEWAY_REJECTED\";\n\n/** Method-level retry defaults, keyed by {@link MethodKind}. */\ntype MethodDefaults = Readonly<\n\tPick<RetryResolvable, \"retryableStatuses\" | \"retryableTransportCodes\">\n>;\n\n/**\n * Default retry policy for idempotent operations (read, list, update,\n * delete). Safe to retry on rate limits, transient server errors, and\n * transient transport failures.\n */\nexport const IDEMPOTENT_METHOD_DEFAULTS: MethodDefaults = Object.freeze({\n\tretryableStatuses: Object.freeze([429, 500, 502, 503, 504] as const),\n\tretryableTransportCodes: TRANSIENT_TRANSPORT_CODES,\n});\n\n/**\n * Default retry policy for create operations. Retries rate limits only (no\n * 5xx and no transport-error retries) to prevent duplicate resources, since\n * Roblox Open Cloud has no idempotency-key support. Consumers who can tolerate\n * a duplicate opt in per request.\n */\nexport const CREATE_METHOD_DEFAULTS: MethodDefaults = Object.freeze({\n\tretryableStatuses: Object.freeze([429] as const),\n\tretryableTransportCodes: Object.freeze([] as const),\n});\n\n/**\n * Default retry policy for upload operations (place publish and save). Keeps\n * {@link CREATE_METHOD_DEFAULTS}'s 5xx guard (a 5xx comes from Open Cloud and\n * may describe a write that partly landed), but retries transport failures:\n * {@link TRANSIENT_TRANSPORT_CODES} and {@link GATEWAY_REJECTED}.\n *\n * This is the one write policy that retries codes which do not prove the\n * request went unprocessed, and the grounds are specific to a place version:\n * Roblox dedupes identical place content, so a retry that races a publish\n * which did land returns that same version rather than creating a second one.\n * That is load-bearing, not incidental — an upload operation without content\n * dedupe would need its own allowlist.\n */\nexport const UPLOAD_METHOD_DEFAULTS: MethodDefaults = Object.freeze({\n\t...CREATE_METHOD_DEFAULTS,\n\tretryableTransportCodes: Object.freeze([...TRANSIENT_TRANSPORT_CODES, GATEWAY_REJECTED]),\n});\n\n/** Kind of HTTP method the merge is being performed for. */\nexport type MethodKind = \"create\" | \"idempotent\";\n\n/**\n * Options for {@link mergeConfig}.\n *\n * @template T - Concrete `RetryResolvable` subtype being merged.\n */\ninterface MergeConfigOptions<T> {\n\t/** Method-level defaults (e.g. {@link CREATE_METHOD_DEFAULTS}). */\n\treadonly methodDefaults: Partial<T>;\n\t/** Whether the method is a create or idempotent operation. */\n\treadonly methodKind: MethodKind;\n\t/** Optional per-request overrides; always win when provided. */\n\treadonly requestOptions?: Partial<T>;\n}\n\n/**\n * Options for {@link computeRetryWaitMs}.\n */\ninterface ComputeRetryWaitMsOptions {\n\t/** Zero-indexed retry attempt number. */\n\treadonly attempt: number;\n\t/** Fallback delay function when no server hint is available. */\n\treadonly retryDelay: (attempt: number) => number;\n}\n\n/**\n * Default exponential backoff: 1s → 2s → 4s → 8s → 16s → 30s (capped).\n *\n * @example\n *\n * ```ts\n * import { defaultRetryDelay } from \"./retry\";\n *\n * expect(defaultRetryDelay(0)).toBe(1000);\n * expect(defaultRetryDelay(4)).toBe(16_000);\n * expect(defaultRetryDelay(10)).toBe(30_000);\n * ```\n *\n * @param attempt - Zero-indexed retry attempt number.\n * @returns Wait duration in milliseconds.\n */\nexport function defaultRetryDelay(attempt: number): number {\n\treturn Math.min(1000 * 2 ** attempt, 30_000);\n}\n\n/**\n * Computes how long to wait before the next retry. Prefers the server's\n * suggested delay when the error is a {@link RateLimitError} with a positive\n * `retryAfterSeconds`; otherwise falls through to `retryDelay(attempt)`.\n *\n * @example\n *\n * ```ts\n * import { RateLimitError } from \"../../errors/rate-limit.ts\";\n * import { computeRetryWaitMs, defaultRetryDelay } from \"./retry\";\n *\n * const error = new RateLimitError(\"slow down\", { retryAfterSeconds: 3 });\n *\n * expect(computeRetryWaitMs(error, { attempt: 0, retryDelay: defaultRetryDelay })).toBe(\n * 3000,\n * );\n * ```\n *\n * @example\n *\n * ```ts\n * import { ApiError } from \"../../errors/api-error.ts\";\n * import { computeRetryWaitMs, defaultRetryDelay } from \"./retry\";\n *\n * const error = new ApiError(\"server error\", { statusCode: 503 });\n *\n * expect(computeRetryWaitMs(error, { attempt: 2, retryDelay: defaultRetryDelay })).toBe(\n * 4000,\n * );\n * ```\n *\n * @param error - The error returned by the failing request.\n * @param options - Retry attempt index and fallback delay function.\n * @returns Wait duration in milliseconds before the next attempt.\n */\nexport function computeRetryWaitMs(\n\terror: ApiError | NetworkError | RateLimitError,\n\toptions: ComputeRetryWaitMsOptions,\n): number {\n\tif (error instanceof RateLimitError && error.retryAfterSeconds > 0) {\n\t\treturn error.retryAfterSeconds * 1000;\n\t}\n\n\treturn options.retryDelay(options.attempt);\n}\n\n/**\n * Decides whether a failed request is eligible for retry. {@link\n * RateLimitError} (checked against 429) and {@link ApiError} (checked against\n * its `statusCode`) are retryable when their status is in `retryableStatuses`.\n * An {@link ApiError} carrying a `gatewaySummary` is the exception: it is\n * checked against {@link GATEWAY_REJECTED} in `retryableTransportCodes`\n * instead, and its status is never consulted. A {@link NetworkError} is\n * retryable when its transport code ({@link findErrorCode}) is in\n * `retryableTransportCodes`. This is how transient connection resets recover.\n * A self-aborted request timeout ({@link isTimeoutAbort}) carries no transport\n * code, so it is classified as `ETIMEDOUT`: recovered for idempotent methods,\n * never for creates (whose list is empty). All other failures return `false`.\n *\n * @example\n *\n * ```ts\n * import { RateLimitError } from \"../../errors/rate-limit.ts\";\n * import { shouldRetry } from \"./retry\";\n *\n * const error = new RateLimitError(\"\", { retryAfterSeconds: 1 });\n *\n * expect(shouldRetry(error, { retryableStatuses: [429], retryableTransportCodes: [] })).toBe(\n * true,\n * );\n * ```\n *\n * @example\n *\n * ```ts\n * import { NetworkError } from \"../../errors/network-error.ts\";\n * import { shouldRetry } from \"./retry\";\n *\n * const reset = Object.assign(new Error(\"read ECONNRESET\"), { code: \"ECONNRESET\" });\n * const error = new NetworkError(\"Network request failed\", { cause: reset });\n *\n * expect(\n * shouldRetry(error, { retryableStatuses: [], retryableTransportCodes: [\"ECONNRESET\"] }),\n * ).toBe(true);\n * ```\n *\n * @param error - The error returned by the failing request.\n * @param config - Object carrying the retry-eligible status and transport-code lists.\n * @returns `true` if the error should be retried, `false` otherwise.\n */\nexport function shouldRetry(\n\terror: unknown,\n\tconfig: {\n\t\treadonly retryableStatuses: ReadonlyArray<number>;\n\t\treadonly retryableTransportCodes: ReadonlyArray<string>;\n\t},\n): error is ApiError | NetworkError | RateLimitError {\n\tif (error instanceof RateLimitError) {\n\t\treturn config.retryableStatuses.includes(429);\n\t}\n\n\tif (error instanceof ApiError) {\n\t\tif (error.gatewaySummary !== undefined) {\n\t\t\treturn config.retryableTransportCodes.includes(GATEWAY_REJECTED);\n\t\t}\n\n\t\treturn config.retryableStatuses.includes(error.statusCode);\n\t}\n\n\tif (error instanceof NetworkError) {\n\t\tconst code = findErrorCode(error) ?? (isTimeoutAbort(error) ? \"ETIMEDOUT\" : undefined);\n\t\treturn code !== undefined && config.retryableTransportCodes.includes(code);\n\t}\n\n\treturn false;\n}\n\n/**\n * Resolves the effective config for a single request by shallow-merging the\n * client config, method defaults, and per-request options. Precedence depends\n * on `methodKind`:\n *\n * - `\"create\"`: method defaults override client config, so client-level\n * settings cannot silently relax create-method safety. Only explicit\n * per-request `requestOptions` can.\n * - `\"idempotent\"`: client config overrides method defaults, so consumers\n * can loosen or tighten retry policy globally. `requestOptions` still wins\n * when provided.\n *\n * Array-valued fields like `retryableStatuses` are *replaced*, not extended.\n *\n * @template T - Concrete `RetryResolvable` subtype being merged.\n *\n * @example\n *\n * ```ts\n * import {\n * CREATE_METHOD_DEFAULTS,\n * defaultRetryDelay,\n * mergeConfig,\n * type RetryResolvable,\n * } from \"./retry\";\n *\n * const clientConfig: RetryResolvable = {\n * apiKey: \"k\",\n * baseUrl: \"https://apis.roblox.com\",\n * maxRetries: 3,\n * retryableStatuses: [429, 500],\n * retryableTransportCodes: [],\n * retryDelay: defaultRetryDelay,\n * timeout: 30_000,\n * };\n *\n * const merged = mergeConfig(clientConfig, {\n * methodDefaults: CREATE_METHOD_DEFAULTS,\n * methodKind: \"create\",\n * });\n *\n * expect(merged.retryableStatuses).toStrictEqual([429]);\n * ```\n *\n * @example\n *\n * ```ts\n * import {\n * defaultRetryDelay,\n * IDEMPOTENT_METHOD_DEFAULTS,\n * mergeConfig,\n * type RetryResolvable,\n * } from \"./retry\";\n *\n * const clientConfig: RetryResolvable = {\n * apiKey: \"k\",\n * baseUrl: \"https://apis.roblox.com\",\n * maxRetries: 3,\n * retryableStatuses: [429],\n * retryableTransportCodes: [],\n * retryDelay: defaultRetryDelay,\n * timeout: 30_000,\n * };\n *\n * const merged = mergeConfig(clientConfig, {\n * methodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n * methodKind: \"idempotent\",\n * requestOptions: { timeout: 10_000 },\n * });\n *\n * expect(merged.retryableStatuses).toStrictEqual([429]);\n * expect(merged.timeout).toBe(10_000);\n * ```\n *\n * @param clientConfig - Config frozen at client construction.\n * @param options - Method defaults, method kind, and optional per-request overrides.\n * @returns A new merged config object. Inputs are not mutated.\n */\nexport function mergeConfig<T extends RetryResolvable>(\n\tclientConfig: T,\n\t{ methodDefaults, methodKind, requestOptions }: MergeConfigOptions<T>,\n): T {\n\tswitch (methodKind) {\n\t\tcase \"create\": {\n\t\t\treturn { ...clientConfig, ...methodDefaults, ...requestOptions };\n\t\t}\n\t\tcase \"idempotent\": {\n\t\t\treturn { ...methodDefaults, ...clientConfig, ...requestOptions };\n\t\t}\n\t\tdefault: {\n\t\t\tconst exhaustive: never = methodKind;\n\t\t\tthrow new Error(`Unexpected methodKind: ${String(exhaustive)}`);\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,IAAa,kBAAb,cAAqC,SAAS;CAC7C,OAAwC;CACxC;CACA;;;;;;;;CASA,YAAY,SAAiB,SAAiC;EAC7D,MAAM,SAAS,OAAO;EACtB,KAAK,eAAe,QAAQ;EAC5B,KAAK,iBAAiB,QAAQ;CAC/B;AACD;;;;;;;;;AC9DA,MAAM,YAAY;;;;;;;;;;;;;;;;;;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CAC1D,OAAO,KAAK,IAAI,MAAO,KAAK,SAAS,GAAM;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAgB,mBACf,OACA,SACS;CACT,IAAI,iBAAiB,kBAAkB,MAAM,oBAAoB,GAChE,OAAO,MAAM,oBAAoB;CAGlC,OAAO,QAAQ,WAAW,QAAQ,OAAO;AAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,SAAgB,YACf,OACA,QAIoD;CACpD,IAAI,iBAAiB,gBACpB,OAAO,OAAO,kBAAkB,SAAS,GAAG;CAG7C,IAAI,iBAAiB,UAAU;EAC9B,IAAI,MAAM,mBAAmB,KAAA,GAC5B,OAAO,OAAO,wBAAwB,SAAS,gBAAgB;EAGhE,OAAO,OAAO,kBAAkB,SAAS,MAAM,UAAU;CAC1D;CAEA,IAAI,iBAAiB,cAAc;EAClC,MAAM,OAAO,cAAc,KAAK,MAAM,eAAe,KAAK,IAAI,cAAc,KAAA;EAC5E,OAAO,SAAS,KAAA,KAAa,OAAO,wBAAwB,SAAS,IAAI;CAC1E;CAEA,OAAO;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA,SAAgB,YACf,cACA,EAAE,gBAAgB,YAAY,kBAC1B;CACJ,QAAQ,YAAR;EACC,KAAK,UACJ,OAAO;GAAE,GAAG;GAAc,GAAG;GAAgB,GAAG;EAAe;EAEhE,KAAK,cACJ,OAAO;GAAE,GAAG;GAAgB,GAAG;GAAc,GAAG;EAAe;EAEhE,SAEC,MAAM,IAAI,MAAM,0BAA0B,OAAOA,UAAU,GAAG;CAEhE;AACD"}
|
package/dist/storage.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { n as RetryResolvable, t as MethodKind } from "./retry-
|
|
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-DXai6-hU.mjs";
|
|
2
|
+
import { n as RetryResolvable, t as MethodKind } from "./retry-DGY51INM.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/cloud-v2/memory-store-queues/types.d.ts
|
|
5
5
|
/**
|
|
@@ -315,7 +315,9 @@ interface UpdateSortedMapItemParameters {
|
|
|
315
315
|
readonly ttl?: number;
|
|
316
316
|
/** Stringified ID of the universe that owns the sorted map. */
|
|
317
317
|
readonly universeId: string;
|
|
318
|
-
/**
|
|
318
|
+
/**
|
|
319
|
+
* Replacement value. Omitted entries leave the existing value unchanged.
|
|
320
|
+
*/
|
|
319
321
|
readonly value?: JSONValue;
|
|
320
322
|
}
|
|
321
323
|
//#endregion
|
|
@@ -325,6 +327,15 @@ interface UpdateSortedMapItemParameters {
|
|
|
325
327
|
* limiting, e.g. `{ operationKey: "game-passes.create", maxPerSecond: 5 }`.
|
|
326
328
|
*/
|
|
327
329
|
interface OperationLimit {
|
|
330
|
+
/**
|
|
331
|
+
* How many requests may be issued back to back before pacing begins,
|
|
332
|
+
* as a whole number of requests. Defaults to `max(1, maxPerSecond)`,
|
|
333
|
+
* which leaves operations at or above 1/s paced exactly as their
|
|
334
|
+
* sustained rate allows while still granting a slower operation one
|
|
335
|
+
* request after it has idled. Set this to the allowance the schema
|
|
336
|
+
* documents (e.g. 5 per minute) to grant the burst the server permits.
|
|
337
|
+
*/
|
|
338
|
+
readonly burstCapacity?: number;
|
|
328
339
|
/** Maximum sustained request rate in requests per second. */
|
|
329
340
|
readonly maxPerSecond: number;
|
|
330
341
|
/**
|
|
@@ -366,7 +377,9 @@ interface ResourceMethodSpec<P, T> {
|
|
|
366
377
|
* so consumers can loosen retry globally.
|
|
367
378
|
*/
|
|
368
379
|
readonly methodKind: MethodKind;
|
|
369
|
-
/**
|
|
380
|
+
/**
|
|
381
|
+
* Operation-level rate limit, keyed into the client's per-key queue map.
|
|
382
|
+
*/
|
|
370
383
|
readonly operationLimit: OperationLimit;
|
|
371
384
|
/**
|
|
372
385
|
* Converts the full {@link HttpResponse} into the resource-specific
|
|
@@ -398,7 +411,9 @@ interface ExecuteCall<P, T> {
|
|
|
398
411
|
readonly options?: RequestOptions | undefined;
|
|
399
412
|
/** Resource-specific request parameters. */
|
|
400
413
|
readonly parameters: P;
|
|
401
|
-
/**
|
|
414
|
+
/**
|
|
415
|
+
* Per-method binding of builder, parser, method kind, and operation limit.
|
|
416
|
+
*/
|
|
402
417
|
readonly spec: ResourceMethodSpec<P, T>;
|
|
403
418
|
}
|
|
404
419
|
/**
|
|
@@ -415,7 +430,7 @@ interface ExecuteCall<P, T> {
|
|
|
415
430
|
* the frozen client config, observability hooks, injected HTTP client and
|
|
416
431
|
* sleep, and the per-effective-key rate-limit queue registry. Resource
|
|
417
432
|
* classes compose one instance and dispatch every public method through
|
|
418
|
-
* {@link ResourceClient.
|
|
433
|
+
* {@link ResourceClient.executeAsync} with a per-method {@link ResourceMethodSpec}.
|
|
419
434
|
* Not exported from any package subpath; reachable only via sibling
|
|
420
435
|
* `src/resources/**` modules in this package.
|
|
421
436
|
*/
|
|
@@ -429,7 +444,13 @@ declare class ResourceClient {
|
|
|
429
444
|
* @param options - Client-level configuration including the API key
|
|
430
445
|
* and optional construction-time test seams.
|
|
431
446
|
*/
|
|
432
|
-
constructor(
|
|
447
|
+
constructor({
|
|
448
|
+
apiKey,
|
|
449
|
+
hooks,
|
|
450
|
+
httpClient,
|
|
451
|
+
sleep,
|
|
452
|
+
...overrides
|
|
453
|
+
}: OpenCloudClientOptions);
|
|
433
454
|
/**
|
|
434
455
|
* Dispatches a single resource-method call. Merges the frozen client
|
|
435
456
|
* config with the method's `methodDefaults` and the caller's optional
|
|
@@ -442,7 +463,11 @@ declare class ResourceClient {
|
|
|
442
463
|
* @returns The parsed success payload or the {@link OpenCloudError} that
|
|
443
464
|
* caused the request to fail. Never throws.
|
|
444
465
|
*/
|
|
445
|
-
|
|
466
|
+
executeAsync<P, T>({
|
|
467
|
+
options,
|
|
468
|
+
parameters,
|
|
469
|
+
spec
|
|
470
|
+
}: ExecuteCall<P, T>): Promise<Result<T, OpenCloudError>>;
|
|
446
471
|
/**
|
|
447
472
|
* Returns the sleep function used by this client instance.
|
|
448
473
|
*
|
package/dist/storage.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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/resource-client.ts","../src/resources/storage/queues-group.ts","../src/resources/storage/sorted-maps-group.ts","../src/resources/storage/client.ts"],"mappings":";;;;;;;;AAMA;;UAAiB,0BAAA;EAOD;;;;;;EAAA,SAAN,IAAA,EAAM,OAAA,CAAQ,SAAA;;;AAgBd;AAUV;;WApBU,QAAA;;WAEA,OAAA;;;;;;WAMA,GAAA;;WAEA,UAAA;AAAA;;;;;AAyBA;AASV;;UAxBiB,SAAA;EAwBA;EAAA,SAtBP,EAAA;;;;;WAKA,IAAA,EAAM,OAAA,CAAQ,SAAA;EAsCd;EAAA,SApCA,SAAA,EAAW,IAAA;EA+CJ;EAAA,SA7CP,QAAA;EA+CO;EAAA,SA7CP,OAAA;;WAEA,UAAA;AAAA;;AAgDA;AAYV;;;;UAnDiB,2BAAA;;;;AAyDP;;WAnDA,YAAA;;AC7DV;;;WDkEU,KAAA;;;;;;WAMA,kBAAA;EC7DV;EAAA,SD+DU,OAAA;;WAEA,UAAA;AAAA;;;;;;;;;UAWO,aAAA;EC1CjB;EAAA,SD4CU,KAAA,EAAO,aAAA,CAAc,SAAA;;;;;WAKrB,MAAA;AAAA;;;;ACxBA;AASV;;;;;UD2BiB,2BAAA;ECFA;EAAA,SDIP,OAAA;;WAEA,MAAA;;WAEA,UAAA;AAAA;;;;;;;AAlHV;;;;KCEY,OAAA;EAAA,SACE,IAAA;EAAA,SAA0B,KAAA;AAAA;EAAA,SAC1B,IAAA;EAAA,SAAyB,KAAA;AAAA;;ADmB7B;AAUV;;;;;UCpBiB,6BAAA;ED6BI;;;;EAAA,SCxBX,MAAA;;WAEA,KAAA;;WAEA,OAAA,GAAU,OAAA;;;;AD0BV;AASV;WC7BU,GAAA;;WAEA,UAAA;;;;;WAKA,KAAA,EAAO,SAAA;AAAA;AD2CP;AAWV;;;;;;;;AAXU,UC/BO,4BAAA;EDiDP;AAYV;;;;EAZU,SC3CA,MAAA;;WAEA,KAAA;ED2DA;AAAA;;;EAAA,SCtDA,WAAA;EA1DV;;;;EAAA,SA+DU,OAAA;;;;;WAKA,SAAA;EAzDV;EAAA,SA2DU,UAAA;AAAA;;;;;;;UASO,aAAA;;WAEP,EAAA;EAhDO;AAAA;AAYjB;;;EAZiB,SAsDP,IAAA;;WAEA,SAAA,EAAW,IAAA;;WAEX,KAAA;;;;AArBA;AASV;WAkBU,OAAA,EAAS,OAAA;;WAET,UAAA;;;;;WAKA,KAAA,EAAO,SAAA;AAAA;;;;;;;UASA,wBAAA;;WAEP,KAAA,EAAO,aAAA,CAAc,aAAA;EAXd;AASjB;;;EATiB,SAgBP,aAAA;AAAA;;;;;AAAA;AAUV;;UAAiB,6BAAA;EAAA;EAAA,SAEP,MAAA;;WAEA,KAAA;EAEA;EAAA,SAAA,UAAA;AAAA;;;;;;;;UAUO,0BAAA;EAkBjB;EAAA,SAhBU,MAAA;;WAEA,KAAA;;WAEA,UAAA;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/resource-client.ts","../src/resources/storage/queues-group.ts","../src/resources/storage/sorted-maps-group.ts","../src/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AWV;;;;;;;EKwDC,MAAA,CACC,UAAA,EAAY,6BAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,YAAkB,cAAA;ELpDpB;AAAA;AAYV;;;;;;;;AAMU;EKiDT,GAAA,CACC,UAAA,EAAY,0BAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,aAAA,EAAe,cAAA;;;AJpKlC;;;;;;;;;AAEuC;AASvC;;EI2KC,IAAA,CACC,UAAA,EAAY,4BAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,wBAAA,EAA0B,cAAA;EJxJ5B;;;;;;;;;;AAAA;AAYjB;;;;;EIgKC,MAAA,CACC,UAAA,EAAY,6BAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,aAAA,EAAe,cAAA;AAAA;;;;ALlNlC;;;;;;;;;;;;AAuBU;AAUV;;;;;;;;cMZa,aAAA;;WAEI,MAAA,EAAQ,sBAAA;;WAER,UAAA,EAAY,0BAAA;;;;;;ANuBnB;EMfT,WAAA,CAAY,OAAA,EAAS,sBAAA;AAAA"}
|
package/dist/storage.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as ApiError } from "./rate-limit-
|
|
2
|
-
import { n as IDEMPOTENT_METHOD_DEFAULTS, t as CREATE_METHOD_DEFAULTS } from "./retry-
|
|
3
|
-
import { a as
|
|
1
|
+
import { r as ApiError } from "./rate-limit-B20REZEY.mjs";
|
|
2
|
+
import { n as IDEMPOTENT_METHOD_DEFAULTS, t as CREATE_METHOD_DEFAULTS } from "./retry-PmpgEwFN.mjs";
|
|
3
|
+
import { a as isRecord, i as toJsonDetails, n as okRequest, o as isDateTimeString, r as parseEmptyResponse, t as ResourceClient } from "./resource-client-rQ9bBn4L.mjs";
|
|
4
4
|
//#region src/domains/cloud-v2/memory-store-queues/builders.ts
|
|
5
5
|
/**
|
|
6
6
|
* Builds a `POST` request for the Open Cloud
|
|
@@ -12,8 +12,7 @@ import { a as isDateTimeString, i as isRecord, n as okRequest, r as parseEmptyRe
|
|
|
12
12
|
* and optional priority and TTL.
|
|
13
13
|
* @returns A pure {@link HttpRequest} describing the enqueue call.
|
|
14
14
|
*/
|
|
15
|
-
function buildEnqueueRequest(
|
|
16
|
-
const { data, priority, queueId, ttl, universeId } = parameters;
|
|
15
|
+
function buildEnqueueRequest({ data, priority, queueId, ttl, universeId }) {
|
|
17
16
|
const body = { data };
|
|
18
17
|
if (priority !== void 0) body["priority"] = priority;
|
|
19
18
|
if (ttl !== void 0) body["ttl"] = `${ttl}s`;
|
|
@@ -61,8 +60,7 @@ function buildDequeueRequest(parameters) {
|
|
|
61
60
|
* `readId` returned from a prior dequeue.
|
|
62
61
|
* @returns A pure {@link HttpRequest} describing the discard call.
|
|
63
62
|
*/
|
|
64
|
-
function buildDiscardRequest(
|
|
65
|
-
const { queueId, readId, universeId } = parameters;
|
|
63
|
+
function buildDiscardRequest({ queueId, readId, universeId }) {
|
|
66
64
|
return {
|
|
67
65
|
body: { readId },
|
|
68
66
|
headers: { "content-type": "application/json" },
|
|
@@ -156,8 +154,7 @@ function parseQueueItemResponse(response) {
|
|
|
156
154
|
* @returns A success result wrapping the parsed {@link DequeueResult},
|
|
157
155
|
* or an {@link ApiError} when the response shape is wrong.
|
|
158
156
|
*/
|
|
159
|
-
function parseDequeueResponse(
|
|
160
|
-
const { body, status: statusCode } = response;
|
|
157
|
+
function parseDequeueResponse({ body, status: statusCode }) {
|
|
161
158
|
if (!isRecord(body)) return malformedDequeue(statusCode, body);
|
|
162
159
|
const { id, queueItems } = body;
|
|
163
160
|
if (typeof id !== "string") return malformedDequeue(statusCode, body);
|
|
@@ -196,7 +193,7 @@ function wireBodyToQueueItem(body) {
|
|
|
196
193
|
function malformedQueueItem(statusCode, body) {
|
|
197
194
|
return {
|
|
198
195
|
err: new ApiError(MALFORMED_QUEUE_ITEM_MESSAGE, {
|
|
199
|
-
details: body,
|
|
196
|
+
details: toJsonDetails(body),
|
|
200
197
|
statusCode
|
|
201
198
|
}),
|
|
202
199
|
success: false
|
|
@@ -208,7 +205,7 @@ function isQueueItem(item) {
|
|
|
208
205
|
function malformedDequeue(statusCode, body) {
|
|
209
206
|
return {
|
|
210
207
|
err: new ApiError(MALFORMED_DEQUEUE_MESSAGE, {
|
|
211
|
-
details: body,
|
|
208
|
+
details: toJsonDetails(body),
|
|
212
209
|
statusCode
|
|
213
210
|
}),
|
|
214
211
|
success: false
|
|
@@ -284,7 +281,7 @@ var MemoryStoreQueuesGroup = class {
|
|
|
284
281
|
* or the {@link OpenCloudError} that caused the request to fail.
|
|
285
282
|
*/
|
|
286
283
|
async dequeue(parameters, options) {
|
|
287
|
-
return this.#inner.
|
|
284
|
+
return this.#inner.executeAsync({
|
|
288
285
|
options,
|
|
289
286
|
parameters,
|
|
290
287
|
spec: DEQUEUE_SPEC
|
|
@@ -308,7 +305,7 @@ var MemoryStoreQueuesGroup = class {
|
|
|
308
305
|
* that caused the request to fail.
|
|
309
306
|
*/
|
|
310
307
|
async discard(parameters, options) {
|
|
311
|
-
return this.#inner.
|
|
308
|
+
return this.#inner.executeAsync({
|
|
312
309
|
options,
|
|
313
310
|
parameters,
|
|
314
311
|
spec: DISCARD_SPEC
|
|
@@ -330,7 +327,7 @@ var MemoryStoreQueuesGroup = class {
|
|
|
330
327
|
* the {@link OpenCloudError} that caused the request to fail.
|
|
331
328
|
*/
|
|
332
329
|
async enqueue(parameters, options) {
|
|
333
|
-
return this.#inner.
|
|
330
|
+
return this.#inner.executeAsync({
|
|
334
331
|
options,
|
|
335
332
|
parameters,
|
|
336
333
|
spec: ENQUEUE_SPEC
|
|
@@ -352,8 +349,7 @@ var MemoryStoreQueuesGroup = class {
|
|
|
352
349
|
* value to store, and optional `sortKey` and `ttl`.
|
|
353
350
|
* @returns A pure {@link HttpRequest} describing the create call.
|
|
354
351
|
*/
|
|
355
|
-
function buildCreateRequest(
|
|
356
|
-
const { itemId, mapId, sortKey, ttl, universeId, value } = parameters;
|
|
352
|
+
function buildCreateRequest({ itemId, mapId, sortKey, ttl, universeId, value }) {
|
|
357
353
|
const body = { value };
|
|
358
354
|
if (ttl !== void 0) body["ttl"] = `${ttl}s`;
|
|
359
355
|
applySortKeyToBody(body, sortKey);
|
|
@@ -375,8 +371,7 @@ function buildCreateRequest(parameters) {
|
|
|
375
371
|
* @param parameters - Universe, sorted-map, and item identifiers.
|
|
376
372
|
* @returns A pure {@link HttpRequest} describing the delete call.
|
|
377
373
|
*/
|
|
378
|
-
function buildDeleteRequest(
|
|
379
|
-
const { itemId, mapId, universeId } = parameters;
|
|
374
|
+
function buildDeleteRequest({ itemId, mapId, universeId }) {
|
|
380
375
|
return {
|
|
381
376
|
method: "DELETE",
|
|
382
377
|
url: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`
|
|
@@ -392,8 +387,7 @@ function buildDeleteRequest(parameters) {
|
|
|
392
387
|
* @param parameters - Universe, sorted-map, and item identifiers.
|
|
393
388
|
* @returns A pure {@link HttpRequest} describing the get call.
|
|
394
389
|
*/
|
|
395
|
-
function buildGetRequest(
|
|
396
|
-
const { itemId, mapId, universeId } = parameters;
|
|
390
|
+
function buildGetRequest({ itemId, mapId, universeId }) {
|
|
397
391
|
return {
|
|
398
392
|
method: "GET",
|
|
399
393
|
url: `/cloud/v2/universes/${encodeURIComponent(universeId)}/memory-store/sorted-maps/${encodeURIComponent(mapId)}/items/${encodeURIComponent(itemId)}`
|
|
@@ -409,8 +403,7 @@ function buildGetRequest(parameters) {
|
|
|
409
403
|
* optional pagination and filter parameters.
|
|
410
404
|
* @returns A pure {@link HttpRequest} describing the list call.
|
|
411
405
|
*/
|
|
412
|
-
function buildListRequest(
|
|
413
|
-
const { filter, mapId, maxPageSize, orderBy, pageToken, universeId } = parameters;
|
|
406
|
+
function buildListRequest({ filter, mapId, maxPageSize, orderBy, pageToken, universeId }) {
|
|
414
407
|
const query = new URLSearchParams();
|
|
415
408
|
if (maxPageSize !== void 0) query.append("maxPageSize", String(maxPageSize));
|
|
416
409
|
if (pageToken !== void 0) query.append("pageToken", pageToken);
|
|
@@ -455,8 +448,7 @@ function applySortKeyToBody(body, sortKey) {
|
|
|
455
448
|
}
|
|
456
449
|
body["numericSortKey"] = sortKey.value;
|
|
457
450
|
}
|
|
458
|
-
function buildUpdateBody(
|
|
459
|
-
const { sortKey, ttl, value } = parameters;
|
|
451
|
+
function buildUpdateBody({ sortKey, ttl, value }) {
|
|
460
452
|
const body = {};
|
|
461
453
|
if (value !== void 0) body["value"] = value;
|
|
462
454
|
if (ttl !== void 0) body["ttl"] = `${ttl}s`;
|
|
@@ -578,8 +570,7 @@ function parseSortedMapItemResponse(response) {
|
|
|
578
570
|
* {@link ListSortedMapItemsResult}, or an {@link ApiError} when the
|
|
579
571
|
* response shape is wrong.
|
|
580
572
|
*/
|
|
581
|
-
function parseListResponse(
|
|
582
|
-
const { body, status: statusCode } = response;
|
|
573
|
+
function parseListResponse({ body, status: statusCode }) {
|
|
583
574
|
if (!isRecord(body)) return malformedList(statusCode, body);
|
|
584
575
|
const { items: rawItemsField, nextPageToken } = body;
|
|
585
576
|
if (rawItemsField !== void 0 && rawItemsField !== null && !Array.isArray(rawItemsField)) return malformedList(statusCode, body);
|
|
@@ -634,7 +625,7 @@ function wireBodyToSortedMapItem(body) {
|
|
|
634
625
|
function malformedSortedMapItem(statusCode, body) {
|
|
635
626
|
return {
|
|
636
627
|
err: new ApiError(MALFORMED_MESSAGE, {
|
|
637
|
-
details: body,
|
|
628
|
+
details: toJsonDetails(body),
|
|
638
629
|
statusCode
|
|
639
630
|
}),
|
|
640
631
|
success: false
|
|
@@ -646,7 +637,7 @@ function isSortedMapItem(item) {
|
|
|
646
637
|
function malformedList(statusCode, body) {
|
|
647
638
|
return {
|
|
648
639
|
err: new ApiError(MALFORMED_LIST_MESSAGE, {
|
|
649
|
-
details: body,
|
|
640
|
+
details: toJsonDetails(body),
|
|
650
641
|
statusCode
|
|
651
642
|
}),
|
|
652
643
|
success: false
|
|
@@ -737,7 +728,7 @@ var MemoryStoreSortedMapsGroup = class {
|
|
|
737
728
|
* or the {@link OpenCloudError} that caused the request to fail.
|
|
738
729
|
*/
|
|
739
730
|
async create(parameters, options) {
|
|
740
|
-
return this.#inner.
|
|
731
|
+
return this.#inner.executeAsync({
|
|
741
732
|
options,
|
|
742
733
|
parameters,
|
|
743
734
|
spec: CREATE_SPEC
|
|
@@ -755,7 +746,7 @@ var MemoryStoreSortedMapsGroup = class {
|
|
|
755
746
|
* {@link OpenCloudError} that caused the request to fail.
|
|
756
747
|
*/
|
|
757
748
|
async delete(parameters, options) {
|
|
758
|
-
return this.#inner.
|
|
749
|
+
return this.#inner.executeAsync({
|
|
759
750
|
options,
|
|
760
751
|
parameters,
|
|
761
752
|
spec: DELETE_SPEC
|
|
@@ -773,7 +764,7 @@ var MemoryStoreSortedMapsGroup = class {
|
|
|
773
764
|
* or the {@link OpenCloudError} that caused the request to fail.
|
|
774
765
|
*/
|
|
775
766
|
async get(parameters, options) {
|
|
776
|
-
return this.#inner.
|
|
767
|
+
return this.#inner.executeAsync({
|
|
777
768
|
options,
|
|
778
769
|
parameters,
|
|
779
770
|
spec: GET_SPEC
|
|
@@ -794,7 +785,7 @@ var MemoryStoreSortedMapsGroup = class {
|
|
|
794
785
|
* that caused the request to fail.
|
|
795
786
|
*/
|
|
796
787
|
async list(parameters, options) {
|
|
797
|
-
return this.#inner.
|
|
788
|
+
return this.#inner.executeAsync({
|
|
798
789
|
options,
|
|
799
790
|
parameters,
|
|
800
791
|
spec: LIST_SPEC
|
|
@@ -817,7 +808,7 @@ var MemoryStoreSortedMapsGroup = class {
|
|
|
817
808
|
* or the {@link OpenCloudError} that caused the request to fail.
|
|
818
809
|
*/
|
|
819
810
|
async update(parameters, options) {
|
|
820
|
-
return this.#inner.
|
|
811
|
+
return this.#inner.executeAsync({
|
|
821
812
|
options,
|
|
822
813
|
parameters,
|
|
823
814
|
spec: UPDATE_SPEC
|