@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/game-passes.d.mts
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/domains/game-internationalization/game-pass-icon/types.d.ts
|
|
1
|
+
import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-B4Fztv_7.mjs";
|
|
2
|
+
import { c as OpenCloudClientOptions, d as RequestOptions, g as OpenCloudError, m as Result, p as Page } from "./types-Z4abDJfK.mjs";
|
|
5
3
|
/**
|
|
6
|
-
* Parameters for uploading or replacing the per-locale icon registered
|
|
7
|
-
* against a game pass. A subsequent upload for the same
|
|
8
|
-
* `(gamePassId, languageCode)` pair replaces the existing icon for that
|
|
9
|
-
* locale.
|
|
10
|
-
*
|
|
11
|
-
* @since 0.1.0
|
|
12
|
-
*/
|
|
4
|
+
* Parameters for uploading or replacing the per-locale icon registered
|
|
5
|
+
* against a game pass. A subsequent upload for the same
|
|
6
|
+
* `(gamePassId, languageCode)` pair replaces the existing icon for that
|
|
7
|
+
* locale.
|
|
8
|
+
*
|
|
9
|
+
* @since 0.1.0
|
|
10
|
+
*/
|
|
13
11
|
interface UploadGamePassIconParameters {
|
|
14
12
|
/** Stringified ID of the game pass whose icon is being uploaded. */
|
|
15
13
|
readonly gamePassId: string;
|
|
16
14
|
/** Image bytes to upload. PNG and JPEG are accepted by the server. */
|
|
17
15
|
readonly image: Blob | Uint8Array;
|
|
18
16
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
* Roblox wire form the icon is being uploaded for. Either the
|
|
18
|
+
* Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form
|
|
19
|
+
* (e.g. `en_us`, `pt_br`, `ar_001`).
|
|
20
|
+
*/
|
|
23
21
|
readonly languageCode: RobloxLanguageCode | RobloxLocale;
|
|
24
22
|
}
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region src/domains/game-internationalization/game-pass-name-description/types.d.ts
|
|
27
23
|
/**
|
|
28
|
-
* Parameters for updating the per-locale name and/or description registered
|
|
29
|
-
* against a game pass. Both `name` and `description` are optional; fields
|
|
30
|
-
* omitted from the call are not included in the JSON body so the server
|
|
31
|
-
* leaves the existing value for that locale untouched.
|
|
32
|
-
*
|
|
33
|
-
* @since 0.1.0
|
|
34
|
-
*/
|
|
24
|
+
* Parameters for updating the per-locale name and/or description registered
|
|
25
|
+
* against a game pass. Both `name` and `description` are optional; fields
|
|
26
|
+
* omitted from the call are not included in the JSON body so the server
|
|
27
|
+
* leaves the existing value for that locale untouched.
|
|
28
|
+
*
|
|
29
|
+
* @since 0.1.0
|
|
30
|
+
*/
|
|
35
31
|
interface UpdateGamePassNameDescriptionParameters {
|
|
36
32
|
/** Replacement display name for the supplied locale. */
|
|
37
33
|
readonly name?: string;
|
|
@@ -40,26 +36,24 @@ interface UpdateGamePassNameDescriptionParameters {
|
|
|
40
36
|
/** Stringified ID of the game pass whose localization is being updated. */
|
|
41
37
|
readonly gamePassId: string;
|
|
42
38
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
* Roblox wire form being updated. Either the Language form (e.g.
|
|
40
|
+
* `en`, `fil`, `zh-hans`) or the Locale form (e.g. `en_us`, `pt_br`,
|
|
41
|
+
* `ar_001`).
|
|
42
|
+
*/
|
|
47
43
|
readonly languageCode: RobloxLanguageCode | RobloxLocale;
|
|
48
44
|
}
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region src/domains/game-passes/game-passes/types.d.ts
|
|
51
45
|
/**
|
|
52
|
-
* Pricing feature flags that can be enabled on a game pass. Values
|
|
53
|
-
* mirror the Open Cloud `GamePasses.PricingFeature` enum.
|
|
54
|
-
*
|
|
55
|
-
* @since 0.1.0
|
|
56
|
-
*/
|
|
46
|
+
* Pricing feature flags that can be enabled on a game pass. Values
|
|
47
|
+
* mirror the Open Cloud `GamePasses.PricingFeature` enum.
|
|
48
|
+
*
|
|
49
|
+
* @since 0.1.0
|
|
50
|
+
*/
|
|
57
51
|
type GamePassPricingFeature = "Invalid" | "PriceOptimization" | "RegionalPricing" | "UserFixedPrice";
|
|
58
52
|
/**
|
|
59
|
-
* Public shape of a game pass's pricing configuration.
|
|
60
|
-
*
|
|
61
|
-
* @since 0.1.0
|
|
62
|
-
*/
|
|
53
|
+
* Public shape of a game pass's pricing configuration.
|
|
54
|
+
*
|
|
55
|
+
* @since 0.1.0
|
|
56
|
+
*/
|
|
63
57
|
interface GamePassPrice {
|
|
64
58
|
/** Default Robux price; `undefined` when no default price is configured. */
|
|
65
59
|
readonly defaultPriceInRobux: number | undefined;
|
|
@@ -67,12 +61,12 @@ interface GamePassPrice {
|
|
|
67
61
|
readonly enabledFeatures: ReadonlyArray<GamePassPricingFeature>;
|
|
68
62
|
}
|
|
69
63
|
/**
|
|
70
|
-
* A Roblox game pass as exposed to SDK consumers. Fields use DX-friendly
|
|
71
|
-
* names and types (stringified IDs, `Date` timestamps) rather than the
|
|
72
|
-
* raw wire representation.
|
|
73
|
-
*
|
|
74
|
-
* @since 0.1.0
|
|
75
|
-
*/
|
|
64
|
+
* A Roblox game pass as exposed to SDK consumers. Fields use DX-friendly
|
|
65
|
+
* names and types (stringified IDs, `Date` timestamps) rather than the
|
|
66
|
+
* raw wire representation.
|
|
67
|
+
*
|
|
68
|
+
* @since 0.1.0
|
|
69
|
+
*/
|
|
76
70
|
interface GamePass {
|
|
77
71
|
/** Stringified game pass ID. The API returns an int64; always use this. */
|
|
78
72
|
readonly id: string;
|
|
@@ -94,10 +88,10 @@ interface GamePass {
|
|
|
94
88
|
readonly updatedAt: Date;
|
|
95
89
|
}
|
|
96
90
|
/**
|
|
97
|
-
* Parameters for creating a new game pass under a universe.
|
|
98
|
-
*
|
|
99
|
-
* @since 0.1.0
|
|
100
|
-
*/
|
|
91
|
+
* Parameters for creating a new game pass under a universe.
|
|
92
|
+
*
|
|
93
|
+
* @since 0.1.0
|
|
94
|
+
*/
|
|
101
95
|
interface CreateGamePassParameters {
|
|
102
96
|
/** Display name of the new game pass. */
|
|
103
97
|
readonly name: string;
|
|
@@ -107,18 +101,18 @@ interface CreateGamePassParameters {
|
|
|
107
101
|
readonly imageFile?: Blob | Uint8Array;
|
|
108
102
|
/** Whether the game pass should be purchasable immediately. */
|
|
109
103
|
readonly isForSale?: boolean;
|
|
110
|
-
/** Whether
|
|
111
|
-
readonly
|
|
104
|
+
/** Whether managed pricing should be enabled at creation time. */
|
|
105
|
+
readonly isManagedPricingEnabled?: boolean;
|
|
112
106
|
/** Optional default price in Robux at creation time. */
|
|
113
107
|
readonly price?: number;
|
|
114
108
|
/** Stringified ID of the universe that owns the game pass. */
|
|
115
109
|
readonly universeId: string;
|
|
116
110
|
}
|
|
117
111
|
/**
|
|
118
|
-
* Parameters for reading a single game pass by ID.
|
|
119
|
-
*
|
|
120
|
-
* @since 0.1.0
|
|
121
|
-
*/
|
|
112
|
+
* Parameters for reading a single game pass by ID.
|
|
113
|
+
*
|
|
114
|
+
* @since 0.1.0
|
|
115
|
+
*/
|
|
122
116
|
interface GetGamePassParameters {
|
|
123
117
|
/** Stringified ID of the game pass to retrieve. */
|
|
124
118
|
readonly gamePassId: string;
|
|
@@ -126,13 +120,13 @@ interface GetGamePassParameters {
|
|
|
126
120
|
readonly universeId: string;
|
|
127
121
|
}
|
|
128
122
|
/**
|
|
129
|
-
* Parameters for listing the game passes registered against a universe.
|
|
130
|
-
* Pagination is cursor-based: omit `pageToken` to fetch the first page,
|
|
131
|
-
* then thread the previous response's `nextPageToken` back in until it
|
|
132
|
-
* is `undefined`.
|
|
133
|
-
*
|
|
134
|
-
* @since 0.1.0
|
|
135
|
-
*/
|
|
123
|
+
* Parameters for listing the game passes registered against a universe.
|
|
124
|
+
* Pagination is cursor-based: omit `pageToken` to fetch the first page,
|
|
125
|
+
* then thread the previous response's `nextPageToken` back in until it
|
|
126
|
+
* is `undefined`.
|
|
127
|
+
*
|
|
128
|
+
* @since 0.1.0
|
|
129
|
+
*/
|
|
136
130
|
interface ListGamePassesParameters {
|
|
137
131
|
/** Optional page size; the server defaults to 50 when omitted. */
|
|
138
132
|
readonly pageSize?: number;
|
|
@@ -142,13 +136,13 @@ interface ListGamePassesParameters {
|
|
|
142
136
|
readonly universeId: string;
|
|
143
137
|
}
|
|
144
138
|
/**
|
|
145
|
-
* Parameters for partially updating an existing game pass. Every field
|
|
146
|
-
* except the identifiers is optional; omitted fields are not included
|
|
147
|
-
* in the multipart body so the server leaves their current values
|
|
148
|
-
* untouched.
|
|
149
|
-
*
|
|
150
|
-
* @since 0.1.0
|
|
151
|
-
*/
|
|
139
|
+
* Parameters for partially updating an existing game pass. Every field
|
|
140
|
+
* except the identifiers is optional; omitted fields are not included
|
|
141
|
+
* in the multipart body so the server leaves their current values
|
|
142
|
+
* untouched.
|
|
143
|
+
*
|
|
144
|
+
* @since 0.1.0
|
|
145
|
+
*/
|
|
152
146
|
interface UpdateGamePassParameters {
|
|
153
147
|
/** Optional new display name for the game pass. */
|
|
154
148
|
readonly name?: string;
|
|
@@ -160,172 +154,173 @@ interface UpdateGamePassParameters {
|
|
|
160
154
|
readonly imageFile?: Blob | Uint8Array;
|
|
161
155
|
/** Optional new value for whether the game pass is purchasable. */
|
|
162
156
|
readonly isForSale?: boolean;
|
|
163
|
-
/** Optional new value for whether
|
|
164
|
-
readonly
|
|
157
|
+
/** Optional new value for whether managed pricing is enabled. */
|
|
158
|
+
readonly isManagedPricingEnabled?: boolean;
|
|
165
159
|
/** Optional new default price in Robux. */
|
|
166
160
|
readonly price?: number;
|
|
167
161
|
/** Stringified ID of the universe that owns the game pass. */
|
|
168
162
|
readonly universeId: string;
|
|
169
163
|
}
|
|
170
|
-
//#endregion
|
|
171
|
-
//#region src/resources/game-passes/client.d.ts
|
|
172
164
|
interface GamePassLocalizationHandle {
|
|
173
165
|
/**
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
166
|
+
* Updates the per-locale display name and/or description registered against
|
|
167
|
+
* a game pass. Either `name`, `description`, or both may be supplied;
|
|
168
|
+
* omitted fields are not forwarded so the server leaves the existing value
|
|
169
|
+
* for that locale untouched. Mirrors the upstream `200 OK` echo body as
|
|
170
|
+
* `undefined` data.
|
|
171
|
+
*
|
|
172
|
+
* @param parameters - Game pass and language identifiers plus the optional
|
|
173
|
+
* replacement values.
|
|
174
|
+
* @param options - Optional per-request overrides.
|
|
175
|
+
* @returns A success {@link Result} with no payload, or the
|
|
176
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
177
|
+
*/
|
|
186
178
|
updateNameDescription: (parameters: UpdateGamePassNameDescriptionParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
|
|
187
179
|
/**
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
180
|
+
* Uploads or replaces the per-locale icon for a game pass. A subsequent
|
|
181
|
+
* upload for the same `(gamePassId, languageCode)` pair replaces the
|
|
182
|
+
* existing icon for that locale. Does not retry on 5xx so a duplicate
|
|
183
|
+
* upload cannot be created if the server fails mid-write.
|
|
184
|
+
*
|
|
185
|
+
* No default request timeout applies to this upload; pass `options.timeout`
|
|
186
|
+
* to set a per-call deadline.
|
|
187
|
+
*
|
|
188
|
+
* @param parameters - Game pass and language identifiers plus the image
|
|
189
|
+
* bytes to upload.
|
|
190
|
+
* @param options - Optional per-request overrides.
|
|
191
|
+
* @returns A success {@link Result} with no payload, or the
|
|
192
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
193
|
+
*/
|
|
202
194
|
uploadIcon: (parameters: UploadGamePassIconParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
|
|
203
195
|
}
|
|
204
196
|
/**
|
|
205
|
-
* Public client for the Roblox Open Cloud Game Passes API.
|
|
206
|
-
*
|
|
207
|
-
* Wires request builders, the injected {@link
|
|
208
|
-
* OpenCloudClientOptions.httpClient}, and response parsers into a single
|
|
209
|
-
* ergonomic surface. Every method returns a {@link Result} so callers handle
|
|
210
|
-
* failure explicitly; no thrown `OpenCloudError` ever escapes the client.
|
|
211
|
-
*
|
|
212
|
-
* ```ts
|
|
213
|
-
* import { GamePassesClient } from "@bedrock-rbx/ocale/game-passes";
|
|
214
|
-
*
|
|
215
|
-
* const client = new GamePassesClient({
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
* console.
|
|
226
|
-
* }
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
* @
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
|
|
259
|
-
|
|
197
|
+
* Public client for the Roblox Open Cloud Game Passes API.
|
|
198
|
+
*
|
|
199
|
+
* Wires request builders, the injected {@link
|
|
200
|
+
* OpenCloudClientOptions.httpClient}, and response parsers into a single
|
|
201
|
+
* ergonomic surface. Every method returns a {@link Result} so callers handle
|
|
202
|
+
* failure explicitly; no thrown `OpenCloudError` ever escapes the client.
|
|
203
|
+
*
|
|
204
|
+
* ```ts
|
|
205
|
+
* import { GamePassesClient } from "@bedrock-rbx/ocale/game-passes";
|
|
206
|
+
*
|
|
207
|
+
* const client = new GamePassesClient({
|
|
208
|
+
* credential: { apiKey: process.env.ROBLOX_API_KEY!, kind: "apiKey" },
|
|
209
|
+
* });
|
|
210
|
+
*
|
|
211
|
+
* const result = await client.get({
|
|
212
|
+
* universeId: "1234567890",
|
|
213
|
+
* gamePassId: "9876543210",
|
|
214
|
+
* });
|
|
215
|
+
*
|
|
216
|
+
* if (result.success) {
|
|
217
|
+
* console.log(`${result.data.name} (${result.data.id})`);
|
|
218
|
+
* } else {
|
|
219
|
+
* console.error(result.err.message);
|
|
220
|
+
* }
|
|
221
|
+
* ```
|
|
222
|
+
*
|
|
223
|
+
* Listing is cursor-paginated; drive the loop on `nextPageToken`:
|
|
224
|
+
*
|
|
225
|
+
* ```ts
|
|
226
|
+
* let pageToken: string | undefined;
|
|
227
|
+
* do {
|
|
228
|
+
* const page = await client.list({ universeId: "1234567890", pageToken });
|
|
229
|
+
* if (!page.success) {
|
|
230
|
+
* console.error(page.err.message);
|
|
231
|
+
* break;
|
|
232
|
+
* }
|
|
233
|
+
*
|
|
234
|
+
* for (const pass of page.data.items) {
|
|
235
|
+
* console.log(`${pass.name} (${pass.id})`);
|
|
236
|
+
* }
|
|
237
|
+
*
|
|
238
|
+
* pageToken = page.data.nextPageToken;
|
|
239
|
+
* } while (pageToken !== undefined);
|
|
240
|
+
* ```
|
|
241
|
+
*
|
|
242
|
+
* @since 0.1.0
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
*
|
|
246
|
+
* ```ts
|
|
247
|
+
* import { GamePassesClient } from "@bedrock-rbx/ocale/game-passes";
|
|
248
|
+
*
|
|
249
|
+
* const client = new GamePassesClient({
|
|
250
|
+
* credential: { apiKey: "your-key", kind: "apiKey" },
|
|
251
|
+
* });
|
|
252
|
+
* expect(client).toBeInstanceOf(GamePassesClient);
|
|
253
|
+
* ```
|
|
254
|
+
*/
|
|
255
|
+
export declare class GamePassesClient {
|
|
260
256
|
#private;
|
|
261
257
|
/**
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
258
|
+
* Operation Group exposing per-locale localization Operations
|
|
259
|
+
* (`updateNameDescription`, `uploadIcon`) backed by the
|
|
260
|
+
* `legacy-game-internationalization` domain. Source-language values
|
|
261
|
+
* remain on {@link GamePassesClient.update}; methods on this group set
|
|
262
|
+
* per-locale overlays on top. Shares the parent client's HTTP,
|
|
263
|
+
* rate-limit, and retry plumbing.
|
|
264
|
+
*/
|
|
269
265
|
readonly localization: GamePassLocalizationHandle;
|
|
270
266
|
/**
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
267
|
+
* Creates a new {@link GamePassesClient}. Configuration is frozen on
|
|
268
|
+
* construction; per-request overrides are accepted on each method.
|
|
269
|
+
*
|
|
270
|
+
* @param options - Client-level configuration including the API key.
|
|
271
|
+
*/
|
|
276
272
|
constructor(options: OpenCloudClientOptions);
|
|
277
273
|
/**
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
274
|
+
* Creates a new game pass under the supplied universe.
|
|
275
|
+
*
|
|
276
|
+
* No default request timeout applies to this upload; pass `options.timeout`
|
|
277
|
+
* to set a per-call deadline.
|
|
278
|
+
*
|
|
279
|
+
* @param parameters - Creation fields including the universe and pass name.
|
|
280
|
+
* @param options - Optional per-request overrides.
|
|
281
|
+
* @returns A {@link Result} wrapping the parsed {@link GamePass} or the
|
|
282
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
283
|
+
*/
|
|
288
284
|
create(parameters: CreateGamePassParameters, options?: RequestOptions): Promise<Result<GamePass, OpenCloudError>>;
|
|
289
285
|
/**
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
286
|
+
* Reads a single game pass by ID.
|
|
287
|
+
*
|
|
288
|
+
* @param parameters - Universe and game pass identifiers.
|
|
289
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
290
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
291
|
+
* @returns A {@link Result} wrapping the parsed {@link GamePass} or the
|
|
292
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
293
|
+
*/
|
|
298
294
|
get(parameters: GetGamePassParameters, options?: RequestOptions): Promise<Result<GamePass, OpenCloudError>>;
|
|
299
295
|
/**
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
296
|
+
* Lists one page of game passes for the supplied universe. Pagination is
|
|
297
|
+
* cursor-based: omit `pageToken` for the first page, then thread the
|
|
298
|
+
* previous response's `nextPageToken` back in until it is `undefined`.
|
|
299
|
+
*
|
|
300
|
+
* @param parameters - Universe identifier and optional page cursors.
|
|
301
|
+
* @param options - Optional per-request overrides.
|
|
302
|
+
* @returns A {@link Result} wrapping a {@link Page} of {@link GamePass},
|
|
303
|
+
* or the {@link OpenCloudError} that caused the request to fail.
|
|
304
|
+
*/
|
|
309
305
|
list(parameters: ListGamePassesParameters, options?: RequestOptions): Promise<Result<Page<GamePass>, OpenCloudError>>;
|
|
310
306
|
/**
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
307
|
+
* Partially updates an existing game pass. Mirrors the upstream
|
|
308
|
+
* `204 No Content` response: a successful update yields `undefined`
|
|
309
|
+
* data. Callers that need the post-update state (for example to
|
|
310
|
+
* observe a server-derived `updatedAt`) chain
|
|
311
|
+
* {@link GamePassesClient.get} themselves so the GET only fires when
|
|
312
|
+
* actually needed.
|
|
313
|
+
*
|
|
314
|
+
* No default request timeout applies to this upload; pass `options.timeout`
|
|
315
|
+
* to set a per-call deadline.
|
|
316
|
+
*
|
|
317
|
+
* @param parameters - The universe and game pass identifiers and the
|
|
318
|
+
* fields to update. Only fields explicitly provided are forwarded.
|
|
319
|
+
* @param options - Optional per-request overrides.
|
|
320
|
+
* @returns A success {@link Result} with no payload, or the
|
|
321
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
322
|
+
*/
|
|
327
323
|
update(parameters: UpdateGamePassParameters, options?: RequestOptions): Promise<Result<undefined, OpenCloudError>>;
|
|
328
324
|
}
|
|
329
|
-
|
|
330
|
-
export { type CreateGamePassParameters, type GamePass, type GamePassPrice, type GamePassPricingFeature, GamePassesClient, type GetGamePassParameters, type ListGamePassesParameters, type UpdateGamePassNameDescriptionParameters, type UpdateGamePassParameters, type UploadGamePassIconParameters };
|
|
325
|
+
export type { CreateGamePassParameters, GamePass, GamePassPrice, GamePassPricingFeature, GetGamePassParameters, ListGamePassesParameters, UpdateGamePassNameDescriptionParameters, UpdateGamePassParameters, UploadGamePassIconParameters };
|
|
331
326
|
//# sourceMappingURL=game-passes.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-passes.d.mts","names":[],"sources":["../src/domains/game-internationalization/game-pass-icon/types.ts","../src/domains/game-internationalization/game-pass-name-description/types.ts","../src/domains/game-passes/game-passes/types.ts","../src/resources/game-passes/client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"game-passes.d.mts","names":[],"sources":["../src/domains/game-internationalization/game-pass-icon/types.ts","../src/domains/game-internationalization/game-pass-name-description/types.ts","../src/domains/game-passes/game-passes/types.ts","../src/resources/game-passes/client.ts"],"mappings":";;;;;;;;;;UAUiB;;WAEP;;WAEA,OAAO,OAAO;;;;;;WAMd,cAAc,qBAAqB;;;;;;;;;;UCV5B;;WAEP;;WAEA;;WAEA;;;;;;WAMA,cAAc,qBAAqB;;;;;;;;KChBjC;;;;;;UAWK;;WAEP;;WAEA,iBAAiB,cAAc;;;;;;;;;UAUxB;;WAEP;;WAEA;;WAEA,WAAW;;WAEX;;WAEA;;WAEA;;WAEA;;WAEA,OAAO;;WAEP,WAAW;;;;;;;UAQJ;;WAEP;;WAEA;;WAEA,YAAY,OAAO;;WAEnB;;WAEA;;WAEA;;WAEA;;;;;;;UAQO;;WAEP;;WAEA;;;;;;;;;;UAWO;;WAEP;;WAEA;;WAEA;;;;;;;;;;UAWO;;WAEP;;WAEA;;WAEA;;WAEA,YAAY,OAAO;;WAEnB;;WAEA;;WAEA;;WAEA;;UCvBA;;;;;;;;;;;;;;EAcT,wBACC,YAAY,yCACZ,UAAU,mBACN,QAAQ,kBAAkB;;;;;;;;;;;;;;;;EAgB/B,aACC,YAAY,8BACZ,UAAU,mBACN,QAAQ,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA8DnB;;;;;;;;;;WAWI,cAAc;;;;;;;EAQ9B,YAAY,SAAS;;;;;;;;;;;;EAgBrB,OACC,YAAY,0BACZ,UAAU,iBACR,QAAQ,OAAO,UAAU;;;;;;;;;;EAa5B,IACC,YAAY,uBACZ,UAAU,iBACR,QAAQ,OAAO,UAAU;;;;;;;;;;;EAc5B,KACC,YAAY,0BACZ,UAAU,iBACR,QAAQ,OAAO,KAAK,WAAW;;;;;;;;;;;;;;;;;;EAqBlC,OACC,YAAY,0BACZ,UAAU,iBACR,QAAQ,kBAAkB"}
|