@rivetkit/engine-api-full 25.7.2-rc.1 → 25.7.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 (100) hide show
  1. package/dist/browser/cjs/core.js +41 -0
  2. package/dist/browser/cjs/index.js +180 -573
  3. package/dist/browser/cjs/serialization.js +86 -107
  4. package/dist/browser/esm/core.js +41 -0
  5. package/dist/browser/esm/index.js +180 -573
  6. package/dist/browser/esm/serialization.js +86 -107
  7. package/dist/node/core.js +43 -0
  8. package/dist/node/index.js +180 -573
  9. package/dist/node/serialization.js +97 -123
  10. package/package.json +1 -1
  11. package/types/Client.d.ts +6 -77
  12. package/types/api/client/requests/index.d.ts +0 -3
  13. package/types/api/index.d.ts +1 -1
  14. package/types/api/resources/datacenters/client/Client.d.ts +2 -0
  15. package/types/api/resources/index.d.ts +3 -2
  16. package/types/api/resources/namespaces/client/Client.d.ts +3 -9
  17. package/types/api/resources/namespaces/client/requests/NamespacesListRequest.d.ts +1 -2
  18. package/types/api/resources/runnerConfigs/client/Client.d.ts +72 -0
  19. package/types/api/resources/runnerConfigs/client/requests/RunnerConfigsDeleteRequest.d.ts +12 -0
  20. package/types/api/resources/runnerConfigs/client/requests/RunnerConfigsListRequest.d.ts +17 -0
  21. package/types/api/resources/runnerConfigs/client/requests/RunnerConfigsUpsertRequest.d.ts +25 -0
  22. package/types/api/resources/runnerConfigs/client/requests/index.d.ts +3 -0
  23. package/types/api/resources/{namespacesRunnerConfigs → runnerConfigs}/index.d.ts +1 -0
  24. package/types/api/resources/runnerConfigs/types/RunnerConfigsUpsertRequestServerless.d.ts +13 -0
  25. package/types/api/resources/runnerConfigs/types/index.d.ts +1 -0
  26. package/types/api/resources/runners/client/Client.d.ts +2 -9
  27. package/types/api/resources/runners/client/requests/RunnersListRequest.d.ts +1 -0
  28. package/types/api/resources/runners/client/requests/index.d.ts +0 -1
  29. package/types/api/types/{NamespacesListResponse.d.ts → NamespaceListResponse.d.ts} +1 -1
  30. package/types/api/types/{ActorsGetByIdResponse.d.ts → RunnerConfig.d.ts} +2 -2
  31. package/types/api/types/{NamespacesRunnerConfigServerless.d.ts → RunnerConfigServerless.d.ts} +2 -1
  32. package/types/api/types/{NamespacesRunnerConfigVariant.d.ts → RunnerConfigVariant.d.ts} +1 -1
  33. package/types/api/types/RunnerConfigsDeleteResponse.d.ts +4 -0
  34. package/types/api/types/{NamespacesRunnerConfigsListResponse.d.ts → RunnerConfigsListResponse.d.ts} +2 -2
  35. package/types/api/types/RunnerConfigsUpsertResponse.d.ts +4 -0
  36. package/types/api/types/index.d.ts +7 -14
  37. package/types/core/auth/BasicAuth.d.ts +8 -0
  38. package/types/core/auth/BearerToken.d.ts +5 -0
  39. package/types/core/auth/index.d.ts +2 -0
  40. package/types/core/index.d.ts +1 -0
  41. package/types/serialization/client/requests/index.d.ts +0 -1
  42. package/types/serialization/index.d.ts +1 -1
  43. package/types/serialization/resources/index.d.ts +3 -0
  44. package/types/serialization/resources/runnerConfigs/client/index.d.ts +1 -0
  45. package/types/serialization/resources/runnerConfigs/client/requests/RunnerConfigsUpsertRequest.d.ts +13 -0
  46. package/types/serialization/resources/runnerConfigs/client/requests/index.d.ts +1 -0
  47. package/types/serialization/resources/runnerConfigs/index.d.ts +2 -0
  48. package/types/serialization/resources/runnerConfigs/types/RunnerConfigsUpsertRequestServerless.d.ts +18 -0
  49. package/types/serialization/resources/runnerConfigs/types/index.d.ts +1 -0
  50. package/types/serialization/types/{NamespacesListResponse.d.ts → NamespaceListResponse.d.ts} +2 -2
  51. package/types/serialization/types/RunnerConfig.d.ts +13 -0
  52. package/types/serialization/types/{NamespacesRunnerConfigServerless.d.ts → RunnerConfigServerless.d.ts} +3 -2
  53. package/types/serialization/types/{NamespacesRunnerConfigVariant.d.ts → RunnerConfigVariant.d.ts} +2 -2
  54. package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +10 -0
  55. package/types/serialization/types/RunnerConfigsListResponse.d.ts +15 -0
  56. package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +10 -0
  57. package/types/serialization/types/index.d.ts +7 -14
  58. package/types/api/client/requests/ActorsGetByIdRequest.d.ts +0 -16
  59. package/types/api/client/requests/ActorsGetOrCreateByIdRequest.d.ts +0 -23
  60. package/types/api/client/requests/ActorsGetRequest.d.ts +0 -10
  61. package/types/api/resources/namespacesRunnerConfigs/client/Client.d.ts +0 -73
  62. package/types/api/resources/namespacesRunnerConfigs/client/requests/NamespacesRunnerConfigsListRequest.d.ts +0 -13
  63. package/types/api/resources/namespacesRunnerConfigs/client/requests/index.d.ts +0 -1
  64. package/types/api/resources/runners/client/requests/RunnersGetRequest.d.ts +0 -10
  65. package/types/api/types/ActorLifecycle.d.ts +0 -7
  66. package/types/api/types/ActorsGetOrCreateByIdResponse.d.ts +0 -8
  67. package/types/api/types/ActorsGetResponse.d.ts +0 -7
  68. package/types/api/types/NamespacesGetResponse.d.ts +0 -7
  69. package/types/api/types/NamespacesRunnerConfig.d.ts +0 -7
  70. package/types/api/types/NamespacesRunnerConfigsDeleteResponse.d.ts +0 -4
  71. package/types/api/types/NamespacesRunnerConfigsGetResponse.d.ts +0 -7
  72. package/types/api/types/NamespacesRunnerConfigsUpsertRequest.d.ts +0 -5
  73. package/types/api/types/NamespacesRunnerConfigsUpsertResponse.d.ts +0 -4
  74. package/types/api/types/RunnersGetResponse.d.ts +0 -7
  75. package/types/api/types/StringHttpAddressHashableMap.d.ts +0 -5
  76. package/types/api/types/StringHttpAddressHashableMapValue.d.ts +0 -7
  77. package/types/api/types/StringTcpAddressHashableMap.d.ts +0 -5
  78. package/types/api/types/StringTcpAddressHashableMapValue.d.ts +0 -7
  79. package/types/api/types/StringUdpAddressHashableMap.d.ts +0 -5
  80. package/types/api/types/StringUdpAddressHashableMapValue.d.ts +0 -7
  81. package/types/serialization/client/requests/ActorsGetOrCreateByIdRequest.d.ts +0 -17
  82. package/types/serialization/types/ActorLifecycle.d.ts +0 -13
  83. package/types/serialization/types/ActorsGetByIdResponse.d.ts +0 -13
  84. package/types/serialization/types/ActorsGetOrCreateByIdResponse.d.ts +0 -14
  85. package/types/serialization/types/ActorsGetResponse.d.ts +0 -13
  86. package/types/serialization/types/NamespacesGetResponse.d.ts +0 -13
  87. package/types/serialization/types/NamespacesRunnerConfig.d.ts +0 -13
  88. package/types/serialization/types/NamespacesRunnerConfigsDeleteResponse.d.ts +0 -10
  89. package/types/serialization/types/NamespacesRunnerConfigsGetResponse.d.ts +0 -13
  90. package/types/serialization/types/NamespacesRunnerConfigsListResponse.d.ts +0 -15
  91. package/types/serialization/types/NamespacesRunnerConfigsUpsertRequest.d.ts +0 -11
  92. package/types/serialization/types/NamespacesRunnerConfigsUpsertResponse.d.ts +0 -10
  93. package/types/serialization/types/RunnersGetResponse.d.ts +0 -13
  94. package/types/serialization/types/StringHttpAddressHashableMap.d.ts +0 -11
  95. package/types/serialization/types/StringHttpAddressHashableMapValue.d.ts +0 -13
  96. package/types/serialization/types/StringTcpAddressHashableMap.d.ts +0 -11
  97. package/types/serialization/types/StringTcpAddressHashableMapValue.d.ts +0 -13
  98. package/types/serialization/types/StringUdpAddressHashableMap.d.ts +0 -11
  99. package/types/serialization/types/StringUdpAddressHashableMapValue.d.ts +0 -13
  100. /package/types/api/resources/{namespacesRunnerConfigs → runnerConfigs}/client/index.d.ts +0 -0
@@ -583,16 +583,12 @@ __export(api_exports, {
583
583
  CrashPolicy: () => CrashPolicy,
584
584
  datacenters: () => datacenters_exports,
585
585
  namespaces: () => namespaces_exports,
586
- namespacesRunnerConfigs: () => namespacesRunnerConfigs_exports,
586
+ runnerConfigs: () => runnerConfigs_exports,
587
587
  runners: () => runners_exports
588
588
  });
589
589
 
590
- // src/api/types/CrashPolicy.ts
591
- var CrashPolicy = {
592
- Restart: "restart",
593
- Sleep: "sleep",
594
- Destroy: "destroy"
595
- };
590
+ // src/api/resources/runnerConfigs/index.ts
591
+ var runnerConfigs_exports = {};
596
592
 
597
593
  // src/api/resources/datacenters/index.ts
598
594
  var datacenters_exports = {};
@@ -600,12 +596,16 @@ var datacenters_exports = {};
600
596
  // src/api/resources/namespaces/index.ts
601
597
  var namespaces_exports = {};
602
598
 
603
- // src/api/resources/namespacesRunnerConfigs/index.ts
604
- var namespacesRunnerConfigs_exports = {};
605
-
606
599
  // src/api/resources/runners/index.ts
607
600
  var runners_exports = {};
608
601
 
602
+ // src/api/types/CrashPolicy.ts
603
+ var CrashPolicy = {
604
+ Restart: "restart",
605
+ Sleep: "sleep",
606
+ Destroy: "destroy"
607
+ };
608
+
609
609
  // src/core/json.ts
610
610
  var toJson = (value, replacer, space) => {
611
611
  return JSON.stringify(value, replacer, space);
@@ -921,6 +921,9 @@ var Supplier = {
921
921
  }
922
922
  };
923
923
 
924
+ // src/core/auth/BasicAuth.ts
925
+ var import_js_base64 = require("js-base64");
926
+
924
927
  // src/core/schemas/index.ts
925
928
  var schemas_exports = {};
926
929
  __export(schemas_exports, {
@@ -2326,37 +2329,67 @@ __export(serialization_exports, {
2326
2329
  ActorsCreateRequest: () => ActorsCreateRequest,
2327
2330
  ActorsCreateResponse: () => ActorsCreateResponse,
2328
2331
  ActorsDeleteResponse: () => ActorsDeleteResponse,
2329
- ActorsGetByIdResponse: () => ActorsGetByIdResponse,
2330
- ActorsGetOrCreateByIdRequest: () => ActorsGetOrCreateByIdRequest,
2331
- ActorsGetOrCreateByIdResponse: () => ActorsGetOrCreateByIdResponse,
2332
2332
  ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
2333
2333
  ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
2334
- ActorsGetResponse: () => ActorsGetResponse,
2335
2334
  ActorsListNamesResponse: () => ActorsListNamesResponse,
2336
2335
  ActorsListResponse: () => ActorsListResponse,
2337
2336
  CrashPolicy: () => CrashPolicy2,
2338
2337
  Datacenter: () => Datacenter,
2339
2338
  DatacentersListResponse: () => DatacentersListResponse,
2340
2339
  Namespace: () => Namespace,
2340
+ NamespaceListResponse: () => NamespaceListResponse,
2341
2341
  NamespacesCreateRequest: () => NamespacesCreateRequest,
2342
2342
  NamespacesCreateResponse: () => NamespacesCreateResponse,
2343
- NamespacesGetResponse: () => NamespacesGetResponse,
2344
- NamespacesListResponse: () => NamespacesListResponse,
2345
- NamespacesRunnerConfig: () => NamespacesRunnerConfig,
2346
- NamespacesRunnerConfigServerless: () => NamespacesRunnerConfigServerless,
2347
- NamespacesRunnerConfigVariant: () => NamespacesRunnerConfigVariant,
2348
- NamespacesRunnerConfigsDeleteResponse: () => NamespacesRunnerConfigsDeleteResponse,
2349
- NamespacesRunnerConfigsGetResponse: () => NamespacesRunnerConfigsGetResponse,
2350
- NamespacesRunnerConfigsListResponse: () => NamespacesRunnerConfigsListResponse,
2351
- NamespacesRunnerConfigsUpsertRequest: () => NamespacesRunnerConfigsUpsertRequest,
2352
- NamespacesRunnerConfigsUpsertResponse: () => NamespacesRunnerConfigsUpsertResponse,
2353
2343
  Pagination: () => Pagination,
2354
2344
  RivetId: () => RivetId,
2355
2345
  Runner: () => Runner,
2356
- RunnersGetResponse: () => RunnersGetResponse,
2346
+ RunnerConfig: () => RunnerConfig,
2347
+ RunnerConfigServerless: () => RunnerConfigServerless,
2348
+ RunnerConfigVariant: () => RunnerConfigVariant,
2349
+ RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
2350
+ RunnerConfigsListResponse: () => RunnerConfigsListResponse,
2351
+ RunnerConfigsUpsertRequest: () => RunnerConfigsUpsertRequest,
2352
+ RunnerConfigsUpsertRequestServerless: () => RunnerConfigsUpsertRequestServerless,
2353
+ RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
2357
2354
  RunnersListNamesResponse: () => RunnersListNamesResponse,
2358
2355
  RunnersListResponse: () => RunnersListResponse,
2359
- namespaces: () => namespaces_exports2
2356
+ namespaces: () => namespaces_exports2,
2357
+ runnerConfigs: () => runnerConfigs_exports2
2358
+ });
2359
+
2360
+ // src/serialization/resources/runnerConfigs/index.ts
2361
+ var runnerConfigs_exports2 = {};
2362
+ __export(runnerConfigs_exports2, {
2363
+ RunnerConfigsUpsertRequest: () => RunnerConfigsUpsertRequest,
2364
+ RunnerConfigsUpsertRequestServerless: () => RunnerConfigsUpsertRequestServerless
2365
+ });
2366
+
2367
+ // src/serialization/resources/runnerConfigs/types/RunnerConfigsUpsertRequestServerless.ts
2368
+ var RunnerConfigsUpsertRequestServerless = schemas_exports.object({
2369
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()),
2370
+ maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
2371
+ minRunners: schemas_exports.property("min_runners", schemas_exports.number()),
2372
+ requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2373
+ runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number()),
2374
+ slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
2375
+ url: schemas_exports.string()
2376
+ });
2377
+
2378
+ // src/serialization/resources/runnerConfigs/client/requests/RunnerConfigsUpsertRequest.ts
2379
+ var RunnerConfigsUpsertRequest = schemas_exports.object({
2380
+ serverless: RunnerConfigsUpsertRequestServerless
2381
+ });
2382
+
2383
+ // src/serialization/resources/namespaces/index.ts
2384
+ var namespaces_exports2 = {};
2385
+ __export(namespaces_exports2, {
2386
+ NamespacesCreateRequest: () => NamespacesCreateRequest
2387
+ });
2388
+
2389
+ // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2390
+ var NamespacesCreateRequest = schemas_exports.object({
2391
+ displayName: schemas_exports.property("display_name", schemas_exports.string()),
2392
+ name: schemas_exports.string()
2360
2393
  });
2361
2394
 
2362
2395
  // src/serialization/types/RivetId.ts
@@ -2395,28 +2428,12 @@ var ActorsCreateResponse = schemas_exports.object({
2395
2428
  // src/serialization/types/ActorsDeleteResponse.ts
2396
2429
  var ActorsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2397
2430
 
2398
- // src/serialization/types/ActorsGetByIdResponse.ts
2399
- var ActorsGetByIdResponse = schemas_exports.object({
2400
- actorId: schemas_exports.property("actor_id", RivetId.optional())
2401
- });
2402
-
2403
- // src/serialization/types/ActorsGetOrCreateByIdResponse.ts
2404
- var ActorsGetOrCreateByIdResponse = schemas_exports.object({
2405
- actorId: schemas_exports.property("actor_id", RivetId),
2406
- created: schemas_exports.boolean()
2407
- });
2408
-
2409
2431
  // src/serialization/types/ActorsGetOrCreateResponse.ts
2410
2432
  var ActorsGetOrCreateResponse = schemas_exports.object({
2411
2433
  actor: Actor,
2412
2434
  created: schemas_exports.boolean()
2413
2435
  });
2414
2436
 
2415
- // src/serialization/types/ActorsGetResponse.ts
2416
- var ActorsGetResponse = schemas_exports.object({
2417
- actor: Actor
2418
- });
2419
-
2420
2437
  // src/serialization/types/Pagination.ts
2421
2438
  var Pagination = schemas_exports.object({
2422
2439
  cursor: schemas_exports.string().optional()
@@ -2454,63 +2471,17 @@ var Namespace = schemas_exports.object({
2454
2471
  namespaceId: schemas_exports.property("namespace_id", RivetId)
2455
2472
  });
2456
2473
 
2457
- // src/serialization/types/NamespacesCreateResponse.ts
2458
- var NamespacesCreateResponse = schemas_exports.object({
2459
- namespace: Namespace
2460
- });
2461
-
2462
- // src/serialization/types/NamespacesGetResponse.ts
2463
- var NamespacesGetResponse = schemas_exports.object({
2464
- namespace: Namespace
2465
- });
2466
-
2467
- // src/serialization/types/NamespacesListResponse.ts
2468
- var NamespacesListResponse = schemas_exports.object({
2474
+ // src/serialization/types/NamespaceListResponse.ts
2475
+ var NamespaceListResponse = schemas_exports.object({
2469
2476
  namespaces: schemas_exports.list(Namespace),
2470
2477
  pagination: Pagination
2471
2478
  });
2472
2479
 
2473
- // src/serialization/types/NamespacesRunnerConfigServerless.ts
2474
- var NamespacesRunnerConfigServerless = schemas_exports.object({
2475
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
2476
- minRunners: schemas_exports.property("min_runners", schemas_exports.number()),
2477
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2478
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number()),
2479
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
2480
- url: schemas_exports.string()
2481
- });
2482
-
2483
- // src/serialization/types/NamespacesRunnerConfig.ts
2484
- var NamespacesRunnerConfig = schemas_exports.object({
2485
- serverless: NamespacesRunnerConfigServerless
2486
- });
2487
-
2488
- // src/serialization/types/NamespacesRunnerConfigVariant.ts
2489
- var NamespacesRunnerConfigVariant = schemas_exports.stringLiteral("serverless");
2490
-
2491
- // src/serialization/types/NamespacesRunnerConfigsDeleteResponse.ts
2492
- var NamespacesRunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2493
-
2494
- // src/serialization/types/NamespacesRunnerConfigsGetResponse.ts
2495
- var NamespacesRunnerConfigsGetResponse = schemas_exports.object({
2496
- runnerConfig: schemas_exports.property("runner_config", NamespacesRunnerConfig)
2497
- });
2498
-
2499
- // src/serialization/types/NamespacesRunnerConfigsListResponse.ts
2500
- var NamespacesRunnerConfigsListResponse = schemas_exports.object({
2501
- pagination: Pagination,
2502
- runnerConfigs: schemas_exports.property(
2503
- "runner_configs",
2504
- schemas_exports.record(schemas_exports.string(), NamespacesRunnerConfig)
2505
- )
2480
+ // src/serialization/types/NamespacesCreateResponse.ts
2481
+ var NamespacesCreateResponse = schemas_exports.object({
2482
+ namespace: Namespace
2506
2483
  });
2507
2484
 
2508
- // src/serialization/types/NamespacesRunnerConfigsUpsertRequest.ts
2509
- var NamespacesRunnerConfigsUpsertRequest = NamespacesRunnerConfig;
2510
-
2511
- // src/serialization/types/NamespacesRunnerConfigsUpsertResponse.ts
2512
- var NamespacesRunnerConfigsUpsertResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2513
-
2514
2485
  // src/serialization/types/Runner.ts
2515
2486
  var Runner = schemas_exports.object({
2516
2487
  createTs: schemas_exports.property("create_ts", schemas_exports.number()),
@@ -2530,11 +2501,40 @@ var Runner = schemas_exports.object({
2530
2501
  version: schemas_exports.number()
2531
2502
  });
2532
2503
 
2533
- // src/serialization/types/RunnersGetResponse.ts
2534
- var RunnersGetResponse = schemas_exports.object({
2535
- runner: Runner
2504
+ // src/serialization/types/RunnerConfigServerless.ts
2505
+ var RunnerConfigServerless = schemas_exports.object({
2506
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()),
2507
+ maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
2508
+ minRunners: schemas_exports.property("min_runners", schemas_exports.number()),
2509
+ requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2510
+ runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number()),
2511
+ slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
2512
+ url: schemas_exports.string()
2513
+ });
2514
+
2515
+ // src/serialization/types/RunnerConfig.ts
2516
+ var RunnerConfig = schemas_exports.object({
2517
+ serverless: RunnerConfigServerless
2518
+ });
2519
+
2520
+ // src/serialization/types/RunnerConfigVariant.ts
2521
+ var RunnerConfigVariant = schemas_exports.stringLiteral("serverless");
2522
+
2523
+ // src/serialization/types/RunnerConfigsDeleteResponse.ts
2524
+ var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2525
+
2526
+ // src/serialization/types/RunnerConfigsListResponse.ts
2527
+ var RunnerConfigsListResponse = schemas_exports.object({
2528
+ pagination: Pagination,
2529
+ runnerConfigs: schemas_exports.property(
2530
+ "runner_configs",
2531
+ schemas_exports.record(schemas_exports.string(), RunnerConfig)
2532
+ )
2536
2533
  });
2537
2534
 
2535
+ // src/serialization/types/RunnerConfigsUpsertResponse.ts
2536
+ var RunnerConfigsUpsertResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2537
+
2538
2538
  // src/serialization/types/RunnersListNamesResponse.ts
2539
2539
  var RunnersListNamesResponse = schemas_exports.object({
2540
2540
  names: schemas_exports.list(schemas_exports.string()),
@@ -2565,27 +2565,6 @@ var ActorsGetOrCreateRequest = schemas_exports.object({
2565
2565
  runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2566
2566
  });
2567
2567
 
2568
- // src/serialization/client/requests/ActorsGetOrCreateByIdRequest.ts
2569
- var ActorsGetOrCreateByIdRequest = schemas_exports.object({
2570
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2571
- input: schemas_exports.string().optional(),
2572
- key: schemas_exports.string(),
2573
- name: schemas_exports.string(),
2574
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2575
- });
2576
-
2577
- // src/serialization/resources/namespaces/index.ts
2578
- var namespaces_exports2 = {};
2579
- __export(namespaces_exports2, {
2580
- NamespacesCreateRequest: () => NamespacesCreateRequest
2581
- });
2582
-
2583
- // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2584
- var NamespacesCreateRequest = schemas_exports.object({
2585
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2586
- name: schemas_exports.string()
2587
- });
2588
-
2589
2568
  // src/errors/RivetError.ts
2590
2569
  var RivetError = class _RivetError extends Error {
2591
2570
  statusCode;
@@ -2647,6 +2626,7 @@ var Datacenters = class {
2647
2626
  ),
2648
2627
  method: "GET",
2649
2628
  headers: {
2629
+ Authorization: await this._getAuthorizationHeader(),
2650
2630
  "X-Fern-Language": "JavaScript",
2651
2631
  "X-Fern-Runtime": RUNTIME.type,
2652
2632
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -2687,6 +2667,9 @@ var Datacenters = class {
2687
2667
  });
2688
2668
  }
2689
2669
  }
2670
+ async _getAuthorizationHeader() {
2671
+ return `Bearer ${await Supplier.get(this._options.token)}`;
2672
+ }
2690
2673
  };
2691
2674
 
2692
2675
  // src/api/resources/namespaces/client/Client.ts
@@ -2703,7 +2686,7 @@ var Namespaces = class {
2703
2686
  * await client.namespaces.list()
2704
2687
  */
2705
2688
  async list(request = {}, requestOptions) {
2706
- const { limit, cursor, name, namespaceId } = request;
2689
+ const { limit, cursor, name, namespaceIds } = request;
2707
2690
  const _queryParams = {};
2708
2691
  if (limit != null) {
2709
2692
  _queryParams["limit"] = limit.toString();
@@ -2714,14 +2697,8 @@ var Namespaces = class {
2714
2697
  if (name != null) {
2715
2698
  _queryParams["name"] = name;
2716
2699
  }
2717
- if (namespaceId != null) {
2718
- if (Array.isArray(namespaceId)) {
2719
- _queryParams["namespace_id"] = namespaceId.map(
2720
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
2721
- );
2722
- } else {
2723
- _queryParams["namespace_id"] = namespaceId;
2724
- }
2700
+ if (namespaceIds != null) {
2701
+ _queryParams["namespace_ids"] = namespaceIds;
2725
2702
  }
2726
2703
  const _response = await (this._options.fetcher ?? fetcher)({
2727
2704
  url: (0, import_url_join2.default)(
@@ -2730,6 +2707,7 @@ var Namespaces = class {
2730
2707
  ),
2731
2708
  method: "GET",
2732
2709
  headers: {
2710
+ Authorization: await this._getAuthorizationHeader(),
2733
2711
  "X-Fern-Language": "JavaScript",
2734
2712
  "X-Fern-Runtime": RUNTIME.type,
2735
2713
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -2743,7 +2721,7 @@ var Namespaces = class {
2743
2721
  abortSignal: requestOptions?.abortSignal
2744
2722
  });
2745
2723
  if (_response.ok) {
2746
- return NamespacesListResponse.parseOrThrow(_response.body, {
2724
+ return NamespaceListResponse.parseOrThrow(_response.body, {
2747
2725
  unrecognizedObjectKeys: "passthrough",
2748
2726
  allowUnrecognizedUnionMembers: true,
2749
2727
  allowUnrecognizedEnumValues: true,
@@ -2789,6 +2767,7 @@ var Namespaces = class {
2789
2767
  ),
2790
2768
  method: "POST",
2791
2769
  headers: {
2770
+ Authorization: await this._getAuthorizationHeader(),
2792
2771
  "X-Fern-Language": "JavaScript",
2793
2772
  "X-Fern-Runtime": RUNTIME.type,
2794
2773
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -2830,80 +2809,30 @@ var Namespaces = class {
2830
2809
  });
2831
2810
  }
2832
2811
  }
2833
- /**
2834
- * @param {Rivet.RivetId} namespaceId
2835
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
2836
- *
2837
- * @example
2838
- * await client.namespaces.get("namespace_id")
2839
- */
2840
- async get(namespaceId, requestOptions) {
2841
- const _response = await (this._options.fetcher ?? fetcher)({
2842
- url: (0, import_url_join2.default)(
2843
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2844
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}`
2845
- ),
2846
- method: "GET",
2847
- headers: {
2848
- "X-Fern-Language": "JavaScript",
2849
- "X-Fern-Runtime": RUNTIME.type,
2850
- "X-Fern-Runtime-Version": RUNTIME.version,
2851
- ...requestOptions?.headers
2852
- },
2853
- contentType: "application/json",
2854
- requestType: "json",
2855
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2856
- maxRetries: requestOptions?.maxRetries,
2857
- abortSignal: requestOptions?.abortSignal
2858
- });
2859
- if (_response.ok) {
2860
- return NamespacesGetResponse.parseOrThrow(_response.body, {
2861
- unrecognizedObjectKeys: "passthrough",
2862
- allowUnrecognizedUnionMembers: true,
2863
- allowUnrecognizedEnumValues: true,
2864
- skipValidation: true,
2865
- breadcrumbsPrefix: ["response"]
2866
- });
2867
- }
2868
- if (_response.error.reason === "status-code") {
2869
- throw new RivetError({
2870
- statusCode: _response.error.statusCode,
2871
- body: _response.error.body
2872
- });
2873
- }
2874
- switch (_response.error.reason) {
2875
- case "non-json":
2876
- throw new RivetError({
2877
- statusCode: _response.error.statusCode,
2878
- body: _response.error.rawBody
2879
- });
2880
- case "timeout":
2881
- throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces/{namespace_id}.");
2882
- case "unknown":
2883
- throw new RivetError({
2884
- message: _response.error.errorMessage
2885
- });
2886
- }
2812
+ async _getAuthorizationHeader() {
2813
+ return `Bearer ${await Supplier.get(this._options.token)}`;
2887
2814
  }
2888
2815
  };
2889
2816
 
2890
- // src/api/resources/namespacesRunnerConfigs/client/Client.ts
2817
+ // src/api/resources/runnerConfigs/client/Client.ts
2891
2818
  var import_url_join3 = __toESM(require("url-join"));
2892
- var NamespacesRunnerConfigs = class {
2819
+ var RunnerConfigs = class {
2893
2820
  constructor(_options) {
2894
2821
  this._options = _options;
2895
2822
  }
2896
2823
  /**
2897
- * @param {Rivet.RivetId} namespaceId
2898
- * @param {Rivet.NamespacesRunnerConfigsListRequest} request
2899
- * @param {NamespacesRunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2824
+ * @param {Rivet.RunnerConfigsListRequest} request
2825
+ * @param {RunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2900
2826
  *
2901
2827
  * @example
2902
- * await client.namespacesRunnerConfigs.list("namespace_id")
2828
+ * await client.runnerConfigs.list({
2829
+ * namespace: "namespace"
2830
+ * })
2903
2831
  */
2904
- async list(namespaceId, request = {}, requestOptions) {
2905
- const { limit, cursor, variant } = request;
2832
+ async list(request, requestOptions) {
2833
+ const { namespace, limit, cursor, variant, runnerNames } = request;
2906
2834
  const _queryParams = {};
2835
+ _queryParams["namespace"] = namespace;
2907
2836
  if (limit != null) {
2908
2837
  _queryParams["limit"] = limit.toString();
2909
2838
  }
@@ -2911,89 +2840,35 @@ var NamespacesRunnerConfigs = class {
2911
2840
  _queryParams["cursor"] = cursor;
2912
2841
  }
2913
2842
  if (variant != null) {
2914
- _queryParams["variant"] = NamespacesRunnerConfigVariant.jsonOrThrow(variant, {
2843
+ _queryParams["variant"] = RunnerConfigVariant.jsonOrThrow(variant, {
2915
2844
  unrecognizedObjectKeys: "strip"
2916
2845
  });
2917
2846
  }
2918
- const _response = await (this._options.fetcher ?? fetcher)({
2919
- url: (0, import_url_join3.default)(
2920
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2921
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}/runner-configs`
2922
- ),
2923
- method: "GET",
2924
- headers: {
2925
- "X-Fern-Language": "JavaScript",
2926
- "X-Fern-Runtime": RUNTIME.type,
2927
- "X-Fern-Runtime-Version": RUNTIME.version,
2928
- ...requestOptions?.headers
2929
- },
2930
- contentType: "application/json",
2931
- queryParameters: _queryParams,
2932
- requestType: "json",
2933
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2934
- maxRetries: requestOptions?.maxRetries,
2935
- abortSignal: requestOptions?.abortSignal
2936
- });
2937
- if (_response.ok) {
2938
- return NamespacesRunnerConfigsListResponse.parseOrThrow(_response.body, {
2939
- unrecognizedObjectKeys: "passthrough",
2940
- allowUnrecognizedUnionMembers: true,
2941
- allowUnrecognizedEnumValues: true,
2942
- skipValidation: true,
2943
- breadcrumbsPrefix: ["response"]
2944
- });
2945
- }
2946
- if (_response.error.reason === "status-code") {
2947
- throw new RivetError({
2948
- statusCode: _response.error.statusCode,
2949
- body: _response.error.body
2950
- });
2847
+ if (runnerNames != null) {
2848
+ _queryParams["runner_names"] = runnerNames;
2951
2849
  }
2952
- switch (_response.error.reason) {
2953
- case "non-json":
2954
- throw new RivetError({
2955
- statusCode: _response.error.statusCode,
2956
- body: _response.error.rawBody
2957
- });
2958
- case "timeout":
2959
- throw new RivetTimeoutError(
2960
- "Timeout exceeded when calling GET /namespaces/{namespace_id}/runner-configs."
2961
- );
2962
- case "unknown":
2963
- throw new RivetError({
2964
- message: _response.error.errorMessage
2965
- });
2966
- }
2967
- }
2968
- /**
2969
- * @param {Rivet.RivetId} namespaceId
2970
- * @param {string} runnerName
2971
- * @param {NamespacesRunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2972
- *
2973
- * @example
2974
- * await client.namespacesRunnerConfigs.get("namespace_id", "runner_name")
2975
- */
2976
- async get(namespaceId, runnerName, requestOptions) {
2977
2850
  const _response = await (this._options.fetcher ?? fetcher)({
2978
2851
  url: (0, import_url_join3.default)(
2979
2852
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2980
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}/runner-configs/${encodeURIComponent(runnerName)}`
2853
+ "runner-configs"
2981
2854
  ),
2982
2855
  method: "GET",
2983
2856
  headers: {
2857
+ Authorization: await this._getAuthorizationHeader(),
2984
2858
  "X-Fern-Language": "JavaScript",
2985
2859
  "X-Fern-Runtime": RUNTIME.type,
2986
2860
  "X-Fern-Runtime-Version": RUNTIME.version,
2987
2861
  ...requestOptions?.headers
2988
2862
  },
2989
2863
  contentType: "application/json",
2864
+ queryParameters: _queryParams,
2990
2865
  requestType: "json",
2991
2866
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2992
2867
  maxRetries: requestOptions?.maxRetries,
2993
2868
  abortSignal: requestOptions?.abortSignal
2994
2869
  });
2995
2870
  if (_response.ok) {
2996
- return NamespacesRunnerConfigsGetResponse.parseOrThrow(_response.body, {
2871
+ return RunnerConfigsListResponse.parseOrThrow(_response.body, {
2997
2872
  unrecognizedObjectKeys: "passthrough",
2998
2873
  allowUnrecognizedUnionMembers: true,
2999
2874
  allowUnrecognizedEnumValues: true,
@@ -3014,9 +2889,7 @@ var NamespacesRunnerConfigs = class {
3014
2889
  body: _response.error.rawBody
3015
2890
  });
3016
2891
  case "timeout":
3017
- throw new RivetTimeoutError(
3018
- "Timeout exceeded when calling GET /namespaces/{namespace_id}/runner-configs/{runner_name}."
3019
- );
2892
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runner-configs.");
3020
2893
  case "unknown":
3021
2894
  throw new RivetError({
3022
2895
  message: _response.error.errorMessage
@@ -3024,14 +2897,17 @@ var NamespacesRunnerConfigs = class {
3024
2897
  }
3025
2898
  }
3026
2899
  /**
3027
- * @param {Rivet.RivetId} namespaceId
3028
2900
  * @param {string} runnerName
3029
- * @param {Rivet.NamespacesRunnerConfigsUpsertRequest} request
3030
- * @param {NamespacesRunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2901
+ * @param {Rivet.RunnerConfigsUpsertRequest} request
2902
+ * @param {RunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
3031
2903
  *
3032
2904
  * @example
3033
- * await client.namespacesRunnerConfigs.upsert("namespace_id", "runner_name", {
2905
+ * await client.runnerConfigs.upsert("runner_name", {
2906
+ * namespace: "namespace",
3034
2907
  * serverless: {
2908
+ * headers: {
2909
+ * "key": "value"
2910
+ * },
3035
2911
  * maxRunners: 1,
3036
2912
  * minRunners: 1,
3037
2913
  * requestLifespan: 1,
@@ -3041,30 +2917,33 @@ var NamespacesRunnerConfigs = class {
3041
2917
  * }
3042
2918
  * })
3043
2919
  */
3044
- async upsert(namespaceId, runnerName, request, requestOptions) {
2920
+ async upsert(runnerName, request, requestOptions) {
2921
+ const { namespace, ..._body } = request;
2922
+ const _queryParams = {};
2923
+ _queryParams["namespace"] = namespace;
3045
2924
  const _response = await (this._options.fetcher ?? fetcher)({
3046
2925
  url: (0, import_url_join3.default)(
3047
2926
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3048
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}/runner-configs/${encodeURIComponent(runnerName)}`
2927
+ `runner-configs/${encodeURIComponent(runnerName)}`
3049
2928
  ),
3050
2929
  method: "PUT",
3051
2930
  headers: {
2931
+ Authorization: await this._getAuthorizationHeader(),
3052
2932
  "X-Fern-Language": "JavaScript",
3053
2933
  "X-Fern-Runtime": RUNTIME.type,
3054
2934
  "X-Fern-Runtime-Version": RUNTIME.version,
3055
2935
  ...requestOptions?.headers
3056
2936
  },
3057
2937
  contentType: "application/json",
2938
+ queryParameters: _queryParams,
3058
2939
  requestType: "json",
3059
- body: NamespacesRunnerConfigsUpsertRequest.jsonOrThrow(request, {
3060
- unrecognizedObjectKeys: "strip"
3061
- }),
2940
+ body: RunnerConfigsUpsertRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3062
2941
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3063
2942
  maxRetries: requestOptions?.maxRetries,
3064
2943
  abortSignal: requestOptions?.abortSignal
3065
2944
  });
3066
2945
  if (_response.ok) {
3067
- return NamespacesRunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
2946
+ return RunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
3068
2947
  unrecognizedObjectKeys: "passthrough",
3069
2948
  allowUnrecognizedUnionMembers: true,
3070
2949
  allowUnrecognizedEnumValues: true,
@@ -3085,9 +2964,7 @@ var NamespacesRunnerConfigs = class {
3085
2964
  body: _response.error.rawBody
3086
2965
  });
3087
2966
  case "timeout":
3088
- throw new RivetTimeoutError(
3089
- "Timeout exceeded when calling PUT /namespaces/{namespace_id}/runner-configs/{runner_name}."
3090
- );
2967
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /runner-configs/{runner_name}.");
3091
2968
  case "unknown":
3092
2969
  throw new RivetError({
3093
2970
  message: _response.error.errorMessage
@@ -3095,34 +2972,41 @@ var NamespacesRunnerConfigs = class {
3095
2972
  }
3096
2973
  }
3097
2974
  /**
3098
- * @param {Rivet.RivetId} namespaceId
3099
2975
  * @param {string} runnerName
3100
- * @param {NamespacesRunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2976
+ * @param {Rivet.RunnerConfigsDeleteRequest} request
2977
+ * @param {RunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
3101
2978
  *
3102
2979
  * @example
3103
- * await client.namespacesRunnerConfigs.delete("namespace_id", "runner_name")
2980
+ * await client.runnerConfigs.delete("runner_name", {
2981
+ * namespace: "namespace"
2982
+ * })
3104
2983
  */
3105
- async delete(namespaceId, runnerName, requestOptions) {
2984
+ async delete(runnerName, request, requestOptions) {
2985
+ const { namespace } = request;
2986
+ const _queryParams = {};
2987
+ _queryParams["namespace"] = namespace;
3106
2988
  const _response = await (this._options.fetcher ?? fetcher)({
3107
2989
  url: (0, import_url_join3.default)(
3108
2990
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3109
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}/runner-configs/${encodeURIComponent(runnerName)}`
2991
+ `runner-configs/${encodeURIComponent(runnerName)}`
3110
2992
  ),
3111
2993
  method: "DELETE",
3112
2994
  headers: {
2995
+ Authorization: await this._getAuthorizationHeader(),
3113
2996
  "X-Fern-Language": "JavaScript",
3114
2997
  "X-Fern-Runtime": RUNTIME.type,
3115
2998
  "X-Fern-Runtime-Version": RUNTIME.version,
3116
2999
  ...requestOptions?.headers
3117
3000
  },
3118
3001
  contentType: "application/json",
3002
+ queryParameters: _queryParams,
3119
3003
  requestType: "json",
3120
3004
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3121
3005
  maxRetries: requestOptions?.maxRetries,
3122
3006
  abortSignal: requestOptions?.abortSignal
3123
3007
  });
3124
3008
  if (_response.ok) {
3125
- return NamespacesRunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
3009
+ return RunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
3126
3010
  unrecognizedObjectKeys: "passthrough",
3127
3011
  allowUnrecognizedUnionMembers: true,
3128
3012
  allowUnrecognizedEnumValues: true,
@@ -3144,7 +3028,7 @@ var NamespacesRunnerConfigs = class {
3144
3028
  });
3145
3029
  case "timeout":
3146
3030
  throw new RivetTimeoutError(
3147
- "Timeout exceeded when calling DELETE /namespaces/{namespace_id}/runner-configs/{runner_name}."
3031
+ "Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
3148
3032
  );
3149
3033
  case "unknown":
3150
3034
  throw new RivetError({
@@ -3152,6 +3036,9 @@ var NamespacesRunnerConfigs = class {
3152
3036
  });
3153
3037
  }
3154
3038
  }
3039
+ async _getAuthorizationHeader() {
3040
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3041
+ }
3155
3042
  };
3156
3043
 
3157
3044
  // src/api/resources/runners/client/Client.ts
@@ -3170,12 +3057,15 @@ var Runners = class {
3170
3057
  * })
3171
3058
  */
3172
3059
  async list(request, requestOptions) {
3173
- const { namespace, name, includeStopped, limit, cursor } = request;
3060
+ const { namespace, name, runnerIds, includeStopped, limit, cursor } = request;
3174
3061
  const _queryParams = {};
3175
3062
  _queryParams["namespace"] = namespace;
3176
3063
  if (name != null) {
3177
3064
  _queryParams["name"] = name;
3178
3065
  }
3066
+ if (runnerIds != null) {
3067
+ _queryParams["runner_ids"] = runnerIds;
3068
+ }
3179
3069
  if (includeStopped != null) {
3180
3070
  _queryParams["include_stopped"] = includeStopped.toString();
3181
3071
  }
@@ -3192,6 +3082,7 @@ var Runners = class {
3192
3082
  ),
3193
3083
  method: "GET",
3194
3084
  headers: {
3085
+ Authorization: await this._getAuthorizationHeader(),
3195
3086
  "X-Fern-Language": "JavaScript",
3196
3087
  "X-Fern-Runtime": RUNTIME.type,
3197
3088
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3264,6 +3155,7 @@ var Runners = class {
3264
3155
  ),
3265
3156
  method: "GET",
3266
3157
  headers: {
3158
+ Authorization: await this._getAuthorizationHeader(),
3267
3159
  "X-Fern-Language": "JavaScript",
3268
3160
  "X-Fern-Runtime": RUNTIME.type,
3269
3161
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3305,67 +3197,8 @@ var Runners = class {
3305
3197
  });
3306
3198
  }
3307
3199
  }
3308
- /**
3309
- * @param {Rivet.RivetId} runnerId
3310
- * @param {Rivet.RunnersGetRequest} request
3311
- * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3312
- *
3313
- * @example
3314
- * await client.runners.get("runner_id")
3315
- */
3316
- async get(runnerId, request = {}, requestOptions) {
3317
- const { namespace } = request;
3318
- const _queryParams = {};
3319
- if (namespace != null) {
3320
- _queryParams["namespace"] = namespace;
3321
- }
3322
- const _response = await (this._options.fetcher ?? fetcher)({
3323
- url: (0, import_url_join4.default)(
3324
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3325
- `runners/${encodeURIComponent(RivetId.jsonOrThrow(runnerId))}`
3326
- ),
3327
- method: "GET",
3328
- headers: {
3329
- "X-Fern-Language": "JavaScript",
3330
- "X-Fern-Runtime": RUNTIME.type,
3331
- "X-Fern-Runtime-Version": RUNTIME.version,
3332
- ...requestOptions?.headers
3333
- },
3334
- contentType: "application/json",
3335
- queryParameters: _queryParams,
3336
- requestType: "json",
3337
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3338
- maxRetries: requestOptions?.maxRetries,
3339
- abortSignal: requestOptions?.abortSignal
3340
- });
3341
- if (_response.ok) {
3342
- return RunnersGetResponse.parseOrThrow(_response.body, {
3343
- unrecognizedObjectKeys: "passthrough",
3344
- allowUnrecognizedUnionMembers: true,
3345
- allowUnrecognizedEnumValues: true,
3346
- skipValidation: true,
3347
- breadcrumbsPrefix: ["response"]
3348
- });
3349
- }
3350
- if (_response.error.reason === "status-code") {
3351
- throw new RivetError({
3352
- statusCode: _response.error.statusCode,
3353
- body: _response.error.body
3354
- });
3355
- }
3356
- switch (_response.error.reason) {
3357
- case "non-json":
3358
- throw new RivetError({
3359
- statusCode: _response.error.statusCode,
3360
- body: _response.error.rawBody
3361
- });
3362
- case "timeout":
3363
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/{runner_id}.");
3364
- case "unknown":
3365
- throw new RivetError({
3366
- message: _response.error.errorMessage
3367
- });
3368
- }
3200
+ async _getAuthorizationHeader() {
3201
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3369
3202
  }
3370
3203
  };
3371
3204
 
@@ -3376,7 +3209,7 @@ var RivetClient = class {
3376
3209
  }
3377
3210
  _datacenters;
3378
3211
  _namespaces;
3379
- _namespacesRunnerConfigs;
3212
+ _runnerConfigs;
3380
3213
  _runners;
3381
3214
  get datacenters() {
3382
3215
  return this._datacenters ??= new Datacenters(this._options);
@@ -3384,8 +3217,8 @@ var RivetClient = class {
3384
3217
  get namespaces() {
3385
3218
  return this._namespaces ??= new Namespaces(this._options);
3386
3219
  }
3387
- get namespacesRunnerConfigs() {
3388
- return this._namespacesRunnerConfigs ??= new NamespacesRunnerConfigs(this._options);
3220
+ get runnerConfigs() {
3221
+ return this._runnerConfigs ??= new RunnerConfigs(this._options);
3389
3222
  }
3390
3223
  get runners() {
3391
3224
  return this._runners ??= new Runners(this._options);
@@ -3396,7 +3229,7 @@ var RivetClient = class {
3396
3229
  * 2 round trips:
3397
3230
  *
3398
3231
  * - namespace::ops::resolve_for_name_global
3399
- * - GET /actors/{} (multiple DCs based on actor IDs)
3232
+ * - GET /actors (multiple DCs based on actor IDs)
3400
3233
  *
3401
3234
  * This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
3402
3235
  * stale consistency to determine which datacenter the actor lives in. Under most circumstances,
@@ -3414,9 +3247,6 @@ var RivetClient = class {
3414
3247
  *
3415
3248
  * ## Optimized Alternative Routes
3416
3249
  *
3417
- * For minimal round trips to check if an actor exists for a key, use `GET /actors/by-id`. This
3418
- * does not require fetching the actor's state, so it returns immediately.
3419
- *
3420
3250
  * @param {Rivet.ActorsListRequest} request
3421
3251
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3422
3252
  *
@@ -3454,6 +3284,7 @@ var RivetClient = class {
3454
3284
  ),
3455
3285
  method: "GET",
3456
3286
  headers: {
3287
+ Authorization: await this._getAuthorizationHeader(),
3457
3288
  "X-Fern-Language": "JavaScript",
3458
3289
  "X-Fern-Runtime": RUNTIME.type,
3459
3290
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3538,6 +3369,7 @@ var RivetClient = class {
3538
3369
  ),
3539
3370
  method: "POST",
3540
3371
  headers: {
3372
+ Authorization: await this._getAuthorizationHeader(),
3541
3373
  "X-Fern-Language": "JavaScript",
3542
3374
  "X-Fern-Runtime": RUNTIME.type,
3543
3375
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3607,9 +3439,6 @@ var RivetClient = class {
3607
3439
  *
3608
3440
  * ## Optimized Alternative Routes
3609
3441
  *
3610
- * For minimal round trips to get or create an actor, use `PUT /actors/by-id`. This doesn't
3611
- * require fetching the actor's state from the other datacenter.
3612
- *
3613
3442
  * @param {Rivet.ActorsGetOrCreateRequest} request
3614
3443
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3615
3444
  *
@@ -3636,6 +3465,7 @@ var RivetClient = class {
3636
3465
  ),
3637
3466
  method: "PUT",
3638
3467
  headers: {
3468
+ Authorization: await this._getAuthorizationHeader(),
3639
3469
  "X-Fern-Language": "JavaScript",
3640
3470
  "X-Fern-Runtime": RUNTIME.type,
3641
3471
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3678,167 +3508,6 @@ var RivetClient = class {
3678
3508
  });
3679
3509
  }
3680
3510
  }
3681
- /**
3682
- * 1 round trip:
3683
- *
3684
- * - namespace::ops::resolve_for_name_global
3685
- *
3686
- * This does not require another round trip since we use stale consistency for the get_id_for_key.
3687
- *
3688
- * @param {Rivet.ActorsGetByIdRequest} request
3689
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3690
- *
3691
- * @example
3692
- * await client.actorsGetById({
3693
- * namespace: "namespace",
3694
- * name: "name",
3695
- * key: "key"
3696
- * })
3697
- */
3698
- async actorsGetById(request, requestOptions) {
3699
- const { namespace, name, key } = request;
3700
- const _queryParams = {};
3701
- _queryParams["namespace"] = namespace;
3702
- _queryParams["name"] = name;
3703
- _queryParams["key"] = key;
3704
- const _response = await (this._options.fetcher ?? fetcher)({
3705
- url: (0, import_url_join5.default)(
3706
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3707
- "actors/by-id"
3708
- ),
3709
- method: "GET",
3710
- headers: {
3711
- "X-Fern-Language": "JavaScript",
3712
- "X-Fern-Runtime": RUNTIME.type,
3713
- "X-Fern-Runtime-Version": RUNTIME.version,
3714
- ...requestOptions?.headers
3715
- },
3716
- contentType: "application/json",
3717
- queryParameters: _queryParams,
3718
- requestType: "json",
3719
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3720
- maxRetries: requestOptions?.maxRetries,
3721
- abortSignal: requestOptions?.abortSignal
3722
- });
3723
- if (_response.ok) {
3724
- return ActorsGetByIdResponse.parseOrThrow(_response.body, {
3725
- unrecognizedObjectKeys: "passthrough",
3726
- allowUnrecognizedUnionMembers: true,
3727
- allowUnrecognizedEnumValues: true,
3728
- skipValidation: true,
3729
- breadcrumbsPrefix: ["response"]
3730
- });
3731
- }
3732
- if (_response.error.reason === "status-code") {
3733
- throw new RivetError({
3734
- statusCode: _response.error.statusCode,
3735
- body: _response.error.body
3736
- });
3737
- }
3738
- switch (_response.error.reason) {
3739
- case "non-json":
3740
- throw new RivetError({
3741
- statusCode: _response.error.statusCode,
3742
- body: _response.error.rawBody
3743
- });
3744
- case "timeout":
3745
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/by-id.");
3746
- case "unknown":
3747
- throw new RivetError({
3748
- message: _response.error.errorMessage
3749
- });
3750
- }
3751
- }
3752
- /**
3753
- * **If actor exists**
3754
- *
3755
- * 1 round trip:
3756
- *
3757
- * - namespace::ops::resolve_for_name_global
3758
- *
3759
- * **If actor does not exist and is created in the current datacenter:**
3760
- *
3761
- * 2 round trips:
3762
- *
3763
- * - namespace::ops::resolve_for_name_global
3764
- * - [pegboard::workflows::actors::keys::allocate_key] Reserve Epoxy key
3765
- *
3766
- * **If actor does not exist and is created in a different datacenter:**
3767
- *
3768
- * 3 round trips:
3769
- *
3770
- * - namespace::ops::resolve_for_name_global
3771
- * - namespace::ops::get (to get namespace name for remote call)
3772
- * - POST /actors to remote datacenter
3773
- *
3774
- * @param {Rivet.ActorsGetOrCreateByIdRequest} request
3775
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3776
- *
3777
- * @example
3778
- * await client.actorsGetOrCreateById({
3779
- * namespace: "namespace",
3780
- * crashPolicy: "restart",
3781
- * key: "key",
3782
- * name: "name",
3783
- * runnerNameSelector: "runner_name_selector"
3784
- * })
3785
- */
3786
- async actorsGetOrCreateById(request, requestOptions) {
3787
- const { namespace, datacenter, ..._body } = request;
3788
- const _queryParams = {};
3789
- _queryParams["namespace"] = namespace;
3790
- if (datacenter != null) {
3791
- _queryParams["datacenter"] = datacenter;
3792
- }
3793
- const _response = await (this._options.fetcher ?? fetcher)({
3794
- url: (0, import_url_join5.default)(
3795
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3796
- "actors/by-id"
3797
- ),
3798
- method: "PUT",
3799
- headers: {
3800
- "X-Fern-Language": "JavaScript",
3801
- "X-Fern-Runtime": RUNTIME.type,
3802
- "X-Fern-Runtime-Version": RUNTIME.version,
3803
- ...requestOptions?.headers
3804
- },
3805
- contentType: "application/json",
3806
- queryParameters: _queryParams,
3807
- requestType: "json",
3808
- body: ActorsGetOrCreateByIdRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3809
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3810
- maxRetries: requestOptions?.maxRetries,
3811
- abortSignal: requestOptions?.abortSignal
3812
- });
3813
- if (_response.ok) {
3814
- return ActorsGetOrCreateByIdResponse.parseOrThrow(_response.body, {
3815
- unrecognizedObjectKeys: "passthrough",
3816
- allowUnrecognizedUnionMembers: true,
3817
- allowUnrecognizedEnumValues: true,
3818
- skipValidation: true,
3819
- breadcrumbsPrefix: ["response"]
3820
- });
3821
- }
3822
- if (_response.error.reason === "status-code") {
3823
- throw new RivetError({
3824
- statusCode: _response.error.statusCode,
3825
- body: _response.error.body
3826
- });
3827
- }
3828
- switch (_response.error.reason) {
3829
- case "non-json":
3830
- throw new RivetError({
3831
- statusCode: _response.error.statusCode,
3832
- body: _response.error.rawBody
3833
- });
3834
- case "timeout":
3835
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /actors/by-id.");
3836
- case "unknown":
3837
- throw new RivetError({
3838
- message: _response.error.errorMessage
3839
- });
3840
- }
3841
- }
3842
3511
  /**
3843
3512
  * 2 round trips:
3844
3513
  *
@@ -3870,6 +3539,7 @@ var RivetClient = class {
3870
3539
  ),
3871
3540
  method: "GET",
3872
3541
  headers: {
3542
+ Authorization: await this._getAuthorizationHeader(),
3873
3543
  "X-Fern-Language": "JavaScript",
3874
3544
  "X-Fern-Runtime": RUNTIME.type,
3875
3545
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3911,73 +3581,6 @@ var RivetClient = class {
3911
3581
  });
3912
3582
  }
3913
3583
  }
3914
- /**
3915
- * 2 round trip:
3916
- *
3917
- * - GET /actors/{}
3918
- * - [api-peer] namespace::ops::resolve_for_name_global
3919
- *
3920
- * @param {Rivet.RivetId} actorId
3921
- * @param {Rivet.ActorsGetRequest} request
3922
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3923
- *
3924
- * @example
3925
- * await client.actorsGet("actor_id")
3926
- */
3927
- async actorsGet(actorId, request = {}, requestOptions) {
3928
- const { namespace } = request;
3929
- const _queryParams = {};
3930
- if (namespace != null) {
3931
- _queryParams["namespace"] = namespace;
3932
- }
3933
- const _response = await (this._options.fetcher ?? fetcher)({
3934
- url: (0, import_url_join5.default)(
3935
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3936
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
3937
- ),
3938
- method: "GET",
3939
- headers: {
3940
- "X-Fern-Language": "JavaScript",
3941
- "X-Fern-Runtime": RUNTIME.type,
3942
- "X-Fern-Runtime-Version": RUNTIME.version,
3943
- ...requestOptions?.headers
3944
- },
3945
- contentType: "application/json",
3946
- queryParameters: _queryParams,
3947
- requestType: "json",
3948
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3949
- maxRetries: requestOptions?.maxRetries,
3950
- abortSignal: requestOptions?.abortSignal
3951
- });
3952
- if (_response.ok) {
3953
- return ActorsGetResponse.parseOrThrow(_response.body, {
3954
- unrecognizedObjectKeys: "passthrough",
3955
- allowUnrecognizedUnionMembers: true,
3956
- allowUnrecognizedEnumValues: true,
3957
- skipValidation: true,
3958
- breadcrumbsPrefix: ["response"]
3959
- });
3960
- }
3961
- if (_response.error.reason === "status-code") {
3962
- throw new RivetError({
3963
- statusCode: _response.error.statusCode,
3964
- body: _response.error.body
3965
- });
3966
- }
3967
- switch (_response.error.reason) {
3968
- case "non-json":
3969
- throw new RivetError({
3970
- statusCode: _response.error.statusCode,
3971
- body: _response.error.rawBody
3972
- });
3973
- case "timeout":
3974
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
3975
- case "unknown":
3976
- throw new RivetError({
3977
- message: _response.error.errorMessage
3978
- });
3979
- }
3980
- }
3981
3584
  /**
3982
3585
  * 2 round trip:
3983
3586
  *
@@ -4004,6 +3607,7 @@ var RivetClient = class {
4004
3607
  ),
4005
3608
  method: "DELETE",
4006
3609
  headers: {
3610
+ Authorization: await this._getAuthorizationHeader(),
4007
3611
  "X-Fern-Language": "JavaScript",
4008
3612
  "X-Fern-Runtime": RUNTIME.type,
4009
3613
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -4045,4 +3649,7 @@ var RivetClient = class {
4045
3649
  });
4046
3650
  }
4047
3651
  }
3652
+ async _getAuthorizationHeader() {
3653
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3654
+ }
4048
3655
  };