@bedrock-rbx/ocale 0.1.0-beta.1 → 0.1.0-beta.2

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 (58) hide show
  1. package/dist/badges.d.mts +86 -3
  2. package/dist/badges.d.mts.map +1 -1
  3. package/dist/badges.mjs +113 -5
  4. package/dist/badges.mjs.map +1 -1
  5. package/dist/data.generated-BtkDGH8C.d.mts +485 -0
  6. package/dist/data.generated-BtkDGH8C.d.mts.map +1 -0
  7. package/dist/developer-products.d.mts +14 -5
  8. package/dist/developer-products.d.mts.map +1 -1
  9. package/dist/developer-products.mjs +5 -4
  10. package/dist/developer-products.mjs.map +1 -1
  11. package/dist/game-passes.d.mts +83 -2
  12. package/dist/game-passes.d.mts.map +1 -1
  13. package/dist/game-passes.mjs +111 -4
  14. package/dist/game-passes.mjs.map +1 -1
  15. package/dist/index.d.mts +3 -81
  16. package/dist/index.d.mts.map +1 -1
  17. package/dist/index.mjs +2 -2
  18. package/dist/is-date-time-string-Cuf1TaSC.mjs +19 -0
  19. package/dist/is-date-time-string-Cuf1TaSC.mjs.map +1 -0
  20. package/dist/locales.d.mts +2 -0
  21. package/dist/locales.mjs +512 -0
  22. package/dist/locales.mjs.map +1 -0
  23. package/dist/luau-execution.d.mts +62 -0
  24. package/dist/luau-execution.d.mts.map +1 -0
  25. package/dist/luau-execution.mjs +52 -0
  26. package/dist/luau-execution.mjs.map +1 -0
  27. package/dist/places.d.mts +47 -8
  28. package/dist/places.d.mts.map +1 -1
  29. package/dist/places.mjs +39 -13
  30. package/dist/places.mjs.map +1 -1
  31. package/dist/{price-information-CmpscMc4.mjs → price-information-s7DY0GV2.mjs} +2 -2
  32. package/dist/{price-information-CmpscMc4.mjs.map → price-information-s7DY0GV2.mjs.map} +1 -1
  33. package/dist/{rate-limit-BBU_4xnZ.mjs → rate-limit-CKfuhxT1.mjs} +11 -3
  34. package/dist/rate-limit-CKfuhxT1.mjs.map +1 -0
  35. package/dist/rate-limit-DzHBFwps.d.mts +92 -0
  36. package/dist/rate-limit-DzHBFwps.d.mts.map +1 -0
  37. package/dist/{resource-client-CaS_j3yg.mjs → resource-client-Wi4Mwqy5.mjs} +69 -14
  38. package/dist/resource-client-Wi4Mwqy5.mjs.map +1 -0
  39. package/dist/specs-Co6qYp_E.mjs +309 -0
  40. package/dist/specs-Co6qYp_E.mjs.map +1 -0
  41. package/dist/storage.d.mts +374 -0
  42. package/dist/storage.d.mts.map +1 -0
  43. package/dist/storage.mjs +371 -0
  44. package/dist/storage.mjs.map +1 -0
  45. package/dist/types-BZ0959rh.d.mts +149 -0
  46. package/dist/types-BZ0959rh.d.mts.map +1 -0
  47. package/dist/{types-YCTsM8Qd.d.mts → types-Cp8w8uwA.d.mts} +1 -1
  48. package/dist/{types-YCTsM8Qd.d.mts.map → types-Cp8w8uwA.d.mts.map} +1 -1
  49. package/dist/universes.d.mts +37 -12
  50. package/dist/universes.d.mts.map +1 -1
  51. package/dist/universes.mjs +5 -4
  52. package/dist/universes.mjs.map +1 -1
  53. package/dist/{validation-CTZzJhmd.mjs → validation-b7KAoEio.mjs} +2 -2
  54. package/dist/validation-b7KAoEio.mjs.map +1 -0
  55. package/package.json +7 -3
  56. package/dist/rate-limit-BBU_4xnZ.mjs.map +0 -1
  57. package/dist/resource-client-CaS_j3yg.mjs.map +0 -1
  58. package/dist/validation-CTZzJhmd.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.mjs","names":[],"sources":["../src/locales/data.generated.ts"],"sourcesContent":["// @generated by scripts/fetch-locales.ts. Do not edit by hand.\n// Source: https://locale.roblox.com/v1/locales/supported-locales-for-creators\n\n/**\n * One row in the vendored Roblox creator-locale list.\n */\nexport interface RobloxCreatorLocale {\n\treadonly locale: string;\n\treadonly languageCode: string;\n\treadonly name: string;\n\treadonly nativeName: string;\n\treadonly isRightToLeft: boolean;\n\treadonly isEnabledForFullExperience: boolean;\n\treadonly isEnabledForInGameUgc: boolean;\n\treadonly isEnabledForSignupAndLogin: boolean;\n}\n\n/**\n * Vendored snapshot of\n * `https://locale.roblox.com/v1/locales/supported-locales-for-creators`.\n * Refreshed by `pnpm --filter @bedrock-rbx/ocale refresh-locales`.\n */\nexport const ROBLOX_CREATOR_LOCALES = [\n\t{\n\t\tlocale: \"ar_001\",\n\t\tlanguageCode: \"ar\",\n\t\tname: \"Arabic\",\n\t\tnativeName: \"العربية\",\n\t\tisRightToLeft: true,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"bg_bg\",\n\t\tlanguageCode: \"bg\",\n\t\tname: \"Bulgarian\",\n\t\tnativeName: \"Български\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"bn_bd\",\n\t\tlanguageCode: \"bn\",\n\t\tname: \"Bengali\",\n\t\tnativeName: \"বাংলা\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"bs_ba\",\n\t\tlanguageCode: \"bs\",\n\t\tname: \"Bosnian\",\n\t\tnativeName: \"Босански\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"cs_cz\",\n\t\tlanguageCode: \"cs\",\n\t\tname: \"Czech\",\n\t\tnativeName: \"Čeština\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"da_dk\",\n\t\tlanguageCode: \"da\",\n\t\tname: \"Danish\",\n\t\tnativeName: \"Dansk\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"de_de\",\n\t\tlanguageCode: \"de\",\n\t\tname: \"German\",\n\t\tnativeName: \"Deutsch\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"el_gr\",\n\t\tlanguageCode: \"el\",\n\t\tname: \"Greek\",\n\t\tnativeName: \"Ελληνικά\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"en_gb\",\n\t\tlanguageCode: \"en\",\n\t\tname: \"English (United Kingdom)\",\n\t\tnativeName: \"English (United Kingdom)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"en_us\",\n\t\tlanguageCode: \"en\",\n\t\tname: \"English (United States)\",\n\t\tnativeName: \"English (United States)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"es_es\",\n\t\tlanguageCode: \"es\",\n\t\tname: \"Spanish (Spain)\",\n\t\tnativeName: \"Español (España)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"es_mx\",\n\t\tlanguageCode: \"es\",\n\t\tname: \"Spanish (Mexico)\",\n\t\tnativeName: \"Español (México)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"et_ee\",\n\t\tlanguageCode: \"et\",\n\t\tname: \"Estonian\",\n\t\tnativeName: \"Eesti\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fi_fi\",\n\t\tlanguageCode: \"fi\",\n\t\tname: \"Finnish\",\n\t\tnativeName: \"Suomi\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fil_ph\",\n\t\tlanguageCode: \"fil\",\n\t\tname: \"Filipino\",\n\t\tnativeName: \"Filipino\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fr_ca\",\n\t\tlanguageCode: \"fr\",\n\t\tname: \"French (Canada)\",\n\t\tnativeName: \"Français (Canada)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"fr_fr\",\n\t\tlanguageCode: \"fr\",\n\t\tname: \"French (France)\",\n\t\tnativeName: \"Français (France)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"hi_in\",\n\t\tlanguageCode: \"hi\",\n\t\tname: \"Hindi\",\n\t\tnativeName: \"हिन्दी\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"hr_hr\",\n\t\tlanguageCode: \"hr\",\n\t\tname: \"Croatian\",\n\t\tnativeName: \"Hrvatski\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"hu_hu\",\n\t\tlanguageCode: \"hu\",\n\t\tname: \"Hungarian\",\n\t\tnativeName: \"Magyar\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"id_id\",\n\t\tlanguageCode: \"id\",\n\t\tname: \"Indonesian\",\n\t\tnativeName: \"Bahasa Indonesia\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"it_it\",\n\t\tlanguageCode: \"it\",\n\t\tname: \"Italian\",\n\t\tnativeName: \"Italiano\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"ja_jp\",\n\t\tlanguageCode: \"ja\",\n\t\tname: \"Japanese\",\n\t\tnativeName: \"日本語\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"ka_ge\",\n\t\tlanguageCode: \"ka\",\n\t\tname: \"Georgian\",\n\t\tnativeName: \"ქართული\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"kk_kz\",\n\t\tlanguageCode: \"kk\",\n\t\tname: \"Kazakh\",\n\t\tnativeName: \"Қазақ Тілі\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"km_kh\",\n\t\tlanguageCode: \"km\",\n\t\tname: \"Khmer\",\n\t\tnativeName: \"ភាសាខ្មែរ\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ko_kr\",\n\t\tlanguageCode: \"ko\",\n\t\tname: \"Korean\",\n\t\tnativeName: \"한국어\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"lt_lt\",\n\t\tlanguageCode: \"lt\",\n\t\tname: \"Lithuanian\",\n\t\tnativeName: \"Lietuvių\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"lv_lv\",\n\t\tlanguageCode: \"lv\",\n\t\tname: \"Latvian\",\n\t\tnativeName: \"Latviešu\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ms_my\",\n\t\tlanguageCode: \"ms\",\n\t\tname: \"Malay\",\n\t\tnativeName: \"Bahasa Melayu\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"my_mm\",\n\t\tlanguageCode: \"my\",\n\t\tname: \"Burmese\",\n\t\tnativeName: \"ဗမာစာ\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"nb_no\",\n\t\tlanguageCode: \"nb\",\n\t\tname: \"Bokmal\",\n\t\tnativeName: \"Bokmål\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"nl_nl\",\n\t\tlanguageCode: \"nl\",\n\t\tname: \"Dutch\",\n\t\tnativeName: \"Nederlands\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"pl_pl\",\n\t\tlanguageCode: \"pl\",\n\t\tname: \"Polish\",\n\t\tnativeName: \"Polski\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"pt_br\",\n\t\tlanguageCode: \"pt\",\n\t\tname: \"Portuguese (Brazil)\",\n\t\tnativeName: \"Português (Brasil)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"pt_pt\",\n\t\tlanguageCode: \"pt\",\n\t\tname: \"Portuguese (Portugal)\",\n\t\tnativeName: \"Português (Portugal)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ro_ro\",\n\t\tlanguageCode: \"ro\",\n\t\tname: \"Romanian\",\n\t\tnativeName: \"Română\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"ru_ru\",\n\t\tlanguageCode: \"ru\",\n\t\tname: \"Russian\",\n\t\tnativeName: \"Русский\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"si_lk\",\n\t\tlanguageCode: \"si\",\n\t\tname: \"Sinhala\",\n\t\tnativeName: \"සිංහල\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sk_sk\",\n\t\tlanguageCode: \"sk\",\n\t\tname: \"Slovak\",\n\t\tnativeName: \"Slovenčina\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sl_sl\",\n\t\tlanguageCode: \"sl\",\n\t\tname: \"Slovenian\",\n\t\tnativeName: \"Slovenski\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sq_al\",\n\t\tlanguageCode: \"sq\",\n\t\tname: \"Albanian\",\n\t\tnativeName: \"Shqipe\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sr_rs\",\n\t\tlanguageCode: \"sr\",\n\t\tname: \"Serbian\",\n\t\tnativeName: \"Cрпски\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"sv_se\",\n\t\tlanguageCode: \"sv\",\n\t\tname: \"Swedish\",\n\t\tnativeName: \"Svenska\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"th_th\",\n\t\tlanguageCode: \"th\",\n\t\tname: \"Thai\",\n\t\tnativeName: \"ภาษาไทย\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"tr_tr\",\n\t\tlanguageCode: \"tr\",\n\t\tname: \"Turkish\",\n\t\tnativeName: \"Türkçe\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"uk_ua\",\n\t\tlanguageCode: \"uk\",\n\t\tname: \"Ukrainian\",\n\t\tnativeName: \"Yкраїньска\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: false,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: false,\n\t},\n\t{\n\t\tlocale: \"vi_vn\",\n\t\tlanguageCode: \"vi\",\n\t\tname: \"Vietnamese\",\n\t\tnativeName: \"Tiếng Việt\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"zh_cn\",\n\t\tlanguageCode: \"zh-hans\",\n\t\tname: \"Chinese (Simplified)\",\n\t\tnativeName: \"中文(简体)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n\t{\n\t\tlocale: \"zh_tw\",\n\t\tlanguageCode: \"zh-hant\",\n\t\tname: \"Chinese (Traditional)\",\n\t\tnativeName: \"中文(繁體)\",\n\t\tisRightToLeft: false,\n\t\tisEnabledForFullExperience: true,\n\t\tisEnabledForInGameUgc: true,\n\t\tisEnabledForSignupAndLogin: true,\n\t},\n] as const satisfies ReadonlyArray<RobloxCreatorLocale>;\n\n/**\n * Roblox locale wire form (e.g. `en_us`, `pt_br`, `ar_001`). Used by\n * the legacy game-internationalization endpoints when\n * `languageCodeType` is `Locale`.\n */\nexport type RobloxLocale = (typeof ROBLOX_CREATOR_LOCALES)[number][\"locale\"];\n\n/**\n * Roblox language wire form (e.g. `en`, `fil`, `zh-hans`). Used by\n * the legacy game-internationalization endpoints when\n * `languageCodeType` is `Language`.\n */\nexport type RobloxLanguageCode = (typeof ROBLOX_CREATOR_LOCALES)[number][\"languageCode\"];\n"],"mappings":";;;;;;AAsBA,MAAa,yBAAyB;CACrC;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,YAAY;EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD;EACC,QAAQ;EACR,cAAc;EACd,MAAM;EACN,Y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EACZ,eAAe;EACf,4BAA4B;EAC5B,uBAAuB;EACvB,4BAA4B;EAC5B;CACD"}
@@ -0,0 +1,62 @@
1
+ import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-Cp8w8uwA.mjs";
2
+ import { a as LuauExecutionTask, c as SubmitAtVersionParameters, i as InProgressTask, n as FailedTask, o as LuauExecutionTaskRef, r as GetParameters, s as SubmitAtHeadParameters, t as CompleteTask } from "./types-BZ0959rh.mjs";
3
+
4
+ //#region src/resources/luau-execution/client.d.ts
5
+ /**
6
+ * Operation handle exposed by {@link LuauExecutionClient} as the
7
+ * `tasks` namespace. Provides `submit` to queue a Luau script and
8
+ * `get` to fetch a task's current state.
9
+ */
10
+ interface TasksHandle {
11
+ /**
12
+ * Fetches the current state of a previously-submitted Luau
13
+ * execution task. Uses idempotent retry semantics for both 429 and
14
+ * 5xx.
15
+ *
16
+ * @param parameters - The task ref plus an optional `view` selector.
17
+ * @param options - Optional per-request overrides (e.g. A different
18
+ * {@link OpenCloudClientOptions.apiKey} for this call only).
19
+ * @returns A {@link Result} wrapping the parsed
20
+ * {@link LuauExecutionTask} or the {@link OpenCloudError} that
21
+ * caused the request to fail.
22
+ */
23
+ get(parameters: GetParameters, options?: RequestOptions): Promise<Result<LuauExecutionTask, OpenCloudError>>;
24
+ /**
25
+ * Submits a Luau script for execution against a place. Dispatches
26
+ * to the head-version URL when `versionId` is omitted, or to the
27
+ * specific-version URL when one is supplied. Both URL shapes share
28
+ * one rate-limit queue and one required-scope set.
29
+ *
30
+ * @param parameters - The universe and place identifiers, the
31
+ * script to run, an optional `versionId`, and any other writable
32
+ * submit fields.
33
+ * @param options - Optional per-request overrides (e.g. A different
34
+ * {@link OpenCloudClientOptions.apiKey} for this call only).
35
+ * @returns A {@link Result} wrapping the parsed
36
+ * {@link LuauExecutionTask} or the {@link OpenCloudError} that
37
+ * caused the request to fail.
38
+ */
39
+ submit(parameters: SubmitAtHeadParameters | SubmitAtVersionParameters, options?: RequestOptions): Promise<Result<LuauExecutionTask, OpenCloudError>>;
40
+ }
41
+ /**
42
+ * Public client for the Roblox Open Cloud `LuauExecutionSessionTask`
43
+ * resource. Tasks run a Luau script against a place and surface state,
44
+ * output, or error through the `LuauExecutionTask` discriminated
45
+ * union. Exposes `tasks.submit` for both the head version and a
46
+ * specific place version, plus `tasks.get` for fetching task state.
47
+ */
48
+ declare class LuauExecutionClient {
49
+ #private;
50
+ readonly tasks: TasksHandle;
51
+ /**
52
+ * Creates a new {@link LuauExecutionClient}. Configuration is frozen
53
+ * on construction; per-request overrides are accepted on each
54
+ * method.
55
+ *
56
+ * @param options - Client-level configuration including the API key.
57
+ */
58
+ constructor(options: OpenCloudClientOptions);
59
+ }
60
+ //#endregion
61
+ export { type CompleteTask, type FailedTask, type GetParameters, type InProgressTask, LuauExecutionClient, type LuauExecutionTask, type LuauExecutionTaskRef, type SubmitAtHeadParameters, type SubmitAtVersionParameters, type TasksHandle };
62
+ //# sourceMappingURL=luau-execution.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"luau-execution.d.mts","names":[],"sources":["../src/resources/luau-execution/client.ts"],"mappings":";;;;AAqBA;;;;;AAAA,UAAiB,WAAA;;;;;;;;;;;;;EAahB,GAAA,CACC,UAAA,EAAY,aAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,iBAAA,EAAmB,cAAA;;;;;;;;;;;;;;;;EAgBrC,MAAA,CACC,UAAA,EAAY,sBAAA,GAAyB,yBAAA,EACrC,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,iBAAA,EAAmB,cAAA;AAAA;;;;AAUtC;;;;cAAa,mBAAA;EAAA;WAGI,KAAA,EAAO,WAAA;;;;;;;;EASvB,WAAA,CAAY,OAAA,EAAS,sBAAA;AAAA"}
@@ -0,0 +1,52 @@
1
+ import { t as ResourceClient } from "./resource-client-Wi4Mwqy5.mjs";
2
+ import { n as SUBMIT_HEAD_SPEC, r as SUBMIT_VERSION_SPEC, t as GET_SPEC } from "./specs-Co6qYp_E.mjs";
3
+ //#region src/resources/luau-execution/client.ts
4
+ /**
5
+ * Public client for the Roblox Open Cloud `LuauExecutionSessionTask`
6
+ * resource. Tasks run a Luau script against a place and surface state,
7
+ * output, or error through the `LuauExecutionTask` discriminated
8
+ * union. Exposes `tasks.submit` for both the head version and a
9
+ * specific place version, plus `tasks.get` for fetching task state.
10
+ */
11
+ var LuauExecutionClient = class {
12
+ #inner;
13
+ tasks;
14
+ /**
15
+ * Creates a new {@link LuauExecutionClient}. Configuration is frozen
16
+ * on construction; per-request overrides are accepted on each
17
+ * method.
18
+ *
19
+ * @param options - Client-level configuration including the API key.
20
+ */
21
+ constructor(options) {
22
+ this.#inner = new ResourceClient(options);
23
+ this.tasks = createTasksHandle(this.#inner);
24
+ }
25
+ };
26
+ function createTasksHandle(inner) {
27
+ return {
28
+ async get(parameters, options) {
29
+ return inner.execute({
30
+ options,
31
+ parameters,
32
+ spec: GET_SPEC
33
+ });
34
+ },
35
+ async submit(parameters, options) {
36
+ if ("versionId" in parameters) return inner.execute({
37
+ options,
38
+ parameters,
39
+ spec: SUBMIT_VERSION_SPEC
40
+ });
41
+ return inner.execute({
42
+ options,
43
+ parameters,
44
+ spec: SUBMIT_HEAD_SPEC
45
+ });
46
+ }
47
+ };
48
+ }
49
+ //#endregion
50
+ export { LuauExecutionClient };
51
+
52
+ //# sourceMappingURL=luau-execution.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"luau-execution.mjs","names":["#inner"],"sources":["../src/resources/luau-execution/client.ts"],"sourcesContent":["import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tGET_SPEC,\n\tSUBMIT_HEAD_SPEC,\n\tSUBMIT_VERSION_SPEC,\n} from \"../../domains/cloud-v2/luau-execution-tasks/specs.ts\";\nimport type {\n\tGetParameters,\n\tLuauExecutionTask,\n\tSubmitAtHeadParameters,\n\tSubmitAtVersionParameters,\n} from \"../../domains/cloud-v2/luau-execution-tasks/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { ResourceClient } from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\n/**\n * Operation handle exposed by {@link LuauExecutionClient} as the\n * `tasks` namespace. Provides `submit` to queue a Luau script and\n * `get` to fetch a task's current state.\n */\nexport interface TasksHandle {\n\t/**\n\t * Fetches the current state of a previously-submitted Luau\n\t * execution task. Uses idempotent retry semantics for both 429 and\n\t * 5xx.\n\t *\n\t * @param parameters - The task ref plus an optional `view` selector.\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\n\t * {@link LuauExecutionTask} or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tget(\n\t\tparameters: GetParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n\t/**\n\t * Submits a Luau script for execution against a place. Dispatches\n\t * to the head-version URL when `versionId` is omitted, or to the\n\t * specific-version URL when one is supplied. Both URL shapes share\n\t * one rate-limit queue and one required-scope set.\n\t *\n\t * @param parameters - The universe and place identifiers, the\n\t * script to run, an optional `versionId`, and any other writable\n\t * submit fields.\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\n\t * {@link LuauExecutionTask} or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tsubmit(\n\t\tparameters: SubmitAtHeadParameters | SubmitAtVersionParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n}\n\n/**\n * Public client for the Roblox Open Cloud `LuauExecutionSessionTask`\n * resource. Tasks run a Luau script against a place and surface state,\n * output, or error through the `LuauExecutionTask` discriminated\n * union. Exposes `tasks.submit` for both the head version and a\n * specific place version, plus `tasks.get` for fetching task state.\n */\nexport class LuauExecutionClient {\n\treadonly #inner: ResourceClient;\n\n\tpublic readonly tasks: TasksHandle;\n\n\t/**\n\t * Creates a new {@link LuauExecutionClient}. Configuration is frozen\n\t * on construction; per-request overrides are accepted on each\n\t * 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.tasks = createTasksHandle(this.#inner);\n\t}\n}\n\nfunction createTasksHandle(inner: ResourceClient): TasksHandle {\n\treturn {\n\t\tasync get(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: GET_SPEC });\n\t\t},\n\t\tasync submit(parameters, options) {\n\t\t\tif (\"versionId\" in parameters) {\n\t\t\t\treturn inner.execute({ options, parameters, spec: SUBMIT_VERSION_SPEC });\n\t\t\t}\n\n\t\t\treturn inner.execute({ options, parameters, spec: SUBMIT_HEAD_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;AAkEA,IAAa,sBAAb,MAAiC;CAChC;CAEA;;;;;;;;CASA,YAAY,SAAiC;AAC5C,QAAA,QAAc,IAAI,eAAe,QAAQ;AACzC,OAAK,QAAQ,kBAAkB,MAAA,MAAY;;;AAI7C,SAAS,kBAAkB,OAAoC;AAC9D,QAAO;EACN,MAAM,IAAI,YAAY,SAAS;AAC9B,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAU,CAAC;;EAE9D,MAAM,OAAO,YAAY,SAAS;AACjC,OAAI,eAAe,WAClB,QAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAqB,CAAC;AAGzE,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE"}
package/dist/places.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-YCTsM8Qd.mjs";
1
+ import { d as OpenCloudError, i as OpenCloudClientOptions, l as Result, s as RequestOptions } from "./types-Cp8w8uwA.mjs";
2
+ import { a as LuauExecutionTask, c as SubmitAtVersionParameters, r as GetParameters, s as SubmitAtHeadParameters } from "./types-BZ0959rh.mjs";
2
3
 
3
4
  //#region src/domains/cloud-v2/places/types.d.ts
4
5
  /**
@@ -80,13 +81,50 @@ interface PlaceVersion {
80
81
  //#endregion
81
82
  //#region src/resources/places/client.d.ts
82
83
  /**
84
+ * Operation Group exposed by {@link PlacesClient} as the
85
+ * `luauExecution` namespace. Provides `submit` to queue a Luau script
86
+ * and `get` to fetch a task's current state. Shares the same
87
+ * dispatch wiring as the top-level `LuauExecutionClient` exposed at
88
+ * `@bedrock-rbx/ocale/luau-execution`.
89
+ */
90
+ interface LuauExecutionHandle {
91
+ /**
92
+ * Fetches the current state of a previously-submitted Luau
93
+ * execution task. Uses idempotent retry semantics for both 429 and
94
+ * 5xx.
95
+ *
96
+ * @param parameters - The task ref plus an optional `view` selector.
97
+ * @param options - Optional per-request overrides (e.g. A different
98
+ * {@link OpenCloudClientOptions.apiKey} for this call only).
99
+ * @returns A {@link Result} wrapping the parsed
100
+ * {@link LuauExecutionTask} or the {@link OpenCloudError} that
101
+ * caused the request to fail.
102
+ */
103
+ get(parameters: GetParameters, options?: RequestOptions): Promise<Result<LuauExecutionTask, OpenCloudError>>;
104
+ /**
105
+ * Submits a Luau script for execution against a place. Dispatches
106
+ * to the head-version URL when `versionId` is omitted, or to the
107
+ * specific-version URL when one is supplied. Both URL shapes share
108
+ * one rate-limit queue and one required-scope set.
109
+ *
110
+ * @param parameters - The universe and place identifiers, the
111
+ * script to run, an optional `versionId`, and any other writable
112
+ * submit fields.
113
+ * @param options - Optional per-request overrides (e.g. A different
114
+ * {@link OpenCloudClientOptions.apiKey} for this call only).
115
+ * @returns A {@link Result} wrapping the parsed
116
+ * {@link LuauExecutionTask} or the {@link OpenCloudError} that
117
+ * caused the request to fail.
118
+ */
119
+ submit(parameters: SubmitAtHeadParameters | SubmitAtVersionParameters, options?: RequestOptions): Promise<Result<LuauExecutionTask, OpenCloudError>>;
120
+ }
121
+ /**
83
122
  * Public client for the Roblox Open Cloud `Place` resource. Covers
84
- * place-version publishing (`publish`, `save`) and place-configuration
85
- * updates (`update`). Wires the request builders, the injected
86
- * {@link OpenCloudClientOptions.httpClient}, and the response parsers
87
- * into a single ergonomic surface. Every method returns a {@link Result}
88
- * so callers handle failure explicitly; no thrown {@link OpenCloudError}
89
- * ever escapes the client.
123
+ * place-version publishing (`publish`, `save`), place-configuration
124
+ * updates (`update`), and the Luau execution Operation Group
125
+ * (`luauExecution.submit`, `luauExecution.get`). Every method returns
126
+ * a {@link Result} so callers handle failure explicitly; no thrown
127
+ * {@link OpenCloudError} ever escapes the client.
90
128
  *
91
129
  * Publishing or saving a 5xx-failed place version is not retried
92
130
  * automatically: Roblox does not support idempotency keys, so a retry
@@ -106,6 +144,7 @@ interface PlaceVersion {
106
144
  */
107
145
  declare class PlacesClient {
108
146
  #private;
147
+ readonly luauExecution: LuauExecutionHandle;
109
148
  /**
110
149
  * Creates a new {@link PlacesClient}. Configuration is frozen on
111
150
  * construction; per-request overrides are accepted on each method.
@@ -157,5 +196,5 @@ declare class PlacesClient {
157
196
  update(parameters: UpdatePlaceParameters, options?: RequestOptions): Promise<Result<Place, OpenCloudError>>;
158
197
  }
159
198
  //#endregion
160
- export { type Place, type PlaceVersion, PlacesClient, type PublishParameters, type UpdatePlaceParameters };
199
+ export { type LuauExecutionHandle, type Place, type PlaceVersion, PlacesClient, type PublishParameters, type UpdatePlaceParameters };
161
200
  //# sourceMappingURL=places.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"places.d.mts","names":[],"sources":["../src/domains/cloud-v2/places/types.ts","../src/domains/universes/places/types.ts","../src/resources/places/client.ts"],"mappings":";;;;;;AAMA;;;UAAiB,qBAAA;;WAEP,WAAA;;WAEA,WAAA;;WAEA,OAAA;EAIA;EAAA,SAFA,UAAA;EASO;EAAA,SAPP,UAAA;AAAA;;;;;UAOO,KAAA;;WAEP,EAAA;;WAEA,SAAA,EAAW,IAAA;;WAEX,WAAA;;WAEA,WAAA;;WAEA,IAAA;;WAEA,UAAA;EC7BO;EAAA,SD+BP,UAAA;EC7BM;EAAA,SD+BN,uBAAA;;WAEA,SAAA,EAAW,IAAA;AAAA;;;;;;AAnCrB;;;UCAiB,iBAAA;;WAEP,IAAA,EAAM,UAAA,CAAW,WAAA;;;;;;ADe3B;WCRU,MAAA;;WAEA,OAAA;;WAEA,UAAA;AAAA;;;;UAMO,YAAA;;;;;;WAMP,aAAA;AAAA;;;;;;;;;;;;ADRV;;;;;;;;;;;;;;;;cEgDa,YAAA;EAAA;;;ADjEb;;;;EC0EC,WAAA,CAAY,OAAA,EAAS,sBAAA;;;;;;;;ADvDtB;;;ECqEC,OAAA,CACC,UAAA,EAAY,iBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,YAAA,EAAc,cAAA;EDlEvB;;;;ACwCV;;;;;;;;;;EA4CC,IAAA,CACC,UAAA,EAAY,iBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,YAAA,EAAc,cAAA;;;;;;;;;;;;;;;;EAmBhC,MAAA,CACC,UAAA,EAAY,qBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,KAAA,EAAO,cAAA;AAAA"}
1
+ {"version":3,"file":"places.d.mts","names":[],"sources":["../src/domains/cloud-v2/places/types.ts","../src/domains/universes/places/types.ts","../src/resources/places/client.ts"],"mappings":";;;;;;;;AAMA;;UAAiB,qBAAA;EAAA;EAAA,SAEP,WAAA;;WAEA,WAAA;;WAEA,OAAA;;WAEA,UAAA;EASV;EAAA,SAPU,UAAA;AAAA;;;;;UAOO,KAAA;;WAEP,EAAA;;WAEA,SAAA,EAAW,IAAA;;WAEX,WAAA;;WAEA,WAAA;EAUW;EAAA,SARX,IAAA;;WAEA,UAAA;EC7BV;EAAA,SD+B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_DEFAULTS, o as isRecord, t as ResourceClient } from "./resource-client-CaS_j3yg.mjs";
1
+ import { i as ApiError } from "./rate-limit-CKfuhxT1.mjs";
2
+ import { t as ValidationError } from "./validation-b7KAoEio.mjs";
3
+ import { t as isDateTimeString } from "./is-date-time-string-Cuf1TaSC.mjs";
4
+ import { i as CREATE_METHOD_DEFAULTS, o as isRecord, t as ResourceClient } from "./resource-client-Wi4Mwqy5.mjs";
5
+ import { n as SUBMIT_HEAD_SPEC, r as SUBMIT_VERSION_SPEC, t as GET_SPEC } from "./specs-Co6qYp_E.mjs";
4
6
  //#region src/domains/cloud-v2/places/builders.ts
5
7
  const NON_UPDATABLE_KEYS = new Set(["placeId", "universeId"]);
6
8
  /**
@@ -102,7 +104,7 @@ function toPlace(args) {
102
104
  };
103
105
  }
104
106
  function hasValidPlaceRequired(body) {
105
- return typeof body["path"] === "string" && typeof body["createTime"] === "string" && typeof body["updateTime"] === "string" && typeof body["displayName"] === "string" && typeof body["description"] === "string";
107
+ return typeof body["path"] === "string" && isDateTimeString(body["createTime"]) && isDateTimeString(body["updateTime"]) && typeof body["displayName"] === "string" && typeof body["description"] === "string";
106
108
  }
107
109
  function isOptionalBoolean(value) {
108
110
  return value === void 0 || value === null || typeof value === "boolean";
@@ -280,7 +282,7 @@ function isPlaceVersionWire(value) {
280
282
  }
281
283
  //#endregion
282
284
  //#region src/resources/places/client.ts
283
- function makeSpec(versionType) {
285
+ function makePublishSpec(versionType) {
284
286
  return Object.freeze({
285
287
  buildRequest: (parameters) => buildPublishRequest(parameters, versionType),
286
288
  methodDefaults: CREATE_METHOD_DEFAULTS,
@@ -290,8 +292,8 @@ function makeSpec(versionType) {
290
292
  requiredScopes: PUBLISH_REQUIRED_SCOPES
291
293
  });
292
294
  }
293
- const PUBLISH_SPEC = makeSpec("Published");
294
- const SAVE_SPEC = makeSpec("Saved");
295
+ const PUBLISH_SPEC = makePublishSpec("Published");
296
+ const SAVE_SPEC = makePublishSpec("Saved");
295
297
  const UPDATE_SPEC = Object.freeze({
296
298
  buildRequest: buildUpdateRequest,
297
299
  methodDefaults: {},
@@ -302,12 +304,11 @@ const UPDATE_SPEC = Object.freeze({
302
304
  });
303
305
  /**
304
306
  * Public client for the Roblox Open Cloud `Place` resource. Covers
305
- * place-version publishing (`publish`, `save`) and place-configuration
306
- * updates (`update`). Wires the request builders, the injected
307
- * {@link OpenCloudClientOptions.httpClient}, and the response parsers
308
- * into a single ergonomic surface. Every method returns a {@link Result}
309
- * so callers handle failure explicitly; no thrown {@link OpenCloudError}
310
- * ever escapes the client.
307
+ * place-version publishing (`publish`, `save`), place-configuration
308
+ * updates (`update`), and the Luau execution Operation Group
309
+ * (`luauExecution.submit`, `luauExecution.get`). Every method returns
310
+ * a {@link Result} so callers handle failure explicitly; no thrown
311
+ * {@link OpenCloudError} ever escapes the client.
311
312
  *
312
313
  * Publishing or saving a 5xx-failed place version is not retried
313
314
  * automatically: Roblox does not support idempotency keys, so a retry
@@ -327,6 +328,7 @@ const UPDATE_SPEC = Object.freeze({
327
328
  */
328
329
  var PlacesClient = class {
329
330
  #inner;
331
+ luauExecution;
330
332
  /**
331
333
  * Creates a new {@link PlacesClient}. Configuration is frozen on
332
334
  * construction; per-request overrides are accepted on each method.
@@ -335,6 +337,7 @@ var PlacesClient = class {
335
337
  */
336
338
  constructor(options) {
337
339
  this.#inner = new ResourceClient(options);
340
+ this.luauExecution = createLuauExecutionHandle(this.#inner);
338
341
  }
339
342
  /**
340
343
  * Publishes a new live version of a place.
@@ -397,6 +400,29 @@ var PlacesClient = class {
397
400
  });
398
401
  }
399
402
  };
403
+ function createLuauExecutionHandle(inner) {
404
+ return {
405
+ async get(parameters, options) {
406
+ return inner.execute({
407
+ options,
408
+ parameters,
409
+ spec: GET_SPEC
410
+ });
411
+ },
412
+ async submit(parameters, options) {
413
+ if ("versionId" in parameters) return inner.execute({
414
+ options,
415
+ parameters,
416
+ spec: SUBMIT_VERSION_SPEC
417
+ });
418
+ return inner.execute({
419
+ options,
420
+ parameters,
421
+ spec: SUBMIT_HEAD_SPEC
422
+ });
423
+ }
424
+ };
425
+ }
400
426
  //#endregion
401
427
  export { PlacesClient };
402
428
 
@@ -1 +1 @@
1
- {"version":3,"file":"places.mjs","names":["#inner"],"sources":["../src/domains/cloud-v2/places/builders.ts","../src/domains/cloud-v2/places/operations.ts","../src/domains/cloud-v2/places/parsers.ts","../src/domains/universes/places/signatures.ts","../src/domains/universes/places/builders.ts","../src/domains/universes/places/operations.ts","../src/domains/universes/places/parsers.ts","../src/resources/places/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { UpdatePlaceParameters } from \"./types.ts\";\n\nconst NON_UPDATABLE_KEYS: ReadonlySet<string> = new Set([\"placeId\", \"universeId\"]);\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update place\" endpoint.\n * Derives the `updateMask` query string from the keys present on\n * `parameters` (excluding the identifiers) and emits a JSON body\n * containing those same fields.\n *\n * @param parameters - The universe and place identifiers plus the fields\n * to update.\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when no updatable fields were supplied.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdatePlaceParameters,\n): Result<HttpRequest, ValidationError> {\n\tconst fieldKeys = extractUpdateFieldKeys(parameters);\n\n\tif (fieldKeys.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Update must include at least one field\", {\n\t\t\t\tcode: \"empty_update\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst body = Object.fromEntries(\n\t\tfieldKeys.map((key): readonly [string, unknown] => [key, Reflect.get(parameters, key)]),\n\t);\n\tconst updateMask = fieldKeys.join(\",\");\n\tconst { placeId, universeId } = parameters;\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": \"application/json\" },\n\t\t\tmethod: \"PATCH\",\n\t\t\turl: `/cloud/v2/universes/${universeId}/places/${placeId}?updateMask=${updateMask}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction extractUpdateFieldKeys(parameters: UpdatePlaceParameters): ReadonlyArray<string> {\n\treturn Object.keys(parameters).filter((key) => !NON_UPDATABLE_KEYS.has(key));\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst UPDATE_PER_MINUTE = 100;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for updating a place, from the Open Cloud\n * OpenAPI schema (100 requests per minute per API key owner). Keyed\n * independently from the publish operation so publish and update do\n * not share a queue; upstream quota accounting is not documented as\n * shared and the conservative default is fewer cross-method\n * contention surprises.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: UPDATE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"places.update\",\n});\n\n/**\n * Scopes required to update a place's metadata, sourced from\n * `x-roblox-scopes` on the `Cloud_UpdatePlace` operation in the vendored\n * OpenAPI schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe.place:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { Place } from \"./types.ts\";\nimport type { PlaceWire } from \"./wire.ts\";\n\nconst MALFORMED_PLACE_MESSAGE = \"Malformed place response\";\n\ninterface ToPlaceArgs {\n\treadonly id: string;\n\treadonly body: PlaceWire;\n\treadonly universeId: string;\n}\n\n/**\n * Parses a successful Open Cloud `Place` response body into the public\n * {@link Place} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link Place}, or an\n * {@link ApiError} when the body does not match the wire schema.\n */\nexport function parsePlaceResponse(response: HttpResponse): Result<Place, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isPlaceWire(body)) {\n\t\treturn malformedPlace(statusCode);\n\t}\n\n\tconst match = /^universes\\/(\\d+)\\/places\\/(\\d+)$/.exec(body.path);\n\tconst universeId = match?.[1];\n\tconst id = match?.[2];\n\tif (id === undefined || universeId === undefined) {\n\t\treturn malformedPlace(statusCode);\n\t}\n\n\treturn { data: toPlace({ id, body, universeId }), success: true };\n}\n\nfunction malformedPlace(statusCode: number): Result<Place, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_PLACE_MESSAGE, { statusCode }),\n\t\tsuccess: false,\n\t};\n}\n\nfunction toPlace(args: ToPlaceArgs): Place {\n\tconst { id, body, universeId } = args;\n\treturn {\n\t\tid,\n\t\tcreatedAt: new Date(body.createTime),\n\t\tdescription: body.description,\n\t\tdisplayName: body.displayName,\n\t\troot: body.root ?? false,\n\t\tserverSize: body.serverSize ?? undefined,\n\t\tuniverseId,\n\t\tuniverseRuntimeCreation: body.universeRuntimeCreation ?? false,\n\t\tupdatedAt: new Date(body.updateTime),\n\t};\n}\n\nfunction hasValidPlaceRequired(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"path\"] === \"string\" &&\n\t\ttypeof body[\"createTime\"] === \"string\" &&\n\t\ttypeof body[\"updateTime\"] === \"string\" &&\n\t\ttypeof body[\"displayName\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\"\n\t);\n}\n\nfunction isOptionalBoolean(value: unknown): boolean {\n\treturn value === undefined || value === null || typeof value === \"boolean\";\n}\n\nfunction hasValidPlaceOptional(body: Record<string, unknown>): boolean {\n\tconst serverSize = body[\"serverSize\"] ?? undefined;\n\treturn (\n\t\t(serverSize === undefined || typeof serverSize === \"number\") &&\n\t\tisOptionalBoolean(body[\"root\"]) &&\n\t\tisOptionalBoolean(body[\"universeRuntimeCreation\"])\n\t);\n}\n\nfunction isPlaceWire(body: unknown): body is PlaceWire {\n\treturn isRecord(body) && hasValidPlaceRequired(body) && hasValidPlaceOptional(body);\n}\n","/**\n * Magic-byte prefix every Roblox binary place file (`.rbxl`) starts with.\n * The first 8 bytes spell out `<roblox!` in ASCII; the remaining 6 bytes\n * (`\\x89\\xff\\r\\n\\x1a\\n`) are the binary-format marker that distinguishes a\n * binary place file from the XML form (`.rbxlx`), whose ASCII-only header\n * begins with `<roblox `.\n */\nexport const RBXL_SIGNATURE: Readonly<Uint8Array<ArrayBuffer>> = new Uint8Array([\n\t0x3c, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x21, 0x89, 0xff, 0x0d, 0x0a, 0x1a, 0x0a,\n]);\n\n/**\n * Magic-byte prefix every Roblox XML place file (`.rbxlx`) starts with.\n * Equivalent to the ASCII string `<roblox ` (note the trailing space): a\n * well-formed rbxlx file opens with `<roblox` followed by attributes, while\n * an rbxl file uses `<roblox!` (exclamation mark) as the eighth byte. The\n * trailing space is what proves the file is the XML variant rather than\n * the binary one.\n */\nexport const RBXLX_SIGNATURE: Readonly<Uint8Array<ArrayBuffer>> = new Uint8Array([\n\t0x3c, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x20,\n]);\n\n/**\n * Reports whether `body` begins with `signature`. A pure byte-prefix check\n * with no allocation; used by the place builder to disambiguate `.rbxl` and\n * `.rbxlx` payloads against their declared `format`.\n *\n * @param body - The caller-supplied place file bytes.\n * @param signature - One of the frozen signature constants from this module.\n * @returns `true` if every byte of `signature` matches `body[0..signature.length]`.\n */\nexport function matchesSignature(\n\tbody: Uint8Array,\n\tsignature: Readonly<Uint8Array<ArrayBuffer>>,\n): boolean {\n\tfor (const [index, expected] of signature.entries()) {\n\t\tif (body[index] !== expected) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n","import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport { matchesSignature, RBXL_SIGNATURE, RBXLX_SIGNATURE } from \"./signatures.ts\";\nimport type { PublishParameters } from \"./types.ts\";\n\n/**\n * Whether a publish call writes a live (`Published`) or draft (`Saved`)\n * version. Surfaces only as the `versionType` query string on the\n * underlying HTTP request.\n */\ntype VersionType = \"Published\" | \"Saved\";\n\nconst CONTENT_TYPE_BY_FORMAT: Readonly<Record<PublishParameters[\"format\"], string>> = {\n\trbxl: \"application/octet-stream\",\n\trbxlx: \"application/xml\",\n};\n\n/**\n * Builds a `POST` request for the Open Cloud \"publish place version\"\n * endpoint. Performs two local validations before producing any\n * {@link HttpRequest}: a non-empty body check and a magic-byte check\n * that the bytes' actual format matches `parameters.format`.\n *\n * @param parameters - Universe and place identifiers, the place file\n * bytes, and the declared `format` of those bytes.\n * @param versionType - `\"Published\"` for `publish()`, `\"Saved\"` for\n * `save()`; baked into the `?versionType=` query string.\n * @returns A success result wrapping the request on success, or a\n * {@link ValidationError} when the body is empty or its magic bytes\n * disagree with `parameters.format`.\n */\nexport function buildPublishRequest(\n\tparameters: PublishParameters,\n\tversionType: VersionType,\n): Result<HttpRequest, ValidationError> {\n\tconst { body, format, placeId, universeId } = parameters;\n\n\tif (body.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Place body is empty\", { code: \"empty_body\" }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst expectedSignature = format === \"rbxl\" ? RBXL_SIGNATURE : RBXLX_SIGNATURE;\n\tif (!matchesSignature(body, expectedSignature)) {\n\t\treturn {\n\t\t\terr: new ValidationError(`Place body does not match the declared \"${format}\" format`, {\n\t\t\t\tcode: \"format_mismatch\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": CONTENT_TYPE_BY_FORMAT[format] },\n\t\t\tmethod: \"POST\",\n\t\t\turl: `/universes/v1/${universeId}/places/${placeId}/versions?versionType=${versionType}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for publishing or saving a place version,\n * from the Open Cloud OpenAPI schema (30 requests per minute, expressed\n * here as `0.5` per second). The publish and save methods both reference\n * this constant so that a single per-API-key queue serves both, matching\n * Roblox's server-side accounting which counts both call types against\n * the same per-minute quota.\n */\nexport const PUBLISH_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 0.5,\n\toperationKey: \"places.publishVersion\",\n});\n\n/**\n * Scopes required to publish or save a place version, sourced from\n * `x-roblox-scopes` on the `Places_CreatePlaceVersionApiKey` operation\n * in the vendored OpenAPI schema.\n */\nexport const PUBLISH_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe-places:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { PlaceVersion } from \"./types.ts\";\nimport type { PlaceVersionWire } from \"./wire.ts\";\n\n/**\n * Parses a successful publish-version response into the public\n * {@link PlaceVersion} shape. The Roblox endpoint sometimes returns the\n * JSON-shaped body under a `text/plain` `Content-Type`, so the body may\n * arrive either pre-decoded as a JSON object or still in its raw string\n * form; both are accepted here.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link PlaceVersion}, or\n * an {@link ApiError} when the body is malformed or its `versionNumber`\n * field is missing/wrong-typed.\n */\nexport function parsePublishResponse(response: HttpResponse): Result<PlaceVersion, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tconst decodeResult = decodeBody(body, statusCode);\n\tif (!decodeResult.success) {\n\t\treturn decodeResult;\n\t}\n\n\tif (!isPlaceVersionWire(decodeResult.data)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed publish response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: { versionNumber: decodeResult.data.versionNumber },\n\t\tsuccess: true,\n\t};\n}\n\nfunction decodeBody(body: unknown, statusCode: number): Result<unknown, ApiError> {\n\tif (typeof body !== \"string\") {\n\t\treturn { data: body, success: true };\n\t}\n\n\ttry {\n\t\treturn { data: JSON.parse(body), success: true };\n\t} catch {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed publish response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n}\n\nfunction isPlaceVersionWire(value: unknown): value is PlaceVersionWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn typeof value[\"versionNumber\"] === \"number\";\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport { buildUpdateRequest } from \"../../domains/cloud-v2/places/builders.ts\";\nimport {\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/cloud-v2/places/operations.ts\";\nimport { parsePlaceResponse } from \"../../domains/cloud-v2/places/parsers.ts\";\nimport type { Place, UpdatePlaceParameters } from \"../../domains/cloud-v2/places/types.ts\";\nimport { buildPublishRequest } from \"../../domains/universes/places/builders.ts\";\nimport {\n\tPUBLISH_OPERATION_LIMIT,\n\tPUBLISH_REQUIRED_SCOPES,\n} from \"../../domains/universes/places/operations.ts\";\nimport { parsePublishResponse } from \"../../domains/universes/places/parsers.ts\";\nimport type { PlaceVersion, PublishParameters } from \"../../domains/universes/places/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport { ResourceClient, type ResourceMethodSpec } from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\nfunction makeSpec(\n\tversionType: \"Published\" | \"Saved\",\n): ResourceMethodSpec<PublishParameters, PlaceVersion> {\n\treturn Object.freeze({\n\t\tbuildRequest: (parameters: PublishParameters) =>\n\t\t\tbuildPublishRequest(parameters, versionType),\n\t\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\t\tmethodKind: \"create\",\n\t\toperationLimit: PUBLISH_OPERATION_LIMIT,\n\t\tparse: parsePublishResponse,\n\t\trequiredScopes: PUBLISH_REQUIRED_SCOPES,\n\t});\n}\n\nconst PUBLISH_SPEC = makeSpec(\"Published\");\nconst SAVE_SPEC = makeSpec(\"Saved\");\n\nconst UPDATE_SPEC: ResourceMethodSpec<UpdatePlaceParameters, Place> = Object.freeze({\n\tbuildRequest: buildUpdateRequest,\n\tmethodDefaults: {},\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parsePlaceResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\n/**\n * Public client for the Roblox Open Cloud `Place` resource. Covers\n * place-version publishing (`publish`, `save`) and place-configuration\n * updates (`update`). Wires the request builders, the injected\n * {@link OpenCloudClientOptions.httpClient}, and the response parsers\n * into a single ergonomic surface. Every method returns a {@link Result}\n * so callers handle failure explicitly; no thrown {@link OpenCloudError}\n * ever escapes the client.\n *\n * Publishing or saving a 5xx-failed place version is not retried\n * automatically: Roblox does not support idempotency keys, so a retry\n * could publish a duplicate version unnoticed. Callers that *can* detect\n * duplicates externally may opt back into 5xx retry per-call by passing\n * `retryableStatuses` on the second argument. The `update` method, by\n * contrast, is idempotent and retries both 429 and 5xx automatically.\n *\n * @example\n *\n * ```ts\n * import { PlacesClient } from \"@bedrock-rbx/ocale/places\";\n *\n * const client = new PlacesClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(PlacesClient);\n * ```\n */\nexport class PlacesClient {\n\treadonly #inner: ResourceClient;\n\n\t/**\n\t * Creates a new {@link PlacesClient}. Configuration is frozen on\n\t * 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}\n\n\t/**\n\t * Publishes a new live version of a place.\n\t *\n\t * @param parameters - Universe and place identifiers, the place file\n\t * bytes, and their declared `format`.\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 PlaceVersion}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async publish(\n\t\tparameters: PublishParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<PlaceVersion, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: PUBLISH_SPEC });\n\t}\n\n\t/**\n\t * Saves a new draft version of a place. Identical to {@link publish}\n\t * except the resulting version is not made live; consumers can list or\n\t * promote it later. Shares a single per-API-key rate-limit queue with\n\t * `publish` because Roblox attributes both calls to the same per-minute\n\t * quota.\n\t *\n\t * @param parameters - Universe and place identifiers, the place file\n\t * bytes, and their declared `format`.\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 PlaceVersion}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async save(\n\t\tparameters: PublishParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<PlaceVersion, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: SAVE_SPEC });\n\t}\n\n\t/**\n\t * Partially updates a place's configuration. The fields supplied on\n\t * `parameters` (excluding the identifiers) are forwarded to the\n\t * server via a Google-style `updateMask`; unmentioned fields are\n\t * left untouched. The universe's root place is the canonical place\n\t * to update when changing a universe's description or display name:\n\t * both are derived server-side from the root place.\n\t *\n\t * @param parameters - The universe and place identifiers and the\n\t * fields to update. At least one writable field must be supplied.\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 Place} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdatePlaceParameters,\n\t\toptions?: RequestOptions,\n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AS,SACnB,QAAO;EAAE,MAAM;EAAM,SAAS;EAAM;AAGrC,KAAI;AACH,SAAO;GAAE,MAAM,KAAK,MAAM,KAAK;GAAE,SAAS;GAAM;SACzC;AACP,SAAO;GACN,KAAK,IAAI,SAAS,8BAA8B,EAAE,YAAY,CAAC;GAC/D,SAAS;GACT;;;AAIH,SAAS,mBAAmB,OAA2C;AACtE,KAAI,CAAC,SAAS,MAAM,CACnB,QAAO;AAGR,QAAO,OAAO,MAAM,qBAAqB;;;;ACxC1C,SAAS,SACR,aACsD;AACtD,QAAO,OAAO,OAAO;EACpB,eAAe,eACd,oBAAoB,YAAY,YAAY;EAC7C,gBAAgB;EAChB,YAAY;EACZ,gBAAgB;EAChB,OAAO;EACP,gBAAgB;EAChB,CAAC;;AAGH,MAAM,eAAe,SAAS,YAAY;AAC1C,MAAM,YAAY,SAAS,QAAQ;AAEnC,MAAM,cAAgE,OAAO,OAAO;CACnF,cAAc;CACd,gBAAgB,EAAE;CAClB,YAAY;CACZ,gBAAgB;CAChB,OAAO;CACP,gBAAgB;CAChB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BF,IAAa,eAAb,MAA0B;CACzB;;;;;;;CAQA,YAAY,SAAiC;AAC5C,QAAA,QAAc,IAAI,eAAe,QAAQ;;;;;;;;;;;;CAa1C,MAAa,QACZ,YACA,SACgD;AAChD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAc,CAAC;;;;;;;;;;;;;;;;CAiBxE,MAAa,KACZ,YACA,SACgD;AAChD,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAW,CAAC;;;;;;;;;;;;;;;;;CAkBrE,MAAa,OACZ,YACA,SACyC;AACzC,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC"}
1
+ {"version":3,"file":"places.mjs","names":["#inner"],"sources":["../src/domains/cloud-v2/places/builders.ts","../src/domains/cloud-v2/places/operations.ts","../src/domains/cloud-v2/places/parsers.ts","../src/domains/universes/places/signatures.ts","../src/domains/universes/places/builders.ts","../src/domains/universes/places/operations.ts","../src/domains/universes/places/parsers.ts","../src/resources/places/client.ts"],"sourcesContent":["import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { UpdatePlaceParameters } from \"./types.ts\";\n\nconst NON_UPDATABLE_KEYS: ReadonlySet<string> = new Set([\"placeId\", \"universeId\"]);\n\n/**\n * Builds a `PATCH` request for the Open Cloud \"update place\" endpoint.\n * Derives the `updateMask` query string from the keys present on\n * `parameters` (excluding the identifiers) and emits a JSON body\n * containing those same fields.\n *\n * @param parameters - The universe and place identifiers plus the fields\n * to update.\n * @returns A success result wrapping the request, or a\n * {@link ValidationError} when no updatable fields were supplied.\n */\nexport function buildUpdateRequest(\n\tparameters: UpdatePlaceParameters,\n): Result<HttpRequest, ValidationError> {\n\tconst fieldKeys = extractUpdateFieldKeys(parameters);\n\n\tif (fieldKeys.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Update must include at least one field\", {\n\t\t\t\tcode: \"empty_update\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst body = Object.fromEntries(\n\t\tfieldKeys.map((key): readonly [string, unknown] => [key, Reflect.get(parameters, key)]),\n\t);\n\tconst updateMask = fieldKeys.join(\",\");\n\tconst { placeId, universeId } = parameters;\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": \"application/json\" },\n\t\t\tmethod: \"PATCH\",\n\t\t\turl: `/cloud/v2/universes/${universeId}/places/${placeId}?updateMask=${updateMask}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n\nfunction extractUpdateFieldKeys(parameters: UpdatePlaceParameters): ReadonlyArray<string> {\n\treturn Object.keys(parameters).filter((key) => !NON_UPDATABLE_KEYS.has(key));\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\nconst UPDATE_PER_MINUTE = 100;\nconst SECONDS_PER_MINUTE = 60;\n\n/**\n * Per-second request ceiling for updating a place, from the Open Cloud\n * OpenAPI schema (100 requests per minute per API key owner). Keyed\n * independently from the publish operation so publish and update do\n * not share a queue; upstream quota accounting is not documented as\n * shared and the conservative default is fewer cross-method\n * contention surprises.\n */\nexport const UPDATE_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: UPDATE_PER_MINUTE / SECONDS_PER_MINUTE,\n\toperationKey: \"places.update\",\n});\n\n/**\n * Scopes required to update a place's metadata, sourced from\n * `x-roblox-scopes` on the `Cloud_UpdatePlace` operation in the vendored\n * OpenAPI schema.\n */\nexport const UPDATE_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe.place:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isDateTimeString } from \"../../../internal/utils/is-date-time-string.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { Place } from \"./types.ts\";\nimport type { PlaceWire } from \"./wire.ts\";\n\nconst MALFORMED_PLACE_MESSAGE = \"Malformed place response\";\n\ninterface ToPlaceArgs {\n\treadonly id: string;\n\treadonly body: PlaceWire;\n\treadonly universeId: string;\n}\n\n/**\n * Parses a successful Open Cloud `Place` response body into the public\n * {@link Place} shape.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link Place}, or an\n * {@link ApiError} when the body does not match the wire schema.\n */\nexport function parsePlaceResponse(response: HttpResponse): Result<Place, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tif (!isPlaceWire(body)) {\n\t\treturn malformedPlace(statusCode);\n\t}\n\n\tconst match = /^universes\\/(\\d+)\\/places\\/(\\d+)$/.exec(body.path);\n\tconst universeId = match?.[1];\n\tconst id = match?.[2];\n\tif (id === undefined || universeId === undefined) {\n\t\treturn malformedPlace(statusCode);\n\t}\n\n\treturn { data: toPlace({ id, body, universeId }), success: true };\n}\n\nfunction malformedPlace(statusCode: number): Result<Place, ApiError> {\n\treturn {\n\t\terr: new ApiError(MALFORMED_PLACE_MESSAGE, { statusCode }),\n\t\tsuccess: false,\n\t};\n}\n\nfunction toPlace(args: ToPlaceArgs): Place {\n\tconst { id, body, universeId } = args;\n\treturn {\n\t\tid,\n\t\tcreatedAt: new Date(body.createTime),\n\t\tdescription: body.description,\n\t\tdisplayName: body.displayName,\n\t\troot: body.root ?? false,\n\t\tserverSize: body.serverSize ?? undefined,\n\t\tuniverseId,\n\t\tuniverseRuntimeCreation: body.universeRuntimeCreation ?? false,\n\t\tupdatedAt: new Date(body.updateTime),\n\t};\n}\n\nfunction hasValidPlaceRequired(body: Record<string, unknown>): boolean {\n\treturn (\n\t\ttypeof body[\"path\"] === \"string\" &&\n\t\tisDateTimeString(body[\"createTime\"]) &&\n\t\tisDateTimeString(body[\"updateTime\"]) &&\n\t\ttypeof body[\"displayName\"] === \"string\" &&\n\t\ttypeof body[\"description\"] === \"string\"\n\t);\n}\n\nfunction isOptionalBoolean(value: unknown): boolean {\n\treturn value === undefined || value === null || typeof value === \"boolean\";\n}\n\nfunction hasValidPlaceOptional(body: Record<string, unknown>): boolean {\n\tconst serverSize = body[\"serverSize\"] ?? undefined;\n\treturn (\n\t\t(serverSize === undefined || typeof serverSize === \"number\") &&\n\t\tisOptionalBoolean(body[\"root\"]) &&\n\t\tisOptionalBoolean(body[\"universeRuntimeCreation\"])\n\t);\n}\n\nfunction isPlaceWire(body: unknown): body is PlaceWire {\n\treturn isRecord(body) && hasValidPlaceRequired(body) && hasValidPlaceOptional(body);\n}\n","/**\n * Magic-byte prefix every Roblox binary place file (`.rbxl`) starts with.\n * The first 8 bytes spell out `<roblox!` in ASCII; the remaining 6 bytes\n * (`\\x89\\xff\\r\\n\\x1a\\n`) are the binary-format marker that distinguishes a\n * binary place file from the XML form (`.rbxlx`), whose ASCII-only header\n * begins with `<roblox `.\n */\nexport const RBXL_SIGNATURE: Readonly<Uint8Array<ArrayBuffer>> = new Uint8Array([\n\t0x3c, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x21, 0x89, 0xff, 0x0d, 0x0a, 0x1a, 0x0a,\n]);\n\n/**\n * Magic-byte prefix every Roblox XML place file (`.rbxlx`) starts with.\n * Equivalent to the ASCII string `<roblox ` (note the trailing space): a\n * well-formed rbxlx file opens with `<roblox` followed by attributes, while\n * an rbxl file uses `<roblox!` (exclamation mark) as the eighth byte. The\n * trailing space is what proves the file is the XML variant rather than\n * the binary one.\n */\nexport const RBXLX_SIGNATURE: Readonly<Uint8Array<ArrayBuffer>> = new Uint8Array([\n\t0x3c, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x20,\n]);\n\n/**\n * Reports whether `body` begins with `signature`. A pure byte-prefix check\n * with no allocation; used by the place builder to disambiguate `.rbxl` and\n * `.rbxlx` payloads against their declared `format`.\n *\n * @param body - The caller-supplied place file bytes.\n * @param signature - One of the frozen signature constants from this module.\n * @returns `true` if every byte of `signature` matches `body[0..signature.length]`.\n */\nexport function matchesSignature(\n\tbody: Uint8Array,\n\tsignature: Readonly<Uint8Array<ArrayBuffer>>,\n): boolean {\n\tfor (const [index, expected] of signature.entries()) {\n\t\tif (body[index] !== expected) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n","import type { HttpRequest } from \"../../../client/types.ts\";\nimport { ValidationError } from \"../../../errors/validation.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport { matchesSignature, RBXL_SIGNATURE, RBXLX_SIGNATURE } from \"./signatures.ts\";\nimport type { PublishParameters } from \"./types.ts\";\n\n/**\n * Whether a publish call writes a live (`Published`) or draft (`Saved`)\n * version. Surfaces only as the `versionType` query string on the\n * underlying HTTP request.\n */\ntype VersionType = \"Published\" | \"Saved\";\n\nconst CONTENT_TYPE_BY_FORMAT: Readonly<Record<PublishParameters[\"format\"], string>> = {\n\trbxl: \"application/octet-stream\",\n\trbxlx: \"application/xml\",\n};\n\n/**\n * Builds a `POST` request for the Open Cloud \"publish place version\"\n * endpoint. Performs two local validations before producing any\n * {@link HttpRequest}: a non-empty body check and a magic-byte check\n * that the bytes' actual format matches `parameters.format`.\n *\n * @param parameters - Universe and place identifiers, the place file\n * bytes, and the declared `format` of those bytes.\n * @param versionType - `\"Published\"` for `publish()`, `\"Saved\"` for\n * `save()`; baked into the `?versionType=` query string.\n * @returns A success result wrapping the request on success, or a\n * {@link ValidationError} when the body is empty or its magic bytes\n * disagree with `parameters.format`.\n */\nexport function buildPublishRequest(\n\tparameters: PublishParameters,\n\tversionType: VersionType,\n): Result<HttpRequest, ValidationError> {\n\tconst { body, format, placeId, universeId } = parameters;\n\n\tif (body.length === 0) {\n\t\treturn {\n\t\t\terr: new ValidationError(\"Place body is empty\", { code: \"empty_body\" }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\tconst expectedSignature = format === \"rbxl\" ? RBXL_SIGNATURE : RBXLX_SIGNATURE;\n\tif (!matchesSignature(body, expectedSignature)) {\n\t\treturn {\n\t\t\terr: new ValidationError(`Place body does not match the declared \"${format}\" format`, {\n\t\t\t\tcode: \"format_mismatch\",\n\t\t\t}),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: {\n\t\t\tbody,\n\t\t\theaders: { \"content-type\": CONTENT_TYPE_BY_FORMAT[format] },\n\t\t\tmethod: \"POST\",\n\t\t\turl: `/universes/v1/${universeId}/places/${placeId}/versions?versionType=${versionType}`,\n\t\t},\n\t\tsuccess: true,\n\t};\n}\n","import type { OperationLimit } from \"../../../internal/http/rate-limit-queue.ts\";\n\n/**\n * Per-second request ceiling for publishing or saving a place version,\n * from the Open Cloud OpenAPI schema (30 requests per minute, expressed\n * here as `0.5` per second). The publish and save methods both reference\n * this constant so that a single per-API-key queue serves both, matching\n * Roblox's server-side accounting which counts both call types against\n * the same per-minute quota.\n */\nexport const PUBLISH_OPERATION_LIMIT: OperationLimit = Object.freeze({\n\tmaxPerSecond: 0.5,\n\toperationKey: \"places.publishVersion\",\n});\n\n/**\n * Scopes required to publish or save a place version, sourced from\n * `x-roblox-scopes` on the `Places_CreatePlaceVersionApiKey` operation\n * in the vendored OpenAPI schema.\n */\nexport const PUBLISH_REQUIRED_SCOPES: ReadonlyArray<string> = Object.freeze([\n\t\"universe-places:write\",\n]);\n","import type { HttpResponse } from \"../../../client/types.ts\";\nimport { ApiError } from \"../../../errors/api-error.ts\";\nimport { isRecord } from \"../../../internal/utils/is-record.ts\";\nimport type { Result } from \"../../../types.ts\";\nimport type { PlaceVersion } from \"./types.ts\";\nimport type { PlaceVersionWire } from \"./wire.ts\";\n\n/**\n * Parses a successful publish-version response into the public\n * {@link PlaceVersion} shape. The Roblox endpoint sometimes returns the\n * JSON-shaped body under a `text/plain` `Content-Type`, so the body may\n * arrive either pre-decoded as a JSON object or still in its raw string\n * form; both are accepted here.\n *\n * @param response - The full {@link HttpResponse} from the Open Cloud API.\n * @returns A success result wrapping the parsed {@link PlaceVersion}, or\n * an {@link ApiError} when the body is malformed or its `versionNumber`\n * field is missing/wrong-typed.\n */\nexport function parsePublishResponse(response: HttpResponse): Result<PlaceVersion, ApiError> {\n\tconst { body, status: statusCode } = response;\n\n\tconst decodeResult = decodeBody(body, statusCode);\n\tif (!decodeResult.success) {\n\t\treturn decodeResult;\n\t}\n\n\tif (!isPlaceVersionWire(decodeResult.data)) {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed publish response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tdata: { versionNumber: decodeResult.data.versionNumber },\n\t\tsuccess: true,\n\t};\n}\n\nfunction decodeBody(body: unknown, statusCode: number): Result<unknown, ApiError> {\n\tif (typeof body !== \"string\") {\n\t\treturn { data: body, success: true };\n\t}\n\n\ttry {\n\t\treturn { data: JSON.parse(body), success: true };\n\t} catch {\n\t\treturn {\n\t\t\terr: new ApiError(\"Malformed publish response\", { statusCode }),\n\t\t\tsuccess: false,\n\t\t};\n\t}\n}\n\nfunction isPlaceVersionWire(value: unknown): value is PlaceVersionWire {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\treturn typeof value[\"versionNumber\"] === \"number\";\n}\n","import type { OpenCloudClientOptions, RequestOptions } from \"../../client/types.ts\";\nimport {\n\tGET_SPEC,\n\tSUBMIT_HEAD_SPEC,\n\tSUBMIT_VERSION_SPEC,\n} from \"../../domains/cloud-v2/luau-execution-tasks/specs.ts\";\nimport type {\n\tGetParameters,\n\tLuauExecutionTask,\n\tSubmitAtHeadParameters,\n\tSubmitAtVersionParameters,\n} from \"../../domains/cloud-v2/luau-execution-tasks/types.ts\";\nimport { buildUpdateRequest } from \"../../domains/cloud-v2/places/builders.ts\";\nimport {\n\tUPDATE_OPERATION_LIMIT,\n\tUPDATE_REQUIRED_SCOPES,\n} from \"../../domains/cloud-v2/places/operations.ts\";\nimport { parsePlaceResponse } from \"../../domains/cloud-v2/places/parsers.ts\";\nimport type { Place, UpdatePlaceParameters } from \"../../domains/cloud-v2/places/types.ts\";\nimport { buildPublishRequest } from \"../../domains/universes/places/builders.ts\";\nimport {\n\tPUBLISH_OPERATION_LIMIT,\n\tPUBLISH_REQUIRED_SCOPES,\n} from \"../../domains/universes/places/operations.ts\";\nimport { parsePublishResponse } from \"../../domains/universes/places/parsers.ts\";\nimport type { PlaceVersion, PublishParameters } from \"../../domains/universes/places/types.ts\";\nimport type { OpenCloudError } from \"../../errors/base.ts\";\nimport { CREATE_METHOD_DEFAULTS } from \"../../internal/http/retry.ts\";\nimport { ResourceClient, type ResourceMethodSpec } from \"../../internal/resource-client.ts\";\nimport type { Result } from \"../../types.ts\";\n\n/**\n * Operation Group exposed by {@link PlacesClient} as the\n * `luauExecution` namespace. Provides `submit` to queue a Luau script\n * and `get` to fetch a task's current state. Shares the same\n * dispatch wiring as the top-level `LuauExecutionClient` exposed at\n * `@bedrock-rbx/ocale/luau-execution`.\n */\nexport interface LuauExecutionHandle {\n\t/**\n\t * Fetches the current state of a previously-submitted Luau\n\t * execution task. Uses idempotent retry semantics for both 429 and\n\t * 5xx.\n\t *\n\t * @param parameters - The task ref plus an optional `view` selector.\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\n\t * {@link LuauExecutionTask} or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tget(\n\t\tparameters: GetParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n\t/**\n\t * Submits a Luau script for execution against a place. Dispatches\n\t * to the head-version URL when `versionId` is omitted, or to the\n\t * specific-version URL when one is supplied. Both URL shapes share\n\t * one rate-limit queue and one required-scope set.\n\t *\n\t * @param parameters - The universe and place identifiers, the\n\t * script to run, an optional `versionId`, and any other writable\n\t * submit fields.\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\n\t * {@link LuauExecutionTask} or the {@link OpenCloudError} that\n\t * caused the request to fail.\n\t */\n\tsubmit(\n\t\tparameters: SubmitAtHeadParameters | SubmitAtVersionParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<LuauExecutionTask, OpenCloudError>>;\n}\n\nfunction makePublishSpec(\n\tversionType: \"Published\" | \"Saved\",\n): ResourceMethodSpec<PublishParameters, PlaceVersion> {\n\treturn Object.freeze({\n\t\tbuildRequest: (parameters: PublishParameters) =>\n\t\t\tbuildPublishRequest(parameters, versionType),\n\t\tmethodDefaults: CREATE_METHOD_DEFAULTS,\n\t\tmethodKind: \"create\",\n\t\toperationLimit: PUBLISH_OPERATION_LIMIT,\n\t\tparse: parsePublishResponse,\n\t\trequiredScopes: PUBLISH_REQUIRED_SCOPES,\n\t});\n}\n\nconst PUBLISH_SPEC = makePublishSpec(\"Published\");\nconst SAVE_SPEC = makePublishSpec(\"Saved\");\n\nconst UPDATE_SPEC: ResourceMethodSpec<UpdatePlaceParameters, Place> = Object.freeze({\n\tbuildRequest: buildUpdateRequest,\n\tmethodDefaults: {},\n\tmethodKind: \"idempotent\",\n\toperationLimit: UPDATE_OPERATION_LIMIT,\n\tparse: parsePlaceResponse,\n\trequiredScopes: UPDATE_REQUIRED_SCOPES,\n});\n\n/**\n * Public client for the Roblox Open Cloud `Place` resource. Covers\n * place-version publishing (`publish`, `save`), place-configuration\n * updates (`update`), and the Luau execution Operation Group\n * (`luauExecution.submit`, `luauExecution.get`). Every method returns\n * a {@link Result} so callers handle failure explicitly; no thrown\n * {@link OpenCloudError} ever escapes the client.\n *\n * Publishing or saving a 5xx-failed place version is not retried\n * automatically: Roblox does not support idempotency keys, so a retry\n * could publish a duplicate version unnoticed. Callers that *can* detect\n * duplicates externally may opt back into 5xx retry per-call by passing\n * `retryableStatuses` on the second argument. The `update` method, by\n * contrast, is idempotent and retries both 429 and 5xx automatically.\n *\n * @example\n *\n * ```ts\n * import { PlacesClient } from \"@bedrock-rbx/ocale/places\";\n *\n * const client = new PlacesClient({ apiKey: \"your-key\" });\n * expect(client).toBeInstanceOf(PlacesClient);\n * ```\n */\nexport class PlacesClient {\n\treadonly #inner: ResourceClient;\n\n\tpublic readonly luauExecution: LuauExecutionHandle;\n\n\t/**\n\t * Creates a new {@link PlacesClient}. Configuration is frozen on\n\t * 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.luauExecution = createLuauExecutionHandle(this.#inner);\n\t}\n\n\t/**\n\t * Publishes a new live version of a place.\n\t *\n\t * @param parameters - Universe and place identifiers, the place file\n\t * bytes, and their declared `format`.\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 PlaceVersion}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async publish(\n\t\tparameters: PublishParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<PlaceVersion, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: PUBLISH_SPEC });\n\t}\n\n\t/**\n\t * Saves a new draft version of a place. Identical to {@link publish}\n\t * except the resulting version is not made live; consumers can list or\n\t * promote it later. Shares a single per-API-key rate-limit queue with\n\t * `publish` because Roblox attributes both calls to the same per-minute\n\t * quota.\n\t *\n\t * @param parameters - Universe and place identifiers, the place file\n\t * bytes, and their declared `format`.\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 PlaceVersion}\n\t * or the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async save(\n\t\tparameters: PublishParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<PlaceVersion, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: SAVE_SPEC });\n\t}\n\n\t/**\n\t * Partially updates a place's configuration. The fields supplied on\n\t * `parameters` (excluding the identifiers) are forwarded to the\n\t * server via a Google-style `updateMask`; unmentioned fields are\n\t * left untouched. The universe's root place is the canonical place\n\t * to update when changing a universe's description or display name:\n\t * both are derived server-side from the root place.\n\t *\n\t * @param parameters - The universe and place identifiers and the\n\t * fields to update. At least one writable field must be supplied.\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 Place} or\n\t * the {@link OpenCloudError} that caused the request to fail.\n\t */\n\tpublic async update(\n\t\tparameters: UpdatePlaceParameters,\n\t\toptions?: RequestOptions,\n\t): Promise<Result<Place, OpenCloudError>> {\n\t\treturn this.#inner.execute({ options, parameters, spec: UPDATE_SPEC });\n\t}\n}\n\nfunction createLuauExecutionHandle(inner: ResourceClient): LuauExecutionHandle {\n\treturn {\n\t\tasync get(parameters, options) {\n\t\t\treturn inner.execute({ options, parameters, spec: GET_SPEC });\n\t\t},\n\t\tasync submit(parameters, options) {\n\t\t\tif (\"versionId\" in parameters) {\n\t\t\t\treturn inner.execute({ options, parameters, spec: SUBMIT_VERSION_SPEC });\n\t\t\t}\n\n\t\t\treturn inner.execute({ options, parameters, spec: SUBMIT_HEAD_SPEC });\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;AAKA,MAAM,qBAA0C,IAAI,IAAI,CAAC,WAAW,aAAa,CAAC;;;;;;;;;;;;AAalF,SAAgB,mBACf,YACuC;CACvC,MAAM,YAAY,uBAAuB,WAAW;AAEpD,KAAI,UAAU,WAAW,EACxB,QAAO;EACN,KAAK,IAAI,gBAAgB,0CAA0C,EAClE,MAAM,gBACN,CAAC;EACF,SAAS;EACT;CAGF,MAAM,OAAO,OAAO,YACnB,UAAU,KAAK,QAAoC,CAAC,KAAK,QAAQ,IAAI,YAAY,IAAI,CAAC,CAAC,CACvF;CACD,MAAM,aAAa,UAAU,KAAK,IAAI;CACtC,MAAM,EAAE,SAAS,eAAe;AAChC,QAAO;EACN,MAAM;GACL;GACA,SAAS,EAAE,gBAAgB,oBAAoB;GAC/C,QAAQ;GACR,KAAK,uBAAuB,WAAW,UAAU,QAAQ,cAAc;GACvE;EACD,SAAS;EACT;;AAGF,SAAS,uBAAuB,YAA0D;AACzF,QAAO,OAAO,KAAK,WAAW,CAAC,QAAQ,QAAQ,CAAC,mBAAmB,IAAI,IAAI,CAAC;;;;;;;;;;ACpC7E,MAAa,yBAAyC,OAAO,OAAO;CACnE,cAZyB,MACC;CAY1B,cAAc;CACd,CAAC;;;;;;AAOF,MAAa,yBAAgD,OAAO,OAAO,CAC1E,uBACA,CAAC;;;ACjBF,MAAM,0BAA0B;;;;;;;;;AAgBhC,SAAgB,mBAAmB,UAAiD;CACnF,MAAM,EAAE,MAAM,QAAQ,eAAe;AAErC,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,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAW,CAAC;;;;;;;;;;;;;;;;;CAkBrE,MAAa,OACZ,YACA,SACyC;AACzC,SAAO,MAAA,MAAY,QAAQ;GAAE;GAAS;GAAY,MAAM;GAAa,CAAC;;;AAIxE,SAAS,0BAA0B,OAA4C;AAC9E,QAAO;EACN,MAAM,IAAI,YAAY,SAAS;AAC9B,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAU,CAAC;;EAE9D,MAAM,OAAO,YAAY,SAAS;AACjC,OAAI,eAAe,WAClB,QAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAqB,CAAC;AAGzE,UAAO,MAAM,QAAQ;IAAE;IAAS;IAAY,MAAM;IAAkB,CAAC;;EAEtE"}
@@ -1,4 +1,4 @@
1
- import { o as isRecord } from "./resource-client-CaS_j3yg.mjs";
1
+ import { o as isRecord } from "./resource-client-Wi4Mwqy5.mjs";
2
2
  //#region src/internal/price-information.ts
3
3
  /**
4
4
  * Narrows `value` to {@link PriceInformationLike} for a given feature literal
@@ -39,4 +39,4 @@ function copyPriceInformation(wire) {
39
39
  //#endregion
40
40
  export { isPriceInformationLike as n, copyPriceInformation as t };
41
41
 
42
- //# sourceMappingURL=price-information-CmpscMc4.mjs.map
42
+ //# sourceMappingURL=price-information-s7DY0GV2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"price-information-CmpscMc4.mjs","names":[],"sources":["../src/internal/price-information.ts"],"sourcesContent":["import { isRecord } from \"./utils/is-record.ts\";\n\n/**\n * Wire shape shared by every Roblox commerce resource that carries a\n * `priceInformation` block (game passes, developer products, ...). Resources\n * vary in the literal set their `enabledFeatures` may contain, so the feature\n * type is left as a parameter `F`.\n *\n * @template F - The string-literal union for this resource's pricing-feature flags.\n */\nexport interface PriceInformationLike<F extends string> {\n\t/** Default Robux price; `undefined` when the schema returns null. */\n\treadonly defaultPriceInRobux: number | undefined;\n\t/** Enabled pricing feature flags, in the order returned by the API. */\n\treadonly enabledFeatures: ReadonlyArray<F>;\n}\n\n/**\n * Narrows `value` to {@link PriceInformationLike} for a given feature literal\n * union by delegating per-element validation to the supplied `isFeature`\n * predicate.\n *\n * @template F - The pricing-feature literal union the caller wants to narrow to.\n * @param value - Unknown wire value to validate.\n * @param isFeature - Type guard for a single `enabledFeatures` element.\n * @returns `true` when `value` is a record whose `defaultPriceInRobux` is a\n * number, `null`, or absent and whose `enabledFeatures` is an array of\n * values that all satisfy `isFeature`.\n */\nexport function isPriceInformationLike<F extends string>(\n\tvalue: unknown,\n\tisFeature: (candidate: unknown) => candidate is F,\n): value is PriceInformationLike<F> {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tconst defaultPrice = value[\"defaultPriceInRobux\"] ?? undefined;\n\tif (defaultPrice !== undefined && typeof defaultPrice !== \"number\") {\n\t\treturn false;\n\t}\n\n\tconst features = value[\"enabledFeatures\"];\n\tif (!Array.isArray(features)) {\n\t\treturn false;\n\t}\n\n\tfor (const feature of features) {\n\t\tif (!isFeature(feature)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns a fresh {@link PriceInformationLike} value with a new\n * `enabledFeatures` array, so the caller can hand the result on without\n * exposing the wire object's internal storage.\n *\n * @template F - The pricing-feature literal union of the input.\n * @param wire - Already-validated wire shape.\n * @returns A new record with the same defaults and a copied feature array.\n */\nexport function copyPriceInformation<F extends string>(\n\twire: PriceInformationLike<F>,\n): PriceInformationLike<F> {\n\treturn {\n\t\tdefaultPriceInRobux: wire.defaultPriceInRobux ?? undefined,\n\t\tenabledFeatures: [...wire.enabledFeatures],\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;AA6BA,SAAgB,uBACf,OACA,WACmC;AACnC,KAAI,CAAC,SAAS,MAAM,CACnB,QAAO;CAGR,MAAM,eAAe,MAAM,0BAA0B,KAAA;AACrD,KAAI,iBAAiB,KAAA,KAAa,OAAO,iBAAiB,SACzD,QAAO;CAGR,MAAM,WAAW,MAAM;AACvB,KAAI,CAAC,MAAM,QAAQ,SAAS,CAC3B,QAAO;AAGR,MAAK,MAAM,WAAW,SACrB,KAAI,CAAC,UAAU,QAAQ,CACtB,QAAO;AAIT,QAAO;;;;;;;;;;;AAYR,SAAgB,qBACf,MAC0B;AAC1B,QAAO;EACN,qBAAqB,KAAK,uBAAuB,KAAA;EACjD,iBAAiB,CAAC,GAAG,KAAK,gBAAgB;EAC1C"}
1
+ {"version":3,"file":"price-information-s7DY0GV2.mjs","names":[],"sources":["../src/internal/price-information.ts"],"sourcesContent":["import { isRecord } from \"./utils/is-record.ts\";\n\n/**\n * Wire shape shared by every Roblox commerce resource that carries a\n * `priceInformation` block (game passes, developer products, ...). Resources\n * vary in the literal set their `enabledFeatures` may contain, so the feature\n * type is left as a parameter `F`.\n *\n * @template F - The string-literal union for this resource's pricing-feature flags.\n */\nexport interface PriceInformationLike<F extends string> {\n\t/** Default Robux price; `undefined` when the schema returns null. */\n\treadonly defaultPriceInRobux: number | undefined;\n\t/** Enabled pricing feature flags, in the order returned by the API. */\n\treadonly enabledFeatures: ReadonlyArray<F>;\n}\n\n/**\n * Narrows `value` to {@link PriceInformationLike} for a given feature literal\n * union by delegating per-element validation to the supplied `isFeature`\n * predicate.\n *\n * @template F - The pricing-feature literal union the caller wants to narrow to.\n * @param value - Unknown wire value to validate.\n * @param isFeature - Type guard for a single `enabledFeatures` element.\n * @returns `true` when `value` is a record whose `defaultPriceInRobux` is a\n * number, `null`, or absent and whose `enabledFeatures` is an array of\n * values that all satisfy `isFeature`.\n */\nexport function isPriceInformationLike<F extends string>(\n\tvalue: unknown,\n\tisFeature: (candidate: unknown) => candidate is F,\n): value is PriceInformationLike<F> {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tconst defaultPrice = value[\"defaultPriceInRobux\"] ?? undefined;\n\tif (defaultPrice !== undefined && typeof defaultPrice !== \"number\") {\n\t\treturn false;\n\t}\n\n\tconst features = value[\"enabledFeatures\"];\n\tif (!Array.isArray(features)) {\n\t\treturn false;\n\t}\n\n\tfor (const feature of features) {\n\t\tif (!isFeature(feature)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns a fresh {@link PriceInformationLike} value with a new\n * `enabledFeatures` array, so the caller can hand the result on without\n * exposing the wire object's internal storage.\n *\n * @template F - The pricing-feature literal union of the input.\n * @param wire - Already-validated wire shape.\n * @returns A new record with the same defaults and a copied feature array.\n */\nexport function copyPriceInformation<F extends string>(\n\twire: PriceInformationLike<F>,\n): PriceInformationLike<F> {\n\treturn {\n\t\tdefaultPriceInRobux: wire.defaultPriceInRobux ?? undefined,\n\t\tenabledFeatures: [...wire.enabledFeatures],\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;AA6BA,SAAgB,uBACf,OACA,WACmC;AACnC,KAAI,CAAC,SAAS,MAAM,CACnB,QAAO;CAGR,MAAM,eAAe,MAAM,0BAA0B,KAAA;AACrD,KAAI,iBAAiB,KAAA,KAAa,OAAO,iBAAiB,SACzD,QAAO;CAGR,MAAM,WAAW,MAAM;AACvB,KAAI,CAAC,MAAM,QAAQ,SAAS,CAC3B,QAAO;AAGR,MAAK,MAAM,WAAW,SACrB,KAAI,CAAC,UAAU,QAAQ,CACtB,QAAO;AAIT,QAAO;;;;;;;;;;;AAYR,SAAgB,qBACf,MAC0B;AAC1B,QAAO;EACN,qBAAqB,KAAK,uBAAuB,KAAA;EACjD,iBAAiB,CAAC,GAAG,KAAK,gBAAgB;EAC1C"}
@@ -19,30 +19,38 @@ var OpenCloudError = class extends Error {
19
19
  * ```ts
20
20
  * import { ApiError } from "@bedrock-rbx/ocale";
21
21
  *
22
- * const error = new ApiError("Game pass not found", {
22
+ * const error = new ApiError("HTTP 404: Pass not found (code NotFound)", {
23
23
  * code: "NotFound",
24
+ * details: { errorCode: "NotFound", message: "Pass not found" },
24
25
  * statusCode: 404,
25
26
  * });
26
27
  *
27
28
  * expect(error).toBeInstanceOf(ApiError);
28
29
  * expect(error.statusCode).toBe(404);
29
30
  * expect(error.code).toBe("NotFound");
31
+ * expect(error.details).toEqual({
32
+ * errorCode: "NotFound",
33
+ * message: "Pass not found",
34
+ * });
30
35
  * ```
31
36
  */
32
37
  var ApiError = class extends OpenCloudError {
33
38
  code;
39
+ details;
34
40
  name = "ApiError";
35
41
  statusCode;
36
42
  /**
37
43
  * Creates a new ApiError.
38
44
  *
39
45
  * @param message - Human-readable error description.
40
- * @param options - Error options including status code and optional error code.
46
+ * @param options - Error options including status code, optional error
47
+ * code, and the parsed response body when present.
41
48
  */
42
49
  constructor(message, options) {
43
50
  super(message, options);
44
51
  this.statusCode = options.statusCode;
45
52
  this.code = options.code;
53
+ this.details = options.details;
46
54
  }
47
55
  };
48
56
  //#endregion
@@ -132,4 +140,4 @@ var RateLimitError = class extends OpenCloudError {
132
140
  //#endregion
133
141
  export { OpenCloudError as a, ApiError as i, PermissionError as n, NetworkError as r, RateLimitError as t };
134
142
 
135
- //# sourceMappingURL=rate-limit-BBU_4xnZ.mjs.map
143
+ //# sourceMappingURL=rate-limit-CKfuhxT1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rate-limit-CKfuhxT1.mjs","names":[],"sources":["../src/errors/base.ts","../src/errors/api-error.ts","../src/errors/network-error.ts","../src/errors/permission-error.ts","../src/errors/rate-limit.ts"],"sourcesContent":["/**\n * Base error class for all Open Cloud SDK errors.\n *\n * All specific error types (RateLimitError, ApiError, NetworkError)\n * extend this class, enabling `instanceof OpenCloudError` checks.\n */\nexport class OpenCloudError extends Error {\n\tpublic override readonly name: string = \"OpenCloudError\";\n}\n","import { OpenCloudError } from \"./base.ts\";\n\n/**\n * Options for constructing an {@link ApiError}.\n */\nexport interface ApiErrorOptions extends ErrorOptions {\n\t/** Optional machine-readable error code from the API. */\n\tcode?: string | undefined;\n\t/** Parsed response body, when present. */\n\tdetails?: JSONValue | undefined;\n\t/** HTTP status code from the API response. */\n\tstatusCode: number;\n}\n\n/**\n * Thrown when the Roblox Open Cloud API returns a non-2xx response\n * that is not a rate limit (429).\n *\n * @example\n *\n * ```ts\n * import { ApiError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new ApiError(\"HTTP 404: Pass not found (code NotFound)\", {\n * code: \"NotFound\",\n * details: { errorCode: \"NotFound\", message: \"Pass not found\" },\n * statusCode: 404,\n * });\n *\n * expect(error).toBeInstanceOf(ApiError);\n * expect(error.statusCode).toBe(404);\n * expect(error.code).toBe(\"NotFound\");\n * expect(error.details).toEqual({\n * errorCode: \"NotFound\",\n * message: \"Pass not found\",\n * });\n * ```\n */\nexport class ApiError extends OpenCloudError {\n\tpublic readonly code: string | undefined;\n\tpublic readonly details: JSONValue | undefined;\n\tpublic override readonly name: string = \"ApiError\";\n\tpublic readonly statusCode: number;\n\n\t/**\n\t * Creates a new ApiError.\n\t *\n\t * @param message - Human-readable error description.\n\t * @param options - Error options including status code, optional error\n\t * code, and the parsed response body when present.\n\t */\n\tconstructor(message: string, options: ApiErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.statusCode = options.statusCode;\n\t\tthis.code = options.code;\n\t\tthis.details = options.details;\n\t}\n}\n","import { OpenCloudError } from \"./base.ts\";\n\n/**\n * Thrown when a network-level failure prevents the request from reaching\n * the Roblox Open Cloud API (e.g., DNS resolution failure, connection timeout).\n */\nexport class NetworkError extends OpenCloudError {\n\tpublic override readonly name: string = \"NetworkError\";\n}\n","import { ApiError, type ApiErrorOptions } from \"./api-error.ts\";\n\n/**\n * Options for constructing a {@link PermissionError}.\n */\nexport interface PermissionErrorOptions extends ApiErrorOptions {\n\t/**\n\t * Stable identifier of the Open Cloud operation that returned the\n\t * permission failure (matches `OperationLimit.operationKey`, e.g.\n\t * `\"developer-products.create\"`).\n\t */\n\toperationKey: string;\n\t/**\n\t * Scope strings the API key or OAuth token must carry for the failing\n\t * operation, sourced from the vendored OpenAPI schema's `x-roblox-scopes`\n\t * for that operationId.\n\t */\n\trequiredScopes: ReadonlyArray<string>;\n}\n\n/**\n * Thrown when the Roblox Open Cloud API returns a 401 or 403 for an operation\n * whose required scopes are known. Subclass of {@link ApiError} carrying the\n * scope strings the caller's credential is missing plus the operation key, so\n * a CLI consumer can tell the user exactly which scope to grant on their API\n * key.\n *\n * @example\n *\n * ```ts\n * import { PermissionError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new PermissionError(\"HTTP 403\", {\n * operationKey: \"developer-products.create\",\n * requiredScopes: [\"creator-store-product:write\"],\n * statusCode: 403,\n * });\n *\n * expect(error).toBeInstanceOf(PermissionError);\n * expect(error.requiredScopes).toStrictEqual([\"creator-store-product:write\"]);\n * expect(error.operationKey).toBe(\"developer-products.create\");\n * ```\n */\nexport class PermissionError extends ApiError {\n\tpublic override readonly name: string = \"PermissionError\";\n\tpublic readonly operationKey: string;\n\tpublic readonly requiredScopes: ReadonlyArray<string>;\n\n\t/**\n\t * Creates a new PermissionError.\n\t *\n\t * @param message - Human-readable error description.\n\t * @param options - Error options including status code, the operation key,\n\t * and the scopes the caller's credential must carry.\n\t */\n\tconstructor(message: string, options: PermissionErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.operationKey = options.operationKey;\n\t\tthis.requiredScopes = options.requiredScopes;\n\t}\n}\n","import { OpenCloudError } from \"./base.ts\";\n\n/**\n * Options for constructing a {@link RateLimitError}.\n */\nexport interface RateLimitErrorOptions extends ErrorOptions {\n\t/** Seconds to wait before retrying the request. */\n\tretryAfterSeconds: number;\n}\n\n/**\n * Thrown when the Roblox Open Cloud API returns a 429 Too Many Requests response.\n * Contains the server-suggested retry delay.\n *\n * @example\n *\n * ```ts\n * import { RateLimitError } from \"@bedrock-rbx/ocale\";\n *\n * const error = new RateLimitError(\"Too many requests\", {\n * retryAfterSeconds: 30,\n * });\n *\n * expect(error).toBeInstanceOf(RateLimitError);\n * expect(error.retryAfterSeconds).toBe(30);\n * ```\n */\nexport class RateLimitError extends OpenCloudError {\n\tpublic override readonly name = \"RateLimitError\";\n\tpublic readonly retryAfterSeconds: number;\n\n\t/**\n\t * Creates a new RateLimitError.\n\t *\n\t * @param message - Human-readable error description.\n\t * @param options - Error options including the retry delay.\n\t */\n\tconstructor(message: string, options: RateLimitErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.retryAfterSeconds = options.retryAfterSeconds;\n\t}\n}\n"],"mappings":";;;;;;;AAMA,IAAa,iBAAb,cAAoC,MAAM;CACzC,OAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC+BzC,IAAa,WAAb,cAA8B,eAAe;CAC5C;CACA;CACA,OAAwC;CACxC;;;;;;;;CASA,YAAY,SAAiB,SAA0B;AACtD,QAAM,SAAS,QAAQ;AACvB,OAAK,aAAa,QAAQ;AAC1B,OAAK,OAAO,QAAQ;AACpB,OAAK,UAAU,QAAQ;;;;;;;;;ACjDzB,IAAa,eAAb,cAAkC,eAAe;CAChD,OAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;ACoCzC,IAAa,kBAAb,cAAqC,SAAS;CAC7C,OAAwC;CACxC;CACA;;;;;;;;CASA,YAAY,SAAiB,SAAiC;AAC7D,QAAM,SAAS,QAAQ;AACvB,OAAK,eAAe,QAAQ;AAC5B,OAAK,iBAAiB,QAAQ;;;;;;;;;;;;;;;;;;;;;;AC/BhC,IAAa,iBAAb,cAAoC,eAAe;CAClD,OAAgC;CAChC;;;;;;;CAQA,YAAY,SAAiB,SAAgC;AAC5D,QAAM,SAAS,QAAQ;AACvB,OAAK,oBAAoB,QAAQ"}