@rivetkit/engine-api-full 25.7.2-rc.1 → 25.7.3

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 +8 -8
  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
@@ -550,16 +550,12 @@ __export(api_exports, {
550
550
  CrashPolicy: () => CrashPolicy,
551
551
  datacenters: () => datacenters_exports,
552
552
  namespaces: () => namespaces_exports,
553
- namespacesRunnerConfigs: () => namespacesRunnerConfigs_exports,
553
+ runnerConfigs: () => runnerConfigs_exports,
554
554
  runners: () => runners_exports
555
555
  });
556
556
 
557
- // src/api/types/CrashPolicy.ts
558
- var CrashPolicy = {
559
- Restart: "restart",
560
- Sleep: "sleep",
561
- Destroy: "destroy"
562
- };
557
+ // src/api/resources/runnerConfigs/index.ts
558
+ var runnerConfigs_exports = {};
563
559
 
564
560
  // src/api/resources/datacenters/index.ts
565
561
  var datacenters_exports = {};
@@ -567,12 +563,16 @@ var datacenters_exports = {};
567
563
  // src/api/resources/namespaces/index.ts
568
564
  var namespaces_exports = {};
569
565
 
570
- // src/api/resources/namespacesRunnerConfigs/index.ts
571
- var namespacesRunnerConfigs_exports = {};
572
-
573
566
  // src/api/resources/runners/index.ts
574
567
  var runners_exports = {};
575
568
 
569
+ // src/api/types/CrashPolicy.ts
570
+ var CrashPolicy = {
571
+ Restart: "restart",
572
+ Sleep: "sleep",
573
+ Destroy: "destroy"
574
+ };
575
+
576
576
  // src/core/json.ts
577
577
  var toJson = (value, replacer, space) => {
578
578
  return JSON.stringify(value, replacer, space);
@@ -888,6 +888,9 @@ var Supplier = {
888
888
  }
889
889
  };
890
890
 
891
+ // src/core/auth/BasicAuth.ts
892
+ import { Base64 } from "js-base64";
893
+
891
894
  // src/core/schemas/index.ts
892
895
  var schemas_exports = {};
893
896
  __export(schemas_exports, {
@@ -2293,37 +2296,67 @@ __export(serialization_exports, {
2293
2296
  ActorsCreateRequest: () => ActorsCreateRequest,
2294
2297
  ActorsCreateResponse: () => ActorsCreateResponse,
2295
2298
  ActorsDeleteResponse: () => ActorsDeleteResponse,
2296
- ActorsGetByIdResponse: () => ActorsGetByIdResponse,
2297
- ActorsGetOrCreateByIdRequest: () => ActorsGetOrCreateByIdRequest,
2298
- ActorsGetOrCreateByIdResponse: () => ActorsGetOrCreateByIdResponse,
2299
2299
  ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
2300
2300
  ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
2301
- ActorsGetResponse: () => ActorsGetResponse,
2302
2301
  ActorsListNamesResponse: () => ActorsListNamesResponse,
2303
2302
  ActorsListResponse: () => ActorsListResponse,
2304
2303
  CrashPolicy: () => CrashPolicy2,
2305
2304
  Datacenter: () => Datacenter,
2306
2305
  DatacentersListResponse: () => DatacentersListResponse,
2307
2306
  Namespace: () => Namespace,
2307
+ NamespaceListResponse: () => NamespaceListResponse,
2308
2308
  NamespacesCreateRequest: () => NamespacesCreateRequest,
2309
2309
  NamespacesCreateResponse: () => NamespacesCreateResponse,
2310
- NamespacesGetResponse: () => NamespacesGetResponse,
2311
- NamespacesListResponse: () => NamespacesListResponse,
2312
- NamespacesRunnerConfig: () => NamespacesRunnerConfig,
2313
- NamespacesRunnerConfigServerless: () => NamespacesRunnerConfigServerless,
2314
- NamespacesRunnerConfigVariant: () => NamespacesRunnerConfigVariant,
2315
- NamespacesRunnerConfigsDeleteResponse: () => NamespacesRunnerConfigsDeleteResponse,
2316
- NamespacesRunnerConfigsGetResponse: () => NamespacesRunnerConfigsGetResponse,
2317
- NamespacesRunnerConfigsListResponse: () => NamespacesRunnerConfigsListResponse,
2318
- NamespacesRunnerConfigsUpsertRequest: () => NamespacesRunnerConfigsUpsertRequest,
2319
- NamespacesRunnerConfigsUpsertResponse: () => NamespacesRunnerConfigsUpsertResponse,
2320
2310
  Pagination: () => Pagination,
2321
2311
  RivetId: () => RivetId,
2322
2312
  Runner: () => Runner,
2323
- RunnersGetResponse: () => RunnersGetResponse,
2313
+ RunnerConfig: () => RunnerConfig,
2314
+ RunnerConfigServerless: () => RunnerConfigServerless,
2315
+ RunnerConfigVariant: () => RunnerConfigVariant,
2316
+ RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
2317
+ RunnerConfigsListResponse: () => RunnerConfigsListResponse,
2318
+ RunnerConfigsUpsertRequest: () => RunnerConfigsUpsertRequest,
2319
+ RunnerConfigsUpsertRequestServerless: () => RunnerConfigsUpsertRequestServerless,
2320
+ RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
2324
2321
  RunnersListNamesResponse: () => RunnersListNamesResponse,
2325
2322
  RunnersListResponse: () => RunnersListResponse,
2326
- namespaces: () => namespaces_exports2
2323
+ namespaces: () => namespaces_exports2,
2324
+ runnerConfigs: () => runnerConfigs_exports2
2325
+ });
2326
+
2327
+ // src/serialization/resources/runnerConfigs/index.ts
2328
+ var runnerConfigs_exports2 = {};
2329
+ __export(runnerConfigs_exports2, {
2330
+ RunnerConfigsUpsertRequest: () => RunnerConfigsUpsertRequest,
2331
+ RunnerConfigsUpsertRequestServerless: () => RunnerConfigsUpsertRequestServerless
2332
+ });
2333
+
2334
+ // src/serialization/resources/runnerConfigs/types/RunnerConfigsUpsertRequestServerless.ts
2335
+ var RunnerConfigsUpsertRequestServerless = schemas_exports.object({
2336
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()),
2337
+ maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
2338
+ minRunners: schemas_exports.property("min_runners", schemas_exports.number()),
2339
+ requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2340
+ runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number()),
2341
+ slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
2342
+ url: schemas_exports.string()
2343
+ });
2344
+
2345
+ // src/serialization/resources/runnerConfigs/client/requests/RunnerConfigsUpsertRequest.ts
2346
+ var RunnerConfigsUpsertRequest = schemas_exports.object({
2347
+ serverless: RunnerConfigsUpsertRequestServerless
2348
+ });
2349
+
2350
+ // src/serialization/resources/namespaces/index.ts
2351
+ var namespaces_exports2 = {};
2352
+ __export(namespaces_exports2, {
2353
+ NamespacesCreateRequest: () => NamespacesCreateRequest
2354
+ });
2355
+
2356
+ // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2357
+ var NamespacesCreateRequest = schemas_exports.object({
2358
+ displayName: schemas_exports.property("display_name", schemas_exports.string()),
2359
+ name: schemas_exports.string()
2327
2360
  });
2328
2361
 
2329
2362
  // src/serialization/types/RivetId.ts
@@ -2362,28 +2395,12 @@ var ActorsCreateResponse = schemas_exports.object({
2362
2395
  // src/serialization/types/ActorsDeleteResponse.ts
2363
2396
  var ActorsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2364
2397
 
2365
- // src/serialization/types/ActorsGetByIdResponse.ts
2366
- var ActorsGetByIdResponse = schemas_exports.object({
2367
- actorId: schemas_exports.property("actor_id", RivetId.optional())
2368
- });
2369
-
2370
- // src/serialization/types/ActorsGetOrCreateByIdResponse.ts
2371
- var ActorsGetOrCreateByIdResponse = schemas_exports.object({
2372
- actorId: schemas_exports.property("actor_id", RivetId),
2373
- created: schemas_exports.boolean()
2374
- });
2375
-
2376
2398
  // src/serialization/types/ActorsGetOrCreateResponse.ts
2377
2399
  var ActorsGetOrCreateResponse = schemas_exports.object({
2378
2400
  actor: Actor,
2379
2401
  created: schemas_exports.boolean()
2380
2402
  });
2381
2403
 
2382
- // src/serialization/types/ActorsGetResponse.ts
2383
- var ActorsGetResponse = schemas_exports.object({
2384
- actor: Actor
2385
- });
2386
-
2387
2404
  // src/serialization/types/Pagination.ts
2388
2405
  var Pagination = schemas_exports.object({
2389
2406
  cursor: schemas_exports.string().optional()
@@ -2421,63 +2438,17 @@ var Namespace = schemas_exports.object({
2421
2438
  namespaceId: schemas_exports.property("namespace_id", RivetId)
2422
2439
  });
2423
2440
 
2424
- // src/serialization/types/NamespacesCreateResponse.ts
2425
- var NamespacesCreateResponse = schemas_exports.object({
2426
- namespace: Namespace
2427
- });
2428
-
2429
- // src/serialization/types/NamespacesGetResponse.ts
2430
- var NamespacesGetResponse = schemas_exports.object({
2431
- namespace: Namespace
2432
- });
2433
-
2434
- // src/serialization/types/NamespacesListResponse.ts
2435
- var NamespacesListResponse = schemas_exports.object({
2441
+ // src/serialization/types/NamespaceListResponse.ts
2442
+ var NamespaceListResponse = schemas_exports.object({
2436
2443
  namespaces: schemas_exports.list(Namespace),
2437
2444
  pagination: Pagination
2438
2445
  });
2439
2446
 
2440
- // src/serialization/types/NamespacesRunnerConfigServerless.ts
2441
- var NamespacesRunnerConfigServerless = schemas_exports.object({
2442
- maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
2443
- minRunners: schemas_exports.property("min_runners", schemas_exports.number()),
2444
- requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2445
- runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number()),
2446
- slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
2447
- url: schemas_exports.string()
2448
- });
2449
-
2450
- // src/serialization/types/NamespacesRunnerConfig.ts
2451
- var NamespacesRunnerConfig = schemas_exports.object({
2452
- serverless: NamespacesRunnerConfigServerless
2453
- });
2454
-
2455
- // src/serialization/types/NamespacesRunnerConfigVariant.ts
2456
- var NamespacesRunnerConfigVariant = schemas_exports.stringLiteral("serverless");
2457
-
2458
- // src/serialization/types/NamespacesRunnerConfigsDeleteResponse.ts
2459
- var NamespacesRunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2460
-
2461
- // src/serialization/types/NamespacesRunnerConfigsGetResponse.ts
2462
- var NamespacesRunnerConfigsGetResponse = schemas_exports.object({
2463
- runnerConfig: schemas_exports.property("runner_config", NamespacesRunnerConfig)
2464
- });
2465
-
2466
- // src/serialization/types/NamespacesRunnerConfigsListResponse.ts
2467
- var NamespacesRunnerConfigsListResponse = schemas_exports.object({
2468
- pagination: Pagination,
2469
- runnerConfigs: schemas_exports.property(
2470
- "runner_configs",
2471
- schemas_exports.record(schemas_exports.string(), NamespacesRunnerConfig)
2472
- )
2447
+ // src/serialization/types/NamespacesCreateResponse.ts
2448
+ var NamespacesCreateResponse = schemas_exports.object({
2449
+ namespace: Namespace
2473
2450
  });
2474
2451
 
2475
- // src/serialization/types/NamespacesRunnerConfigsUpsertRequest.ts
2476
- var NamespacesRunnerConfigsUpsertRequest = NamespacesRunnerConfig;
2477
-
2478
- // src/serialization/types/NamespacesRunnerConfigsUpsertResponse.ts
2479
- var NamespacesRunnerConfigsUpsertResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2480
-
2481
2452
  // src/serialization/types/Runner.ts
2482
2453
  var Runner = schemas_exports.object({
2483
2454
  createTs: schemas_exports.property("create_ts", schemas_exports.number()),
@@ -2497,11 +2468,40 @@ var Runner = schemas_exports.object({
2497
2468
  version: schemas_exports.number()
2498
2469
  });
2499
2470
 
2500
- // src/serialization/types/RunnersGetResponse.ts
2501
- var RunnersGetResponse = schemas_exports.object({
2502
- runner: Runner
2471
+ // src/serialization/types/RunnerConfigServerless.ts
2472
+ var RunnerConfigServerless = schemas_exports.object({
2473
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()),
2474
+ maxRunners: schemas_exports.property("max_runners", schemas_exports.number()),
2475
+ minRunners: schemas_exports.property("min_runners", schemas_exports.number()),
2476
+ requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2477
+ runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number()),
2478
+ slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number()),
2479
+ url: schemas_exports.string()
2480
+ });
2481
+
2482
+ // src/serialization/types/RunnerConfig.ts
2483
+ var RunnerConfig = schemas_exports.object({
2484
+ serverless: RunnerConfigServerless
2485
+ });
2486
+
2487
+ // src/serialization/types/RunnerConfigVariant.ts
2488
+ var RunnerConfigVariant = schemas_exports.stringLiteral("serverless");
2489
+
2490
+ // src/serialization/types/RunnerConfigsDeleteResponse.ts
2491
+ var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2492
+
2493
+ // src/serialization/types/RunnerConfigsListResponse.ts
2494
+ var RunnerConfigsListResponse = schemas_exports.object({
2495
+ pagination: Pagination,
2496
+ runnerConfigs: schemas_exports.property(
2497
+ "runner_configs",
2498
+ schemas_exports.record(schemas_exports.string(), RunnerConfig)
2499
+ )
2503
2500
  });
2504
2501
 
2502
+ // src/serialization/types/RunnerConfigsUpsertResponse.ts
2503
+ var RunnerConfigsUpsertResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2504
+
2505
2505
  // src/serialization/types/RunnersListNamesResponse.ts
2506
2506
  var RunnersListNamesResponse = schemas_exports.object({
2507
2507
  names: schemas_exports.list(schemas_exports.string()),
@@ -2532,27 +2532,6 @@ var ActorsGetOrCreateRequest = schemas_exports.object({
2532
2532
  runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2533
2533
  });
2534
2534
 
2535
- // src/serialization/client/requests/ActorsGetOrCreateByIdRequest.ts
2536
- var ActorsGetOrCreateByIdRequest = schemas_exports.object({
2537
- crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2538
- input: schemas_exports.string().optional(),
2539
- key: schemas_exports.string(),
2540
- name: schemas_exports.string(),
2541
- runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2542
- });
2543
-
2544
- // src/serialization/resources/namespaces/index.ts
2545
- var namespaces_exports2 = {};
2546
- __export(namespaces_exports2, {
2547
- NamespacesCreateRequest: () => NamespacesCreateRequest
2548
- });
2549
-
2550
- // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2551
- var NamespacesCreateRequest = schemas_exports.object({
2552
- displayName: schemas_exports.property("display_name", schemas_exports.string()),
2553
- name: schemas_exports.string()
2554
- });
2555
-
2556
2535
  // src/errors/RivetError.ts
2557
2536
  var RivetError = class _RivetError extends Error {
2558
2537
  statusCode;
@@ -2614,6 +2593,7 @@ var Datacenters = class {
2614
2593
  ),
2615
2594
  method: "GET",
2616
2595
  headers: {
2596
+ Authorization: await this._getAuthorizationHeader(),
2617
2597
  "X-Fern-Language": "JavaScript",
2618
2598
  "X-Fern-Runtime": RUNTIME.type,
2619
2599
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -2654,6 +2634,9 @@ var Datacenters = class {
2654
2634
  });
2655
2635
  }
2656
2636
  }
2637
+ async _getAuthorizationHeader() {
2638
+ return `Bearer ${await Supplier.get(this._options.token)}`;
2639
+ }
2657
2640
  };
2658
2641
 
2659
2642
  // src/api/resources/namespaces/client/Client.ts
@@ -2670,7 +2653,7 @@ var Namespaces = class {
2670
2653
  * await client.namespaces.list()
2671
2654
  */
2672
2655
  async list(request = {}, requestOptions) {
2673
- const { limit, cursor, name, namespaceId } = request;
2656
+ const { limit, cursor, name, namespaceIds } = request;
2674
2657
  const _queryParams = {};
2675
2658
  if (limit != null) {
2676
2659
  _queryParams["limit"] = limit.toString();
@@ -2681,14 +2664,8 @@ var Namespaces = class {
2681
2664
  if (name != null) {
2682
2665
  _queryParams["name"] = name;
2683
2666
  }
2684
- if (namespaceId != null) {
2685
- if (Array.isArray(namespaceId)) {
2686
- _queryParams["namespace_id"] = namespaceId.map(
2687
- (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
2688
- );
2689
- } else {
2690
- _queryParams["namespace_id"] = namespaceId;
2691
- }
2667
+ if (namespaceIds != null) {
2668
+ _queryParams["namespace_ids"] = namespaceIds;
2692
2669
  }
2693
2670
  const _response = await (this._options.fetcher ?? fetcher)({
2694
2671
  url: urlJoin2(
@@ -2697,6 +2674,7 @@ var Namespaces = class {
2697
2674
  ),
2698
2675
  method: "GET",
2699
2676
  headers: {
2677
+ Authorization: await this._getAuthorizationHeader(),
2700
2678
  "X-Fern-Language": "JavaScript",
2701
2679
  "X-Fern-Runtime": RUNTIME.type,
2702
2680
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -2710,7 +2688,7 @@ var Namespaces = class {
2710
2688
  abortSignal: requestOptions?.abortSignal
2711
2689
  });
2712
2690
  if (_response.ok) {
2713
- return NamespacesListResponse.parseOrThrow(_response.body, {
2691
+ return NamespaceListResponse.parseOrThrow(_response.body, {
2714
2692
  unrecognizedObjectKeys: "passthrough",
2715
2693
  allowUnrecognizedUnionMembers: true,
2716
2694
  allowUnrecognizedEnumValues: true,
@@ -2756,6 +2734,7 @@ var Namespaces = class {
2756
2734
  ),
2757
2735
  method: "POST",
2758
2736
  headers: {
2737
+ Authorization: await this._getAuthorizationHeader(),
2759
2738
  "X-Fern-Language": "JavaScript",
2760
2739
  "X-Fern-Runtime": RUNTIME.type,
2761
2740
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -2797,80 +2776,30 @@ var Namespaces = class {
2797
2776
  });
2798
2777
  }
2799
2778
  }
2800
- /**
2801
- * @param {Rivet.RivetId} namespaceId
2802
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
2803
- *
2804
- * @example
2805
- * await client.namespaces.get("namespace_id")
2806
- */
2807
- async get(namespaceId, requestOptions) {
2808
- const _response = await (this._options.fetcher ?? fetcher)({
2809
- url: urlJoin2(
2810
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2811
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}`
2812
- ),
2813
- method: "GET",
2814
- headers: {
2815
- "X-Fern-Language": "JavaScript",
2816
- "X-Fern-Runtime": RUNTIME.type,
2817
- "X-Fern-Runtime-Version": RUNTIME.version,
2818
- ...requestOptions?.headers
2819
- },
2820
- contentType: "application/json",
2821
- requestType: "json",
2822
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2823
- maxRetries: requestOptions?.maxRetries,
2824
- abortSignal: requestOptions?.abortSignal
2825
- });
2826
- if (_response.ok) {
2827
- return NamespacesGetResponse.parseOrThrow(_response.body, {
2828
- unrecognizedObjectKeys: "passthrough",
2829
- allowUnrecognizedUnionMembers: true,
2830
- allowUnrecognizedEnumValues: true,
2831
- skipValidation: true,
2832
- breadcrumbsPrefix: ["response"]
2833
- });
2834
- }
2835
- if (_response.error.reason === "status-code") {
2836
- throw new RivetError({
2837
- statusCode: _response.error.statusCode,
2838
- body: _response.error.body
2839
- });
2840
- }
2841
- switch (_response.error.reason) {
2842
- case "non-json":
2843
- throw new RivetError({
2844
- statusCode: _response.error.statusCode,
2845
- body: _response.error.rawBody
2846
- });
2847
- case "timeout":
2848
- throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces/{namespace_id}.");
2849
- case "unknown":
2850
- throw new RivetError({
2851
- message: _response.error.errorMessage
2852
- });
2853
- }
2779
+ async _getAuthorizationHeader() {
2780
+ return `Bearer ${await Supplier.get(this._options.token)}`;
2854
2781
  }
2855
2782
  };
2856
2783
 
2857
- // src/api/resources/namespacesRunnerConfigs/client/Client.ts
2784
+ // src/api/resources/runnerConfigs/client/Client.ts
2858
2785
  import urlJoin3 from "url-join";
2859
- var NamespacesRunnerConfigs = class {
2786
+ var RunnerConfigs = class {
2860
2787
  constructor(_options) {
2861
2788
  this._options = _options;
2862
2789
  }
2863
2790
  /**
2864
- * @param {Rivet.RivetId} namespaceId
2865
- * @param {Rivet.NamespacesRunnerConfigsListRequest} request
2866
- * @param {NamespacesRunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2791
+ * @param {Rivet.RunnerConfigsListRequest} request
2792
+ * @param {RunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2867
2793
  *
2868
2794
  * @example
2869
- * await client.namespacesRunnerConfigs.list("namespace_id")
2795
+ * await client.runnerConfigs.list({
2796
+ * namespace: "namespace"
2797
+ * })
2870
2798
  */
2871
- async list(namespaceId, request = {}, requestOptions) {
2872
- const { limit, cursor, variant } = request;
2799
+ async list(request, requestOptions) {
2800
+ const { namespace, limit, cursor, variant, runnerNames } = request;
2873
2801
  const _queryParams = {};
2802
+ _queryParams["namespace"] = namespace;
2874
2803
  if (limit != null) {
2875
2804
  _queryParams["limit"] = limit.toString();
2876
2805
  }
@@ -2878,89 +2807,35 @@ var NamespacesRunnerConfigs = class {
2878
2807
  _queryParams["cursor"] = cursor;
2879
2808
  }
2880
2809
  if (variant != null) {
2881
- _queryParams["variant"] = NamespacesRunnerConfigVariant.jsonOrThrow(variant, {
2810
+ _queryParams["variant"] = RunnerConfigVariant.jsonOrThrow(variant, {
2882
2811
  unrecognizedObjectKeys: "strip"
2883
2812
  });
2884
2813
  }
2885
- const _response = await (this._options.fetcher ?? fetcher)({
2886
- url: urlJoin3(
2887
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2888
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}/runner-configs`
2889
- ),
2890
- method: "GET",
2891
- headers: {
2892
- "X-Fern-Language": "JavaScript",
2893
- "X-Fern-Runtime": RUNTIME.type,
2894
- "X-Fern-Runtime-Version": RUNTIME.version,
2895
- ...requestOptions?.headers
2896
- },
2897
- contentType: "application/json",
2898
- queryParameters: _queryParams,
2899
- requestType: "json",
2900
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2901
- maxRetries: requestOptions?.maxRetries,
2902
- abortSignal: requestOptions?.abortSignal
2903
- });
2904
- if (_response.ok) {
2905
- return NamespacesRunnerConfigsListResponse.parseOrThrow(_response.body, {
2906
- unrecognizedObjectKeys: "passthrough",
2907
- allowUnrecognizedUnionMembers: true,
2908
- allowUnrecognizedEnumValues: true,
2909
- skipValidation: true,
2910
- breadcrumbsPrefix: ["response"]
2911
- });
2912
- }
2913
- if (_response.error.reason === "status-code") {
2914
- throw new RivetError({
2915
- statusCode: _response.error.statusCode,
2916
- body: _response.error.body
2917
- });
2814
+ if (runnerNames != null) {
2815
+ _queryParams["runner_names"] = runnerNames;
2918
2816
  }
2919
- switch (_response.error.reason) {
2920
- case "non-json":
2921
- throw new RivetError({
2922
- statusCode: _response.error.statusCode,
2923
- body: _response.error.rawBody
2924
- });
2925
- case "timeout":
2926
- throw new RivetTimeoutError(
2927
- "Timeout exceeded when calling GET /namespaces/{namespace_id}/runner-configs."
2928
- );
2929
- case "unknown":
2930
- throw new RivetError({
2931
- message: _response.error.errorMessage
2932
- });
2933
- }
2934
- }
2935
- /**
2936
- * @param {Rivet.RivetId} namespaceId
2937
- * @param {string} runnerName
2938
- * @param {NamespacesRunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2939
- *
2940
- * @example
2941
- * await client.namespacesRunnerConfigs.get("namespace_id", "runner_name")
2942
- */
2943
- async get(namespaceId, runnerName, requestOptions) {
2944
2817
  const _response = await (this._options.fetcher ?? fetcher)({
2945
2818
  url: urlJoin3(
2946
2819
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2947
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}/runner-configs/${encodeURIComponent(runnerName)}`
2820
+ "runner-configs"
2948
2821
  ),
2949
2822
  method: "GET",
2950
2823
  headers: {
2824
+ Authorization: await this._getAuthorizationHeader(),
2951
2825
  "X-Fern-Language": "JavaScript",
2952
2826
  "X-Fern-Runtime": RUNTIME.type,
2953
2827
  "X-Fern-Runtime-Version": RUNTIME.version,
2954
2828
  ...requestOptions?.headers
2955
2829
  },
2956
2830
  contentType: "application/json",
2831
+ queryParameters: _queryParams,
2957
2832
  requestType: "json",
2958
2833
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2959
2834
  maxRetries: requestOptions?.maxRetries,
2960
2835
  abortSignal: requestOptions?.abortSignal
2961
2836
  });
2962
2837
  if (_response.ok) {
2963
- return NamespacesRunnerConfigsGetResponse.parseOrThrow(_response.body, {
2838
+ return RunnerConfigsListResponse.parseOrThrow(_response.body, {
2964
2839
  unrecognizedObjectKeys: "passthrough",
2965
2840
  allowUnrecognizedUnionMembers: true,
2966
2841
  allowUnrecognizedEnumValues: true,
@@ -2981,9 +2856,7 @@ var NamespacesRunnerConfigs = class {
2981
2856
  body: _response.error.rawBody
2982
2857
  });
2983
2858
  case "timeout":
2984
- throw new RivetTimeoutError(
2985
- "Timeout exceeded when calling GET /namespaces/{namespace_id}/runner-configs/{runner_name}."
2986
- );
2859
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runner-configs.");
2987
2860
  case "unknown":
2988
2861
  throw new RivetError({
2989
2862
  message: _response.error.errorMessage
@@ -2991,14 +2864,17 @@ var NamespacesRunnerConfigs = class {
2991
2864
  }
2992
2865
  }
2993
2866
  /**
2994
- * @param {Rivet.RivetId} namespaceId
2995
2867
  * @param {string} runnerName
2996
- * @param {Rivet.NamespacesRunnerConfigsUpsertRequest} request
2997
- * @param {NamespacesRunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2868
+ * @param {Rivet.RunnerConfigsUpsertRequest} request
2869
+ * @param {RunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2998
2870
  *
2999
2871
  * @example
3000
- * await client.namespacesRunnerConfigs.upsert("namespace_id", "runner_name", {
2872
+ * await client.runnerConfigs.upsert("runner_name", {
2873
+ * namespace: "namespace",
3001
2874
  * serverless: {
2875
+ * headers: {
2876
+ * "key": "value"
2877
+ * },
3002
2878
  * maxRunners: 1,
3003
2879
  * minRunners: 1,
3004
2880
  * requestLifespan: 1,
@@ -3008,30 +2884,33 @@ var NamespacesRunnerConfigs = class {
3008
2884
  * }
3009
2885
  * })
3010
2886
  */
3011
- async upsert(namespaceId, runnerName, request, requestOptions) {
2887
+ async upsert(runnerName, request, requestOptions) {
2888
+ const { namespace, ..._body } = request;
2889
+ const _queryParams = {};
2890
+ _queryParams["namespace"] = namespace;
3012
2891
  const _response = await (this._options.fetcher ?? fetcher)({
3013
2892
  url: urlJoin3(
3014
2893
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3015
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}/runner-configs/${encodeURIComponent(runnerName)}`
2894
+ `runner-configs/${encodeURIComponent(runnerName)}`
3016
2895
  ),
3017
2896
  method: "PUT",
3018
2897
  headers: {
2898
+ Authorization: await this._getAuthorizationHeader(),
3019
2899
  "X-Fern-Language": "JavaScript",
3020
2900
  "X-Fern-Runtime": RUNTIME.type,
3021
2901
  "X-Fern-Runtime-Version": RUNTIME.version,
3022
2902
  ...requestOptions?.headers
3023
2903
  },
3024
2904
  contentType: "application/json",
2905
+ queryParameters: _queryParams,
3025
2906
  requestType: "json",
3026
- body: NamespacesRunnerConfigsUpsertRequest.jsonOrThrow(request, {
3027
- unrecognizedObjectKeys: "strip"
3028
- }),
2907
+ body: RunnerConfigsUpsertRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3029
2908
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3030
2909
  maxRetries: requestOptions?.maxRetries,
3031
2910
  abortSignal: requestOptions?.abortSignal
3032
2911
  });
3033
2912
  if (_response.ok) {
3034
- return NamespacesRunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
2913
+ return RunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
3035
2914
  unrecognizedObjectKeys: "passthrough",
3036
2915
  allowUnrecognizedUnionMembers: true,
3037
2916
  allowUnrecognizedEnumValues: true,
@@ -3052,9 +2931,7 @@ var NamespacesRunnerConfigs = class {
3052
2931
  body: _response.error.rawBody
3053
2932
  });
3054
2933
  case "timeout":
3055
- throw new RivetTimeoutError(
3056
- "Timeout exceeded when calling PUT /namespaces/{namespace_id}/runner-configs/{runner_name}."
3057
- );
2934
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /runner-configs/{runner_name}.");
3058
2935
  case "unknown":
3059
2936
  throw new RivetError({
3060
2937
  message: _response.error.errorMessage
@@ -3062,34 +2939,41 @@ var NamespacesRunnerConfigs = class {
3062
2939
  }
3063
2940
  }
3064
2941
  /**
3065
- * @param {Rivet.RivetId} namespaceId
3066
2942
  * @param {string} runnerName
3067
- * @param {NamespacesRunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
2943
+ * @param {Rivet.RunnerConfigsDeleteRequest} request
2944
+ * @param {RunnerConfigs.RequestOptions} requestOptions - Request-specific configuration.
3068
2945
  *
3069
2946
  * @example
3070
- * await client.namespacesRunnerConfigs.delete("namespace_id", "runner_name")
2947
+ * await client.runnerConfigs.delete("runner_name", {
2948
+ * namespace: "namespace"
2949
+ * })
3071
2950
  */
3072
- async delete(namespaceId, runnerName, requestOptions) {
2951
+ async delete(runnerName, request, requestOptions) {
2952
+ const { namespace } = request;
2953
+ const _queryParams = {};
2954
+ _queryParams["namespace"] = namespace;
3073
2955
  const _response = await (this._options.fetcher ?? fetcher)({
3074
2956
  url: urlJoin3(
3075
2957
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3076
- `namespaces/${encodeURIComponent(RivetId.jsonOrThrow(namespaceId))}/runner-configs/${encodeURIComponent(runnerName)}`
2958
+ `runner-configs/${encodeURIComponent(runnerName)}`
3077
2959
  ),
3078
2960
  method: "DELETE",
3079
2961
  headers: {
2962
+ Authorization: await this._getAuthorizationHeader(),
3080
2963
  "X-Fern-Language": "JavaScript",
3081
2964
  "X-Fern-Runtime": RUNTIME.type,
3082
2965
  "X-Fern-Runtime-Version": RUNTIME.version,
3083
2966
  ...requestOptions?.headers
3084
2967
  },
3085
2968
  contentType: "application/json",
2969
+ queryParameters: _queryParams,
3086
2970
  requestType: "json",
3087
2971
  timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3088
2972
  maxRetries: requestOptions?.maxRetries,
3089
2973
  abortSignal: requestOptions?.abortSignal
3090
2974
  });
3091
2975
  if (_response.ok) {
3092
- return NamespacesRunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
2976
+ return RunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
3093
2977
  unrecognizedObjectKeys: "passthrough",
3094
2978
  allowUnrecognizedUnionMembers: true,
3095
2979
  allowUnrecognizedEnumValues: true,
@@ -3111,7 +2995,7 @@ var NamespacesRunnerConfigs = class {
3111
2995
  });
3112
2996
  case "timeout":
3113
2997
  throw new RivetTimeoutError(
3114
- "Timeout exceeded when calling DELETE /namespaces/{namespace_id}/runner-configs/{runner_name}."
2998
+ "Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
3115
2999
  );
3116
3000
  case "unknown":
3117
3001
  throw new RivetError({
@@ -3119,6 +3003,9 @@ var NamespacesRunnerConfigs = class {
3119
3003
  });
3120
3004
  }
3121
3005
  }
3006
+ async _getAuthorizationHeader() {
3007
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3008
+ }
3122
3009
  };
3123
3010
 
3124
3011
  // src/api/resources/runners/client/Client.ts
@@ -3137,12 +3024,15 @@ var Runners = class {
3137
3024
  * })
3138
3025
  */
3139
3026
  async list(request, requestOptions) {
3140
- const { namespace, name, includeStopped, limit, cursor } = request;
3027
+ const { namespace, name, runnerIds, includeStopped, limit, cursor } = request;
3141
3028
  const _queryParams = {};
3142
3029
  _queryParams["namespace"] = namespace;
3143
3030
  if (name != null) {
3144
3031
  _queryParams["name"] = name;
3145
3032
  }
3033
+ if (runnerIds != null) {
3034
+ _queryParams["runner_ids"] = runnerIds;
3035
+ }
3146
3036
  if (includeStopped != null) {
3147
3037
  _queryParams["include_stopped"] = includeStopped.toString();
3148
3038
  }
@@ -3159,6 +3049,7 @@ var Runners = class {
3159
3049
  ),
3160
3050
  method: "GET",
3161
3051
  headers: {
3052
+ Authorization: await this._getAuthorizationHeader(),
3162
3053
  "X-Fern-Language": "JavaScript",
3163
3054
  "X-Fern-Runtime": RUNTIME.type,
3164
3055
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3231,6 +3122,7 @@ var Runners = class {
3231
3122
  ),
3232
3123
  method: "GET",
3233
3124
  headers: {
3125
+ Authorization: await this._getAuthorizationHeader(),
3234
3126
  "X-Fern-Language": "JavaScript",
3235
3127
  "X-Fern-Runtime": RUNTIME.type,
3236
3128
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3272,67 +3164,8 @@ var Runners = class {
3272
3164
  });
3273
3165
  }
3274
3166
  }
3275
- /**
3276
- * @param {Rivet.RivetId} runnerId
3277
- * @param {Rivet.RunnersGetRequest} request
3278
- * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3279
- *
3280
- * @example
3281
- * await client.runners.get("runner_id")
3282
- */
3283
- async get(runnerId, request = {}, requestOptions) {
3284
- const { namespace } = request;
3285
- const _queryParams = {};
3286
- if (namespace != null) {
3287
- _queryParams["namespace"] = namespace;
3288
- }
3289
- const _response = await (this._options.fetcher ?? fetcher)({
3290
- url: urlJoin4(
3291
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3292
- `runners/${encodeURIComponent(RivetId.jsonOrThrow(runnerId))}`
3293
- ),
3294
- method: "GET",
3295
- headers: {
3296
- "X-Fern-Language": "JavaScript",
3297
- "X-Fern-Runtime": RUNTIME.type,
3298
- "X-Fern-Runtime-Version": RUNTIME.version,
3299
- ...requestOptions?.headers
3300
- },
3301
- contentType: "application/json",
3302
- queryParameters: _queryParams,
3303
- requestType: "json",
3304
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3305
- maxRetries: requestOptions?.maxRetries,
3306
- abortSignal: requestOptions?.abortSignal
3307
- });
3308
- if (_response.ok) {
3309
- return RunnersGetResponse.parseOrThrow(_response.body, {
3310
- unrecognizedObjectKeys: "passthrough",
3311
- allowUnrecognizedUnionMembers: true,
3312
- allowUnrecognizedEnumValues: true,
3313
- skipValidation: true,
3314
- breadcrumbsPrefix: ["response"]
3315
- });
3316
- }
3317
- if (_response.error.reason === "status-code") {
3318
- throw new RivetError({
3319
- statusCode: _response.error.statusCode,
3320
- body: _response.error.body
3321
- });
3322
- }
3323
- switch (_response.error.reason) {
3324
- case "non-json":
3325
- throw new RivetError({
3326
- statusCode: _response.error.statusCode,
3327
- body: _response.error.rawBody
3328
- });
3329
- case "timeout":
3330
- throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/{runner_id}.");
3331
- case "unknown":
3332
- throw new RivetError({
3333
- message: _response.error.errorMessage
3334
- });
3335
- }
3167
+ async _getAuthorizationHeader() {
3168
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3336
3169
  }
3337
3170
  };
3338
3171
 
@@ -3343,7 +3176,7 @@ var RivetClient = class {
3343
3176
  }
3344
3177
  _datacenters;
3345
3178
  _namespaces;
3346
- _namespacesRunnerConfigs;
3179
+ _runnerConfigs;
3347
3180
  _runners;
3348
3181
  get datacenters() {
3349
3182
  return this._datacenters ??= new Datacenters(this._options);
@@ -3351,8 +3184,8 @@ var RivetClient = class {
3351
3184
  get namespaces() {
3352
3185
  return this._namespaces ??= new Namespaces(this._options);
3353
3186
  }
3354
- get namespacesRunnerConfigs() {
3355
- return this._namespacesRunnerConfigs ??= new NamespacesRunnerConfigs(this._options);
3187
+ get runnerConfigs() {
3188
+ return this._runnerConfigs ??= new RunnerConfigs(this._options);
3356
3189
  }
3357
3190
  get runners() {
3358
3191
  return this._runners ??= new Runners(this._options);
@@ -3363,7 +3196,7 @@ var RivetClient = class {
3363
3196
  * 2 round trips:
3364
3197
  *
3365
3198
  * - namespace::ops::resolve_for_name_global
3366
- * - GET /actors/{} (multiple DCs based on actor IDs)
3199
+ * - GET /actors (multiple DCs based on actor IDs)
3367
3200
  *
3368
3201
  * This path is optimized because we can read the actor IDs fro the key directly from Epoxy with
3369
3202
  * stale consistency to determine which datacenter the actor lives in. Under most circumstances,
@@ -3381,9 +3214,6 @@ var RivetClient = class {
3381
3214
  *
3382
3215
  * ## Optimized Alternative Routes
3383
3216
  *
3384
- * For minimal round trips to check if an actor exists for a key, use `GET /actors/by-id`. This
3385
- * does not require fetching the actor's state, so it returns immediately.
3386
- *
3387
3217
  * @param {Rivet.ActorsListRequest} request
3388
3218
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3389
3219
  *
@@ -3421,6 +3251,7 @@ var RivetClient = class {
3421
3251
  ),
3422
3252
  method: "GET",
3423
3253
  headers: {
3254
+ Authorization: await this._getAuthorizationHeader(),
3424
3255
  "X-Fern-Language": "JavaScript",
3425
3256
  "X-Fern-Runtime": RUNTIME.type,
3426
3257
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3505,6 +3336,7 @@ var RivetClient = class {
3505
3336
  ),
3506
3337
  method: "POST",
3507
3338
  headers: {
3339
+ Authorization: await this._getAuthorizationHeader(),
3508
3340
  "X-Fern-Language": "JavaScript",
3509
3341
  "X-Fern-Runtime": RUNTIME.type,
3510
3342
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3574,9 +3406,6 @@ var RivetClient = class {
3574
3406
  *
3575
3407
  * ## Optimized Alternative Routes
3576
3408
  *
3577
- * For minimal round trips to get or create an actor, use `PUT /actors/by-id`. This doesn't
3578
- * require fetching the actor's state from the other datacenter.
3579
- *
3580
3409
  * @param {Rivet.ActorsGetOrCreateRequest} request
3581
3410
  * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3582
3411
  *
@@ -3603,6 +3432,7 @@ var RivetClient = class {
3603
3432
  ),
3604
3433
  method: "PUT",
3605
3434
  headers: {
3435
+ Authorization: await this._getAuthorizationHeader(),
3606
3436
  "X-Fern-Language": "JavaScript",
3607
3437
  "X-Fern-Runtime": RUNTIME.type,
3608
3438
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3645,167 +3475,6 @@ var RivetClient = class {
3645
3475
  });
3646
3476
  }
3647
3477
  }
3648
- /**
3649
- * 1 round trip:
3650
- *
3651
- * - namespace::ops::resolve_for_name_global
3652
- *
3653
- * This does not require another round trip since we use stale consistency for the get_id_for_key.
3654
- *
3655
- * @param {Rivet.ActorsGetByIdRequest} request
3656
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3657
- *
3658
- * @example
3659
- * await client.actorsGetById({
3660
- * namespace: "namespace",
3661
- * name: "name",
3662
- * key: "key"
3663
- * })
3664
- */
3665
- async actorsGetById(request, requestOptions) {
3666
- const { namespace, name, key } = request;
3667
- const _queryParams = {};
3668
- _queryParams["namespace"] = namespace;
3669
- _queryParams["name"] = name;
3670
- _queryParams["key"] = key;
3671
- const _response = await (this._options.fetcher ?? fetcher)({
3672
- url: urlJoin5(
3673
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3674
- "actors/by-id"
3675
- ),
3676
- method: "GET",
3677
- headers: {
3678
- "X-Fern-Language": "JavaScript",
3679
- "X-Fern-Runtime": RUNTIME.type,
3680
- "X-Fern-Runtime-Version": RUNTIME.version,
3681
- ...requestOptions?.headers
3682
- },
3683
- contentType: "application/json",
3684
- queryParameters: _queryParams,
3685
- requestType: "json",
3686
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3687
- maxRetries: requestOptions?.maxRetries,
3688
- abortSignal: requestOptions?.abortSignal
3689
- });
3690
- if (_response.ok) {
3691
- return ActorsGetByIdResponse.parseOrThrow(_response.body, {
3692
- unrecognizedObjectKeys: "passthrough",
3693
- allowUnrecognizedUnionMembers: true,
3694
- allowUnrecognizedEnumValues: true,
3695
- skipValidation: true,
3696
- breadcrumbsPrefix: ["response"]
3697
- });
3698
- }
3699
- if (_response.error.reason === "status-code") {
3700
- throw new RivetError({
3701
- statusCode: _response.error.statusCode,
3702
- body: _response.error.body
3703
- });
3704
- }
3705
- switch (_response.error.reason) {
3706
- case "non-json":
3707
- throw new RivetError({
3708
- statusCode: _response.error.statusCode,
3709
- body: _response.error.rawBody
3710
- });
3711
- case "timeout":
3712
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/by-id.");
3713
- case "unknown":
3714
- throw new RivetError({
3715
- message: _response.error.errorMessage
3716
- });
3717
- }
3718
- }
3719
- /**
3720
- * **If actor exists**
3721
- *
3722
- * 1 round trip:
3723
- *
3724
- * - namespace::ops::resolve_for_name_global
3725
- *
3726
- * **If actor does not exist and is created in the current datacenter:**
3727
- *
3728
- * 2 round trips:
3729
- *
3730
- * - namespace::ops::resolve_for_name_global
3731
- * - [pegboard::workflows::actors::keys::allocate_key] Reserve Epoxy key
3732
- *
3733
- * **If actor does not exist and is created in a different datacenter:**
3734
- *
3735
- * 3 round trips:
3736
- *
3737
- * - namespace::ops::resolve_for_name_global
3738
- * - namespace::ops::get (to get namespace name for remote call)
3739
- * - POST /actors to remote datacenter
3740
- *
3741
- * @param {Rivet.ActorsGetOrCreateByIdRequest} request
3742
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3743
- *
3744
- * @example
3745
- * await client.actorsGetOrCreateById({
3746
- * namespace: "namespace",
3747
- * crashPolicy: "restart",
3748
- * key: "key",
3749
- * name: "name",
3750
- * runnerNameSelector: "runner_name_selector"
3751
- * })
3752
- */
3753
- async actorsGetOrCreateById(request, requestOptions) {
3754
- const { namespace, datacenter, ..._body } = request;
3755
- const _queryParams = {};
3756
- _queryParams["namespace"] = namespace;
3757
- if (datacenter != null) {
3758
- _queryParams["datacenter"] = datacenter;
3759
- }
3760
- const _response = await (this._options.fetcher ?? fetcher)({
3761
- url: urlJoin5(
3762
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3763
- "actors/by-id"
3764
- ),
3765
- method: "PUT",
3766
- headers: {
3767
- "X-Fern-Language": "JavaScript",
3768
- "X-Fern-Runtime": RUNTIME.type,
3769
- "X-Fern-Runtime-Version": RUNTIME.version,
3770
- ...requestOptions?.headers
3771
- },
3772
- contentType: "application/json",
3773
- queryParameters: _queryParams,
3774
- requestType: "json",
3775
- body: ActorsGetOrCreateByIdRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3776
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3777
- maxRetries: requestOptions?.maxRetries,
3778
- abortSignal: requestOptions?.abortSignal
3779
- });
3780
- if (_response.ok) {
3781
- return ActorsGetOrCreateByIdResponse.parseOrThrow(_response.body, {
3782
- unrecognizedObjectKeys: "passthrough",
3783
- allowUnrecognizedUnionMembers: true,
3784
- allowUnrecognizedEnumValues: true,
3785
- skipValidation: true,
3786
- breadcrumbsPrefix: ["response"]
3787
- });
3788
- }
3789
- if (_response.error.reason === "status-code") {
3790
- throw new RivetError({
3791
- statusCode: _response.error.statusCode,
3792
- body: _response.error.body
3793
- });
3794
- }
3795
- switch (_response.error.reason) {
3796
- case "non-json":
3797
- throw new RivetError({
3798
- statusCode: _response.error.statusCode,
3799
- body: _response.error.rawBody
3800
- });
3801
- case "timeout":
3802
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /actors/by-id.");
3803
- case "unknown":
3804
- throw new RivetError({
3805
- message: _response.error.errorMessage
3806
- });
3807
- }
3808
- }
3809
3478
  /**
3810
3479
  * 2 round trips:
3811
3480
  *
@@ -3837,6 +3506,7 @@ var RivetClient = class {
3837
3506
  ),
3838
3507
  method: "GET",
3839
3508
  headers: {
3509
+ Authorization: await this._getAuthorizationHeader(),
3840
3510
  "X-Fern-Language": "JavaScript",
3841
3511
  "X-Fern-Runtime": RUNTIME.type,
3842
3512
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -3878,73 +3548,6 @@ var RivetClient = class {
3878
3548
  });
3879
3549
  }
3880
3550
  }
3881
- /**
3882
- * 2 round trip:
3883
- *
3884
- * - GET /actors/{}
3885
- * - [api-peer] namespace::ops::resolve_for_name_global
3886
- *
3887
- * @param {Rivet.RivetId} actorId
3888
- * @param {Rivet.ActorsGetRequest} request
3889
- * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
3890
- *
3891
- * @example
3892
- * await client.actorsGet("actor_id")
3893
- */
3894
- async actorsGet(actorId, request = {}, requestOptions) {
3895
- const { namespace } = request;
3896
- const _queryParams = {};
3897
- if (namespace != null) {
3898
- _queryParams["namespace"] = namespace;
3899
- }
3900
- const _response = await (this._options.fetcher ?? fetcher)({
3901
- url: urlJoin5(
3902
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3903
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
3904
- ),
3905
- method: "GET",
3906
- headers: {
3907
- "X-Fern-Language": "JavaScript",
3908
- "X-Fern-Runtime": RUNTIME.type,
3909
- "X-Fern-Runtime-Version": RUNTIME.version,
3910
- ...requestOptions?.headers
3911
- },
3912
- contentType: "application/json",
3913
- queryParameters: _queryParams,
3914
- requestType: "json",
3915
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3916
- maxRetries: requestOptions?.maxRetries,
3917
- abortSignal: requestOptions?.abortSignal
3918
- });
3919
- if (_response.ok) {
3920
- return ActorsGetResponse.parseOrThrow(_response.body, {
3921
- unrecognizedObjectKeys: "passthrough",
3922
- allowUnrecognizedUnionMembers: true,
3923
- allowUnrecognizedEnumValues: true,
3924
- skipValidation: true,
3925
- breadcrumbsPrefix: ["response"]
3926
- });
3927
- }
3928
- if (_response.error.reason === "status-code") {
3929
- throw new RivetError({
3930
- statusCode: _response.error.statusCode,
3931
- body: _response.error.body
3932
- });
3933
- }
3934
- switch (_response.error.reason) {
3935
- case "non-json":
3936
- throw new RivetError({
3937
- statusCode: _response.error.statusCode,
3938
- body: _response.error.rawBody
3939
- });
3940
- case "timeout":
3941
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
3942
- case "unknown":
3943
- throw new RivetError({
3944
- message: _response.error.errorMessage
3945
- });
3946
- }
3947
- }
3948
3551
  /**
3949
3552
  * 2 round trip:
3950
3553
  *
@@ -3971,6 +3574,7 @@ var RivetClient = class {
3971
3574
  ),
3972
3575
  method: "DELETE",
3973
3576
  headers: {
3577
+ Authorization: await this._getAuthorizationHeader(),
3974
3578
  "X-Fern-Language": "JavaScript",
3975
3579
  "X-Fern-Runtime": RUNTIME.type,
3976
3580
  "X-Fern-Runtime-Version": RUNTIME.version,
@@ -4012,6 +3616,9 @@ var RivetClient = class {
4012
3616
  });
4013
3617
  }
4014
3618
  }
3619
+ async _getAuthorizationHeader() {
3620
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3621
+ }
4015
3622
  };
4016
3623
  export {
4017
3624
  api_exports as Rivet,