@bedrock-rbx/ocale 0.3.4 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -5
- package/dist/assets.d.mts +64 -0
- package/dist/assets.d.mts.map +1 -0
- package/dist/assets.mjs +301 -0
- package/dist/assets.mjs.map +1 -0
- package/dist/badge-insufficient-funds-BLFvQZt1.mjs +91 -0
- package/dist/badge-insufficient-funds-BLFvQZt1.mjs.map +1 -0
- package/dist/badges.d.mts +359 -196
- package/dist/badges.d.mts.map +1 -1
- package/dist/badges.mjs +493 -59
- package/dist/badges.mjs.map +1 -1
- package/dist/capacity-admission-Ce2V9QNb.d.mts +347 -0
- package/dist/capacity-admission-Ce2V9QNb.d.mts.map +1 -0
- package/dist/{data.generated-B2ceLfSn.d.mts → data.generated-B4Fztv_7.d.mts} +23 -25
- package/dist/data.generated-B4Fztv_7.d.mts.map +1 -0
- package/dist/developer-products.d.mts +207 -194
- package/dist/developer-products.d.mts.map +1 -1
- package/dist/developer-products.mjs +125 -39
- package/dist/developer-products.mjs.map +1 -1
- package/dist/game-passes.d.mts +206 -211
- package/dist/game-passes.d.mts.map +1 -1
- package/dist/game-passes.mjs +35 -36
- package/dist/game-passes.mjs.map +1 -1
- package/dist/index.d.mts +947 -366
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +324 -12
- package/dist/index.mjs.map +1 -1
- package/dist/is-date-time-string-C91G44SI.mjs +19 -0
- package/dist/is-date-time-string-C91G44SI.mjs.map +1 -0
- package/dist/locales.d.mts +28 -2
- package/dist/locales.d.mts.map +1 -0
- package/dist/locales.mjs +24 -3
- package/dist/locales.mjs.map +1 -1
- package/dist/luau-execution.d.mts +154 -157
- package/dist/luau-execution.d.mts.map +1 -1
- package/dist/luau-execution.mjs +15 -16
- package/dist/luau-execution.mjs.map +1 -1
- package/dist/{network-error-DR9FX5hb.mjs → network-error-P4An7nUB.mjs} +48 -14
- package/dist/network-error-P4An7nUB.mjs.map +1 -0
- package/dist/places.d.mts +258 -186
- package/dist/places.d.mts.map +1 -1
- package/dist/places.mjs +187 -35
- package/dist/places.mjs.map +1 -1
- package/dist/{poll-timeout-3PXLsabj.mjs → poll-timeout-BCxgN97O.mjs} +4 -6
- package/dist/{poll-timeout-3PXLsabj.mjs.map → poll-timeout-BCxgN97O.mjs.map} +1 -1
- package/dist/{polling-helpers-CoVhsC33.mjs → polling-helpers-BtEYR5dN.mjs} +260 -105
- package/dist/polling-helpers-BtEYR5dN.mjs.map +1 -0
- package/dist/{price-information-B0tkOoAX.mjs → price-information--d6GZAcp.mjs} +3 -4
- package/dist/{price-information-B0tkOoAX.mjs.map → price-information--d6GZAcp.mjs.map} +1 -1
- package/dist/resource-client-CF8SPsV8.d.mts +162 -0
- package/dist/resource-client-CF8SPsV8.d.mts.map +1 -0
- package/dist/{resource-client-rqTMkBeR.mjs → resource-client-Cm_bPcCs.mjs} +589 -197
- package/dist/resource-client-Cm_bPcCs.mjs.map +1 -0
- package/dist/retry-DYxm_eBU.d.mts +225 -0
- package/dist/retry-DYxm_eBU.d.mts.map +1 -0
- package/dist/{retry-BlX4tUnT.mjs → retry-Dv5TsY9O.mjs} +312 -54
- package/dist/retry-Dv5TsY9O.mjs.map +1 -0
- package/dist/{signatures-JF-7Psce.mjs → signatures-CtJ7jfVN.mjs} +2 -3
- package/dist/{signatures-JF-7Psce.mjs.map → signatures-CtJ7jfVN.mjs.map} +1 -1
- package/dist/storage.d.mts +333 -344
- package/dist/storage.d.mts.map +1 -1
- package/dist/storage.mjs +39 -40
- package/dist/storage.mjs.map +1 -1
- package/dist/testing.d.mts +369 -434
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +18 -33
- package/dist/testing.mjs.map +1 -1
- package/dist/{to-blob-RPqMBuft.mjs → to-blob-Bqu7bmlE.mjs} +2 -3
- package/dist/{to-blob-RPqMBuft.mjs.map → to-blob-Bqu7bmlE.mjs.map} +1 -1
- package/dist/types-Z4abDJfK.d.mts +501 -0
- package/dist/types-Z4abDJfK.d.mts.map +1 -0
- package/dist/universes.d.mts +619 -436
- package/dist/universes.d.mts.map +1 -1
- package/dist/universes.mjs +432 -79
- package/dist/universes.mjs.map +1 -1
- package/dist/{validation-B_Zs1So2.mjs → validation-kaTLLAD1.mjs} +3 -4
- package/dist/{validation-B_Zs1So2.mjs.map → validation-kaTLLAD1.mjs.map} +1 -1
- package/dist/wire-DDG87I-d.d.mts +39 -0
- package/dist/wire-DDG87I-d.d.mts.map +1 -0
- package/package.json +15 -14
- package/dist/capacity-admission-IDO3fcUC.d.mts +0 -369
- package/dist/capacity-admission-IDO3fcUC.d.mts.map +0 -1
- package/dist/data.generated-B2ceLfSn.d.mts.map +0 -1
- package/dist/network-error-DR9FX5hb.mjs.map +0 -1
- package/dist/polling-helpers-CoVhsC33.mjs.map +0 -1
- package/dist/resource-client-B6NeFXUv.d.mts +0 -164
- package/dist/resource-client-B6NeFXUv.d.mts.map +0 -1
- package/dist/resource-client-rqTMkBeR.mjs.map +0 -1
- package/dist/retry-BlX4tUnT.mjs.map +0 -1
- package/dist/retry-war_-9tb.d.mts +0 -373
- package/dist/retry-war_-9tb.d.mts.map +0 -1
- package/dist/types-CvYh4SPC.d.mts +0 -386
- package/dist/types-CvYh4SPC.d.mts.map +0 -1
- package/dist/wire-D3K-a-UP.d.mts +0 -37
- package/dist/wire-D3K-a-UP.d.mts.map +0 -1
package/dist/testing.d.mts
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { r as GetGameIconResponseWire, t as GameIconListWire } from "./wire-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* `Roblox.Web.Responses.RelatedEntityTypeResponse_Roblox.Platform.Badges.BadgeAwarderType_`.
|
|
8
|
-
*/
|
|
1
|
+
import { a as HttpClient, g as OpenCloudError, h as SleepFunc, m as Result, o as HttpRequest, s as HttpResponse, u as RequestConfig } from "./types-Z4abDJfK.mjs";
|
|
2
|
+
import { r as GetGameIconResponseWire, t as GameIconListWire } from "./wire-DDG87I-d.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Wire shape of
|
|
5
|
+
* `Roblox.Web.Responses.RelatedEntityTypeResponse_Roblox.Platform.Badges.BadgeAwarderType_`.
|
|
6
|
+
*/
|
|
9
7
|
interface BadgeAwarderWire {
|
|
10
8
|
/** Int64 awarder ID. */
|
|
11
9
|
readonly id: number;
|
|
12
|
-
/** Display name of the awarding entity. */
|
|
13
|
-
readonly name
|
|
14
|
-
/**
|
|
10
|
+
/** Display name of the awarding entity. The create response omits it. */
|
|
11
|
+
readonly name?: string | undefined;
|
|
12
|
+
/** Awarder kind label. */
|
|
15
13
|
readonly type: BadgeAwarderTypeWire;
|
|
16
14
|
}
|
|
17
15
|
/**
|
|
18
|
-
* Wire shape of `Roblox.Web.Responses.Badges.BadgeAwardStatisticsResponse`.
|
|
19
|
-
*/
|
|
16
|
+
* Wire shape of `Roblox.Web.Responses.Badges.BadgeAwardStatisticsResponse`.
|
|
17
|
+
*/
|
|
20
18
|
interface BadgeStatisticsWire {
|
|
21
19
|
/** Int64 lifetime awarded count. */
|
|
22
20
|
readonly awardedCount: number;
|
|
@@ -26,9 +24,9 @@ interface BadgeStatisticsWire {
|
|
|
26
24
|
readonly winRatePercentage: number;
|
|
27
25
|
}
|
|
28
26
|
/**
|
|
29
|
-
* Wire shape of `Roblox.Web.Responses.Badges.BadgeResponseV2`: the response
|
|
30
|
-
* body returned by the legacy badges create endpoint.
|
|
31
|
-
*/
|
|
27
|
+
* Wire shape of `Roblox.Web.Responses.Badges.BadgeResponseV2`: the response
|
|
28
|
+
* body returned by the legacy badges create endpoint.
|
|
29
|
+
*/
|
|
32
30
|
interface BadgeResponseV2Wire {
|
|
33
31
|
/** Int64 badge ID, serialized as a JSON number. */
|
|
34
32
|
readonly id: number;
|
|
@@ -43,15 +41,15 @@ interface BadgeResponseV2Wire {
|
|
|
43
41
|
/** Resolved description for the requesting locale. */
|
|
44
42
|
readonly displayDescription: string;
|
|
45
43
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
* Int64 resolved icon image asset ID; `0` signals no icon for this locale.
|
|
45
|
+
*/
|
|
48
46
|
readonly displayIconImageId: number;
|
|
49
47
|
/** Resolved name for the requesting locale. */
|
|
50
48
|
readonly displayName: string;
|
|
51
49
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
* Whether the badge is currently active. Disabled badges cannot be
|
|
51
|
+
* awarded.
|
|
52
|
+
*/
|
|
55
53
|
readonly enabled: boolean;
|
|
56
54
|
/** Int64 source-language icon image asset ID; `0` signals no icon. */
|
|
57
55
|
readonly iconImageId: number;
|
|
@@ -61,54 +59,48 @@ interface BadgeResponseV2Wire {
|
|
|
61
59
|
readonly updated: string;
|
|
62
60
|
}
|
|
63
61
|
/**
|
|
64
|
-
* Wire shape of `Roblox.Platform.Badges.BadgeAwarderType`.
|
|
65
|
-
*/
|
|
66
|
-
type BadgeAwarderTypeWire =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
|
|
85
|
-
* type is left as a parameter `F`.
|
|
86
|
-
*
|
|
87
|
-
* @template F - The string-literal union for this resource's pricing-feature flags.
|
|
88
|
-
*/
|
|
62
|
+
* Wire shape of `Roblox.Platform.Badges.BadgeAwarderType`.
|
|
63
|
+
*/
|
|
64
|
+
type BadgeAwarderTypeWire = "Place";
|
|
65
|
+
/**
|
|
66
|
+
* Builds a minimally-valid {@link BadgeResponseV2Wire} body. Pass an
|
|
67
|
+
* `overrides` object to tweak individual fields while keeping everything
|
|
68
|
+
* else schema-compliant; useful for parser and integration tests that
|
|
69
|
+
* only care about one field at a time.
|
|
70
|
+
*
|
|
71
|
+
* @param overrides - Fields to override on the default body.
|
|
72
|
+
* @returns A valid wire body with the overrides applied.
|
|
73
|
+
*/
|
|
74
|
+
export declare function validBadgeBody(overrides?: Partial<BadgeResponseV2Wire>): BadgeResponseV2Wire;
|
|
75
|
+
/**
|
|
76
|
+
* Wire shape shared by every Roblox commerce resource that carries a
|
|
77
|
+
* `priceInformation` block (game passes, developer products, ...). Resources
|
|
78
|
+
* vary in the literal set their `enabledFeatures` may contain, so the feature
|
|
79
|
+
* type is left as a parameter `F`.
|
|
80
|
+
*
|
|
81
|
+
* @template F - The string-literal union for this resource's pricing-feature flags.
|
|
82
|
+
*/
|
|
89
83
|
interface PriceInformationLike<F extends string> {
|
|
90
84
|
/** Default Robux price; `undefined` when the schema returns null. */
|
|
91
85
|
readonly defaultPriceInRobux: number | undefined;
|
|
92
86
|
/** Enabled pricing feature flags, in the order returned by the API. */
|
|
93
87
|
readonly enabledFeatures: ReadonlyArray<F>;
|
|
94
88
|
}
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/domains/developer-products/products/wire.d.ts
|
|
97
89
|
/**
|
|
98
|
-
* Wire-level pricing feature flag, mirroring
|
|
99
|
-
* `DeveloperProducts.PricingFeature`.
|
|
100
|
-
*/
|
|
90
|
+
* Wire-level pricing feature flag, mirroring
|
|
91
|
+
* `DeveloperProducts.PricingFeature`.
|
|
92
|
+
*/
|
|
101
93
|
type DeveloperProductPricingFeatureWire = "Invalid" | "PriceOptimization" | "RegionalPricing" | "UserFixedPrice";
|
|
102
94
|
/**
|
|
103
|
-
* Wire shape of `DeveloperProductConfigV2`: the response body returned by
|
|
104
|
-
* the developer-products read and create endpoints.
|
|
105
|
-
*/
|
|
95
|
+
* Wire shape of `DeveloperProductConfigV2`: the response body returned by
|
|
96
|
+
* the developer-products read and create endpoints.
|
|
97
|
+
*/
|
|
106
98
|
interface DeveloperProductConfigV2 {
|
|
107
99
|
/** Display name of the developer product. */
|
|
108
100
|
readonly name: string;
|
|
109
101
|
/**
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
* ISO timestamp at which the developer product was created (`date-time`).
|
|
103
|
+
*/
|
|
112
104
|
readonly createdTimestamp: string;
|
|
113
105
|
/** Consumer-facing description shown on the storefront. */
|
|
114
106
|
readonly description: string;
|
|
@@ -124,38 +116,28 @@ interface DeveloperProductConfigV2 {
|
|
|
124
116
|
readonly priceInformation: DeveloperProductPriceInformationWire | undefined;
|
|
125
117
|
/** Int64 developer product ID, serialized as a JSON number. */
|
|
126
118
|
readonly productId: number;
|
|
127
|
-
/**
|
|
128
|
-
* Whether the developer product appears on the external store page.
|
|
129
|
-
* `undefined` when the response omits the field, as the create endpoint
|
|
130
|
-
* does.
|
|
131
|
-
*/
|
|
132
|
-
readonly storePageEnabled?: boolean | undefined;
|
|
133
119
|
/** Int64 universe ID that owns the developer product. */
|
|
134
120
|
readonly universeId: number;
|
|
135
121
|
/** ISO timestamp of the most recent update (`date-time`). */
|
|
136
122
|
readonly updatedTimestamp: string;
|
|
137
123
|
}
|
|
138
124
|
/**
|
|
139
|
-
* Wire shape of `DeveloperProducts.PriceInformationStruct`.
|
|
140
|
-
*/
|
|
125
|
+
* Wire shape of `DeveloperProducts.PriceInformationStruct`.
|
|
126
|
+
*/
|
|
141
127
|
type DeveloperProductPriceInformationWire = PriceInformationLike<DeveloperProductPricingFeatureWire>;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
//#region tests/helpers/fake-http-client.d.ts
|
|
156
|
-
/**
|
|
157
|
-
* A request captured by {@link FakeHttpClient} for later assertion.
|
|
158
|
-
*/
|
|
128
|
+
/**
|
|
129
|
+
* Builds a minimally-valid {@link DeveloperProductConfigV2} wire body. Pass
|
|
130
|
+
* an `overrides` object to tweak individual fields while keeping everything
|
|
131
|
+
* else schema-compliant; useful for parser and integration tests that
|
|
132
|
+
* only care about one field at a time.
|
|
133
|
+
*
|
|
134
|
+
* @param overrides - Fields to override on the default body.
|
|
135
|
+
* @returns A valid wire body with the overrides applied.
|
|
136
|
+
*/
|
|
137
|
+
export declare function validDeveloperProductBody(overrides?: Partial<DeveloperProductConfigV2>): DeveloperProductConfigV2;
|
|
138
|
+
/**
|
|
139
|
+
* A request captured by {@link FakeHttpClient} for later assertion.
|
|
140
|
+
*/
|
|
159
141
|
interface CapturedRequest {
|
|
160
142
|
/** The per-request config passed alongside the request. */
|
|
161
143
|
readonly config: RequestConfig;
|
|
@@ -163,18 +145,18 @@ interface CapturedRequest {
|
|
|
163
145
|
readonly request: HttpRequest;
|
|
164
146
|
}
|
|
165
147
|
/**
|
|
166
|
-
* A fluent fake for the {@link HttpClient} boundary. Mocks are queued in
|
|
167
|
-
* FIFO order and consumed by each `request()` call. Records every
|
|
168
|
-
* request and config for later assertion. Throws
|
|
169
|
-
* {@link FakeHttpClientError} if the queue is empty when `request()` is
|
|
170
|
-
* called — surfaces missing mocks as test setup bugs instead of silently
|
|
171
|
-
* repeating the last response.
|
|
172
|
-
*/
|
|
148
|
+
* A fluent fake for the {@link HttpClient} boundary. Mocks are queued in
|
|
149
|
+
* FIFO order and consumed by each `request()` call. Records every
|
|
150
|
+
* request and config for later assertion. Throws
|
|
151
|
+
* {@link FakeHttpClientError} if the queue is empty when `request()` is
|
|
152
|
+
* called — surfaces missing mocks as test setup bugs instead of silently
|
|
153
|
+
* repeating the last response.
|
|
154
|
+
*/
|
|
173
155
|
interface FakeHttpClient extends HttpClient {
|
|
174
156
|
/**
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
157
|
+
* Queues an {@link ApiError} with the given status code and optional
|
|
158
|
+
* message/code.
|
|
159
|
+
*/
|
|
178
160
|
mockApiError(options: {
|
|
179
161
|
code?: string;
|
|
180
162
|
message?: string;
|
|
@@ -193,9 +175,9 @@ interface FakeHttpClient extends HttpClient {
|
|
|
193
175
|
retryAfterSeconds: number;
|
|
194
176
|
}): this;
|
|
195
177
|
/**
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
178
|
+
* Queues a successful {@link HttpResponse}. Body defaults to `{}`; headers
|
|
179
|
+
* default to `{}`.
|
|
180
|
+
*/
|
|
199
181
|
mockResponse(options: {
|
|
200
182
|
body?: unknown;
|
|
201
183
|
headers?: Readonly<Record<string, string>>;
|
|
@@ -204,37 +186,35 @@ interface FakeHttpClient extends HttpClient {
|
|
|
204
186
|
/** Number of queued mocks that have not yet been consumed. */
|
|
205
187
|
readonly pendingMocks: number;
|
|
206
188
|
/**
|
|
207
|
-
|
|
208
|
-
|
|
189
|
+
* Chronological log of every `(request, config)` pair the fake received.
|
|
190
|
+
*/
|
|
209
191
|
readonly requests: ReadonlyArray<CapturedRequest>;
|
|
210
192
|
}
|
|
211
193
|
/**
|
|
212
|
-
* Thrown when {@link FakeHttpClient.request} is called but no mock has
|
|
213
|
-
* been queued. The message names the method, url, and consumed count to
|
|
214
|
-
* aid debugging of missing `.mockResponse`/`.mockError` setup.
|
|
215
|
-
*/
|
|
216
|
-
declare class FakeHttpClientError extends Error {
|
|
194
|
+
* Thrown when {@link FakeHttpClient.request} is called but no mock has
|
|
195
|
+
* been queued. The message names the method, url, and consumed count to
|
|
196
|
+
* aid debugging of missing `.mockResponse`/`.mockError` setup.
|
|
197
|
+
*/
|
|
198
|
+
export declare class FakeHttpClientError extends Error {
|
|
217
199
|
override readonly name: string;
|
|
218
200
|
}
|
|
219
201
|
/**
|
|
220
|
-
* Creates a fluent {@link FakeHttpClient} that sits at the
|
|
221
|
-
* {@link HttpClient} seam. Use for integration tests where you need to
|
|
222
|
-
* assert per-request config (
|
|
223
|
-
*
|
|
224
|
-
* @returns A fresh fake with an empty mock queue.
|
|
225
|
-
*/
|
|
226
|
-
declare function createFakeHttpClient(): FakeHttpClient;
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
* transport function — no `RequestConfig`, no queueing, no retries.
|
|
232
|
-
*/
|
|
202
|
+
* Creates a fluent {@link FakeHttpClient} that sits at the
|
|
203
|
+
* {@link HttpClient} seam. Use for integration tests where you need to
|
|
204
|
+
* assert per-request config (credential, baseUrl) flows through to HTTP.
|
|
205
|
+
*
|
|
206
|
+
* @returns A fresh fake with an empty mock queue.
|
|
207
|
+
*/
|
|
208
|
+
export declare function createFakeHttpClient(): FakeHttpClient;
|
|
209
|
+
/**
|
|
210
|
+
* The `send` callback shape consumed by `executeWithRetry`. A plain
|
|
211
|
+
* transport function — no `RequestConfig`, no queueing, no retries.
|
|
212
|
+
*/
|
|
233
213
|
type SendFunc = (request: HttpRequest) => Promise<Result<HttpResponse, OpenCloudError>>;
|
|
234
214
|
/**
|
|
235
|
-
* A scripted fake for the `send` callback. Replays responses in order
|
|
236
|
-
* and records every request it receives.
|
|
237
|
-
*/
|
|
215
|
+
* A scripted fake for the `send` callback. Replays responses in order
|
|
216
|
+
* and records every request it receives.
|
|
217
|
+
*/
|
|
238
218
|
interface FakeSend {
|
|
239
219
|
/** Chronological log of every request the fake received. */
|
|
240
220
|
readonly requests: ReadonlyArray<HttpRequest>;
|
|
@@ -242,63 +222,57 @@ interface FakeSend {
|
|
|
242
222
|
readonly send: SendFunc;
|
|
243
223
|
}
|
|
244
224
|
/**
|
|
245
|
-
* Creates a scripted fake for the `send` callback. Each call returns the
|
|
246
|
-
* next queued response; exhausting the queue throws, which surfaces test
|
|
247
|
-
* setup mistakes instead of silently repeating the last response.
|
|
248
|
-
*
|
|
249
|
-
* @param options - The scripted responses to replay, in order.
|
|
250
|
-
* @returns A `send` callback plus a `requests` log.
|
|
251
|
-
* @rejects {Error} When a call is made after all scripted responses are consumed.
|
|
252
|
-
*/
|
|
253
|
-
declare function createFakeSend(options: {
|
|
225
|
+
* Creates a scripted fake for the `send` callback. Each call returns the
|
|
226
|
+
* next queued response; exhausting the queue throws, which surfaces test
|
|
227
|
+
* setup mistakes instead of silently repeating the last response.
|
|
228
|
+
*
|
|
229
|
+
* @param options - The scripted responses to replay, in order.
|
|
230
|
+
* @returns A `send` callback plus a `requests` log.
|
|
231
|
+
* @rejects {Error} When a call is made after all scripted responses are consumed.
|
|
232
|
+
*/
|
|
233
|
+
export declare function createFakeSend(options: {
|
|
254
234
|
readonly responses: ReadonlyArray<Result<HttpResponse, OpenCloudError>>;
|
|
255
235
|
}): FakeSend;
|
|
256
|
-
//#endregion
|
|
257
|
-
//#region tests/helpers/fake-sleep.d.ts
|
|
258
236
|
/**
|
|
259
|
-
* A directly-callable sleep double that records its wait arguments without
|
|
260
|
-
* delaying. Assignable to {@link SleepFunc}.
|
|
261
|
-
*/
|
|
237
|
+
* A directly-callable sleep double that records its wait arguments without
|
|
238
|
+
* delaying. Assignable to {@link SleepFunc}.
|
|
239
|
+
*/
|
|
262
240
|
interface FakeSleep extends SleepFunc {
|
|
263
241
|
/** Chronological log of every `ms` value the fake was called with. */
|
|
264
242
|
readonly waits: ReadonlyArray<number>;
|
|
265
243
|
}
|
|
266
244
|
/**
|
|
267
|
-
* Creates a {@link FakeSleep} that resolves immediately and records every
|
|
268
|
-
* `ms` value it was called with.
|
|
269
|
-
*
|
|
270
|
-
* @returns A callable sleep function with a `waits` log attached.
|
|
271
|
-
*/
|
|
272
|
-
declare function createFakeSleep(): FakeSleep;
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
*
|
|
286
|
-
* default
|
|
287
|
-
*
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
//#region src/domains/game-passes/game-passes/wire.d.ts
|
|
294
|
-
/**
|
|
295
|
-
* Wire-level pricing feature flag, mirroring `GamePasses.PricingFeature`.
|
|
296
|
-
*/
|
|
245
|
+
* Creates a {@link FakeSleep} that resolves immediately and records every
|
|
246
|
+
* `ms` value it was called with.
|
|
247
|
+
*
|
|
248
|
+
* @returns A callable sleep function with a `waits` log attached.
|
|
249
|
+
*/
|
|
250
|
+
export declare function createFakeSleep(): FakeSleep;
|
|
251
|
+
/**
|
|
252
|
+
* Builds a minimally-valid {@link GetGameIconResponseWire} entry. Pass an
|
|
253
|
+
* `overrides` object to tweak individual fields while keeping everything
|
|
254
|
+
* else schema-compliant.
|
|
255
|
+
*
|
|
256
|
+
* @param overrides - Fields to override on the default entry.
|
|
257
|
+
* @returns A valid localized-icon entry with the overrides applied.
|
|
258
|
+
*/
|
|
259
|
+
export declare function validLocalizedIcon(overrides?: Partial<GetGameIconResponseWire>): GetGameIconResponseWire;
|
|
260
|
+
/**
|
|
261
|
+
* Builds a minimally-valid {@link GameIconListWire} body containing a single
|
|
262
|
+
* default localized icon.
|
|
263
|
+
*
|
|
264
|
+
* @param overrides - Fields to override on the default body.
|
|
265
|
+
* @returns A valid wire body with the overrides applied.
|
|
266
|
+
*/
|
|
267
|
+
export declare function validIconListBody(overrides?: Partial<GameIconListWire>): GameIconListWire;
|
|
268
|
+
/**
|
|
269
|
+
* Wire-level pricing feature flag, mirroring `GamePasses.PricingFeature`.
|
|
270
|
+
*/
|
|
297
271
|
type PricingFeatureWire = "Invalid" | "PriceOptimization" | "RegionalPricing" | "UserFixedPrice";
|
|
298
272
|
/**
|
|
299
|
-
* Wire shape of `GamePassConfigV2` — the response body returned by the
|
|
300
|
-
* Game Passes read endpoint.
|
|
301
|
-
*/
|
|
273
|
+
* Wire shape of `GamePassConfigV2` — the response body returned by the
|
|
274
|
+
* Game Passes read endpoint.
|
|
275
|
+
*/
|
|
302
276
|
interface GamePassConfigV2 {
|
|
303
277
|
/** Display name of the game pass. */
|
|
304
278
|
readonly name: string;
|
|
@@ -320,47 +294,39 @@ interface GamePassConfigV2 {
|
|
|
320
294
|
readonly updatedTimestamp: string;
|
|
321
295
|
}
|
|
322
296
|
/**
|
|
323
|
-
* Wire shape of `GamePasses.PriceInformationStruct`.
|
|
324
|
-
*/
|
|
297
|
+
* Wire shape of `GamePasses.PriceInformationStruct`.
|
|
298
|
+
*/
|
|
325
299
|
type PriceInformationStructWire = PriceInformationLike<PricingFeatureWire>;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
* /v1/game-thumbnails/games/{gameId}/language-codes/{languageCode}/image`,
|
|
343
|
-
* mirroring
|
|
344
|
-
* `Roblox.GameInternationalization.Api.Models.Response.UploadImageForGameThumbnailResponse`.
|
|
345
|
-
*/
|
|
300
|
+
/**
|
|
301
|
+
* Builds a minimally-valid {@link GamePassConfigV2} wire body. Pass an
|
|
302
|
+
* `overrides` object to tweak individual fields while keeping everything
|
|
303
|
+
* else schema-compliant — useful for parser and integration tests that
|
|
304
|
+
* only care about one field at a time.
|
|
305
|
+
*
|
|
306
|
+
* @param overrides - Fields to override on the default body.
|
|
307
|
+
* @returns A valid wire body with the overrides applied.
|
|
308
|
+
*/
|
|
309
|
+
export declare function validGamePassBody(overrides?: Partial<GamePassConfigV2>): GamePassConfigV2;
|
|
310
|
+
/**
|
|
311
|
+
* Wire shape of `POST
|
|
312
|
+
* /v1/game-thumbnails/games/{gameId}/language-codes/{languageCode}/image`,
|
|
313
|
+
* mirroring
|
|
314
|
+
* `Roblox.GameInternationalization.Api.Models.Response.UploadImageForGameThumbnailResponse`.
|
|
315
|
+
*/
|
|
346
316
|
interface GameThumbnailUploadWire {
|
|
347
317
|
/** Stringified ID of the freshly uploaded thumbnail. */
|
|
348
318
|
readonly mediaAssetId: string;
|
|
349
319
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
*/
|
|
361
|
-
declare function validThumbnailUploadBody(overrides?: Partial<GameThumbnailUploadWire>): GameThumbnailUploadWire;
|
|
362
|
-
//#endregion
|
|
363
|
-
//#region src/domains/cloud-v2/luau-execution-task-binary-inputs/wire.d.ts
|
|
320
|
+
/**
|
|
321
|
+
* Builds a minimally-valid {@link GameThumbnailUploadWire} body. Pass an
|
|
322
|
+
* `overrides` object to tweak individual fields while keeping everything
|
|
323
|
+
* else schema-compliant; useful for parser and integration tests that
|
|
324
|
+
* only care about one field at a time.
|
|
325
|
+
*
|
|
326
|
+
* @param overrides - Fields to override on the default body.
|
|
327
|
+
* @returns A valid wire body with the overrides applied.
|
|
328
|
+
*/
|
|
329
|
+
export declare function validThumbnailUploadBody(overrides?: Partial<GameThumbnailUploadWire>): GameThumbnailUploadWire;
|
|
364
330
|
/** Wire shape of the binary-input create response body. */
|
|
365
331
|
interface LuauExecutionTaskBinaryInputWire {
|
|
366
332
|
/** Resource path the server assigned to this binary input slot. */
|
|
@@ -370,23 +336,19 @@ interface LuauExecutionTaskBinaryInputWire {
|
|
|
370
336
|
/** Presigned PUT URI the caller uses to upload the binary data. */
|
|
371
337
|
readonly uploadUri: string;
|
|
372
338
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
* the
|
|
379
|
-
*
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Wire shape of a single structured log message within a
|
|
388
|
-
* {@link LogChunkWire}.
|
|
389
|
-
*/
|
|
339
|
+
/**
|
|
340
|
+
* Builds a minimally-valid {@link LuauExecutionTaskBinaryInputWire} body
|
|
341
|
+
* for tests. Pass an `overrides` object to tweak fields without re-stating
|
|
342
|
+
* the defaults.
|
|
343
|
+
*
|
|
344
|
+
* @param overrides - Fields to override on the default body.
|
|
345
|
+
* @returns A valid wire body with the overrides applied.
|
|
346
|
+
*/
|
|
347
|
+
export declare function validBinaryInputBody(overrides?: Partial<LuauExecutionTaskBinaryInputWire>): LuauExecutionTaskBinaryInputWire;
|
|
348
|
+
/**
|
|
349
|
+
* Wire shape of a single structured log message within a
|
|
350
|
+
* {@link LogChunkWire}.
|
|
351
|
+
*/
|
|
390
352
|
interface LogMessageWire {
|
|
391
353
|
/** ISO timestamp when the log message was produced. */
|
|
392
354
|
readonly createTime: string;
|
|
@@ -396,57 +358,49 @@ interface LogMessageWire {
|
|
|
396
358
|
readonly messageType: "ERROR" | "INFO" | "MESSAGE_TYPE_UNSPECIFIED" | "OUTPUT" | "WARNING";
|
|
397
359
|
}
|
|
398
360
|
/**
|
|
399
|
-
* Wire shape of a single log chunk returned by the Open Cloud
|
|
400
|
-
* list-logs endpoint. The `structuredMessages` array is populated
|
|
401
|
-
* when `view=STRUCTURED` is requested (which is always the case in
|
|
402
|
-
* this SDK). Other wire fields (`path`, FLAT-mode `messages`) exist
|
|
403
|
-
* on the schema but are not modelled here because they are not
|
|
404
|
-
* surfaced on the public `LogPage` type.
|
|
405
|
-
*/
|
|
361
|
+
* Wire shape of a single log chunk returned by the Open Cloud
|
|
362
|
+
* list-logs endpoint. The `structuredMessages` array is populated
|
|
363
|
+
* when `view=STRUCTURED` is requested (which is always the case in
|
|
364
|
+
* this SDK). Other wire fields (`path`, FLAT-mode `messages`) exist
|
|
365
|
+
* on the schema but are not modelled here because they are not
|
|
366
|
+
* surfaced on the public `LogPage` type.
|
|
367
|
+
*/
|
|
406
368
|
interface LogChunkWire {
|
|
407
369
|
/**
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
readonly structuredMessages
|
|
370
|
+
* Required for the STRUCTURED view requested by this SDK. The captured
|
|
371
|
+
* no-print task returns an explicit empty array.
|
|
372
|
+
*/
|
|
373
|
+
readonly structuredMessages: ReadonlyArray<LogMessageWire>;
|
|
412
374
|
}
|
|
413
375
|
/**
|
|
414
|
-
* Wire shape
|
|
415
|
-
* fields
|
|
416
|
-
*
|
|
417
|
-
|
|
418
|
-
* boundary and normalizes it to `undefined` / `[]`.
|
|
419
|
-
*/
|
|
376
|
+
* Wire shape consumed by the STRUCTURED list parser. The schema leaves
|
|
377
|
+
* both fields optional, but the parser requires the chunks array so a
|
|
378
|
+
* missing or renamed field surfaces drift instead of empty messages.
|
|
379
|
+
*/
|
|
420
380
|
interface ListLogsResponseWire {
|
|
421
381
|
/**
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
readonly luauExecutionSessionTaskLogs?: ReadonlyArray<LogChunkWire> | undefined;
|
|
382
|
+
* Required array of log chunks. Explicit empty arrays are accepted.
|
|
383
|
+
*/
|
|
384
|
+
readonly luauExecutionSessionTaskLogs: ReadonlyArray<LogChunkWire>;
|
|
426
385
|
/**
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
*/
|
|
386
|
+
* Opaque continuation token for the next page. Captured final pages
|
|
387
|
+
* omit this field; explicit JSON null is not a supported variant.
|
|
388
|
+
*/
|
|
431
389
|
readonly nextPageToken?: string | undefined;
|
|
432
390
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* Wire error payload for `FAILED` tasks. Carries the categorical
|
|
448
|
-
* `code` plus a human-readable `message`.
|
|
449
|
-
*/
|
|
391
|
+
/**
|
|
392
|
+
* Builds a minimally-valid {@link ListLogsResponseWire} body containing
|
|
393
|
+
* one chunk with one structured message. Pass an `overrides` object to
|
|
394
|
+
* tweak fields without re-stating the defaults.
|
|
395
|
+
*
|
|
396
|
+
* @param overrides - Fields to override on the default body.
|
|
397
|
+
* @returns A valid wire body with the overrides applied.
|
|
398
|
+
*/
|
|
399
|
+
export declare function validLogPageBody(overrides?: Partial<ListLogsResponseWire>): ListLogsResponseWire;
|
|
400
|
+
/**
|
|
401
|
+
* Wire error payload for `FAILED` tasks. Carries the categorical
|
|
402
|
+
* `code` plus a human-readable `message`.
|
|
403
|
+
*/
|
|
450
404
|
interface LuauExecutionTaskErrorWire {
|
|
451
405
|
/** Categorical error code; every value the OpenAPI schema declares. */
|
|
452
406
|
readonly code: "DEADLINE_EXCEEDED" | "ERROR_CODE_UNSPECIFIED" | "INTERNAL_ERROR" | "OUTPUT_SIZE_LIMIT_EXCEEDED" | "SCRIPT_ERROR";
|
|
@@ -454,154 +408,144 @@ interface LuauExecutionTaskErrorWire {
|
|
|
454
408
|
readonly message: string;
|
|
455
409
|
}
|
|
456
410
|
/**
|
|
457
|
-
* Wire output payload for `COMPLETE` tasks. Each entry of `results` is
|
|
458
|
-
* a Roblox-protobuf `Value` whose JSON projection is null, boolean,
|
|
459
|
-
* number, string, JSON array, or JSON object.
|
|
460
|
-
*/
|
|
411
|
+
* Wire output payload for `COMPLETE` tasks. Each entry of `results` is
|
|
412
|
+
* a Roblox-protobuf `Value` whose JSON projection is null, boolean,
|
|
413
|
+
* number, string, JSON array, or JSON object.
|
|
414
|
+
*/
|
|
461
415
|
interface LuauExecutionTaskOutputWire {
|
|
462
416
|
/** JSON projection of the script's `return` values, in order. */
|
|
463
417
|
readonly results: ReadonlyArray<JSONValue>;
|
|
464
418
|
}
|
|
465
419
|
/**
|
|
466
|
-
* Wire shape of the `LuauExecutionSessionTask` response body, narrowed
|
|
467
|
-
* to the fields the current parser slice accepts. View-controlled
|
|
468
|
-
* fields (`script`, `timeout`) are folded in by later slices when
|
|
469
|
-
* they're observed.
|
|
470
|
-
*/
|
|
420
|
+
* Wire shape of the `LuauExecutionSessionTask` response body, narrowed
|
|
421
|
+
* to the fields the current parser slice accepts. View-controlled
|
|
422
|
+
* fields (`script`, `timeout`) are folded in by later slices when
|
|
423
|
+
* they're observed.
|
|
424
|
+
*/
|
|
471
425
|
interface LuauExecutionTaskWire {
|
|
472
426
|
/**
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
427
|
+
* Resource path of the binary input attached to this task, when
|
|
428
|
+
* one was supplied at submit time.
|
|
429
|
+
*/
|
|
476
430
|
readonly binaryInput?: string | undefined;
|
|
477
431
|
/**
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
432
|
+
* Pre-signed URI from which the binary output blob can be
|
|
433
|
+
* downloaded. Present only after a `COMPLETE` task whose
|
|
434
|
+
* `enableBinaryOutput` was `true`.
|
|
435
|
+
*/
|
|
482
436
|
readonly binaryOutputUri?: string | undefined;
|
|
483
437
|
/**
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
438
|
+
* ISO timestamp when the task was created; omitted from the create-task
|
|
439
|
+
* POST response.
|
|
440
|
+
*/
|
|
487
441
|
readonly createTime?: string | undefined;
|
|
488
442
|
/** When `true`, the server writes output to a binary blob. */
|
|
489
443
|
readonly enableBinaryOutput?: boolean | undefined;
|
|
490
444
|
/**
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
445
|
+
* Wire error payload. Present only for tasks in the `FAILED`
|
|
446
|
+
* state; absent for in-progress and `COMPLETE` states.
|
|
447
|
+
*/
|
|
494
448
|
readonly error?: LuauExecutionTaskErrorWire | undefined;
|
|
495
449
|
/**
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
450
|
+
* Wire output payload. Present only for tasks in the `COMPLETE`
|
|
451
|
+
* state; absent for in-progress and `FAILED` states.
|
|
452
|
+
*/
|
|
499
453
|
readonly output?: LuauExecutionTaskOutputWire | undefined;
|
|
500
454
|
/** Resource path; one of the four x-aep-resource path formats. */
|
|
501
455
|
readonly path: string;
|
|
502
456
|
/** Wire enum value; every task state the OpenAPI schema declares. */
|
|
503
457
|
readonly state: "CANCELLED" | "COMPLETE" | "FAILED" | "PROCESSING" | "QUEUED" | "STATE_UNSPECIFIED";
|
|
504
458
|
/**
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
459
|
+
* Server-side duration string in `"<n>s"` form. Optional; when
|
|
460
|
+
* absent, the server applies its 5-minute default.
|
|
461
|
+
*/
|
|
508
462
|
readonly timeout?: string | undefined;
|
|
509
463
|
/**
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
464
|
+
* ISO timestamp of the most recent state change; omitted from the
|
|
465
|
+
* create-task POST response.
|
|
466
|
+
*/
|
|
513
467
|
readonly updateTime?: string | undefined;
|
|
514
468
|
/**
|
|
515
|
-
|
|
516
|
-
|
|
469
|
+
* Identifier of the user that owns the API key used to create this task.
|
|
470
|
+
*/
|
|
517
471
|
readonly user: string;
|
|
518
472
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
|
|
536
|
-
* `data`, `expireTime`, and an optional `priority`. Top-level `data`
|
|
537
|
-
* is required server-side (the server returns 400 when absent or
|
|
538
|
-
* `null`); nested `null` inside `data` is preserved on round-trip.
|
|
539
|
-
*/
|
|
473
|
+
/**
|
|
474
|
+
* Builds a minimally-valid {@link LuauExecutionTaskWire} body for an
|
|
475
|
+
* in-progress task. Pass an `overrides` object to tweak fields without
|
|
476
|
+
* re-stating the defaults.
|
|
477
|
+
*
|
|
478
|
+
* @param overrides - Fields to override on the default body.
|
|
479
|
+
* @returns A valid wire body with the overrides applied.
|
|
480
|
+
*/
|
|
481
|
+
export declare function validInProgressTaskBody(overrides?: Partial<LuauExecutionTaskWire>): LuauExecutionTaskWire;
|
|
482
|
+
/**
|
|
483
|
+
* Wire shape of a `MemoryStoreQueueItem` resource: the response body
|
|
484
|
+
* returned by `Cloud_CreateMemoryStoreQueueItem` and the array entry
|
|
485
|
+
* inside `Cloud_ReadMemoryStoreQueueItems`. The server emits `path`,
|
|
486
|
+
* `data`, `expireTime`, and an optional `priority`. Top-level `data`
|
|
487
|
+
* is required server-side (the server returns 400 when absent or
|
|
488
|
+
* `null`); nested `null` inside `data` is preserved on round-trip.
|
|
489
|
+
*/
|
|
540
490
|
interface MemoryStoreQueueItemWire {
|
|
541
491
|
/** The opaque queue payload. Always non-null at the top level. */
|
|
542
492
|
readonly data: Exclude<JSONValue, null>;
|
|
543
493
|
/** ISO 8601 timestamp at which the item is removed from the queue. */
|
|
544
494
|
readonly expireTime: string;
|
|
545
495
|
/**
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
496
|
+
* Resource path:
|
|
497
|
+
* `cloud/v2/universes/{u}/memory-store/queues/{q}/items/{i}`.
|
|
498
|
+
*/
|
|
549
499
|
readonly path: string;
|
|
550
500
|
/** Optional priority; higher values are dequeued first. */
|
|
551
501
|
readonly priority?: number | undefined;
|
|
552
502
|
}
|
|
553
503
|
/**
|
|
554
|
-
* Wire shape of the `Cloud_ReadMemoryStoreQueueItems` response. The
|
|
555
|
-
* server emits the items array under `queueItems` (vendored schema
|
|
556
|
-
* names it `items`) and the read identifier under `id` (schema names
|
|
557
|
-
* it `readId`); both deviations are corrected by `apply-schema-patches`,
|
|
558
|
-
* so the wire interface here matches the patched schema.
|
|
559
|
-
*
|
|
560
|
-
* `queueItems`
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
*
|
|
564
|
-
|
|
565
|
-
*/
|
|
504
|
+
* Wire shape of the `Cloud_ReadMemoryStoreQueueItems` response. The
|
|
505
|
+
* server emits the items array under `queueItems` (vendored schema
|
|
506
|
+
* names it `items`) and the read identifier under `id` (schema names
|
|
507
|
+
* it `readId`); both deviations are corrected by `apply-schema-patches`,
|
|
508
|
+
* so the wire interface here matches the patched schema.
|
|
509
|
+
*
|
|
510
|
+
* The schema leaves `queueItems` and `id` optional. The parser requires
|
|
511
|
+
* both on a successful dequeue so drift cannot silently discard data or
|
|
512
|
+
* lose the `:discard` token. Captured empty-queue reads return 404
|
|
513
|
+
* NOT_FOUND, not a successful body with an omitted or null array.
|
|
514
|
+
*/
|
|
566
515
|
interface ReadQueueItemsResponseWire {
|
|
567
516
|
/** Identifier of the read operation, passed back to `:discard`. */
|
|
568
517
|
readonly id: string;
|
|
569
518
|
/**
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
readonly queueItems?: ReadonlyArray<MemoryStoreQueueItemWire> | undefined;
|
|
519
|
+
* Items at the front of the queue, in dequeue order. The parser requires
|
|
520
|
+
* an explicit array; an explicit empty array remains valid.
|
|
521
|
+
*/
|
|
522
|
+
readonly queueItems: ReadonlyArray<MemoryStoreQueueItemWire>;
|
|
575
523
|
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
590
|
-
*
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
*
|
|
599
|
-
*
|
|
600
|
-
|
|
601
|
-
* `exactOptionalPropertyTypes`. The parser normalizes JSON `null`
|
|
602
|
-
* values to `undefined` at validation time so consumers only ever
|
|
603
|
-
* observe `undefined`.
|
|
604
|
-
*/
|
|
524
|
+
/**
|
|
525
|
+
* Builds a minimally-valid {@link MemoryStoreQueueItemWire} body. Pass
|
|
526
|
+
* an `overrides` object to tweak fields without re-stating the defaults.
|
|
527
|
+
*
|
|
528
|
+
* @param overrides - Fields to override on the default body.
|
|
529
|
+
* @returns A valid wire body with the overrides applied.
|
|
530
|
+
*/
|
|
531
|
+
export declare function validQueueItemBody(overrides?: Partial<MemoryStoreQueueItemWire>): MemoryStoreQueueItemWire;
|
|
532
|
+
/**
|
|
533
|
+
* Builds a minimally-valid {@link ReadQueueItemsResponseWire} body
|
|
534
|
+
* carrying a single default queue item. Pass an `overrides` object to
|
|
535
|
+
* change the read identifier or supply a different items array.
|
|
536
|
+
*
|
|
537
|
+
* @param overrides - Fields to override on the default body.
|
|
538
|
+
* @returns A valid dequeue response body with the overrides applied.
|
|
539
|
+
*/
|
|
540
|
+
export declare function validDequeueBody(overrides?: Partial<ReadQueueItemsResponseWire>): ReadQueueItemsResponseWire;
|
|
541
|
+
/**
|
|
542
|
+
* Wire shape of the `Place` resource -- the response body returned by
|
|
543
|
+
* `Cloud_GetPlace` and `Cloud_UpdatePlace`. Genuinely optional fields
|
|
544
|
+
* are `T | undefined` so callers can simulate absence under
|
|
545
|
+
* `exactOptionalPropertyTypes`. The parser normalizes JSON `null`
|
|
546
|
+
* values to `undefined` at validation time so consumers only ever
|
|
547
|
+
* observe `undefined`.
|
|
548
|
+
*/
|
|
605
549
|
interface PlaceWire {
|
|
606
550
|
/** ISO timestamp when the place was created (`date-time`). */
|
|
607
551
|
readonly createTime: string;
|
|
@@ -616,71 +560,65 @@ interface PlaceWire {
|
|
|
616
560
|
/** Maximum number of allowed users in a single server. */
|
|
617
561
|
readonly serverSize?: number | undefined;
|
|
618
562
|
/**
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
563
|
+
* Whether the place was created in-experience via
|
|
564
|
+
* `AssetService::CreatePlaceAsync()`.
|
|
565
|
+
*/
|
|
622
566
|
readonly universeRuntimeCreation?: boolean | undefined;
|
|
623
567
|
/** ISO timestamp of the most recent update (`date-time`). */
|
|
624
568
|
readonly updateTime: string;
|
|
625
569
|
}
|
|
626
|
-
//#endregion
|
|
627
|
-
//#region src/domains/universes/places/wire.d.ts
|
|
628
570
|
/**
|
|
629
|
-
* Wire shape of the publish-version success response body.
|
|
630
|
-
*/
|
|
571
|
+
* Wire shape of the publish-version success response body.
|
|
572
|
+
*/
|
|
631
573
|
interface PlaceVersionWire {
|
|
632
574
|
/** Auto-incrementing version number assigned by Roblox. */
|
|
633
575
|
readonly versionNumber: number;
|
|
634
576
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
*
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* Wire-level visibility enum, mirroring the `visibility` field of the
|
|
673
|
-
* `Universe` schema.
|
|
674
|
-
*/
|
|
577
|
+
/**
|
|
578
|
+
* Returns a fresh, minimal `.rbxl`-formatted body whose magic bytes
|
|
579
|
+
* match {@link RBXL_SIGNATURE}. Useful when integration tests don't
|
|
580
|
+
* care about the file's contents past the signature.
|
|
581
|
+
*
|
|
582
|
+
* @returns A 14-byte rbxl body matching the binary signature.
|
|
583
|
+
*/
|
|
584
|
+
export declare function rbxlBody(): Uint8Array<ArrayBuffer>;
|
|
585
|
+
/**
|
|
586
|
+
* Returns a fresh, minimal `.rbxlx`-formatted body whose magic bytes
|
|
587
|
+
* match {@link RBXLX_SIGNATURE}. Useful when integration tests don't
|
|
588
|
+
* care about the file's contents past the signature.
|
|
589
|
+
*
|
|
590
|
+
* @returns An 8-byte rbxlx body matching the XML signature.
|
|
591
|
+
*/
|
|
592
|
+
export declare function rbxlxBody(): Uint8Array<ArrayBuffer>;
|
|
593
|
+
/**
|
|
594
|
+
* Builds a minimally-valid {@link PlaceVersionWire} body. Pass an
|
|
595
|
+
* `overrides` object to tweak fields without re-stating the defaults.
|
|
596
|
+
*
|
|
597
|
+
* @param overrides - Fields to override on the default body.
|
|
598
|
+
* @returns A valid wire body with the overrides applied.
|
|
599
|
+
*/
|
|
600
|
+
export declare function validPublishResponseBody(overrides?: Partial<PlaceVersionWire>): PlaceVersionWire;
|
|
601
|
+
/**
|
|
602
|
+
* Builds a minimally-valid {@link PlaceWire} body. Pass an `overrides`
|
|
603
|
+
* object to tweak fields without re-stating the defaults.
|
|
604
|
+
*
|
|
605
|
+
* @param overrides - Fields to override on the default body.
|
|
606
|
+
* @returns A valid wire body with the overrides applied.
|
|
607
|
+
*/
|
|
608
|
+
export declare function validPlaceBody(overrides?: Partial<PlaceWire>): PlaceWire;
|
|
609
|
+
/**
|
|
610
|
+
* Wire-level visibility enum, mirroring the `visibility` field of the
|
|
611
|
+
* `Universe` schema.
|
|
612
|
+
*/
|
|
675
613
|
type VisibilityWire = "PRIVATE" | "PUBLIC" | "VISIBILITY_UNSPECIFIED";
|
|
676
614
|
/**
|
|
677
|
-
* Wire-level age-rating enum, mirroring the `ageRating` field of the
|
|
678
|
-
* `Universe` schema.
|
|
679
|
-
*/
|
|
615
|
+
* Wire-level age-rating enum, mirroring the `ageRating` field of the
|
|
616
|
+
* `Universe` schema.
|
|
617
|
+
*/
|
|
680
618
|
type AgeRatingWire = "AGE_RATING_9_PLUS" | "AGE_RATING_13_PLUS" | "AGE_RATING_17_PLUS" | "AGE_RATING_ALL" | "AGE_RATING_UNSPECIFIED";
|
|
681
619
|
/**
|
|
682
|
-
* Wire shape of `Universe_SocialLink`.
|
|
683
|
-
*/
|
|
620
|
+
* Wire shape of `Universe_SocialLink`.
|
|
621
|
+
*/
|
|
684
622
|
interface SocialLinkWire {
|
|
685
623
|
/** Display title for the link. */
|
|
686
624
|
readonly title: string;
|
|
@@ -688,12 +626,12 @@ interface SocialLinkWire {
|
|
|
688
626
|
readonly uri: string;
|
|
689
627
|
}
|
|
690
628
|
/**
|
|
691
|
-
* Wire shape of the `Universe` resource -- the response body returned
|
|
692
|
-
* by both `Cloud_GetUniverse` and `Cloud_UpdateUniverse`. Genuinely
|
|
693
|
-
* optional fields are `T | undefined` (rather than `T`) so callers
|
|
694
|
-
* can simulate absence by setting a field to `undefined` under
|
|
695
|
-
* `exactOptionalPropertyTypes`.
|
|
696
|
-
*/
|
|
629
|
+
* Wire shape of the `Universe` resource -- the response body returned
|
|
630
|
+
* by both `Cloud_GetUniverse` and `Cloud_UpdateUniverse`. Genuinely
|
|
631
|
+
* optional fields are `T | undefined` (rather than `T`) so callers
|
|
632
|
+
* can simulate absence by setting a field to `undefined` under
|
|
633
|
+
* `exactOptionalPropertyTypes`.
|
|
634
|
+
*/
|
|
697
635
|
interface UniverseWire {
|
|
698
636
|
/** Age-rating classification. */
|
|
699
637
|
readonly ageRating: AgeRatingWire;
|
|
@@ -720,8 +658,8 @@ interface UniverseWire {
|
|
|
720
658
|
/** Resource path, e.g. `"universes/{id}"`. */
|
|
721
659
|
readonly path: string;
|
|
722
660
|
/**
|
|
723
|
-
|
|
724
|
-
|
|
661
|
+
* Private server price in Robux; absent when private servers are disabled.
|
|
662
|
+
*/
|
|
725
663
|
readonly privateServerPriceRobux?: number | undefined;
|
|
726
664
|
/** Roblox Group social link block. */
|
|
727
665
|
readonly robloxGroupSocialLink?: SocialLinkWire | undefined;
|
|
@@ -746,16 +684,13 @@ interface UniverseWire {
|
|
|
746
684
|
/** Youtube social link block. */
|
|
747
685
|
readonly youtubeSocialLink?: SocialLinkWire | undefined;
|
|
748
686
|
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
declare function validUniverseBody(overrides?: Partial<UniverseWire>): UniverseWire;
|
|
759
|
-
//#endregion
|
|
760
|
-
export { type CapturedRequest, type FakeHttpClient, FakeHttpClientError, type FakeSend, type FakeSleep, type SendFunc, createFakeHttpClient, createFakeSend, createFakeSleep, rbxlBody, rbxlxBody, validBadgeBody, validBinaryInputBody, validDequeueBody, validDeveloperProductBody, validGamePassBody, validIconListBody, validInProgressTaskBody, validLocalizedIcon, validLogPageBody, validPlaceBody, validPublishResponseBody, validQueueItemBody, validThumbnailUploadBody, validUniverseBody };
|
|
687
|
+
/**
|
|
688
|
+
* Builds a minimally-valid {@link UniverseWire} body. Pass an
|
|
689
|
+
* `overrides` object to tweak fields without re-stating the defaults.
|
|
690
|
+
*
|
|
691
|
+
* @param overrides - Fields to override on the default body.
|
|
692
|
+
* @returns A valid wire body with the overrides applied.
|
|
693
|
+
*/
|
|
694
|
+
export declare function validUniverseBody(overrides?: Partial<UniverseWire>): UniverseWire;
|
|
695
|
+
export type { CapturedRequest, FakeHttpClient, FakeSend, FakeSleep, SendFunc };
|
|
761
696
|
//# sourceMappingURL=testing.d.mts.map
|