@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.
Files changed (95) hide show
  1. package/README.md +10 -5
  2. package/dist/assets.d.mts +64 -0
  3. package/dist/assets.d.mts.map +1 -0
  4. package/dist/assets.mjs +301 -0
  5. package/dist/assets.mjs.map +1 -0
  6. package/dist/badge-insufficient-funds-BLFvQZt1.mjs +91 -0
  7. package/dist/badge-insufficient-funds-BLFvQZt1.mjs.map +1 -0
  8. package/dist/badges.d.mts +359 -196
  9. package/dist/badges.d.mts.map +1 -1
  10. package/dist/badges.mjs +493 -59
  11. package/dist/badges.mjs.map +1 -1
  12. package/dist/capacity-admission-Ce2V9QNb.d.mts +347 -0
  13. package/dist/capacity-admission-Ce2V9QNb.d.mts.map +1 -0
  14. package/dist/{data.generated-B2ceLfSn.d.mts → data.generated-B4Fztv_7.d.mts} +23 -25
  15. package/dist/data.generated-B4Fztv_7.d.mts.map +1 -0
  16. package/dist/developer-products.d.mts +207 -194
  17. package/dist/developer-products.d.mts.map +1 -1
  18. package/dist/developer-products.mjs +125 -39
  19. package/dist/developer-products.mjs.map +1 -1
  20. package/dist/game-passes.d.mts +206 -211
  21. package/dist/game-passes.d.mts.map +1 -1
  22. package/dist/game-passes.mjs +35 -36
  23. package/dist/game-passes.mjs.map +1 -1
  24. package/dist/index.d.mts +947 -366
  25. package/dist/index.d.mts.map +1 -1
  26. package/dist/index.mjs +324 -12
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/is-date-time-string-C91G44SI.mjs +19 -0
  29. package/dist/is-date-time-string-C91G44SI.mjs.map +1 -0
  30. package/dist/locales.d.mts +28 -2
  31. package/dist/locales.d.mts.map +1 -0
  32. package/dist/locales.mjs +24 -3
  33. package/dist/locales.mjs.map +1 -1
  34. package/dist/luau-execution.d.mts +154 -157
  35. package/dist/luau-execution.d.mts.map +1 -1
  36. package/dist/luau-execution.mjs +15 -16
  37. package/dist/luau-execution.mjs.map +1 -1
  38. package/dist/{network-error-DR9FX5hb.mjs → network-error-P4An7nUB.mjs} +48 -14
  39. package/dist/network-error-P4An7nUB.mjs.map +1 -0
  40. package/dist/places.d.mts +258 -186
  41. package/dist/places.d.mts.map +1 -1
  42. package/dist/places.mjs +187 -35
  43. package/dist/places.mjs.map +1 -1
  44. package/dist/{poll-timeout-3PXLsabj.mjs → poll-timeout-BCxgN97O.mjs} +4 -6
  45. package/dist/{poll-timeout-3PXLsabj.mjs.map → poll-timeout-BCxgN97O.mjs.map} +1 -1
  46. package/dist/{polling-helpers-CoVhsC33.mjs → polling-helpers-BtEYR5dN.mjs} +260 -105
  47. package/dist/polling-helpers-BtEYR5dN.mjs.map +1 -0
  48. package/dist/{price-information-B0tkOoAX.mjs → price-information--d6GZAcp.mjs} +3 -4
  49. package/dist/{price-information-B0tkOoAX.mjs.map → price-information--d6GZAcp.mjs.map} +1 -1
  50. package/dist/resource-client-CF8SPsV8.d.mts +162 -0
  51. package/dist/resource-client-CF8SPsV8.d.mts.map +1 -0
  52. package/dist/{resource-client-rqTMkBeR.mjs → resource-client-Cm_bPcCs.mjs} +589 -197
  53. package/dist/resource-client-Cm_bPcCs.mjs.map +1 -0
  54. package/dist/retry-DYxm_eBU.d.mts +225 -0
  55. package/dist/retry-DYxm_eBU.d.mts.map +1 -0
  56. package/dist/{retry-BlX4tUnT.mjs → retry-Dv5TsY9O.mjs} +312 -54
  57. package/dist/retry-Dv5TsY9O.mjs.map +1 -0
  58. package/dist/{signatures-JF-7Psce.mjs → signatures-CtJ7jfVN.mjs} +2 -3
  59. package/dist/{signatures-JF-7Psce.mjs.map → signatures-CtJ7jfVN.mjs.map} +1 -1
  60. package/dist/storage.d.mts +333 -344
  61. package/dist/storage.d.mts.map +1 -1
  62. package/dist/storage.mjs +39 -40
  63. package/dist/storage.mjs.map +1 -1
  64. package/dist/testing.d.mts +369 -434
  65. package/dist/testing.d.mts.map +1 -1
  66. package/dist/testing.mjs +18 -33
  67. package/dist/testing.mjs.map +1 -1
  68. package/dist/{to-blob-RPqMBuft.mjs → to-blob-Bqu7bmlE.mjs} +2 -3
  69. package/dist/{to-blob-RPqMBuft.mjs.map → to-blob-Bqu7bmlE.mjs.map} +1 -1
  70. package/dist/types-Z4abDJfK.d.mts +501 -0
  71. package/dist/types-Z4abDJfK.d.mts.map +1 -0
  72. package/dist/universes.d.mts +619 -436
  73. package/dist/universes.d.mts.map +1 -1
  74. package/dist/universes.mjs +432 -79
  75. package/dist/universes.mjs.map +1 -1
  76. package/dist/{validation-B_Zs1So2.mjs → validation-kaTLLAD1.mjs} +3 -4
  77. package/dist/{validation-B_Zs1So2.mjs.map → validation-kaTLLAD1.mjs.map} +1 -1
  78. package/dist/wire-DDG87I-d.d.mts +39 -0
  79. package/dist/wire-DDG87I-d.d.mts.map +1 -0
  80. package/package.json +15 -14
  81. package/dist/capacity-admission-IDO3fcUC.d.mts +0 -369
  82. package/dist/capacity-admission-IDO3fcUC.d.mts.map +0 -1
  83. package/dist/data.generated-B2ceLfSn.d.mts.map +0 -1
  84. package/dist/network-error-DR9FX5hb.mjs.map +0 -1
  85. package/dist/polling-helpers-CoVhsC33.mjs.map +0 -1
  86. package/dist/resource-client-B6NeFXUv.d.mts +0 -164
  87. package/dist/resource-client-B6NeFXUv.d.mts.map +0 -1
  88. package/dist/resource-client-rqTMkBeR.mjs.map +0 -1
  89. package/dist/retry-BlX4tUnT.mjs.map +0 -1
  90. package/dist/retry-war_-9tb.d.mts +0 -373
  91. package/dist/retry-war_-9tb.d.mts.map +0 -1
  92. package/dist/types-CvYh4SPC.d.mts +0 -386
  93. package/dist/types-CvYh4SPC.d.mts.map +0 -1
  94. package/dist/wire-D3K-a-UP.d.mts +0 -37
  95. package/dist/wire-D3K-a-UP.d.mts.map +0 -1
@@ -1,9 +1,9 @@
1
- import { a as ApiError } from "./network-error-DR9FX5hb.mjs";
2
- import { r as IDEMPOTENT_METHOD_DEFAULTS, t as CREATE_METHOD_DEFAULTS } from "./retry-BlX4tUnT.mjs";
3
- import { t as toBlob } from "./to-blob-RPqMBuft.mjs";
4
- import { c as isDateTimeString, n as okRequest, o as toJsonDetails, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-rqTMkBeR.mjs";
5
- import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-B0tkOoAX.mjs";
6
- //#region src/domains/developer-products/products/builders.ts
1
+ import { t as toBlob } from "./to-blob-Bqu7bmlE.mjs";
2
+ import { N as isRecord, m as UnexpectedResponseError, r as IDEMPOTENT_METHOD_DEFAULTS, t as CREATE_METHOD_DEFAULTS } from "./retry-Dv5TsY9O.mjs";
3
+ import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information--d6GZAcp.mjs";
4
+ import { t as isDateTimeString } from "./is-date-time-string-C91G44SI.mjs";
5
+ import { n as okRequest, r as parseEmptyResponse, s as toJsonDetails, t as ResourceClient } from "./resource-client-Cm_bPcCs.mjs";
6
+ // src/domains/developer-products/products/builders.ts
7
7
  /**
8
8
  * Builds a `GET` request for the Open Cloud "read developer product"
9
9
  * endpoint.
@@ -31,8 +31,8 @@ function buildCreateRequest(parameters) {
31
31
  body.append("name", parameters.name);
32
32
  if (parameters.description !== void 0) body.append("description", parameters.description);
33
33
  if (parameters.isForSale !== void 0) body.append("isForSale", String(parameters.isForSale));
34
+ if (parameters.isManagedPricingEnabled !== void 0) body.append("isManagedPricingEnabled", String(parameters.isManagedPricingEnabled));
34
35
  if (parameters.price !== void 0) body.append("price", String(parameters.price));
35
- if (parameters.isRegionalPricingEnabled !== void 0) body.append("isRegionalPricingEnabled", String(parameters.isRegionalPricingEnabled));
36
36
  if (parameters.imageFile !== void 0) body.append("imageFile", toBlob(parameters.imageFile));
37
37
  return {
38
38
  body,
@@ -54,9 +54,8 @@ function buildUpdateRequest$1(parameters) {
54
54
  if (parameters.name !== void 0) body.append("name", parameters.name);
55
55
  if (parameters.description !== void 0) body.append("description", parameters.description);
56
56
  if (parameters.isForSale !== void 0) body.append("isForSale", String(parameters.isForSale));
57
+ if (parameters.isManagedPricingEnabled !== void 0) body.append("isManagedPricingEnabled", String(parameters.isManagedPricingEnabled));
57
58
  if (parameters.price !== void 0) body.append("price", String(parameters.price));
58
- if (parameters.isRegionalPricingEnabled !== void 0) body.append("isRegionalPricingEnabled", String(parameters.isRegionalPricingEnabled));
59
- if (parameters.storePageEnabled !== void 0) body.append("storePageEnabled", String(parameters.storePageEnabled));
60
59
  if (parameters.imageFile !== void 0) body.append("imageFile", toBlob(parameters.imageFile));
61
60
  return {
62
61
  body,
@@ -64,8 +63,26 @@ function buildUpdateRequest$1(parameters) {
64
63
  url: `/developer-products/v2/universes/${parameters.universeId}/developer-products/${parameters.productId}`
65
64
  };
66
65
  }
67
- //#endregion
68
- //#region src/domains/developer-products/products/operations.ts
66
+ /**
67
+ * Builds a `GET` request for the Open Cloud "list developer products" endpoint.
68
+ * Optional `pageSize` and `pageToken` are appended to the query string only
69
+ * when defined so the server applies its own defaults for omitted fields.
70
+ *
71
+ * @param parameters - Universe identifier plus optional pagination cursors.
72
+ * @returns A pure {@link HttpRequest} describing the list call.
73
+ */
74
+ function buildListRequest(parameters) {
75
+ const query = new URLSearchParams();
76
+ if (parameters.pageSize !== void 0) query.append("pageSize", String(parameters.pageSize));
77
+ if (parameters.pageToken !== void 0) query.append("pageToken", parameters.pageToken);
78
+ const queryString = query.toString();
79
+ const base = `/developer-products/v2/universes/${parameters.universeId}/developer-products/creator`;
80
+ return {
81
+ method: "GET",
82
+ url: queryString === "" ? base : `${base}?${queryString}`
83
+ };
84
+ }
85
+ // src/domains/developer-products/products/operations.ts
69
86
  /**
70
87
  * Per-second request ceiling for reading a single developer product, from
71
88
  * the Open Cloud OpenAPI schema.
@@ -108,24 +125,33 @@ const GET_REQUIRED_SCOPES = Object.freeze(["developer-product:read"]);
108
125
  * OpenAPI schema.
109
126
  */
110
127
  const WRITE_REQUIRED_SCOPES = Object.freeze(["developer-product:write"]);
111
- //#endregion
112
- //#region src/domains/developer-products/products/parsers.ts
128
+ /**
129
+ * Per-second ceiling from
130
+ * DeveloperProducts_ListDeveloperProductConfigsByUniverseV2.
131
+ */
132
+ const LIST_OPERATION_LIMIT = Object.freeze({
133
+ maxPerSecond: 10,
134
+ operationKey: "developer-products.list"
135
+ });
136
+ /** Read scope required by the list operation. */
137
+ const LIST_REQUIRED_SCOPES = Object.freeze(["developer-product:read"]);
138
+ // src/domains/developer-products/products/parsers.ts
113
139
  /**
114
140
  * Parses a successful Developer Products API response into the public
115
141
  * `DeveloperProduct` shape, returning a `Result` so callers can handle
116
142
  * malformed payloads without exceptions.
117
143
  *
118
144
  * @param response - The full {@link HttpResponse} from the Open Cloud API.
119
- * The status code is included on the returned `ApiError` when validation
120
- * fails; the headers are available for future parsers that need them.
145
+ * The status code is included on the returned `UnexpectedResponseError` when
146
+ * validation fails; the headers are available for future parsers that need
147
+ * them.
121
148
  * @returns A success result wrapping the converted `DeveloperProduct`, or
122
- * an `ApiError` when the body does not match the wire schema.
149
+ * an `UnexpectedResponseError` when the body does not match the wire schema.
123
150
  */
124
151
  function parseDeveloperProductResponse({ body, status: statusCode }) {
125
152
  if (!isDeveloperProductConfigV2(body)) return malformedDeveloperProduct(statusCode, body);
126
153
  const priceWire = body.priceInformation ?? void 0;
127
154
  const iconAssetId = body.iconImageAssetId ?? void 0;
128
- const storePageEnabled = body.storePageEnabled ?? void 0;
129
155
  return {
130
156
  data: {
131
157
  id: String(body.productId),
@@ -137,16 +163,45 @@ function parseDeveloperProductResponse({ body, status: statusCode }) {
137
163
  isImmutable: body.isImmutable,
138
164
  isManagedPricingEnabled: body.isManagedPricingEnabled,
139
165
  price: priceWire === void 0 ? void 0 : copyPriceInformation(priceWire),
140
- storePageEnabled,
141
166
  universeId: String(body.universeId),
142
167
  updatedAt: new Date(body.updatedTimestamp)
143
168
  },
144
169
  success: true
145
170
  };
146
171
  }
172
+ /**
173
+ * Parses a developer product page, preserving its cursor and converting items
174
+ * with the same validation as a single-product response.
175
+ *
176
+ * @param response - The HTTP response to parse.
177
+ * @returns The parsed page or an unexpected response error.
178
+ */
179
+ function parseProductsListResponse(response) {
180
+ const { body, status: statusCode } = response;
181
+ if (!isRecord(body) || !Array.isArray(body["developerProducts"])) return malformedDeveloperProductsList(statusCode, body);
182
+ const nextPageToken = body["nextPageToken"] ?? void 0;
183
+ if (nextPageToken !== void 0 && typeof nextPageToken !== "string") return malformedDeveloperProductsList(statusCode, body);
184
+ const items = [];
185
+ const products = body["developerProducts"];
186
+ for (const item of products) {
187
+ const parsed = parseDeveloperProductResponse({
188
+ ...response,
189
+ body: item
190
+ });
191
+ if (!parsed.success) return malformedDeveloperProductsList(statusCode, body);
192
+ items.push(parsed.data);
193
+ }
194
+ return {
195
+ data: {
196
+ items,
197
+ nextPageToken
198
+ },
199
+ success: true
200
+ };
201
+ }
147
202
  function malformedDeveloperProduct(statusCode, body) {
148
203
  return {
149
- err: new ApiError("Malformed developer product response", {
204
+ err: new UnexpectedResponseError("Malformed developer product response", {
150
205
  details: toJsonDetails(body),
151
206
  statusCode
152
207
  }),
@@ -166,12 +221,18 @@ function isDeveloperProductConfigV2(body) {
166
221
  if (iconImageAssetId !== void 0 && typeof iconImageAssetId !== "number") return false;
167
222
  const price = body["priceInformation"] ?? void 0;
168
223
  if (price !== void 0 && !isPriceInformationLike(price, isPricingFeatureWire)) return false;
169
- const storePageEnabled = body["storePageEnabled"] ?? void 0;
170
- if (storePageEnabled !== void 0 && typeof storePageEnabled !== "boolean") return false;
171
224
  return true;
172
225
  }
173
- //#endregion
174
- //#region src/domains/game-internationalization/developer-product-icon/builders.ts
226
+ function malformedDeveloperProductsList(statusCode, body) {
227
+ return {
228
+ err: new UnexpectedResponseError("Malformed developer products list response", {
229
+ details: toJsonDetails(body),
230
+ statusCode
231
+ }),
232
+ success: false
233
+ };
234
+ }
235
+ // src/domains/game-internationalization/developer-product-icon/builders.ts
175
236
  /**
176
237
  * Builds a `POST` request for the localized "upload developer-product icon"
177
238
  * endpoint. A successful upload replaces any existing icon for the same
@@ -190,8 +251,7 @@ function buildUploadIconRequest(parameters) {
190
251
  url: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/icons/language-codes/${parameters.languageCode}`
191
252
  };
192
253
  }
193
- //#endregion
194
- //#region src/domains/game-internationalization/developer-product-name-description/builders.ts
254
+ // src/domains/game-internationalization/developer-product-name-description/builders.ts
195
255
  /**
196
256
  * Builds a `PATCH` request for the localized "update developer-product
197
257
  * name/description" endpoint. Either `name`, `description`, or both may be
@@ -212,15 +272,15 @@ function buildUpdateRequest(parameters) {
212
272
  url: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/name-description/language-codes/${parameters.languageCode}`
213
273
  };
214
274
  }
215
- //#endregion
216
- //#region src/domains/game-internationalization/developer-product-name-description/operations.ts
275
+ // src/domains/game-internationalization/developer-product-name-description/operations.ts
217
276
  /**
218
- * Per-second request ceiling for every developer-product localization
219
- * Operation. The legacy `gameinternationalization` service caps each API key
220
- * at 100 requests per minute *shared across the entire service* (see the
221
- * `x-roblox-rate-limits` extension on every operation in the vendored Open
222
- * Cloud spec), so all developer-product localization methods queue against
223
- * the same operation key.
277
+ * Per-second request ceiling for developer-product localization Operations,
278
+ * from each operation's `x-roblox-rate-limits.perApiKeyOwner` in the vendored
279
+ * schema (100 requests per minute). This family's key stays separate from
280
+ * other game-internationalization families: the #587 probe measured
281
+ * independent reported 100/minute counters, including on rejected requests.
282
+ * Successful writes may have additional service limits; see
283
+ * `docs/spikes/game-internationalization-rate-limits/README.md`.
224
284
  */
225
285
  const LOCALIZATION_OPERATION_LIMIT = Object.freeze({
226
286
  maxPerSecond: 100 / 60,
@@ -232,8 +292,7 @@ const LOCALIZATION_OPERATION_LIMIT = Object.freeze({
232
292
  * developer-product endpoints in the vendored OpenAPI schema.
233
293
  */
234
294
  const LOCALIZATION_REQUIRED_SCOPES = Object.freeze(["legacy-developer-product:manage"]);
235
- //#endregion
236
- //#region src/resources/developer-products/client.ts
295
+ // src/resources/developer-products/client.ts
237
296
  function makeSpec(spec) {
238
297
  return Object.freeze(spec);
239
298
  }
@@ -253,6 +312,14 @@ const GET_SPEC = makeSpec({
253
312
  parse: parseDeveloperProductResponse,
254
313
  requiredScopes: GET_REQUIRED_SCOPES
255
314
  });
315
+ const LIST_SPEC = makeSpec({
316
+ buildRequest: (parameters) => okRequest(buildListRequest(parameters)),
317
+ methodDefaults: IDEMPOTENT_METHOD_DEFAULTS,
318
+ methodKind: "idempotent",
319
+ operationLimit: LIST_OPERATION_LIMIT,
320
+ parse: parseProductsListResponse,
321
+ requiredScopes: LIST_REQUIRED_SCOPES
322
+ });
256
323
  const UPDATE_SPEC = makeSpec({
257
324
  buildRequest: (parameters) => okRequest(buildUpdateRequest$1(parameters)),
258
325
  methodDefaults: IDEMPOTENT_METHOD_DEFAULTS,
@@ -288,7 +355,9 @@ const UPLOAD_ICON_SPEC = makeSpec({
288
355
  * ```ts
289
356
  * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products";
290
357
  *
291
- * const client = new DeveloperProductsClient({ apiKey: process.env.ROBLOX_API_KEY! });
358
+ * const client = new DeveloperProductsClient({
359
+ * credential: { apiKey: process.env.ROBLOX_API_KEY!, kind: "apiKey" },
360
+ * });
292
361
  *
293
362
  * const result = await client.get({
294
363
  * universeId: "1234567890",
@@ -309,7 +378,9 @@ const UPLOAD_ICON_SPEC = makeSpec({
309
378
  * ```ts
310
379
  * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products";
311
380
  *
312
- * const client = new DeveloperProductsClient({ apiKey: "your-key" });
381
+ * const client = new DeveloperProductsClient({
382
+ * credential: { apiKey: "your-key", kind: "apiKey" },
383
+ * });
313
384
  * expect(client).toBeInstanceOf(DeveloperProductsClient);
314
385
  * ```
315
386
  */
@@ -357,7 +428,7 @@ var DeveloperProductsClient = class {
357
428
  *
358
429
  * @param parameters - Universe and product identifiers.
359
430
  * @param options - Optional per-request overrides (e.g. A different
360
- * {@link OpenCloudClientOptions.apiKey} for this call only).
431
+ * {@link OpenCloudClientOptions.credential} for this call only).
361
432
  * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or
362
433
  * the {@link OpenCloudError} that caused the request to fail.
363
434
  */
@@ -369,6 +440,22 @@ var DeveloperProductsClient = class {
369
440
  });
370
441
  }
371
442
  /**
443
+ * Lists one page of developer products. Omit `pageToken` for the first
444
+ * page, then pass the returned `nextPageToken` until it is undefined.
445
+ *
446
+ * @param parameters - Universe ID and optional pagination fields.
447
+ * @param options - Optional per-request overrides.
448
+ * @returns A result containing the product page or the request error.
449
+ * @since 0.5.0
450
+ */
451
+ async list(parameters, options) {
452
+ return this.#inner.executeAsync({
453
+ options,
454
+ parameters,
455
+ spec: LIST_SPEC
456
+ });
457
+ }
458
+ /**
372
459
  * Partially updates an existing developer product. Mirrors the upstream
373
460
  * `204 No Content` response: a successful update yields `undefined` data.
374
461
  * Callers that need the post-update state (for example to observe a
@@ -411,7 +498,6 @@ function createLocalizationHandle(inner) {
411
498
  }
412
499
  };
413
500
  }
414
- //#endregion
415
501
  export { DeveloperProductsClient };
416
502
 
417
503
  //# sourceMappingURL=developer-products.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"developer-products.mjs","names":["buildUpdateRequest","buildUpdateRequest","buildLocaleNameDescRequest","#inner"],"sources":["../src/domains/developer-products/products/builders.ts","../src/domains/developer-products/products/operations.ts","../src/domains/developer-products/products/parsers.ts","../src/domains/game-internationalization/developer-product-icon/builders.ts","../src/domains/game-internationalization/developer-product-name-description/builders.ts","../src/domains/game-internationalization/developer-product-name-description/operations.ts","../src/resources/developer-products/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tCreateDeveloperProductParameters,\n\tGetDeveloperProductParameters,\n\tUpdateDeveloperProductParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `GET` request for the Open Cloud \"read developer product\"\n * endpoint.\n *\n * @param parameters - Universe and product identifiers to interpolate into\n * the URL.\n * @returns A pure {@link HttpRequest} describing the read call.\n */\nexport function buildGetRequest(parameters: GetDeveloperProductParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products/${parameters.productId}/creator`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the Open Cloud \"create developer product\"\n * endpoint.\n *\n * @param parameters - Fields describing the new developer product; optional\n * values omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateDeveloperProductParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update developer product\"\n * endpoint. Every field on `parameters` except the identifiers is optional;\n * omitted fields are not appended to the multipart body so the server leaves\n * them unchanged.\n *\n * @param parameters - Identifiers plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateDeveloperProductParameters): HttpRequest {\n\tconst body = new FormData();\n\tif (parameters.name !== undefined) {\n\t\tbody.append(\"name\", parameters.name);\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.isRegionalPricingEnabled !== undefined) {\n\t\tbody.append(\"isRegionalPricingEnabled\", String(parameters.isRegionalPricingEnabled));\n\t}\n\n\tif (parameters.storePageEnabled !== undefined) {\n\t\tbody.append(\"storePageEnabled\", String(parameters.storePageEnabled));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products/${parameters.productId}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for reading a single developer product, from\n * the Open Cloud OpenAPI schema.\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"developer-products.get\",\n});\n\n/**\n * Per-second request ceiling for creating a developer product, from the\n * Open Cloud OpenAPI schema.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 3,\n\toperationKey: \"developer-products.create\",\n});\n\n/**\n * Per-second request ceiling for updating a developer product, from the\n * Open Cloud OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a queue,\n * since Roblox does not document the per-minute quota as shared between\n * the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 3,\n\toperationKey: \"developer-products.update\",\n});\n\n/**\n * Scopes the API key or OAuth token must carry to read a developer product,\n * sourced from `x-roblox-scopes` on the\n * `DeveloperProducts_GetDeveloperProductConfigV2` operation in the vendored\n * OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"developer-product:read\"]);\n\n/**\n * Scopes the API key or OAuth token must carry to create or update a developer\n * product, sourced from `x-roblox-scopes` on the\n * `DeveloperProducts_CreateDeveloperProductV2` and\n * `DeveloperProducts_UpdateDeveloperProductV2` operations in the vendored\n * OpenAPI schema.\n */\nexport const WRITE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"developer-product:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport {\n\tcopyPriceInformation,\n\tisPriceInformationLike,\n} from \"../../../internal/price-information.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport { toJsonDetails } from \"../../../internal/utils/to-json-details.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { DeveloperProduct } from \"./types.ts\";\nimport type { DeveloperProductConfigV2, DeveloperProductPricingFeatureWire } from \"./wire.ts\";\n\n/**\n * Parses a successful Developer Products API response into the public\n * `DeveloperProduct` shape, returning a `Result` so callers can handle\n * malformed payloads without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `ApiError` when validation\n * fails; the headers are available for future parsers that need them.\n * @returns A success result wrapping the converted `DeveloperProduct`, or\n * an `ApiError` when the body does not match the wire schema.\n */\nexport function parseDeveloperProductResponse({\n\tbody,\n\tstatus: statusCode,\n}: HttpResponse): Result<DeveloperProduct, ApiError> {\n\tif (!isDeveloperProductConfigV2(body)) {\n\t\treturn malformedDeveloperProduct(statusCode, body);\n\t}\n\n\tconst priceWire = body.priceInformation ?? undefined;\n\tconst iconAssetId = body.iconImageAssetId ?? undefined;\n\tconst storePageEnabled = body.storePageEnabled ?? undefined;\n\n\treturn {\n\t\tdata: {\n\t\t\tid: String(body.productId),\n\t\t\tname: body.name,\n\t\t\tcreatedAt: new Date(body.createdTimestamp),\n\t\t\tdescription: body.description,\n\t\t\ticonImageAssetId: iconAssetId === undefined ? undefined : String(iconAssetId),\n\t\t\tisForSale: body.isForSale,\n\t\t\tisImmutable: body.isImmutable,\n\t\t\tisManagedPricingEnabled: body.isManagedPricingEnabled,\n\t\t\tprice: priceWire === undefined ? undefined : copyPriceInformation(priceWire),\n\t\t\tstorePageEnabled,\n\t\t\tuniverseId: String(body.universeId),\n\t\t\tupdatedAt: new Date(body.updatedTimestamp),\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction malformedDeveloperProduct(\n\tstatusCode: number,\n\tbody: unknown,\n): Result<DeveloperProduct, ApiError> {\n\treturn {\n\t\terr: new ApiError(\"Malformed developer product response\", {\n\t\t\tdetails: toJsonDetails(body),\n\t\t\tstatusCode,\n\t\t}),\n\t\tsuccess: false,\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"productId\"] === \"number\" &&\n\t\t// Roblox never assigns asset ID 0; a zero productId signals a\n\t\t// malformed response, not a legitimate product.\n\t\tbody[\"productId\"] !== 0 &&\n\t\ttypeof body[\"universeId\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"isForSale\"] === \"boolean\" &&\n\t\ttypeof body[\"isImmutable\"] === \"boolean\" &&\n\t\ttypeof body[\"isManagedPricingEnabled\"] === \"boolean\" &&\n\t\tisDateTimeString(body[\"createdTimestamp\"]) &&\n\t\tisDateTimeString(body[\"updatedTimestamp\"])\n\t);\n}\n\nfunction isPricingFeatureWire(value: unknown): value is DeveloperProductPricingFeatureWire {\n\treturn (\n\t\tvalue === \"Invalid\" ||\n\t\tvalue === \"PriceOptimization\" ||\n\t\tvalue === \"RegionalPricing\" ||\n\t\tvalue === \"UserFixedPrice\"\n\t);\n}\n\nfunction isDeveloperProductConfigV2(body: unknown): body is DeveloperProductConfigV2 {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tconst iconImageAssetId = body[\"iconImageAssetId\"] ?? undefined;\n\tif (iconImageAssetId !== undefined && typeof iconImageAssetId !== \"number\") {\n\t\treturn false;\n\t}\n\n\tconst price = body[\"priceInformation\"] ?? undefined;\n\tif (price !== undefined && !isPriceInformationLike(price, isPricingFeatureWire)) {\n\t\treturn false;\n\t}\n\n\tconst storePageEnabled = body[\"storePageEnabled\"] ?? undefined;\n\tif (storePageEnabled !== undefined && typeof storePageEnabled !== \"boolean\") {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadDeveloperProductIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload developer-product icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(productId, languageCode)` pair.\n *\n * @param parameters - Product and language identifiers plus the image bytes\n * to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(\n\tparameters: UploadDeveloperProductIconParameters,\n): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateDeveloperProductNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update developer-product\n * name/description\" endpoint. Either `name`, `description`, or both may be\n * supplied; omitted fields are not included in the JSON body so the server\n * leaves the existing value for that locale untouched.\n *\n * @param parameters - Product and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateDeveloperProductNameDescriptionParameters,\n): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for every developer-product localization\n * Operation. The legacy `gameinternationalization` service caps each API key\n * at 100 requests per minute *shared across the entire service* (see the\n * `x-roblox-rate-limits` extension on every operation in the vendored Open\n * Cloud spec), so all developer-product localization methods queue against\n * the same operation key.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"developer-product-localization\",\n});\n\n/**\n * Scopes required for every developer-product localization operation, sourced\n * from `x-roblox-scopes` on the legacy `gameinternationalization`\n * developer-product endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-developer-product:manage\",\n]);\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildGetRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/developer-products/products/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tGET_OPERATION_LIMIT,\n\tGET_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tWRITE_REQUIRED_SCOPES,\n} from \"../../domains/developer-products/products/operations.ts\";\nimport { parseDeveloperProductResponse } from \"../../domains/developer-products/products/parsers.ts\";\nimport type {\n\tCreateDeveloperProductParameters,\n\tDeveloperProduct,\n\tGetDeveloperProductParameters,\n\tUpdateDeveloperProductParameters,\n} from \"../../domains/developer-products/products/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/game-internationalization/developer-product-icon/builders.ts\";\nimport type { UploadDeveloperProductIconParameters } from \"../../domains/game-internationalization/developer-product-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/developer-product-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/developer-product-name-description/operations.ts\";\nimport type { UpdateDeveloperProductNameDescriptionParameters } from \"../../domains/game-internationalization/developer-product-name-description/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R = DeveloperProduct>(\n\tspec: ResourceMethodSpec<P, R>,\n): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateDeveloperProductParameters>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseDeveloperProductResponse,\n\trequiredScopes: WRITE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetDeveloperProductParameters>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseDeveloperProductResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateDeveloperProductParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: WRITE_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<\n\tUpdateDeveloperProductNameDescriptionParameters,\n\tundefined\n>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadDeveloperProductIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface DeveloperProductLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a developer product. Either `name`, `description`, or both may be\n\t * supplied; omitted fields are not forwarded so the server leaves the\n\t * existing value for that locale untouched. Mirrors the upstream `200 OK`\n\t * echo body as `undefined` data.\n\t *\n\t * @param parameters - Product and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateDeveloperProductNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a developer product. A\n\t * subsequent upload for the same `(productId, languageCode)` pair replaces\n\t * the existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * No default request timeout applies to this upload; pass `options.timeout`\n\t * to set a per-call deadline.\n\t *\n\t * @param parameters - Product and language identifiers plus the image\n\t * bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadDeveloperProductIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Developer Products API.\n *\n * Wires request builders, the injected {@link\n * OpenCloudClientOptions.httpClient}, and response parsers into a single\n * ergonomic surface. Every method returns a {@link Result} so callers handle\n * failure explicitly; no thrown `OpenCloudError` ever escapes the client.\n *\n * ```ts\n * import { DeveloperProductsClient } from \"@bedrock-rbx/ocale/developer-products\";\n *\n * const client = new DeveloperProductsClient({ apiKey: process.env.ROBLOX_API_KEY! });\n *\n * const result = await client.get({\n * universeId: \"1234567890\",\n * productId: \"9876543210\",\n * });\n *\n * if (result.success) {\n * console.log(`${result.data.name} (${result.data.id})`);\n * } else {\n * console.error(result.err.message);\n * }\n * ```\n *\n * @since 0.1.0\n *\n * @example\n *\n * ```ts\n * import { DeveloperProductsClient } from \"@bedrock-rbx/ocale/developer-products\";\n *\n * const client = new DeveloperProductsClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(DeveloperProductsClient);\n * ```\n */\nexport class DeveloperProductsClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link DeveloperProductsClient.update}; methods on this\n\t * group set per-locale overlays on top. Shares the parent client's\n\t * HTTP, rate-limit, and retry plumbing.\n\t */\n\tpublic readonly localization: DeveloperProductLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link DeveloperProductsClient}. Configuration is frozen\n\t * on construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new developer product under the supplied universe.\n\t *\n\t * No default request timeout applies to this upload; pass `options.timeout`\n\t * to set a per-call deadline.\n\t *\n\t * @param parameters - Creation fields including the universe and product name.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DeveloperProduct, OpenCloudError>> {\n\t\treturn this.#inner.executeAsync({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single developer product by ID.\n\t *\n\t * @param parameters - Universe and product identifiers.\n\t * @param options - Optional per-request overrides (e.g. A different\n\t * {@link OpenCloudClientOptions.apiKey} for this call only).\n\t * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DeveloperProduct, OpenCloudError>> {\n\t\treturn this.#inner.executeAsync({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Partially updates an existing developer product. Mirrors the upstream\n\t * `204 No Content` response: a successful update yields `undefined` data.\n\t * Callers that need the post-update state (for example to observe a\n\t * server-derived `updatedTimestamp`) chain {@link\n\t * DeveloperProductsClient.get} themselves so the GET only fires when\n\t * actually needed.\n\t *\n\t * No default request timeout applies to this upload; pass `options.timeout`\n\t * to set a per-call deadline.\n\t *\n\t * @param parameters - The universe and product identifiers and the\n\t * fields to update. Only fields explicitly provided are forwarded.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.executeAsync({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): DeveloperProductLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.executeAsync({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.executeAsync({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;AAgBA,SAAgB,gBAAgB,YAAwD;CACvF,OAAO;EACN,QAAQ;EACR,KAAK,oCAAoC,WAAW,WAAW,sBAAsB,WAAW,UAAU;CAC3G;AACD;;;;;;;;;AAUA,SAAgB,mBAAmB,YAA2D;CAC7F,MAAM,OAAO,IAAI,SAAS;CAC1B,KAAK,OAAO,QAAQ,WAAW,IAAI;CACnC,IAAI,WAAW,gBAAgB,KAAA,GAC9B,KAAK,OAAO,eAAe,WAAW,WAAW;CAGlD,IAAI,WAAW,cAAc,KAAA,GAC5B,KAAK,OAAO,aAAa,OAAO,WAAW,SAAS,CAAC;CAGtD,IAAI,WAAW,UAAU,KAAA,GACxB,KAAK,OAAO,SAAS,OAAO,WAAW,KAAK,CAAC;CAG9C,IAAI,WAAW,6BAA6B,KAAA,GAC3C,KAAK,OAAO,4BAA4B,OAAO,WAAW,wBAAwB,CAAC;CAGpF,IAAI,WAAW,cAAc,KAAA,GAC5B,KAAK,OAAO,aAAa,OAAO,WAAW,SAAS,CAAC;CAGtD,OAAO;EACN;EACA,QAAQ;EACR,KAAK,oCAAoC,WAAW,WAAW;CAChE;A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version":3,"file":"developer-products.mjs","names":["buildUpdateRequest","buildUpdateRequest","buildLocaleNameDescRequest"],"sources":["../src/domains/developer-products/products/builders.ts","../src/domains/developer-products/products/operations.ts","../src/domains/developer-products/products/parsers.ts","../src/domains/game-internationalization/developer-product-icon/builders.ts","../src/domains/game-internationalization/developer-product-name-description/builders.ts","../src/domains/game-internationalization/developer-product-name-description/operations.ts","../src/resources/developer-products/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type {\n\tCreateDeveloperProductParameters,\n\tGetDeveloperProductParameters,\n\tListDeveloperProductsParameters,\n\tUpdateDeveloperProductParameters,\n} from \"./types.ts\";\n\n/**\n * Builds a `GET` request for the Open Cloud \"read developer product\"\n * endpoint.\n *\n * @param parameters - Universe and product identifiers to interpolate into\n * the URL.\n * @returns A pure {@link HttpRequest} describing the read call.\n */\nexport function buildGetRequest(parameters: GetDeveloperProductParameters): HttpRequest {\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products/${parameters.productId}/creator`,\n\t};\n}\n\n/**\n * Builds a `POST` request for the Open Cloud \"create developer product\"\n * endpoint.\n *\n * @param parameters - Fields describing the new developer product; optional\n * values omitted here are left off the multipart payload entirely.\n * @returns A pure {@link HttpRequest} describing the create call.\n */\nexport function buildCreateRequest(parameters: CreateDeveloperProductParameters): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"name\", parameters.name);\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.isManagedPricingEnabled !== undefined) {\n\t\tbody.append(\"isManagedPricingEnabled\", String(parameters.isManagedPricingEnabled));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products`,\n\t};\n}\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update developer product\"\n * endpoint. Every field on `parameters` except the identifiers is optional;\n * omitted fields are not appended to the multipart body so the server leaves\n * them unchanged.\n *\n * @param parameters - Identifiers plus fields to update.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(parameters: UpdateDeveloperProductParameters): HttpRequest {\n\tconst body = new FormData();\n\tif (parameters.name !== undefined) {\n\t\tbody.append(\"name\", parameters.name);\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody.append(\"description\", parameters.description);\n\t}\n\n\tif (parameters.isForSale !== undefined) {\n\t\tbody.append(\"isForSale\", String(parameters.isForSale));\n\t}\n\n\tif (parameters.isManagedPricingEnabled !== undefined) {\n\t\tbody.append(\"isManagedPricingEnabled\", String(parameters.isManagedPricingEnabled));\n\t}\n\n\tif (parameters.price !== undefined) {\n\t\tbody.append(\"price\", String(parameters.price));\n\t}\n\n\tif (parameters.imageFile !== undefined) {\n\t\tbody.append(\"imageFile\", toBlob(parameters.imageFile));\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/developer-products/v2/universes/${parameters.universeId}/developer-products/${parameters.productId}`,\n\t};\n}\n\n/**\n * Builds a `GET` request for the Open Cloud \"list developer products\" endpoint.\n * Optional `pageSize` and `pageToken` are appended to the query string only\n * when defined so the server applies its own defaults for omitted fields.\n *\n * @param parameters - Universe identifier plus optional pagination cursors.\n * @returns A pure {@link HttpRequest} describing the list call.\n */\nexport function buildListRequest(parameters: ListDeveloperProductsParameters): HttpRequest {\n\tconst query = new URLSearchParams();\n\tif (parameters.pageSize !== undefined) {\n\t\tquery.append(\"pageSize\", String(parameters.pageSize));\n\t}\n\n\tif (parameters.pageToken !== undefined) {\n\t\tquery.append(\"pageToken\", parameters.pageToken);\n\t}\n\n\tconst queryString = query.toString();\n\tconst base = `/developer-products/v2/universes/${parameters.universeId}/developer-products/creator`;\n\treturn {\n\t\tmethod: \"GET\",\n\t\turl: queryString === \"\" ? base : `${base}?${queryString}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for reading a single developer product, from\n * the Open Cloud OpenAPI schema.\n */\nexport const GET_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"developer-products.get\",\n});\n\n/**\n * Per-second request ceiling for creating a developer product, from the\n * Open Cloud OpenAPI schema.\n */\nexport const CREATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 3,\n\toperationKey: \"developer-products.create\",\n});\n\n/**\n * Per-second request ceiling for updating a developer product, from the\n * Open Cloud OpenAPI schema. Keyed independently from\n * {@link CREATE_OPERATION_LIMIT} so create and update do not share a queue,\n * since Roblox does not document the per-minute quota as shared between\n * the POST and PATCH endpoints.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 3,\n\toperationKey: \"developer-products.update\",\n});\n\n/**\n * Scopes the API key or OAuth token must carry to read a developer product,\n * sourced from `x-roblox-scopes` on the\n * `DeveloperProducts_GetDeveloperProductConfigV2` operation in the vendored\n * OpenAPI schema.\n */\nexport const GET_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\"developer-product:read\"]);\n\n/**\n * Scopes the API key or OAuth token must carry to create or update a developer\n * product, sourced from `x-roblox-scopes` on the\n * `DeveloperProducts_CreateDeveloperProductV2` and\n * `DeveloperProducts_UpdateDeveloperProductV2` operations in the vendored\n * OpenAPI schema.\n */\nexport const WRITE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"developer-product:write\",\n]);\n\n/**\n * Per-second ceiling from\n * DeveloperProducts_ListDeveloperProductConfigsByUniverseV2.\n */\nexport const LIST_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 10,\n\toperationKey: \"developer-products.list\",\n});\n\n/** Read scope required by the list operation. */\nexport const LIST_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"developer-product:read\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { UnexpectedResponseError } from \"../../../errors/unexpected-response.ts\";\nimport {\n\tcopyPriceInformation,\n\tisPriceInformationLike,\n} from \"../../../internal/price-information.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport { toJsonDetails } from \"../../../internal/utils/to-json-details.ts\";\nimport type { Page, Result } from \"../../../types.ts\";\nimport type { DeveloperProduct } from \"./types.ts\";\nimport type { DeveloperProductConfigV2, DeveloperProductPricingFeatureWire } from \"./wire.ts\";\n\n/**\n * Parses a successful Developer Products API response into the public\n * `DeveloperProduct` shape, returning a `Result` so callers can handle\n * malformed payloads without exceptions.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * The status code is included on the returned `UnexpectedResponseError` when\n * validation fails; the headers are available for future parsers that need\n * them.\n * @returns A success result wrapping the converted `DeveloperProduct`, or\n * an `UnexpectedResponseError` when the body does not match the wire schema.\n */\nexport function parseDeveloperProductResponse({\n\tbody,\n\tstatus: statusCode,\n}: HttpResponse): Result<DeveloperProduct, UnexpectedResponseError> {\n\tif (!isDeveloperProductConfigV2(body)) {\n\t\treturn malformedDeveloperProduct(statusCode, body);\n\t}\n\n\tconst priceWire = body.priceInformation ?? undefined;\n\tconst iconAssetId = body.iconImageAssetId ?? undefined;\n\n\treturn {\n\t\tdata: {\n\t\t\tid: String(body.productId),\n\t\t\tname: body.name,\n\t\t\tcreatedAt: new Date(body.createdTimestamp),\n\t\t\tdescription: body.description,\n\t\t\ticonImageAssetId: iconAssetId === undefined ? undefined : String(iconAssetId),\n\t\t\tisForSale: body.isForSale,\n\t\t\tisImmutable: body.isImmutable,\n\t\t\tisManagedPricingEnabled: body.isManagedPricingEnabled,\n\t\t\tprice: priceWire === undefined ? undefined : copyPriceInformation(priceWire),\n\t\t\tuniverseId: String(body.universeId),\n\t\t\tupdatedAt: new Date(body.updatedTimestamp),\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\n/**\n * Parses a developer product page, preserving its cursor and converting items\n * with the same validation as a single-product response.\n *\n * @param response - The HTTP response to parse.\n * @returns The parsed page or an unexpected response error.\n */\nexport function parseProductsListResponse(\n\tresponse: HttpResponse,\n): Result<Page<DeveloperProduct>, UnexpectedResponseError> {\n\tconst { body, status: statusCode } = response;\n\tif (!isRecord(body) || !Array.isArray(body[\"developerProducts\"])) {\n\t\treturn malformedDeveloperProductsList(statusCode, body);\n\t}\n\n\tconst nextPageToken = body[\"nextPageToken\"] ?? undefined;\n\tif (nextPageToken !== undefined && typeof nextPageToken !== \"string\") {\n\t\treturn malformedDeveloperProductsList(statusCode, body);\n\t}\n\n\tconst items: Array<DeveloperProduct> = [];\n\tconst products = body[\"developerProducts\"];\n\tfor (const item of products) {\n\t\tconst parsed = parseDeveloperProductResponse({ ...response, body: item });\n\t\tif (!parsed.success) {\n\t\t\treturn malformedDeveloperProductsList(statusCode, body);\n\t\t}\n\n\t\titems.push(parsed.data);\n\t}\n\n\treturn { data: { items, nextPageToken }, success: true };\n}\n\nfunction malformedDeveloperProduct(\n\tstatusCode: number,\n\tbody: unknown,\n): Result<DeveloperProduct, UnexpectedResponseError> {\n\treturn {\n\t\terr: new UnexpectedResponseError(\"Malformed developer product response\", {\n\t\t\tdetails: toJsonDetails(body),\n\t\t\tstatusCode,\n\t\t}),\n\t\tsuccess: false,\n\t};\n}\n\nfunction hasRequiredPrimitiveFields(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"productId\"] === \"number\" &&\n\t\t// Roblox never assigns asset ID 0; a zero productId signals a\n\t\t// malformed response, not a legitimate product.\n\t\tbody[\"productId\"] !== 0 &&\n\t\ttypeof body[\"universeId\"] === \"number\" &&\n\t\ttypeof body[\"name\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\" &&\n\t\ttypeof body[\"isForSale\"] === \"boolean\" &&\n\t\ttypeof body[\"isImmutable\"] === \"boolean\" &&\n\t\ttypeof body[\"isManagedPricingEnabled\"] === \"boolean\" &&\n\t\tisDateTimeString(body[\"createdTimestamp\"]) &&\n\t\tisDateTimeString(body[\"updatedTimestamp\"])\n\t);\n}\n\nfunction isPricingFeatureWire(value: unknown): value is DeveloperProductPricingFeatureWire {\n\treturn (\n\t\tvalue === \"Invalid\" ||\n\t\tvalue === \"PriceOptimization\" ||\n\t\tvalue === \"RegionalPricing\" ||\n\t\tvalue === \"UserFixedPrice\"\n\t);\n}\n\nfunction isDeveloperProductConfigV2(body: unknown): body is DeveloperProductConfigV2 {\n\tif (!isRecord(body)) {\n\t\treturn false;\n\t}\n\n\tif (!hasRequiredPrimitiveFields(body)) {\n\t\treturn false;\n\t}\n\n\tconst iconImageAssetId = body[\"iconImageAssetId\"] ?? undefined;\n\tif (iconImageAssetId !== undefined && typeof iconImageAssetId !== \"number\") {\n\t\treturn false;\n\t}\n\n\tconst price = body[\"priceInformation\"] ?? undefined;\n\tif (price !== undefined && !isPriceInformationLike(price, isPricingFeatureWire)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nfunction malformedDeveloperProductsList(\n\tstatusCode: number,\n\tbody: unknown,\n): Result<Page<DeveloperProduct>, UnexpectedResponseError> {\n\treturn {\n\t\terr: new UnexpectedResponseError(\"Malformed developer products list response\", {\n\t\t\tdetails: toJsonDetails(body),\n\t\t\tstatusCode,\n\t\t}),\n\t\tsuccess: false,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport { toBlob } from \"../../../internal/utils/to-blob.ts\";\nimport type { UploadDeveloperProductIconParameters } from \"./types.ts\";\n\n/**\n * Builds a `POST` request for the localized \"upload developer-product icon\"\n * endpoint. A successful upload replaces any existing icon for the same\n * `(productId, languageCode)` pair.\n *\n * @param parameters - Product and language identifiers plus the image bytes\n * to upload.\n * @returns A pure {@link HttpRequest} describing the upload call.\n */\nexport function buildUploadIconRequest(\n\tparameters: UploadDeveloperProductIconParameters,\n): HttpRequest {\n\tconst body = new FormData();\n\tbody.append(\"Files\", toBlob(parameters.image));\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"POST\",\n\t\turl: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/icons/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { HttpRequest } from \"../../../internal/http/types.ts\";\nimport type { UpdateDeveloperProductNameDescriptionParameters } from \"./types.ts\";\n\n/**\n * Builds a `PATCH` request for the localized \"update developer-product\n * name/description\" endpoint. Either `name`, `description`, or both may be\n * supplied; omitted fields are not included in the JSON body so the server\n * leaves the existing value for that locale untouched.\n *\n * @param parameters - Product and language identifiers plus the optional\n * replacement values.\n * @returns A pure {@link HttpRequest} describing the update call.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdateDeveloperProductNameDescriptionParameters,\n): HttpRequest {\n\tconst body: Record<string, string> = {};\n\tif (parameters.name !== undefined) {\n\t\tbody[\"name\"] = parameters.name;\n\t}\n\n\tif (parameters.description !== undefined) {\n\t\tbody[\"description\"] = parameters.description;\n\t}\n\n\treturn {\n\t\tbody,\n\t\tmethod: \"PATCH\",\n\t\turl: `/legacy-game-internationalization/v1/developer-products/${parameters.productId}/name-description/language-codes/${parameters.languageCode}`,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for developer-product localization Operations,\n * from each operation's `x-roblox-rate-limits.perApiKeyOwner` in the vendored\n * schema (100 requests per minute). This family's key stays separate from\n * other game-internationalization families: the #587 probe measured\n * independent reported 100/minute counters, including on rejected requests.\n * Successful writes may have additional service limits; see\n * `docs/spikes/game-internationalization-rate-limits/README.md`.\n */\nexport const LOCALIZATION_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 100 / 60,\n\toperationKey: \"developer-product-localization\",\n});\n\n/**\n * Scopes required for every developer-product localization operation, sourced\n * from `x-roblox-scopes` on the legacy `gameinternationalization`\n * developer-product endpoints in the vendored OpenAPI schema.\n */\nexport const LOCALIZATION_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"legacy-developer-product:manage\",\n]);\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tbuildCreateRequest,\n\tbuildGetRequest,\n\tbuildListRequest,\n\tbuildUpdateRequest,\n} from \"../../domains/developer-products/products/builders.ts\";\nimport {\n\tCREATE_OPERATION_LIMIT,\n\tGET_OPERATION_LIMIT,\n\tGET_REQUIRED_SCOPES,\n\tLIST_OPERATION_LIMIT,\n\tLIST_REQUIRED_SCOPES,\n\tUPDATE_OPERATION_LIMIT,\n\tWRITE_REQUIRED_SCOPES,\n} from \"../../domains/developer-products/products/operations.ts\";\nimport {\n\tparseDeveloperProductResponse,\n\tparseProductsListResponse,\n} from \"../../domains/developer-products/products/parsers.ts\";\nimport type {\n\tCreateDeveloperProductParameters,\n\tDeveloperProduct,\n\tGetDeveloperProductParameters,\n\tListDeveloperProductsParameters,\n\tUpdateDeveloperProductParameters,\n} from \"../../domains/developer-products/products/types.ts\";\nimport { buildUploadIconRequest } from \"../../domains/game-internationalization/developer-product-icon/builders.ts\";\nimport type { UploadDeveloperProductIconParameters } from \"../../domains/game-internationalization/developer-product-icon/types.ts\";\nimport { buildUpdateRequest as buildLocaleNameDescRequest } from \"../../domains/game-internationalization/developer-product-name-description/builders.ts\";\nimport {\n\tLOCALIZATION_OPERATION_LIMIT,\n\tLOCALIZATION_REQUIRED_SCOPES,\n} from \"../../domains/game-internationalization/developer-product-name-description/operations.ts\";\nimport type { UpdateDeveloperProductNameDescriptionParameters } from \"../../domains/game-internationalization/developer-product-name-description/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS, IDEMPOTENT_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport {\n\tokRequest,\n\tparseEmptyResponse,\n\tResourceClient,\n\ttype ResourceMethodSpec,\n} from \"../../internal/resource-client.ts\";\nimport type { Page, Result } from \"../../types.ts\";\n\nfunction makeSpec<P, R = DeveloperProduct>(\n\tspec: ResourceMethodSpec<P, R>,\n): ResourceMethodSpec<P, R> {\n\treturn Object.freeze(spec);\n}\n\nconst CREATE_SPEC = makeSpec<CreateDeveloperProductParameters>({\n\tbuildRequest: (parameters) => okRequest(buildCreateRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: CREATE_OPERATION_LIMIT,\n\tparse: parseDeveloperProductResponse,\n\trequiredScopes: WRITE_REQUIRED_SCOPES,\n});\n\nconst GET_SPEC = makeSpec<GetDeveloperProductParameters>({\n\tbuildRequest: (parameters) => okRequest(buildGetRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: GET_OPERATION_LIMIT,\n\tparse: parseDeveloperProductResponse,\n\trequiredScopes: GET_REQUIRED_SCOPES,\n});\n\nconst LIST_SPEC = makeSpec<ListDeveloperProductsParameters, Page<DeveloperProduct>>({\n\tbuildRequest: (parameters) => okRequest(buildListRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LIST_OPERATION_LIMIT,\n\tparse: parseProductsListResponse,\n\trequiredScopes: LIST_REQUIRED_SCOPES,\n});\n\nconst UPDATE_SPEC = makeSpec<UpdateDeveloperProductParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUpdateRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: WRITE_REQUIRED_SCOPES,\n});\n\nconst UPDATE_NAME_DESCRIPTION_SPEC = makeSpec<\n\tUpdateDeveloperProductNameDescriptionParameters,\n\tundefined\n>({\n\tbuildRequest: (parameters) => okRequest(buildLocaleNameDescRequest(parameters)),\n\tmethodDefaults: IDEMPOTENT_METHOD_DEFAULTS,\n\tmethodKind: \"idempotent\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\nconst UPLOAD_ICON_SPEC = makeSpec<UploadDeveloperProductIconParameters, undefined>({\n\tbuildRequest: (parameters) => okRequest(buildUploadIconRequest(parameters)),\n\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\tmethodKind: \"create\",\n\toperationLimit: LOCALIZATION_OPERATION_LIMIT,\n\tparse: parseEmptyResponse,\n\trequiredScopes: LOCALIZATION_REQUIRED_SCOPES,\n});\n\ninterface DeveloperProductLocalizationHandle {\n\t/**\n\t * Updates the per-locale display name and/or description registered against\n\t * a developer product. Either `name`, `description`, or both may be\n\t * supplied; omitted fields are not forwarded so the server leaves the\n\t * existing value for that locale untouched. Mirrors the upstream `200 OK`\n\t * echo body as `undefined` data.\n\t *\n\t * @param parameters - Product and language identifiers plus the optional\n\t * replacement values.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tupdateNameDescription: (\n\t\tparameters: UpdateDeveloperProductNameDescriptionParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n\t/**\n\t * Uploads or replaces the per-locale icon for a developer product. A\n\t * subsequent upload for the same `(productId, languageCode)` pair replaces\n\t * the existing icon for that locale. Does not retry on 5xx so a duplicate\n\t * upload cannot be created if the server fails mid-write.\n\t *\n\t * No default request timeout applies to this upload; pass `options.timeout`\n\t * to set a per-call deadline.\n\t *\n\t * @param parameters - Product and language identifiers plus the image\n\t * bytes to upload.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tuploadIcon: (\n\t\tparameters: UploadDeveloperProductIconParameters,\n\t\toptions?: RequestOptions,\n\t) => Promise<Result<undefined, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud Developer Products API.\n *\n * Wires request builders, the injected {@link\n * OpenCloudClientOptions.httpClient}, and response parsers into a single\n * ergonomic surface. Every method returns a {@link Result} so callers handle\n * failure explicitly; no thrown `OpenCloudError` ever escapes the client.\n *\n * ```ts\n * import { DeveloperProductsClient } from \"@bedrock-rbx/ocale/developer-products\";\n *\n * const client = new DeveloperProductsClient({\n * credential: { apiKey: process.env.ROBLOX_API_KEY!, kind: \"apiKey\" },\n * });\n *\n * const result = await client.get({\n * universeId: \"1234567890\",\n * productId: \"9876543210\",\n * });\n *\n * if (result.success) {\n * console.log(`${result.data.name} (${result.data.id})`);\n * } else {\n * console.error(result.err.message);\n * }\n * ```\n *\n * @since 0.1.0\n *\n * @example\n *\n * ```ts\n * import { DeveloperProductsClient } from \"@bedrock-rbx/ocale/developer-products\";\n *\n * const client = new DeveloperProductsClient({\n * credential: { apiKey: \"your-key\", kind: \"apiKey\" },\n * });\n * expect(client).toBeInstanceOf(DeveloperProductsClient);\n * ```\n */\nexport class DeveloperProductsClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Operation Group exposing per-locale localization Operations\n\t * (`updateNameDescription`, `uploadIcon`) backed by the\n\t * `legacy-game-internationalization` domain. Source-language values\n\t * remain on {@link DeveloperProductsClient.update}; methods on this\n\t * group set per-locale overlays on top. Shares the parent client's\n\t * HTTP, rate-limit, and retry plumbing.\n\t */\n\tpublic readonly localization: DeveloperProductLocalizationHandle;\n\n\t/**\n\t * Creates a new {@link DeveloperProductsClient}. Configuration is frozen\n\t * on construction; per-request overrides are accepted on each method.\n\t *\n\t * @param options - Client-level configuration including the API key.\n\t */\n\tconstructor(options: OpenCloudClientOptions) {\n\t\tthis.#inner = new ResourceClient(options);\n\t\tthis.localization = createLocalizationHandle(this.#inner);\n\t}\n\n\t/**\n\t * Creates a new developer product under the supplied universe.\n\t *\n\t * No default request timeout applies to this upload; pass `options.timeout`\n\t * to set a per-call deadline.\n\t *\n\t * @param parameters - Creation fields including the universe and product name.\n\t * @param options - Optional per-request overrides.\n\t * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async create(\n\t\tparameters: CreateDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DeveloperProduct, OpenCloudError>> {\n\t\treturn this.#inner.executeAsync({ options, parameters, spec: CREATE_SPEC });\n\t}\n\n\t/**\n\t * Reads a single developer product by ID.\n\t *\n\t * @param parameters - Universe and product identifiers.\n\t * @param options - Optional per-request overrides (e.g. A different\n\t * {@link OpenCloudClientOptions.credential} for this call only).\n\t * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async get(\n\t\tparameters: GetDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<DeveloperProduct, OpenCloudError>> {\n\t\treturn this.#inner.executeAsync({ options, parameters, spec: GET_SPEC });\n\t}\n\n\t/**\n\t * Lists one page of developer products. Omit `pageToken` for the first\n\t * page, then pass the returned `nextPageToken` until it is undefined.\n\t *\n\t * @param parameters - Universe ID and optional pagination fields.\n\t * @param options - Optional per-request overrides.\n\t * @returns A result containing the product page or the request error.\n\t * @since 0.5.0\n\t */\n\tpublic async list(\n\t\tparameters: ListDeveloperProductsParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Page<DeveloperProduct>, OpenCloudError>> {\n\t\treturn this.#inner.executeAsync({ options, parameters, spec: LIST_SPEC });\n\t}\n\n\t/**\n\t * Partially updates an existing developer product. Mirrors the upstream\n\t * `204 No Content` response: a successful update yields `undefined` data.\n\t * Callers that need the post-update state (for example to observe a\n\t * server-derived `updatedTimestamp`) chain {@link\n\t * DeveloperProductsClient.get} themselves so the GET only fires when\n\t * actually needed.\n\t *\n\t * No default request timeout applies to this upload; pass `options.timeout`\n\t * to set a per-call deadline.\n\t *\n\t * @param parameters - The universe and product identifiers and the\n\t * fields to update. Only fields explicitly provided are forwarded.\n\t * @param options - Optional per-request overrides.\n\t * @returns A success {@link Result} with no payload, or the\n\t * {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdateDeveloperProductParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<undefined, OpenCloudError>> {\n\t\treturn this.#inner.executeAsync({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLocalizationHandle(inner: ResourceClient): DeveloperProductLocalizationHandle {\n\treturn {\n\t\tasync updateNameDescription(parameters, options) {\n\t\t\treturn inner.executeAsync({ options, parameters, spec: UPDATE_NAME_DESCRIPTION_SPEC });\n\t\t},\n\t\tasync uploadIcon(parameters, options) {\n\t\t\treturn inner.executeAsync({ options, parameters, spec: UPLOAD_ICON_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAgB,gBAAgB,YAAwD;CACvF,OAAO;EACN,QAAQ;EACR,KAAK,oCAAoC,WAAW,WAAW,sBAAsB,WAAW,UAAU;CAC3G;AACD;;;;;;;;;AAUA,SAAgB,mBAAmB,YAA2D;CAC7F,MAAM,OAAO,IAAI,SAAS;CAC1B,KAAK,OAAO,QAAQ,WAAW,IAAI;CACnC,IAAI,WAAW,gBAAgB,KAAA,GAC9B,KAAK,OAAO,eAAe,WAAW,WAAW;CAGlD,IAAI,WAAW,cAAc,KAAA,GAC5B,KAAK,OAAO,aAAa,OAAO,WAAW,SAAS,CAAC;CAGtD,IAAI,WAAW,4BAA4B,KAAA,GAC1C,KAAK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