@rivetkit/engine-api-full 0.0.0-sqlite-sync-3-0-6-final.cf8679c → 0.0.0-sqlite-query-metrics-2-3-32.5bb1917

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 (202) hide show
  1. package/dist/browser/cjs/index.js +1081 -327
  2. package/dist/browser/cjs/serialization.js +379 -94
  3. package/dist/browser/esm/index.js +1081 -327
  4. package/dist/browser/esm/serialization.js +379 -94
  5. package/dist/node/cjs/index.js +1081 -327
  6. package/dist/node/cjs/serialization.js +421 -104
  7. package/dist/node/esm/index.js +1081 -327
  8. package/dist/node/esm/serialization.js +379 -94
  9. package/package.json +1 -2
  10. package/types/Client.d.ts +91 -7
  11. package/types/api/client/requests/ActorsCreateRequest.d.ts +7 -3
  12. package/types/api/client/requests/ActorsDeleteRequest.d.ts +1 -1
  13. package/types/api/client/requests/ActorsGetOrCreateRequest.d.ts +8 -4
  14. package/types/api/client/requests/ActorsKvGetRequest.d.ts +12 -0
  15. package/types/api/client/requests/ActorsListNamesRequest.d.ts +1 -1
  16. package/types/api/client/requests/ActorsListRequest.d.ts +5 -2
  17. package/types/api/client/requests/ActorsRescheduleRequest.d.ts +5 -1
  18. package/types/api/client/requests/ActorsSleepRequest.d.ts +5 -1
  19. package/types/api/client/requests/RunnerConfigsDeleteRequest.d.ts +12 -0
  20. package/types/api/client/requests/RunnerConfigsListRequest.d.ts +21 -0
  21. package/types/api/client/requests/RunnerConfigsRefreshMetadataRequest.d.ts +17 -0
  22. package/types/api/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +15 -0
  23. package/types/api/client/requests/RunnerConfigsUpsertRequestBody.d.ts +17 -0
  24. package/types/api/client/requests/index.d.ts +6 -1
  25. package/types/api/resources/authTokens/client/Client.d.ts +20 -0
  26. package/types/api/resources/authTokens/client/index.d.ts +0 -1
  27. package/types/api/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +1 -5
  28. package/types/api/resources/envoys/client/Client.d.ts +39 -0
  29. package/types/api/resources/{pools/client/requests/PoolsListRequest.d.ts → envoys/client/requests/EnvoysListRequest.d.ts} +4 -2
  30. package/types/api/resources/envoys/client/requests/index.d.ts +1 -0
  31. package/types/api/resources/health/client/Client.d.ts +36 -0
  32. package/types/api/resources/health/client/index.d.ts +1 -0
  33. package/types/api/resources/health/index.d.ts +1 -0
  34. package/types/api/resources/index.d.ts +5 -2
  35. package/types/api/resources/namespaces/client/Client.d.ts +1 -0
  36. package/types/api/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +2 -0
  37. package/types/api/resources/namespaces/client/requests/NamespacesListRequest.d.ts +6 -0
  38. package/types/api/resources/runners/client/Client.d.ts +54 -0
  39. package/types/api/resources/runners/client/index.d.ts +1 -0
  40. package/types/api/resources/{pools/client/requests/PoolsListNodesRequest.d.ts → runners/client/requests/RunnersListNamesRequest.d.ts} +2 -2
  41. package/types/api/resources/runners/client/requests/RunnersListRequest.d.ts +22 -0
  42. package/types/api/resources/runners/client/requests/index.d.ts +2 -0
  43. package/types/api/resources/runners/index.d.ts +1 -0
  44. package/types/api/types/Actor.d.ts +27 -21
  45. package/types/api/types/ActorName.d.ts +3 -1
  46. package/types/api/types/ActorsCreateResponse.d.ts +3 -2
  47. package/types/api/types/ActorsDeleteResponse.d.ts +4 -1
  48. package/types/api/types/ActorsGetOrCreateResponse.d.ts +3 -1
  49. package/types/api/types/ActorsKvGetResponse.d.ts +7 -0
  50. package/types/api/types/ActorsListNamesResponse.d.ts +4 -1
  51. package/types/api/types/ActorsListResponse.d.ts +4 -1
  52. package/types/api/types/ActorsRescheduleRequestBody.d.ts +4 -0
  53. package/types/api/types/ActorsRescheduleResponse.d.ts +4 -1
  54. package/types/api/types/ActorsSleepRequestBody.d.ts +4 -0
  55. package/types/api/types/ActorsSleepResponse.d.ts +4 -1
  56. package/types/api/types/AuthOperationKind.d.ts +10 -0
  57. package/types/api/types/AuthTokenCreateResponse.d.ts +5 -5
  58. package/types/api/types/AuthTokenGrant.d.ts +6 -4
  59. package/types/api/types/AuthTokenInspectResponse.d.ts +7 -9
  60. package/types/api/types/AuthTokenResource.d.ts +13 -0
  61. package/types/api/types/AuthTokenTargetScope.d.ts +5 -0
  62. package/types/api/types/AuthTokenTargetScopeId.d.ts +7 -0
  63. package/types/api/types/CrashPolicy.d.ts +9 -0
  64. package/types/api/types/Datacenter.d.ts +5 -1
  65. package/types/api/types/DatacenterHealth.d.ts +12 -0
  66. package/types/api/types/DatacentersListResponse.d.ts +5 -1
  67. package/types/api/types/Envoy.d.ts +18 -0
  68. package/types/api/types/EnvoysListResponse.d.ts +8 -0
  69. package/types/api/types/HealthFanoutResponse.d.ts +7 -0
  70. package/types/api/types/HealthResponse.d.ts +8 -0
  71. package/types/api/types/HealthStatus.d.ts +8 -0
  72. package/types/api/types/MetadataGetResponse.d.ts +12 -8
  73. package/types/api/types/Namespace.d.ts +7 -3
  74. package/types/api/types/NamespaceListResponse.d.ts +4 -1
  75. package/types/api/types/NamespacesCreateResponse.d.ts +3 -0
  76. package/types/api/types/Pagination.d.ts +4 -2
  77. package/types/api/types/RivetId.d.ts +3 -0
  78. package/types/api/types/Runner.d.ts +21 -0
  79. package/types/api/types/RunnerConfig.d.ts +11 -0
  80. package/types/api/types/RunnerConfigKind.d.ts +5 -0
  81. package/types/api/types/RunnerConfigKindNormal.d.ts +7 -0
  82. package/types/api/types/RunnerConfigKindNormalNormal.d.ts +12 -0
  83. package/types/api/types/RunnerConfigKindServerless.d.ts +7 -0
  84. package/types/api/types/RunnerConfigKindServerlessServerless.d.ts +29 -0
  85. package/types/api/types/RunnerConfigNormal.d.ts +12 -0
  86. package/types/api/types/RunnerConfigResponse.d.ts +8 -0
  87. package/types/api/types/RunnerConfigServerless.d.ts +29 -0
  88. package/types/api/types/RunnerConfigVariant.d.ts +8 -0
  89. package/types/api/types/RunnerConfigsDeleteResponse.d.ts +4 -0
  90. package/types/api/types/RunnerConfigsListResponse.d.ts +8 -0
  91. package/types/api/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +7 -0
  92. package/types/api/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +4 -0
  93. package/types/api/types/RunnerConfigsRefreshMetadataResponse.d.ts +4 -0
  94. package/types/api/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +5 -0
  95. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +7 -0
  96. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +7 -0
  97. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +7 -0
  98. package/types/api/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +6 -0
  99. package/types/api/types/RunnerConfigsServerlessMetadataError.d.ts +16 -0
  100. package/types/api/types/RunnerConfigsUpsertResponse.d.ts +6 -0
  101. package/types/api/types/RunnersListNamesResponse.d.ts +8 -0
  102. package/types/api/types/RunnersListResponse.d.ts +8 -0
  103. package/types/api/types/index.d.ts +38 -10
  104. package/types/serialization/client/requests/ActorsCreateRequest.d.ts +4 -1
  105. package/types/serialization/client/requests/ActorsGetOrCreateRequest.d.ts +5 -2
  106. package/types/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.d.ts +13 -0
  107. package/types/serialization/client/requests/RunnerConfigsUpsertRequestBody.d.ts +13 -0
  108. package/types/serialization/client/requests/index.d.ts +2 -0
  109. package/types/serialization/resources/authTokens/client/index.d.ts +1 -0
  110. package/types/serialization/resources/authTokens/client/requests/AuthTokenCreateRequest.d.ts +16 -0
  111. package/types/serialization/resources/authTokens/client/requests/index.d.ts +1 -0
  112. package/types/serialization/resources/authTokens/index.d.ts +1 -0
  113. package/types/serialization/resources/index.d.ts +2 -0
  114. package/types/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.d.ts +1 -0
  115. package/types/serialization/types/Actor.d.ts +17 -10
  116. package/types/serialization/types/ActorName.d.ts +3 -0
  117. package/types/serialization/types/ActorsCreateResponse.d.ts +3 -1
  118. package/types/serialization/types/ActorsDeleteResponse.d.ts +4 -1
  119. package/types/serialization/types/ActorsGetOrCreateResponse.d.ts +3 -0
  120. package/types/serialization/types/ActorsKvGetResponse.d.ts +13 -0
  121. package/types/serialization/types/ActorsListNamesResponse.d.ts +5 -0
  122. package/types/serialization/types/ActorsListResponse.d.ts +4 -1
  123. package/types/serialization/types/ActorsRescheduleRequestBody.d.ts +10 -0
  124. package/types/serialization/types/ActorsRescheduleResponse.d.ts +4 -1
  125. package/types/serialization/types/ActorsSleepRequestBody.d.ts +10 -0
  126. package/types/serialization/types/ActorsSleepResponse.d.ts +4 -1
  127. package/types/serialization/types/AuthOperationKind.d.ts +3 -0
  128. package/types/serialization/types/AuthTokenCreateResponse.d.ts +5 -2
  129. package/types/serialization/types/AuthTokenGrant.d.ts +8 -5
  130. package/types/serialization/types/AuthTokenInspectResponse.d.ts +8 -4
  131. package/types/serialization/types/AuthTokenResource.d.ts +10 -0
  132. package/types/serialization/types/AuthTokenTargetScope.d.ts +11 -0
  133. package/types/serialization/types/AuthTokenTargetScopeId.d.ts +13 -0
  134. package/types/serialization/types/CrashPolicy.d.ts +10 -0
  135. package/types/serialization/types/Datacenter.d.ts +5 -0
  136. package/types/serialization/types/DatacenterHealth.d.ts +19 -0
  137. package/types/serialization/types/DatacentersListResponse.d.ts +6 -1
  138. package/types/serialization/types/Envoy.d.ts +24 -0
  139. package/types/serialization/types/EnvoysListResponse.d.ts +15 -0
  140. package/types/serialization/types/HealthFanoutResponse.d.ts +13 -0
  141. package/types/serialization/types/HealthResponse.d.ts +14 -0
  142. package/types/serialization/types/HealthStatus.d.ts +10 -0
  143. package/types/serialization/types/MetadataGetResponse.d.ts +12 -4
  144. package/types/serialization/types/Namespace.d.ts +7 -1
  145. package/types/serialization/types/NamespaceListResponse.d.ts +4 -1
  146. package/types/serialization/types/NamespacesCreateResponse.d.ts +3 -0
  147. package/types/serialization/types/Pagination.d.ts +4 -1
  148. package/types/serialization/types/RivetId.d.ts +3 -0
  149. package/types/serialization/types/Runner.d.ts +27 -0
  150. package/types/serialization/types/RunnerConfig.d.ts +17 -0
  151. package/types/serialization/types/RunnerConfigKind.d.ts +12 -0
  152. package/types/serialization/types/RunnerConfigKindNormal.d.ts +13 -0
  153. package/types/serialization/types/RunnerConfigKindNormalNormal.d.ts +15 -0
  154. package/types/serialization/types/RunnerConfigKindServerless.d.ts +13 -0
  155. package/types/serialization/types/RunnerConfigKindServerlessServerless.d.ts +25 -0
  156. package/types/serialization/types/RunnerConfigNormal.d.ts +15 -0
  157. package/types/serialization/types/RunnerConfigResponse.d.ts +14 -0
  158. package/types/serialization/types/RunnerConfigServerless.d.ts +25 -0
  159. package/types/serialization/types/RunnerConfigVariant.d.ts +10 -0
  160. package/types/serialization/types/RunnerConfigsDeleteResponse.d.ts +10 -0
  161. package/types/serialization/types/RunnerConfigsListResponse.d.ts +15 -0
  162. package/types/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.d.ts +13 -0
  163. package/types/serialization/types/RunnerConfigsRefreshMetadataRequestBody.d.ts +10 -0
  164. package/types/serialization/types/RunnerConfigsRefreshMetadataResponse.d.ts +10 -0
  165. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponse.d.ts +12 -0
  166. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.d.ts +13 -0
  167. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.d.ts +13 -0
  168. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.d.ts +13 -0
  169. package/types/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.d.ts +12 -0
  170. package/types/serialization/types/RunnerConfigsServerlessMetadataError.d.ts +14 -0
  171. package/types/serialization/types/RunnerConfigsUpsertResponse.d.ts +12 -0
  172. package/types/serialization/types/RunnersListNamesResponse.d.ts +14 -0
  173. package/types/serialization/types/RunnersListResponse.d.ts +15 -0
  174. package/types/serialization/types/index.d.ts +38 -10
  175. package/types/api/client/requests/ActorsGetRequest.d.ts +0 -3
  176. package/types/api/resources/pools/client/Client.d.ts +0 -57
  177. package/types/api/resources/pools/client/requests/PoolsDeleteRequest.d.ts +0 -3
  178. package/types/api/resources/pools/client/requests/PoolsGetRequest.d.ts +0 -3
  179. package/types/api/resources/pools/client/requests/PoolsUpsertRequest.d.ts +0 -8
  180. package/types/api/resources/pools/client/requests/index.d.ts +0 -5
  181. package/types/api/types/ActorsGetResponse.d.ts +0 -4
  182. package/types/api/types/AuthResourceKind.d.ts +0 -1
  183. package/types/api/types/AuthTargetScope.d.ts +0 -4
  184. package/types/api/types/ErrorResponse.d.ts +0 -10
  185. package/types/api/types/Node.d.ts +0 -20
  186. package/types/api/types/Pool.d.ts +0 -14
  187. package/types/api/types/PoolResponse.d.ts +0 -4
  188. package/types/api/types/PoolsDeleteResponse.d.ts +0 -1
  189. package/types/api/types/PoolsListNodesResponse.d.ts +0 -5
  190. package/types/api/types/PoolsListResponse.d.ts +0 -5
  191. package/types/serialization/types/ActorsGetResponse.d.ts +0 -10
  192. package/types/serialization/types/AuthResourceKind.d.ts +0 -7
  193. package/types/serialization/types/AuthTargetScope.d.ts +0 -10
  194. package/types/serialization/types/ErrorResponse.d.ts +0 -12
  195. package/types/serialization/types/Node.d.ts +0 -17
  196. package/types/serialization/types/Pool.d.ts +0 -14
  197. package/types/serialization/types/PoolResponse.d.ts +0 -10
  198. package/types/serialization/types/PoolsDeleteResponse.d.ts +0 -7
  199. package/types/serialization/types/PoolsListNodesResponse.d.ts +0 -12
  200. package/types/serialization/types/PoolsListResponse.d.ts +0 -12
  201. /package/types/api/resources/{pools → envoys}/client/index.d.ts +0 -0
  202. /package/types/api/resources/{pools → envoys}/index.d.ts +0 -0
@@ -584,18 +584,79 @@ module.exports = __toCommonJS(src_exports);
584
584
  // src/api/index.ts
585
585
  var api_exports = {};
586
586
  __export(api_exports, {
587
+ AuthOperationKind: () => AuthOperationKind,
588
+ AuthTokenResource: () => AuthTokenResource,
589
+ CrashPolicy: () => CrashPolicy,
590
+ HealthStatus: () => HealthStatus,
591
+ RunnerConfigVariant: () => RunnerConfigVariant,
587
592
  authTokens: () => authTokens_exports,
588
593
  datacenters: () => datacenters_exports,
594
+ envoys: () => envoys_exports,
595
+ health: () => health_exports,
589
596
  metadata: () => metadata_exports,
590
- namespaces: () => namespaces_exports2,
591
- pools: () => pools_exports
597
+ namespaces: () => namespaces_exports,
598
+ runners: () => runners_exports
592
599
  });
593
600
 
601
+ // src/api/types/AuthOperationKind.ts
602
+ var AuthOperationKind = {
603
+ Read: "read",
604
+ Update: "update",
605
+ List: "list",
606
+ Create: "create",
607
+ Delete: "delete"
608
+ };
609
+
610
+ // src/api/types/AuthTokenResource.ts
611
+ var AuthTokenResource = {
612
+ Namespace: "namespace",
613
+ Actor: "actor",
614
+ Runner: "runner",
615
+ RunnerConfig: "runner_config",
616
+ Datacenter: "datacenter",
617
+ ActorGateway: "actor_gateway",
618
+ ActorKv: "actor_kv"
619
+ };
620
+
621
+ // src/api/types/CrashPolicy.ts
622
+ var CrashPolicy = {
623
+ Restart: "restart",
624
+ Sleep: "sleep",
625
+ Destroy: "destroy"
626
+ };
627
+
628
+ // src/api/types/HealthStatus.ts
629
+ var HealthStatus = {
630
+ Ok: "ok",
631
+ Error: "error"
632
+ };
633
+
634
+ // src/api/types/RunnerConfigVariant.ts
635
+ var RunnerConfigVariant = {
636
+ Serverless: "serverless",
637
+ Normal: "normal"
638
+ };
639
+
594
640
  // src/api/resources/authTokens/index.ts
595
641
  var authTokens_exports = {};
596
- __export(authTokens_exports, {
597
- AuthTokens: () => AuthTokens
598
- });
642
+
643
+ // src/api/resources/datacenters/index.ts
644
+ var datacenters_exports = {};
645
+
646
+ // src/api/resources/envoys/index.ts
647
+ var envoys_exports = {};
648
+
649
+ // src/api/resources/health/index.ts
650
+ var health_exports = {};
651
+
652
+ // src/api/resources/metadata/index.ts
653
+ var metadata_exports = {};
654
+
655
+ // src/api/resources/namespaces/index.ts
656
+ var namespaces_exports = {};
657
+
658
+ // src/api/resources/runners/index.ts
659
+ var runners_exports = {};
599
660
 
600
661
  // src/core/json.ts
601
662
  var toJson = (value, replacer, space) => {
@@ -2310,9 +2371,6 @@ function transformAndValidateUnion({
2310
2371
  };
2311
2372
  }
2312
2373
 
2313
- // src/api/resources/authTokens/client/Client.ts
2314
- var import_url_join = __toESM(require("url-join"));
2315
-
2316
2374
  // src/serialization/index.ts
2317
2375
  var serialization_exports = {};
2318
2376
  __export(serialization_exports, {
@@ -2323,53 +2381,91 @@ __export(serialization_exports, {
2323
2381
  ActorsDeleteResponse: () => ActorsDeleteResponse,
2324
2382
  ActorsGetOrCreateRequest: () => ActorsGetOrCreateRequest,
2325
2383
  ActorsGetOrCreateResponse: () => ActorsGetOrCreateResponse,
2326
- ActorsGetResponse: () => ActorsGetResponse,
2384
+ ActorsKvGetResponse: () => ActorsKvGetResponse,
2327
2385
  ActorsListNamesResponse: () => ActorsListNamesResponse,
2328
2386
  ActorsListResponse: () => ActorsListResponse,
2387
+ ActorsRescheduleRequestBody: () => ActorsRescheduleRequestBody,
2329
2388
  ActorsRescheduleResponse: () => ActorsRescheduleResponse,
2389
+ ActorsSleepRequestBody: () => ActorsSleepRequestBody,
2330
2390
  ActorsSleepResponse: () => ActorsSleepResponse,
2331
- AuthOperationKind: () => AuthOperationKind,
2332
- AuthResourceKind: () => AuthResourceKind,
2333
- AuthTargetScope: () => AuthTargetScope,
2391
+ AuthOperationKind: () => AuthOperationKind2,
2392
+ AuthTokenCreateRequest: () => AuthTokenCreateRequest,
2334
2393
  AuthTokenCreateResponse: () => AuthTokenCreateResponse,
2335
2394
  AuthTokenGrant: () => AuthTokenGrant,
2336
2395
  AuthTokenInspectResponse: () => AuthTokenInspectResponse,
2396
+ AuthTokenResource: () => AuthTokenResource2,
2397
+ AuthTokenTargetScope: () => AuthTokenTargetScope,
2398
+ AuthTokenTargetScopeId: () => AuthTokenTargetScopeId,
2399
+ CrashPolicy: () => CrashPolicy2,
2337
2400
  Datacenter: () => Datacenter,
2401
+ DatacenterHealth: () => DatacenterHealth,
2338
2402
  DatacentersListResponse: () => DatacentersListResponse,
2339
- ErrorResponse: () => ErrorResponse,
2403
+ Envoy: () => Envoy,
2404
+ EnvoysListResponse: () => EnvoysListResponse,
2405
+ HealthFanoutResponse: () => HealthFanoutResponse,
2406
+ HealthResponse: () => HealthResponse,
2407
+ HealthStatus: () => HealthStatus2,
2340
2408
  MetadataGetResponse: () => MetadataGetResponse,
2341
2409
  Namespace: () => Namespace,
2342
2410
  NamespaceListResponse: () => NamespaceListResponse,
2343
2411
  NamespacesCreateRequest: () => NamespacesCreateRequest,
2344
2412
  NamespacesCreateResponse: () => NamespacesCreateResponse,
2345
- Node: () => Node,
2346
2413
  Pagination: () => Pagination,
2347
- Pool: () => Pool,
2348
- PoolResponse: () => PoolResponse,
2349
- PoolsDeleteResponse: () => PoolsDeleteResponse,
2350
- PoolsListNodesResponse: () => PoolsListNodesResponse,
2351
- PoolsListResponse: () => PoolsListResponse,
2352
2414
  RivetId: () => RivetId,
2353
- namespaces: () => namespaces_exports
2415
+ Runner: () => Runner,
2416
+ RunnerConfig: () => RunnerConfig,
2417
+ RunnerConfigKind: () => RunnerConfigKind,
2418
+ RunnerConfigKindNormal: () => RunnerConfigKindNormal,
2419
+ RunnerConfigKindNormalNormal: () => RunnerConfigKindNormalNormal,
2420
+ RunnerConfigKindServerless: () => RunnerConfigKindServerless,
2421
+ RunnerConfigKindServerlessServerless: () => RunnerConfigKindServerlessServerless,
2422
+ RunnerConfigNormal: () => RunnerConfigNormal,
2423
+ RunnerConfigResponse: () => RunnerConfigResponse,
2424
+ RunnerConfigServerless: () => RunnerConfigServerless,
2425
+ RunnerConfigVariant: () => RunnerConfigVariant2,
2426
+ RunnerConfigsDeleteResponse: () => RunnerConfigsDeleteResponse,
2427
+ RunnerConfigsListResponse: () => RunnerConfigsListResponse,
2428
+ RunnerConfigsListResponseRunnerConfigsValue: () => RunnerConfigsListResponseRunnerConfigsValue,
2429
+ RunnerConfigsRefreshMetadataRequestBody: () => RunnerConfigsRefreshMetadataRequestBody,
2430
+ RunnerConfigsRefreshMetadataResponse: () => RunnerConfigsRefreshMetadataResponse,
2431
+ RunnerConfigsServerlessHealthCheckRequest: () => RunnerConfigsServerlessHealthCheckRequest,
2432
+ RunnerConfigsServerlessHealthCheckResponse: () => RunnerConfigsServerlessHealthCheckResponse,
2433
+ RunnerConfigsServerlessHealthCheckResponseFailure: () => RunnerConfigsServerlessHealthCheckResponseFailure,
2434
+ RunnerConfigsServerlessHealthCheckResponseFailureFailure: () => RunnerConfigsServerlessHealthCheckResponseFailureFailure,
2435
+ RunnerConfigsServerlessHealthCheckResponseSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccess,
2436
+ RunnerConfigsServerlessHealthCheckResponseSuccessSuccess: () => RunnerConfigsServerlessHealthCheckResponseSuccessSuccess,
2437
+ RunnerConfigsServerlessMetadataError: () => RunnerConfigsServerlessMetadataError,
2438
+ RunnerConfigsUpsertRequestBody: () => RunnerConfigsUpsertRequestBody,
2439
+ RunnerConfigsUpsertResponse: () => RunnerConfigsUpsertResponse,
2440
+ RunnersListNamesResponse: () => RunnersListNamesResponse,
2441
+ RunnersListResponse: () => RunnersListResponse,
2442
+ authTokens: () => authTokens_exports2,
2443
+ namespaces: () => namespaces_exports2
2354
2444
  });
2355
2445
 
2356
2446
  // src/serialization/types/RivetId.ts
2357
2447
  var RivetId = schemas_exports.string();
2358
2448
 
2449
+ // src/serialization/types/CrashPolicy.ts
2450
+ var CrashPolicy2 = schemas_exports.enum_(["restart", "sleep", "destroy"]);
2451
+
2359
2452
  // src/serialization/types/Actor.ts
2360
2453
  var Actor = schemas_exports.object({
2361
2454
  actorId: schemas_exports.property("actor_id", RivetId),
2362
- name: schemas_exports.string(),
2363
- key: schemas_exports.string(),
2364
- namespace: schemas_exports.string(),
2365
- pool: schemas_exports.string(),
2455
+ connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().optional()),
2456
+ crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2366
2457
  createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2367
- startTs: schemas_exports.property("start_ts", schemas_exports.number().nullable()),
2368
- pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().nullable()),
2369
- connectableTs: schemas_exports.property("connectable_ts", schemas_exports.number().nullable()),
2370
- sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().nullable()),
2371
- rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().nullable()),
2372
- destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().nullable())
2458
+ datacenter: schemas_exports.string(),
2459
+ destroyTs: schemas_exports.property("destroy_ts", schemas_exports.number().optional()),
2460
+ error: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2461
+ key: schemas_exports.string().optional(),
2462
+ name: schemas_exports.string(),
2463
+ namespaceId: schemas_exports.property("namespace_id", RivetId),
2464
+ pendingAllocationTs: schemas_exports.property("pending_allocation_ts", schemas_exports.number().optional()),
2465
+ rescheduleTs: schemas_exports.property("reschedule_ts", schemas_exports.number().optional()),
2466
+ runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string()),
2467
+ sleepTs: schemas_exports.property("sleep_ts", schemas_exports.number().optional()),
2468
+ startTs: schemas_exports.property("start_ts", schemas_exports.number().optional())
2373
2469
  });
2374
2470
 
2375
2471
  // src/serialization/types/ActorName.ts
@@ -2379,12 +2475,11 @@ var ActorName = schemas_exports.object({
2379
2475
 
2380
2476
  // src/serialization/types/ActorsCreateResponse.ts
2381
2477
  var ActorsCreateResponse = schemas_exports.object({
2382
- actor: Actor,
2383
- created: schemas_exports.boolean()
2478
+ actor: Actor
2384
2479
  });
2385
2480
 
2386
2481
  // src/serialization/types/ActorsDeleteResponse.ts
2387
- var ActorsDeleteResponse = schemas_exports.object({});
2482
+ var ActorsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2388
2483
 
2389
2484
  // src/serialization/types/ActorsGetOrCreateResponse.ts
2390
2485
  var ActorsGetOrCreateResponse = schemas_exports.object({
@@ -2392,19 +2487,21 @@ var ActorsGetOrCreateResponse = schemas_exports.object({
2392
2487
  created: schemas_exports.boolean()
2393
2488
  });
2394
2489
 
2395
- // src/serialization/types/ActorsGetResponse.ts
2396
- var ActorsGetResponse = schemas_exports.object({
2397
- actor: Actor
2398
- });
2399
-
2400
- // src/serialization/types/ActorsListNamesResponse.ts
2401
- var ActorsListNamesResponse = schemas_exports.object({
2402
- names: schemas_exports.record(schemas_exports.string(), ActorName)
2490
+ // src/serialization/types/ActorsKvGetResponse.ts
2491
+ var ActorsKvGetResponse = schemas_exports.object({
2492
+ updateTs: schemas_exports.property("update_ts", schemas_exports.number()),
2493
+ value: schemas_exports.string()
2403
2494
  });
2404
2495
 
2405
2496
  // src/serialization/types/Pagination.ts
2406
2497
  var Pagination = schemas_exports.object({
2407
- cursor: schemas_exports.string().nullable()
2498
+ cursor: schemas_exports.string().optional()
2499
+ });
2500
+
2501
+ // src/serialization/types/ActorsListNamesResponse.ts
2502
+ var ActorsListNamesResponse = schemas_exports.object({
2503
+ names: schemas_exports.record(schemas_exports.string(), ActorName),
2504
+ pagination: Pagination
2408
2505
  });
2409
2506
 
2410
2507
  // src/serialization/types/ActorsListResponse.ts
@@ -2413,76 +2510,143 @@ var ActorsListResponse = schemas_exports.object({
2413
2510
  pagination: Pagination
2414
2511
  });
2415
2512
 
2513
+ // src/serialization/types/ActorsRescheduleRequestBody.ts
2514
+ var ActorsRescheduleRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2515
+
2416
2516
  // src/serialization/types/ActorsRescheduleResponse.ts
2417
- var ActorsRescheduleResponse = schemas_exports.object({});
2517
+ var ActorsRescheduleResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2518
+
2519
+ // src/serialization/types/ActorsSleepRequestBody.ts
2520
+ var ActorsSleepRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2418
2521
 
2419
2522
  // src/serialization/types/ActorsSleepResponse.ts
2420
- var ActorsSleepResponse = schemas_exports.object({});
2523
+ var ActorsSleepResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2421
2524
 
2422
2525
  // src/serialization/types/AuthOperationKind.ts
2423
- var AuthOperationKind = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
2424
-
2425
- // src/serialization/types/AuthResourceKind.ts
2426
- var AuthResourceKind = schemas_exports.enum_(["namespace", "actor", "node", "pool", "datacenter", "actor_gateway", "actor_kv"]);
2427
-
2428
- // src/serialization/types/AuthTargetScope.ts
2429
- var AuthTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), schemas_exports.object({
2430
- id: RivetId
2431
- })]);
2526
+ var AuthOperationKind2 = schemas_exports.enum_(["read", "update", "list", "create", "delete"]);
2432
2527
 
2433
2528
  // src/serialization/types/AuthTokenCreateResponse.ts
2434
2529
  var AuthTokenCreateResponse = schemas_exports.object({
2435
- token: schemas_exports.string(),
2530
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2436
2531
  issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2437
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2532
+ token: schemas_exports.string()
2533
+ });
2534
+
2535
+ // src/serialization/types/AuthTokenResource.ts
2536
+ var AuthTokenResource2 = schemas_exports.enum_([
2537
+ "namespace",
2538
+ "actor",
2539
+ "runner",
2540
+ "runner_config",
2541
+ "datacenter",
2542
+ "actor_gateway",
2543
+ "actor_kv"
2544
+ ]);
2545
+
2546
+ // src/serialization/types/AuthTokenTargetScopeId.ts
2547
+ var AuthTokenTargetScopeId = schemas_exports.object({
2548
+ id: RivetId
2438
2549
  });
2439
2550
 
2551
+ // src/serialization/types/AuthTokenTargetScope.ts
2552
+ var AuthTokenTargetScope = schemas_exports.undiscriminatedUnion([schemas_exports.stringLiteral("any"), AuthTokenTargetScopeId]);
2553
+
2440
2554
  // src/serialization/types/AuthTokenGrant.ts
2441
2555
  var AuthTokenGrant = schemas_exports.object({
2442
- resource: AuthResourceKind,
2443
- target: AuthTargetScope,
2444
- operations: schemas_exports.list(AuthOperationKind)
2556
+ operations: schemas_exports.list(AuthOperationKind2),
2557
+ resource: AuthTokenResource2,
2558
+ target: AuthTokenTargetScope
2445
2559
  });
2446
2560
 
2447
2561
  // src/serialization/types/AuthTokenInspectResponse.ts
2448
2562
  var AuthTokenInspectResponse = schemas_exports.object({
2449
- namespace: schemas_exports.string(),
2450
- subject: schemas_exports.string().nullable(),
2563
+ expiresTs: schemas_exports.property("expires_ts", schemas_exports.number()),
2451
2564
  grants: schemas_exports.list(AuthTokenGrant),
2452
2565
  issuedTs: schemas_exports.property("issued_ts", schemas_exports.number()),
2453
- expiresTs: schemas_exports.property("expires_ts", schemas_exports.number())
2566
+ namespaceId: schemas_exports.property("namespace_id", RivetId),
2567
+ subject: schemas_exports.string().optional()
2454
2568
  });
2455
2569
 
2456
2570
  // src/serialization/types/Datacenter.ts
2457
2571
  var Datacenter = schemas_exports.object({
2458
- name: schemas_exports.string()
2572
+ label: schemas_exports.number(),
2573
+ name: schemas_exports.string(),
2574
+ url: schemas_exports.string()
2575
+ });
2576
+
2577
+ // src/serialization/types/HealthResponse.ts
2578
+ var HealthResponse = schemas_exports.object({
2579
+ runtime: schemas_exports.string(),
2580
+ status: schemas_exports.string(),
2581
+ version: schemas_exports.string()
2582
+ });
2583
+
2584
+ // src/serialization/types/HealthStatus.ts
2585
+ var HealthStatus2 = schemas_exports.enum_(["ok", "error"]);
2586
+
2587
+ // src/serialization/types/DatacenterHealth.ts
2588
+ var DatacenterHealth = schemas_exports.object({
2589
+ datacenterLabel: schemas_exports.property("datacenter_label", schemas_exports.number()),
2590
+ datacenterName: schemas_exports.property("datacenter_name", schemas_exports.string()),
2591
+ error: schemas_exports.string().optional(),
2592
+ response: HealthResponse.optional(),
2593
+ rttMs: schemas_exports.property("rtt_ms", schemas_exports.number().optional()),
2594
+ status: HealthStatus2
2459
2595
  });
2460
2596
 
2461
2597
  // src/serialization/types/DatacentersListResponse.ts
2462
2598
  var DatacentersListResponse = schemas_exports.object({
2463
- datacenters: schemas_exports.list(Datacenter)
2599
+ datacenters: schemas_exports.list(Datacenter),
2600
+ pagination: Pagination
2464
2601
  });
2465
2602
 
2466
- // src/serialization/types/ErrorResponse.ts
2467
- var ErrorResponse = schemas_exports.object({
2468
- group: schemas_exports.string(),
2469
- code: schemas_exports.string(),
2470
- message: schemas_exports.string(),
2471
- metadata: schemas_exports.unknown().optional()
2603
+ // src/serialization/types/Envoy.ts
2604
+ var Envoy = schemas_exports.object({
2605
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2606
+ datacenter: schemas_exports.string(),
2607
+ envoyKey: schemas_exports.property("envoy_key", schemas_exports.string()),
2608
+ lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2609
+ lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2610
+ lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2611
+ metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2612
+ namespaceId: schemas_exports.property("namespace_id", RivetId),
2613
+ poolName: schemas_exports.property("pool_name", schemas_exports.string()),
2614
+ slots: schemas_exports.number(),
2615
+ stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2616
+ version: schemas_exports.number()
2617
+ });
2618
+
2619
+ // src/serialization/types/EnvoysListResponse.ts
2620
+ var EnvoysListResponse = schemas_exports.object({
2621
+ envoys: schemas_exports.list(Envoy),
2622
+ pagination: Pagination
2623
+ });
2624
+
2625
+ // src/serialization/types/HealthFanoutResponse.ts
2626
+ var HealthFanoutResponse = schemas_exports.object({
2627
+ datacenters: schemas_exports.list(DatacenterHealth)
2472
2628
  });
2473
2629
 
2474
2630
  // src/serialization/types/MetadataGetResponse.ts
2475
2631
  var MetadataGetResponse = schemas_exports.object({
2476
- runtime: schemas_exports.stringLiteral("engine"),
2477
- version: schemas_exports.string(),
2478
- envoyProtocolVersion: schemas_exports.number(),
2479
- actorNames: schemas_exports.record(schemas_exports.string(), ActorName).optional()
2632
+ buildTimestamp: schemas_exports.property("build_timestamp", schemas_exports.string()),
2633
+ cargoProfile: schemas_exports.property("cargo_profile", schemas_exports.string()),
2634
+ cargoTarget: schemas_exports.property("cargo_target", schemas_exports.string()),
2635
+ envoyProtocolVersion: schemas_exports.property("envoy_protocol_version", schemas_exports.number()),
2636
+ epoxyProtocolVersion: schemas_exports.property("epoxy_protocol_version", schemas_exports.number()),
2637
+ gitSha: schemas_exports.property("git_sha", schemas_exports.string()),
2638
+ runtime: schemas_exports.string(),
2639
+ rustcHost: schemas_exports.property("rustc_host", schemas_exports.string()),
2640
+ rustcVersion: schemas_exports.property("rustc_version", schemas_exports.string()),
2641
+ version: schemas_exports.string()
2480
2642
  });
2481
2643
 
2482
2644
  // src/serialization/types/Namespace.ts
2483
2645
  var Namespace = schemas_exports.object({
2646
+ createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2647
+ displayName: schemas_exports.property("display_name", schemas_exports.string()),
2484
2648
  name: schemas_exports.string(),
2485
- createTs: schemas_exports.property("create_ts", schemas_exports.number())
2649
+ namespaceId: schemas_exports.property("namespace_id", RivetId)
2486
2650
  });
2487
2651
 
2488
2652
  // src/serialization/types/NamespaceListResponse.ts
@@ -2496,76 +2660,258 @@ var NamespacesCreateResponse = schemas_exports.object({
2496
2660
  namespace: Namespace
2497
2661
  });
2498
2662
 
2499
- // src/serialization/types/Node.ts
2500
- var Node = schemas_exports.object({
2501
- key: schemas_exports.string(),
2502
- pool: schemas_exports.string(),
2503
- namespace: schemas_exports.string(),
2504
- datacenter: schemas_exports.string(),
2505
- version: schemas_exports.number(),
2663
+ // src/serialization/types/Runner.ts
2664
+ var Runner = schemas_exports.object({
2506
2665
  createTs: schemas_exports.property("create_ts", schemas_exports.number()),
2666
+ datacenter: schemas_exports.string(),
2667
+ drainTs: schemas_exports.property("drain_ts", schemas_exports.number().optional()),
2668
+ key: schemas_exports.string(),
2669
+ lastConnectedTs: schemas_exports.property("last_connected_ts", schemas_exports.number().optional()),
2507
2670
  lastPingTs: schemas_exports.property("last_ping_ts", schemas_exports.number()),
2508
- connected: schemas_exports.boolean(),
2509
- stopping: schemas_exports.boolean()
2671
+ lastRtt: schemas_exports.property("last_rtt", schemas_exports.number()),
2672
+ metadata: schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional(),
2673
+ name: schemas_exports.string(),
2674
+ namespaceId: schemas_exports.property("namespace_id", RivetId),
2675
+ remainingSlots: schemas_exports.property("remaining_slots", schemas_exports.number()),
2676
+ runnerId: schemas_exports.property("runner_id", RivetId),
2677
+ stopTs: schemas_exports.property("stop_ts", schemas_exports.number().optional()),
2678
+ totalSlots: schemas_exports.property("total_slots", schemas_exports.number()),
2679
+ version: schemas_exports.number()
2510
2680
  });
2511
2681
 
2512
- // src/serialization/types/Pool.ts
2513
- var Pool = schemas_exports.object({
2514
- name: schemas_exports.string(),
2515
- drainOnVersionUpgrade: schemas_exports.property("drain_on_version_upgrade", schemas_exports.boolean()),
2516
- actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number()),
2517
- actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number()),
2518
- actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number()),
2519
- metadata: schemas_exports.unknown()
2682
+ // src/serialization/types/RunnerConfigNormal.ts
2683
+ var RunnerConfigNormal = schemas_exports.object({
2684
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2685
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2686
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2687
+ drainOnVersionUpgrade: schemas_exports.property(
2688
+ "drain_on_version_upgrade",
2689
+ schemas_exports.boolean().optional()
2690
+ )
2691
+ });
2692
+
2693
+ // src/serialization/types/RunnerConfigServerless.ts
2694
+ var RunnerConfigServerless = schemas_exports.object({
2695
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2696
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2697
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2698
+ drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2699
+ drainOnVersionUpgrade: schemas_exports.property(
2700
+ "drain_on_version_upgrade",
2701
+ schemas_exports.boolean().optional()
2702
+ ),
2703
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2704
+ maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2705
+ maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2706
+ metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2707
+ minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2708
+ requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2709
+ runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2710
+ slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2711
+ url: schemas_exports.string()
2712
+ });
2713
+
2714
+ // src/serialization/types/RunnerConfig.ts
2715
+ var RunnerConfig = schemas_exports.object({
2716
+ normal: RunnerConfigNormal.optional(),
2717
+ serverless: RunnerConfigServerless.optional(),
2718
+ drainOnVersionUpgrade: schemas_exports.property(
2719
+ "drain_on_version_upgrade",
2720
+ schemas_exports.boolean().optional()
2721
+ ),
2722
+ metadata: schemas_exports.unknown().optional()
2723
+ });
2724
+
2725
+ // src/serialization/types/RunnerConfigKindNormalNormal.ts
2726
+ var RunnerConfigKindNormalNormal = schemas_exports.object({
2727
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2728
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2729
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2730
+ drainOnVersionUpgrade: schemas_exports.property(
2731
+ "drain_on_version_upgrade",
2732
+ schemas_exports.boolean().optional()
2733
+ )
2734
+ });
2735
+
2736
+ // src/serialization/types/RunnerConfigKindNormal.ts
2737
+ var RunnerConfigKindNormal = schemas_exports.object({
2738
+ normal: RunnerConfigKindNormalNormal
2739
+ });
2740
+
2741
+ // src/serialization/types/RunnerConfigKindServerlessServerless.ts
2742
+ var RunnerConfigKindServerlessServerless = schemas_exports.object({
2743
+ actorEvictionDelay: schemas_exports.property("actor_eviction_delay", schemas_exports.number().optional()),
2744
+ actorEvictionPeriod: schemas_exports.property("actor_eviction_period", schemas_exports.number().optional()),
2745
+ actorEvictionRate: schemas_exports.property("actor_eviction_rate", schemas_exports.number().optional()),
2746
+ drainGracePeriod: schemas_exports.property("drain_grace_period", schemas_exports.number().optional()),
2747
+ drainOnVersionUpgrade: schemas_exports.property(
2748
+ "drain_on_version_upgrade",
2749
+ schemas_exports.boolean().optional()
2750
+ ),
2751
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2752
+ maxConcurrentActors: schemas_exports.property("max_concurrent_actors", schemas_exports.number().optional()),
2753
+ maxRunners: schemas_exports.property("max_runners", schemas_exports.number().optional()),
2754
+ metadataPollInterval: schemas_exports.property("metadata_poll_interval", schemas_exports.number().optional()),
2755
+ minRunners: schemas_exports.property("min_runners", schemas_exports.number().optional()),
2756
+ requestLifespan: schemas_exports.property("request_lifespan", schemas_exports.number()),
2757
+ runnersMargin: schemas_exports.property("runners_margin", schemas_exports.number().optional()),
2758
+ slotsPerRunner: schemas_exports.property("slots_per_runner", schemas_exports.number().optional()),
2759
+ url: schemas_exports.string()
2520
2760
  });
2521
2761
 
2522
- // src/serialization/types/PoolResponse.ts
2523
- var PoolResponse = schemas_exports.object({
2524
- pool: Pool
2762
+ // src/serialization/types/RunnerConfigKindServerless.ts
2763
+ var RunnerConfigKindServerless = schemas_exports.object({
2764
+ serverless: RunnerConfigKindServerlessServerless
2525
2765
  });
2526
2766
 
2527
- // src/serialization/types/PoolsDeleteResponse.ts
2528
- var PoolsDeleteResponse = schemas_exports.object({});
2767
+ // src/serialization/types/RunnerConfigKind.ts
2768
+ var RunnerConfigKind = schemas_exports.undiscriminatedUnion([RunnerConfigKindNormal, RunnerConfigKindServerless]);
2529
2769
 
2530
- // src/serialization/types/PoolsListNodesResponse.ts
2531
- var PoolsListNodesResponse = schemas_exports.object({
2532
- nodes: schemas_exports.list(Node),
2770
+ // src/serialization/types/RunnerConfigResponse.ts
2771
+ var RunnerConfigResponse = schemas_exports.object({
2772
+ protocolVersion: schemas_exports.property("protocol_version", schemas_exports.number().optional()),
2773
+ runnerPoolError: schemas_exports.property(
2774
+ "runner_pool_error",
2775
+ schemas_exports.record(schemas_exports.string(), schemas_exports.unknown()).optional()
2776
+ )
2777
+ }).extend(RunnerConfig);
2778
+
2779
+ // src/serialization/types/RunnerConfigVariant.ts
2780
+ var RunnerConfigVariant2 = schemas_exports.enum_(["serverless", "normal"]);
2781
+
2782
+ // src/serialization/types/RunnerConfigsDeleteResponse.ts
2783
+ var RunnerConfigsDeleteResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2784
+
2785
+ // src/serialization/types/RunnerConfigsListResponseRunnerConfigsValue.ts
2786
+ var RunnerConfigsListResponseRunnerConfigsValue = schemas_exports.object({
2787
+ datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfigResponse)
2788
+ });
2789
+
2790
+ // src/serialization/types/RunnerConfigsListResponse.ts
2791
+ var RunnerConfigsListResponse = schemas_exports.object({
2792
+ pagination: Pagination,
2793
+ runnerConfigs: schemas_exports.property(
2794
+ "runner_configs",
2795
+ schemas_exports.record(schemas_exports.string(), RunnerConfigsListResponseRunnerConfigsValue)
2796
+ )
2797
+ });
2798
+
2799
+ // src/serialization/types/RunnerConfigsRefreshMetadataRequestBody.ts
2800
+ var RunnerConfigsRefreshMetadataRequestBody = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2801
+
2802
+ // src/serialization/types/RunnerConfigsRefreshMetadataResponse.ts
2803
+ var RunnerConfigsRefreshMetadataResponse = schemas_exports.record(schemas_exports.string(), schemas_exports.unknown());
2804
+
2805
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccessSuccess.ts
2806
+ var RunnerConfigsServerlessHealthCheckResponseSuccessSuccess = schemas_exports.object({
2807
+ version: schemas_exports.string()
2808
+ });
2809
+
2810
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseSuccess.ts
2811
+ var RunnerConfigsServerlessHealthCheckResponseSuccess = schemas_exports.object({
2812
+ success: RunnerConfigsServerlessHealthCheckResponseSuccessSuccess
2813
+ });
2814
+
2815
+ // src/serialization/types/RunnerConfigsServerlessMetadataError.ts
2816
+ var RunnerConfigsServerlessMetadataError = schemas_exports.object({
2817
+ details: schemas_exports.string().optional(),
2818
+ message: schemas_exports.string(),
2819
+ metadata: schemas_exports.unknown().optional()
2820
+ });
2821
+
2822
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailureFailure.ts
2823
+ var RunnerConfigsServerlessHealthCheckResponseFailureFailure = schemas_exports.object({
2824
+ error: RunnerConfigsServerlessMetadataError
2825
+ });
2826
+
2827
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponseFailure.ts
2828
+ var RunnerConfigsServerlessHealthCheckResponseFailure = schemas_exports.object({
2829
+ failure: RunnerConfigsServerlessHealthCheckResponseFailureFailure
2830
+ });
2831
+
2832
+ // src/serialization/types/RunnerConfigsServerlessHealthCheckResponse.ts
2833
+ var RunnerConfigsServerlessHealthCheckResponse = schemas_exports.undiscriminatedUnion([
2834
+ RunnerConfigsServerlessHealthCheckResponseSuccess,
2835
+ RunnerConfigsServerlessHealthCheckResponseFailure
2836
+ ]);
2837
+
2838
+ // src/serialization/types/RunnerConfigsUpsertResponse.ts
2839
+ var RunnerConfigsUpsertResponse = schemas_exports.object({
2840
+ endpointConfigChanged: schemas_exports.property("endpoint_config_changed", schemas_exports.boolean())
2841
+ });
2842
+
2843
+ // src/serialization/types/RunnersListNamesResponse.ts
2844
+ var RunnersListNamesResponse = schemas_exports.object({
2845
+ names: schemas_exports.list(schemas_exports.string()),
2533
2846
  pagination: Pagination
2534
2847
  });
2535
2848
 
2536
- // src/serialization/types/PoolsListResponse.ts
2537
- var PoolsListResponse = schemas_exports.object({
2849
+ // src/serialization/types/RunnersListResponse.ts
2850
+ var RunnersListResponse = schemas_exports.object({
2538
2851
  pagination: Pagination,
2539
- pools: schemas_exports.list(Pool)
2852
+ runners: schemas_exports.list(Runner)
2540
2853
  });
2541
2854
 
2542
2855
  // src/serialization/client/requests/ActorsCreateRequest.ts
2543
2856
  var ActorsCreateRequest = schemas_exports.object({
2857
+ crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2858
+ datacenter: schemas_exports.string().optional(),
2544
2859
  input: schemas_exports.string().optional(),
2545
2860
  key: schemas_exports.string().optional(),
2546
2861
  name: schemas_exports.string(),
2547
- pool: schemas_exports.string().optional()
2862
+ runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2548
2863
  });
2549
2864
 
2550
2865
  // src/serialization/client/requests/ActorsGetOrCreateRequest.ts
2551
2866
  var ActorsGetOrCreateRequest = schemas_exports.object({
2867
+ crashPolicy: schemas_exports.property("crash_policy", CrashPolicy2),
2868
+ datacenter: schemas_exports.string().optional(),
2552
2869
  input: schemas_exports.string().optional(),
2553
- key: schemas_exports.string().optional(),
2870
+ key: schemas_exports.string(),
2554
2871
  name: schemas_exports.string(),
2555
- pool: schemas_exports.string().optional()
2872
+ runnerNameSelector: schemas_exports.property("runner_name_selector", schemas_exports.string())
2873
+ });
2874
+
2875
+ // src/serialization/client/requests/RunnerConfigsServerlessHealthCheckRequest.ts
2876
+ var RunnerConfigsServerlessHealthCheckRequest = schemas_exports.object({
2877
+ headers: schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
2878
+ url: schemas_exports.string()
2879
+ });
2880
+
2881
+ // src/serialization/client/requests/RunnerConfigsUpsertRequestBody.ts
2882
+ var RunnerConfigsUpsertRequestBody = schemas_exports.object({
2883
+ datacenters: schemas_exports.record(schemas_exports.string(), RunnerConfig)
2884
+ });
2885
+
2886
+ // src/serialization/resources/authTokens/index.ts
2887
+ var authTokens_exports2 = {};
2888
+ __export(authTokens_exports2, {
2889
+ AuthTokenCreateRequest: () => AuthTokenCreateRequest
2890
+ });
2891
+
2892
+ // src/serialization/resources/authTokens/client/requests/AuthTokenCreateRequest.ts
2893
+ var AuthTokenCreateRequest = schemas_exports.object({
2894
+ duration: schemas_exports.number().optional(),
2895
+ grants: schemas_exports.list(AuthTokenGrant),
2896
+ namespace: schemas_exports.string(),
2897
+ subject: schemas_exports.string().optional()
2556
2898
  });
2557
2899
 
2558
2900
  // src/serialization/resources/namespaces/index.ts
2559
- var namespaces_exports = {};
2560
- __export(namespaces_exports, {
2901
+ var namespaces_exports2 = {};
2902
+ __export(namespaces_exports2, {
2561
2903
  NamespacesCreateRequest: () => NamespacesCreateRequest
2562
2904
  });
2563
2905
 
2564
2906
  // src/serialization/resources/namespaces/client/requests/NamespacesCreateRequest.ts
2565
2907
  var NamespacesCreateRequest = schemas_exports.object({
2908
+ displayName: schemas_exports.property("display_name", schemas_exports.string()),
2566
2909
  name: schemas_exports.string()
2567
2910
  });
2568
2911
 
2912
+ // src/Client.ts
2913
+ var import_url_join8 = __toESM(require("url-join"));
2914
+
2569
2915
  // src/errors/RivetError.ts
2570
2916
  var RivetError = class _RivetError extends Error {
2571
2917
  statusCode;
@@ -2608,10 +2954,25 @@ var RivetTimeoutError = class _RivetTimeoutError extends Error {
2608
2954
  };
2609
2955
 
2610
2956
  // src/api/resources/authTokens/client/Client.ts
2957
+ var import_url_join = __toESM(require("url-join"));
2611
2958
  var AuthTokens = class {
2612
2959
  constructor(_options) {
2613
2960
  this._options = _options;
2614
2961
  }
2962
+ /**
2963
+ * @param {Rivet.AuthTokenCreateRequest} request
2964
+ * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
2965
+ *
2966
+ * @example
2967
+ * await client.authTokens.create({
2968
+ * grants: [{
2969
+ * operations: ["read"],
2970
+ * resource: "namespace",
2971
+ * target: "any"
2972
+ * }],
2973
+ * namespace: "namespace"
2974
+ * })
2975
+ */
2615
2976
  async create(request, requestOptions) {
2616
2977
  const _response = await (this._options.fetcher ?? fetcher)({
2617
2978
  url: (0, import_url_join.default)(
@@ -2628,12 +2989,7 @@ var AuthTokens = class {
2628
2989
  },
2629
2990
  contentType: "application/json",
2630
2991
  requestType: "json",
2631
- body: {
2632
- namespace: request.namespace,
2633
- duration: request.duration,
2634
- subject: request.subject,
2635
- grants: request.grants.map((grant) => AuthTokenGrant.jsonOrThrow(grant))
2636
- },
2992
+ body: AuthTokenCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2637
2993
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2638
2994
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2639
2995
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -2667,6 +3023,12 @@ var AuthTokens = class {
2667
3023
  });
2668
3024
  }
2669
3025
  }
3026
+ /**
3027
+ * @param {AuthTokens.RequestOptions} requestOptions - Request-specific configuration.
3028
+ *
3029
+ * @example
3030
+ * await client.authTokens.inspect()
3031
+ */
2670
3032
  async inspect(requestOptions) {
2671
3033
  const _response = await (this._options.fetcher ?? fetcher)({
2672
3034
  url: (0, import_url_join.default)(
@@ -2721,21 +3083,6 @@ var AuthTokens = class {
2721
3083
  }
2722
3084
  };
2723
3085
 
2724
- // src/api/resources/datacenters/index.ts
2725
- var datacenters_exports = {};
2726
-
2727
- // src/api/resources/metadata/index.ts
2728
- var metadata_exports = {};
2729
-
2730
- // src/api/resources/namespaces/index.ts
2731
- var namespaces_exports2 = {};
2732
-
2733
- // src/api/resources/pools/index.ts
2734
- var pools_exports = {};
2735
-
2736
- // src/Client.ts
2737
- var import_url_join6 = __toESM(require("url-join"));
2738
-
2739
3086
  // src/api/resources/datacenters/client/Client.ts
2740
3087
  var import_url_join2 = __toESM(require("url-join"));
2741
3088
  var Datacenters = class {
@@ -2802,23 +3149,45 @@ var Datacenters = class {
2802
3149
  }
2803
3150
  };
2804
3151
 
2805
- // src/api/resources/metadata/client/Client.ts
3152
+ // src/api/resources/envoys/client/Client.ts
2806
3153
  var import_url_join3 = __toESM(require("url-join"));
2807
- var Metadata = class {
3154
+ var Envoys = class {
2808
3155
  constructor(_options) {
2809
3156
  this._options = _options;
2810
3157
  }
2811
3158
  /**
2812
- * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
3159
+ * @param {Rivet.EnvoysListRequest} request
3160
+ * @param {Envoys.RequestOptions} requestOptions - Request-specific configuration.
2813
3161
  *
2814
3162
  * @example
2815
- * await client.metadata.get()
3163
+ * await client.envoys.list({
3164
+ * namespace: "namespace"
3165
+ * })
2816
3166
  */
2817
- async get(requestOptions) {
3167
+ async list(request, requestOptions) {
3168
+ const { namespace, name, envoyKey, limit, cursor } = request;
3169
+ const _queryParams = {};
3170
+ _queryParams["namespace"] = namespace;
3171
+ if (name != null) {
3172
+ _queryParams["name"] = name;
3173
+ }
3174
+ if (envoyKey != null) {
3175
+ if (Array.isArray(envoyKey)) {
3176
+ _queryParams["envoy_key"] = envoyKey.map((item) => item);
3177
+ } else {
3178
+ _queryParams["envoy_key"] = envoyKey;
3179
+ }
3180
+ }
3181
+ if (limit != null) {
3182
+ _queryParams["limit"] = limit.toString();
3183
+ }
3184
+ if (cursor != null) {
3185
+ _queryParams["cursor"] = cursor;
3186
+ }
2818
3187
  const _response = await (this._options.fetcher ?? fetcher)({
2819
3188
  url: (0, import_url_join3.default)(
2820
3189
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2821
- "metadata"
3190
+ "envoys"
2822
3191
  ),
2823
3192
  method: "GET",
2824
3193
  headers: {
@@ -2829,13 +3198,14 @@ var Metadata = class {
2829
3198
  ...requestOptions == null ? void 0 : requestOptions.headers
2830
3199
  },
2831
3200
  contentType: "application/json",
3201
+ queryParameters: _queryParams,
2832
3202
  requestType: "json",
2833
3203
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2834
3204
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2835
3205
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
2836
3206
  });
2837
3207
  if (_response.ok) {
2838
- return MetadataGetResponse.parseOrThrow(_response.body, {
3208
+ return EnvoysListResponse.parseOrThrow(_response.body, {
2839
3209
  unrecognizedObjectKeys: "passthrough",
2840
3210
  allowUnrecognizedUnionMembers: true,
2841
3211
  allowUnrecognizedEnumValues: true,
@@ -2856,7 +3226,7 @@ var Metadata = class {
2856
3226
  body: _response.error.rawBody
2857
3227
  });
2858
3228
  case "timeout":
2859
- throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
3229
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /envoys.");
2860
3230
  case "unknown":
2861
3231
  throw new RivetError({
2862
3232
  message: _response.error.errorMessage
@@ -2868,35 +3238,23 @@ var Metadata = class {
2868
3238
  }
2869
3239
  };
2870
3240
 
2871
- // src/api/resources/namespaces/client/Client.ts
3241
+ // src/api/resources/health/client/Client.ts
2872
3242
  var import_url_join4 = __toESM(require("url-join"));
2873
- var Namespaces = class {
3243
+ var Health = class {
2874
3244
  constructor(_options) {
2875
3245
  this._options = _options;
2876
3246
  }
2877
3247
  /**
2878
- * @param {Rivet.NamespacesListRequest} request
2879
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3248
+ * @param {Health.RequestOptions} requestOptions - Request-specific configuration.
2880
3249
  *
2881
3250
  * @example
2882
- * await client.namespaces.list()
3251
+ * await client.health.fanout()
2883
3252
  */
2884
- async list(request = {}, requestOptions) {
2885
- const { limit, cursor, name } = request;
2886
- const _queryParams = {};
2887
- if (limit != null) {
2888
- _queryParams["limit"] = limit.toString();
2889
- }
2890
- if (cursor != null) {
2891
- _queryParams["cursor"] = cursor;
2892
- }
2893
- if (name != null) {
2894
- _queryParams["name"] = name;
2895
- }
3253
+ async fanout(requestOptions) {
2896
3254
  const _response = await (this._options.fetcher ?? fetcher)({
2897
3255
  url: (0, import_url_join4.default)(
2898
3256
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2899
- "namespaces"
3257
+ "health/fanout"
2900
3258
  ),
2901
3259
  method: "GET",
2902
3260
  headers: {
@@ -2907,14 +3265,13 @@ var Namespaces = class {
2907
3265
  ...requestOptions == null ? void 0 : requestOptions.headers
2908
3266
  },
2909
3267
  contentType: "application/json",
2910
- queryParameters: _queryParams,
2911
3268
  requestType: "json",
2912
3269
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2913
3270
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2914
3271
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
2915
3272
  });
2916
3273
  if (_response.ok) {
2917
- return NamespaceListResponse.parseOrThrow(_response.body, {
3274
+ return HealthFanoutResponse.parseOrThrow(_response.body, {
2918
3275
  unrecognizedObjectKeys: "passthrough",
2919
3276
  allowUnrecognizedUnionMembers: true,
2920
3277
  allowUnrecognizedEnumValues: true,
@@ -2935,29 +3292,37 @@ var Namespaces = class {
2935
3292
  body: _response.error.rawBody
2936
3293
  });
2937
3294
  case "timeout":
2938
- throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3295
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /health/fanout.");
2939
3296
  case "unknown":
2940
3297
  throw new RivetError({
2941
3298
  message: _response.error.errorMessage
2942
3299
  });
2943
3300
  }
2944
3301
  }
3302
+ async _getAuthorizationHeader() {
3303
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3304
+ }
3305
+ };
3306
+
3307
+ // src/api/resources/metadata/client/Client.ts
3308
+ var import_url_join5 = __toESM(require("url-join"));
3309
+ var Metadata = class {
3310
+ constructor(_options) {
3311
+ this._options = _options;
3312
+ }
2945
3313
  /**
2946
- * @param {Rivet.NamespacesCreateRequest} request
2947
- * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3314
+ * @param {Metadata.RequestOptions} requestOptions - Request-specific configuration.
2948
3315
  *
2949
3316
  * @example
2950
- * await client.namespaces.create({
2951
- * name: "name"
2952
- * })
3317
+ * await client.metadata.get()
2953
3318
  */
2954
- async create(request, requestOptions) {
3319
+ async get(requestOptions) {
2955
3320
  const _response = await (this._options.fetcher ?? fetcher)({
2956
- url: (0, import_url_join4.default)(
3321
+ url: (0, import_url_join5.default)(
2957
3322
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
2958
- "namespaces"
3323
+ "metadata"
2959
3324
  ),
2960
- method: "POST",
3325
+ method: "GET",
2961
3326
  headers: {
2962
3327
  Authorization: await this._getAuthorizationHeader(),
2963
3328
  "X-Fern-Language": "JavaScript",
@@ -2967,13 +3332,12 @@ var Namespaces = class {
2967
3332
  },
2968
3333
  contentType: "application/json",
2969
3334
  requestType: "json",
2970
- body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
2971
3335
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
2972
3336
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
2973
3337
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
2974
3338
  });
2975
3339
  if (_response.ok) {
2976
- return NamespacesCreateResponse.parseOrThrow(_response.body, {
3340
+ return MetadataGetResponse.parseOrThrow(_response.body, {
2977
3341
  unrecognizedObjectKeys: "passthrough",
2978
3342
  allowUnrecognizedUnionMembers: true,
2979
3343
  allowUnrecognizedEnumValues: true,
@@ -2994,7 +3358,7 @@ var Namespaces = class {
2994
3358
  body: _response.error.rawBody
2995
3359
  });
2996
3360
  case "timeout":
2997
- throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3361
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /metadata.");
2998
3362
  case "unknown":
2999
3363
  throw new RivetError({
3000
3364
  message: _response.error.errorMessage
@@ -3006,40 +3370,49 @@ var Namespaces = class {
3006
3370
  }
3007
3371
  };
3008
3372
 
3009
- // src/api/resources/pools/client/Client.ts
3010
- var import_url_join5 = __toESM(require("url-join"));
3011
- var Pools = class {
3373
+ // src/api/resources/namespaces/client/Client.ts
3374
+ var import_url_join6 = __toESM(require("url-join"));
3375
+ var Namespaces = class {
3012
3376
  constructor(_options) {
3013
3377
  this._options = _options;
3014
3378
  }
3015
3379
  /**
3016
- * Lists the namespace's pools by name. Changes apply on each node's next connection.
3017
- *
3018
- * @param {Rivet.PoolsListRequest} request
3019
- * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3380
+ * @param {Rivet.NamespacesListRequest} request
3381
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3020
3382
  *
3021
3383
  * @example
3022
- * await client.pools.list({
3023
- * namespace: "namespace"
3024
- * })
3384
+ * await client.namespaces.list()
3025
3385
  */
3026
- async list(request, requestOptions) {
3027
- const { namespace, limit, cursor } = request;
3386
+ async list(request = {}, requestOptions) {
3387
+ const { limit, cursor, name, namespaceIds, namespaceId } = request;
3028
3388
  const _queryParams = {};
3029
- if (namespace != null)
3030
- _queryParams["namespace"] = namespace;
3031
3389
  if (limit != null) {
3032
3390
  _queryParams["limit"] = limit.toString();
3033
3391
  }
3034
3392
  if (cursor != null) {
3035
3393
  _queryParams["cursor"] = cursor;
3036
3394
  }
3037
- const _response = await (this._options.fetcher ?? fetcher)({
3038
- url: (0, import_url_join5.default)(
3039
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3040
- "pools"
3041
- ),
3042
- method: "GET",
3395
+ if (name != null) {
3396
+ _queryParams["name"] = name;
3397
+ }
3398
+ if (namespaceIds != null) {
3399
+ _queryParams["namespace_ids"] = namespaceIds;
3400
+ }
3401
+ if (namespaceId != null) {
3402
+ if (Array.isArray(namespaceId)) {
3403
+ _queryParams["namespace_id"] = namespaceId.map(
3404
+ (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3405
+ );
3406
+ } else {
3407
+ _queryParams["namespace_id"] = namespaceId;
3408
+ }
3409
+ }
3410
+ const _response = await (this._options.fetcher ?? fetcher)({
3411
+ url: (0, import_url_join6.default)(
3412
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3413
+ "namespaces"
3414
+ ),
3415
+ method: "GET",
3043
3416
  headers: {
3044
3417
  Authorization: await this._getAuthorizationHeader(),
3045
3418
  "X-Fern-Language": "JavaScript",
@@ -3055,7 +3428,7 @@ var Pools = class {
3055
3428
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3056
3429
  });
3057
3430
  if (_response.ok) {
3058
- return PoolsListResponse.parseOrThrow(_response.body, {
3431
+ return NamespaceListResponse.parseOrThrow(_response.body, {
3059
3432
  unrecognizedObjectKeys: "passthrough",
3060
3433
  allowUnrecognizedUnionMembers: true,
3061
3434
  allowUnrecognizedEnumValues: true,
@@ -3076,7 +3449,7 @@ var Pools = class {
3076
3449
  body: _response.error.rawBody
3077
3450
  });
3078
3451
  case "timeout":
3079
- throw new RivetTimeoutError("Timeout exceeded when calling GET /pools.");
3452
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /namespaces.");
3080
3453
  case "unknown":
3081
3454
  throw new RivetError({
3082
3455
  message: _response.error.errorMessage
@@ -3084,34 +3457,22 @@ var Pools = class {
3084
3457
  }
3085
3458
  }
3086
3459
  /**
3087
- * Lists the live nodes of a pool in node key order.
3088
- *
3089
- * @param {string} pool
3090
- * @param {Rivet.PoolsListNodesRequest} request
3091
- * @param {Pools.RequestOptions} requestOptions - Request-specific configuration.
3460
+ * @param {Rivet.NamespacesCreateRequest} request
3461
+ * @param {Namespaces.RequestOptions} requestOptions - Request-specific configuration.
3092
3462
  *
3093
3463
  * @example
3094
- * await client.pools.listNodes("pool", {
3095
- * namespace: "namespace"
3464
+ * await client.namespaces.create({
3465
+ * displayName: "display_name",
3466
+ * name: "name"
3096
3467
  * })
3097
3468
  */
3098
- async listNodes(pool, request, requestOptions) {
3099
- const { namespace, limit, cursor } = request;
3100
- const _queryParams = {};
3101
- if (namespace != null)
3102
- _queryParams["namespace"] = namespace;
3103
- if (limit != null) {
3104
- _queryParams["limit"] = limit.toString();
3105
- }
3106
- if (cursor != null) {
3107
- _queryParams["cursor"] = cursor;
3108
- }
3469
+ async create(request, requestOptions) {
3109
3470
  const _response = await (this._options.fetcher ?? fetcher)({
3110
- url: (0, import_url_join5.default)(
3471
+ url: (0, import_url_join6.default)(
3111
3472
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3112
- `pools/${encodeURIComponent(pool)}/nodes`
3473
+ "namespaces"
3113
3474
  ),
3114
- method: "GET",
3475
+ method: "POST",
3115
3476
  headers: {
3116
3477
  Authorization: await this._getAuthorizationHeader(),
3117
3478
  "X-Fern-Language": "JavaScript",
@@ -3120,14 +3481,14 @@ var Pools = class {
3120
3481
  ...requestOptions == null ? void 0 : requestOptions.headers
3121
3482
  },
3122
3483
  contentType: "application/json",
3123
- queryParameters: _queryParams,
3124
3484
  requestType: "json",
3485
+ body: NamespacesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
3125
3486
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3126
3487
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3127
3488
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3128
3489
  });
3129
3490
  if (_response.ok) {
3130
- return PoolsListNodesResponse.parseOrThrow(_response.body, {
3491
+ return NamespacesCreateResponse.parseOrThrow(_response.body, {
3131
3492
  unrecognizedObjectKeys: "passthrough",
3132
3493
  allowUnrecognizedUnionMembers: true,
3133
3494
  allowUnrecognizedEnumValues: true,
@@ -3148,21 +3509,65 @@ var Pools = class {
3148
3509
  body: _response.error.rawBody
3149
3510
  });
3150
3511
  case "timeout":
3151
- throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}/nodes.");
3512
+ throw new RivetTimeoutError("Timeout exceeded when calling POST /namespaces.");
3152
3513
  case "unknown":
3153
3514
  throw new RivetError({
3154
3515
  message: _response.error.errorMessage
3155
3516
  });
3156
3517
  }
3157
3518
  }
3158
- async get(name, request = {}, requestOptions) {
3519
+ async _getAuthorizationHeader() {
3520
+ return `Bearer ${await Supplier.get(this._options.token)}`;
3521
+ }
3522
+ };
3523
+
3524
+ // src/api/resources/runners/client/Client.ts
3525
+ var import_url_join7 = __toESM(require("url-join"));
3526
+ var Runners = class {
3527
+ constructor(_options) {
3528
+ this._options = _options;
3529
+ }
3530
+ /**
3531
+ * @param {Rivet.RunnersListRequest} request
3532
+ * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3533
+ *
3534
+ * @example
3535
+ * await client.runners.list({
3536
+ * namespace: "namespace"
3537
+ * })
3538
+ */
3539
+ async list(request, requestOptions) {
3540
+ const { namespace, name, runnerIds, runnerId, includeStopped, limit, cursor } = request;
3159
3541
  const _queryParams = {};
3160
- if (request.namespace != null)
3161
- _queryParams["namespace"] = request.namespace;
3542
+ _queryParams["namespace"] = namespace;
3543
+ if (name != null) {
3544
+ _queryParams["name"] = name;
3545
+ }
3546
+ if (runnerIds != null) {
3547
+ _queryParams["runner_ids"] = runnerIds;
3548
+ }
3549
+ if (runnerId != null) {
3550
+ if (Array.isArray(runnerId)) {
3551
+ _queryParams["runner_id"] = runnerId.map(
3552
+ (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3553
+ );
3554
+ } else {
3555
+ _queryParams["runner_id"] = runnerId;
3556
+ }
3557
+ }
3558
+ if (includeStopped != null) {
3559
+ _queryParams["include_stopped"] = includeStopped.toString();
3560
+ }
3561
+ if (limit != null) {
3562
+ _queryParams["limit"] = limit.toString();
3563
+ }
3564
+ if (cursor != null) {
3565
+ _queryParams["cursor"] = cursor;
3566
+ }
3162
3567
  const _response = await (this._options.fetcher ?? fetcher)({
3163
- url: (0, import_url_join5.default)(
3568
+ url: (0, import_url_join7.default)(
3164
3569
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3165
- `pools/${encodeURIComponent(name)}`
3570
+ "runners"
3166
3571
  ),
3167
3572
  method: "GET",
3168
3573
  headers: {
@@ -3180,7 +3585,7 @@ var Pools = class {
3180
3585
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3181
3586
  });
3182
3587
  if (_response.ok) {
3183
- return PoolResponse.parseOrThrow(_response.body, {
3588
+ return RunnersListResponse.parseOrThrow(_response.body, {
3184
3589
  unrecognizedObjectKeys: "passthrough",
3185
3590
  allowUnrecognizedUnionMembers: true,
3186
3591
  allowUnrecognizedEnumValues: true,
@@ -3201,23 +3606,43 @@ var Pools = class {
3201
3606
  body: _response.error.rawBody
3202
3607
  });
3203
3608
  case "timeout":
3204
- throw new RivetTimeoutError("Timeout exceeded when calling GET /pools/{pool}.");
3609
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runners.");
3205
3610
  case "unknown":
3206
3611
  throw new RivetError({
3207
3612
  message: _response.error.errorMessage
3208
3613
  });
3209
3614
  }
3210
3615
  }
3211
- async upsert(name, request, requestOptions) {
3616
+ /**
3617
+ * 2 round trips:
3618
+ *
3619
+ * - GET /runners/names (fanout)
3620
+ * - [api-peer] namespace::ops::resolve_for_name_global
3621
+ *
3622
+ * @param {Rivet.RunnersListNamesRequest} request
3623
+ * @param {Runners.RequestOptions} requestOptions - Request-specific configuration.
3624
+ *
3625
+ * @example
3626
+ * await client.runners.listNames({
3627
+ * namespace: "namespace"
3628
+ * })
3629
+ */
3630
+ async listNames(request, requestOptions) {
3631
+ const { namespace, limit, cursor } = request;
3212
3632
  const _queryParams = {};
3213
- if (request.namespace != null)
3214
- _queryParams["namespace"] = request.namespace;
3633
+ _queryParams["namespace"] = namespace;
3634
+ if (limit != null) {
3635
+ _queryParams["limit"] = limit.toString();
3636
+ }
3637
+ if (cursor != null) {
3638
+ _queryParams["cursor"] = cursor;
3639
+ }
3215
3640
  const _response = await (this._options.fetcher ?? fetcher)({
3216
- url: (0, import_url_join5.default)(
3641
+ url: (0, import_url_join7.default)(
3217
3642
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3218
- `pools/${encodeURIComponent(name)}`
3643
+ "runners/names"
3219
3644
  ),
3220
- method: "PUT",
3645
+ method: "GET",
3221
3646
  headers: {
3222
3647
  Authorization: await this._getAuthorizationHeader(),
3223
3648
  "X-Fern-Language": "JavaScript",
@@ -3228,19 +3653,12 @@ var Pools = class {
3228
3653
  contentType: "application/json",
3229
3654
  queryParameters: _queryParams,
3230
3655
  requestType: "json",
3231
- body: {
3232
- drain_on_version_upgrade: request.drainOnVersionUpgrade,
3233
- actor_eviction_delay: request.actorEvictionDelay,
3234
- actor_eviction_period: request.actorEvictionPeriod,
3235
- actor_eviction_rate: request.actorEvictionRate,
3236
- metadata: request.metadata
3237
- },
3238
3656
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3239
3657
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3240
3658
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3241
3659
  });
3242
3660
  if (_response.ok) {
3243
- return PoolResponse.parseOrThrow(_response.body, {
3661
+ return RunnersListNamesResponse.parseOrThrow(_response.body, {
3244
3662
  unrecognizedObjectKeys: "passthrough",
3245
3663
  allowUnrecognizedUnionMembers: true,
3246
3664
  allowUnrecognizedEnumValues: true,
@@ -3261,54 +3679,7 @@ var Pools = class {
3261
3679
  body: _response.error.rawBody
3262
3680
  });
3263
3681
  case "timeout":
3264
- throw new RivetTimeoutError("Timeout exceeded when calling PUT /pools/{pool}.");
3265
- case "unknown":
3266
- throw new RivetError({
3267
- message: _response.error.errorMessage
3268
- });
3269
- }
3270
- }
3271
- async delete(name, request = {}, requestOptions) {
3272
- const _queryParams = {};
3273
- if (request.namespace != null)
3274
- _queryParams["namespace"] = request.namespace;
3275
- const _response = await (this._options.fetcher ?? fetcher)({
3276
- url: (0, import_url_join5.default)(
3277
- await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3278
- `pools/${encodeURIComponent(name)}`
3279
- ),
3280
- method: "DELETE",
3281
- headers: {
3282
- Authorization: await this._getAuthorizationHeader(),
3283
- "X-Fern-Language": "JavaScript",
3284
- "X-Fern-Runtime": RUNTIME.type,
3285
- "X-Fern-Runtime-Version": RUNTIME.version,
3286
- ...requestOptions == null ? void 0 : requestOptions.headers
3287
- },
3288
- contentType: "application/json",
3289
- queryParameters: _queryParams,
3290
- requestType: "json",
3291
- timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3292
- maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3293
- abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3294
- });
3295
- if (_response.ok) {
3296
- return PoolsDeleteResponse.parseOrThrow(_response.body, { skipValidation: true });
3297
- }
3298
- if (_response.error.reason === "status-code") {
3299
- throw new RivetError({
3300
- statusCode: _response.error.statusCode,
3301
- body: _response.error.body
3302
- });
3303
- }
3304
- switch (_response.error.reason) {
3305
- case "non-json":
3306
- throw new RivetError({
3307
- statusCode: _response.error.statusCode,
3308
- body: _response.error.rawBody
3309
- });
3310
- case "timeout":
3311
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /pools/{pool}.");
3682
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runners/names.");
3312
3683
  case "unknown":
3313
3684
  throw new RivetError({
3314
3685
  message: _response.error.errorMessage
@@ -3327,23 +3698,31 @@ var RivetClient = class {
3327
3698
  }
3328
3699
  _authTokens;
3329
3700
  _datacenters;
3701
+ _envoys;
3702
+ _health;
3330
3703
  _metadata;
3331
3704
  _namespaces;
3332
- _pools;
3705
+ _runners;
3333
3706
  get authTokens() {
3334
3707
  return this._authTokens ?? (this._authTokens = new AuthTokens(this._options));
3335
3708
  }
3336
3709
  get datacenters() {
3337
3710
  return this._datacenters ?? (this._datacenters = new Datacenters(this._options));
3338
3711
  }
3712
+ get envoys() {
3713
+ return this._envoys ?? (this._envoys = new Envoys(this._options));
3714
+ }
3715
+ get health() {
3716
+ return this._health ?? (this._health = new Health(this._options));
3717
+ }
3339
3718
  get metadata() {
3340
3719
  return this._metadata ?? (this._metadata = new Metadata(this._options));
3341
3720
  }
3342
3721
  get namespaces() {
3343
3722
  return this._namespaces ?? (this._namespaces = new Namespaces(this._options));
3344
3723
  }
3345
- get pools() {
3346
- return this._pools ?? (this._pools = new Pools(this._options));
3724
+ get runners() {
3725
+ return this._runners ?? (this._runners = new Runners(this._options));
3347
3726
  }
3348
3727
  /**
3349
3728
  * **If key is some & `include_destroyed` is false**
@@ -3380,8 +3759,7 @@ var RivetClient = class {
3380
3759
  async actorsList(request, requestOptions) {
3381
3760
  const { namespace, name, key, actorIds, actorId, includeDestroyed, limit, cursor } = request;
3382
3761
  const _queryParams = {};
3383
- if (namespace != null)
3384
- _queryParams["namespace"] = namespace;
3762
+ _queryParams["namespace"] = namespace;
3385
3763
  if (name != null) {
3386
3764
  _queryParams["name"] = name;
3387
3765
  }
@@ -3391,8 +3769,15 @@ var RivetClient = class {
3391
3769
  if (actorIds != null) {
3392
3770
  _queryParams["actor_ids"] = actorIds;
3393
3771
  }
3394
- if (actorId != null)
3395
- _queryParams["actor_id"] = actorId;
3772
+ if (actorId != null) {
3773
+ if (Array.isArray(actorId)) {
3774
+ _queryParams["actor_id"] = actorId.map(
3775
+ (item) => RivetId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" })
3776
+ );
3777
+ } else {
3778
+ _queryParams["actor_id"] = actorId;
3779
+ }
3780
+ }
3396
3781
  if (includeDestroyed != null) {
3397
3782
  _queryParams["include_destroyed"] = includeDestroyed.toString();
3398
3783
  }
@@ -3403,7 +3788,7 @@ var RivetClient = class {
3403
3788
  _queryParams["cursor"] = cursor;
3404
3789
  }
3405
3790
  const _response = await (this._options.fetcher ?? fetcher)({
3406
- url: (0, import_url_join6.default)(
3791
+ url: (0, import_url_join8.default)(
3407
3792
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3408
3793
  "actors"
3409
3794
  ),
@@ -3475,17 +3860,17 @@ var RivetClient = class {
3475
3860
  * @example
3476
3861
  * await client.actorsCreate({
3477
3862
  * namespace: "namespace",
3863
+ * crashPolicy: "restart",
3478
3864
  * name: "name",
3479
- * pool: "pool"
3865
+ * runnerNameSelector: "runner_name_selector"
3480
3866
  * })
3481
3867
  */
3482
3868
  async actorsCreate(request, requestOptions) {
3483
3869
  const { namespace, ..._body } = request;
3484
3870
  const _queryParams = {};
3485
- if (namespace != null)
3486
- _queryParams["namespace"] = namespace;
3871
+ _queryParams["namespace"] = namespace;
3487
3872
  const _response = await (this._options.fetcher ?? fetcher)({
3488
- url: (0, import_url_join6.default)(
3873
+ url: (0, import_url_join8.default)(
3489
3874
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3490
3875
  "actors"
3491
3876
  ),
@@ -3567,18 +3952,18 @@ var RivetClient = class {
3567
3952
  * @example
3568
3953
  * await client.actorsGetOrCreate({
3569
3954
  * namespace: "namespace",
3955
+ * crashPolicy: "restart",
3570
3956
  * key: "key",
3571
3957
  * name: "name",
3572
- * pool: "pool"
3958
+ * runnerNameSelector: "runner_name_selector"
3573
3959
  * })
3574
3960
  */
3575
3961
  async actorsGetOrCreate(request, requestOptions) {
3576
3962
  const { namespace, ..._body } = request;
3577
3963
  const _queryParams = {};
3578
- if (namespace != null)
3579
- _queryParams["namespace"] = namespace;
3964
+ _queryParams["namespace"] = namespace;
3580
3965
  const _response = await (this._options.fetcher ?? fetcher)({
3581
- url: (0, import_url_join6.default)(
3966
+ url: (0, import_url_join8.default)(
3582
3967
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3583
3968
  "actors"
3584
3969
  ),
@@ -3644,8 +4029,7 @@ var RivetClient = class {
3644
4029
  async actorsListNames(request, requestOptions) {
3645
4030
  const { namespace, limit, cursor } = request;
3646
4031
  const _queryParams = {};
3647
- if (namespace != null)
3648
- _queryParams["namespace"] = namespace;
4032
+ _queryParams["namespace"] = namespace;
3649
4033
  if (limit != null) {
3650
4034
  _queryParams["limit"] = limit.toString();
3651
4035
  }
@@ -3653,7 +4037,7 @@ var RivetClient = class {
3653
4037
  _queryParams["cursor"] = cursor;
3654
4038
  }
3655
4039
  const _response = await (this._options.fetcher ?? fetcher)({
3656
- url: (0, import_url_join6.default)(
4040
+ url: (0, import_url_join8.default)(
3657
4041
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3658
4042
  "actors/names"
3659
4043
  ),
@@ -3716,18 +4100,16 @@ var RivetClient = class {
3716
4100
  * namespace: "namespace"
3717
4101
  * })
3718
4102
  */
3719
- /** Returns one actor by ID. */
3720
- async actorsGet(actorId, request, requestOptions) {
4103
+ async actorsDelete(actorId, request, requestOptions) {
3721
4104
  const { namespace } = request;
3722
4105
  const _queryParams = {};
3723
- if (namespace != null)
3724
- _queryParams["namespace"] = namespace;
4106
+ _queryParams["namespace"] = namespace;
3725
4107
  const _response = await (this._options.fetcher ?? fetcher)({
3726
- url: (0, import_url_join6.default)(
4108
+ url: (0, import_url_join8.default)(
3727
4109
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3728
4110
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
3729
4111
  ),
3730
- method: "GET",
4112
+ method: "DELETE",
3731
4113
  headers: {
3732
4114
  Authorization: await this._getAuthorizationHeader(),
3733
4115
  "X-Fern-Language": "JavaScript",
@@ -3743,7 +4125,7 @@ var RivetClient = class {
3743
4125
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3744
4126
  });
3745
4127
  if (_response.ok) {
3746
- return ActorsGetResponse.parseOrThrow(_response.body, {
4128
+ return ActorsDeleteResponse.parseOrThrow(_response.body, {
3747
4129
  unrecognizedObjectKeys: "passthrough",
3748
4130
  allowUnrecognizedUnionMembers: true,
3749
4131
  allowUnrecognizedEnumValues: true,
@@ -3764,24 +4146,34 @@ var RivetClient = class {
3764
4146
  body: _response.error.rawBody
3765
4147
  });
3766
4148
  case "timeout":
3767
- throw new RivetTimeoutError("Timeout exceeded when calling GET /actors/{actor_id}.");
4149
+ throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
3768
4150
  case "unknown":
3769
4151
  throw new RivetError({
3770
4152
  message: _response.error.errorMessage
3771
4153
  });
3772
4154
  }
3773
4155
  }
3774
- async actorsDelete(actorId, request, requestOptions) {
4156
+ /**
4157
+ * @param {Rivet.RivetId} actorId
4158
+ * @param {string} key
4159
+ * @param {Rivet.ActorsKvGetRequest} request
4160
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4161
+ *
4162
+ * @example
4163
+ * await client.actorsKvGet("actor_id", "key", {
4164
+ * namespace: "namespace"
4165
+ * })
4166
+ */
4167
+ async actorsKvGet(actorId, key, request, requestOptions) {
3775
4168
  const { namespace } = request;
3776
4169
  const _queryParams = {};
3777
- if (namespace != null)
3778
- _queryParams["namespace"] = namespace;
4170
+ _queryParams["namespace"] = namespace;
3779
4171
  const _response = await (this._options.fetcher ?? fetcher)({
3780
- url: (0, import_url_join6.default)(
4172
+ url: (0, import_url_join8.default)(
3781
4173
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3782
- `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}`
4174
+ `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/kv/keys/${encodeURIComponent(key)}`
3783
4175
  ),
3784
- method: "DELETE",
4176
+ method: "GET",
3785
4177
  headers: {
3786
4178
  Authorization: await this._getAuthorizationHeader(),
3787
4179
  "X-Fern-Language": "JavaScript",
@@ -3797,7 +4189,7 @@ var RivetClient = class {
3797
4189
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
3798
4190
  });
3799
4191
  if (_response.ok) {
3800
- return ActorsDeleteResponse.parseOrThrow(_response.body, {
4192
+ return ActorsKvGetResponse.parseOrThrow(_response.body, {
3801
4193
  unrecognizedObjectKeys: "passthrough",
3802
4194
  allowUnrecognizedUnionMembers: true,
3803
4195
  allowUnrecognizedEnumValues: true,
@@ -3818,7 +4210,9 @@ var RivetClient = class {
3818
4210
  body: _response.error.rawBody
3819
4211
  });
3820
4212
  case "timeout":
3821
- throw new RivetTimeoutError("Timeout exceeded when calling DELETE /actors/{actor_id}.");
4213
+ throw new RivetTimeoutError(
4214
+ "Timeout exceeded when calling GET /actors/{actor_id}/kv/keys/{key}."
4215
+ );
3822
4216
  case "unknown":
3823
4217
  throw new RivetError({
3824
4218
  message: _response.error.errorMessage
@@ -3833,15 +4227,17 @@ var RivetClient = class {
3833
4227
  * @example
3834
4228
  * await client.actorsReschedule("actor_id", {
3835
4229
  * namespace: "namespace",
4230
+ * body: {
4231
+ * "key": "value"
4232
+ * }
3836
4233
  * })
3837
4234
  */
3838
4235
  async actorsReschedule(actorId, request, requestOptions) {
3839
- const { namespace } = request;
4236
+ const { namespace, body: _body } = request;
3840
4237
  const _queryParams = {};
3841
- if (namespace != null)
3842
- _queryParams["namespace"] = namespace;
4238
+ _queryParams["namespace"] = namespace;
3843
4239
  const _response = await (this._options.fetcher ?? fetcher)({
3844
- url: (0, import_url_join6.default)(
4240
+ url: (0, import_url_join8.default)(
3845
4241
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3846
4242
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/reschedule`
3847
4243
  ),
@@ -3856,6 +4252,7 @@ var RivetClient = class {
3856
4252
  contentType: "application/json",
3857
4253
  queryParameters: _queryParams,
3858
4254
  requestType: "json",
4255
+ body: ActorsRescheduleRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3859
4256
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3860
4257
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3861
4258
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -3897,15 +4294,17 @@ var RivetClient = class {
3897
4294
  * @example
3898
4295
  * await client.actorsSleep("actor_id", {
3899
4296
  * namespace: "namespace",
4297
+ * body: {
4298
+ * "key": "value"
4299
+ * }
3900
4300
  * })
3901
4301
  */
3902
4302
  async actorsSleep(actorId, request, requestOptions) {
3903
- const { namespace } = request;
4303
+ const { namespace, body: _body } = request;
3904
4304
  const _queryParams = {};
3905
- if (namespace != null)
3906
- _queryParams["namespace"] = namespace;
4305
+ _queryParams["namespace"] = namespace;
3907
4306
  const _response = await (this._options.fetcher ?? fetcher)({
3908
- url: (0, import_url_join6.default)(
4307
+ url: (0, import_url_join8.default)(
3909
4308
  await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
3910
4309
  `actors/${encodeURIComponent(RivetId.jsonOrThrow(actorId))}/sleep`
3911
4310
  ),
@@ -3920,6 +4319,7 @@ var RivetClient = class {
3920
4319
  contentType: "application/json",
3921
4320
  queryParameters: _queryParams,
3922
4321
  requestType: "json",
4322
+ body: ActorsSleepRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
3923
4323
  timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
3924
4324
  maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
3925
4325
  abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
@@ -3953,6 +4353,360 @@ var RivetClient = class {
3953
4353
  });
3954
4354
  }
3955
4355
  }
4356
+ /**
4357
+ * @param {Rivet.RunnerConfigsListRequest} request
4358
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4359
+ *
4360
+ * @example
4361
+ * await client.runnerConfigsList({
4362
+ * namespace: "namespace"
4363
+ * })
4364
+ */
4365
+ async runnerConfigsList(request, requestOptions) {
4366
+ const { namespace, limit, cursor, variant, runnerNames, runnerName } = request;
4367
+ const _queryParams = {};
4368
+ _queryParams["namespace"] = namespace;
4369
+ if (limit != null) {
4370
+ _queryParams["limit"] = limit.toString();
4371
+ }
4372
+ if (cursor != null) {
4373
+ _queryParams["cursor"] = cursor;
4374
+ }
4375
+ if (variant != null) {
4376
+ _queryParams["variant"] = RunnerConfigVariant2.jsonOrThrow(variant, {
4377
+ unrecognizedObjectKeys: "strip"
4378
+ });
4379
+ }
4380
+ if (runnerNames != null) {
4381
+ _queryParams["runner_names"] = runnerNames;
4382
+ }
4383
+ if (runnerName != null) {
4384
+ if (Array.isArray(runnerName)) {
4385
+ _queryParams["runner_name"] = runnerName.map((item) => item);
4386
+ } else {
4387
+ _queryParams["runner_name"] = runnerName;
4388
+ }
4389
+ }
4390
+ const _response = await (this._options.fetcher ?? fetcher)({
4391
+ url: (0, import_url_join8.default)(
4392
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4393
+ "runner-configs"
4394
+ ),
4395
+ method: "GET",
4396
+ headers: {
4397
+ Authorization: await this._getAuthorizationHeader(),
4398
+ "X-Fern-Language": "JavaScript",
4399
+ "X-Fern-Runtime": RUNTIME.type,
4400
+ "X-Fern-Runtime-Version": RUNTIME.version,
4401
+ ...requestOptions == null ? void 0 : requestOptions.headers
4402
+ },
4403
+ contentType: "application/json",
4404
+ queryParameters: _queryParams,
4405
+ requestType: "json",
4406
+ timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4407
+ maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4408
+ abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4409
+ });
4410
+ if (_response.ok) {
4411
+ return RunnerConfigsListResponse.parseOrThrow(_response.body, {
4412
+ unrecognizedObjectKeys: "passthrough",
4413
+ allowUnrecognizedUnionMembers: true,
4414
+ allowUnrecognizedEnumValues: true,
4415
+ skipValidation: true,
4416
+ breadcrumbsPrefix: ["response"]
4417
+ });
4418
+ }
4419
+ if (_response.error.reason === "status-code") {
4420
+ throw new RivetError({
4421
+ statusCode: _response.error.statusCode,
4422
+ body: _response.error.body
4423
+ });
4424
+ }
4425
+ switch (_response.error.reason) {
4426
+ case "non-json":
4427
+ throw new RivetError({
4428
+ statusCode: _response.error.statusCode,
4429
+ body: _response.error.rawBody
4430
+ });
4431
+ case "timeout":
4432
+ throw new RivetTimeoutError("Timeout exceeded when calling GET /runner-configs.");
4433
+ case "unknown":
4434
+ throw new RivetError({
4435
+ message: _response.error.errorMessage
4436
+ });
4437
+ }
4438
+ }
4439
+ /**
4440
+ * @param {Rivet.RunnerConfigsServerlessHealthCheckRequest} request
4441
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4442
+ *
4443
+ * @example
4444
+ * await client.runnerConfigsServerlessHealthCheck({
4445
+ * namespace: "namespace",
4446
+ * url: "url"
4447
+ * })
4448
+ */
4449
+ async runnerConfigsServerlessHealthCheck(request, requestOptions) {
4450
+ const { namespace, ..._body } = request;
4451
+ const _queryParams = {};
4452
+ _queryParams["namespace"] = namespace;
4453
+ const _response = await (this._options.fetcher ?? fetcher)({
4454
+ url: (0, import_url_join8.default)(
4455
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4456
+ "runner-configs/serverless-health-check"
4457
+ ),
4458
+ method: "POST",
4459
+ headers: {
4460
+ Authorization: await this._getAuthorizationHeader(),
4461
+ "X-Fern-Language": "JavaScript",
4462
+ "X-Fern-Runtime": RUNTIME.type,
4463
+ "X-Fern-Runtime-Version": RUNTIME.version,
4464
+ ...requestOptions == null ? void 0 : requestOptions.headers
4465
+ },
4466
+ contentType: "application/json",
4467
+ queryParameters: _queryParams,
4468
+ requestType: "json",
4469
+ body: RunnerConfigsServerlessHealthCheckRequest.jsonOrThrow(_body, {
4470
+ unrecognizedObjectKeys: "strip"
4471
+ }),
4472
+ timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4473
+ maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4474
+ abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4475
+ });
4476
+ if (_response.ok) {
4477
+ return RunnerConfigsServerlessHealthCheckResponse.parseOrThrow(_response.body, {
4478
+ unrecognizedObjectKeys: "passthrough",
4479
+ allowUnrecognizedUnionMembers: true,
4480
+ allowUnrecognizedEnumValues: true,
4481
+ skipValidation: true,
4482
+ breadcrumbsPrefix: ["response"]
4483
+ });
4484
+ }
4485
+ if (_response.error.reason === "status-code") {
4486
+ throw new RivetError({
4487
+ statusCode: _response.error.statusCode,
4488
+ body: _response.error.body
4489
+ });
4490
+ }
4491
+ switch (_response.error.reason) {
4492
+ case "non-json":
4493
+ throw new RivetError({
4494
+ statusCode: _response.error.statusCode,
4495
+ body: _response.error.rawBody
4496
+ });
4497
+ case "timeout":
4498
+ throw new RivetTimeoutError(
4499
+ "Timeout exceeded when calling POST /runner-configs/serverless-health-check."
4500
+ );
4501
+ case "unknown":
4502
+ throw new RivetError({
4503
+ message: _response.error.errorMessage
4504
+ });
4505
+ }
4506
+ }
4507
+ /**
4508
+ * @param {string} runnerName
4509
+ * @param {Rivet.RunnerConfigsUpsertRequestBody} request
4510
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4511
+ *
4512
+ * @example
4513
+ * await client.runnerConfigsUpsert("runner_name", {
4514
+ * namespace: "namespace",
4515
+ * datacenters: {
4516
+ * "key": {}
4517
+ * }
4518
+ * })
4519
+ */
4520
+ async runnerConfigsUpsert(runnerName, request, requestOptions) {
4521
+ const { namespace, ..._body } = request;
4522
+ const _queryParams = {};
4523
+ _queryParams["namespace"] = namespace;
4524
+ const _response = await (this._options.fetcher ?? fetcher)({
4525
+ url: (0, import_url_join8.default)(
4526
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4527
+ `runner-configs/${encodeURIComponent(runnerName)}`
4528
+ ),
4529
+ method: "PUT",
4530
+ headers: {
4531
+ Authorization: await this._getAuthorizationHeader(),
4532
+ "X-Fern-Language": "JavaScript",
4533
+ "X-Fern-Runtime": RUNTIME.type,
4534
+ "X-Fern-Runtime-Version": RUNTIME.version,
4535
+ ...requestOptions == null ? void 0 : requestOptions.headers
4536
+ },
4537
+ contentType: "application/json",
4538
+ queryParameters: _queryParams,
4539
+ requestType: "json",
4540
+ body: RunnerConfigsUpsertRequestBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
4541
+ timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4542
+ maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4543
+ abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4544
+ });
4545
+ if (_response.ok) {
4546
+ return RunnerConfigsUpsertResponse.parseOrThrow(_response.body, {
4547
+ unrecognizedObjectKeys: "passthrough",
4548
+ allowUnrecognizedUnionMembers: true,
4549
+ allowUnrecognizedEnumValues: true,
4550
+ skipValidation: true,
4551
+ breadcrumbsPrefix: ["response"]
4552
+ });
4553
+ }
4554
+ if (_response.error.reason === "status-code") {
4555
+ throw new RivetError({
4556
+ statusCode: _response.error.statusCode,
4557
+ body: _response.error.body
4558
+ });
4559
+ }
4560
+ switch (_response.error.reason) {
4561
+ case "non-json":
4562
+ throw new RivetError({
4563
+ statusCode: _response.error.statusCode,
4564
+ body: _response.error.rawBody
4565
+ });
4566
+ case "timeout":
4567
+ throw new RivetTimeoutError("Timeout exceeded when calling PUT /runner-configs/{runner_name}.");
4568
+ case "unknown":
4569
+ throw new RivetError({
4570
+ message: _response.error.errorMessage
4571
+ });
4572
+ }
4573
+ }
4574
+ /**
4575
+ * @param {string} runnerName
4576
+ * @param {Rivet.RunnerConfigsDeleteRequest} request
4577
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4578
+ *
4579
+ * @example
4580
+ * await client.runnerConfigsDelete("runner_name", {
4581
+ * namespace: "namespace"
4582
+ * })
4583
+ */
4584
+ async runnerConfigsDelete(runnerName, request, requestOptions) {
4585
+ const { namespace } = request;
4586
+ const _queryParams = {};
4587
+ _queryParams["namespace"] = namespace;
4588
+ const _response = await (this._options.fetcher ?? fetcher)({
4589
+ url: (0, import_url_join8.default)(
4590
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4591
+ `runner-configs/${encodeURIComponent(runnerName)}`
4592
+ ),
4593
+ method: "DELETE",
4594
+ headers: {
4595
+ Authorization: await this._getAuthorizationHeader(),
4596
+ "X-Fern-Language": "JavaScript",
4597
+ "X-Fern-Runtime": RUNTIME.type,
4598
+ "X-Fern-Runtime-Version": RUNTIME.version,
4599
+ ...requestOptions == null ? void 0 : requestOptions.headers
4600
+ },
4601
+ contentType: "application/json",
4602
+ queryParameters: _queryParams,
4603
+ requestType: "json",
4604
+ timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4605
+ maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4606
+ abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4607
+ });
4608
+ if (_response.ok) {
4609
+ return RunnerConfigsDeleteResponse.parseOrThrow(_response.body, {
4610
+ unrecognizedObjectKeys: "passthrough",
4611
+ allowUnrecognizedUnionMembers: true,
4612
+ allowUnrecognizedEnumValues: true,
4613
+ skipValidation: true,
4614
+ breadcrumbsPrefix: ["response"]
4615
+ });
4616
+ }
4617
+ if (_response.error.reason === "status-code") {
4618
+ throw new RivetError({
4619
+ statusCode: _response.error.statusCode,
4620
+ body: _response.error.body
4621
+ });
4622
+ }
4623
+ switch (_response.error.reason) {
4624
+ case "non-json":
4625
+ throw new RivetError({
4626
+ statusCode: _response.error.statusCode,
4627
+ body: _response.error.rawBody
4628
+ });
4629
+ case "timeout":
4630
+ throw new RivetTimeoutError(
4631
+ "Timeout exceeded when calling DELETE /runner-configs/{runner_name}."
4632
+ );
4633
+ case "unknown":
4634
+ throw new RivetError({
4635
+ message: _response.error.errorMessage
4636
+ });
4637
+ }
4638
+ }
4639
+ /**
4640
+ * @param {string} runnerName
4641
+ * @param {Rivet.RunnerConfigsRefreshMetadataRequest} request
4642
+ * @param {RivetClient.RequestOptions} requestOptions - Request-specific configuration.
4643
+ *
4644
+ * @example
4645
+ * await client.runnerConfigsRefreshMetadata("runner_name", {
4646
+ * namespace: "namespace",
4647
+ * body: {
4648
+ * "key": "value"
4649
+ * }
4650
+ * })
4651
+ */
4652
+ async runnerConfigsRefreshMetadata(runnerName, request, requestOptions) {
4653
+ const { namespace, body: _body } = request;
4654
+ const _queryParams = {};
4655
+ _queryParams["namespace"] = namespace;
4656
+ const _response = await (this._options.fetcher ?? fetcher)({
4657
+ url: (0, import_url_join8.default)(
4658
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4659
+ `runner-configs/${encodeURIComponent(runnerName)}/refresh-metadata`
4660
+ ),
4661
+ method: "POST",
4662
+ headers: {
4663
+ Authorization: await this._getAuthorizationHeader(),
4664
+ "X-Fern-Language": "JavaScript",
4665
+ "X-Fern-Runtime": RUNTIME.type,
4666
+ "X-Fern-Runtime-Version": RUNTIME.version,
4667
+ ...requestOptions == null ? void 0 : requestOptions.headers
4668
+ },
4669
+ contentType: "application/json",
4670
+ queryParameters: _queryParams,
4671
+ requestType: "json",
4672
+ body: RunnerConfigsRefreshMetadataRequestBody.jsonOrThrow(_body, {
4673
+ unrecognizedObjectKeys: "strip"
4674
+ }),
4675
+ timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 18e4,
4676
+ maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
4677
+ abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
4678
+ });
4679
+ if (_response.ok) {
4680
+ return RunnerConfigsRefreshMetadataResponse.parseOrThrow(_response.body, {
4681
+ unrecognizedObjectKeys: "passthrough",
4682
+ allowUnrecognizedUnionMembers: true,
4683
+ allowUnrecognizedEnumValues: true,
4684
+ skipValidation: true,
4685
+ breadcrumbsPrefix: ["response"]
4686
+ });
4687
+ }
4688
+ if (_response.error.reason === "status-code") {
4689
+ throw new RivetError({
4690
+ statusCode: _response.error.statusCode,
4691
+ body: _response.error.body
4692
+ });
4693
+ }
4694
+ switch (_response.error.reason) {
4695
+ case "non-json":
4696
+ throw new RivetError({
4697
+ statusCode: _response.error.statusCode,
4698
+ body: _response.error.rawBody
4699
+ });
4700
+ case "timeout":
4701
+ throw new RivetTimeoutError(
4702
+ "Timeout exceeded when calling POST /runner-configs/{runner_name}/refresh-metadata."
4703
+ );
4704
+ case "unknown":
4705
+ throw new RivetError({
4706
+ message: _response.error.errorMessage
4707
+ });
4708
+ }
4709
+ }
3956
4710
  async _getAuthorizationHeader() {
3957
4711
  return `Bearer ${await Supplier.get(this._options.token)}`;
3958
4712
  }