@bedrock-rbx/ocale 0.1.0-beta.3 → 0.1.0-beta.5
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 +2 -2
- package/dist/badges.mjs +4 -4
- package/dist/{data.generated-DOaDx6J0.d.mts → data.generated-DdwXMiv9.d.mts} +1 -1
- package/dist/{data.generated-DOaDx6J0.d.mts.map → data.generated-DdwXMiv9.d.mts.map} +1 -1
- package/dist/developer-products.d.mts +2 -2
- package/dist/developer-products.mjs +5 -5
- package/dist/game-passes.d.mts +2 -2
- package/dist/game-passes.mjs +5 -5
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -3
- package/dist/{is-date-time-string-Ds8Ew-Xa.mjs → is-date-time-string-DL6l9mo6.mjs} +1 -1
- package/dist/{is-date-time-string-Ds8Ew-Xa.mjs.map → is-date-time-string-DL6l9mo6.mjs.map} +1 -1
- package/dist/locales.d.mts +1 -1
- package/dist/luau-execution.d.mts +2 -2
- package/dist/luau-execution.mjs +3 -3
- package/dist/permission-error-DOVtNq3A.mjs +46 -0
- package/dist/permission-error-DOVtNq3A.mjs.map +1 -0
- package/dist/places.d.mts +2 -2
- package/dist/places.mjs +6 -61
- package/dist/places.mjs.map +1 -1
- package/dist/{poll-timeout-BdUcWv52.mjs → poll-timeout-Dg_QFEqi.mjs} +2 -2
- package/dist/{poll-timeout-BdUcWv52.mjs.map → poll-timeout-Dg_QFEqi.mjs.map} +1 -1
- package/dist/{polling-Cc50rgl6.d.mts → polling-DDKKpz6Z.d.mts} +2 -2
- package/dist/{polling-Cc50rgl6.d.mts.map → polling-DDKKpz6Z.d.mts.map} +1 -1
- package/dist/{polling-helpers-BVkmr6C7.mjs → polling-helpers-DJqtcrCQ.mjs} +5 -5
- package/dist/{polling-helpers-BVkmr6C7.mjs.map → polling-helpers-DJqtcrCQ.mjs.map} +1 -1
- package/dist/{price-information-DFf89abd.mjs → price-information-XyhlYrn8.mjs} +2 -2
- package/dist/{price-information-DFf89abd.mjs.map → price-information-XyhlYrn8.mjs.map} +1 -1
- package/dist/{rate-limit-BSbFNSGT.d.mts → rate-limit-BHAddFXO.d.mts} +2 -2
- package/dist/{rate-limit-BSbFNSGT.d.mts.map → rate-limit-BHAddFXO.d.mts.map} +1 -1
- package/dist/{rate-limit-CKfuhxT1.mjs → rate-limit-D1q2Js-z.mjs} +2 -44
- package/dist/rate-limit-D1q2Js-z.mjs.map +1 -0
- package/dist/{resource-client-opC6BUkL.mjs → resource-client-D7HKNrOp.mjs} +3 -2
- package/dist/{resource-client-opC6BUkL.mjs.map → resource-client-D7HKNrOp.mjs.map} +1 -1
- package/dist/signatures-9rpsTjPL.mjs +59 -0
- package/dist/signatures-9rpsTjPL.mjs.map +1 -0
- package/dist/storage.d.mts +1 -1
- package/dist/storage.mjs +3 -3
- package/dist/testing.d.mts +497 -0
- package/dist/testing.d.mts.map +1 -0
- package/dist/testing.mjs +367 -0
- package/dist/testing.mjs.map +1 -0
- package/dist/{to-blob-DHN7UoM8.mjs → to-blob-B27VhoRp.mjs} +1 -1
- package/dist/{to-blob-DHN7UoM8.mjs.map → to-blob-B27VhoRp.mjs.map} +1 -1
- package/dist/{types-DUzm6maA.d.mts → types-BOhSh9ug.d.mts} +1 -1
- package/dist/{types-DUzm6maA.d.mts.map → types-BOhSh9ug.d.mts.map} +1 -1
- package/dist/universes.d.mts +3 -8
- package/dist/universes.d.mts.map +1 -1
- package/dist/universes.mjs +5 -5
- package/dist/{validation-VImVHzxg.mjs → validation-DkL5KQqz.mjs} +2 -2
- package/dist/{validation-VImVHzxg.mjs.map → validation-DkL5KQqz.mjs.map} +1 -1
- package/dist/wire-BeIO-d1x.d.mts +35 -0
- package/dist/wire-BeIO-d1x.d.mts.map +1 -0
- package/package.json +3 -2
- package/dist/rate-limit-CKfuhxT1.mjs.map +0 -1
package/dist/badges.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-
|
|
2
|
-
import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-
|
|
1
|
+
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-BOhSh9ug.mjs";
|
|
2
|
+
import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-DdwXMiv9.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/badges/badges/types.d.ts
|
|
5
5
|
/**
|
package/dist/badges.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as toBlob } from "./to-blob-
|
|
3
|
-
import { t as isDateTimeString } from "./is-date-time-string-
|
|
4
|
-
import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-
|
|
1
|
+
import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
|
+
import { t as toBlob } from "./to-blob-B27VhoRp.mjs";
|
|
3
|
+
import { t as isDateTimeString } from "./is-date-time-string-DL6l9mo6.mjs";
|
|
4
|
+
import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-D7HKNrOp.mjs";
|
|
5
5
|
//#region src/domains/badges/badges/builders.ts
|
|
6
6
|
/**
|
|
7
7
|
* Builds a `POST` request for the legacy "create badge" endpoint.
|
|
@@ -482,4 +482,4 @@ type RobloxLocale = (typeof ROBLOX_CREATOR_LOCALES)[number]["locale"];
|
|
|
482
482
|
type RobloxLanguageCode = (typeof ROBLOX_CREATOR_LOCALES)[number]["languageCode"];
|
|
483
483
|
//#endregion
|
|
484
484
|
export { RobloxLocale as i, RobloxCreatorLocale as n, RobloxLanguageCode as r, ROBLOX_CREATOR_LOCALES as t };
|
|
485
|
-
//# sourceMappingURL=data.generated-
|
|
485
|
+
//# sourceMappingURL=data.generated-DdwXMiv9.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.generated-
|
|
1
|
+
{"version":3,"file":"data.generated-DdwXMiv9.d.mts","names":[],"sources":["../src/locales/data.generated.ts"],"mappings":";;AAMA;;UAAiB,mBAAA;EAAA,SACP,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;;;AAQV;;;cAAa,sBAAA;EAAA,SAEX,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA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AA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;EAAA,SAGA,MAAA;EAAA,SACA,YAAA;EAAA,SACA,IAAA;EAAA,SACA,UAAA;EAAA,SACA,aAAA;EAAA,SACA,0BAAA;EAAA,SACA,qBAAA;EAAA,SACA,0BAAA;AAAA;;;;;;KASU,YAAA,WAAuB,sBAAA;;;;;;KAOvB,kBAAA,WAA6B,sBAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-
|
|
2
|
-
import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-
|
|
1
|
+
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-BOhSh9ug.mjs";
|
|
2
|
+
import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-DdwXMiv9.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/developer-products/products/types.d.ts
|
|
5
5
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as toBlob } from "./to-blob-
|
|
3
|
-
import { t as isDateTimeString } from "./is-date-time-string-
|
|
4
|
-
import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-
|
|
5
|
-
import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-
|
|
1
|
+
import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
|
+
import { t as toBlob } from "./to-blob-B27VhoRp.mjs";
|
|
3
|
+
import { t as isDateTimeString } from "./is-date-time-string-DL6l9mo6.mjs";
|
|
4
|
+
import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-D7HKNrOp.mjs";
|
|
5
|
+
import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-XyhlYrn8.mjs";
|
|
6
6
|
//#region src/domains/developer-products/products/builders.ts
|
|
7
7
|
/**
|
|
8
8
|
* Builds a `GET` request for the Open Cloud "read developer product"
|
package/dist/game-passes.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-
|
|
2
|
-
import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-
|
|
1
|
+
import { c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-BOhSh9ug.mjs";
|
|
2
|
+
import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-DdwXMiv9.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/game-internationalization/game-pass-icon/types.d.ts
|
|
5
5
|
/**
|
package/dist/game-passes.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as toBlob } from "./to-blob-
|
|
3
|
-
import { t as isDateTimeString } from "./is-date-time-string-
|
|
4
|
-
import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-
|
|
5
|
-
import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-
|
|
1
|
+
import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
|
+
import { t as toBlob } from "./to-blob-B27VhoRp.mjs";
|
|
3
|
+
import { t as isDateTimeString } from "./is-date-time-string-DL6l9mo6.mjs";
|
|
4
|
+
import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-D7HKNrOp.mjs";
|
|
5
|
+
import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-XyhlYrn8.mjs";
|
|
6
6
|
//#region src/domains/game-internationalization/game-pass-icon/builders.ts
|
|
7
7
|
/**
|
|
8
8
|
* Builds a `POST` request for the localized "upload game-pass icon"
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as OpenCloudHooks, c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, n as HttpRequest, o as RequestConfig, r as HttpResponse, s as RequestOptions, t as HttpClient, u as SleepFunc } from "./types-
|
|
2
|
-
import { i as ApiErrorOptions, n as RateLimitErrorOptions, r as ApiError, t as RateLimitError } from "./rate-limit-
|
|
1
|
+
import { a as OpenCloudHooks, c as Page, d as OpenCloudError, i as OpenCloudClientOptions, l as Result, n as HttpRequest, o as RequestConfig, r as HttpResponse, s as RequestOptions, t as HttpClient, u as SleepFunc } from "./types-BOhSh9ug.mjs";
|
|
2
|
+
import { i as ApiErrorOptions, n as RateLimitErrorOptions, r as ApiError, t as RateLimitError } from "./rate-limit-BHAddFXO.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/errors/network-error.d.ts
|
|
5
5
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
1
|
+
import { i as OpenCloudError, n as NetworkError, r as ApiError, t as RateLimitError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
|
+
import { t as PermissionError } from "./permission-error-DOVtNq3A.mjs";
|
|
3
|
+
import { n as PollAbortedError, t as PollTimeoutError } from "./poll-timeout-Dg_QFEqi.mjs";
|
|
4
|
+
import { t as ValidationError } from "./validation-DkL5KQqz.mjs";
|
|
4
5
|
export { ApiError, NetworkError, OpenCloudError, PermissionError, PollAbortedError, PollTimeoutError, RateLimitError, ValidationError };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-date-time-string-
|
|
1
|
+
{"version":3,"file":"is-date-time-string-DL6l9mo6.mjs","names":[],"sources":["../src/internal/utils/is-date-time-string.ts"],"sourcesContent":["/**\n * Narrows `value` to a string that parses to a real {@link Date} via the\n * `Date(string)` constructor. Used by resource parsers to gate\n * `format: date-time` wire fields before handing them to `new Date(...)`,\n * which silently produces an `Invalid Date` for invalid input.\n *\n * @param value - The unknown wire value to validate.\n * @returns `true` when `value` is a string and `new Date(value).getTime()`\n * is not `NaN`.\n */\nexport function isDateTimeString(value: unknown): value is string {\n\tif (typeof value !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn !Number.isNaN(new Date(value).getTime());\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAgB,iBAAiB,OAAiC;AACjE,KAAI,OAAO,UAAU,SACpB,QAAO;AAGR,QAAO,CAAC,OAAO,MAAM,IAAI,KAAK,MAAM,CAAC,SAAS,CAAC"}
|
package/dist/locales.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as RobloxLocale, n as RobloxCreatorLocale, r as RobloxLanguageCode, t as ROBLOX_CREATOR_LOCALES } from "./data.generated-
|
|
1
|
+
import { i as RobloxLocale, n as RobloxCreatorLocale, r as RobloxLanguageCode, t as ROBLOX_CREATOR_LOCALES } from "./data.generated-DdwXMiv9.mjs";
|
|
2
2
|
export { ROBLOX_CREATOR_LOCALES, type RobloxCreatorLocale, type RobloxLanguageCode, type RobloxLocale };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-
|
|
2
|
-
import { a as CompleteTask, c as InProgressTask, d as SubmitAtHeadParameters, f as SubmitAtVersionParameters, i as LogPage, l as LuauExecutionTask, n as ListLogsParameters, o as FailedTask, r as LogMessage, s as GetParameters, t as PollUntilDoneOptions, u as LuauExecutionTaskRef } from "./polling-
|
|
1
|
+
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-BOhSh9ug.mjs";
|
|
2
|
+
import { a as CompleteTask, c as InProgressTask, d as SubmitAtHeadParameters, f as SubmitAtVersionParameters, i as LogPage, l as LuauExecutionTask, n as ListLogsParameters, o as FailedTask, r as LogMessage, s as GetParameters, t as PollUntilDoneOptions, u as LuauExecutionTaskRef } from "./polling-DDKKpz6Z.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/cloud-v2/luau-execution-task-binary-inputs/types.d.ts
|
|
5
5
|
/**
|
package/dist/luau-execution.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as CREATE_METHOD_DEFAULTS, n as okRequest, s as isRecord, t as ResourceClient } from "./resource-client-
|
|
3
|
-
import { a as SUBMIT_HEAD_SPEC, i as GET_SPEC, n as submitAndPoll, o as SUBMIT_VERSION_SPEC, r as pollUntilDoneCore, s as LIST_LOGS_SPEC, t as buildPollDeps } from "./polling-helpers-
|
|
1
|
+
import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
|
+
import { i as CREATE_METHOD_DEFAULTS, n as okRequest, s as isRecord, t as ResourceClient } from "./resource-client-D7HKNrOp.mjs";
|
|
3
|
+
import { a as SUBMIT_HEAD_SPEC, i as GET_SPEC, n as submitAndPoll, o as SUBMIT_VERSION_SPEC, r as pollUntilDoneCore, s as LIST_LOGS_SPEC, t as buildPollDeps } from "./polling-helpers-DJqtcrCQ.mjs";
|
|
4
4
|
//#region src/domains/cloud-v2/luau-execution-task-binary-inputs/builders.ts
|
|
5
5
|
/**
|
|
6
6
|
* Builds a `POST` request for the Open Cloud
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
|
+
//#region src/errors/permission-error.ts
|
|
3
|
+
/**
|
|
4
|
+
* Thrown when the Roblox Open Cloud API returns a 401 or 403 for an operation
|
|
5
|
+
* whose required scopes are known. Subclass of {@link ApiError} carrying the
|
|
6
|
+
* scope strings the caller's credential is missing plus the operation key, so
|
|
7
|
+
* a CLI consumer can tell the user exactly which scope to grant on their API
|
|
8
|
+
* key.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { PermissionError } from "@bedrock-rbx/ocale";
|
|
14
|
+
*
|
|
15
|
+
* const error = new PermissionError("HTTP 403", {
|
|
16
|
+
* operationKey: "developer-products.create",
|
|
17
|
+
* requiredScopes: ["creator-store-product:write"],
|
|
18
|
+
* statusCode: 403,
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* expect(error).toBeInstanceOf(PermissionError);
|
|
22
|
+
* expect(error.requiredScopes).toStrictEqual(["creator-store-product:write"]);
|
|
23
|
+
* expect(error.operationKey).toBe("developer-products.create");
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
var PermissionError = class extends ApiError {
|
|
27
|
+
name = "PermissionError";
|
|
28
|
+
operationKey;
|
|
29
|
+
requiredScopes;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new PermissionError.
|
|
32
|
+
*
|
|
33
|
+
* @param message - Human-readable error description.
|
|
34
|
+
* @param options - Error options including status code, the operation key,
|
|
35
|
+
* and the scopes the caller's credential must carry.
|
|
36
|
+
*/
|
|
37
|
+
constructor(message, options) {
|
|
38
|
+
super(message, options);
|
|
39
|
+
this.operationKey = options.operationKey;
|
|
40
|
+
this.requiredScopes = options.requiredScopes;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { PermissionError as t };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=permission-error-DOVtNq3A.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-error-DOVtNq3A.mjs","names":[],"sources":["../src/errors/permission-error.ts"],"sourcesContent":["import { ApiError, type ApiErrorOptions } from \"./api-error.ts\";\n\n/**\n * Options for constructing a {@link PermissionError}.\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 caller's credential is missing plus the operation key, so\n * a CLI consumer can tell the user exactly which scope to grant on their API\n * key.\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAa,kBAAb,cAAqC,SAAS;CAC7C,OAAwC;CACxC;CACA;;;;;;;;CASA,YAAY,SAAiB,SAAiC;AAC7D,QAAM,SAAS,QAAQ;AACvB,OAAK,eAAe,QAAQ;AAC5B,OAAK,iBAAiB,QAAQ"}
|
package/dist/places.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-
|
|
2
|
-
import { d as SubmitAtHeadParameters, f as SubmitAtVersionParameters, i as LogPage, l as LuauExecutionTask, n as ListLogsParameters, r as LogMessage, s as GetParameters, t as PollUntilDoneOptions, u as LuauExecutionTaskRef } from "./polling-
|
|
1
|
+
import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-BOhSh9ug.mjs";
|
|
2
|
+
import { d as SubmitAtHeadParameters, f as SubmitAtVersionParameters, i as LogPage, l as LuauExecutionTask, n as ListLogsParameters, r as LogMessage, s as GetParameters, t as PollUntilDoneOptions, u as LuauExecutionTaskRef } from "./polling-DDKKpz6Z.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/domains/cloud-v2/places/types.d.ts
|
|
5
5
|
/**
|
package/dist/places.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as ValidationError } from "./validation-
|
|
3
|
-
import { t as isDateTimeString } from "./is-date-time-string-
|
|
4
|
-
import { i as CREATE_METHOD_DEFAULTS, s as isRecord, t as ResourceClient } from "./resource-client-
|
|
5
|
-
import { a as SUBMIT_HEAD_SPEC, i as GET_SPEC, n as submitAndPoll, o as SUBMIT_VERSION_SPEC, r as pollUntilDoneCore, s as LIST_LOGS_SPEC, t as buildPollDeps } from "./polling-helpers-
|
|
1
|
+
import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
|
+
import { t as ValidationError } from "./validation-DkL5KQqz.mjs";
|
|
3
|
+
import { t as isDateTimeString } from "./is-date-time-string-DL6l9mo6.mjs";
|
|
4
|
+
import { i as CREATE_METHOD_DEFAULTS, s as isRecord, t as ResourceClient } from "./resource-client-D7HKNrOp.mjs";
|
|
5
|
+
import { a as SUBMIT_HEAD_SPEC, i as GET_SPEC, n as submitAndPoll, o as SUBMIT_VERSION_SPEC, r as pollUntilDoneCore, s as LIST_LOGS_SPEC, t as buildPollDeps } from "./polling-helpers-DJqtcrCQ.mjs";
|
|
6
|
+
import { n as RBXL_SIGNATURE, r as matchesSignature, t as RBXLX_SIGNATURE } from "./signatures-9rpsTjPL.mjs";
|
|
6
7
|
//#region src/domains/cloud-v2/places/builders.ts
|
|
7
8
|
const NON_UPDATABLE_KEYS = new Set(["placeId", "universeId"]);
|
|
8
9
|
/**
|
|
@@ -117,62 +118,6 @@ function isPlaceWire(body) {
|
|
|
117
118
|
return isRecord(body) && hasValidPlaceRequired(body) && hasValidPlaceOptional(body);
|
|
118
119
|
}
|
|
119
120
|
//#endregion
|
|
120
|
-
//#region src/domains/universes/places/signatures.ts
|
|
121
|
-
/**
|
|
122
|
-
* Magic-byte prefix every Roblox binary place file (`.rbxl`) starts with.
|
|
123
|
-
* The first 8 bytes spell out `<roblox!` in ASCII; the remaining 6 bytes
|
|
124
|
-
* (`\x89\xff\r\n\x1a\n`) are the binary-format marker that distinguishes a
|
|
125
|
-
* binary place file from the XML form (`.rbxlx`), whose ASCII-only header
|
|
126
|
-
* begins with `<roblox `.
|
|
127
|
-
*/
|
|
128
|
-
const RBXL_SIGNATURE = new Uint8Array([
|
|
129
|
-
60,
|
|
130
|
-
114,
|
|
131
|
-
111,
|
|
132
|
-
98,
|
|
133
|
-
108,
|
|
134
|
-
111,
|
|
135
|
-
120,
|
|
136
|
-
33,
|
|
137
|
-
137,
|
|
138
|
-
255,
|
|
139
|
-
13,
|
|
140
|
-
10,
|
|
141
|
-
26,
|
|
142
|
-
10
|
|
143
|
-
]);
|
|
144
|
-
/**
|
|
145
|
-
* Magic-byte prefix every Roblox XML place file (`.rbxlx`) starts with.
|
|
146
|
-
* Equivalent to the ASCII string `<roblox ` (note the trailing space): a
|
|
147
|
-
* well-formed rbxlx file opens with `<roblox` followed by attributes, while
|
|
148
|
-
* an rbxl file uses `<roblox!` (exclamation mark) as the eighth byte. The
|
|
149
|
-
* trailing space is what proves the file is the XML variant rather than
|
|
150
|
-
* the binary one.
|
|
151
|
-
*/
|
|
152
|
-
const RBXLX_SIGNATURE = new Uint8Array([
|
|
153
|
-
60,
|
|
154
|
-
114,
|
|
155
|
-
111,
|
|
156
|
-
98,
|
|
157
|
-
108,
|
|
158
|
-
111,
|
|
159
|
-
120,
|
|
160
|
-
32
|
|
161
|
-
]);
|
|
162
|
-
/**
|
|
163
|
-
* Reports whether `body` begins with `signature`. A pure byte-prefix check
|
|
164
|
-
* with no allocation; used by the place builder to disambiguate `.rbxl` and
|
|
165
|
-
* `.rbxlx` payloads against their declared `format`.
|
|
166
|
-
*
|
|
167
|
-
* @param body - The caller-supplied place file bytes.
|
|
168
|
-
* @param signature - One of the frozen signature constants from this module.
|
|
169
|
-
* @returns `true` if every byte of `signature` matches `body[0..signature.length]`.
|
|
170
|
-
*/
|
|
171
|
-
function matchesSignature(body, signature) {
|
|
172
|
-
for (const [index, expected] of signature.entries()) if (body[index] !== expected) return false;
|
|
173
|
-
return true;
|
|
174
|
-
}
|
|
175
|
-
//#endregion
|
|
176
121
|
//#region src/domains/universes/places/builders.ts
|
|
177
122
|
const CONTENT_TYPE_BY_FORMAT = {
|
|
178
123
|
rbxl: "application/octet-stream",
|
package/dist/places.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"places.mjs","names":["#inner"],"sources":["../src/domains/cloud-v2/places/builders.ts","../src/domains/cloud-v2/places/operations.ts","../src/domains/cloud-v2/places/parsers.ts","../src/domains/universes/places/signatures.ts","../src/domains/universes/places/builders.ts","../src/domains/universes/places/operations.ts","../src/domains/universes/places/parsers.ts","../src/resources/places/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { UpdatePlaceParameters } from \"./types.ts\";\n\nconst NON_UPDATABLE_KEYS: ReadonlySet<string> = new Set([\"placeId\", \"universeId\"]);\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update place\" endpoint.\n * Derives the `updateMask` query string from the keys present on\n * `parameters` (excluding the identifiers) and emits a JSON body\n * containing those same fields.\n *\n * @param parameters - The universe and place identifiers plus the fields\n * to update.\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when no updatable fields were supplied.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdatePlaceParameters,\n): Result<HttpRequest, ValidationError> {\n\tconst fieldKeys = extractUpdateFieldKeys(parameters);\n\n\tif (fieldKeys.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Update must include at least one field\", {\n\t\t\t\tcode: \"empty_update\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst body = Object.fromEntries(\n\t\tfieldKeys.map((key): readonly [string, unknown] => [key, Reflect.get(parameters, key)]),\n\t);\n\tconst updateMask = fieldKeys.join(\",\");\n\tconst { placeId, universeId } = parameters;\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": \"application/json\" },\n\t\t\tmethod: \"PATCH\",\n\t\t\turl: `/cloud/v2/universes/${universeId}/places/${placeId}?updateMask=${updateMask}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction extractUpdateFieldKeys(parameters: UpdatePlaceParameters): ReadonlyArray<string> {\n\treturn Object.keys(parameters).filter((key) => !NON_UPDATABLE_KEYS.has(key));\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst UPDATE_PER_MINUTE = 100;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for updating a place, from the Open Cloud\n * OpenAPI schema (100 requests per minute per API key owner). Keyed\n * independently from the publish operation so publish and update do\n * not share a queue; upstream quota accounting is not documented as\n * shared and the conservative default is fewer cross-method\n * contention surprises.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: UPDATE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"places.update\",\n});\n\n/**\n * Scopes required to update a place's metadata, sourced from\n * `x-roblox-scopes` on the `Cloud_UpdatePlace` operation in the vendored\n * OpenAPI schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe.place:write\",\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 { Place } from \"./types.ts\";\nimport type { PlaceWire } from \"./wire.ts\";\n\nconst MALFORMED_PLACE_MESSAGE = \"Malformed place response\";\n\ninterface ToPlaceArgs {\n\treadonly id: string;\n\treadonly body: PlaceWire;\n\treadonly universeId: string;\n}\n\n/**\n * Parses a successful Open Cloud `Place` response body into the public\n * {@link Place} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link Place}, or an\n * {@link ApiError} when the body does not match the wire schema.\n */\nexport function parsePlaceResponse(response: HttpResponse): Result<Place, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isPlaceWire(body)) {\n\t\treturn malformedPlace(statusCode);\n\t}\n\n\tconst match = /^universes\\/(\\d+)\\/places\\/(\\d+)$/.exec(body.path);\n\tconst universeId = match?.[1];\n\tconst id = match?.[2];\n\tif (id === undefined || universeId === undefined) {\n\t\treturn malformedPlace(statusCode);\n\t}\n\n\treturn { data: toPlace({ id, body, universeId }), success: true };\n}\n\nfunction malformedPlace(statusCode: number): Result<Place, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_PLACE_MESSAGE, { statusCode }),\n\t\tsuccess: false,\n\t};\n}\n\nfunction toPlace(args: ToPlaceArgs): Place {\n\tconst { id, body, universeId } = args;\n\treturn {\n\t\tid,\n\t\tcreatedAt: new Date(body.createTime),\n\t\tdescription: body.description,\n\t\tdisplayName: body.displayName,\n\t\troot: body.root ?? false,\n\t\tserverSize: body.serverSize ?? undefined,\n\t\tuniverseId,\n\t\tuniverseRuntimeCreation: body.universeRuntimeCreation ?? false,\n\t\tupdatedAt: new Date(body.updateTime),\n\t};\n}\n\nfunction hasValidPlaceRequired(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"path\"] === \"string\" &&\n\t\tisDateTimeString(body[\"createTime\"]) &&\n\t\tisDateTimeString(body[\"updateTime\"]) &&\n\t\ttypeof body[\"displayName\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\"\n\t);\n}\n\nfunction isOptionalBoolean(value: unknown): boolean {\n\treturn value === undefined || value === null || typeof value === \"boolean\";\n}\n\nfunction hasValidPlaceOptional(body: Record<string, unknown>): boolean {\n\tconst serverSize = body[\"serverSize\"] ?? undefined;\n\treturn (\n\t\t(serverSize === undefined || typeof serverSize === \"number\") &&\n\t\tisOptionalBoolean(body[\"root\"]) &&\n\t\tisOptionalBoolean(body[\"universeRuntimeCreation\"])\n\t);\n}\n\nfunction isPlaceWire(body: unknown): body is PlaceWire {\n\treturn isRecord(body) && hasValidPlaceRequired(body) && hasValidPlaceOptional(body);\n}\n","/**\n * Magic-byte prefix every Roblox binary place file (`.rbxl`) starts with.\n * The first 8 bytes spell out `<roblox!` in ASCII; the remaining 6 bytes\n * (`\\x89\\xff\\r\\n\\x1a\\n`) are the binary-format marker that distinguishes a\n * binary place file from the XML form (`.rbxlx`), whose ASCII-only header\n * begins with `<roblox `.\n */\nexport const RBXL_SIGNATURE: Readonly<Uint8Array<ArrayBuffer>> = new Uint8Array([\n\t0x3c, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x21, 0x89, 0xff, 0x0d, 0x0a, 0x1a, 0x0a,\n]);\n\n/**\n * Magic-byte prefix every Roblox XML place file (`.rbxlx`) starts with.\n * Equivalent to the ASCII string `<roblox ` (note the trailing space): a\n * well-formed rbxlx file opens with `<roblox` followed by attributes, while\n * an rbxl file uses `<roblox!` (exclamation mark) as the eighth byte. The\n * trailing space is what proves the file is the XML variant rather than\n * the binary one.\n */\nexport const RBXLX_SIGNATURE: Readonly<Uint8Array<ArrayBuffer>> = new Uint8Array([\n\t0x3c, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x20,\n]);\n\n/**\n * Reports whether `body` begins with `signature`. A pure byte-prefix check\n * with no allocation; used by the place builder to disambiguate `.rbxl` and\n * `.rbxlx` payloads against their declared `format`.\n *\n * @param body - The caller-supplied place file bytes.\n * @param signature - One of the frozen signature constants from this module.\n * @returns `true` if every byte of `signature` matches `body[0..signature.length]`.\n */\nexport function matchesSignature(\n\tbody: Uint8Array,\n\tsignature: Readonly<Uint8Array<ArrayBuffer>>,\n): boolean {\n\tfor (const [index, expected] of signature.entries()) {\n\t\tif (body[index] !== expected) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n","import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport { matchesSignature, RBXL_SIGNATURE, RBXLX_SIGNATURE } from \"./signatures.ts\";\nimport type { PublishParameters } from \"./types.ts\";\n\n/**\n * Whether a publish call writes a live (`Published`) or draft (`Saved`)\n * version. Surfaces only as the `versionType` query string on the\n * underlying HTTP request.\n */\ntype VersionType = \"Published\" | \"Saved\";\n\nconst CONTENT_TYPE_BY_FORMAT: Readonly<Record<PublishParameters[\"format\"], string>> = {\n\trbxl: \"application/octet-stream\",\n\trbxlx: \"application/xml\",\n};\n\n/**\n * Builds a `POST` request for the Open Cloud \"publish place version\"\n * endpoint. Performs two local validations before producing any\n * {@link HttpRequest}: a non-empty body check and a magic-byte check\n * that the bytes' actual format matches `parameters.format`.\n *\n * @param parameters - Universe and place identifiers, the place file\n * bytes, and the declared `format` of those bytes.\n * @param versionType - `\"Published\"` for `publish()`, `\"Saved\"` for\n * `save()`; baked into the `?versionType=` query string.\n * @returns A success result wrapping the request on success, or a\n * {@link ValidationError} when the body is empty or its magic bytes\n * disagree with `parameters.format`.\n */\nexport function buildPublishRequest(\n\tparameters: PublishParameters,\n\tversionType: VersionType,\n): Result<HttpRequest, ValidationError> {\n\tconst { body, format, placeId, universeId } = parameters;\n\n\tif (body.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Place body is empty\", { code: \"empty_body\" }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst expectedSignature = format === \"rbxl\" ? RBXL_SIGNATURE : RBXLX_SIGNATURE;\n\tif (!matchesSignature(body, expectedSignature)) {\n\t\treturn {\n\t\t\terr: new ValidationError(`Place body does not match the declared \"${format}\" format`, {\n\t\t\t\tcode: \"format_mismatch\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": CONTENT_TYPE_BY_FORMAT[format] },\n\t\t\tmethod: \"POST\",\n\t\t\turl: `/universes/v1/${universeId}/places/${placeId}/versions?versionType=${versionType}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for publishing or saving a place version,\n * from the Open Cloud OpenAPI schema (30 requests per minute, expressed\n * here as `0.5` per second). The publish and save methods both reference\n * this constant so that a single per-API-key queue serves both, matching\n * Roblox's server-side accounting which counts both call types against\n * the same per-minute quota.\n */\nexport const PUBLISH_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 0.5,\n\toperationKey: \"places.publishVersion\",\n});\n\n/**\n * Scopes required to publish or save a place version, sourced from\n * `x-roblox-scopes` on the `Places_CreatePlaceVersionApiKey` operation\n * in the vendored OpenAPI schema.\n */\nexport const PUBLISH_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe-places:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { PlaceVersion } from \"./types.ts\";\nimport type { PlaceVersionWire } from \"./wire.ts\";\n\n/**\n * Parses a successful publish-version response into the public\n * {@link PlaceVersion} shape. The Roblox endpoint sometimes returns the\n * JSON-shaped body under a `text/plain` `Content-Type`, so the body may\n * arrive either pre-decoded as a JSON object or still in its raw string\n * form; both are accepted here.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link PlaceVersion}, or\n * an {@link ApiError} when the body is malformed or its `versionNumber`\n * field is missing/wrong-typed.\n */\nexport function parsePublishResponse(response: HttpResponse): Result<PlaceVersion, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tconst decodeResult = decodeBody(body, statusCode);\n\tif (!decodeResult.success) {\n\t\treturn decodeResult;\n\t}\n\n\tif (!isPlaceVersionWire(decodeResult.data)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed publish response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: { versionNumber: decodeResult.data.versionNumber },\n\t\tsuccess: true,\n\t};\n}\n\nfunction decodeBody(body: unknown, statusCode: number): Result<unknown, ApiError> {\n\tif (typeof body !== \"string\") {\n\t\treturn { data: body, success: true };\n\t}\n\n\ttry {\n\t\treturn { data: JSON.parse(body), success: true };\n\t} catch {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed publish response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n}\n\nfunction isPlaceVersionWire(value: unknown): value is PlaceVersionWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn typeof value[\"versionNumber\"] === \"number\";\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { LIST_LOGS_SPEC } from \"../../domains/cloud-v2/luau-execution-task-logs/specs.ts\";\nimport type {\n\tListLogsParameters,\n\tLogPage,\n} from \"../../domains/cloud-v2/luau-execution-task-logs/types.ts\";\nimport {\n\tGET_SPEC,\n\tSUBMIT_HEAD_SPEC,\n\tSUBMIT_VERSION_SPEC,\n} from \"../../domains/cloud-v2/luau-execution-tasks/specs.ts\";\nimport type {\n\tGetParameters,\n\tLuauExecutionTask,\n\tLuauExecutionTaskRef,\n\tSubmitAtHeadParameters,\n\tSubmitAtVersionParameters,\n} from \"../../domains/cloud-v2/luau-execution-tasks/types.ts\";\nimport { buildUpdateRequest } from \"../../domains/cloud-v2/places/builders.ts\";\nimport {\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/cloud-v2/places/operations.ts\";\nimport { parsePlaceResponse } from \"../../domains/cloud-v2/places/parsers.ts\";\nimport type { Place, UpdatePlaceParameters } from \"../../domains/cloud-v2/places/types.ts\";\nimport { buildPublishRequest } from \"../../domains/universes/places/builders.ts\";\nimport {\n\tPUBLISH_OPERATION_LIMIT,\n\tPUBLISH_REQUIRED_SCOPES,\n} from \"../../domains/universes/places/operations.ts\";\nimport { parsePublishResponse } from \"../../domains/universes/places/parsers.ts\";\nimport type { PlaceVersion, PublishParameters } from \"../../domains/universes/places/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport { ResourceClient, type ResourceMethodSpec } from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\nimport { buildPollDeps, submitAndPoll } from \"../luau-execution/polling-helpers.ts\";\nimport { pollUntilDoneCore, type PollUntilDoneOptions } from \"../luau-execution/polling.ts\";\n\n/**\n * Operation Group exposed by {@link PlacesClient} as the\n * `luauExecution` namespace. Provides `submit` to queue a Luau script,\n * `get` to fetch a task's current state, and `listLogs` to retrieve\n * structured log messages. Shares the same dispatch wiring as the\n * top-level `LuauExecutionClient` exposed at\n * `@bedrock-rbx/ocale/luau-execution`.\n */\nexport interface LuauExecutionHandle {\n\t/**\n\t * Fetches the current state of a previously-submitted Luau\n\t * execution task. Uses idempotent retry semantics for both 429 and\n\t * 5xx.\n\t *\n\t * @param parameters - The task ref plus an optional `view` selector.\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\n\t * {@link LuauExecutionTask} or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tget(\n\t\tparameters: GetParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n\t/**\n\t * Lists one page of structured log messages produced by a\n\t * previously-submitted Luau execution task. Messages from multiple\n\t * server-side chunks are flattened into a single ordered array.\n\t * Uses idempotent retry semantics for both 429 and 5xx.\n\t *\n\t * @param parameters - The task ref and optional pagination controls\n\t * (`pageSize`, `pageToken`).\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 LogPage} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tlistLogs(\n\t\tparameters: ListLogsParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LogPage, OpenCloudError>>;\n\t/**\n\t * Polls `get` with `view=BASIC` on a configurable backoff schedule until\n\t * the task reaches a terminal state, the wall-clock budget is exhausted,\n\t * or the supplied `AbortSignal` fires. Returns the terminal task on\n\t * success.\n\t *\n\t * @param ref - Reference to the task to poll, typically returned by `submit`.\n\t * @param options - Polling and per-request overrides.\n\t * @returns A {@link Result} wrapping the terminal {@link LuauExecutionTask},\n\t * or an error if aborted, timed out, or the transport fails.\n\t */\n\tpollUntilDone(\n\t\tref: LuauExecutionTaskRef,\n\t\toptions?: PollUntilDoneOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n\t/**\n\t * Submits a Luau script and polls `get` with `view=BASIC` until the\n\t * task reaches a terminal state, the wall-clock budget is exhausted,\n\t * or the supplied `AbortSignal` fires. Combines `submit` and\n\t * `pollUntilDone` in one call.\n\t *\n\t * @param parameters - The same input accepted by `submit`.\n\t * @param options - Polling and per-request overrides.\n\t * @returns A {@link Result} wrapping the terminal\n\t * {@link LuauExecutionTask}, or an error if submit fails, the task\n\t * is aborted, timed out, or the transport fails.\n\t */\n\trunUntilDone(\n\t\tparameters: SubmitAtHeadParameters | SubmitAtVersionParameters,\n\t\toptions?: PollUntilDoneOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n\t/**\n\t * Submits a Luau script for execution against a place. Dispatches\n\t * to the head-version URL when `versionId` is omitted, or to the\n\t * specific-version URL when one is supplied. Both URL shapes share\n\t * one rate-limit queue and one required-scope set.\n\t *\n\t * @param parameters - The universe and place identifiers, the\n\t * script to run, an optional `versionId`, and any other writable\n\t * submit fields.\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\n\t * {@link LuauExecutionTask} or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tsubmit(\n\t\tparameters: SubmitAtHeadParameters | SubmitAtVersionParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n}\n\nfunction makePublishSpec(\n\tversionType: \"Published\" | \"Saved\",\n): ResourceMethodSpec<PublishParameters, PlaceVersion> {\n\treturn Object.freeze({\n\t\tbuildRequest: (parameters: PublishParameters) =>\n\t\t\tbuildPublishRequest(parameters, versionType),\n\t\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\t\tmethodKind: \"create\",\n\t\toperationLimit: PUBLISH_OPERATION_LIMIT,\n\t\tparse: parsePublishResponse,\n\t\trequiredScopes: PUBLISH_REQUIRED_SCOPES,\n\t});\n}\n\nconst PUBLISH_SPEC = makePublishSpec(\"Published\");\nconst SAVE_SPEC = makePublishSpec(\"Saved\");\n\nconst UPDATE_SPEC: ResourceMethodSpec<UpdatePlaceParameters, Place> = Object.freeze({\n\tbuildRequest: buildUpdateRequest,\n\tmethodDefaults: {},\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parsePlaceResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\n/**\n * Public client for the Roblox Open Cloud `Place` resource. Covers\n * place-version publishing (`publish`, `save`), place-configuration\n * updates (`update`), and the Luau execution Operation Group\n * (`luauExecution.submit`, `luauExecution.get`). Every method returns\n * a {@link Result} so callers handle failure explicitly; no thrown\n * {@link OpenCloudError} ever escapes the client.\n *\n * Publishing or saving a 5xx-failed place version is not retried\n * automatically: Roblox does not support idempotency keys, so a retry\n * could publish a duplicate version unnoticed. Callers that *can* detect\n * duplicates externally may opt back into 5xx retry per-call by passing\n * `retryableStatuses` on the second argument. The `update` method, by\n * contrast, is idempotent and retries both 429 and 5xx automatically.\n *\n * @example\n *\n * ```ts\n * import { PlacesClient } from \"@bedrock-rbx/ocale/places\";\n *\n * const client = new PlacesClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(PlacesClient);\n * ```\n */\nexport class PlacesClient {\n\treadonly #inner: ResourceClient;\n\n\tpublic readonly luauExecution: LuauExecutionHandle;\n\n\t/**\n\t * Creates a new {@link PlacesClient}. Configuration is frozen on\n\t * construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.luauExecution = createLuauExecutionHandle(this.#inner);\n\t}\n\n\t/**\n\t * Publishes a new live version of a place.\n\t *\n\t * @param parameters - Universe and place identifiers, the place file\n\t * bytes, and their declared `format`.\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 PlaceVersion}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async publish(\n\t\tparameters: PublishParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<PlaceVersion, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: PUBLISH_SPEC });\n\t}\n\n\t/**\n\t * Saves a new draft version of a place. Identical to {@link publish}\n\t * except the resulting version is not made live; consumers can list or\n\t * promote it later. Shares a single per-API-key rate-limit queue with\n\t * `publish` because Roblox attributes both calls to the same per-minute\n\t * quota.\n\t *\n\t * @param parameters - Universe and place identifiers, the place file\n\t * bytes, and their declared `format`.\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 PlaceVersion}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async save(\n\t\tparameters: PublishParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<PlaceVersion, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: SAVE_SPEC });\n\t}\n\n\t/**\n\t * Partially updates a place's configuration. The fields supplied on\n\t * `parameters` (excluding the identifiers) are forwarded to the\n\t * server via a Google-style `updateMask`; unmentioned fields are\n\t * left untouched. The universe's root place is the canonical place\n\t * to update when changing a universe's description or display name:\n\t * both are derived server-side from the root place.\n\t *\n\t * @param parameters - The universe and place identifiers and the\n\t * fields to update. At least one writable field must be supplied.\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 Place} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdatePlaceParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Place, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLuauExecutionHandle(inner: ResourceClient): LuauExecutionHandle {\n\treturn {\n\t\tasync get(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: GET_SPEC });\n\t\t},\n\t\tasync listLogs(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: LIST_LOGS_SPEC });\n\t\t},\n\t\tasync pollUntilDone(ref, options = {}) {\n\t\t\treturn pollUntilDoneCore(buildPollDeps(inner, { options, ref }), options);\n\t\t},\n\t\tasync runUntilDone(parameters, options = {}) {\n\t\t\treturn submitAndPoll(inner, { options, parameters });\n\t\t},\n\t\tasync submit(parameters, options) {\n\t\t\tif (\"versionId\" in parameters) {\n\t\t\t\treturn inner.execute({ options, parameters, spec: SUBMIT_VERSION_SPEC });\n\t\t\t}\n\n\t\t\treturn inner.execute({ options, parameters, spec: SUBMIT_HEAD_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;AAKA,MAAM,qBAA0C,IAAI,IAAI,CAAC,WAAW,aAAa,CAAC;;;;;;;;;;;;AAalF,SAAgB,mBACf,YACuC;CACvC,MAAM,YAAY,uBAAuB,WAAW;AAEpD,KAAI,UAAU,WAAW,EACxB,QAAO;EACN,KAAK,IAAI,gBAAgB,0CAA0C,EAClE,MAAM,gBACN,CAAC;EACF,SAAS;EACT;CAGF,MAAM,OAAO,OAAO,YACnB,UAAU,KAAK,QAAoC,CAAC,KAAK,QAAQ,IAAI,YAAY,IAAI,CAAC,CAAC,CACvF;CACD,MAAM,aAAa,UAAU,KAAK,IAAI;CACtC,MAAM,EAAE,SAAS,eAAe;AAChC,QAAO;EACN,MAAM;GACL;GACA,SAAS,EAAE,gBAAgB,oBAAoB;GAC/C,QAAQ;GACR,KAAK,uBAAuB,WAAW,UAAU,QAAQ,cAAc;GACvE;EACD,SAAS;EACT;;AAGF,SAAS,uBAAuB,YAA0D;AACzF,QAAO,OAAO,KAAK,WAAW,CAAC,QAAQ,QAAQ,CAAC,mBAAmB,IAAI,IAAI,CAAC;;;;;;;;;;ACpC7E,MAAa,yBAAyC,OAAO,OAAO;CACnE,cAZy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AAgB,0BAA0B,MAAA,MAAY;;;;;;;;;;;;CAa5D,MAAa,QACZ,YACA,SACgD;AAChD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAc,CAAC;;;;;;;;;;;;;;;;CAiBxE,MAAa,KACZ,YACA,SACgD;AAChD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAW,CAAC;;;;;;;;;;;;;;;;;CAkBrE,MAAa,OACZ,YACA,SACyC;AACzC,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;AAIxE,SAAS,0BAA0B,OAA4C;AAC9E,QAAO;EACN,MAAM,IAAI,YAAY,SAAS;AAC9B,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAU,CAAC;;EAE9D,MAAM,SAAS,YAAY,SAAS;AACnC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAgB,CAAC;;EAEpE,MAAM,cAAc,KAAK,UAAU,EAAE,EAAE;AACtC,UAAO,kBAAkB,cAAc,OAAO;IAAE;IAAS;IAAK,CAAC,EAAE,QAAQ;;EAE1E,MAAM,aAAa,YAAY,UAAU,EAAE,EAAE;AAC5C,UAAO,cAAc,OAAO;IAAE;IAAS;IAAY,CAAC;;EAErD,MAAM,OAAO,YAAY,SAAS;AACjC,OAAI,eAAe,WAClB,QAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAqB,CAAC;AAGzE,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE"}
|
|
1
|
+
{"version":3,"file":"places.mjs","names":["#inner"],"sources":["../src/domains/cloud-v2/places/builders.ts","../src/domains/cloud-v2/places/operations.ts","../src/domains/cloud-v2/places/parsers.ts","../src/domains/universes/places/builders.ts","../src/domains/universes/places/operations.ts","../src/domains/universes/places/parsers.ts","../src/resources/places/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { UpdatePlaceParameters } from \"./types.ts\";\n\nconst NON_UPDATABLE_KEYS: ReadonlySet<string> = new Set([\"placeId\", \"universeId\"]);\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update place\" endpoint.\n * Derives the `updateMask` query string from the keys present on\n * `parameters` (excluding the identifiers) and emits a JSON body\n * containing those same fields.\n *\n * @param parameters - The universe and place identifiers plus the fields\n * to update.\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when no updatable fields were supplied.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdatePlaceParameters,\n): Result<HttpRequest, ValidationError> {\n\tconst fieldKeys = extractUpdateFieldKeys(parameters);\n\n\tif (fieldKeys.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Update must include at least one field\", {\n\t\t\t\tcode: \"empty_update\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst body = Object.fromEntries(\n\t\tfieldKeys.map((key): readonly [string, unknown] => [key, Reflect.get(parameters, key)]),\n\t);\n\tconst updateMask = fieldKeys.join(\",\");\n\tconst { placeId, universeId } = parameters;\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": \"application/json\" },\n\t\t\tmethod: \"PATCH\",\n\t\t\turl: `/cloud/v2/universes/${universeId}/places/${placeId}?updateMask=${updateMask}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction extractUpdateFieldKeys(parameters: UpdatePlaceParameters): ReadonlyArray<string> {\n\treturn Object.keys(parameters).filter((key) => !NON_UPDATABLE_KEYS.has(key));\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst UPDATE_PER_MINUTE = 100;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for updating a place, from the Open Cloud\n * OpenAPI schema (100 requests per minute per API key owner). Keyed\n * independently from the publish operation so publish and update do\n * not share a queue; upstream quota accounting is not documented as\n * shared and the conservative default is fewer cross-method\n * contention surprises.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: UPDATE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"places.update\",\n});\n\n/**\n * Scopes required to update a place's metadata, sourced from\n * `x-roblox-scopes` on the `Cloud_UpdatePlace` operation in the vendored\n * OpenAPI schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe.place:write\",\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 { Place } from \"./types.ts\";\nimport type { PlaceWire } from \"./wire.ts\";\n\nconst MALFORMED_PLACE_MESSAGE = \"Malformed place response\";\n\ninterface ToPlaceArgs {\n\treadonly id: string;\n\treadonly body: PlaceWire;\n\treadonly universeId: string;\n}\n\n/**\n * Parses a successful Open Cloud `Place` response body into the public\n * {@link Place} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link Place}, or an\n * {@link ApiError} when the body does not match the wire schema.\n */\nexport function parsePlaceResponse(response: HttpResponse): Result<Place, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isPlaceWire(body)) {\n\t\treturn malformedPlace(statusCode);\n\t}\n\n\tconst match = /^universes\\/(\\d+)\\/places\\/(\\d+)$/.exec(body.path);\n\tconst universeId = match?.[1];\n\tconst id = match?.[2];\n\tif (id === undefined || universeId === undefined) {\n\t\treturn malformedPlace(statusCode);\n\t}\n\n\treturn { data: toPlace({ id, body, universeId }), success: true };\n}\n\nfunction malformedPlace(statusCode: number): Result<Place, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_PLACE_MESSAGE, { statusCode }),\n\t\tsuccess: false,\n\t};\n}\n\nfunction toPlace(args: ToPlaceArgs): Place {\n\tconst { id, body, universeId } = args;\n\treturn {\n\t\tid,\n\t\tcreatedAt: new Date(body.createTime),\n\t\tdescription: body.description,\n\t\tdisplayName: body.displayName,\n\t\troot: body.root ?? false,\n\t\tserverSize: body.serverSize ?? undefined,\n\t\tuniverseId,\n\t\tuniverseRuntimeCreation: body.universeRuntimeCreation ?? false,\n\t\tupdatedAt: new Date(body.updateTime),\n\t};\n}\n\nfunction hasValidPlaceRequired(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"path\"] === \"string\" &&\n\t\tisDateTimeString(body[\"createTime\"]) &&\n\t\tisDateTimeString(body[\"updateTime\"]) &&\n\t\ttypeof body[\"displayName\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\"\n\t);\n}\n\nfunction isOptionalBoolean(value: unknown): boolean {\n\treturn value === undefined || value === null || typeof value === \"boolean\";\n}\n\nfunction hasValidPlaceOptional(body: Record<string, unknown>): boolean {\n\tconst serverSize = body[\"serverSize\"] ?? undefined;\n\treturn (\n\t\t(serverSize === undefined || typeof serverSize === \"number\") &&\n\t\tisOptionalBoolean(body[\"root\"]) &&\n\t\tisOptionalBoolean(body[\"universeRuntimeCreation\"])\n\t);\n}\n\nfunction isPlaceWire(body: unknown): body is PlaceWire {\n\treturn isRecord(body) && hasValidPlaceRequired(body) && hasValidPlaceOptional(body);\n}\n","import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport { matchesSignature, RBXL_SIGNATURE, RBXLX_SIGNATURE } from \"./signatures.ts\";\nimport type { PublishParameters } from \"./types.ts\";\n\n/**\n * Whether a publish call writes a live (`Published`) or draft (`Saved`)\n * version. Surfaces only as the `versionType` query string on the\n * underlying HTTP request.\n */\ntype VersionType = \"Published\" | \"Saved\";\n\nconst CONTENT_TYPE_BY_FORMAT: Readonly<Record<PublishParameters[\"format\"], string>> = {\n\trbxl: \"application/octet-stream\",\n\trbxlx: \"application/xml\",\n};\n\n/**\n * Builds a `POST` request for the Open Cloud \"publish place version\"\n * endpoint. Performs two local validations before producing any\n * {@link HttpRequest}: a non-empty body check and a magic-byte check\n * that the bytes' actual format matches `parameters.format`.\n *\n * @param parameters - Universe and place identifiers, the place file\n * bytes, and the declared `format` of those bytes.\n * @param versionType - `\"Published\"` for `publish()`, `\"Saved\"` for\n * `save()`; baked into the `?versionType=` query string.\n * @returns A success result wrapping the request on success, or a\n * {@link ValidationError} when the body is empty or its magic bytes\n * disagree with `parameters.format`.\n */\nexport function buildPublishRequest(\n\tparameters: PublishParameters,\n\tversionType: VersionType,\n): Result<HttpRequest, ValidationError> {\n\tconst { body, format, placeId, universeId } = parameters;\n\n\tif (body.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Place body is empty\", { code: \"empty_body\" }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst expectedSignature = format === \"rbxl\" ? RBXL_SIGNATURE : RBXLX_SIGNATURE;\n\tif (!matchesSignature(body, expectedSignature)) {\n\t\treturn {\n\t\t\terr: new ValidationError(`Place body does not match the declared \"${format}\" format`, {\n\t\t\t\tcode: \"format_mismatch\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": CONTENT_TYPE_BY_FORMAT[format] },\n\t\t\tmethod: \"POST\",\n\t\t\turl: `/universes/v1/${universeId}/places/${placeId}/versions?versionType=${versionType}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for publishing or saving a place version,\n * from the Open Cloud OpenAPI schema (30 requests per minute, expressed\n * here as `0.5` per second). The publish and save methods both reference\n * this constant so that a single per-API-key queue serves both, matching\n * Roblox's server-side accounting which counts both call types against\n * the same per-minute quota.\n */\nexport const PUBLISH_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 0.5,\n\toperationKey: \"places.publishVersion\",\n});\n\n/**\n * Scopes required to publish or save a place version, sourced from\n * `x-roblox-scopes` on the `Places_CreatePlaceVersionApiKey` operation\n * in the vendored OpenAPI schema.\n */\nexport const PUBLISH_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe-places:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { PlaceVersion } from \"./types.ts\";\nimport type { PlaceVersionWire } from \"./wire.ts\";\n\n/**\n * Parses a successful publish-version response into the public\n * {@link PlaceVersion} shape. The Roblox endpoint sometimes returns the\n * JSON-shaped body under a `text/plain` `Content-Type`, so the body may\n * arrive either pre-decoded as a JSON object or still in its raw string\n * form; both are accepted here.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link PlaceVersion}, or\n * an {@link ApiError} when the body is malformed or its `versionNumber`\n * field is missing/wrong-typed.\n */\nexport function parsePublishResponse(response: HttpResponse): Result<PlaceVersion, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tconst decodeResult = decodeBody(body, statusCode);\n\tif (!decodeResult.success) {\n\t\treturn decodeResult;\n\t}\n\n\tif (!isPlaceVersionWire(decodeResult.data)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed publish response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: { versionNumber: decodeResult.data.versionNumber },\n\t\tsuccess: true,\n\t};\n}\n\nfunction decodeBody(body: unknown, statusCode: number): Result<unknown, ApiError> {\n\tif (typeof body !== \"string\") {\n\t\treturn { data: body, success: true };\n\t}\n\n\ttry {\n\t\treturn { data: JSON.parse(body), success: true };\n\t} catch {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed publish response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n}\n\nfunction isPlaceVersionWire(value: unknown): value is PlaceVersionWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn typeof value[\"versionNumber\"] === \"number\";\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { LIST_LOGS_SPEC } from \"../../domains/cloud-v2/luau-execution-task-logs/specs.ts\";\nimport type {\n\tListLogsParameters,\n\tLogPage,\n} from \"../../domains/cloud-v2/luau-execution-task-logs/types.ts\";\nimport {\n\tGET_SPEC,\n\tSUBMIT_HEAD_SPEC,\n\tSUBMIT_VERSION_SPEC,\n} from \"../../domains/cloud-v2/luau-execution-tasks/specs.ts\";\nimport type {\n\tGetParameters,\n\tLuauExecutionTask,\n\tLuauExecutionTaskRef,\n\tSubmitAtHeadParameters,\n\tSubmitAtVersionParameters,\n} from \"../../domains/cloud-v2/luau-execution-tasks/types.ts\";\nimport { buildUpdateRequest } from \"../../domains/cloud-v2/places/builders.ts\";\nimport {\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/cloud-v2/places/operations.ts\";\nimport { parsePlaceResponse } from \"../../domains/cloud-v2/places/parsers.ts\";\nimport type { Place, UpdatePlaceParameters } from \"../../domains/cloud-v2/places/types.ts\";\nimport { buildPublishRequest } from \"../../domains/universes/places/builders.ts\";\nimport {\n\tPUBLISH_OPERATION_LIMIT,\n\tPUBLISH_REQUIRED_SCOPES,\n} from \"../../domains/universes/places/operations.ts\";\nimport { parsePublishResponse } from \"../../domains/universes/places/parsers.ts\";\nimport type { PlaceVersion, PublishParameters } from \"../../domains/universes/places/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport { ResourceClient, type ResourceMethodSpec } from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\nimport { buildPollDeps, submitAndPoll } from \"../luau-execution/polling-helpers.ts\";\nimport { pollUntilDoneCore, type PollUntilDoneOptions } from \"../luau-execution/polling.ts\";\n\n/**\n * Operation Group exposed by {@link PlacesClient} as the\n * `luauExecution` namespace. Provides `submit` to queue a Luau script,\n * `get` to fetch a task's current state, and `listLogs` to retrieve\n * structured log messages. Shares the same dispatch wiring as the\n * top-level `LuauExecutionClient` exposed at\n * `@bedrock-rbx/ocale/luau-execution`.\n */\nexport interface LuauExecutionHandle {\n\t/**\n\t * Fetches the current state of a previously-submitted Luau\n\t * execution task. Uses idempotent retry semantics for both 429 and\n\t * 5xx.\n\t *\n\t * @param parameters - The task ref plus an optional `view` selector.\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\n\t * {@link LuauExecutionTask} or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tget(\n\t\tparameters: GetParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n\t/**\n\t * Lists one page of structured log messages produced by a\n\t * previously-submitted Luau execution task. Messages from multiple\n\t * server-side chunks are flattened into a single ordered array.\n\t * Uses idempotent retry semantics for both 429 and 5xx.\n\t *\n\t * @param parameters - The task ref and optional pagination controls\n\t * (`pageSize`, `pageToken`).\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 LogPage} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tlistLogs(\n\t\tparameters: ListLogsParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LogPage, OpenCloudError>>;\n\t/**\n\t * Polls `get` with `view=BASIC` on a configurable backoff schedule until\n\t * the task reaches a terminal state, the wall-clock budget is exhausted,\n\t * or the supplied `AbortSignal` fires. Returns the terminal task on\n\t * success.\n\t *\n\t * @param ref - Reference to the task to poll, typically returned by `submit`.\n\t * @param options - Polling and per-request overrides.\n\t * @returns A {@link Result} wrapping the terminal {@link LuauExecutionTask},\n\t * or an error if aborted, timed out, or the transport fails.\n\t */\n\tpollUntilDone(\n\t\tref: LuauExecutionTaskRef,\n\t\toptions?: PollUntilDoneOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n\t/**\n\t * Submits a Luau script and polls `get` with `view=BASIC` until the\n\t * task reaches a terminal state, the wall-clock budget is exhausted,\n\t * or the supplied `AbortSignal` fires. Combines `submit` and\n\t * `pollUntilDone` in one call.\n\t *\n\t * @param parameters - The same input accepted by `submit`.\n\t * @param options - Polling and per-request overrides.\n\t * @returns A {@link Result} wrapping the terminal\n\t * {@link LuauExecutionTask}, or an error if submit fails, the task\n\t * is aborted, timed out, or the transport fails.\n\t */\n\trunUntilDone(\n\t\tparameters: SubmitAtHeadParameters | SubmitAtVersionParameters,\n\t\toptions?: PollUntilDoneOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n\t/**\n\t * Submits a Luau script for execution against a place. Dispatches\n\t * to the head-version URL when `versionId` is omitted, or to the\n\t * specific-version URL when one is supplied. Both URL shapes share\n\t * one rate-limit queue and one required-scope set.\n\t *\n\t * @param parameters - The universe and place identifiers, the\n\t * script to run, an optional `versionId`, and any other writable\n\t * submit fields.\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\n\t * {@link LuauExecutionTask} or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tsubmit(\n\t\tparameters: SubmitAtHeadParameters | SubmitAtVersionParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n}\n\nfunction makePublishSpec(\n\tversionType: \"Published\" | \"Saved\",\n): ResourceMethodSpec<PublishParameters, PlaceVersion> {\n\treturn Object.freeze({\n\t\tbuildRequest: (parameters: PublishParameters) =>\n\t\t\tbuildPublishRequest(parameters, versionType),\n\t\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\t\tmethodKind: \"create\",\n\t\toperationLimit: PUBLISH_OPERATION_LIMIT,\n\t\tparse: parsePublishResponse,\n\t\trequiredScopes: PUBLISH_REQUIRED_SCOPES,\n\t});\n}\n\nconst PUBLISH_SPEC = makePublishSpec(\"Published\");\nconst SAVE_SPEC = makePublishSpec(\"Saved\");\n\nconst UPDATE_SPEC: ResourceMethodSpec<UpdatePlaceParameters, Place> = Object.freeze({\n\tbuildRequest: buildUpdateRequest,\n\tmethodDefaults: {},\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parsePlaceResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\n/**\n * Public client for the Roblox Open Cloud `Place` resource. Covers\n * place-version publishing (`publish`, `save`), place-configuration\n * updates (`update`), and the Luau execution Operation Group\n * (`luauExecution.submit`, `luauExecution.get`). Every method returns\n * a {@link Result} so callers handle failure explicitly; no thrown\n * {@link OpenCloudError} ever escapes the client.\n *\n * Publishing or saving a 5xx-failed place version is not retried\n * automatically: Roblox does not support idempotency keys, so a retry\n * could publish a duplicate version unnoticed. Callers that *can* detect\n * duplicates externally may opt back into 5xx retry per-call by passing\n * `retryableStatuses` on the second argument. The `update` method, by\n * contrast, is idempotent and retries both 429 and 5xx automatically.\n *\n * @example\n *\n * ```ts\n * import { PlacesClient } from \"@bedrock-rbx/ocale/places\";\n *\n * const client = new PlacesClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(PlacesClient);\n * ```\n */\nexport class PlacesClient {\n\treadonly #inner: ResourceClient;\n\n\tpublic readonly luauExecution: LuauExecutionHandle;\n\n\t/**\n\t * Creates a new {@link PlacesClient}. Configuration is frozen on\n\t * construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.luauExecution = createLuauExecutionHandle(this.#inner);\n\t}\n\n\t/**\n\t * Publishes a new live version of a place.\n\t *\n\t * @param parameters - Universe and place identifiers, the place file\n\t * bytes, and their declared `format`.\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 PlaceVersion}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async publish(\n\t\tparameters: PublishParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<PlaceVersion, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: PUBLISH_SPEC });\n\t}\n\n\t/**\n\t * Saves a new draft version of a place. Identical to {@link publish}\n\t * except the resulting version is not made live; consumers can list or\n\t * promote it later. Shares a single per-API-key rate-limit queue with\n\t * `publish` because Roblox attributes both calls to the same per-minute\n\t * quota.\n\t *\n\t * @param parameters - Universe and place identifiers, the place file\n\t * bytes, and their declared `format`.\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 PlaceVersion}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async save(\n\t\tparameters: PublishParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<PlaceVersion, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: SAVE_SPEC });\n\t}\n\n\t/**\n\t * Partially updates a place's configuration. The fields supplied on\n\t * `parameters` (excluding the identifiers) are forwarded to the\n\t * server via a Google-style `updateMask`; unmentioned fields are\n\t * left untouched. The universe's root place is the canonical place\n\t * to update when changing a universe's description or display name:\n\t * both are derived server-side from the root place.\n\t *\n\t * @param parameters - The universe and place identifiers and the\n\t * fields to update. At least one writable field must be supplied.\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 Place} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdatePlaceParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Place, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLuauExecutionHandle(inner: ResourceClient): LuauExecutionHandle {\n\treturn {\n\t\tasync get(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: GET_SPEC });\n\t\t},\n\t\tasync listLogs(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: LIST_LOGS_SPEC });\n\t\t},\n\t\tasync pollUntilDone(ref, options = {}) {\n\t\t\treturn pollUntilDoneCore(buildPollDeps(inner, { options, ref }), options);\n\t\t},\n\t\tasync runUntilDone(parameters, options = {}) {\n\t\t\treturn submitAndPoll(inner, { options, parameters });\n\t\t},\n\t\tasync submit(parameters, options) {\n\t\t\tif (\"versionId\" in parameters) {\n\t\t\t\treturn inner.execute({ options, parameters, spec: SUBMIT_VERSION_SPEC });\n\t\t\t}\n\n\t\t\treturn inner.execute({ options, parameters, spec: SUBMIT_HEAD_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;AAKA,MAAM,qBAA0C,IAAI,IAAI,CAAC,WAAW,aAAa,CAAC;;;;;;;;;;;;AAalF,SAAgB,mBACf,YACuC;CACvC,MAAM,YAAY,uBAAuB,WAAW;AAEpD,KAAI,UAAU,WAAW,EACxB,QAAO;EACN,KAAK,IAAI,gBAAgB,0CAA0C,EAClE,MAAM,gBACN,CAAC;EACF,SAAS;EACT;CAGF,MAAM,OAAO,OAAO,YACnB,UAAU,KAAK,QAAoC,CAAC,KAAK,QAAQ,IAAI,YAAY,IAAI,CAAC,CAAC,CACvF;CACD,MAAM,aAAa,UAAU,KAAK,IAAI;CACtC,MAAM,EAAE,SAAS,eAAe;A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ChD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAc,CAAC;;;;;;;;;;;;;;;;CAiBxE,MAAa,KACZ,YACA,SACgD;AAChD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAW,CAAC;;;;;;;;;;;;;;;;;CAkBrE,MAAa,OACZ,YACA,SACyC;AACzC,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;AAIxE,SAAS,0BAA0B,OAA4C;AAC9E,QAAO;EACN,MAAM,IAAI,YAAY,SAAS;AAC9B,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAU,CAAC;;EAE9D,MAAM,SAAS,YAAY,SAAS;AACnC,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAgB,CAAC;;EAEpE,MAAM,cAAc,KAAK,UAAU,EAAE,EAAE;AACtC,UAAO,kBAAkB,cAAc,OAAO;IAAE;IAAS;IAAK,CAAC,EAAE,QAAQ;;EAE1E,MAAM,aAAa,YAAY,UAAU,EAAE,EAAE;AAC5C,UAAO,cAAc,OAAO;IAAE;IAAS;IAAY,CAAC;;EAErD,MAAM,OAAO,YAAY,SAAS;AACjC,OAAI,eAAe,WAClB,QAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAqB,CAAC;AAGzE,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as OpenCloudError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
2
|
//#region src/errors/poll-aborted.ts
|
|
3
3
|
/**
|
|
4
4
|
* Returned when `pollUntilDone` is interrupted by an `AbortSignal` before
|
|
@@ -76,4 +76,4 @@ var PollTimeoutError = class extends OpenCloudError {
|
|
|
76
76
|
//#endregion
|
|
77
77
|
export { PollAbortedError as n, PollTimeoutError as t };
|
|
78
78
|
|
|
79
|
-
//# sourceMappingURL=poll-timeout-
|
|
79
|
+
//# sourceMappingURL=poll-timeout-Dg_QFEqi.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poll-timeout-
|
|
1
|
+
{"version":3,"file":"poll-timeout-Dg_QFEqi.mjs","names":[],"sources":["../src/errors/poll-aborted.ts","../src/errors/poll-timeout.ts"],"sourcesContent":["import { OpenCloudError } from \"./base.ts\";\n\n/**\n * Options for constructing a {@link PollAbortedError}.\n */\nexport interface PollAbortedErrorOptions extends ErrorOptions {\n\t/** Whatever `AbortSignal.reason` was at the moment of abort. */\n\treadonly reason?: unknown;\n}\n\n/**\n * Returned when `pollUntilDone` is interrupted by an `AbortSignal` before\n * a terminal task state is reached. The `reason` field mirrors\n * `AbortSignal.reason` so callers can distinguish intentional cancellation\n * from unexpected abort sources.\n *\n * @example\n *\n * ```ts\n * import { PollAbortedError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new PollAbortedError(\"polling was aborted\", {\n * reason: \"user cancelled\",\n * });\n *\n * expect(error).toBeInstanceOf(PollAbortedError);\n * expect(error.reason).toBe(\"user cancelled\");\n * ```\n */\nexport class PollAbortedError extends OpenCloudError {\n\tpublic override readonly name: string = \"PollAbortedError\";\n\tpublic readonly reason?: unknown;\n\n\t/**\n\t * Creates a new PollAbortedError.\n\t *\n\t * @param message - Human-readable description of the abort.\n\t * @param options - Error options including the abort reason.\n\t */\n\tconstructor(message: string, options: PollAbortedErrorOptions = {}) {\n\t\tsuper(message, options);\n\t\tthis.reason = options.reason;\n\t}\n}\n","import { OpenCloudError } from \"./base.ts\";\n\n/**\n * Options for {@link PollTimeoutError}. The `T` type parameter captures the\n * resource-specific task variant the caller polled for; defaults to `unknown`\n * so the class can be reused by future Resources without forcing a parallel\n * hierarchy.\n *\n * @template T - Resource-specific task type being polled.\n */\nexport interface PollTimeoutErrorOptions<T = unknown> extends ErrorOptions {\n\t/** Last task observed before the timeout budget was exhausted. */\n\treadonly lastObservedTask?: T | undefined;\n\t/** Total wall-clock budget supplied by the caller, in ms. */\n\treadonly timeoutMs: number;\n}\n\n/**\n * Returned when `pollUntilDone` exhausts its wall-clock budget without\n * observing a terminal task state. Carries the last task polled so callers\n * can inspect state and decide whether to retry with a fresh budget.\n *\n * @template T - Resource-specific task type being polled.\n *\n * @example\n *\n * ```ts\n * import { PollTimeoutError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new PollTimeoutError(\"polling timed out after 5 s\", {\n * lastObservedTask: { state: \"PROCESSING\" as const },\n * timeoutMs: 5000,\n * });\n *\n * expect(error).toBeInstanceOf(PollTimeoutError);\n * expect(error.timeoutMs).toBe(5000);\n * expect(error.lastObservedTask).toStrictEqual({ state: \"PROCESSING\" });\n * ```\n */\nexport class PollTimeoutError<T = unknown> extends OpenCloudError {\n\tpublic readonly lastObservedTask: T | undefined;\n\tpublic override readonly name: string = \"PollTimeoutError\";\n\tpublic readonly timeoutMs: number;\n\n\t/**\n\t * Creates a new PollTimeoutError.\n\t *\n\t * @param message - Human-readable description of the timeout.\n\t * @param options - Error options including the budget and last-observed task.\n\t */\n\tconstructor(message: string, options: PollTimeoutErrorOptions<T>) {\n\t\tsuper(message, options);\n\t\tthis.lastObservedTask = options.lastObservedTask;\n\t\tthis.timeoutMs = options.timeoutMs;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,mBAAb,cAAsC,eAAe;CACpD,OAAwC;CACxC;;;;;;;CAQA,YAAY,SAAiB,UAAmC,EAAE,EAAE;AACnE,QAAM,SAAS,QAAQ;AACvB,OAAK,SAAS,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;ACFxB,IAAa,mBAAb,cAAmD,eAAe;CACjE;CACA,OAAwC;CACxC;;;;;;;CAQA,YAAY,SAAiB,SAAqC;AACjE,QAAM,SAAS,QAAQ;AACvB,OAAK,mBAAmB,QAAQ;AAChC,OAAK,YAAY,QAAQ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as RequestOptions } from "./types-
|
|
1
|
+
import { s as RequestOptions } from "./types-BOhSh9ug.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/domains/cloud-v2/luau-execution-tasks/types.d.ts
|
|
4
4
|
/**
|
|
@@ -250,4 +250,4 @@ interface PollOptions {
|
|
|
250
250
|
*/
|
|
251
251
|
//#endregion
|
|
252
252
|
export { CompleteTask as a, InProgressTask as c, SubmitAtHeadParameters as d, SubmitAtVersionParameters as f, LogPage as i, LuauExecutionTask as l, ListLogsParameters as n, FailedTask as o, LogMessage as r, GetParameters as s, PollUntilDoneOptions as t, LuauExecutionTaskRef as u };
|
|
253
|
-
//# sourceMappingURL=polling-
|
|
253
|
+
//# sourceMappingURL=polling-DDKKpz6Z.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polling-
|
|
1
|
+
{"version":3,"file":"polling-DDKKpz6Z.d.mts","names":[],"sources":["../src/domains/cloud-v2/luau-execution-tasks/types.ts","../src/domains/cloud-v2/luau-execution-task-logs/types.ts","../src/resources/luau-execution/polling.ts"],"mappings":";;;;;;AAKA;;UAAiB,sBAAA;EAAA;;;;EAAA,SAKP,WAAA;;WAEA,kBAAA;;WAEA,OAAA;EAiBV;EAAA,SAfU,MAAA;;;;;WAKA,cAAA;;WAEA,UAAA;AAAA;;;;AAsCV;;UA9BiB,yBAAA;EA8BA;;;;EAAA,SAzBP,WAAA;;WAEA,kBAAA;EAiCA;EAAA,SA/BA,OAAA;EAsCO;EAAA,SApCP,MAAA;EAsCK;;;;EAAA,SAjCL,cAAA;EAuCA;EAAA,SArCA,UAAA;EA6CO;EAAA,SA3CP,SAAA;AAAA;;AAsDV;;;;;;UA5CiB,oBAAA;EA4CqB;EAAA,SA1C5B,OAAA;;WAEA,SAAA;;WAEA,MAAA;;WAEA,UAAA;EA4CA;EAAA,SA1CA,SAAA;AAAA;;;;;UAOO,aAAA;;WAEP,GAAA,EAAK,oBAA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|
|
4
|
-
import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, o as defaultRetryDelay, s as isRecord } from "./resource-client-
|
|
1
|
+
import { r as ApiError } from "./rate-limit-D1q2Js-z.mjs";
|
|
2
|
+
import { n as PollAbortedError, t as PollTimeoutError } from "./poll-timeout-Dg_QFEqi.mjs";
|
|
3
|
+
import { t as ValidationError } from "./validation-DkL5KQqz.mjs";
|
|
4
|
+
import { a as IDEMPOTENT_METHOD_DEFAULTS, i as CREATE_METHOD_DEFAULTS, n as okRequest, o as defaultRetryDelay, s as isRecord } from "./resource-client-D7HKNrOp.mjs";
|
|
5
5
|
//#region src/domains/cloud-v2/luau-execution-task-logs/builders.ts
|
|
6
6
|
/**
|
|
7
7
|
* Builds a `GET` request for the Open Cloud "list Luau execution session
|
|
@@ -633,4 +633,4 @@ async function submitAndPoll(inner, args) {
|
|
|
633
633
|
//#endregion
|
|
634
634
|
export { SUBMIT_HEAD_SPEC as a, GET_SPEC as i, submitAndPoll as n, SUBMIT_VERSION_SPEC as o, pollUntilDoneCore as r, LIST_LOGS_SPEC as s, buildPollDeps as t };
|
|
635
635
|
|
|
636
|
-
//# sourceMappingURL=polling-helpers-
|
|
636
|
+
//# sourceMappingURL=polling-helpers-DJqtcrCQ.mjs.map
|