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