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